3.3 KiB
3.3 KiB
id: CL-20260727-1213-nostars
date: 2026-07-27 12:13
author: nostars
author_name: Nostars Developer
type: feat
merge_source: FOR_Roblox_Main
status: active
superseded_by:
title: 建立多项目类型 Cursor 初始化架构
source_chat: 多类型初始化架构重构
tags:
- cursor-init
- multi-project
- manifest
- hooks
- godot
- roblox
affected_files:
- .cursor-init-source
- .cursor/bootstrap/catalog.json
- .cursor/bootstrap/common.manifest.json
- .cursor/bootstrap/skills.json
- .cursor/bootstrap/tools/cursor_init.py
- .cursor/bootstrap/tests/test_cursor_init.py
- .cursor/bootstrap/types/general/manifest.json
- .cursor/bootstrap/types/godot/manifest.json
- .cursor/bootstrap/types/roblox/manifest.json
- .cursor/bootstrap/types/godot/payload/rules/project/godot-architecture.mdc
- .cursor/bootstrap/types/godot/payload/rules/project/godot-assets.mdc
- .cursor/bootstrap/types/godot/payload/rules/project/godot-data-systems.mdc
- .cursor/bootstrap/types/godot/payload/rules/project/godot-gdscript-style.mdc
- .cursor/bootstrap/types/godot/payload/rules/project/godot-scene-conventions.mdc
- .cursor/bootstrap/types/godot/payload/rules/project/godot-testing.mdc
- .cursor/hooks/changelog-scan.json
- .cursor/hooks/check-changelog.ps1
- .cursor/hooks/check-changelog.sh
- .cursor/hooks/tests/test_check_changelog.py
- .cursor/local-env.example.json
- .cursor/rules/common/baserule.mdc
- .cursor/rules/common/cursor-init-recall.mdc
- .cursor/rules/common/epee-orchestrator.mdc
- .cursor/skills/cursor-init/SKILL.md
- .cursor/skills/cursor-init/reference.md
- .cursor/skills/epee-orchestrator/SKILL.md
- .cursor/skills/epee-orchestrator/registry.md
- .cursor/README.md
- .gitignore
- .gitattributes
以 common 常驻、单选类型惰性物化的方式支持通用与 Godot 初始化。
新增 JSON catalog/manifests、标准库 Python dry-run/apply/check 引擎与自包含 bootstrap。 Godot Rules 移入未激活 payload,通用项目初始化前不再加载 Godot 约束。 Registry、Hook 扫描、本机字段和 Git managed blocks 均按所选类型生成。 Roblox 保持 draft,只有 payload 和测试完整后才会出现在动态问卷中。
- what: 将固定 Godot 白名单重构为 common + 单选项目类型的 manifest 驱动初始化系统,加入摘要确认、所有权 hash、foreign/conflict 阻断、状态重置与 sentinel 验证。
- why: 原结构在未初始化时就加载 Godot Rule,并把 Rule/Skill 数量、环境字段、Hook 扫描和 Git 配置写死,无法安全扩展通用或 Roblox 项目。
- decisions: common 只保留活动副本;项目类型 payload 自包含保存在
.cursor/bootstrap/types/;使用 JSON 与 Python 3.10 标准库;general为 common-only;Roblox 通过 readiness 门槛后才能从 draft 切为 ready。 - tests: 初始化引擎 11 项 unittest 与 PowerShell/Bash Hook 6 项回归测试通过;catalog
--check、ready 类型门控、general/Godot 实仓 dry-run、changelog--check、git diff --check和 IDE lint 均通过。 - notes: 保留并泛化此前 Hook 的 session + Git + mtime 防误报守卫;新增根
.cursor-init-source,避免本初始化源码仓被自身自动初始化。