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.
Files changed (78) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/README.md +18 -16
  3. package/README.zh-CN.md +15 -14
  4. package/dist/index.js +43 -29
  5. package/dist/templates/en/briefs/_base.md +13 -6
  6. package/dist/templates/en/briefs/_modules.md +2 -2
  7. package/dist/templates/en/docs/global/error_memory.json +40 -0
  8. package/dist/templates/en/docs/global/map.json +46 -90
  9. package/dist/templates/en/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +6 -13
  10. package/dist/templates/en/{rules/02_tech_stack.md → docs/global/tech_stack.md} +7 -18
  11. package/dist/templates/en/docs/global/vision.md +1 -1
  12. package/dist/templates/en/docs/prompts/audit.md +5 -5
  13. package/dist/templates/en/docs/prompts/code.md +23 -11
  14. package/dist/templates/en/docs/prompts/edit.md +21 -7
  15. package/dist/templates/en/docs/prompts/fix.md +11 -2
  16. package/dist/templates/en/docs/prompts/inherit.md +18 -13
  17. package/dist/templates/en/docs/prompts/map.md +4 -3
  18. package/dist/templates/en/docs/prompts/plan.md +11 -5
  19. package/dist/templates/en/docs/prompts/remove.md +13 -8
  20. package/dist/templates/en/docs/prompts/revise.md +10 -2
  21. package/dist/templates/en/docs/prompts/scope.md +4 -3
  22. package/dist/templates/en/docs/prompts/script.md +102 -0
  23. package/dist/templates/en/docs/prompts/start.md +20 -14
  24. package/dist/templates/en/docs/prompts/ui.md +113 -0
  25. package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
  26. package/dist/templates/en/docs/templates/spec.template.md +1 -1
  27. package/dist/templates/en/docs/templates/ui.template.md +8 -8
  28. package/dist/templates/en/rules/00_system.md +245 -51
  29. package/dist/templates/en/rules/90_custom_rules.md +3 -1
  30. package/dist/templates/en/skills/archi-data-sync/SKILL.md +26 -12
  31. package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +137 -208
  32. package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -2
  33. package/dist/templates/en/skills/archi-feature-relations/SKILL.md +6 -2
  34. package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +1 -2
  35. package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -302
  36. package/dist/templates/en/skills/archi-silent-audit/SKILL.md +4 -5
  37. package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +131 -306
  38. package/dist/templates/icon.svg +16 -0
  39. package/dist/templates/zh/briefs/_base.md +17 -10
  40. package/dist/templates/zh/briefs/_modules.md +2 -2
  41. package/dist/templates/zh/docs/global/error_memory.json +40 -0
  42. package/dist/templates/zh/docs/global/map.json +39 -109
  43. package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
  44. package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
  45. package/dist/templates/zh/docs/global/vision.md +1 -1
  46. package/dist/templates/zh/docs/prompts/audit.md +5 -5
  47. package/dist/templates/zh/docs/prompts/code.md +22 -10
  48. package/dist/templates/zh/docs/prompts/edit.md +20 -6
  49. package/dist/templates/zh/docs/prompts/fix.md +10 -1
  50. package/dist/templates/zh/docs/prompts/inherit.md +18 -13
  51. package/dist/templates/zh/docs/prompts/map.md +5 -4
  52. package/dist/templates/zh/docs/prompts/plan.md +11 -5
  53. package/dist/templates/zh/docs/prompts/remove.md +13 -8
  54. package/dist/templates/zh/docs/prompts/revise.md +12 -4
  55. package/dist/templates/zh/docs/prompts/scope.md +4 -3
  56. package/dist/templates/zh/docs/prompts/script.md +102 -0
  57. package/dist/templates/zh/docs/prompts/start.md +19 -15
  58. package/dist/templates/zh/docs/prompts/ui.md +113 -0
  59. package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
  60. package/dist/templates/zh/docs/templates/spec.template.md +1 -1
  61. package/dist/templates/zh/docs/templates/ui.template.md +8 -8
  62. package/dist/templates/zh/rules/00_system.md +243 -49
  63. package/dist/templates/zh/rules/90_custom_rules.md +2 -1
  64. package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
  65. package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -204
  66. package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -2
  67. package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
  68. package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +1 -2
  69. package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -302
  70. package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
  71. package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +131 -306
  72. package/package.json +3 -1
  73. package/dist/templates/en/rules/01_workflow.md +0 -95
  74. package/dist/templates/en/rules/03_data_governance.md +0 -106
  75. package/dist/templates/en/rules/99_context_glue.md +0 -53
  76. package/dist/templates/zh/rules/01_workflow.md +0 -95
  77. package/dist/templates/zh/rules/03_data_governance.md +0 -106
  78. package/dist/templates/zh/rules/99_context_glue.md +0 -53
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: archi-decompose-roadmap
3
- type: subagent
4
- description: Architext task decomposition expert. Five-step method: calibrate project type for infrastructure checklist, extract business Tasks and Infra tasks via dual perspective, identify Polish tasks, route NFR cross-cutting concerns by weight (inject vs. standalone), build dependency chain and output parallel batches. Task type encoded by ID prefix (INF/FEAT/POLISH/EDIT); tag field carries business domain labels. Produces Tier 1 Schema-compliant roadmap.json tasks as input contracts for `/archi.plan`.
3
+ description: Decompose project requirements into roadmap tasks. Use when initializing a project or scoping new features.
5
4
  ---
6
5
 
7
6
  # Roadmap Task Decomposition
@@ -9,299 +8,229 @@ description: Architext task decomposition expert. Five-step method: calibrate pr
9
8
  ## System Flow Context
10
9
 
11
10
  ```
12
- Brief → [This Skill] → roadmap.json tasks
13
-
14
- /archi.plan <task-id>
15
- reads: vision.md + map.json + tech_stack.md
16
- writes: spec.md (behavior spec / acceptance criteria)
17
- ui.md (task UI scope) [?UI]
18
- plan.json (executable steps + test checkboxes)
19
- also updates: map.json / dictionary.json / data_snapshot.json
20
- visual ref: [[__DOCS_DIR__]]/global/ui_context.md [?UI]
21
-
22
- /archi.code → reads spec.md + ui.md + plan.json → writes code
11
+ Brief → [This Skill] → roadmap.json → /archi.plan → spec/ui/plan → /archi.code
23
12
  ```
24
13
 
25
- > **Skill responsibility boundary**:
26
- > - Owns: task what (description), done criteria (goal), dependency chain, design decision injection, Core interface contracts
27
- > - Does NOT own: file paths (map.json), variable naming (dictionary.json), test cases (plan.json), UI component structure (ui.md)
28
- >
29
- > **Schema constraint (Tier 1 Strict)**: roadmap.json validated by CLI Zod Schema. **Adding or removing fields is forbidden.**
14
+ **Skill Boundary**:
15
+ - Owns: task what, done criteria (goal), dependency chain, design decision injection
16
+ - Does NOT own: file paths (map.json), variable naming (dictionary.json), test cases (plan.json), UI structure (ui.md)
17
+
18
+ **Schema Constraint (Tier 1)**: roadmap.json validated by CLI Zod; no add/remove fields.
30
19
 
31
20
  ## Invocation Modes
32
21
 
33
- | Mode | Triggered By | Input | Constraint |
22
+ | Mode | Source | Input | Constraint |
34
23
  |:---|:---|:---|:---|
35
- | From Scratch | `/archi.start` | Brief task list | No EDIT tasks allowed |
36
- | Incremental | `/archi.scope` | Brief + existing Roadmap context | Never modify existing tasks; continue ID watermark |
37
-
38
- ---
24
+ | From Scratch | `/archi.start` | Brief task list | No EDIT tasks |
25
+ | Incremental | `/archi.scope` | Brief + existing Roadmap | Never modify existing; continue ID watermark |
39
26
 
40
27
  ## Decomposition Framework (5 Steps)
41
28
 
42
29
  ### Step 0 · Project Type Calibration
43
30
 
44
- Identify project type from Brief's tech stack / description. Establish standard infrastructure checklist to prevent Step 2 from missing framework-level Infra.
31
+ Identify project type; establish infrastructure checklist to prevent Step 2 omissions.
45
32
 
46
- | Project Type | Scaffold Must Include (beyond common build toolchain) |
33
+ | Project Type | Scaffold Must Include |
47
34
  |:---|:---|
48
- | Web SPA / PWA | Routing skeleton (e.g. React Router) + global App Shell (layout / Provider / theme injection) |
49
- | Full-Stack Web (SSR/SSG) | Routing conventions (loader/action/pages) + API Routes layer + global layout + Auth session management (Cookie/JWT); [?UI] theme injection |
50
- | CLI Tool | Logger module + AppError handling layer + command registration entry |
51
- | API Service (REST / GraphQL) | Router layer + middleware layer + DB connection layer + global error handling; [?GraphQL] Schema definition layer + DataLoader |
52
- | Mobile App (native/cross-platform) | Navigation skeleton (React Navigation / Go Router) + platform adapter (iOS/Android permissions, native modules) + env config (dev/staging/prod) |
53
- | Mini Program | Page routing config + global app.js/ts + request wrapper |
54
- | Browser Extension | manifest.json (V2/V3) + Background Service Worker + Content Script injection + message bus (background ↔ content ↔ popup) + Popup/Options entry |
55
- | Desktop App (standalone) | Main process entry (Electron main / Tauri main.rs) + IPC bridge + system capabilities (tray, hotkey) + native FS wrapper |
56
- | Web + Desktop (Hybrid) | Web scaffold base + desktop runtime (Tauri/Electron) + system capabilities (tray, global hotkey, notifications); **desktop integration must be separate INF subtask** (OS differences, distinct from Web stack) |
57
- | Library / SDK / NPM Package | Dual output (CJS + ESM) + public API entry (barrel index.ts) + type declaration (.d.ts) + Changelog / version toolchain; **no business Tasks, INF only** |
58
- | Real-time / Collaborative App | WebSocket service layer + event Schema (shared types) + room/session management; [?CRDT] conflict resolution |
59
- | AI Agent / MCP Tool | LLM client abstraction (provider-agnostic) + Prompt template management + Tool/Function Calling Schema + conversation state / Memory; [?MCP] MCP protocol adapter |
60
-
61
- **Actions (two outputs)**:
62
- 1. **Inject Step 2 INF-01**: Write scaffold checklist for the project type into INF-01 description.
63
- 2. **Inject Step 1 scenario constraints**: Limit scenario phrasing by project type:
35
+ | Web SPA / PWA | Routing skeleton + App Shell (layout / Provider / theme injection) |
36
+ | Full-Stack Web | Routing conventions + API Routes + global layout + Auth Session; [UI] theme injection |
37
+ | CLI Tool | Logger + AppError + command registration entry |
38
+ | API Service | Router layer + middleware + DB connection + global error handling; [GraphQL] Schema + DataLoader |
39
+ | Mobile App | Navigation skeleton + platform adapter + env config |
40
+ | Mini Program | Page routing config + app.js/ts + request wrapper |
41
+ | Browser Extension | manifest + Background SW + Content Script + message bus |
42
+ | Desktop App | Main process entry + IPC bridge + system capabilities |
43
+ | Web + Desktop (Hybrid) | Web base + desktop runtime; **desktop integration as separate INF subtask** (OS differences) |
44
+ | Library / SDK | Dual output (CJS+ESM) + barrel index + types + Changelog; **no business Tasks** |
45
+ | Real-time / Collaborative | WebSocket layer + event Schema + room management; [CRDT] conflict resolution |
46
+ | AI Agent / MCP | LLM abstraction + Prompt templates + Tool Schema + Memory; [MCP] MCP adapter |
47
+
48
+ **Actions**:
49
+ 1. Write scaffold checklist into INF-01 description
50
+ 2. Limit Step 1 scenario phrasing by project type:
64
51
 
65
52
  | Project Type | Scenario Template | Forbidden Terms |
66
53
  |:---|:---|:---|
67
- | CLI Tool | `User can [run command/args] → [terminal output]` | page, route, component, UI |
54
+ | CLI | `User can [run command/args] → [terminal output]` | page, route, component, UI |
68
55
  | Library / SDK | `Caller can [invoke API X] → [return Y]` | user, interface, interaction |
69
- | API Service | `Client can [HTTP METHOD /path] → [response structure]` | frontend, page, component |
70
- | Mini Program | `User can [page name] [action] → [visible result in WeChat]` | backend route, REST |
71
- | Web SPA / Full-Stack / Mobile / Desktop | `User can [action] → [perceivable result]` | (no special limit) |
72
-
73
- ---
56
+ | API Service | `Client can [HTTP METHOD /path] → [response]` | frontend, page, component |
57
+ | Mini Program | `User can [page name] [action] → [visible result]` | backend route, REST |
58
+ | Web/Mobile/Desktop | `User can [action] → [perceivable result]` | |
74
59
 
75
60
  ### Step 1 · PM Perspective → Business Tasks
76
61
 
77
- Extract user scenarios from Brief, aggregate into business Tasks.
78
-
79
- 1. Convert each feature into scenario: `User can [action] → [perceivable result]`
80
- 2. Scenarios sharing the same core flow → merge into one business Task
81
- > **Note**: "Shared domain/theme" ≠ "Shared core flow". Scenarios in the same domain (e.g. "community interaction") but with distinct UI areas and implementation domains must be split per signals below; do not merge by theme alone. "Shared core flow" means: same UI view, same data entity, same state flow.
82
- 3. Granularity calibration (core rule: **one task = one `/archi.plan` session = one `tasks/<slug>/` subdir**):
62
+ Extract scenarios from Brief; convert to pattern: `User can [action] → [perceivable result]`
83
63
 
84
- **Behavior perspective (PM)**:
64
+ **Merge Condition**: Share same core flow (same UI view, same data entity, shared state flow)
65
+ > "Shared domain/theme" ≠ "Shared core flow". Same domain but distinct UI/implementation domains → split.
85
66
 
86
- | Signal | Action |
87
- |:---|:---|
88
- | Description contains "and" (two independent concerns) | Split |
89
- | DoD has > 4 acceptance criteria | Split |
90
- | Task spans > 3 independent UI areas or implementation domains | Split |
91
- | Single spec.md cannot fully describe behavior in one `/archi.plan` | Split |
92
- | Two tasks have >50% file overlap | Merge |
93
-
94
- > **Note**: If "B only makes sense after A", that is a dependency — **do not merge**; declare `deps: [A]` for B in Step 4.
95
-
96
- **Implementation perspective (Engineering, independent of behavior; either triggers split)**:
67
+ **Split Signals**:
68
+ | Signal | Action |
69
+ |:---|:---|
70
+ | Description contains "and" (two independent concerns) | Split |
71
+ | DoD has > 4 acceptance criteria | Split |
72
+ | Spans > 3 independent UI areas or implementation domains | Split |
73
+ | Single spec.md cannot describe in one `/archi.plan` | Split |
74
+ | Two tasks have >50% file overlap | Merge |
97
75
 
98
- | Signal | Action | Example |
99
- |:---|:---|:---|
100
- | Task contains ≥2 **implementation domains**, each independently unit-testable | Split | Pure compute layer + UI render layer → separate |
101
- | Implementation requires ≥3 independent technical concerns | Split | Character rendering + state machine + animation API → three things |
102
- | One concern has independent boundary complexity (IME, Canvas, third-party chart API) | Extract that concern | Input capture + IME as separate task |
76
+ > If "A must complete before B makes sense", that's dependency; **do not merge**; declare `deps: [A]` for B in Step 4.
103
77
 
104
- > **Why engineering perspective**: Behavior describes "what user sees"; engineering describes "what AI must grasp when implementing". A task can be behaviorally cohesive (same page) but span multiple domains; AI in `/archi.code` will lose focus with too-wide context.
78
+ **Dual-Perspective Judgment** (independent; either triggers split):
105
79
 
106
- **Granularity cap**:
80
+ | Perspective | Signal | Action | Example |
81
+ |:---|:---|:---|:---|
82
+ | Behavior (PM) | Description contains "and", DoD >4 items, spans 3+ UI areas | Split | User management + Order management → separate |
83
+ | Engineering | Task contains ≥2 **implementation domains**, each independently testable | Split | Pure compute layer + UI render layer → separate |
84
+ | Engineering | Implementation requires ≥3 independent technical concerns | Split | Char rendering + State machine + Animation API → three things |
85
+ | Engineering | One concern has independent boundary complexity | Extract that concern | Input capture + IME as separate task |
107
86
 
108
- > A Roadmap Task = the smallest functional unit that **AI can produce a cohesive spec.md without further decomposition** (HTN Primitive executability).
87
+ > Behavior describes "what user sees"; Engineering describes "what AI must grasp when implementing". A task behaviorally cohesive but spanning multiple domains will cause AI to lose focus in `/archi.code`.
109
88
 
110
- *Proxy metrics at decomposition (judge directly from Brief)*:
89
+ **Granularity Cap**:
111
90
 
112
- | Proxy Metric | Cap | Action if exceeded |
113
- |:---|:---|:---|
114
- | Independent user operation flows in task description | ≤ 3 | Split |
115
- | Independent data entities (each with own state flow) | ≤ 2 | Split |
116
- | "and/or/and also" connecting independent concerns | ≤ 1 | Split |
117
- | Task cannot be validated without running another business Task | — | Check coupling, redraw interface boundary (INVEST-I) |
91
+ > Roadmap Task = **smallest functional unit that AI can produce a cohesive spec.md without further decomposition** (HTN Primitive executability).
118
92
 
119
- > If `/archi.plan` estimates spec.md Scenario > 6 or plan.json Phase > 4, pause and prompt user to return to `/archi.scope` for re-split; do not force into a single task.
93
+ | Proxy Metric | Cap | Action if exceeded |
94
+ |:---|:---|:---|
95
+ | Independent user operation flows | ≤ 3 | Split |
96
+ | Independent data entities (each with state flow) | ≤ 2 | Split |
97
+ | "and/or/and also" connecting concerns | ≤ 1 | Split |
98
+ | Cannot validate without running another business Task | — | Check coupling, redraw interface boundary (INVEST-I) |
120
99
 
121
- **DoD format** (by task type):
100
+ > If `/archi.plan` estimates spec.md Scenario > 6 or plan.json Phase > 4, pause and prompt to return to `/archi.scope` for re-split.
122
101
 
123
- | Task Type | goal format |
102
+ **DoD Format**:
103
+ | Type | Format |
124
104
  |:---|:---|
125
- | `FEAT-xx` | `When done, user can <verifiable user behavior>; boundary: <explicitly out of scope>` |
126
- | `INF-xx` | `When done, <infrastructure deliverable description>, verified by <verification command>; boundary: <explicitly out of scope>` |
127
- | `POLISH-xx` | `When done, <quality metric> improves from <baseline> to <target>; boundary: <explicitly out of scope>` |
105
+ | `FEAT-xx` | `When done, user can <verifiable behavior>; boundary: <out of scope>` |
106
+ | `INF-xx` | `When done, <deliverable>, verified by <command>; boundary: <out of scope>` |
107
+ | `POLISH-xx` | `When done, <metric> improves from <baseline> to <target>; boundary: <out of scope>` |
128
108
 
129
- > DoD is the basis for `/archi.plan` to generate spec.md acceptance criteria and plan.json test cases. FEAT must describe user-perceivable results; INF must describe infrastructure deliverables and verification; POLISH must describe quantifiable quality targets. Do not write implementation details (file paths, function names, test commands decided at plan stage).
109
+ > DoD is basis for `/archi.plan` to generate spec.md acceptance criteria and plan.json test cases. Do not write implementation details (file paths, function names decided at plan stage).
130
110
 
131
- Belong to parent task, do not make standalone: **lightweight** result page / completion page, empty state page, confirmation modal.
132
-
133
- > **Exception**: Result page with independent data viz (chart lib), complex animation logic, or independent business logic → must be standalone business Task.
134
-
135
- ---
111
+ Exempt (belong to parent): lightweight result/completion/empty pages, confirmation modals (without independent data viz or complex animation)
112
+ > **Exception**: Result page with independent data visualization (chart lib), complex animation logic, or independent business logic → standalone Task.
136
113
 
137
114
  ### Step 2 · Architect Perspective → Infra Tasks
138
115
 
139
- Derive shared foundations from business Tasks; no preset infrastructure.
140
-
141
- For each business Task ask: multiple Tasks depend on X and X must exist before Task → X is Infra task.
116
+ Derive shared foundations: multiple Tasks depend on X and X must exist before Task → X is Infra.
142
117
 
143
118
  | Infra Type | Criteria |
144
119
  |:---|:---|
145
- | Project scaffold / global Schema / type definitions | All business Tasks depend; must cover Step 0 project type checklist |
146
- | Shared core engine (typing engine, rule engine, etc.) | Either: ① 2 business Tasks directly call; ② pure logic layer, independently unit-testable, fully decoupled from UI. Use `INF-xx` ID (infrastructure by nature), `tag` can label domain (e.g. `Core`, `Engine`) |
147
- | Third-party integration layer | Multiple business Tasks reuse same external service |
148
-
149
- **Shared engine planning contract**: Shared core engine INF tasks must declare main export interfaces (function signatures or key interface names) at end of `description`.
150
- Downstream `/archi.plan` sessions can align to that interface without reading upstream implementation.
120
+ | Project scaffold / global Schema | All business Tasks depend; must cover Step 0 checklist |
121
+ | Shared core engine | Either: ① 2+ business Tasks directly call; ② pure logic, independently testable, UI-decoupled. `tag` can label `Core`/`Engine` |
122
+ | Third-party integration | Multiple business Tasks reuse same external service |
151
123
 
152
- **Infra task granularity: avoid over-fragmentation, forbid cross-layer stacking**:
124
+ **Shared Engine Planning Contract**: Shared core engine INF tasks must declare main export interfaces (function signatures or key interface names) at end of `description`. Downstream `/archi.plan` can align to that interface without reading upstream implementation.
153
125
 
154
- - **No over-fragmentation**: Same-layer config items with no substantive technical difference (ESLint + Prettier + TypeScript strict + commitlint) → merge.
155
- - **No cross-layer stacking**: Each architecture layer has distinct implementation details; merging blurs AI context; stacking layers into one INF task lengthens critical path and delays all business Tasks.
126
+ **Infra Task Granularity: avoid over-fragmentation, forbid cross-layer stacking**:
127
+ - **No over-fragmentation**: Same-layer configs (ESLint + Prettier + TS strict) merge
128
+ - **No cross-layer stacking**: Each layer as separate task; cross-layer stacking lengthens critical path and delays business Tasks
156
129
 
157
- > **Architecture layer reference** (each has independent implementation boundary; in principle each as separate task):
158
- > Project scaffold (build / code quality toolchain) | Data layer (DB connection / ORM / migrations) | Auth layer (Auth middleware / Session / JWT) | API router layer (route registration / middleware chain / global error handling) | Frontend infrastructure (theme / Design Token / global layout) | Third-party service integration (each service as separate INF task)
130
+ > **Architecture Layer Reference** (each independent boundary): Project scaffold | Data layer | Auth layer | API router layer | Frontend infrastructure | Third-party integration
159
131
 
160
132
  | Signal | Action |
161
133
  |:---|:---|
162
- | Related config items within same architecture layer | Merge |
163
- | Spans independent architecture layers (e.g. DB connection + Auth middleware) | Split |
164
- | Completely different tech stacks (e.g. local storage vs theme config) | Split |
165
- | Involves OS-level system API (tray, global hotkey, file association) | **Force split** (Step 0 rule, overrides "same-layer merge") |
166
- | Infra deliverable directly called by ≥2 business Tasks (interface-type) | Standalone task (must declare export interface contract) |
167
-
168
- **Implicit standard feature scan** (often absent from Brief; must proactively add):
134
+ | Related config items within same layer | Merge |
135
+ | Spans independent layers (e.g. DB + Auth) | Split |
136
+ | Completely different tech stacks | Split |
137
+ | Involves OS-level API (tray, hotkey) | **Force split** (Step 0 rule) |
138
+ | Deliverable directly called by ≥2 business Tasks | Standalone (must declare export interface) |
169
139
 
170
- *Add as standalone business Task (Phase 2, user-visible behavior)*:
171
-
172
- | Check | Trigger |
173
- |:---|:---|
174
- | User Profile / account settings page | Project has Auth (INF layer has auth middleware) |
175
- | Account security / password settings page | Has Auth and user can change password or bind third-party account |
176
- | Notification center / message list page | Has notification infra and notifications have read/unread state |
177
-
178
- *Add as INF task (Phase 1, infrastructure)*:
179
-
180
- | Check | Trigger |
181
- |:---|:---|
182
- | Notification infrastructure (server push / message queue) | ≥1 Task mentions "notification/reminder" but no INF Task |
183
- | Search infrastructure (PG FTS index / external engine) | ≥2 business Tasks describe "search"; decide approach here, downstream Tasks depend |
184
- | Permission / role management (RBAC) | Has Auth and ≥2 user roles (e.g. admin / user) |
185
- | File storage integration (S3 / OSS wrapper) | ≥1 Task involves file upload / download / preview |
186
- | Email / SMS sending integration | Task mentions "send email / verification code / SMS" |
187
- | Payment integration | Task mentions "payment / order / checkout / refund" |
140
+ **Implicit Standard Feature Scan** (often absent from Brief; proactively add):
188
141
 
189
- ---
142
+ | Check | Trigger | Assignment |
143
+ |:---|:---|:---|
144
+ | User Profile / account settings page | Has Auth | FEAT-xx (Phase 2) |
145
+ | Account security / password settings | Has Auth and can change password/bind third-party | FEAT-xx (Phase 2) |
146
+ | Notification center / message list | Has notification infra and read/unread state | FEAT-xx (Phase 2) |
147
+ | Notification infrastructure | Task mentions "notification" but no INF | INF-xx (Phase 1) |
148
+ | Search infrastructure | 2+ business Tasks describe "search" | INF-xx (Phase 1) |
149
+ | RBAC permission management | Has Auth and 2+ roles | INF-xx (Phase 1) |
150
+ | File storage (S3/OSS) | Task involves file upload/download/preview | INF-xx (Phase 1) |
151
+ | Email/SMS/payment integration | Task mentions corresponding feature | INF-xx (Phase 1) |
190
152
 
191
- ### Step 3 · NFR Filtering and Polish Task Identification
153
+ ### Step 3 · NFR Filtering and Polish Identification
192
154
 
193
- Route cross-cutting concerns by **effort weight**: lightweight → inject into goal; heavyweight → standalone `POLISH-xx` task.
155
+ Route by effort weight.
194
156
 
195
- > **"First task" definition** (for NFR injection): In dependency chain, task whose `deps` only include INF layer (no business pre-deps) and earliest to involve that NFR. If multiple candidates in same Batch, take smallest ID.
157
+ > **"First task" definition** (for NFR injection): In dependency chain, task whose `deps` only include INF layer (no business pre-deps) and earliest to involve that NFR. If multiple candidates in same layer, take smallest ID.
196
158
 
197
159
  **Criteria**:
198
-
199
160
  | Signal | Action |
200
161
  |:---|:---|
201
- | Only needs "do in passing" within business Task (e.g. use i18n key instead of hardcode) | **NFR inject** — append to first related task goal: `[NFR] <description>` |
202
- | Needs standalone infrastructure (e.g. integrate next-intl, create translation file structure) | **INF task** — create `INF-xx`, Phase 1 |
203
- | Needs cross-feature dedicated work, acceptance independently measurable (e.g. Lighthouse ≥ 90, full a11y audit) | **POLISH task** — create `POLISH-xx`, Phase 3 |
204
-
205
- **By type**:
162
+ | Only needs "do in passing" (e.g. use i18n key) | **NFR inject** — append to first task goal: `[NFR] <description>` |
163
+ | Needs standalone infrastructure (e.g. integrate i18n framework) | **INF task** — Phase 1 |
164
+ | Independently measurable (e.g. Lighthouse ≥ 90) | **POLISH task** — Phase 3 |
206
165
 
207
166
  | Type | Lightweight → NFR inject | Heavyweight → Standalone |
208
167
  |:---|:---|:---|
209
- | Internationalization | Use i18n key within business Task | Integrate i18n framework + translation file structure → `INF-xx`; full translation coverage + language switch UI → `POLISH-xx` |
168
+ | Internationalization | Use i18n key within business Task | Integrate framework → `INF-xx`; full translation → `POLISH-xx` |
210
169
  | Visual theme (config) | Brand color Token into scaffold | — |
211
- | Visual theme (functional) | — | Dark/light toggle + OS preference detection → `FEAT-xx` (user-visible behavior) |
170
+ | Visual theme (functional) | — | Dark/light toggle + OS preference detection → `FEAT-xx` |
212
171
  | Animation style | Transition duration into first Task with animation | — |
213
- | Performance optimization | Lazy load / cache within single Task | Cross-feature optimization (LCP < 2s, bundle size target) → `POLISH-xx` |
214
- | Accessibility | ARIA attributes within single Task | Full a11y audit + fixes → `POLISH-xx` |
215
- | Packaging / distribution | — | Desktop packaging + auto-update config → `POLISH-xx` |
216
-
217
- ---
172
+ | Performance optimization | Lazy load / cache within single Task | LCP < 2s, bundle size → `POLISH-xx` |
173
+ | Accessibility | ARIA attributes within single Task | Full a11y audit → `POLISH-xx` |
174
+ | Packaging / distribution | — | Desktop packaging + auto-update → `POLISH-xx` |
218
175
 
219
176
  ### Step 4 · Dependencies and Parallel Optimization
220
177
 
221
- - **Real dependency chain**: Forbid all business Tasks depending only on `INF-01`; reflect real business relationships.
222
- - **Business entity dependency (overrides minimal deps)**: If feature B's core subject is produced by feature A (B's data entity does not exist before A), B must declare dep on A. Example: Usage Log records Prompt; Prompt created by FEAT-Prompt_Create → Usage Log Task must depend on Prompt Task, not just INF layer.
223
- - **Minimal dependency principle**: Do not add unnecessary deps; maximize Batch parallelism.
224
-
225
- ---
178
+ - **Real dependency chain**: forbid all business Tasks only on `INF-01`; reflect real business relationships
179
+ - **Business entity dependency (overrides minimal deps)**: If B's core subject produced by A, B depends on A. Example: Usage Log records Prompt; Prompt created by FEAT-Prompt_Create → Usage Log Task depends on Prompt Task
180
+ - **Minimal dependency**: no unnecessary deps; maximize parallelism
226
181
 
227
182
  ## Task Rules
228
183
 
229
- 1. **ID prefix and task type**:
230
-
231
- ID prefix is the **sole identifier** of task type; `/archi.plan` selects spec acceptance format by prefix.
232
-
233
- | ID Prefix | Task Type | Meaning | Phase |
234
- |:---|:---|:---|:---|
235
- | `INF-xx` | Infrastructure | Scaffold, Schema, toolchain, third-party integration | Phase 1 |
236
- | `FEAT-xx` | Feature | Business functionality: user-perceivable behavior | Phase 2 |
237
- | `POLISH-xx` | Quality | Performance, full i18n, a11y audit, packaging | Phase 3 |
238
- | `EDIT-xx` | Edit | Modify existing functionality (incremental mode only) | Same Phase as modified task |
239
-
240
- Continue ID watermark from max per prefix + 1; new project starts from `INF-01` / `FEAT-01`.
184
+ 1. **ID Prefixes**: `INF-xx` (infrastructure) | `FEAT-xx` (business feature) | `POLISH-xx` (quality polish) | `EDIT-xx` (edit, incremental only)
241
185
 
242
- 2. **Phase structure**:
243
-
244
- | Phase | ID | Name | Content |
245
- |:---|:---|:---|:---|
246
- | Phase 1 | `phase-infra` | Infrastructure | INF-xx tasks (scaffold, data layer, auth, API skeleton) |
247
- | Phase 2 | `phase-core` | Core Features | FEAT-xx tasks (business features) |
248
- | Phase 3 | `phase-polish` | Polish & Launch | POLISH-xx tasks (quality, packaging); omit if Brief has no polish needs |
249
-
250
- 3. **tag field = business domain label**:
251
-
252
- `tag` labels the **business domain** (e.g. `Core`, `Community`, `Auth`, `Data`), free text, determined by Brief.
253
-
254
- > **Note**: `tag` does NOT determine task type — task type is determined by ID prefix. E.g. `FEAT-05` (`tag: Community`) has task type Feature, not Community.
186
+ 2. **Phase Structure**:
187
+ | Phase | ID | Content |
188
+ |:---|:---|:---|
189
+ | Phase 1 | `phase-infra` | INF-xx (scaffold, data layer, auth, API skeleton) |
190
+ | Phase 2 | `phase-core` | FEAT-xx (business features) |
191
+ | Phase 3 | `phase-polish` | POLISH-xx (quality optimization); omit if Brief has no polish needs |
255
192
 
256
- 4. **Design decision injection**: Brief design decisions → inject into task `goal` end: `[User Preset] <content>`; do not repeat same decision across tasks. `/archi.plan` treats as hard constraint, writes into spec.md without asking.
193
+ 3. **tag field**: business domain label (e.g. Core, Auth, Data); does NOT determine task type
257
194
 
258
- 5. **EDIT tasks**: Modify existing functionality create `EDIT-xxx`, goal states scope; incremental mode only.
195
+ 4. **Design decision injection**: Brief decisionsinject into task goal end: `[User Preset] <content>`; do not repeat same decision across tasks
259
196
 
260
- 6. **Slug naming**: `slug` = `tasks/<slug>/` folder name, must clearly express task content, format `Pascal_Snake_Case` (e.g. `Typing_Engine_Core`). One task per subdir, no duplicates.
197
+ 5. **Slug**: `Pascal_Snake_Case`, maps to `tasks/<slug>/` folder
261
198
 
262
- ---
263
-
264
- ## Task JSON Schema (Tier 1 Strict, no add/remove fields)
199
+ ## Task JSON Schema (Tier 1, no add/remove fields)
265
200
 
266
201
  ```json
267
202
  {
268
203
  "id": "FEAT-01",
269
- "title": "Task Title In English",
204
+ "title": "Task Title",
270
205
  "status": "pending | blocked",
271
- "description": "<1-2 sentences on what this task builds and scope. Shared engine tasks must declare main export interfaces at end>",
272
- "goal": "When done, user can <verifiable user behavior>; boundary: <explicitly out of scope>",
206
+ "description": "1-2 sentences. Shared engine tasks must declare main exports at end",
207
+ "goal": "When done, user can <behavior>; boundary: <out of scope>",
273
208
  "deps": ["INF-01"],
274
- "tag": "<business domain label, free text. e.g. Core, Community, Auth, Data, UI>",
275
- "slug": "Task_Title_Snake_Case"
209
+ "tag": "business domain label",
210
+ "slug": "Task_Slug"
276
211
  }
277
212
  ```
278
213
 
279
- `deps` empty or all `done` → `pending`; has incomplete deps → `blocked`
280
-
281
- ---
214
+ `deps` all `done` → `pending`; has incomplete `deps` → `blocked`
282
215
 
283
- ## Intermediate Outputs
216
+ ## Output Verification
284
217
 
285
- > This Skill is a subroutine: after producing structured data, control returns to caller.
286
- > - `/archi.scope` → caller shows user for confirmation, writes to `roadmap.json` on OK
287
- > - `/archi.start` → caller writes directly to `roadmap.json`
218
+ `global/roadmap.json` generated with valid `phases` array
288
219
 
289
- Three outputs:
220
+ ## Outputs
290
221
 
291
- **① Task data** (directly maps to `roadmap.json` phases/tasks structure; each task follows Task JSON Schema above; phases ordered `phase-infra` → `phase-core` → `phase-polish`):
222
+ **① Task Data**: `roadmap.json` `phases[].tasks[]` structure
292
223
 
293
- **② NFR merge list** (return with task data; caller appends as `nfr` top-level field; `/archi.plan` step_1_load must read):
294
-
295
- | NFR Name | Inject Task ID | Constraint Summary | Affected (other task IDs) |
224
+ **② NFR Merge List** (roadmap `nfr` top-level field):
225
+ | NFR | Inject Task | Constraint Summary | Affected |
296
226
  |:---|:---|:---|:---|
297
- | (example) i18n | FEAT-01 | All copy via i18n key, no hardcoded strings | FEAT-02, FEAT-03 |
298
-
299
- **③ Parallel execution batches** (DAG layer diagram; same Layer can run in parallel):
227
+ | i18n | FEAT-01 | All copy via i18n key | FEAT-02, FEAT-03 |
300
228
 
229
+ **③ Parallel Batches** (DAG topological layers):
301
230
  ```
302
231
  Layer 0 ║ INF-01
303
- Layer 1 ║ INF-02 · INF-03 ← both depend on INF-01
304
- Layer 2 ║ FEAT-01 · FEAT-02 ← each depends on INF-02 / INF-03
305
- Layer 3 ║ FEAT-03 ← depends on FEAT-01
306
- Layer 4 ║ POLISH-01 · POLISH-02 ← depend on related FEAT tasks
232
+ Layer 1 ║ INF-02 · INF-03
233
+ Layer 2 ║ FEAT-01 · FEAT-02
234
+ Layer 3 ║ FEAT-03
235
+ Layer 4 ║ POLISH-01 · POLISH-02
307
236
  ```
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: archi-design-patterns
3
- type: specialist
4
- description: Architext technical design structured pattern library. Defines standard formats and self-check lists for four core mechanism description patterns (State Machine / Pipeline / Decision Matrix / Protocol). Referenced by /archi.plan step_4 when generating design.md § 2, and by /archi.code step_5 when auditing implementation vs. design consistency.
3
+ description: Apply structured design patterns for technical solutions. Use when writing design documents or reviewing implementation consistency.
5
4
  ---
6
5
 
7
6
  # Technical Design Structured Pattern Library
@@ -138,3 +137,8 @@ Select ≥1 pattern per mechanism characteristic. Same feature may combine multi
138
137
  ---
139
138
 
140
139
  > **Intermediate output**: This Skill is a subroutine; after producing mechanism description + self-check results, control returns to caller (step_4_generate or step_5_audit) to continue.
140
+
141
+ ## Output Verification
142
+
143
+ □ `design.md` § 2 Core Mechanisms populated with selected pattern(s)
144
+ □ Self-check list all passed for each pattern
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: archi-feature-relations
3
- type: reviewer
4
- description: featureRelations linkage handler. In isolated context, handles map.json featureRelations register/check/cleanup, ensures aggregator Tasks maintain correct linkage with their sources.
3
+ description: Manage feature relations linkage in map.json. **Must run in isolated context/subagent.** Use when creating aggregator tasks or verifying task dependencies.
5
4
  ---
6
5
 
7
6
  # featureRelations Linkage Handler
@@ -116,3 +115,8 @@ IMPACT: [impact description]
116
115
  ---
117
116
 
118
117
  > **Intermediate output**: This Skill is a review subprogram; after producing result, control returns to caller.
118
+
119
+ ## Output Verification
120
+
121
+ □ `map.json` `featureRelations` array updated (register/cleanup mode)
122
+ □ Linkage check results output (check mode)
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: archi-interview-protocol
3
- type: specialist
4
- description: Architext supplementary interview protocol. Standardizes how to ask about information gaps: multiple-choice first, AI recommendation + [Recommended] marking, [Z] Custom fallback, complete AI+/AI- analysis, option descriptions state concrete behavior. Produces standard Q-table and INPUT prompt line, referenced by /archi.start, /archi.scope, and /archi.plan supplementary confirmation steps.
3
+ description: Conduct structured interviews to fill information gaps. Use when requirements are unclear or need user clarification.
5
4
  ---
6
5
 
7
6
  # Supplementary Interview Protocol