architext 0.0.2

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 (115) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/LICENSE +21 -0
  3. package/README.md +326 -0
  4. package/README.zh-CN.md +326 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +46 -0
  7. package/dist/templates/en/briefs/_base.md +115 -0
  8. package/dist/templates/en/briefs/_modules.md +173 -0
  9. package/dist/templates/en/docs/global/data_snapshot.json +31 -0
  10. package/dist/templates/en/docs/global/design_tokens.json +150 -0
  11. package/dist/templates/en/docs/global/dictionary.json +35 -0
  12. package/dist/templates/en/docs/global/error_codes.json +19 -0
  13. package/dist/templates/en/docs/global/map.json +94 -0
  14. package/dist/templates/en/docs/global/roadmap.json +39 -0
  15. package/dist/templates/en/docs/global/vision.md +82 -0
  16. package/dist/templates/en/docs/prompts/audit.md +150 -0
  17. package/dist/templates/en/docs/prompts/code.md +160 -0
  18. package/dist/templates/en/docs/prompts/edit.md +87 -0
  19. package/dist/templates/en/docs/prompts/fix.md +86 -0
  20. package/dist/templates/en/docs/prompts/help.md +69 -0
  21. package/dist/templates/en/docs/prompts/inherit.md +270 -0
  22. package/dist/templates/en/docs/prompts/map.md +131 -0
  23. package/dist/templates/en/docs/prompts/plan.md +252 -0
  24. package/dist/templates/en/docs/prompts/remove.md +162 -0
  25. package/dist/templates/en/docs/prompts/revise.md +160 -0
  26. package/dist/templates/en/docs/prompts/scope.md +198 -0
  27. package/dist/templates/en/docs/prompts/start.md +258 -0
  28. package/dist/templates/en/docs/templates/plan.template.json +113 -0
  29. package/dist/templates/en/docs/templates/scope-brief.template.md +58 -0
  30. package/dist/templates/en/docs/templates/spec.template.md +51 -0
  31. package/dist/templates/en/docs/templates/ui.template.md +51 -0
  32. package/dist/templates/en/rules/00_system.md +123 -0
  33. package/dist/templates/en/rules/01_workflow.md +93 -0
  34. package/dist/templates/en/rules/02_tech_stack.md +197 -0
  35. package/dist/templates/en/rules/03_data_governance.md +102 -0
  36. package/dist/templates/en/rules/04_cli_tools.md +50 -0
  37. package/dist/templates/en/rules/90_custom_rules.md +22 -0
  38. package/dist/templates/en/rules/99_context_glue.md +53 -0
  39. package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +292 -0
  40. package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +86 -0
  41. package/dist/templates/en/skills/archi-plan-options/SKILL.md +364 -0
  42. package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +342 -0
  43. package/dist/templates/zh/briefs/_base.md +116 -0
  44. package/dist/templates/zh/briefs/_modules.md +173 -0
  45. package/dist/templates/zh/docs/global/data_snapshot.json +31 -0
  46. package/dist/templates/zh/docs/global/design_tokens.json +135 -0
  47. package/dist/templates/zh/docs/global/dictionary.json +35 -0
  48. package/dist/templates/zh/docs/global/error_codes.json +19 -0
  49. package/dist/templates/zh/docs/global/map.json +94 -0
  50. package/dist/templates/zh/docs/global/roadmap.json +39 -0
  51. package/dist/templates/zh/docs/global/vision.md +82 -0
  52. package/dist/templates/zh/docs/prompts/audit.md +150 -0
  53. package/dist/templates/zh/docs/prompts/code.md +160 -0
  54. package/dist/templates/zh/docs/prompts/edit.md +87 -0
  55. package/dist/templates/zh/docs/prompts/fix.md +86 -0
  56. package/dist/templates/zh/docs/prompts/help.md +69 -0
  57. package/dist/templates/zh/docs/prompts/inherit.md +270 -0
  58. package/dist/templates/zh/docs/prompts/map.md +131 -0
  59. package/dist/templates/zh/docs/prompts/plan.md +253 -0
  60. package/dist/templates/zh/docs/prompts/remove.md +162 -0
  61. package/dist/templates/zh/docs/prompts/revise.md +160 -0
  62. package/dist/templates/zh/docs/prompts/scope.md +198 -0
  63. package/dist/templates/zh/docs/prompts/start.md +258 -0
  64. package/dist/templates/zh/docs/templates/plan.template.json +88 -0
  65. package/dist/templates/zh/docs/templates/scope-brief.template.md +58 -0
  66. package/dist/templates/zh/docs/templates/spec.template.md +51 -0
  67. package/dist/templates/zh/docs/templates/ui.template.md +51 -0
  68. package/dist/templates/zh/rules/00_system.md +123 -0
  69. package/dist/templates/zh/rules/01_workflow.md +93 -0
  70. package/dist/templates/zh/rules/02_tech_stack.md +192 -0
  71. package/dist/templates/zh/rules/03_data_governance.md +102 -0
  72. package/dist/templates/zh/rules/04_cli_tools.md +50 -0
  73. package/dist/templates/zh/rules/90_custom_rules.md +21 -0
  74. package/dist/templates/zh/rules/99_context_glue.md +53 -0
  75. package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +293 -0
  76. package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +86 -0
  77. package/dist/templates/zh/skills/archi-plan-options/SKILL.md +364 -0
  78. package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +339 -0
  79. package/dist/templates/zh-Hant/briefs/_base.md +115 -0
  80. package/dist/templates/zh-Hant/briefs/_modules.md +173 -0
  81. package/dist/templates/zh-Hant/docs/global/data_snapshot.json +31 -0
  82. package/dist/templates/zh-Hant/docs/global/design_tokens.json +135 -0
  83. package/dist/templates/zh-Hant/docs/global/dictionary.json +35 -0
  84. package/dist/templates/zh-Hant/docs/global/error_codes.json +19 -0
  85. package/dist/templates/zh-Hant/docs/global/map.json +94 -0
  86. package/dist/templates/zh-Hant/docs/global/roadmap.json +39 -0
  87. package/dist/templates/zh-Hant/docs/global/vision.md +82 -0
  88. package/dist/templates/zh-Hant/docs/prompts/audit.md +150 -0
  89. package/dist/templates/zh-Hant/docs/prompts/code.md +160 -0
  90. package/dist/templates/zh-Hant/docs/prompts/edit.md +87 -0
  91. package/dist/templates/zh-Hant/docs/prompts/fix.md +86 -0
  92. package/dist/templates/zh-Hant/docs/prompts/help.md +69 -0
  93. package/dist/templates/zh-Hant/docs/prompts/inherit.md +270 -0
  94. package/dist/templates/zh-Hant/docs/prompts/map.md +131 -0
  95. package/dist/templates/zh-Hant/docs/prompts/plan.md +252 -0
  96. package/dist/templates/zh-Hant/docs/prompts/remove.md +162 -0
  97. package/dist/templates/zh-Hant/docs/prompts/revise.md +160 -0
  98. package/dist/templates/zh-Hant/docs/prompts/scope.md +198 -0
  99. package/dist/templates/zh-Hant/docs/prompts/start.md +258 -0
  100. package/dist/templates/zh-Hant/docs/templates/plan.template.json +88 -0
  101. package/dist/templates/zh-Hant/docs/templates/scope-brief.template.md +58 -0
  102. package/dist/templates/zh-Hant/docs/templates/spec.template.md +51 -0
  103. package/dist/templates/zh-Hant/docs/templates/ui.template.md +51 -0
  104. package/dist/templates/zh-Hant/rules/00_system.md +123 -0
  105. package/dist/templates/zh-Hant/rules/01_workflow.md +93 -0
  106. package/dist/templates/zh-Hant/rules/02_tech_stack.md +192 -0
  107. package/dist/templates/zh-Hant/rules/03_data_governance.md +102 -0
  108. package/dist/templates/zh-Hant/rules/04_cli_tools.md +50 -0
  109. package/dist/templates/zh-Hant/rules/90_custom_rules.md +21 -0
  110. package/dist/templates/zh-Hant/rules/99_context_glue.md +53 -0
  111. package/dist/templates/zh-Hant/skills/archi-decompose-roadmap/SKILL.md +293 -0
  112. package/dist/templates/zh-Hant/skills/archi-interview-protocol/SKILL.md +86 -0
  113. package/dist/templates/zh-Hant/skills/archi-plan-options/SKILL.md +364 -0
  114. package/dist/templates/zh-Hant/skills/archi-ui-wireframe/SKILL.md +337 -0
  115. package/package.json +85 -0
@@ -0,0 +1,292 @@
1
+ ---
2
+ name: archi-decompose-roadmap
3
+ description: Architext task decomposition expert. Five-step method: first calibrate project type to anchor the infrastructure checklist, then apply dual-perspective extraction for business Tasks and Infra tasks. NFR cross-cutting concerns are merged into goal fields (never standalone tasks). Produces Tier 1 Schema-compliant roadmap.json tasks as input contracts for `/archi.plan`. Use whenever Roadmap tasks need to be generated or appended.
4
+ ---
5
+
6
+ # Roadmap Task Decomposition
7
+
8
+ ## System Flow Context
9
+
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 (component structure, AI coding truth source) [?UI]
17
+ visual ref: [[__DOCS_DIR__]]/global/ui_context.md [?UI]
18
+ plan.json (executable steps + test case checkboxes)
19
+ also updates: map.json / dictionary.json / data_snapshot.json
20
+
21
+ /archi.code → reads spec.md + ui.md + plan.json → writes code
22
+ ```
23
+
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 owns), variable naming (dictionary.json owns), test cases (plan.json owns), UI component structure (ui.md owns)
27
+ >
28
+ > **Schema constraint (Tier 1 Strict)**: roadmap.json is validated by CLI Zod Schema. **Adding or removing fields is forbidden.**
29
+
30
+ ## Invocation Mode
31
+
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 |
36
+
37
+ ---
38
+
39
+ ## Decomposition Framework (5 Steps)
40
+
41
+ ### Step 0 · Project Type Calibration
42
+
43
+ Identify the project type from the Brief's tech stack / description. Establish a standard infrastructure checklist to prevent Step 2 from missing framework-level Infra.
44
+
45
+ | Project Type | Scaffold Must Include (beyond common build toolchain) |
46
+ |:---|:---|
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 layer (iOS/Android permissions, native modules) + environment config (dev/staging/prod) |
52
+ | Mini Program | Page routing config + global app.js/ts + request wrapper layer |
53
+ | Browser Extension | manifest.json (V2/V3) + Background Service Worker + Content Script injection layer + message bus (background ↔ content ↔ popup) + Popup/Options page entry |
54
+ | Desktop App (Standalone) | Main process entry (Electron main / Tauri main.rs) + IPC bridge + system-level capabilities (tray, hotkeys) + native file system wrapper |
55
+ | Web + Desktop (Hybrid) | Web scaffold base + desktop runtime integration (Tauri/Electron) + system-level capabilities (system tray, global hotkeys, system notifications); **desktop integration must be split into a separate INF task** (OS differences are significant; tech stack is entirely different from Web — the Step 2 "same execution window = merge" rule does not apply) |
56
+ | Library / SDK / NPM Package | Dual output config (CJS + ESM) + public API entry (barrel index.ts) + type declaration generation (.d.ts) + changelog / versioning toolchain; **no business Tasks — INF layer only** |
57
+ | Real-time / Collaborative App | WebSocket server layer + event schema definitions (shared types) + room/session management foundation; [?CRDT] conflict resolution layer |
58
+ | AI Agent / MCP Tool | LLM client abstraction layer (provider-agnostic) + prompt template management + Tool/Function Calling schema + conversation state / memory management; [?MCP] MCP protocol adapter |
59
+
60
+ **Action (two outputs)**:
61
+ 1. **Inject into Step 2 INF-01**: Write the corresponding type's scaffold checklist into the INF-01 description.
62
+ 2. **Inject into Step 1 scene constraint**: Constrain the scenario sentence format for Step 1 based on project type. The following rules apply when extracting business scenarios:
63
+
64
+ | Project Type | Scenario Template | Forbidden Vocabulary |
65
+ |:---|:---|:---|
66
+ | CLI Tool | `User can [run command / pass arg] → [terminal output]` | page, route, component, UI |
67
+ | Library / SDK | `Caller can [invoke API X] → [returns Y]` | user, interface, interaction |
68
+ | API Service | `Client can [HTTP METHOD /path] → [response structure]` | frontend, page, component |
69
+ | Mini Program | `User can [action] on [page name] → [visible result in WeChat]` | backend route, REST |
70
+ | Web SPA / Full-Stack / Mobile / Desktop | `User can [action] → [perceivable outcome]` | (no special restriction) |
71
+
72
+ ---
73
+
74
+ ### Step 1 · PM Perspective → Business Tasks
75
+
76
+ Extract user scenarios from the Brief task descriptions and aggregate them into business Tasks.
77
+
78
+ 1. Convert each item into scenario format: `User can [action] → [perceivable outcome]`
79
+ 2. Scenarios sharing the same core flow → merge into one business Task
80
+ > **Note**: "Shared feature domain / theme" ≠ "Shared core flow". Scenarios belonging to the same domain (e.g. "community interaction") but with independent UI areas and implementation domains must follow the split signals below — never force-merge because they share a theme. "Shared core flow" means: scenarios complete within the same UI view, operate on the same data entity, and share the same state transitions.
81
+ 3. Granularity calibration (core principle: **one task = one `/archi.plan` session = one `tasks/<slug>/` subdirectory**):
82
+
83
+ **Behavior perspective (PM)**:
84
+
85
+ | Signal | Action |
86
+ |:---|:---|
87
+ | Description contains "and" (two independent concerns) | Split |
88
+ | DoD exceeds 4 acceptance criteria | Split |
89
+ | Task spans 3+ independent UI areas or implementation domains | Split |
90
+ | A single `/archi.plan` session cannot fully describe behavior in one spec.md | Split |
91
+ | Two tasks share >50% of their file set | Merge |
92
+
93
+ > **Note**: If "Task B is meaningless without Task A", this describes a sequential dependency — **never merge**. Declare `deps: [A]` on B in Step 4 instead.
94
+
95
+ **Engineering perspective (independent of behavior — either trigger = split)**:
96
+
97
+ | Signal | Action | Example |
98
+ |:---|:---|:---|
99
+ | Task contains ≥2 **implementation domains**, each independently unit-testable | Split | Pure logic layer + UI rendering layer → separate tasks |
100
+ | Implementation requires mastering ≥3 independent technical concerns simultaneously | Split | Char rendering + state machine + animation API → three distinct things |
101
+ | A concern has its own significant boundary complexity (e.g. IME, Canvas, third-party chart API) | Extract that concern | Input capture + IME → own task |
102
+
103
+ > **Why add the engineering perspective**: The behavior perspective describes "what the user sees"; the engineering perspective describes "what the AI must simultaneously master during `/archi.code`". A task that is behaviorally cohesive (same screen) but spans multiple unrelated implementation domains will cause the AI to lose focus and produce poor cross-domain code.
104
+
105
+ **Granularity limits**:
106
+
107
+ > One Roadmap Task = the minimum functional unit that **AI can handle without further decomposition and produce one cohesive spec.md** (HTN Primitive executability principle).
108
+
109
+ *Decomposition-phase proxy metrics (assessable directly from the Brief)*:
110
+
111
+ | Proxy Metric | Limit | Action when exceeded |
112
+ |:---|:---|:---|
113
+ | Number of independent user operation flows in the task description | ≤ 3 | Split |
114
+ | Number of independent data entities involved (each with its own state transitions) | ≤ 2 | Split |
115
+ | Number of independent concerns joined by "and / plus / also" in the description | ≤ 1 | Split |
116
+ | Task acceptance cannot be validated independently without running another business Task | — | Check coupling; redraw interface boundary (INVEST-I) |
117
+
118
+ > During `/archi.plan`, if spec.md Scenario count is projected to exceed 6 or plan.json Phase count to exceed 4, pause and prompt the user to return to `/archi.scope` for re-splitting. Never force-fit into a single task.
119
+
120
+ **DoD format**: `When done, user can <verifiable user behavior>; boundary: <what is explicitly excluded>`
121
+
122
+ > DoD is the baseline for `/archi.plan` to write spec.md acceptance criteria and plan.json test cases. It must precisely describe user-perceivable outcomes. Implementation details (file paths, function names, test commands) are determined in the plan phase — do not include them here.
123
+
124
+ The following belong to the parent task — never create standalone tasks for: **lightweight** result/completion pages, empty-state pages, confirmation dialogs.
125
+
126
+ > **Exemption**: If a result page contains independent data visualization components (charting libraries), complex animation logic, or independent business calculations, the parent-task rule does **not** apply — it must become its own business Task.
127
+
128
+ ---
129
+
130
+ ### Step 2 · Architect Perspective → Infra Tasks
131
+
132
+ Derive shared foundations from business Tasks. Never pre-assume infrastructure.
133
+
134
+ For all business Tasks, ask: do multiple Tasks depend on X, and must X exist before any Task can run? → X is an Infra task.
135
+
136
+ | Infra Type | Criteria |
137
+ |:---|:---|
138
+ | Project scaffolding / global Schema / type definitions | All business Tasks depend on it; must cover the Step 0 project type checklist |
139
+ | Shared core engine (typing engine, rules engine, etc.) | Meets **any one** of: ① 2+ business Tasks call it directly; ② Pure logic layer, independently unit-testable, fully decoupled from UI. `tag: Core` |
140
+ | Third-party integration layer | Multiple business Tasks reuse the same external service |
141
+
142
+ **Core Task Planning Contract**: Tasks with `tag: Core` must end their `description` with a declaration of their primary exported interface (function signature or key interface name). Downstream Task `/archi.plan` sessions can wire directly to this interface without reading upstream implementation, ensuring cross-task planning consistency and predictability.
143
+
144
+ **Infra task granularity principle: avoid micro-tasks, but never stack across layers**:
145
+
146
+ - **No micro-splitting**: Config items within the same architectural layer with no meaningful technical distinction (e.g. ESLint + Prettier + TypeScript strict + commitlint) → merge to reduce task count and dependency chain noise.
147
+ - **No cross-layer stacking**: Each independent architectural layer has its own technical domain details. Merging them still causes AI context overload — and packing multiple layers into one INF task creates the longest possible critical path, delaying the start of all downstream business Tasks.
148
+
149
+ > **Architectural layer reference** (each layer has independent implementation boundaries — in principle each becomes its own task):
150
+ > Project scaffold (build / code quality toolchain) | Data layer (DB connection / ORM / migrations) | Auth layer (auth middleware / session / JWT) | API routing layer (route registration / middleware chain / global error handling) | Frontend infrastructure (theme / Design Tokens / global layout) | Third-party service integrations (each service as its own INF task)
151
+
152
+ | Signal | Action |
153
+ |:---|:---|
154
+ | Related config items within the same architectural layer (e.g. all code quality toolchain items, or router skeleton + global error middleware both belonging to the API routing layer) | Merge |
155
+ | Spans independent architectural layers (e.g. DB connection layer + Auth middleware, or API routing + frontend theme system) | Split |
156
+ | Completely different tech stacks (e.g. local storage layer vs. theme config) | Split |
157
+ | Contains OS-level system APIs (system tray, global hotkeys, file associations, etc.) | **Force split** (Step 0 forced rule — not subject to same-layer merge condition) |
158
+ | An Infra output is called directly by ≥2 business Tasks (interface-type) | Keep as its own task (must declare exported interface contract) |
159
+
160
+ **Implicit standard features scan**: The following features rarely appear in a Brief and must be proactively added with correct classification (omission is not allowed):
161
+
162
+ *Add as standalone business Task (Phase 2 — user-visible behavior)*:
163
+
164
+ | Check Item | Trigger Condition |
165
+ |:---|:---|
166
+ | User Profile / account settings page | Project includes Auth (INF layer has auth middleware) |
167
+ | Account security / password settings page | Includes Auth and user can change password or link third-party accounts |
168
+ | Notification center / message list page | Includes notification infrastructure and notifications have "read/unread" state |
169
+
170
+ *Add as INF task (Phase 1 — infrastructure)*:
171
+
172
+ | Check Item | Trigger Condition |
173
+ |:---|:---|
174
+ | Notification infrastructure (server-side push / message queue layer) | ≥1 Task mentions "notifications / reminders" verbally but no INF Task created |
175
+ | Search infrastructure (PG FTS index / external search engine deployment) | ≥2 business Tasks independently describe "search" functionality; decide on the approach here as an INF Task — downstream Tasks depend on it |
176
+ | Permission / role management layer (RBAC) | Includes Auth and has ≥2 user roles (e.g. admin / user) |
177
+ | File storage integration layer (S3 / OSS wrapper) | ≥1 Task involves file upload / download / preview |
178
+ | Email / SMS sending integration | Task mentions "send email / verification code / SMS notification" |
179
+ | Payment integration layer | Task mentions "payment / order / checkout / refund" |
180
+
181
+ ---
182
+
183
+ ### Step 3 · NFR Filter
184
+
185
+ The following types **must never become standalone tasks**: inject into the `goal` of the first task that implements the capability (`[NFR] <note>`); other affected tasks are noted only in the NFR list below. `/archi.plan` will propagate these NFRs into the constraints section of the corresponding spec.md.
186
+
187
+ > **"First task" definition**: The task earliest in the dependency chain whose `deps` contain only INF-layer tasks (no business prerequisites) and that is the first to involve this NFR capability. When multiple candidates exist in the same Batch, use the one with the smallest ID.
188
+
189
+ | Type | Common Forms | Note |
190
+ |:---|:---|:---|
191
+ | Internationalization | i18n, multi-language, translation copy | — |
192
+ | Visual theme (config) | Brand color tokens, Tailwind theme colors, CSS variable definitions | NFR — inject into scaffold task |
193
+ | Visual theme (feature) | Dark/light toggle button, OS preference detection, theme persistence | **Not NFR** — must be a standalone business Task (user-visible behavior) |
194
+ | Animation style conventions | Page transition approach, duration standards | NFR — inject into the first Task goal that includes animation |
195
+ | Performance | Lazy loading, virtual list, cache strategy | — |
196
+ | Accessibility | A11y, keyboard navigation, screen reader | — |
197
+
198
+ ---
199
+
200
+ ### Step 4 · Dependency & Parallelism Optimization
201
+
202
+ - **Real dependency chains**: Never attach all business Tasks to `INF-01` only. Dependencies must reflect real business relationships.
203
+ - **Business entity dependency (takes priority over minimal dependency)**: If the core subject of feature B is produced by feature A (i.e. B's data entity does not exist until A is complete), then B must declare a dependency on A. This rule takes precedence over the minimal dependency principle. Example: Usage Log records Prompt usage; Prompts are created by FEAT-Prompt_Create → the Usage Log Task must depend on the Prompt Task, not only on the INF layer.
204
+ - **Minimal dependency principle**: Tasks that can run in parallel must not carry unnecessary deps — maximize Batch parallelism.
205
+
206
+ ---
207
+
208
+ ## Task Rules
209
+
210
+ 1. **ID generation**: Continue existing Roadmap ID watermark, increment each prefix from its max value. Fresh projects start at `INF-01` / `FEAT-01`.
211
+
212
+ 2. **Phase assignment**:
213
+
214
+ | Task Type | Phase |
215
+ |:---|:---|
216
+ | Project scaffolding, Schema, global types | Phase 1 (Infrastructure) |
217
+ | Shared core engine (identified in Step 2) | Phase 1 (Infrastructure) |
218
+ | Business Task | Phase 2 (Core Features) |
219
+ | EDIT-xxx (modifying existing feature) | Same Phase as the modified task |
220
+
221
+ 3. **Design decision injection**: Existing decisions from the Brief → append to corresponding task `goal`: `[User Preset] <content>`. Never repeat the same global decision across multiple tasks. `/archi.plan` treats these as non-negotiable hard constraints, writing them directly into spec.md without re-asking.
222
+
223
+ 4. **EDIT tasks**: When an existing feature must be modified → create `EDIT-xxx` (`tag: Edit`), goal describes the modification scope. Only used in Incremental mode.
224
+
225
+ 5. **Slug naming**: `slug` is the `tasks/<slug>/` folder name. Must clearly express the task content, in `Pascal_Snake_Case` format (e.g. `Typing_Engine_Core`). Each task maps to exactly one unique task subdirectory — no duplicates.
226
+
227
+ ---
228
+
229
+ ## Task JSON Schema (Tier 1 Strict — no field additions or removals)
230
+
231
+ ```json
232
+ {
233
+ "id": "FEAT-01",
234
+ "title": "Task Title In English",
235
+ "status": "pending | blocked",
236
+ "description": "<1-2 sentences describing what this task builds and what it covers. Core tasks must end with a declaration of their primary exported interface>",
237
+ "goal": "When done, user can <verifiable user behavior>; boundary: <what is explicitly excluded>",
238
+ "deps": ["INF-01"],
239
+ "tag": "Infra | Core | Feature | Edit",
240
+ "slug": "Task_Title_Snake_Case"
241
+ }
242
+ ```
243
+
244
+ `deps` empty or all `done` → `pending`; any unfinished dep → `blocked`
245
+
246
+ ---
247
+
248
+ ## Intermediate Output
249
+
250
+ > This Skill is a subroutine: once structured data is produced, control returns to the caller.
251
+ > - `/archi.scope` → caller displays to user for confirmation, then writes to `roadmap.json` after "OK"
252
+ > - `/archi.start` → caller writes directly to `roadmap.json`
253
+
254
+ Produces three parts:
255
+
256
+ **① Task data** (maps directly to `roadmap.json` phases/tasks structure):
257
+
258
+ ```json
259
+ {
260
+ "phases": [
261
+ {
262
+ "id": "phase-1",
263
+ "name": "Infrastructure",
264
+ "tasks": [
265
+ { "id": "INF-01", "title": "...", "status": "pending", "description": "...", "goal": "...", "deps": [], "tag": "Infra", "slug": "..." }
266
+ ]
267
+ },
268
+ {
269
+ "id": "phase-2",
270
+ "name": "Core Features",
271
+ "tasks": [
272
+ { "id": "FEAT-01", "title": "...", "status": "blocked", "description": "...", "goal": "...", "deps": ["INF-01"], "tag": "Feature", "slug": "..." }
273
+ ]
274
+ }
275
+ ]
276
+ }
277
+ ```
278
+
279
+ **② NFR merge list** (returned alongside task data; caller appends as `nfr` top-level field in roadmap; `/archi.plan` `step_1_load` must read this list):
280
+
281
+ | NFR Name | Injected Into Task ID | Constraint Summary | Affected Task IDs |
282
+ |:---|:---|:---|:---|
283
+ | (example) i18n | FEAT-01 | All copy must use i18n keys — no hardcoded strings | FEAT-02, FEAT-03 |
284
+
285
+ **③ Parallel execution batches** (DAG topology layers — tasks within the same Layer can be handled by separate parallel AI sessions):
286
+
287
+ ```
288
+ Layer 0 ║ INF-01
289
+ Layer 1 ║ INF-02 · INF-03 ← both depend on INF-01
290
+ Layer 2 ║ FEAT-01 · FEAT-02 ← depend on INF-02 / INF-03 respectively
291
+ Layer 3 ║ FEAT-03 ← depends on FEAT-01
292
+ ```
@@ -0,0 +1,86 @@
1
+ ---
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.
4
+ ---
5
+
6
+ # Supplementary Interview Protocol
7
+
8
+ ## System Flow Position
9
+
10
+ ```
11
+ Information gap detected
12
+
13
+ [This Skill] → Q-table output → Wait for user INPUT
14
+
15
+ Caller continues next steps
16
+ ```
17
+
18
+ > **Skill responsibility boundary**:
19
+ > - Responsible for: how to ask (format / rules / tone)
20
+ > - Not responsible for: what to ask (determined by caller's gap list), how to handle user answers (determined by caller)
21
+
22
+ ## Callers & Trigger Conditions
23
+
24
+ | Caller | Trigger Step | Trigger Condition | Max Questions |
25
+ |:---|:---|:---|:---|
26
+ | `/archi.start` | step_2_supplementary | Brief has "Required" or "Can supplement" gaps | 3–6 |
27
+ | `/archi.scope` | step_2_5_supplementary | Brief has "Required" or "Can supplement" gaps | ≤3 |
28
+ | `/archi.plan` | step_2 Part 2 Q-table | Architecture dimension has 2+ viable options whose choice significantly impacts implementation | As needed; recommend directly if possible |
29
+
30
+ ---
31
+
32
+ ## Core Rules
33
+
34
+ ### Principle: Multiple-Choice First
35
+
36
+ No open-ended questions (e.g., "What database do you want to use?"). All questions are presented as multiple-choice. AI provides a recommended default option based on context; user only needs to confirm or switch. Goal: user can make a reasonable decision without domain expertise.
37
+
38
+ ### Rule Checklist
39
+
40
+ | # | Rule | Detail |
41
+ |:---|:---|:---|
42
+ | 1 | **Gaps only** | Never re-ask what the caller or Brief has already answered; directly adopt user's filled-in choices |
43
+ | 2 | **Option count** | 3–5 options per question + `[Z] Custom`; too many options means the question should be split |
44
+ | 3 | **Recommendation mark** | AI picks the most reasonable option based on project context, marks it `[Recommended]`; must reflect current context, not mechanical defaults |
45
+ | 4 | **[Z] fallback** | Every question must include `[Z] Custom (please describe)` as an escape hatch for needs that don't fit presets |
46
+ | 5 | **Complete option description** | Description must cover: ① what this option is ② what the project/code looks like if chosen ③ what scenarios it suits (2–3 sentences total); no one-word labels |
47
+ | 6 | **AI+/AI- full sentences** | State advantages and risks from AI Agent execution perspective; must be full sentences; never write "None" — every option has trade-offs |
48
+ | 7 | **Merge related questions** | Merge strongly related gaps into one question to reduce user decision count; split only weakly related ones |
49
+
50
+ ---
51
+
52
+ ## Standard Output Format
53
+
54
+ ```
55
+ ### Supplementary Confirmation
56
+
57
+ **[Q<n>] Question title**
58
+ > Why this information is needed (one sentence, so user understands why they're answering)
59
+
60
+ | ID | Option | Description | AI+ | AI- |
61
+ |:---|:---|:---|:---|:---|
62
+ | A [Recommended] | Option name | What it is + what happens if chosen + what scenarios it suits (2–3 sentences) | Full sentence | Full sentence |
63
+ | B | ... | ... | ... | ... |
64
+ | C | ... | ... | ... | ... |
65
+ | Z | Custom | (please describe) | - | - |
66
+
67
+ (Repeat Q-table structure above for multiple questions)
68
+
69
+ ---
70
+ **INPUT**: `Q1 answer | Q2 answer | ...` (use `|` between questions; space for multi-select within one question, e.g. `A B`)
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Common Mistakes
76
+
77
+ | Wrong | Problem | Correct |
78
+ |:---|:---|:---|
79
+ | `A \| PostgreSQL` | One-word label, can't judge which to pick | `A \| PostgreSQL \| Relational DB suited for well-defined schemas and join queries...` |
80
+ | `AI+: Good performance` | Not a full sentence, no substantive info | `AI+: Structured schema lets AI infer CRUD code directly from type definitions, reducing guesswork` |
81
+ | `AI-: None` | Every option has trade-offs; "None" is avoidance | `AI-: Migration scripts must stay in sync as schema evolves; AI often misses field changes` |
82
+ | Asking about tech stack already answered in Brief | Re-asking erodes trust | Skip; directly adopt the user's filled-in choice |
83
+
84
+ ---
85
+
86
+ > **Intermediate artifact**: This Skill is a subroutine. After producing the Q-table, control returns to the caller. The caller resumes after the user replies to INPUT.