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.
Files changed (84) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/README.md +93 -14
  3. package/README.zh-CN.md +92 -14
  4. package/dist/index.js +53 -39
  5. package/dist/templates/en/briefs/_base.md +53 -13
  6. package/dist/templates/en/briefs/_modules.md +31 -4
  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 +80 -94
  13. package/dist/templates/en/docs/prompts/code.md +99 -89
  14. package/dist/templates/en/docs/prompts/edit.md +61 -51
  15. package/dist/templates/en/docs/prompts/fix.md +59 -43
  16. package/dist/templates/en/docs/prompts/help.md +23 -31
  17. package/dist/templates/en/docs/prompts/inherit.md +97 -117
  18. package/dist/templates/en/docs/prompts/map.md +48 -69
  19. package/dist/templates/en/docs/prompts/plan.md +141 -240
  20. package/dist/templates/en/docs/prompts/recover.md +19 -34
  21. package/dist/templates/en/docs/prompts/ref.md +43 -138
  22. package/dist/templates/en/docs/prompts/remove.md +63 -110
  23. package/dist/templates/en/docs/prompts/revise.md +71 -106
  24. package/dist/templates/en/docs/prompts/scope.md +78 -117
  25. package/dist/templates/en/docs/prompts/script.md +102 -0
  26. package/dist/templates/en/docs/prompts/start.md +98 -132
  27. package/dist/templates/en/docs/prompts/ui.md +113 -0
  28. package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
  29. package/dist/templates/en/docs/templates/spec.template.md +1 -1
  30. package/dist/templates/en/docs/templates/ui.template.md +8 -8
  31. package/dist/templates/en/rules/00_system.md +268 -117
  32. package/dist/templates/en/rules/90_custom_rules.md +3 -1
  33. package/dist/templates/en/skills/archi-data-sync/SKILL.md +37 -23
  34. package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +138 -240
  35. package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -1
  36. package/dist/templates/en/skills/archi-feature-relations/SKILL.md +10 -6
  37. package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -2
  38. package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -301
  39. package/dist/templates/en/skills/archi-silent-audit/SKILL.md +24 -25
  40. package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +175 -305
  41. package/dist/templates/icon.svg +16 -0
  42. package/dist/templates/zh/briefs/_base.md +56 -17
  43. package/dist/templates/zh/briefs/_modules.md +28 -1
  44. package/dist/templates/zh/docs/global/error_memory.json +40 -0
  45. package/dist/templates/zh/docs/global/map.json +39 -109
  46. package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
  47. package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
  48. package/dist/templates/zh/docs/global/vision.md +1 -1
  49. package/dist/templates/zh/docs/prompts/audit.md +43 -57
  50. package/dist/templates/zh/docs/prompts/code.md +66 -56
  51. package/dist/templates/zh/docs/prompts/edit.md +52 -42
  52. package/dist/templates/zh/docs/prompts/fix.md +39 -29
  53. package/dist/templates/zh/docs/prompts/help.md +13 -21
  54. package/dist/templates/zh/docs/prompts/inherit.md +67 -86
  55. package/dist/templates/zh/docs/prompts/map.md +28 -50
  56. package/dist/templates/zh/docs/prompts/plan.md +100 -199
  57. package/dist/templates/zh/docs/prompts/recover.md +9 -24
  58. package/dist/templates/zh/docs/prompts/ref.md +11 -106
  59. package/dist/templates/zh/docs/prompts/remove.md +39 -74
  60. package/dist/templates/zh/docs/prompts/revise.md +47 -88
  61. package/dist/templates/zh/docs/prompts/scope.md +52 -91
  62. package/dist/templates/zh/docs/prompts/script.md +102 -0
  63. package/dist/templates/zh/docs/prompts/start.md +75 -110
  64. package/dist/templates/zh/docs/prompts/ui.md +113 -0
  65. package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
  66. package/dist/templates/zh/docs/templates/spec.template.md +1 -1
  67. package/dist/templates/zh/docs/templates/ui.template.md +8 -8
  68. package/dist/templates/zh/rules/00_system.md +252 -131
  69. package/dist/templates/zh/rules/90_custom_rules.md +2 -1
  70. package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
  71. package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -235
  72. package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -1
  73. package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
  74. package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -2
  75. package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -301
  76. package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
  77. package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +174 -301
  78. package/package.json +3 -1
  79. package/dist/templates/en/rules/01_workflow.md +0 -93
  80. package/dist/templates/en/rules/03_data_governance.md +0 -102
  81. package/dist/templates/en/rules/99_context_glue.md +0 -53
  82. package/dist/templates/zh/rules/01_workflow.md +0 -94
  83. package/dist/templates/zh/rules/03_data_governance.md +0 -133
  84. package/dist/templates/zh/rules/99_context_glue.md +0 -53
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: archi-decompose-roadmap
3
- 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.
4
4
  ---
5
5
 
6
6
  # Roadmap Task Decomposition
@@ -8,331 +8,229 @@ description: Architext task decomposition expert. Five-step method: calibrate pr
8
8
  ## System Flow Context
9
9
 
10
10
  ```
11
- Brief → [This Skill] → roadmap.json tasks
12
-
13
- /archi.plan <task-id>
14
- reads: vision.md + map.json + tech_stack.md
15
- writes: spec.md (behavior spec / acceptance criteria)
16
- ui.md (task UI scope) [?UI]
17
- plan.json (executable steps + test checkboxes)
18
- also updates: map.json / dictionary.json / data_snapshot.json
19
- visual ref: [[__DOCS_DIR__]]/global/ui_context.md [?UI]
20
-
21
- /archi.code → reads spec.md + ui.md + plan.json → writes code
11
+ Brief → [This Skill] → roadmap.json → /archi.plan → spec/ui/plan → /archi.code
22
12
  ```
23
13
 
24
- > **Skill responsibility boundary**:
25
- > - Owns: task what (description), done criteria (goal), dependency chain, design decision injection, Core interface contracts
26
- > - Does NOT own: file paths (map.json), variable naming (dictionary.json), test cases (plan.json), UI component structure (ui.md)
27
- >
28
- > **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)
29
17
 
30
- ## Invocation Mode
18
+ **Schema Constraint (Tier 1)**: roadmap.json validated by CLI Zod; no add/remove fields.
31
19
 
32
- | Mode | Triggered By | Input | Constraint |
33
- |:---|:---|:---|:---|
34
- | From Scratch | `/archi.start` | Brief task list | No EDIT tasks allowed |
35
- | Incremental | `/archi.scope` | Brief + existing Roadmap context | Never modify existing tasks; continue ID watermark |
20
+ ## Invocation Modes
36
21
 
37
- ---
22
+ | Mode | Source | Input | Constraint |
23
+ |:---|:---|:---|:---|
24
+ | From Scratch | `/archi.start` | Brief task list | No EDIT tasks |
25
+ | Incremental | `/archi.scope` | Brief + existing Roadmap | Never modify existing; continue ID watermark |
38
26
 
39
27
  ## Decomposition Framework (5 Steps)
40
28
 
41
29
  ### Step 0 · Project Type Calibration
42
30
 
43
- 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.
44
32
 
45
- | Project Type | Scaffold Must Include (beyond common build toolchain) |
33
+ | Project Type | Scaffold Must Include |
46
34
  |:---|:---|
47
- | Web SPA / PWA | Routing skeleton (e.g. React Router) + global App Shell (layout / Provider / theme injection) |
48
- | Full-Stack Web (SSR/SSG) | Routing conventions (loader/action/pages) + API Routes layer + global layout + Auth session management (Cookie/JWT); [?UI] theme injection |
49
- | CLI Tool | Logger module + AppError handling layer + command registration entry |
50
- | API Service (REST / GraphQL) | Router layer + middleware layer + DB connection layer + global error handling; [?GraphQL] Schema definition layer + DataLoader |
51
- | Mobile App (native/cross-platform) | Navigation skeleton (React Navigation / Go Router) + platform adapter (iOS/Android permissions, native modules) + env config (dev/staging/prod) |
52
- | Mini Program | Page routing config + global app.js/ts + request wrapper |
53
- | Browser Extension | manifest.json (V2/V3) + Background Service Worker + Content Script injection + message bus (background ↔ content ↔ popup) + Popup/Options entry |
54
- | Desktop App (standalone) | Main process entry (Electron main / Tauri main.rs) + IPC bridge + system capabilities (tray, hotkey) + native FS wrapper |
55
- | 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) |
56
- | 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** |
57
- | Real-time / Collaborative App | WebSocket service layer + event Schema (shared types) + room/session management; [?CRDT] conflict resolution |
58
- | AI Agent / MCP Tool | LLM client abstraction (provider-agnostic) + Prompt template management + Tool/Function Calling Schema + conversation state / Memory; [?MCP] MCP protocol adapter |
59
-
60
- **Actions (two outputs)**:
61
- 1. **Inject Step 2 INF-01**: Write scaffold checklist for the project type into INF-01 description.
62
- 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:
63
51
 
64
52
  | Project Type | Scenario Template | Forbidden Terms |
65
53
  |:---|:---|:---|
66
- | 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 |
67
55
  | Library / SDK | `Caller can [invoke API X] → [return Y]` | user, interface, interaction |
68
- | API Service | `Client can [HTTP METHOD /path] → [response structure]` | frontend, page, component |
69
- | Mini Program | `User can [page name] [action] → [visible result in WeChat]` | backend route, REST |
70
- | Web SPA / Full-Stack / Mobile / Desktop | `User can [action] → [perceivable result]` | (no special limit) |
71
-
72
- ---
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]` | |
73
59
 
74
60
  ### Step 1 · PM Perspective → Business Tasks
75
61
 
76
- Extract user scenarios from Brief, aggregate into business Tasks.
77
-
78
- 1. Convert each feature into scenario: `User can [action] → [perceivable result]`
79
- 2. Scenarios sharing the same core flow → merge into one business Task
80
- > **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.
81
- 3. Granularity calibration (core rule: **one task = one `/archi.plan` session = one `tasks/<slug>/` subdir**):
82
-
83
- **Behavior perspective (PM)**:
62
+ Extract scenarios from Brief; convert to pattern: `User can [action] → [perceivable result]`
84
63
 
85
- | Signal | Action |
86
- |:---|:---|
87
- | Description contains "and" (two independent concerns) | Split |
88
- | DoD has > 4 acceptance criteria | Split |
89
- | Task spans > 3 independent UI areas or implementation domains | Split |
90
- | Single spec.md cannot fully describe behavior in one `/archi.plan` | Split |
91
- | Two tasks have >50% file overlap | Merge |
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.
92
66
 
93
- > **Note**: If "B only makes sense after A", that is a dependency — **do not merge**; declare `deps: [A]` for B in Step 4.
94
-
95
- **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 |
96
75
 
97
- | Signal | Action | Example |
98
- |:---|:---|:---|
99
- | Task contains ≥2 **implementation domains**, each independently unit-testable | Split | Pure compute layer + UI render layer → separate |
100
- | Implementation requires ≥3 independent technical concerns | Split | Character rendering + state machine + animation API → three things |
101
- | 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.
102
77
 
103
- > **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):
104
79
 
105
- **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 |
106
86
 
107
- > 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`.
108
88
 
109
- *Proxy metrics at decomposition (judge directly from Brief)*:
89
+ **Granularity Cap**:
110
90
 
111
- | Proxy Metric | Cap | Action if exceeded |
112
- |:---|:---|:---|
113
- | Independent user operation flows in task description | ≤ 3 | Split |
114
- | Independent data entities (each with own state flow) | ≤ 2 | Split |
115
- | "and/or/and also" connecting independent concerns | ≤ 1 | Split |
116
- | 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).
117
92
 
118
- > 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) |
119
99
 
120
- **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.
121
101
 
122
- | Task Type | goal format |
102
+ **DoD Format**:
103
+ | Type | Format |
123
104
  |:---|:---|
124
- | `FEAT-xx` | `When done, user can <verifiable user behavior>; boundary: <explicitly out of scope>` |
125
- | `INF-xx` | `When done, <infrastructure deliverable description>, verified by <verification command>; boundary: <explicitly out of scope>` |
126
- | `POLISH-xx` | `When done, <quality metric> improves from <baseline> to <target>; boundary: <explicitly out of scope>` |
127
-
128
- > 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).
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>` |
129
108
 
130
- Belong to parent task, do not make standalone: **lightweight** result page / completion page, empty state page, confirmation modal.
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).
131
110
 
132
- > **Exception**: Result page with independent data viz (chart lib), complex animation logic, or independent business logic must be standalone business Task.
133
-
134
- ---
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.
135
113
 
136
114
  ### Step 2 · Architect Perspective → Infra Tasks
137
115
 
138
- Derive shared foundations from business Tasks; no preset infrastructure.
139
-
140
- 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.
141
117
 
142
118
  | Infra Type | Criteria |
143
119
  |:---|:---|
144
- | Project scaffold / global Schema / type definitions | All business Tasks depend; must cover Step 0 project type checklist |
145
- | 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`) |
146
- | Third-party integration layer | Multiple business Tasks reuse same external service |
147
-
148
- **Shared engine planning contract**: Shared core engine INF tasks must declare main export interfaces (function signatures or key interface names) at end of `description`.
149
- 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 |
150
123
 
151
- **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.
152
125
 
153
- - **No over-fragmentation**: Same-layer config items with no substantive technical difference (ESLint + Prettier + TypeScript strict + commitlint) → merge.
154
- - **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
155
129
 
156
- > **Architecture layer reference** (each has independent implementation boundary; in principle each as separate task):
157
- > 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
158
131
 
159
132
  | Signal | Action |
160
133
  |:---|:---|
161
- | Related config items within same architecture layer | Merge |
162
- | Spans independent architecture layers (e.g. DB connection + Auth middleware) | Split |
163
- | Completely different tech stacks (e.g. local storage vs theme config) | Split |
164
- | Involves OS-level system API (tray, global hotkey, file association) | **Force split** (Step 0 rule, overrides "same-layer merge") |
165
- | Infra deliverable directly called by ≥2 business Tasks (interface-type) | Standalone task (must declare export interface contract) |
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) |
166
139
 
167
- **Implicit standard feature scan** (often absent from Brief; must proactively add):
168
-
169
- *Add as standalone business Task (Phase 2, user-visible behavior)*:
170
-
171
- | Check | Trigger |
172
- |:---|:---|
173
- | User Profile / account settings page | Project has Auth (INF layer has auth middleware) |
174
- | Account security / password settings page | Has Auth and user can change password or bind third-party account |
175
- | Notification center / message list page | Has notification infra and notifications have read/unread state |
140
+ **Implicit Standard Feature Scan** (often absent from Brief; proactively add):
176
141
 
177
- *Add as INF task (Phase 1, infrastructure)*:
178
-
179
- | Check | Trigger |
180
- |:---|:---|
181
- | Notification infrastructure (server push / message queue) | ≥1 Task mentions "notification/reminder" but no INF Task |
182
- | Search infrastructure (PG FTS index / external engine) | ≥2 business Tasks describe "search"; decide approach here, downstream Tasks depend |
183
- | Permission / role management (RBAC) | Has Auth and ≥2 user roles (e.g. admin / user) |
184
- | File storage integration (S3 / OSS wrapper) | ≥1 Task involves file upload / download / preview |
185
- | Email / SMS sending integration | Task mentions "send email / verification code / SMS" |
186
- | Payment integration | Task mentions "payment / order / checkout / refund" |
187
-
188
- ---
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) |
189
152
 
190
- ### Step 3 · NFR Filtering and Polish Task Identification
153
+ ### Step 3 · NFR Filtering and Polish Identification
191
154
 
192
- Route cross-cutting concerns by **effort weight**: lightweight → inject into goal; heavyweight → standalone `POLISH-xx` task.
155
+ Route by effort weight.
193
156
 
194
- > **"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.
195
158
 
196
159
  **Criteria**:
197
-
198
160
  | Signal | Action |
199
161
  |:---|:---|
200
- | 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>` |
201
- | Needs standalone infrastructure (e.g. integrate next-intl, create translation file structure) | **INF task** — create `INF-xx`, Phase 1 |
202
- | Needs cross-feature dedicated work, acceptance independently measurable (e.g. Lighthouse ≥ 90, full a11y audit) | **POLISH task** — create `POLISH-xx`, Phase 3 |
203
-
204
- **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 |
205
165
 
206
166
  | Type | Lightweight → NFR inject | Heavyweight → Standalone |
207
167
  |:---|:---|:---|
208
- | 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` |
209
169
  | Visual theme (config) | Brand color Token into scaffold | — |
210
- | 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` |
211
171
  | Animation style | Transition duration into first Task with animation | — |
212
- | Performance optimization | Lazy load / cache within single Task | Cross-feature optimization (LCP < 2s, bundle size target) → `POLISH-xx` |
213
- | Accessibility | ARIA attributes within single Task | Full a11y audit + fixes → `POLISH-xx` |
214
- | Packaging / distribution | — | Desktop packaging + auto-update config → `POLISH-xx` |
215
-
216
- ---
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` |
217
175
 
218
176
  ### Step 4 · Dependencies and Parallel Optimization
219
177
 
220
- - **Real dependency chain**: Forbid all business Tasks depending only on `INF-01`; reflect real business relationships.
221
- - **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.
222
- - **Minimal dependency principle**: Do not add unnecessary deps; maximize Batch parallelism.
223
-
224
- ---
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
225
181
 
226
182
  ## Task Rules
227
183
 
228
- 1. **ID prefix and task type**:
229
-
230
- ID prefix is the **sole identifier** of task type; `/archi.plan` selects spec acceptance format by prefix.
231
-
232
- | ID Prefix | Task Type | Meaning | Phase |
233
- |:---|:---|:---|:---|
234
- | `INF-xx` | Infrastructure | Scaffold, Schema, toolchain, third-party integration | Phase 1 |
235
- | `FEAT-xx` | Feature | Business functionality: user-perceivable behavior | Phase 2 |
236
- | `POLISH-xx` | Quality | Performance, full i18n, a11y audit, packaging | Phase 3 |
237
- | `EDIT-xx` | Edit | Modify existing functionality (incremental mode only) | Same Phase as modified task |
238
-
239
- Continue ID watermark from max per prefix + 1; new project starts from `INF-01` / `FEAT-01`.
240
-
241
- 2. **Phase structure**:
242
-
243
- | Phase | ID | Name | Content |
244
- |:---|:---|:---|:---|
245
- | Phase 1 | `phase-infra` | Infrastructure | INF-xx tasks (scaffold, data layer, auth, API skeleton) |
246
- | Phase 2 | `phase-core` | Core Features | FEAT-xx tasks (business features) |
247
- | Phase 3 | `phase-polish` | Polish & Launch | POLISH-xx tasks (quality, packaging); omit if Brief has no polish needs |
248
-
249
- 3. **tag field = business domain label**:
250
-
251
- `tag` labels the **business domain** (e.g. `Core`, `Community`, `Auth`, `Data`), free text, determined by Brief.
252
-
253
- > **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.
184
+ 1. **ID Prefixes**: `INF-xx` (infrastructure) | `FEAT-xx` (business feature) | `POLISH-xx` (quality polish) | `EDIT-xx` (edit, incremental only)
254
185
 
255
- 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.
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 |
256
192
 
257
- 5. **EDIT tasks**: Modify existing functionality create `EDIT-xxx`, goal states scope; incremental mode only.
193
+ 3. **tag field**: business domain label (e.g. Core, Auth, Data); does NOT determine task type
258
194
 
259
- 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.
195
+ 4. **Design decision injection**: Brief decisions inject into task goal end: `[User Preset] <content>`; do not repeat same decision across tasks
260
196
 
261
- ---
197
+ 5. **Slug**: `Pascal_Snake_Case`, maps to `tasks/<slug>/` folder
262
198
 
263
- ## Task JSON Schema (Tier 1 Strict, no add/remove fields)
199
+ ## Task JSON Schema (Tier 1, no add/remove fields)
264
200
 
265
201
  ```json
266
202
  {
267
203
  "id": "FEAT-01",
268
- "title": "Task Title In English",
204
+ "title": "Task Title",
269
205
  "status": "pending | blocked",
270
- "description": "<1-2 sentences on what this task builds and scope. Shared engine tasks must declare main export interfaces at end>",
271
- "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>",
272
208
  "deps": ["INF-01"],
273
- "tag": "<business domain label, free text. e.g. Core, Community, Auth, Data, UI>",
274
- "slug": "Task_Title_Snake_Case"
209
+ "tag": "business domain label",
210
+ "slug": "Task_Slug"
275
211
  }
276
212
  ```
277
213
 
278
- > **ID prefix vs tag responsibility separation**:
279
- > - `id` prefix (`INF-` / `FEAT-` / `POLISH-` / `EDIT-`) = task type, determines `/archi.plan` spec acceptance format
280
- > - `tag` = business domain label, for human categorization only, does not affect AI behavior
281
-
282
- `deps` empty or all `done` → `pending`; has incomplete deps → `blocked`
283
-
284
- ---
285
-
286
- ## Intermediate Outputs
214
+ `deps` all `done` `pending`; has incomplete `deps` → `blocked`
287
215
 
288
- > This Skill is a subroutine: after producing structured data, control returns to caller.
289
- > - `/archi.scope` → caller shows user for confirmation, writes to `roadmap.json` on OK
290
- > - `/archi.start` → caller writes directly to `roadmap.json`
216
+ ## Output Verification
291
217
 
292
- Three outputs:
218
+ `global/roadmap.json` generated with valid `phases` array
293
219
 
294
- **① Task data** (directly maps to `roadmap.json` phases/tasks):
220
+ ## Outputs
295
221
 
296
- ```json
297
- {
298
- "phases": [
299
- {
300
- "id": "phase-infra",
301
- "name": "Infrastructure",
302
- "tasks": [
303
- { "id": "INF-01", "title": "...", "status": "pending", "description": "...", "goal": "...", "deps": [], "tag": "Infra", "slug": "..." }
304
- ]
305
- },
306
- {
307
- "id": "phase-core",
308
- "name": "Core Features",
309
- "tasks": [
310
- { "id": "FEAT-01", "title": "...", "status": "blocked", "description": "...", "goal": "...", "deps": ["INF-01"], "tag": "Core", "slug": "..." }
311
- ]
312
- },
313
- {
314
- "id": "phase-polish",
315
- "name": "Polish & Launch",
316
- "tasks": [
317
- { "id": "POLISH-01", "title": "...", "status": "blocked", "description": "...", "goal": "...", "deps": ["FEAT-01"], "tag": "Quality", "slug": "..." }
318
- ]
319
- }
320
- ]
321
- }
322
- ```
323
-
324
- **② NFR merge list** (return with task data; caller appends as `nfr` top-level field; `/archi.plan` step_1_load must read):
222
+ **① Task Data**: `roadmap.json` `phases[].tasks[]` structure
325
223
 
326
- | 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 |
327
226
  |:---|:---|:---|:---|
328
- | (example) i18n | FEAT-01 | All copy via i18n key, no hardcoded strings | FEAT-02, FEAT-03 |
329
-
330
- **③ 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 |
331
228
 
229
+ **③ Parallel Batches** (DAG topological layers):
332
230
  ```
333
231
  Layer 0 ║ INF-01
334
- Layer 1 ║ INF-02 · INF-03 ← both depend on INF-01
335
- Layer 2 ║ FEAT-01 · FEAT-02 ← each depends on INF-02 / INF-03
336
- Layer 3 ║ FEAT-03 ← depends on FEAT-01
337
- 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
338
236
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: archi-design-patterns
3
- 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.
4
4
  ---
5
5
 
6
6
  # Technical Design Structured Pattern Library
@@ -137,3 +137,8 @@ Select ≥1 pattern per mechanism characteristic. Same feature may combine multi
137
137
  ---
138
138
 
139
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,12 +1,11 @@
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
- # featureRelations linkage handler
6
+ # featureRelations Linkage Handler
8
7
 
9
- ## System flow position
8
+ ## System Flow Position
10
9
 
11
10
  ```
12
11
  /archi.* step_N → Verify phase
@@ -22,7 +21,7 @@ Main Agent Signoff (confirm linkage prompts)
22
21
 
23
22
  ---
24
23
 
25
- ## Modes and behavior
24
+ ## Modes and Behavior
26
25
 
27
26
  ### Mode `register` (caller: plan, inherit)
28
27
 
@@ -71,7 +70,7 @@ Remove featureRelations entries referencing removed Task, assess impact.
71
70
 
72
71
  ---
73
72
 
74
- ## Output format
73
+ ## Output Format
75
74
 
76
75
  ### register mode
77
76
 
@@ -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,6 +1,6 @@
1
1
  ---
2
2
  name: archi-interview-protocol
3
- 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.
4
4
  ---
5
5
 
6
6
  # Supplementary Interview Protocol
@@ -19,7 +19,7 @@ Information gap detected
19
19
  > - Responsible for: how to ask (format / rules / tone)
20
20
  > - Not responsible for: what to ask (determined by caller's gap list), how to handle user answers (determined by caller)
21
21
 
22
- ## Callers & Trigger Conditions
22
+ ## Invocation Modes
23
23
 
24
24
  | Caller | Trigger Step | Trigger Condition | Max Questions |
25
25
  |:---|:---|:---|:---|