architext 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -1
- package/README.md +18 -16
- package/README.zh-CN.md +15 -14
- package/dist/index.js +43 -29
- package/dist/templates/en/briefs/_base.md +13 -6
- package/dist/templates/en/briefs/_modules.md +2 -2
- package/dist/templates/en/docs/global/error_memory.json +40 -0
- package/dist/templates/en/docs/global/map.json +46 -90
- package/dist/templates/en/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +6 -13
- package/dist/templates/en/{rules/02_tech_stack.md → docs/global/tech_stack.md} +7 -18
- package/dist/templates/en/docs/global/vision.md +1 -1
- package/dist/templates/en/docs/prompts/audit.md +5 -5
- package/dist/templates/en/docs/prompts/code.md +23 -11
- package/dist/templates/en/docs/prompts/edit.md +21 -7
- package/dist/templates/en/docs/prompts/fix.md +11 -2
- package/dist/templates/en/docs/prompts/inherit.md +18 -13
- package/dist/templates/en/docs/prompts/map.md +4 -3
- package/dist/templates/en/docs/prompts/plan.md +11 -5
- package/dist/templates/en/docs/prompts/remove.md +13 -8
- package/dist/templates/en/docs/prompts/revise.md +10 -2
- package/dist/templates/en/docs/prompts/scope.md +4 -3
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +20 -14
- package/dist/templates/en/docs/prompts/ui.md +113 -0
- package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/en/docs/templates/spec.template.md +1 -1
- package/dist/templates/en/docs/templates/ui.template.md +8 -8
- package/dist/templates/en/rules/00_system.md +245 -51
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +26 -12
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +137 -208
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -2
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +1 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -302
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +131 -306
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +17 -10
- package/dist/templates/zh/briefs/_modules.md +2 -2
- package/dist/templates/zh/docs/global/error_memory.json +40 -0
- package/dist/templates/zh/docs/global/map.json +39 -109
- package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
- package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
- package/dist/templates/zh/docs/global/vision.md +1 -1
- package/dist/templates/zh/docs/prompts/audit.md +5 -5
- package/dist/templates/zh/docs/prompts/code.md +22 -10
- package/dist/templates/zh/docs/prompts/edit.md +20 -6
- package/dist/templates/zh/docs/prompts/fix.md +10 -1
- package/dist/templates/zh/docs/prompts/inherit.md +18 -13
- package/dist/templates/zh/docs/prompts/map.md +5 -4
- package/dist/templates/zh/docs/prompts/plan.md +11 -5
- package/dist/templates/zh/docs/prompts/remove.md +13 -8
- package/dist/templates/zh/docs/prompts/revise.md +12 -4
- package/dist/templates/zh/docs/prompts/scope.md +4 -3
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +19 -15
- package/dist/templates/zh/docs/prompts/ui.md +113 -0
- package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/zh/docs/templates/spec.template.md +1 -1
- package/dist/templates/zh/docs/templates/ui.template.md +8 -8
- package/dist/templates/zh/rules/00_system.md +243 -49
- package/dist/templates/zh/rules/90_custom_rules.md +2 -1
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -204
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +1 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -302
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +131 -306
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -95
- package/dist/templates/en/rules/03_data_governance.md +0 -106
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -95
- package/dist/templates/zh/rules/03_data_governance.md +0 -106
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"errorPatterns": {
|
|
3
|
+
"_comment": "错误模式:{ id: 唯一标识, watchFor: [执行前需警惕的场景], matchWhen: [报错后匹配的关键词], cause: 根本原因, solution: 解决方案, lesson: 教训/原则 }。AI解决错误后在此追加",
|
|
4
|
+
"examples": [
|
|
5
|
+
{
|
|
6
|
+
"id": "build-vite-config-missing",
|
|
7
|
+
"watchFor": ["运行 npm run build", "修改 vite.config.ts"],
|
|
8
|
+
"matchWhen": ["ENOENT", "vite.config", "Cannot find module"],
|
|
9
|
+
"cause": "配置文件被误删或 node_modules 未安装",
|
|
10
|
+
"solution": "检查文件是否存在,运行 npm install 重装依赖",
|
|
11
|
+
"lesson": "修改配置前备份,定期确认 node_modules 完整"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "type-import-assertion-deprecated",
|
|
15
|
+
"watchFor": ["导入 JSON 文件"],
|
|
16
|
+
"matchWhen": ["assert", "SyntaxError", "import", "type"],
|
|
17
|
+
"cause": "Node.js 18+ 废弃了 import assert 语法,改用 import attributes",
|
|
18
|
+
"solution": "assert { type: 'json' } 改为 with { type: 'json' }",
|
|
19
|
+
"lesson": "关注 Node.js 版本更新,import JSON 时确认语法版本"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"checkpoints": {
|
|
24
|
+
"_comment": "检查点:{ before: 执行前匹配的操作描述, check: [要检查的 errorPatterns.id 列表] }。AI根据 watchFor 场景自动生成",
|
|
25
|
+
"examples": [
|
|
26
|
+
{
|
|
27
|
+
"before": "运行 npm run build",
|
|
28
|
+
"check": ["build-vite-config-missing"]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"before": "修改配置文件",
|
|
32
|
+
"check": ["build-vite-config-missing"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"before": "导入 JSON 文件",
|
|
36
|
+
"check": ["type-import-assertion-deprecated"]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,119 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
2
|
+
"directoryMapping": {
|
|
3
|
+
"_comment": "代码目录 ↔ 模块映射:{ path: 目录路径, module: 模块名, responsibility: 职责描述 }",
|
|
4
|
+
"examples": [
|
|
4
5
|
{
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"path": "src/features/auth",
|
|
7
|
+
"module": "auth",
|
|
8
|
+
"responsibility": "用户认证、登录、注册"
|
|
8
9
|
},
|
|
9
10
|
{
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"file": "02_tech_stack.md",
|
|
16
|
-
"role": "Tech Stack",
|
|
17
|
-
"when": "技术选型、代码规范、工程治理标准"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"file": "03_data_governance.md",
|
|
21
|
-
"role": "Data Governance",
|
|
22
|
-
"when": "读写全局 JSON 数据文件时"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"file": "04_cli_tools.md",
|
|
26
|
-
"role": "CLI Reference",
|
|
27
|
-
"when": "执行 Terminal Gate 命令时 (npx archi task/plan/render 语法速查)"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"file": "99_context_glue.md",
|
|
31
|
-
"role": "Context Bridge",
|
|
32
|
-
"when": "触碰代码时,自动关联上下文文档"
|
|
11
|
+
"path": "src/features/todos",
|
|
12
|
+
"module": "todo",
|
|
13
|
+
"responsibility": "待办事项 CRUD"
|
|
33
14
|
}
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
"file": "map.json",
|
|
48
|
-
"role": "Map (本文件)",
|
|
49
|
-
"content": "目录结构、文件索引、逻辑拓扑"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"file": "dictionary.json",
|
|
53
|
-
"role": "Dictionary",
|
|
54
|
-
"content": "业务术语、公共组件注册表"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"file": "design_tokens.json",
|
|
58
|
-
"role": "Visuals (仅ui项目)",
|
|
59
|
-
"content": "颜色、字体、间距变量"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"file": "data_snapshot.json",
|
|
63
|
-
"role": "Data (仅data项目)",
|
|
64
|
-
"content": "数据库 Schema 镜像"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"file": "error_codes.json",
|
|
68
|
-
"role": "Errors",
|
|
69
|
-
"content": "业务错误码注册表"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"file": "api_snapshot.json",
|
|
73
|
-
"role": "API (仅api项目)",
|
|
74
|
-
"content": "HTTP 端点注册表与协议映射"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"file": "env_registry.json",
|
|
78
|
-
"role": "Env (仅api项目)",
|
|
79
|
-
"content": "运行时环境变量清单"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"file": "command_api.json",
|
|
83
|
-
"role": "Commands (仅cli项目)",
|
|
84
|
-
"content": "CLI 命令签名注册表"
|
|
85
|
-
},
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"logicalTopology": {
|
|
18
|
+
"_comment": "逻辑拓扑:{ module: 模块名, layer: 层(layer/domain/interface/infrastructure), depends: [依赖模块] }",
|
|
19
|
+
"examples": [
|
|
20
|
+
{ "module": "auth", "layer": "domain", "depends": ["user-repo"] },
|
|
21
|
+
{ "module": "todo", "layer": "domain", "depends": ["auth", "todo-repo"] }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"criticalUserJourneys": {
|
|
25
|
+
"_comment": "关键用户旅程:{ journey: 旅程名, steps: [步骤], owner: 归属任务ID }",
|
|
26
|
+
"examples": [
|
|
86
27
|
{
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
28
|
+
"journey": "用户注册登录",
|
|
29
|
+
"steps": ["访问首页", "点击注册", "填写表单", "提交验证", "登录成功"],
|
|
30
|
+
"owner": "FEAT-AUTH"
|
|
90
31
|
}
|
|
91
32
|
]
|
|
92
33
|
},
|
|
93
|
-
"
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"file": "plan.json",
|
|
111
|
-
"category": "Plan",
|
|
112
|
-
"purpose": "详细步骤拆解与测试用例 (Execution)"
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
"directoryMapping": [],
|
|
116
|
-
"logicalTopology": [],
|
|
117
|
-
"criticalUserJourneys": [],
|
|
118
|
-
"featureRelations": []
|
|
34
|
+
"featureRelations": {
|
|
35
|
+
"_comment": "影响关联关系,以网状结构组织:{ group: 网名, members: [成员文件], rule: 变更规则 }",
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"group": "UI 协议",
|
|
39
|
+
"members": [
|
|
40
|
+
"prompts/ui.md",
|
|
41
|
+
"skills/archi-ui-wireframe/SKILL.md",
|
|
42
|
+
"prompts/start.md",
|
|
43
|
+
"prompts/inherit.md"
|
|
44
|
+
],
|
|
45
|
+
"rule": "UI 协议与 Skill 强关联,变更需互相检查"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
119
49
|
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: CLI Reference Manual. Working directory rule and command syntax for npx archi task/plan/render.
|
|
3
|
-
globs: **/*
|
|
4
|
-
applyTo: **/*
|
|
5
|
-
alwaysApply: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
1
|
# CLI Reference
|
|
9
2
|
|
|
10
3
|
> **Role**: 命令速查手册。提供 `npx archi` 系列命令的语法与参数,供 Terminal Gate 执行时查阅。
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Technical Standards & Technology Stack. Contains language versions, framework choices, coding conventions, naming rules, and forbidden patterns. Consult when writing code.
|
|
3
|
-
globs: **/*
|
|
4
|
-
applyTo: **/*
|
|
5
|
-
alwaysApply: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
1
|
# Tech Stack & Engineering Standards: [项目名称]
|
|
9
2
|
|
|
10
3
|
> **Role:** The "Law" of the codebase. Defines tools, structure, and engineering workflows.
|
|
@@ -15,7 +8,7 @@ alwaysApply: true
|
|
|
15
8
|
## 1. Global Mandates (全局红线)
|
|
16
9
|
* **No Hardcoding:** 所有的密钥、API地址必须使用环境变量,严禁硬编码。
|
|
17
10
|
* **No Dead Code:** 提交的代码必须是干净的,严禁保留注释掉的代码块或无用的 `TODO`。
|
|
18
|
-
* **Comments for Why:**
|
|
11
|
+
* **Comments for Why:** 注释解释"为什么这么做"(业务背景),而不仅仅是"做了什么"。
|
|
19
12
|
|
|
20
13
|
---
|
|
21
14
|
|
|
@@ -51,23 +44,19 @@ alwaysApply: true
|
|
|
51
44
|
---
|
|
52
45
|
|
|
53
46
|
<!-- ═══════ 以下为固定协议(禁修改) ═══════ -->
|
|
54
|
-
## 4. UI Protocol: ITP v3.0 (
|
|
47
|
+
## 4. UI Protocol: ITP v3.0 (Tri-Artifact) [可选 - 仅适用于有 UI 的项目]
|
|
55
48
|
<!-- 核心 UI 描述协议 -->
|
|
56
49
|
> **Note:** 如果项目没有 UI(如 CLI、Backend API、Library),可以删除此章节。
|
|
57
50
|
|
|
58
|
-
### 4.1
|
|
59
|
-
|
|
60
|
-
UI 制品层级:
|
|
51
|
+
### 4.1 Tri-Artifact Strategy (三制品策略)
|
|
61
52
|
|
|
62
53
|
| 制品 | 格式 | 读者 | 职责 |
|
|
63
54
|
|:---|:---|:---|:---|
|
|
64
|
-
| `
|
|
65
|
-
| `ui_context.md` | 结构化 Markdown | AI (plan/code/audit/edit) | **AI 屏幕索引** —
|
|
66
|
-
| `ui.md` | ITP v3.0 DSL | AI (code/audit) | 任务级 UI 范围声明 —
|
|
67
|
-
|
|
68
|
-
- `
|
|
69
|
-
- `ui.md` 仅声明"本任务负责 ui_context.md 中的哪些屏幕/状态",禁重定义全局布局
|
|
70
|
-
- code 阶段以 `ui.md`(任务设计)+ `ui_context.md`(结构/导航)+ `design_tokens.json`(视觉约束)为准;同时以 `ui_concept.html` 为**只读视觉参考**校准布局,用**项目自身技术栈**实现等价视觉效果
|
|
55
|
+
| `screens/` | 多文件 HTML (`index.html` + `S-XX.html` + `_shared.css`) | 人类 (浏览器) | **全局视觉真相源** — `/archi.ui` 触发 Skill 生成;每个屏幕独立预览 |
|
|
56
|
+
| `ui_context.md` | 结构化 Markdown | AI (plan/code/audit/edit) | **AI 屏幕索引** — AI 读取 UI 结构的唯一入口;由同一 Skill 同步生成;禁手动修改 |
|
|
57
|
+
| `ui.md` | ITP v3.0 DSL | AI (code/audit) | 任务级 UI 范围声明 — 仅声明本任务负责的屏幕/状态,禁重定义全局布局 |
|
|
58
|
+
|
|
59
|
+
- code 阶段以 `ui.md` + `ui_context.md` + `design_tokens.json` 为准;`screens/S-XX.html` 为**只读视觉参考**,用**项目自身技术栈**实现等价效果
|
|
71
60
|
|
|
72
61
|
### 4.2 Naming (PrefixFunction)
|
|
73
62
|
组件命名须遵循 `前缀+功能` 格式:
|
|
@@ -190,4 +179,4 @@ UI 制品层级:
|
|
|
190
179
|
|
|
191
180
|
### Auth & Access (认证与权限) (仅ui或api项目)
|
|
192
181
|
* **Mechanism:** [例如:JWT + RBAC / Session + Owner Only / API Key]
|
|
193
|
-
* **Rationale:** [例如:多角色后台管理系统,需细粒度权限控制]
|
|
182
|
+
* **Rationale:** [例如:多角色后台管理系统,需细粒度权限控制]
|
|
@@ -77,6 +77,6 @@ description: Project Constitution: Vision, Personas, Principles & Boundaries.
|
|
|
77
77
|
**Trigger**: 仅在项目初始化 (`/archi.start`) 或重大战略转型 (`/archi.revise`) 时修改。
|
|
78
78
|
|
|
79
79
|
**Action**:
|
|
80
|
-
1. **Alignment**: 确保 Section 3 (Principles) 与 `
|
|
80
|
+
1. **Alignment**: 确保 Section 3 (Principles) 与 `tech_stack.md` 中的技术选型不冲突。
|
|
81
81
|
2. **Completeness**: 必须填满所有 `[ ]` 占位符,严禁保留 "Example" 字样。
|
|
82
82
|
3. **Consistency**: 所有的 Task Spec (`.spec.md`) 都必须引用此文件的 Vision 以确保不跑题。
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
| `pending` | 拒绝 — 无代码可审查 |
|
|
34
34
|
| `blocked` | 拒绝 — 前置依赖未完成 |
|
|
35
35
|
|
|
36
|
-
3. **Load**: vision.md(方向基准)+ task docs (spec/plan/ui) + 前次 audit.md(对比用)+ project context (tech_stack/design_tokens/data_snapshot/ui_context/
|
|
36
|
+
3. **Load**: vision.md(方向基准)+ task docs (spec/plan/ui) + 前次 audit.md(对比用)+ project context (tech_stack/design_tokens/data_snapshot/ui_context/screens/)。读取该任务对应的所有代码文件。
|
|
37
37
|
|
|
38
38
|
**项目级 — Load Overview**:
|
|
39
|
-
1.
|
|
39
|
+
1. 读取项目上下文(vision、roadmap、tech_stack、map),详见 00_system.md 数据治理规则。
|
|
40
40
|
2. 扫描 tasks/ 目录结构。
|
|
41
41
|
3. 读取项目代码入口文件与关键模块。
|
|
42
42
|
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
| 4 | **逻辑正确性** | 业务逻辑错误、矛盾、遗漏分支、状态机缺陷 |
|
|
58
58
|
| 5 | **Bug 猎杀** | 空值/undefined、竞态、资源泄漏、死循环、off-by-one |
|
|
59
59
|
| 6 | **错误处理** | 吞错、静默失败、错误传播链完整性、用户可见反馈 |
|
|
60
|
-
| 7 | **Tech Stack 合规** | 对照 `
|
|
60
|
+
| 7 | **Tech Stack 合规** | 对照 `tech_stack.md`:违禁模式、过时 API、硬编码 |
|
|
61
61
|
| 8 | **安全性** | 敏感信息泄露、输入未校验、注入风险、权限检查 |
|
|
62
62
|
| 9 | **性能** | 不必要全量导入/大循环/无用计算/内存泄漏/N+1 查询 |
|
|
63
|
-
| 10 | (本任务涉及ui时) **Design 合规** | Token 使用;无硬编码魔法值;与 `
|
|
63
|
+
| 10 | (本任务涉及ui时) **Design 合规** | Token 使用;无硬编码魔法值;与 `screens/S-XX.html` 视觉一致 |
|
|
64
64
|
| 11 | (本任务涉及data时) **数据一致性** | 字段名/类型与 `data_snapshot.json` 一致 |
|
|
65
65
|
| 12 | (仅i18n项目) **I18n 合规** | 无硬编码字符串;须用 Key/字典引用 |
|
|
66
66
|
| 13 | **Orphan .gitkeep** | 目录已有其他文件时仍存在 `.gitkeep` — 须删除 |
|
|
67
67
|
| 14 | **Spec-Code 漂移** | 接口/类型/行为与 `spec.md` 一致;手动变更已同步文档 |
|
|
68
|
-
| 15 | (本任务涉及ui时) **UI 引用完整性** | `ui.md` 中 `ref:
|
|
68
|
+
| 15 | (本任务涉及ui时) **UI 引用完整性** | `ui.md` 中 `ref: screens/S-XX.html` 指针是否仍有效 |
|
|
69
69
|
|
|
70
70
|
**Output**: 按维度分组的发现列表,每项含级别、位置、描述。进入 step_3_report。
|
|
71
71
|
</step_2a_task>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<protocol_code>
|
|
2
2
|
**Trigger**: `/archi.code <id>` | 自然语言触发时由 Workflow Dispatch 自动加载
|
|
3
|
-
**Goal**: 基于 `tasks/<id>_<Slug>/plan.json` 任务清单,完成功能开发;遵循 `
|
|
3
|
+
**Goal**: 基于 `tasks/<id>_<Slug>/plan.json` 任务清单,完成功能开发;遵循 `tech_stack.md`(仅ui项目: 同时遵循 `design_tokens.json`);通过构建、类型、Lint、格式化、测试与审计。
|
|
4
4
|
|
|
5
5
|
<meta>
|
|
6
6
|
<style>Deterministic, Type-Safe, SOTA-First</style>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
| `blocked` | 拒绝 — 前置依赖未完成 |
|
|
30
30
|
| `done` | 拒绝 — 已完成,如需修改用 `/archi.edit <ID>` |
|
|
31
31
|
|
|
32
|
-
3. **Load**: task docs (spec/ui/design/plan) + project context (tech_stack/design_tokens/data_snapshot/ui_context/
|
|
32
|
+
3. **Load**: task docs (spec/ui/design/plan) + project context (tech_stack/design_tokens/data_snapshot/ui_context/screens/) + refs(按 tags 匹配,仅读命中文件)。
|
|
33
33
|
|
|
34
34
|
**Output**: 待实施任务的原子清单,标注依赖与顺序。
|
|
35
35
|
</step_1_resolve>
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
<step_3_implement>
|
|
50
50
|
**Protocol**:
|
|
51
51
|
- **Read First**: 修改前须读取目标文件;遵循项目现有代码风格。
|
|
52
|
-
- **Use Existing Stack**: 仅用 `
|
|
53
|
-
- (本任务涉及ui时)
|
|
52
|
+
- **Use Existing Stack**: 仅用 `tech_stack.md` 声明的技术与库。
|
|
53
|
+
- (本任务涉及ui时)[[INCLUDE: shared/ui-redlines.md]]
|
|
54
54
|
- **Type-Safe**: 补齐类型定义;用项目技术栈的类型系统守护边界。
|
|
55
|
-
- **Code Organization**: 遵循 `
|
|
55
|
+
- **Code Organization**: 遵循 `tech_stack.md` 架构模式与文件归位策略。
|
|
56
56
|
- **Comments**: 解释 Why 而非 What。
|
|
57
57
|
- **Naming**: 自解释命名;拒绝无意义名。
|
|
58
58
|
- 仅Complex任务: **Design Adherence**: 存在 `design.md` 时,实现须严格遵循其状态机/流水线/协议;参数引用 § 3 的值;须满足 § 4 所有 Invariants。
|
|
@@ -68,9 +68,13 @@
|
|
|
68
68
|
</step_3_implement>
|
|
69
69
|
|
|
70
70
|
<step_4_validate>
|
|
71
|
-
**Action** (失败须修复后重跑;命令以 `
|
|
71
|
+
**Action** (失败须修复后重跑;命令以 `tech_stack.md` Section 5 为准):
|
|
72
72
|
|
|
73
|
-
**Automated Check**:
|
|
73
|
+
**Automated Check**: 检查 `scripts/validate`:
|
|
74
|
+
- **存在** → 必须运行,结果以脚本输出为准
|
|
75
|
+
- **不存在** → 按以下清单逐项执行
|
|
76
|
+
|
|
77
|
+
> **Scripts Check**: 如 `scripts/` 目录不存在 → 建议先运行 `/archi.script` 生成自动化脚本。
|
|
74
78
|
|
|
75
79
|
| Phase | 检查项 | 要求 |
|
|
76
80
|
|:---|:---|:---|
|
|
@@ -111,7 +115,7 @@
|
|
|
111
115
|
[[SUBAGENT: archi-feature-relations|mode: check, context: 将本次实现的功能与 featureRelations sources 做语义对比]][[NO-SKILL: (Skill 未安装:请阅读 `[[__DOCS_DIR__]]/skills/archi-feature-relations/SKILL.md`,按 mode: check 的逻辑执行)]]
|
|
112
116
|
|
|
113
117
|
**5C. 数据治理同步**:
|
|
114
|
-
[[SUBAGENT: archi-data-sync|context: 扫描本次实现引入的新业务实体/错误码/Schema,按
|
|
118
|
+
[[SUBAGENT: archi-data-sync|context: 扫描本次实现引入的新业务实体/错误码/Schema,按 00_system.md 规则增量同步]][[NO-SKILL: (Skill 未安装:请阅读 `[[__DOCS_DIR__]]/skills/archi-data-sync/SKILL.md`,按其执行协议操作)]]
|
|
115
119
|
|
|
116
120
|
[[INCLUDE: shared/verify-result-handling.md]]
|
|
117
121
|
</step_5_verify>
|
|
@@ -128,7 +132,7 @@
|
|
|
128
132
|
1. 确认 `plan.json` 各 task `done` 标记已全部更新。
|
|
129
133
|
2. **Drift Warning**: 对比代码变更与 `spec.md` 关键点位。发现超出 spec 覆盖范围 → 标注 `⚠️ Spec 漂移`,建议 `/archi.edit <ID>`。
|
|
130
134
|
3. 输出完成任务清单与补丁链接。
|
|
131
|
-
4.
|
|
135
|
+
4. 提供下一步建议。
|
|
132
136
|
|
|
133
137
|
**Pre-signoff Checklist** (Output 前须逐项确认):
|
|
134
138
|
□ plan.json — 每个 task done 标记已实时更新(非 signoff 时批量操作)
|
|
@@ -136,13 +140,21 @@
|
|
|
136
140
|
□ Step 4 — 每种项目类型的 Task Verification 已执行并附 Evidence
|
|
137
141
|
□ Step 5A Silent Audit — 已执行,所有 CRITICAL 问题已修复
|
|
138
142
|
□ Step 5B featureRelations 联动检查 — 已执行
|
|
143
|
+
- 涉及修改的文件是否影响其他关联文件
|
|
139
144
|
□ Step 5C 数据治理同步 — 已执行
|
|
145
|
+
- dictionary.json + error_codes.json + env_registry.json — 必检
|
|
146
|
+
- (仅ui项目)design_tokens.json + ui_context.md
|
|
147
|
+
- (仅data项目)data_snapshot.json
|
|
148
|
+
- (仅api项目)api_snapshot.json
|
|
149
|
+
- (仅cli项目)command_api.json
|
|
150
|
+
- (仅lib项目)public_api.json
|
|
140
151
|
□ Terminal Gate — npx archi plan <ID> 全部完成(仅豁免项除外)
|
|
141
152
|
|
|
142
|
-
**Output**: 完成摘要,含已完成任务、豁免项(如有)、
|
|
153
|
+
**Output**: 完成摘要,含已完成任务、豁免项(如有)、Next Steps:
|
|
143
154
|
|
|
144
155
|
| 优先级 | 动作 | 说明 |
|
|
145
156
|
|:---|:---|:---|
|
|
157
|
+
| (如无 scripts/) | `/archi.script` | 生成自动化验证脚本(validate/dev-up/dev-reset) |
|
|
146
158
|
| 推荐 | `/archi.audit <ID>` | 对实现做独立审查 |
|
|
147
159
|
| (有 Spec 漂移时) | `/archi.edit <ID>` | 先更新文档再继续 |
|
|
148
160
|
| (有后续 pending 任务时) | `/archi.plan <下一个 pending ID>` | 规划下一个任务 |
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
<step_2_refine_docs>
|
|
42
42
|
**Action**:
|
|
43
43
|
- 根据 `[context]` 修改 spec.md 和 ui.md。
|
|
44
|
-
- (ui有修改) [[SKILL: archi-ui-wireframe|按 skill 的协议同步更新 `
|
|
44
|
+
- (ui有修改) [[SKILL: archi-ui-wireframe|按 skill 的协议同步更新 `screens/S-XX.html` + `ui_context.md`]][[NO-SKILL: (Skill 未安装:请阅读 `[[__DOCS_DIR__]]/skills/archi-ui-wireframe/SKILL.md`)]]:
|
|
45
45
|
|
|
46
46
|
| 变更类型 | 判定标准 | 处理方式 |
|
|
47
47
|
|:---|:---|:---|
|
|
48
48
|
| 无屏幕影响 | 仅逻辑/数据变更 | 仅改 spec.md |
|
|
49
|
-
| 轻微 UI 调整 | 新增/修改状态、弹窗、局部区域 | 调用 skill 更新,输出 `MODIFIED: S-XX` |
|
|
49
|
+
| 轻微 UI 调整 | 新增/修改状态、弹窗、局部区域 | 调用 skill 更新,输出 `MODIFIED: screens/S-XX.html` |
|
|
50
50
|
| 屏幕结构变更 | 布局重构、新增屏幕、导航变化 | 调用 skill 更新 |
|
|
51
|
-
| 功能缩减 | 屏幕/区域整体移除 | 调用 skill 删除,输出 `REMOVED: S-XX` |
|
|
51
|
+
| 功能缩减 | 屏幕/区域整体移除 | 调用 skill 删除,输出 `REMOVED: screens/S-XX.html` |
|
|
52
52
|
|
|
53
53
|
- 需求模糊时向用户提问确认。
|
|
54
54
|
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
**Output**: 追加了新任务的 plan.json;若执行状态转换,输出 `MODIFIED: roadmap.json <ID>.status done→active`。进入 step_4_verify。
|
|
69
69
|
</step_3_update_plan>
|
|
70
70
|
|
|
71
|
+
<step_4_data_sync>
|
|
72
|
+
**数据治理同步**:
|
|
73
|
+
|
|
74
|
+
[[SUBAGENT: archi-data-sync|context: 扫描需求变更引入的新业务实体/错误码/Schema/端点/命令/导出,按 00_system.md 规则增量同步]][[NO-SKILL: (Skill 未安装:请阅读 `[[__DOCS_DIR__]]/skills/archi-data-sync/SKILL.md`,按其执行协议操作)]]
|
|
75
|
+
</step_4_data_sync>
|
|
76
|
+
|
|
71
77
|
<step_4_verify>
|
|
72
78
|
**Role**: 独立审查官
|
|
73
79
|
|
|
@@ -76,17 +82,25 @@
|
|
|
76
82
|
[[INCLUDE: shared/verify-result-handling.md]]
|
|
77
83
|
</step_4_verify>
|
|
78
84
|
|
|
79
|
-
<
|
|
85
|
+
<step_6_summary>
|
|
80
86
|
**Pre-signoff Checklist** (输出前须逐项确认):
|
|
81
87
|
□ spec.md — 已按 context 更新,变更已追踪
|
|
82
|
-
□
|
|
88
|
+
□ (仅ui项目,ui有修改)ui.md + screens/S-XX.html + ui_context.md — 已同步更新
|
|
83
89
|
□ plan.json — 新 Phase 已追加(历史任务完整保留)
|
|
84
90
|
□ (原 status=done)roadmap.json — status 已重置为 active
|
|
91
|
+
□ 全局文件 — 变更涉及的相关 JSON 已同步更新
|
|
92
|
+
- dictionary.json + error_codes.json + env_registry.json — 必检
|
|
93
|
+
- (仅ui项目)design_tokens.json + ui_context.md
|
|
94
|
+
- (仅data项目)data_snapshot.json
|
|
95
|
+
- (仅api项目)api_snapshot.json
|
|
96
|
+
- (仅cli项目)command_api.json
|
|
97
|
+
- (仅lib项目)public_api.json
|
|
98
|
+
□ Step 4 Data Sync — archi-data-sync 已执行
|
|
85
99
|
□ Step 4 Silent Audit — 已执行,所有 CRITICAL 问题已修复
|
|
86
100
|
□ Terminal Gate — task --check 无 ERROR(step_3 中已执行)
|
|
87
101
|
|
|
88
102
|
**Action** (Gate 须在 step_3 完成):
|
|
89
103
|
**Output**: Task 更新摘要,含 Spec/UI/Plan 变更概要和 Next Steps 表格。推荐运行 `/archi.code <ID>`。
|
|
90
|
-
</
|
|
104
|
+
</step_6_summary>
|
|
91
105
|
|
|
92
106
|
</protocol_edit>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
- 无 `<id>`: 分析 `[context]` 搜索最相关模块。
|
|
24
24
|
唯一匹配 → 自动锁定 | 多个匹配 → 列出候选询问 | 无法定位 → 报错请求指定 ID。
|
|
25
25
|
2. 读取目标目录下所有文档与相关代码。
|
|
26
|
-
3.
|
|
26
|
+
3. 读取项目上下文(tech_stack、vision),详见 00_system.md 数据治理规则。
|
|
27
27
|
4. 分析 `[context]`,结合代码逻辑定位潜在故障点。
|
|
28
28
|
5. **Hypothesis**: 提出 1-3 个根因假设。
|
|
29
29
|
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
**Terminal Gate** (禁止跳过):
|
|
51
51
|
| 步骤 | 命令 | 通过条件 |
|
|
52
52
|
|:---|:---|:---|
|
|
53
|
+
| 0 | 检查 `scripts/validate` | 存在则必须运行,以其结果为准 |
|
|
53
54
|
| 1 | 运行构建命令 | 构建成功 |
|
|
54
55
|
| 2 | 运行类型检查 | 零类型错误 |
|
|
55
56
|
| 3 | 运行 Lint/Format | 通过 |
|
|
@@ -63,6 +64,12 @@
|
|
|
63
64
|
[[INCLUDE: shared/verify-result-handling.md]]
|
|
64
65
|
</step_4_verify>
|
|
65
66
|
|
|
67
|
+
<step_4_5_data_sync>
|
|
68
|
+
**数据治理同步**:
|
|
69
|
+
|
|
70
|
+
[[SUBAGENT: archi-data-sync|context: 扫描 Bug 修复引入的新业务实体/错误码/Schema,按 00_system.md 规则增量同步]][[NO-SKILL: (Skill 未安装:请阅读 `[[__DOCS_DIR__]]/skills/archi-data-sync/SKILL.md`,按其执行协议操作)]]
|
|
71
|
+
</step_4_5_data_sync>
|
|
72
|
+
|
|
66
73
|
<step_5_plan_update>
|
|
67
74
|
**Action**:
|
|
68
75
|
1. 更新 plan.json Bugfix Phase 中已完成 tasks 的 `done: true`。
|
|
@@ -78,6 +85,7 @@
|
|
|
78
85
|
□ plan.json — Bugfix Phase 已追加(step_2)
|
|
79
86
|
□ 复现测试已创建并验证(Red → Green)
|
|
80
87
|
□ 代码修复仅针对 Bug,无借机重构
|
|
88
|
+
□ Step 4.5 Data Sync — archi-data-sync 已执行
|
|
81
89
|
□ Step 4 Terminal Gate — 构建/类型检查/Lint/测试全部通过
|
|
82
90
|
□ Step 4 Silent Audit — 已执行,所有 CRITICAL 问题已修复
|
|
83
91
|
□ plan.json Bugfix Phase — done 标记已更新(step_5)
|
|
@@ -86,6 +94,7 @@
|
|
|
86
94
|
|
|
87
95
|
| 优先级 | 动作 | 说明 |
|
|
88
96
|
|:---|:---|:---|
|
|
97
|
+
| (如无 scripts/) | `/archi.script` | 生成自动化验证脚本 |
|
|
89
98
|
| 推荐 | `/archi.audit <ID>` | 重新审查,确认修复完整 |
|
|
90
99
|
| 可选 | `/archi.code <ID>` | 如有未完成项,继续实现 |
|
|
91
100
|
</step_6_summary>
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
|
|
102
102
|
### 信息路由规则
|
|
103
103
|
|
|
104
|
-
> 规则文件(`
|
|
104
|
+
> 规则文件(`tech_stack`、`90_custom_rules` 等)已由 IDE 注入当前上下文,AI 已知其路径,直接写入即可。
|
|
105
105
|
|
|
106
106
|
**有 Brief 时**(Brief → 目标文件):
|
|
107
107
|
| Brief 内容 | 目标文件 |
|
|
108
108
|
|:---|:---|
|
|
109
109
|
| 项目身份、目标用户、成功指标、参考灵感 | `[[__DOCS_DIR__]]/global/vision.md` |
|
|
110
|
-
| 技术栈、部署目标、第三方库/服务 | 规则文件 `
|
|
110
|
+
| 技术栈、部署目标、第三方库/服务 | 规则文件 `tech_stack` |
|
|
111
111
|
| 核心任务列表 | `[[__DOCS_DIR__]]/global/roadmap.json`(phase-1/2,调用 archi-decompose-roadmap) |
|
|
112
112
|
| 补充说明中的规则/约定/偏好 | 规则文件 `90_custom_rules` |
|
|
113
113
|
| 风格调性(仅ui) | `design_tokens.json` aestheticDirection 等 |
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
| 信息来源 | 目标文件 |
|
|
117
117
|
|:---|:---|
|
|
118
118
|
| README 描述/特性 | vision.md |
|
|
119
|
-
| 依赖/配置/代码模式 |
|
|
119
|
+
| 依赖/配置/代码模式 | tech_stack |
|
|
120
120
|
| 目录结构/模块依赖/用户旅程 | map.json |
|
|
121
121
|
| 领域术语/命名约定 | dictionary.json |
|
|
122
122
|
| eslint/prettier 等规范 | 90_custom_rules |
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
- **无 Brief**:从 README + 项目配置推导,无法推导的项标注 `(AI 补全 — 建议用户审查)`
|
|
130
130
|
- 禁保留模板占位符
|
|
131
131
|
|
|
132
|
-
### 3.2 Tech Stack (规则文件 `
|
|
132
|
+
### 3.2 Tech Stack (规则文件 `tech_stack`)
|
|
133
133
|
- **有 Brief**:Brief 确定的 → 直接写入;留空/推荐的 → AI 推荐;代码依赖作补充
|
|
134
134
|
- **无 Brief**:已有依赖/配置 → 直接写入;可见规范 → 写入 Coding Standards
|
|
135
135
|
- 须填充完整 Section 1-8
|
|
@@ -210,14 +210,13 @@
|
|
|
210
210
|
- `dictionary.json`: 从代码提取领域术语
|
|
211
211
|
- (仅ui项目) `design_tokens.json`: 从 CSS 变量/主题提取
|
|
212
212
|
- (仅data项目) `data_snapshot.json`: 从 schema/migration 提取
|
|
213
|
+
- (仅api项目) `api_snapshot.json`: 从现有 API 路由/控制器代码提取端点
|
|
214
|
+
- `env_registry.json`: 从代码中 `process.env` 引用提取环境变量
|
|
215
|
+
- (仅cli项目) `command_api.json`: 从现有 CLI 入口代码提取命令
|
|
216
|
+
- (仅lib项目) `public_api.json`: 从 package.json exports 或入口文件提取导出
|
|
213
217
|
- `error_codes.json`: 从代码中的错误定义提取
|
|
214
218
|
|
|
215
|
-
仅ui项目: **UI
|
|
216
|
-
- 读取代码中的路由定义、页面组件、布局文件
|
|
217
|
-
- 读取 step_3 写入的 design_tokens.json(含代码提取的 CSS 变量/theme)
|
|
218
|
-
- tokens 不完整时触发 skill 内置引导流程
|
|
219
|
-
- 写入 `ui_concept.html` + `ui_context.md`
|
|
220
|
-
- 输出 UI 概念设计摘要,等待用户确认或反馈调整
|
|
219
|
+
仅ui项目: **UI 概念设计**: 跳过 — 由 `/archi.ui` 独立完成。仅确保 `design_tokens.json` 已从 CSS 变量/主题提取填充。
|
|
221
220
|
|
|
222
221
|
**Output**: 写入所有文件,运行 `npx archi render`。进入 step_4_verify。
|
|
223
222
|
</step_3_constitution>
|
|
@@ -234,12 +233,16 @@
|
|
|
234
233
|
|
|
235
234
|
**Pre-signoff Checklist** (Gate 通过后、输出前须逐项确认):
|
|
236
235
|
□ vision.md — 已填充(无 Brief 时: 推导内容标注了 `(AI 补全 — 建议用户审查)`)
|
|
237
|
-
□
|
|
236
|
+
□ tech_stack.md — Section 1-8 完整填充
|
|
238
237
|
□ roadmap.json — 每个功能模块对应一条 LEG-xx(status: done, tag: Legacy)
|
|
239
238
|
□ tasks/LEG-xx_<Slug>/spec.md — 每条 LEG 均有对应 Stub spec(含关联文件列表)
|
|
240
239
|
□ map.json — directoryMapping + logicalTopology + criticalUserJourneys + featureRelations 均已填充
|
|
241
|
-
□ dictionary.json + error_codes.json — 从代码提取完毕
|
|
242
|
-
□ (仅ui项目)design_tokens.json
|
|
240
|
+
□ dictionary.json + error_codes.json + env_registry.json — 从代码提取完毕
|
|
241
|
+
□ (仅ui项目)design_tokens.json — Adopt 模式已从 CSS 提取
|
|
242
|
+
□ (仅data项目)data_snapshot.json — 初始实体骨架已写入
|
|
243
|
+
□ (仅api项目)api_snapshot.json — 初始 API 端点已注册
|
|
244
|
+
□ (仅cli项目)command_api.json — 初始 CLI 命令已注册
|
|
245
|
+
□ (仅lib项目)public_api.json — 初始库导出已注册
|
|
243
246
|
□ Step 4 Silent Audit — 已执行,所有 CRITICAL 问题已修复
|
|
244
247
|
|
|
245
248
|
**Action** (Checklist 全部确认后):
|
|
@@ -256,6 +259,8 @@
|
|
|
256
259
|
| 优先级 | 动作 | 说明 |
|
|
257
260
|
|:---|:---|:---|
|
|
258
261
|
| 1 | 审查 vision.md | 确认 AI 补全的愿景描述是否准确 |
|
|
262
|
+
| (仅ui项目) 推荐 | `/archi.ui` | 生成 UI 概念设计(`screens/` 多文件结构,Adopt 模式) |
|
|
263
|
+
| (有基建后) | `/archi.script` | 生成 AI 自动化脚本(validate/dev-up/dev-reset) |
|
|
259
264
|
| 2 | `/archi.edit LEG-xx` | 对核心模块补全完整 spec(自动触发 Enrich 流程) |
|
|
260
265
|
| 3 | `/archi.scope [file_path]` | 规划新功能/大模块 |
|
|
261
266
|
| 4 | `/archi.plan <任务ID>` | 对单个任务做深度规划 |
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<principles>
|
|
9
9
|
1. **Scan vs Map**: 以实际文件系统为 Ground Truth,map.json 为旧快照。
|
|
10
10
|
2. **Smart Granularity**: 默认目录级;单文件承载多职责时须细化到文件级。
|
|
11
|
-
3. **Architecture Inference**: 新条目的层级归类须参考现有 map 模式 + `
|
|
11
|
+
3. **Architecture Inference**: 新条目的层级归类须参考现有 map 模式 + `tech_stack.md`。
|
|
12
12
|
4. **Batch Confirm**: 所有变更一次性展示,用户批量确认。
|
|
13
13
|
5. **IDE-Native First**: 利用 IDE 原生能力驱动执行节奏,本协议定义质量标准和检查点,不对抗 IDE 的规划/执行机制。
|
|
14
14
|
</principles>
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
<step_1_scan>
|
|
18
18
|
**Action**:
|
|
19
|
-
1. **Read Map**: 读取
|
|
20
|
-
2. **Read Tech Stack**: 读取
|
|
19
|
+
1. **Read Map**: 读取 map.json — 当前架构地图。
|
|
20
|
+
2. **Read Tech Stack**: 读取 tech_stack — 目录结构约定、架构模式。
|
|
21
21
|
3. **Scan Directory Tree**: 扫描项目目录结构。
|
|
22
22
|
- **排除**: `.git/`, `node_modules/`, `dist/`, `build/`, `[[__DOCS_DIR__]]/`, 及 `.gitignore` 中声明的路径。
|
|
23
23
|
- **深度**: 跟随 map.json 现有条目的粒度模式。
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
### 归类策略
|
|
49
49
|
|
|
50
50
|
1. **模式匹配**: 参考 map.json 同层级已有条目的归类。
|
|
51
|
-
2. **Tech Stack 约定**: `
|
|
51
|
+
2. **Tech Stack 约定**: `tech_stack.md` 中的目录结构规则。
|
|
52
52
|
3. **内容推断**: 读取文件内容(import 关系、导出类型)。
|
|
53
53
|
4. **无法确定**: 标记为 `[?]`,交由用户指定。
|
|
54
54
|
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
□ 过期条目已从 directoryMapping 移除
|
|
101
101
|
□ 新增条目已正确归类(path + layer + description 均已填写)
|
|
102
102
|
□ 疑似重命名已明确处理(非静默忽略)
|
|
103
|
+
□ featureRelations — 目录变更若影响关联关系,已同步更新
|
|
103
104
|
□ lastUpdated 已更新
|
|
104
105
|
□ Terminal Gate — task --check + render 通过
|
|
105
106
|
|