[200~init 流程现在会正确将 phase 文件归入 B 组并重置为模板,不再落入 C 组。~
This commit is contained in:
@@ -113,7 +113,7 @@ init 后用户说"补一下 gitignore"或"生成 gitignore" → 只跑阶段 5.5
|
|||||||
2. 用 shell 列出 .opencode 下所有文件(含子目录)
|
2. 用 shell 列出 .opencode 下所有文件(含子目录)
|
||||||
3. 把每个文件对照 manifest.json 分成三组:
|
3. 把每个文件对照 manifest.json 分成三组:
|
||||||
- A 组(canonical):路径在 canonical_root / canonical_opencode_top / canonical_skills 中,原样保留
|
- A 组(canonical):路径在 canonical_root / canonical_opencode_top / canonical_skills 中,原样保留
|
||||||
- B 组(template-data):路径在 template_data_files 中,需要删除或重置为模板
|
- B 组(template-data):路径在 template_data_files 或 template_phase_files 中,需要删除或重置为模板
|
||||||
- C 组(foreign):manifest 三组之外的所有路径,视作未知项
|
- C 组(foreign):manifest 三组之外的所有路径,视作未知项
|
||||||
4. 把分组结果用表格汇报给用户:
|
4. 把分组结果用表格汇报给用户:
|
||||||
| 组 | 路径 | 处理动作 |
|
| 组 | 路径 | 处理动作 |
|
||||||
@@ -161,6 +161,13 @@ init 后用户说"补一下 gitignore"或"生成 gitignore" → 只跑阶段 5.5
|
|||||||
| `.opencode/data/profile/project-profile.md` | project-profile 模板 |
|
| `.opencode/data/profile/project-profile.md` | project-profile 模板 |
|
||||||
| `.opencode/data/profile/project-profile-log.md` | project-profile-log 模板 |
|
| `.opencode/data/profile/project-profile-log.md` | project-profile-log 模板 |
|
||||||
| `.opencode/data/spec-docs/state.json` | state.json 模板 |
|
| `.opencode/data/spec-docs/state.json` | state.json 模板 |
|
||||||
|
| `.opencode/phase/current.json` | current.json 模板 |
|
||||||
|
| `.opencode/phase/data/design/state.json` | state.json 模板 |
|
||||||
|
| `.opencode/phase/data/design/concept.md` | concept.md 模板 |
|
||||||
|
| `.opencode/phase/data/design/design-outline.md` | design-outline.md 模板 |
|
||||||
|
| `.opencode/phase/data/design/qa-quality-report.md` | qa-quality-report.md 模板 |
|
||||||
|
| `.opencode/phase/data/design/reference-analysis/gdd-reverse.md` | gdd-reverse.md 模板 |
|
||||||
|
| `.opencode/phase/data/design/reference-analysis/community-iteration.md` | community-iteration.md 模板 |
|
||||||
|
|
||||||
执行要点:
|
执行要点:
|
||||||
- 每个重置前**先 Read 现有内容预览前 10 行**给用户,避免误删有价值数据(特别是 deferred/pitfalls 用户可能想保留)
|
- 每个重置前**先 Read 现有内容预览前 10 行**给用户,避免误删有价值数据(特别是 deferred/pitfalls 用户可能想保留)
|
||||||
@@ -302,6 +309,8 @@ init 后用户说"补一下 gitignore"或"生成 gitignore" → 只跑阶段 5.5
|
|||||||
- `.opencode/skills/problem-distillery/`
|
- `.opencode/skills/problem-distillery/`
|
||||||
- `.opencode/skills/profile-memory/`
|
- `.opencode/skills/profile-memory/`
|
||||||
- `.opencode/skills/spec-docs/`
|
- `.opencode/skills/spec-docs/`
|
||||||
|
- `.opencode/skills/game-design/`
|
||||||
|
- `.opencode/skills/skill-tester/`
|
||||||
|
|
||||||
> **任何不在此白名单中的 skill 目录**,在阶段 3 中一律删除(视为源项目的项目级 Skill)。
|
> **任何不在此白名单中的 skill 目录**,在阶段 3 中一律删除(视为源项目的项目级 Skill)。
|
||||||
|
|
||||||
@@ -314,6 +323,15 @@ init 后用户说"补一下 gitignore"或"生成 gitignore" → 只跑阶段 5.5
|
|||||||
- `.opencode/data/profile/{user-profile.md, user-profile-log.md, project-profile.md, project-profile-log.md}`
|
- `.opencode/data/profile/{user-profile.md, user-profile-log.md, project-profile.md, project-profile-log.md}`
|
||||||
- `.opencode/data/spec-docs/state.json`
|
- `.opencode/data/spec-docs/state.json`
|
||||||
|
|
||||||
|
### 阶段数据占位目录(保留目录,文件重置为模板内容)
|
||||||
|
|
||||||
|
- `.opencode/phase/current.json`
|
||||||
|
- `.opencode/phase/data/design/state.json`
|
||||||
|
- `.opencode/phase/data/design/concept.md`
|
||||||
|
- `.opencode/phase/data/design/design-outline.md`
|
||||||
|
- `.opencode/phase/data/design/qa-quality-report.md`
|
||||||
|
- `.opencode/phase/data/design/reference-analysis/{gdd-reverse.md, community-iteration.md}`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 清理清单(cleanup list)
|
## 清理清单(cleanup list)
|
||||||
@@ -483,6 +501,90 @@ last_distill_date: {{DATE}}
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### phase/current.json
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"phase": "design",
|
||||||
|
"switched_at": null,
|
||||||
|
"previous_phase": null
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### phase/data/design/state.json
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"workflow_state": "WAITING_FOR_CONCEPT",
|
||||||
|
"concept_summary": "",
|
||||||
|
"reference_games": [],
|
||||||
|
"in_progress": {
|
||||||
|
"active": false,
|
||||||
|
"operation": null,
|
||||||
|
"started_at": null,
|
||||||
|
"detail": null
|
||||||
|
},
|
||||||
|
"checkpoints": [],
|
||||||
|
"sessions": [],
|
||||||
|
"created_at": null,
|
||||||
|
"updated_at": null
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### phase/data/design/concept.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# 游戏概念
|
||||||
|
|
||||||
|
(设计阶段步骤 1 的用户原始概念记录)
|
||||||
|
```
|
||||||
|
|
||||||
|
### phase/data/design/design-outline.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# 游戏设计大纲
|
||||||
|
|
||||||
|
(设计阶段完成后由 game-design Skill 生成)
|
||||||
|
|
||||||
|
详见 `## 四、开发阶段交接` 章节供开发阶段 Agent 参考。
|
||||||
|
```
|
||||||
|
|
||||||
|
### phase/data/design/qa-quality-report.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# 问答质量评估报告
|
||||||
|
|
||||||
|
本文件记录设计工作流中每轮问答的质量评估结果。每次评估追加,不覆盖。
|
||||||
|
|
||||||
|
## 评估维度
|
||||||
|
|
||||||
|
- **劣质问题类型**:引导性 / 过于抽象 / 遗漏选项 / 不可回答 / 基于推测
|
||||||
|
- **问题原文**:保留用户质疑的原问题
|
||||||
|
- **用户反馈**:用户的具体质疑或自定义回答
|
||||||
|
- **优化方案**:改进后的提问方式
|
||||||
|
- **通用建议**:可跨项目复用的经验
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 质量报告
|
||||||
|
```
|
||||||
|
|
||||||
|
### phase/data/design/reference-analysis/gdd-reverse.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# GDD 逆向分析
|
||||||
|
|
||||||
|
(game-design Skill 步骤 3 sub-agent A 产物)
|
||||||
|
```
|
||||||
|
|
||||||
|
### phase/data/design/reference-analysis/community-iteration.md
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# 社群口碑与品类迭代分析
|
||||||
|
|
||||||
|
(game-design Skill 步骤 3 sub-agent B 产物)
|
||||||
|
```
|
||||||
|
|
||||||
### .init-done
|
### .init-done
|
||||||
|
|
||||||
阶段 7 写入的 sentinel,YAML 格式,字段固定:
|
阶段 7 写入的 sentinel,YAML 格式,字段固定:
|
||||||
@@ -864,8 +966,8 @@ public/build/
|
|||||||
|
|
||||||
| # | 检核项 | 操作 |
|
| # | 检核项 | 操作 |
|
||||||
|---|--------|------|
|
|---|--------|------|
|
||||||
| 2.1 | `canonical-manifest.json` → `template_data_files` | **首选更新目标**:在 JSON 数组中追加新数据文件路径 |
|
| 2.1 | `canonical-manifest.json` → `template_data_files` 或 `template_phase_files` | **首选更新目标**:在 JSON 对应数组中追加新数据文件路径。phase 阶段数据文件归入 `template_phase_files`,其余归入 `template_data_files` |
|
||||||
| 2.2 | `opencode-init` 规范清单 → 数据占位目录 | 在 `### 数据占位目录` 下新增路径(与 2.1 保持同步) |
|
| 2.2 | `opencode-init` 规范清单 → 数据占位目录 / 阶段数据占位目录 | 在对应目录下新增路径(与 2.1 保持同步) |
|
||||||
| 2.3 | `opencode-init` 清理清单 → B 组重置列表 | 在阶段 3 的 B 组表格中新增一行 |
|
| 2.3 | `opencode-init` 清理清单 → B 组重置列表 | 在阶段 3 的 B 组表格中新增一行 |
|
||||||
| 2.4 | `opencode-init` → 模板内容 | 新增该文件的模板内容(最小化版本,含占位注释) |
|
| 2.4 | `opencode-init` → 模板内容 | 新增该文件的模板内容(最小化版本,含占位注释) |
|
||||||
| 2.5 | `opencode.json` → `instructions` | 若该数据文件应注入会话上下文,追加到 `instructions` 数组 |
|
| 2.5 | `opencode.json` → `instructions` | 若该数据文件应注入会话上下文,追加到 `instructions` 数组 |
|
||||||
@@ -925,10 +1027,11 @@ public/build/
|
|||||||
|------|---------|
|
|------|---------|
|
||||||
| `canonical-manifest.json` VS `canonical_skills` | glob `.opencode/skills/*/` → 不在 manifest 中且非项目级 → 警告 |
|
| `canonical-manifest.json` VS `canonical_skills` | glob `.opencode/skills/*/` → 不在 manifest 中且非项目级 → 警告 |
|
||||||
| `canonical-manifest.json` VS `template_data_files` | glob `.opencode/data/**/*` → 不在 manifest 中 → 警告 |
|
| `canonical-manifest.json` VS `template_data_files` | glob `.opencode/data/**/*` → 不在 manifest 中 → 警告 |
|
||||||
|
| `canonical-manifest.json` VS `template_phase_files` | glob `.opencode/phase/**/*.md` + `.opencode/phase/*.json` → 不在 manifest 中 → 警告 |
|
||||||
| `canonical-manifest.json` VS disk | manifest 中的路径 → glob/read 验证文件存在 |
|
| `canonical-manifest.json` VS disk | manifest 中的路径 → glob/read 验证文件存在 |
|
||||||
| Skill frontmatter 完整性 | 遍历所有 `SKILL.md` → 验证第一行 `---`、含 `name:` 字段、正确闭合 |
|
| Skill frontmatter 完整性 | 遍历所有 `SKILL.md` → 验证第一行 `---`、含 `name:` 字段、正确闭合 |
|
||||||
| `AGENTS.md` 引用的 Skill | grep Skill 名 → 必须在 `canonical-manifest.json` → `canonical_skills` 中 |
|
| `AGENTS.md` 引用的 Skill | grep Skill 名 → 必须在 `canonical-manifest.json` → `canonical_skills` 中 |
|
||||||
| `AGENTS.md` 引用的数据文件 | grep 文件路径 → 必须在 `canonical-manifest.json` → `template_data_files` 中 |
|
| `AGENTS.md` 引用的数据文件 | grep 文件路径 → 必须在 `canonical-manifest.json` → `template_data_files` 或 `template_phase_files` 中 |
|
||||||
| `AGENTS.md` 引用的 docs/ 文档 | glob 检查文件存在 |
|
| `AGENTS.md` 引用的 docs/ 文档 | glob 检查文件存在 |
|
||||||
| `opencode.json` → `instructions` 所列路径 | `read` 逐条验证文件存在 |
|
| `opencode.json` → `instructions` 所列路径 | `read` 逐条验证文件存在 |
|
||||||
| `opencode.json` → `instructions` 所列路径 | 必须在 `canonical-manifest.json` 的 `template_data_files` 或 `canonical_opencode_top` 中 |
|
| `opencode.json` → `instructions` 所列路径 | 必须在 `canonical-manifest.json` 的 `template_data_files` 或 `canonical_opencode_top` 中 |
|
||||||
@@ -937,6 +1040,7 @@ public/build/
|
|||||||
| `.opencode/skills/` 下的 Skill 目录 | 若不在 `epee-orchestrator/registry.md` 中 → 缺失注册 |
|
| `.opencode/skills/` 下的 Skill 目录 | 若不在 `epee-orchestrator/registry.md` 中 → 缺失注册 |
|
||||||
| `.opencode/skills/` 下的 Skill 目录 | 若不在 `canonical_skills` 中且非项目级 → 警告 |
|
| `.opencode/skills/` 下的 Skill 目录 | 若不在 `canonical_skills` 中且非项目级 → 警告 |
|
||||||
| `.opencode/data/` 下的数据文件 | 若不在 `template_data_files` 中 → 警告 |
|
| `.opencode/data/` 下的数据文件 | 若不在 `template_data_files` 中 → 警告 |
|
||||||
|
| `.opencode/phase/` 下的数据文件 | 若不在 `template_phase_files` 中 → 警告 |
|
||||||
| `.opencode/data/` 下的数据文件 | 若需要注入上下文 → 检查是否在 `opencode.json` → `instructions` 中 |
|
| `.opencode/data/` 下的数据文件 | 若需要注入上下文 → 检查是否在 `opencode.json` → `instructions` 中 |
|
||||||
|
|
||||||
### 整合自检执行规则
|
### 整合自检执行规则
|
||||||
|
|||||||
Reference in New Issue
Block a user