architext 0.0.4 → 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 +55 -1
- package/README.md +93 -14
- package/README.zh-CN.md +92 -14
- package/dist/index.js +53 -39
- package/dist/templates/en/briefs/_base.md +53 -13
- package/dist/templates/en/briefs/_modules.md +31 -4
- 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 +80 -94
- package/dist/templates/en/docs/prompts/code.md +99 -89
- package/dist/templates/en/docs/prompts/edit.md +61 -51
- package/dist/templates/en/docs/prompts/fix.md +59 -43
- package/dist/templates/en/docs/prompts/help.md +23 -31
- package/dist/templates/en/docs/prompts/inherit.md +97 -117
- package/dist/templates/en/docs/prompts/map.md +48 -69
- package/dist/templates/en/docs/prompts/plan.md +141 -240
- package/dist/templates/en/docs/prompts/recover.md +19 -34
- package/dist/templates/en/docs/prompts/ref.md +43 -138
- package/dist/templates/en/docs/prompts/remove.md +63 -110
- package/dist/templates/en/docs/prompts/revise.md +71 -106
- package/dist/templates/en/docs/prompts/scope.md +78 -117
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +98 -132
- 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 +268 -117
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +37 -23
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +138 -240
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +10 -6
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +24 -25
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +175 -305
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +56 -17
- package/dist/templates/zh/briefs/_modules.md +28 -1
- 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 +43 -57
- package/dist/templates/zh/docs/prompts/code.md +66 -56
- package/dist/templates/zh/docs/prompts/edit.md +52 -42
- package/dist/templates/zh/docs/prompts/fix.md +39 -29
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +67 -86
- package/dist/templates/zh/docs/prompts/map.md +28 -50
- package/dist/templates/zh/docs/prompts/plan.md +100 -199
- package/dist/templates/zh/docs/prompts/recover.md +9 -24
- package/dist/templates/zh/docs/prompts/ref.md +11 -106
- package/dist/templates/zh/docs/prompts/remove.md +39 -74
- package/dist/templates/zh/docs/prompts/revise.md +47 -88
- package/dist/templates/zh/docs/prompts/scope.md +52 -91
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +75 -110
- 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 +252 -131
- 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 -235
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +174 -301
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -93
- package/dist/templates/en/rules/03_data_governance.md +0 -102
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -94
- package/dist/templates/zh/rules/03_data_governance.md +0 -133
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,61 @@ 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.6...HEAD) / 待发布
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## [0.0.6](https://github.com/JiuNian3219/architext/releases/tag/v0.0.6) - 2026-03-17
|
|
14
|
+
|
|
15
|
+
### Added / 新增
|
|
16
|
+
|
|
17
|
+
- `/archi.script` 命令 — 生成自动化脚本 / Added `/archi.script` command for generating automation scripts
|
|
18
|
+
- `error_memory.json` — 错误记忆库,记录关键词签名与历史解决方案 / Added `error_memory.json` for error pattern tracking
|
|
19
|
+
- 桌面通知功能 — 支持 IDE 事件通知 / Added desktop notification support
|
|
20
|
+
- AI Git 工作流相关条目 / Added AI Git workflow entries
|
|
21
|
+
- IDE 通知配置检查功能 / Added IDE notification configuration check
|
|
22
|
+
- UI 概念设计支持多文件生成 / Enhanced UI wireframe with multi-file generation
|
|
23
|
+
|
|
24
|
+
### Changed / 变更
|
|
25
|
+
|
|
26
|
+
- 系统文档重构 — 合并分散规则至 00_system.md / Refactored system docs, merged scattered rules into 00_system.md
|
|
27
|
+
- 双层架构与资产体系增强 / Enhanced dual-layer architecture and asset system
|
|
28
|
+
- 网站部署和页面更新 — SEO 优化 / Updated website deployment and pages with SEO optimization
|
|
29
|
+
- 数据治理与文件同步流程优化 / Optimized data governance and file sync flow
|
|
30
|
+
- 技能文档精简与一致性提升 / Streamlined skills documentation
|
|
31
|
+
|
|
32
|
+
### Fixed / 修复
|
|
33
|
+
|
|
34
|
+
- 修复 file-model 测试 — 添加缺失的 script prompt 和全局种子文件 / Fixed file-model tests by adding missing script prompts
|
|
35
|
+
- 修复 IDE 和 Claude 通知集成不生效问题 / Fixed IDE and Claude notification integration
|
|
36
|
+
- 修复能力标记解析器 — 命令功能检测 / Fixed capability marker parser for command detection
|
|
37
|
+
- 修复模板表述 — 避免功能被误解为任务 / Fixed template wording to prevent feature-task confusion
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## [0.0.5](https://github.com/JiuNian3219/architext/releases/tag/v0.0.5) - 2026-03-06
|
|
42
|
+
|
|
43
|
+
### Added / 新增
|
|
44
|
+
|
|
45
|
+
- `FileModel` 注册表,实现声明式文件管理,替代分散的路径硬编码 / Introduced FileModel registry for declarative file management
|
|
46
|
+
- `archi init` 支持 `--yes` 和 `--brief` flag,实现非交互式初始化 / Added `--yes` and `--brief` flags for non-interactive init
|
|
47
|
+
- Brief 附件资产目录支持(`_modules.md` 等附件模块)/ Added Brief attachment asset directory support
|
|
48
|
+
- Skill 类型声明(`type: specialist` / `type: reviewer`)/ Added Skill type classification in frontmatter
|
|
49
|
+
|
|
50
|
+
### Changed / 变更
|
|
51
|
+
|
|
52
|
+
- 重构 `init`、`uninstall`、`update` 命令,基于 FileModel 驱动,逻辑更一致 / Refactored commands to be driven by FileModel
|
|
53
|
+
- 拆分 `scaffold.ts` 为 `brief.ts` 和 `ide-integrations.ts`,拆分 `index.ts` 为 `collector.ts` 和 `serializer.ts` / Decomposed large source files for clarity
|
|
54
|
+
- 精简 14 个中文协议文件,总行数从 2474 压缩至 1852(-25%)/ Compressed 14 zh protocol files by 25%
|
|
55
|
+
- `01_workflow.md` 改造为 Chat Mode:高频命令(plan/code/edit/fix/scope)支持自然语言触发,AI 自动加载协议执行 / Workflow now supports natural-language intent detection for high-frequency commands
|
|
56
|
+
- 两阶段协议生成合并为统一协议,减少用户操作步骤 / Merged two-phase protocol generation into single flow
|
|
57
|
+
- 更新触发器描述,支持自然语言触发 / Updated trigger descriptions to support natural language
|
|
58
|
+
- 补充 `01_workflow` 中 `ref` 与 `recover` 命令路由 / Added routing for `ref` and `recover` commands
|
|
59
|
+
|
|
60
|
+
### Fixed / 修复
|
|
61
|
+
|
|
62
|
+
- 修正 `inherit` 协议表述,避免误导用户认为会覆盖既有 `.architext` 数据 / Fixed `inherit` wording to prevent misunderstanding about overwriting existing data
|
|
63
|
+
- 补全 zh prompts 到 en 的完整翻译 / Completed full translation of zh prompts to en
|
|
10
64
|
|
|
11
65
|
---
|
|
12
66
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](https://github.com/JiuNian3219/architext/blob/main/README.zh-CN.md) · **English**
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# <img src="templates/icon.svg" width="40" height="40" align="top" /> Architext
|
|
6
6
|
|
|
7
7
|
**The AI Architecture Protocol. Define first, build right.**
|
|
8
8
|
|
|
@@ -74,8 +74,7 @@ npx archi init
|
|
|
74
74
|
✔ Docs deployed → .architext/
|
|
75
75
|
prompts/ global/ templates/ tasks/
|
|
76
76
|
✔ Rules deployed → .cursor/rules/ (Cursor: .mdc)
|
|
77
|
-
00_system ·
|
|
78
|
-
04_cli_tools · 90_custom_rules · 99_context_glue
|
|
77
|
+
00_system · 90_custom_rules
|
|
79
78
|
✔ Commands deployed → .cursor/commands/ (Cursor only)
|
|
80
79
|
archi.start · archi.scope · archi.plan · archi.code · archi.audit · ...
|
|
81
80
|
✔ Skills deployed → .cursor/skills/ (Cursor)
|
|
@@ -104,9 +103,10 @@ The AI reads the brief, interviews you on key decisions, and generates the proje
|
|
|
104
103
|
The main trunk of a project lifecycle. Everything happens in your AI chat window.
|
|
105
104
|
|
|
106
105
|
```
|
|
107
|
-
project-brief.md → /archi.start → [/archi.
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
project-brief.md → /archi.start → [?UI] /archi.ui → /archi.plan → /archi.code → /archi.audit
|
|
107
|
+
↑
|
|
108
|
+
/archi.scope runs anytime you have NEW feature requirements
|
|
109
|
+
(not limited to "right after start" — mid-project, post-release, etc.)
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
**Stage 1 — Initialize**
|
|
@@ -121,19 +121,20 @@ AI: [Analyzing project brief...]
|
|
|
121
121
|
✔ ADDED: .architext/global/roadmap.json
|
|
122
122
|
✔ ADDED: .architext/global/dictionary.json
|
|
123
123
|
✔ ADDED: .architext/global/error_codes.json
|
|
124
|
+
✔ ADDED: .architext/global/env_registry.json
|
|
125
|
+
✔ ADDED: .architext/global/tech_stack.md
|
|
124
126
|
✔ ADDED: .architext/global/ui_context.md (UI projects only)
|
|
125
|
-
✔ ADDED: .architext/global/ui_concept.html (UI projects only)
|
|
126
|
-
✔ MODIFIED: .cursor/rules/02_tech_stack.mdc (filled with project tech decisions)
|
|
127
127
|
✔ MODIFIED: .cursor/rules/90_custom_rules.mdc (filled with team conventions)
|
|
128
128
|
|
|
129
|
-
Next: run /archi.
|
|
129
|
+
Next: run /archi.ui to generate UI concept designs → then /archi.plan <first-task-id>
|
|
130
|
+
if you have more requirements → /archi.scope to add tasks first
|
|
130
131
|
```
|
|
131
132
|
|
|
132
133
|
> **Existing codebase?** Use `/archi.inherit` instead — it reverse-engineers your project and registers existing features as `LEG-xx` tasks. Also generates `map.json`.
|
|
133
134
|
|
|
134
|
-
**Stage 2 — Decompose (optional)**
|
|
135
|
+
**Stage 2 — Decompose (optional, runs anytime)**
|
|
135
136
|
|
|
136
|
-
>
|
|
137
|
+
> `/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.
|
|
137
138
|
|
|
138
139
|
```
|
|
139
140
|
You: /archi.scope scope-brief.md ← provide a file, or run bare to trigger an interview
|
|
@@ -207,7 +208,80 @@ AI: [Reading code + spec + plan + vision + tech_stack...]
|
|
|
207
208
|
[LOW] Token expiry not configurable via env var → suggest /archi.edit
|
|
208
209
|
```
|
|
209
210
|
|
|
210
|
-
> **Daily development between commands** is driven by natural language Chat Mode —
|
|
211
|
+
> **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. Two rule files act as always-on base rules: `00_system` and `90_custom_rules`.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Tutorials
|
|
216
|
+
|
|
217
|
+
Different scenarios, same protocol. Pick the one that matches your situation.
|
|
218
|
+
|
|
219
|
+
### Tutorial A: New project, brief covers everything
|
|
220
|
+
|
|
221
|
+
Your `project-brief.md` already lists all features. No scope needed.
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
/archi.start project-brief.md → [?UI] /archi.ui → /archi.plan FEAT-001 → /archi.code FEAT-001 → ...
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Start produces a roadmap. For UI projects, run `/archi.ui` to generate screen prototypes. Then plan and code as usual.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
### Tutorial B: New project, brief incomplete
|
|
232
|
+
|
|
233
|
+
You ran start, but later realize you forgot features or want to add more.
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
/archi.start project-brief.md → [?UI] /archi.ui → /archi.scope scope-brief.md → /archi.plan FEAT-001 → ...
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Scope appends new tasks to `roadmap.json`. Then run `/archi.ui` for UI projects, and plan and code as usual.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### Tutorial C: Add features mid-project
|
|
244
|
+
|
|
245
|
+
You're already building. FEAT-001 is done, and you want to add FEAT-002, FEAT-003, etc.
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
... → /archi.scope scope-brief.md → /archi.plan FEAT-002 → /archi.code FEAT-002 → ...
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Scope runs anytime** — not only after start. Whenever you have new requirements beyond the current roadmap, run scope.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### Tutorial D: Existing codebase
|
|
256
|
+
|
|
257
|
+
You have an existing repo. Adopt Architext without rewriting.
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
npx archi init → /archi.inherit [project-brief.md] → /archi.edit LEG-xx 补全 Stub → /archi.code LEG-xx
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Inherit reverse-engineers the repo and registers features as `LEG-xx` tasks. Use edit to complete stub specs, then code when needed.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
### Tutorial E: Bug fix
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
/archi.fix FEAT-001 "login fails when password has special chars"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Fix diagnoses, appends a Bugfix Phase to the plan, and repairs the code.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### When to use /archi.scope (summary)
|
|
278
|
+
|
|
279
|
+
| When | Action |
|
|
280
|
+
|:---|:---|
|
|
281
|
+
| Right after start, brief didn't cover everything | scope |
|
|
282
|
+
| Mid-project, new feature idea | scope |
|
|
283
|
+
| All tasks done, want to add a new module | scope |
|
|
284
|
+
| Brief already covers everything | Skip scope, go to plan |
|
|
211
285
|
|
|
212
286
|
---
|
|
213
287
|
|
|
@@ -215,15 +289,19 @@ AI: [Reading code + spec + plan + vision + tech_stack...]
|
|
|
215
289
|
|
|
216
290
|
### AI Chat Commands
|
|
217
291
|
|
|
292
|
+
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.
|
|
293
|
+
|
|
218
294
|
| Command | Description |
|
|
219
295
|
|:---|:---|
|
|
220
296
|
| `/archi.start [brief]` | Read a project brief and generate foundation docs (vision / roadmap / tech_stack etc.) |
|
|
221
297
|
| `/archi.inherit [brief]` | Reverse-engineer existing codebase; optionally pass project-brief.md to supplement vision/roadmap (skeleton repos) |
|
|
222
298
|
| `/archi.scope [file_path]` | Decompose extra requirements into roadmap tasks; omit file to trigger an interview |
|
|
223
|
-
| `/archi.plan <ID> [context]` | Deep architecture interview → spec / plan ([?UI] also ui.md
|
|
299
|
+
| `/archi.plan <ID> [context]` | Deep architecture interview → spec / plan ([?UI] also ui.md); supply context to reduce questions |
|
|
224
300
|
| `/archi.code <ID>` | Implement from plan phase by phase; only `active` tasks are allowed |
|
|
301
|
+
| `/archi.script` | Generate AI automation scripts (validate/dev-up/dev-reset) post-infrastructure |
|
|
225
302
|
| `/archi.edit <ID> [context]` | Update feature spec → append new dev phase; history is preserved |
|
|
226
303
|
| `/archi.revise [context]` | Global arch/stack change → impact assessment → cascade update on confirm |
|
|
304
|
+
| `/archi.ui` | Generate or incrementally update multi-file UI concept designs (`screens/` directory); UI projects only |
|
|
227
305
|
| `/archi.audit [ID]` | Deep code audit; with ID audits a task, without ID does a project-wide health check |
|
|
228
306
|
| `/archi.fix [ID] <context>` | Root-cause diagnosis and bug fix; ID optional, context describes the symptom |
|
|
229
307
|
| `/archi.map` | Diff map.json against actual file tree and sync |
|
|
@@ -240,6 +318,7 @@ AI: [Reading code + spec + plan + vision + tech_stack...]
|
|
|
240
318
|
| `npx archi render` | Generate Markdown views from JSON data |
|
|
241
319
|
| `npx archi task [--check]` | View / validate roadmap task status |
|
|
242
320
|
| `npx archi plan <id>` | Check plan completion status for a feature |
|
|
321
|
+
| `npx archi pack [-o file]` | Pack user data into XML for backup/migration |
|
|
243
322
|
| `npx archi template <name>` | Fetch a template file to project root |
|
|
244
323
|
| `npx archi uninstall` | Remove Architext files from project |
|
|
245
324
|
|
|
@@ -281,7 +360,7 @@ Agent mode is great for single sessions. Architext provides persistent context t
|
|
|
281
360
|
|
|
282
361
|
**Q: Can I use this on an existing codebase?**
|
|
283
362
|
|
|
284
|
-
Yes. Run `/archi.inherit` — Architext analyzes your existing code and
|
|
363
|
+
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.
|
|
285
364
|
|
|
286
365
|
> **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.
|
|
287
366
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**简体中文** · [English](https://github.com/JiuNian3219/architext/blob/main/README.md)
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# <img src="templates/icon.svg" width="40" height="40" align="top" /> Architext
|
|
6
6
|
|
|
7
7
|
**AI 原生架构协议 · 先想清楚,再让 AI 实现**
|
|
8
8
|
|
|
@@ -74,8 +74,7 @@ npx archi init
|
|
|
74
74
|
✔ 文档已部署 → .architext/
|
|
75
75
|
prompts/ global/ templates/ tasks/
|
|
76
76
|
✔ 规则文件已部署 → .cursor/rules/ (Cursor: .mdc)
|
|
77
|
-
00_system ·
|
|
78
|
-
04_cli_tools · 90_custom_rules · 99_context_glue
|
|
77
|
+
00_system · 90_custom_rules
|
|
79
78
|
✔ 命令文件已部署 → .cursor/commands/ (仅 Cursor)
|
|
80
79
|
archi.start · archi.scope · archi.plan · archi.code · archi.audit · ...
|
|
81
80
|
✔ Skills 已部署 → .cursor/skills/ (Cursor)
|
|
@@ -104,9 +103,10 @@ AI 读取 Brief,就关键决策向你提问,生成项目的基础文档(`v
|
|
|
104
103
|
项目全生命周期的主干路径,全部在 AI 对话框中完成。
|
|
105
104
|
|
|
106
105
|
```
|
|
107
|
-
project-brief.md → /archi.start → [/archi.
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
project-brief.md → /archi.start → [?UI] /archi.ui → /archi.plan → /archi.code → /archi.audit
|
|
107
|
+
↑
|
|
108
|
+
/archi.scope anytime you have NEW feature requirements
|
|
109
|
+
(不限「start 之后」——项目进行中、发布后均可)
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
**第一阶段 · 初始化**
|
|
@@ -121,19 +121,20 @@ AI: [正在分析项目 Brief...]
|
|
|
121
121
|
✔ 新增: .architext/global/roadmap.json
|
|
122
122
|
✔ 新增: .architext/global/dictionary.json
|
|
123
123
|
✔ 新增: .architext/global/error_codes.json
|
|
124
|
+
✔ 新增: .architext/global/env_registry.json
|
|
125
|
+
✔ 新增: .architext/global/tech_stack.md
|
|
124
126
|
✔ 新增: .architext/global/ui_context.md (仅 UI 类项目)
|
|
125
|
-
✔ 新增: .architext/global/ui_concept.html (仅 UI 类项目)
|
|
126
|
-
✔ 填充: .cursor/rules/02_tech_stack.mdc (写入项目技术决策)
|
|
127
127
|
✔ 填充: .cursor/rules/90_custom_rules.mdc (写入团队编码规范)
|
|
128
128
|
|
|
129
|
-
下一步:运行 /archi.
|
|
129
|
+
下一步:运行 /archi.ui 生成 UI 概念设计 → 然后 /archi.plan <首个任务ID>
|
|
130
|
+
Brief 之外还有需求 → /archi.scope 先追加任务
|
|
130
131
|
```
|
|
131
132
|
|
|
132
133
|
> **已有代码?** 改用 `/archi.inherit` —— 逆向分析项目,将已有功能注册为 `LEG-xx` 任务,并额外生成 `map.json`。
|
|
133
134
|
|
|
134
|
-
**第二阶段 ·
|
|
135
|
+
**第二阶段 · 需求分解(可选,随时可跑)**
|
|
135
136
|
|
|
136
|
-
>
|
|
137
|
+
> `/archi.scope` **不是**「start 的下一步」。只要你有**除初始 Brief 之外的新功能需求**,随时可运行——start 后、项目进行中、所有任务完成后均可。
|
|
137
138
|
|
|
138
139
|
```
|
|
139
140
|
你: /archi.scope scope-brief.md ← 提供文件;或直接 /archi.scope 触发访谈
|
|
@@ -207,7 +208,80 @@ AI: [正在读取 代码 + spec + plan + vision + tech_stack...]
|
|
|
207
208
|
[低] Token 过期时间未通过环境变量配置 → 建议运行 /archi.edit
|
|
208
209
|
```
|
|
209
210
|
|
|
210
|
-
> **命令之间的日常开发**由自然语言 **Chat Mode**
|
|
211
|
+
> **命令之间的日常开发**由自然语言 **Chat Mode** 驱动。用自然语言描述需求(如「加个登录功能」「修一下认证的 bug」),AI 会自动识别意图并加载对应协议(scope/plan/code/edit/fix)执行,**无需手动输入 `/archi.*` 斜杠命令**。提问、琐碎修改、调试则直接回答。2 个规则文件作为始终在线的基底规则:`00_system`、`90_custom_rules`,AI 不会因会话切换而"失忆"。
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 教程
|
|
216
|
+
|
|
217
|
+
不同场景,同一套协议。按你的情况选择对应路径。
|
|
218
|
+
|
|
219
|
+
### 教程 A:新项目,Brief 已覆盖全部需求
|
|
220
|
+
|
|
221
|
+
`project-brief.md` 已列出所有功能,无需 scope。
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
/archi.start project-brief.md → [?UI] /archi.ui → /archi.plan FEAT-001 → /archi.code FEAT-001 → ...
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Start 产出 roadmap 后,UI 项目运行 `/archi.ui` 生成屏幕原型,再 plan 首个任务,然后 code。
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
### 教程 B:新项目,Brief 不完整
|
|
232
|
+
|
|
233
|
+
start 跑完后发现漏了功能,或想追加更多。
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
/archi.start project-brief.md → [?UI] /archi.ui → /archi.scope scope-brief.md → /archi.plan FEAT-001 → ...
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Scope 向 `roadmap.json` 追加任务,UI 项目运行 `/archi.ui`,再按 plan → code 继续。
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### 教程 C:项目进行中追加功能
|
|
244
|
+
|
|
245
|
+
FEAT-001 已做完,想加 FEAT-002、FEAT-003 等。
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
... → /archi.scope scope-brief.md → /archi.plan FEAT-002 → /archi.code FEAT-002 → ...
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Scope 随时可跑**——不限「start 之后」。只要有超出当前 roadmap 的新需求,就运行 scope。
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### 教程 D:已有代码库
|
|
256
|
+
|
|
257
|
+
已有仓库,想纳入 Architext 管理。
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
npx archi init → /archi.inherit [project-brief.md] → /archi.edit LEG-xx 补全 Stub → /archi.code LEG-xx
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Inherit 逆向分析项目,将已有功能注册为 `LEG-xx` 任务。用 edit 补全 Stub spec,再按需 code。
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
### 教程 E:Bug 修复
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
/archi.fix FEAT-001 "密码含特殊字符时登录失败"
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Fix 诊断根因,向 plan 追加 Bugfix Phase,并修复代码。
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### 何时用 /archi.scope(速查)
|
|
278
|
+
|
|
279
|
+
| 时机 | 操作 |
|
|
280
|
+
|:---|:---|
|
|
281
|
+
| start 后,Brief 未覆盖全部 | scope |
|
|
282
|
+
| 项目进行中,想到新功能 | scope |
|
|
283
|
+
| 所有任务 done,要加新模块 | scope |
|
|
284
|
+
| Brief 已覆盖全部 | 跳过 scope,直接 plan |
|
|
211
285
|
|
|
212
286
|
---
|
|
213
287
|
|
|
@@ -215,15 +289,18 @@ AI: [正在读取 代码 + spec + plan + vision + tech_stack...]
|
|
|
215
289
|
|
|
216
290
|
### AI 对话命令
|
|
217
291
|
|
|
292
|
+
可通过输入 `/archi.<命令>` 或直接用自然语言描述意图触发——Chat Mode 会自动加载并执行对应协议。
|
|
293
|
+
|
|
218
294
|
| 命令 | 说明 |
|
|
219
295
|
|:---|:---|
|
|
220
296
|
| `/archi.start [brief]` | 读取需求 Brief,生成项目基础文档(vision / roadmap / tech_stack 等) |
|
|
221
297
|
| `/archi.inherit [brief]` | 逆向分析已有代码库;可选传 project-brief.md 补充愿景/路线图(骨架仓库) |
|
|
222
298
|
| `/archi.scope [file_path]` | 将额外需求拆解为 Roadmap 任务;无文件则自动发起访谈 |
|
|
223
|
-
| `/archi.plan <ID> [context]` | 深度架构访谈 → 生成 spec / plan([?UI] 附 ui.md
|
|
299
|
+
| `/archi.plan <ID> [context]` | 深度架构访谈 → 生成 spec / plan([?UI] 附 ui.md);可附加已知上下文减少提问 |
|
|
224
300
|
| `/archi.code <ID>` | 按 plan 分阶段实现代码;仅 `active` 任务可进入 |
|
|
225
301
|
| `/archi.edit <ID> [context]` | 修改功能规格 → 追加新开发 Phase;不覆盖历史记录 |
|
|
226
302
|
| `/archi.revise [context]` | 全局架构/技术栈变更 → 输出影响评估 → 用户确认后级联更新 |
|
|
303
|
+
| `/archi.ui` | 生成或增量更新多文件 UI 概念设计(`screens/` 目录);仅 UI 类项目 |
|
|
227
304
|
| `/archi.audit [ID]` | 深度代码审查,输出审计报告;带 ID 审查单任务,不带 ID 做项目级体检 |
|
|
228
305
|
| `/archi.fix [ID] <context>` | 诊断根因并修复 Bug;ID 可选,context 描述问题现象 |
|
|
229
306
|
| `/archi.map` | 对比 map.json 与实际目录树,同步架构地图 |
|
|
@@ -240,6 +317,7 @@ AI: [正在读取 代码 + spec + plan + vision + tech_stack...]
|
|
|
240
317
|
| `npx archi render` | 将 JSON 数据生成可读 Markdown 视图 |
|
|
241
318
|
| `npx archi task [--check]` | 查看/校验 Roadmap 任务状态 |
|
|
242
319
|
| `npx archi plan <id>` | 检查指定功能的 plan 完成度 |
|
|
320
|
+
| `npx archi pack [-o file]` | 打包用户数据为 XML 备份文件 |
|
|
243
321
|
| `npx archi template <name>` | 获取模板文件到项目根目录 |
|
|
244
322
|
| `npx archi uninstall` | 从项目中移除 Architext 文件 |
|
|
245
323
|
|
|
@@ -281,7 +359,7 @@ Agent 模式适合单次会话。Architext 提供跨会话、跨成员、跨 AI
|
|
|
281
359
|
|
|
282
360
|
**我的已有项目能用吗?**
|
|
283
361
|
|
|
284
|
-
|
|
362
|
+
可以。先运行 `npx archi init` 部署框架,再运行 `/archi.inherit`,Architext 会分析你的现有代码并填充文档骨架(非覆盖既有内容)。已有功能以 `LEG-xx` 形式注册为存根规格,渐进式接入,无需推倒重来。
|
|
285
363
|
|
|
286
364
|
> **注意**:`/archi.inherit` 目前处于早期阶段,对大型或复杂仓库的分析结果可能不够完整,需要手动补充。欢迎提交 Issue 反馈遇到的问题。
|
|
287
365
|
|