architext 0.0.3 → 0.0.5
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 +56 -1
- package/README.md +94 -12
- package/README.zh-CN.md +94 -12
- package/dist/index.js +43 -39
- package/dist/templates/en/briefs/_base.md +44 -11
- package/dist/templates/en/briefs/_modules.md +31 -4
- package/dist/templates/en/docs/global/api_snapshot.json +24 -0
- package/dist/templates/en/docs/global/command_api.json +26 -0
- package/dist/templates/en/docs/global/env_registry.json +12 -0
- package/dist/templates/en/docs/global/map.json +5 -0
- package/dist/templates/en/docs/global/public_api.json +12 -0
- package/dist/templates/en/docs/prompts/audit.md +80 -94
- package/dist/templates/en/docs/prompts/code.md +100 -109
- package/dist/templates/en/docs/prompts/edit.md +52 -47
- package/dist/templates/en/docs/prompts/fix.md +49 -42
- package/dist/templates/en/docs/prompts/help.md +23 -31
- package/dist/templates/en/docs/prompts/inherit.md +110 -116
- package/dist/templates/en/docs/prompts/map.md +47 -69
- package/dist/templates/en/docs/prompts/plan.md +160 -171
- package/dist/templates/en/docs/prompts/recover.md +48 -0
- package/dist/templates/en/docs/prompts/ref.md +163 -0
- package/dist/templates/en/docs/prompts/remove.md +55 -107
- package/dist/templates/en/docs/prompts/revise.md +63 -106
- package/dist/templates/en/docs/prompts/scope.md +77 -117
- package/dist/templates/en/docs/prompts/start.md +93 -139
- package/dist/templates/en/docs/shared/verify-result-handling.md +6 -0
- package/dist/templates/en/docs/templates/design.template.md +77 -0
- package/dist/templates/en/docs/templates/spec.template.md +60 -25
- package/dist/templates/en/rules/00_system.md +36 -79
- package/dist/templates/en/rules/01_workflow.md +59 -57
- package/dist/templates/en/rules/03_data_governance.md +46 -42
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +83 -0
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +166 -151
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +140 -0
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +118 -0
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -1
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +4 -3
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +118 -0
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +315 -270
- package/dist/templates/zh/briefs/_base.md +46 -14
- package/dist/templates/zh/briefs/_modules.md +29 -2
- package/dist/templates/zh/docs/global/api_snapshot.json +24 -0
- package/dist/templates/zh/docs/global/command_api.json +26 -0
- package/dist/templates/zh/docs/global/data_snapshot.json +0 -1
- package/dist/templates/zh/docs/global/design_tokens.json +0 -1
- package/dist/templates/zh/docs/global/dictionary.json +1 -1
- package/dist/templates/zh/docs/global/env_registry.json +12 -0
- package/dist/templates/zh/docs/global/error_codes.json +0 -8
- package/dist/templates/zh/docs/global/map.json +28 -3
- package/dist/templates/zh/docs/global/public_api.json +12 -0
- package/dist/templates/zh/docs/global/vision.md +1 -1
- package/dist/templates/zh/docs/prompts/audit.md +43 -57
- package/dist/templates/zh/docs/prompts/code.md +68 -77
- package/dist/templates/zh/docs/prompts/edit.md +44 -39
- package/dist/templates/zh/docs/prompts/fix.md +33 -26
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +81 -87
- package/dist/templates/zh/docs/prompts/map.md +23 -45
- package/dist/templates/zh/docs/prompts/plan.md +134 -146
- package/dist/templates/zh/docs/prompts/recover.md +48 -0
- package/dist/templates/zh/docs/prompts/ref.md +163 -0
- package/dist/templates/zh/docs/prompts/remove.md +31 -83
- package/dist/templates/zh/docs/prompts/revise.md +43 -84
- package/dist/templates/zh/docs/prompts/scope.md +53 -93
- package/dist/templates/zh/docs/prompts/start.md +75 -121
- package/dist/templates/zh/docs/shared/verify-result-handling.md +6 -0
- package/dist/templates/zh/docs/templates/design.template.md +77 -0
- package/dist/templates/zh/docs/templates/spec.template.md +60 -25
- package/dist/templates/zh/rules/00_system.md +37 -80
- package/dist/templates/zh/rules/01_workflow.md +60 -58
- package/dist/templates/zh/rules/02_tech_stack.md +7 -6
- package/dist/templates/zh/rules/03_data_governance.md +43 -39
- package/dist/templates/zh/rules/99_context_glue.md +2 -2
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +83 -0
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +70 -56
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +140 -0
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +118 -0
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -1
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +26 -25
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +118 -0
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +317 -269
- package/package.json +1 -1
- package/dist/templates/zh-Hant/briefs/_base.md +0 -115
- package/dist/templates/zh-Hant/briefs/_modules.md +0 -173
- package/dist/templates/zh-Hant/docs/global/data_snapshot.json +0 -31
- package/dist/templates/zh-Hant/docs/global/design_tokens.json +0 -135
- package/dist/templates/zh-Hant/docs/global/dictionary.json +0 -35
- package/dist/templates/zh-Hant/docs/global/error_codes.json +0 -19
- package/dist/templates/zh-Hant/docs/global/map.json +0 -94
- package/dist/templates/zh-Hant/docs/global/roadmap.json +0 -39
- package/dist/templates/zh-Hant/docs/global/vision.md +0 -82
- package/dist/templates/zh-Hant/docs/prompts/audit.md +0 -150
- package/dist/templates/zh-Hant/docs/prompts/code.md +0 -160
- package/dist/templates/zh-Hant/docs/prompts/edit.md +0 -87
- package/dist/templates/zh-Hant/docs/prompts/fix.md +0 -86
- package/dist/templates/zh-Hant/docs/prompts/help.md +0 -69
- package/dist/templates/zh-Hant/docs/prompts/inherit.md +0 -270
- package/dist/templates/zh-Hant/docs/prompts/map.md +0 -131
- package/dist/templates/zh-Hant/docs/prompts/plan.md +0 -252
- package/dist/templates/zh-Hant/docs/prompts/remove.md +0 -162
- package/dist/templates/zh-Hant/docs/prompts/revise.md +0 -160
- package/dist/templates/zh-Hant/docs/prompts/scope.md +0 -198
- package/dist/templates/zh-Hant/docs/prompts/start.md +0 -258
- package/dist/templates/zh-Hant/docs/templates/plan.template.json +0 -88
- package/dist/templates/zh-Hant/docs/templates/scope-brief.template.md +0 -58
- package/dist/templates/zh-Hant/docs/templates/spec.template.md +0 -51
- package/dist/templates/zh-Hant/docs/templates/ui.template.md +0 -51
- package/dist/templates/zh-Hant/rules/00_system.md +0 -123
- package/dist/templates/zh-Hant/rules/01_workflow.md +0 -93
- package/dist/templates/zh-Hant/rules/02_tech_stack.md +0 -192
- package/dist/templates/zh-Hant/rules/03_data_governance.md +0 -102
- package/dist/templates/zh-Hant/rules/04_cli_tools.md +0 -50
- package/dist/templates/zh-Hant/rules/90_custom_rules.md +0 -21
- package/dist/templates/zh-Hant/rules/99_context_glue.md +0 -53
- package/dist/templates/zh-Hant/skills/archi-decompose-roadmap/SKILL.md +0 -293
- package/dist/templates/zh-Hant/skills/archi-interview-protocol/SKILL.md +0 -86
- package/dist/templates/zh-Hant/skills/archi-plan-options/SKILL.md +0 -364
- package/dist/templates/zh-Hant/skills/archi-ui-wireframe/SKILL.md +0 -337
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,62 @@ All notable changes are documented here, following [Keep a Changelog](https://ke
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## [Unreleased](https://github.com/JiuNian3219/architext/compare/v0.0.
|
|
9
|
+
## [Unreleased](https://github.com/JiuNian3219/architext/compare/v0.0.5...HEAD) / 待发布
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## [0.0.5](https://github.com/JiuNian3219/architext/releases/tag/v0.0.5) - 2026-03-06
|
|
14
|
+
|
|
15
|
+
### Added / 新增
|
|
16
|
+
|
|
17
|
+
- `FileModel` 注册表,实现声明式文件管理,替代分散的路径硬编码 / Introduced FileModel registry for declarative file management
|
|
18
|
+
- `archi init` 支持 `--yes` 和 `--brief` flag,实现非交互式初始化 / Added `--yes` and `--brief` flags for non-interactive init
|
|
19
|
+
- Brief 附件资产目录支持(`_modules.md` 等附件模块)/ Added Brief attachment asset directory support
|
|
20
|
+
- Skill 类型声明(`type: specialist` / `type: reviewer`)/ Added Skill type classification in frontmatter
|
|
21
|
+
|
|
22
|
+
### Changed / 变更
|
|
23
|
+
|
|
24
|
+
- 重构 `init`、`uninstall`、`update` 命令,基于 FileModel 驱动,逻辑更一致 / Refactored commands to be driven by FileModel
|
|
25
|
+
- 拆分 `scaffold.ts` 为 `brief.ts` 和 `ide-integrations.ts`,拆分 `index.ts` 为 `collector.ts` 和 `serializer.ts` / Decomposed large source files for clarity
|
|
26
|
+
- 精简 14 个中文协议文件,总行数从 2474 压缩至 1852(-25%)/ Compressed 14 zh protocol files by 25%
|
|
27
|
+
- `01_workflow.md` 改造为 Chat Mode:高频命令(plan/code/edit/fix/scope)支持自然语言触发,AI 自动加载协议执行 / Workflow now supports natural-language intent detection for high-frequency commands
|
|
28
|
+
- 两阶段协议生成合并为统一协议,减少用户操作步骤 / Merged two-phase protocol generation into single flow
|
|
29
|
+
- 更新触发器描述,支持自然语言触发 / Updated trigger descriptions to support natural language
|
|
30
|
+
- 补充 `01_workflow` 中 `ref` 与 `recover` 命令路由 / Added routing for `ref` and `recover` commands
|
|
31
|
+
|
|
32
|
+
### Fixed / 修复
|
|
33
|
+
|
|
34
|
+
- 修正 `inherit` 协议表述,避免误导用户认为会覆盖既有 `.architext` 数据 / Fixed `inherit` wording to prevent misunderstanding about overwriting existing data
|
|
35
|
+
- 补全 zh prompts 到 en 的完整翻译 / Completed full translation of zh prompts to en
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## [0.0.4](https://github.com/JiuNian3219/architext/releases/tag/v0.0.4) - 2026-03-01
|
|
40
|
+
|
|
41
|
+
### Added / 新增
|
|
42
|
+
|
|
43
|
+
- `archi pack` + `/archi.recover` — 用户数据备份与恢复流程 / User data backup and restore flow
|
|
44
|
+
- `/archi.ref` — 外部知识引用管理命令 / External knowledge reference management command
|
|
45
|
+
- `design.md` 技术方案设计模板与 `archi-design-patterns` Skill / Design template and archi-design-patterns Skill
|
|
46
|
+
- 项目初始化流程支持可选生成 `project-brief.md` / Init flow supports optional `project-brief.md` generation
|
|
47
|
+
- 子代理审查层与内容切片机制 / Sub-agent review layer and content slicing mechanism
|
|
48
|
+
- 维度积木 spec 骨架、WBS 分解与任务类型体系 / Spec skeleton, WBS decomposition and task type system
|
|
49
|
+
- OpenCode、Claude Code 作为目标 IDE 支持 / OpenCode and Claude Code as target IDE options
|
|
50
|
+
- 网站 Iterate 区块,Workflow 简化为 start → plan → code → audit 四阶段 / Website Iterate section, simplified Workflow to four stages
|
|
51
|
+
|
|
52
|
+
### Changed / 变更
|
|
53
|
+
|
|
54
|
+
- 移除 zh-Hant 支持,简化为 zh + en 双语 / Removed zh-Hant, simplified to zh + en
|
|
55
|
+
- 项目类型重构为特征标签体系 / Project type refactored to feature tag system
|
|
56
|
+
- 移除 terminal-gate-base、status-gate 共享片段,内联至各协议 / Inlined shared gate snippets into protocols
|
|
57
|
+
|
|
58
|
+
### Fixed / 修复
|
|
59
|
+
|
|
60
|
+
- 更新 prompts 时解析 `[[SKILL:...]]` / `[[NO-SKILL:...]]` 能力标记 / Parse capability refs when updating prompts
|
|
61
|
+
- 统一 templates 中 Skill 调用格式 / Unified Skill invocation format in templates
|
|
62
|
+
- 在 `02_tech_stack` 中为 ITP 固定协议添加分区标记 / Added section markers for ITP fixed protocols
|
|
63
|
+
- 明确协议可覆盖 `00_system` 的范围 / Clarified protocol override scope for `00_system`
|
|
64
|
+
- 在 `00_system` 中定义跨文件规则优先级链 / Defined cross-file rule priority chain
|
|
10
65
|
|
|
11
66
|
---
|
|
12
67
|
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
12
|
|
|
13
|
-
**Supported IDEs:** Cursor *(recommended)* · Windsurf · Trae · VS Code
|
|
13
|
+
**Supported IDEs:** Cursor *(recommended)* · Windsurf · Trae · VS Code · Claude Code · OpenCode
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -28,6 +28,8 @@ Before a single line of code is written, Architext forces you and your AI to ali
|
|
|
28
28
|
|
|
29
29
|
> **No Docs, No Code.** Code is just a downstream artifact of documents.
|
|
30
30
|
|
|
31
|
+
Architext targets **small-to-medium applications**, designed for **solo developers** or **solo + AI assistant** workflows. Whether you use chat-based AI today or a future JARVIS-like persistent assistant, the document-driven approach gives AI stable context, clear execution boundaries, and keeps you in control of every decision.
|
|
32
|
+
|
|
31
33
|
Architext operates in two layers:
|
|
32
34
|
|
|
33
35
|
| Layer | How to trigger | Responsibility |
|
|
@@ -64,8 +66,9 @@ npx archi init
|
|
|
64
66
|
|
|
65
67
|
```
|
|
66
68
|
✔ Select language › English
|
|
67
|
-
✔ Select IDE(s) › Cursor (multiselect — Cursor / Windsurf / Trae / VS Code)
|
|
69
|
+
✔ Select IDE(s) › Cursor (multiselect — Cursor / Windsurf / Trae / VS Code / Claude Code / OpenCode)
|
|
68
70
|
✔ Select project type › Web SPA / PWA
|
|
71
|
+
✔ Generate project-brief.md? › Yes (fill in project requirements for /archi.start or /archi.inherit)
|
|
69
72
|
|
|
70
73
|
● Deploying Architext...
|
|
71
74
|
✔ Docs deployed → .architext/
|
|
@@ -84,7 +87,7 @@ npx archi init
|
|
|
84
87
|
|
|
85
88
|
**Step 2 — AI chat: initialize your project**
|
|
86
89
|
|
|
87
|
-
`archi init`
|
|
90
|
+
When you choose to generate it, `archi init` creates a tailored `project-brief.md` at your project root. Fill it in, then run:
|
|
88
91
|
|
|
89
92
|
```
|
|
90
93
|
/archi.start project-brief.md
|
|
@@ -92,7 +95,7 @@ npx archi init
|
|
|
92
95
|
|
|
93
96
|
The AI reads the brief, interviews you on key decisions, and generates the project's foundation documents (`vision.md`, `roadmap.json`, `tech_stack`, etc.).
|
|
94
97
|
|
|
95
|
-
> **Existing codebase?** Skip `/archi.start` and use `/archi.inherit` instead — it reverse-engineers your project and registers existing features as `LEG-xx` tasks.
|
|
98
|
+
> **Existing codebase?** Skip `/archi.start` and use `/archi.inherit` instead — it reverse-engineers your project and registers existing features as `LEG-xx` tasks. Optional: pass `project-brief.md` when the codebase is minimal (skeleton repo) to supplement vision and roadmap.
|
|
96
99
|
|
|
97
100
|
---
|
|
98
101
|
|
|
@@ -101,9 +104,10 @@ The AI reads the brief, interviews you on key decisions, and generates the proje
|
|
|
101
104
|
The main trunk of a project lifecycle. Everything happens in your AI chat window.
|
|
102
105
|
|
|
103
106
|
```
|
|
104
|
-
project-brief.md → /archi.start →
|
|
107
|
+
project-brief.md → /archi.start → /archi.plan → /archi.code → /archi.audit
|
|
105
108
|
↑
|
|
106
|
-
|
|
109
|
+
/archi.scope runs anytime you have NEW feature requirements
|
|
110
|
+
(not limited to "right after start" — mid-project, post-release, etc.)
|
|
107
111
|
```
|
|
108
112
|
|
|
109
113
|
**Stage 1 — Initialize**
|
|
@@ -123,14 +127,15 @@ AI: [Analyzing project brief...]
|
|
|
123
127
|
✔ MODIFIED: .cursor/rules/02_tech_stack.mdc (filled with project tech decisions)
|
|
124
128
|
✔ MODIFIED: .cursor/rules/90_custom_rules.mdc (filled with team conventions)
|
|
125
129
|
|
|
126
|
-
Next:
|
|
130
|
+
Next: if the brief covers everything → /archi.plan <first-task-id>
|
|
131
|
+
if you have more requirements → /archi.scope to add tasks first
|
|
127
132
|
```
|
|
128
133
|
|
|
129
134
|
> **Existing codebase?** Use `/archi.inherit` instead — it reverse-engineers your project and registers existing features as `LEG-xx` tasks. Also generates `map.json`.
|
|
130
135
|
|
|
131
|
-
**Stage 2 — Decompose (optional)**
|
|
136
|
+
**Stage 2 — Decompose (optional, runs anytime)**
|
|
132
137
|
|
|
133
|
-
>
|
|
138
|
+
> `/archi.scope` is **not** "the step after start." Run it **whenever** you have new feature requirements beyond what's in the initial brief or current roadmap — right after start, mid-project, or after all tasks are done.
|
|
134
139
|
|
|
135
140
|
```
|
|
136
141
|
You: /archi.scope scope-brief.md ← provide a file, or run bare to trigger an interview
|
|
@@ -204,7 +209,80 @@ AI: [Reading code + spec + plan + vision + tech_stack...]
|
|
|
204
209
|
[LOW] Token expiry not configurable via env var → suggest /archi.edit
|
|
205
210
|
```
|
|
206
211
|
|
|
207
|
-
> **Daily development between commands** is driven by natural language Chat Mode —
|
|
212
|
+
> **Daily development between commands** is driven by natural language **Chat Mode**. Describe what you want in plain language — e.g. "add a login feature" or "fix the auth bug" — and the AI will automatically load and execute the right protocol (scope/plan/code/edit/fix). No need to manually type `/archi.*` slash commands. For questions, trivial edits, and debugging, the AI answers directly. Four of the seven rule files act as always-on base rules: `00_system`, `02_tech_stack`, `90_custom_rules`, `99_context_glue`.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Tutorials
|
|
217
|
+
|
|
218
|
+
Different scenarios, same protocol. Pick the one that matches your situation.
|
|
219
|
+
|
|
220
|
+
### Tutorial A: New project, brief covers everything
|
|
221
|
+
|
|
222
|
+
Your `project-brief.md` already lists all features. No scope needed.
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
/archi.start project-brief.md → /archi.plan FEAT-001 → /archi.code FEAT-001 → ...
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Start produces a roadmap. Go straight to plan the first task, then code.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### Tutorial B: New project, brief incomplete
|
|
233
|
+
|
|
234
|
+
You ran start, but later realize you forgot features or want to add more.
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
/archi.start project-brief.md → /archi.scope scope-brief.md → /archi.plan FEAT-001 → ...
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Scope appends new tasks to `roadmap.json`. Then plan and code as usual.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### Tutorial C: Add features mid-project
|
|
245
|
+
|
|
246
|
+
You're already building. FEAT-001 is done, and you want to add FEAT-002, FEAT-003, etc.
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
... → /archi.scope scope-brief.md → /archi.plan FEAT-002 → /archi.code FEAT-002 → ...
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Scope runs anytime** — not only after start. Whenever you have new requirements beyond the current roadmap, run scope.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
### Tutorial D: Existing codebase
|
|
257
|
+
|
|
258
|
+
You have an existing repo. Adopt Architext without rewriting.
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
npx archi init → /archi.inherit [project-brief.md] → /archi.edit LEG-xx 补全 Stub → /archi.code LEG-xx
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Inherit reverse-engineers the repo and registers features as `LEG-xx` tasks. Use edit to complete stub specs, then code when needed.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### Tutorial E: Bug fix
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
/archi.fix FEAT-001 "login fails when password has special chars"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Fix diagnoses, appends a Bugfix Phase to the plan, and repairs the code.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### When to use /archi.scope (summary)
|
|
279
|
+
|
|
280
|
+
| When | Action |
|
|
281
|
+
|:---|:---|
|
|
282
|
+
| Right after start, brief didn't cover everything | scope |
|
|
283
|
+
| Mid-project, new feature idea | scope |
|
|
284
|
+
| All tasks done, want to add a new module | scope |
|
|
285
|
+
| Brief already covers everything | Skip scope, go to plan |
|
|
208
286
|
|
|
209
287
|
---
|
|
210
288
|
|
|
@@ -212,10 +290,12 @@ AI: [Reading code + spec + plan + vision + tech_stack...]
|
|
|
212
290
|
|
|
213
291
|
### AI Chat Commands
|
|
214
292
|
|
|
293
|
+
You can trigger these either by typing `/archi.<command>` or by describing your intent in natural language — Chat Mode will automatically load and execute the matching protocol.
|
|
294
|
+
|
|
215
295
|
| Command | Description |
|
|
216
296
|
|:---|:---|
|
|
217
297
|
| `/archi.start [brief]` | Read a project brief and generate foundation docs (vision / roadmap / tech_stack etc.) |
|
|
218
|
-
| `/archi.inherit` | Reverse-engineer
|
|
298
|
+
| `/archi.inherit [brief]` | Reverse-engineer existing codebase; optionally pass project-brief.md to supplement vision/roadmap (skeleton repos) |
|
|
219
299
|
| `/archi.scope [file_path]` | Decompose extra requirements into roadmap tasks; omit file to trigger an interview |
|
|
220
300
|
| `/archi.plan <ID> [context]` | Deep architecture interview → spec / plan ([?UI] also ui.md + ui_concept.html); supply context to reduce questions |
|
|
221
301
|
| `/archi.code <ID>` | Implement from plan phase by phase; only `active` tasks are allowed |
|
|
@@ -278,7 +358,7 @@ Agent mode is great for single sessions. Architext provides persistent context t
|
|
|
278
358
|
|
|
279
359
|
**Q: Can I use this on an existing codebase?**
|
|
280
360
|
|
|
281
|
-
Yes. Run `/archi.inherit` — Architext analyzes your existing code and
|
|
361
|
+
Yes. Run `npx archi init` first to deploy the framework, then run `/archi.inherit` — Architext analyzes your existing code and fills the document skeleton (does not overwrite your existing content). Existing features are registered as `LEG-xx` tasks with stub specs, so you can gradually adopt the workflow without a big-bang rewrite.
|
|
282
362
|
|
|
283
363
|
> **Note**: `/archi.inherit` is still early-stage. Analysis results for large or complex repos may be incomplete and require manual cleanup. Feel free to open an Issue if you hit problems.
|
|
284
364
|
|
|
@@ -294,6 +374,8 @@ Four IDEs are currently supported. During `archi init` you manually select which
|
|
|
294
374
|
| Windsurf | `.windsurf/rules/` | `.md` | Supported |
|
|
295
375
|
| Trae | `.trae/rules/` | `.md` | Supported |
|
|
296
376
|
| VS Code | `.github/instructions/` | `.instructions.md` | Supported |
|
|
377
|
+
| Claude Code | `.claude/rules/` | `.md` | Supported |
|
|
378
|
+
| OpenCode | `.opencode/rules/` | `.md` | Supported |
|
|
297
379
|
|
|
298
380
|
Support for additional editors is planned.
|
|
299
381
|
|
package/README.zh-CN.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
12
|
|
|
13
|
-
**支持的 IDE:** Cursor *(推荐)* · Windsurf · Trae · VS Code
|
|
13
|
+
**支持的 IDE:** Cursor *(推荐)* · Windsurf · Trae · VS Code · Claude Code · OpenCode
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -28,6 +28,8 @@ Architext 是一套**文档驱动 AI 开发 (DDAD)** 协议,将你的 AI 编
|
|
|
28
28
|
|
|
29
29
|
> **无文档,不代码。** 代码只是文档的下游产物。
|
|
30
30
|
|
|
31
|
+
Architext 面向**中小型应用**,为 **1 人团队** 或 **1 人 + AI 助手** 的协作模式设计。无论你用的是对话式 AI 还是未来的「贾维斯式」持续助手,文档驱动的工作流都能让 AI 有稳定的上下文、清晰的执行边界,而你始终掌握决策权。
|
|
32
|
+
|
|
31
33
|
Architext 以两个层次协同运作:
|
|
32
34
|
|
|
33
35
|
| 层次 | 触发方式 | 职责 |
|
|
@@ -64,8 +66,9 @@ npx archi init
|
|
|
64
66
|
|
|
65
67
|
```
|
|
66
68
|
✔ 选择语言 › 简体中文
|
|
67
|
-
✔ 选择 IDE › Cursor (多选 — Cursor / Windsurf / Trae / VS Code)
|
|
69
|
+
✔ 选择 IDE › Cursor (多选 — Cursor / Windsurf / Trae / VS Code / Claude Code / OpenCode)
|
|
68
70
|
✔ 选择项目类型 › Web SPA / PWA
|
|
71
|
+
✔ 是否生成 project-brief.md? › 是(生成后填写项目需求,供 /archi.start 或 /archi.inherit 使用)
|
|
69
72
|
|
|
70
73
|
● 正在部署 Architext...
|
|
71
74
|
✔ 文档已部署 → .architext/
|
|
@@ -84,7 +87,7 @@ npx archi init
|
|
|
84
87
|
|
|
85
88
|
**第二步 · AI 对话:初始化项目**
|
|
86
89
|
|
|
87
|
-
|
|
90
|
+
选择生成时,`archi init` 会在项目根目录生成 `project-brief.md`。填写完毕后,在 AI 编辑器中运行:
|
|
88
91
|
|
|
89
92
|
```
|
|
90
93
|
/archi.start project-brief.md
|
|
@@ -92,7 +95,7 @@ npx archi init
|
|
|
92
95
|
|
|
93
96
|
AI 读取 Brief,就关键决策向你提问,生成项目的基础文档(`vision.md`、`roadmap.json`、`tech_stack` 等)。
|
|
94
97
|
|
|
95
|
-
> **已有代码?** 跳过 `/archi.start`,改用 `/archi.inherit` —— 逆向分析项目,将已有功能注册为 `LEG-xx` 任务,同时生成 `map.json
|
|
98
|
+
> **已有代码?** 跳过 `/archi.start`,改用 `/archi.inherit` —— 逆向分析项目,将已有功能注册为 `LEG-xx` 任务,同时生成 `map.json`。可选:代码库尚空时传 `project-brief.md` 补充愿景与路线图。
|
|
96
99
|
|
|
97
100
|
---
|
|
98
101
|
|
|
@@ -101,9 +104,10 @@ AI 读取 Brief,就关键决策向你提问,生成项目的基础文档(`v
|
|
|
101
104
|
项目全生命周期的主干路径,全部在 AI 对话框中完成。
|
|
102
105
|
|
|
103
106
|
```
|
|
104
|
-
project-brief.md → /archi.start →
|
|
107
|
+
project-brief.md → /archi.start → /archi.plan → /archi.code → /archi.audit
|
|
105
108
|
↑
|
|
106
|
-
|
|
109
|
+
/archi.scope anytime you have NEW feature requirements
|
|
110
|
+
(不限「start 之后」——项目进行中、发布后均可)
|
|
107
111
|
```
|
|
108
112
|
|
|
109
113
|
**第一阶段 · 初始化**
|
|
@@ -123,14 +127,15 @@ AI: [正在分析项目 Brief...]
|
|
|
123
127
|
✔ 填充: .cursor/rules/02_tech_stack.mdc (写入项目技术决策)
|
|
124
128
|
✔ 填充: .cursor/rules/90_custom_rules.mdc (写入团队编码规范)
|
|
125
129
|
|
|
126
|
-
|
|
130
|
+
下一步:Brief 已覆盖全部需求 → /archi.plan <首个任务ID>
|
|
131
|
+
Brief 之外还有需求 → /archi.scope 先追加任务
|
|
127
132
|
```
|
|
128
133
|
|
|
129
134
|
> **已有代码?** 改用 `/archi.inherit` —— 逆向分析项目,将已有功能注册为 `LEG-xx` 任务,并额外生成 `map.json`。
|
|
130
135
|
|
|
131
|
-
**第二阶段 ·
|
|
136
|
+
**第二阶段 · 需求分解(可选,随时可跑)**
|
|
132
137
|
|
|
133
|
-
>
|
|
138
|
+
> `/archi.scope` **不是**「start 的下一步」。只要你有**除初始 Brief 之外的新功能需求**,随时可运行——start 后、项目进行中、所有任务完成后均可。
|
|
134
139
|
|
|
135
140
|
```
|
|
136
141
|
你: /archi.scope scope-brief.md ← 提供文件;或直接 /archi.scope 触发访谈
|
|
@@ -204,7 +209,80 @@ AI: [正在读取 代码 + spec + plan + vision + tech_stack...]
|
|
|
204
209
|
[低] Token 过期时间未通过环境变量配置 → 建议运行 /archi.edit
|
|
205
210
|
```
|
|
206
211
|
|
|
207
|
-
> **命令之间的日常开发**由自然语言 **Chat Mode**
|
|
212
|
+
> **命令之间的日常开发**由自然语言 **Chat Mode** 驱动。用自然语言描述需求(如「加个登录功能」「修一下认证的 bug」),AI 会自动识别意图并加载对应协议(scope/plan/code/edit/fix)执行,**无需手动输入 `/archi.*` 斜杠命令**。提问、琐碎修改、调试则直接回答。7 个规则文件中有 4 个作为始终在线的基底规则:`00_system`、`02_tech_stack`、`90_custom_rules`、`99_context_glue`,AI 不会因会话切换而"失忆"。
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## 教程
|
|
217
|
+
|
|
218
|
+
不同场景,同一套协议。按你的情况选择对应路径。
|
|
219
|
+
|
|
220
|
+
### 教程 A:新项目,Brief 已覆盖全部需求
|
|
221
|
+
|
|
222
|
+
`project-brief.md` 已列出所有功能,无需 scope。
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
/archi.start project-brief.md → /archi.plan FEAT-001 → /archi.code FEAT-001 → ...
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Start 产出 roadmap 后,直接 plan 首个任务,再 code。
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### 教程 B:新项目,Brief 不完整
|
|
233
|
+
|
|
234
|
+
start 跑完后发现漏了功能,或想追加更多。
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
/archi.start project-brief.md → /archi.scope scope-brief.md → /archi.plan FEAT-001 → ...
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Scope 向 `roadmap.json` 追加任务,再按 plan → code 继续。
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### 教程 C:项目进行中追加功能
|
|
245
|
+
|
|
246
|
+
FEAT-001 已做完,想加 FEAT-002、FEAT-003 等。
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
... → /archi.scope scope-brief.md → /archi.plan FEAT-002 → /archi.code FEAT-002 → ...
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Scope 随时可跑**——不限「start 之后」。只要有超出当前 roadmap 的新需求,就运行 scope。
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
### 教程 D:已有代码库
|
|
257
|
+
|
|
258
|
+
已有仓库,想纳入 Architext 管理。
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
npx archi init → /archi.inherit [project-brief.md] → /archi.edit LEG-xx 补全 Stub → /archi.code LEG-xx
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Inherit 逆向分析项目,将已有功能注册为 `LEG-xx` 任务。用 edit 补全 Stub spec,再按需 code。
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### 教程 E:Bug 修复
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
/archi.fix FEAT-001 "密码含特殊字符时登录失败"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Fix 诊断根因,向 plan 追加 Bugfix Phase,并修复代码。
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### 何时用 /archi.scope(速查)
|
|
279
|
+
|
|
280
|
+
| 时机 | 操作 |
|
|
281
|
+
|:---|:---|
|
|
282
|
+
| start 后,Brief 未覆盖全部 | scope |
|
|
283
|
+
| 项目进行中,想到新功能 | scope |
|
|
284
|
+
| 所有任务 done,要加新模块 | scope |
|
|
285
|
+
| Brief 已覆盖全部 | 跳过 scope,直接 plan |
|
|
208
286
|
|
|
209
287
|
---
|
|
210
288
|
|
|
@@ -212,10 +290,12 @@ AI: [正在读取 代码 + spec + plan + vision + tech_stack...]
|
|
|
212
290
|
|
|
213
291
|
### AI 对话命令
|
|
214
292
|
|
|
293
|
+
可通过输入 `/archi.<命令>` 或直接用自然语言描述意图触发——Chat Mode 会自动加载并执行对应协议。
|
|
294
|
+
|
|
215
295
|
| 命令 | 说明 |
|
|
216
296
|
|:---|:---|
|
|
217
297
|
| `/archi.start [brief]` | 读取需求 Brief,生成项目基础文档(vision / roadmap / tech_stack 等) |
|
|
218
|
-
| `/archi.inherit` |
|
|
298
|
+
| `/archi.inherit [brief]` | 逆向分析已有代码库;可选传 project-brief.md 补充愿景/路线图(骨架仓库) |
|
|
219
299
|
| `/archi.scope [file_path]` | 将额外需求拆解为 Roadmap 任务;无文件则自动发起访谈 |
|
|
220
300
|
| `/archi.plan <ID> [context]` | 深度架构访谈 → 生成 spec / plan([?UI] 附 ui.md + ui_concept.html);可附加已知上下文减少提问 |
|
|
221
301
|
| `/archi.code <ID>` | 按 plan 分阶段实现代码;仅 `active` 任务可进入 |
|
|
@@ -278,7 +358,7 @@ Agent 模式适合单次会话。Architext 提供跨会话、跨成员、跨 AI
|
|
|
278
358
|
|
|
279
359
|
**我的已有项目能用吗?**
|
|
280
360
|
|
|
281
|
-
|
|
361
|
+
可以。先运行 `npx archi init` 部署框架,再运行 `/archi.inherit`,Architext 会分析你的现有代码并填充文档骨架(非覆盖既有内容)。已有功能以 `LEG-xx` 形式注册为存根规格,渐进式接入,无需推倒重来。
|
|
282
362
|
|
|
283
363
|
> **注意**:`/archi.inherit` 目前处于早期阶段,对大型或复杂仓库的分析结果可能不够完整,需要手动补充。欢迎提交 Issue 反馈遇到的问题。
|
|
284
364
|
|
|
@@ -294,6 +374,8 @@ Agent 模式适合单次会话。Architext 提供跨会话、跨成员、跨 AI
|
|
|
294
374
|
| Windsurf | `.windsurf/rules/` | `.md` | 支持 |
|
|
295
375
|
| Trae | `.trae/rules/` | `.md` | 支持 |
|
|
296
376
|
| VS Code | `.github/instructions/` | `.instructions.md` | 支持 |
|
|
377
|
+
| Claude Code | `.claude/rules/` | `.md` | 支持 |
|
|
378
|
+
| OpenCode | `.opencode/rules/` | `.md` | 支持 |
|
|
297
379
|
|
|
298
380
|
后续计划扩展更多编辑器支持。
|
|
299
381
|
|