architext 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -1
- package/README.md +93 -14
- package/README.zh-CN.md +92 -14
- package/dist/index.js +53 -39
- package/dist/templates/en/briefs/_base.md +53 -13
- package/dist/templates/en/briefs/_modules.md +31 -4
- package/dist/templates/en/docs/global/error_memory.json +40 -0
- package/dist/templates/en/docs/global/map.json +46 -90
- package/dist/templates/en/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +6 -13
- package/dist/templates/en/{rules/02_tech_stack.md → docs/global/tech_stack.md} +7 -18
- package/dist/templates/en/docs/global/vision.md +1 -1
- package/dist/templates/en/docs/prompts/audit.md +80 -94
- package/dist/templates/en/docs/prompts/code.md +99 -89
- package/dist/templates/en/docs/prompts/edit.md +61 -51
- package/dist/templates/en/docs/prompts/fix.md +59 -43
- package/dist/templates/en/docs/prompts/help.md +23 -31
- package/dist/templates/en/docs/prompts/inherit.md +97 -117
- package/dist/templates/en/docs/prompts/map.md +48 -69
- package/dist/templates/en/docs/prompts/plan.md +141 -240
- package/dist/templates/en/docs/prompts/recover.md +19 -34
- package/dist/templates/en/docs/prompts/ref.md +43 -138
- package/dist/templates/en/docs/prompts/remove.md +63 -110
- package/dist/templates/en/docs/prompts/revise.md +71 -106
- package/dist/templates/en/docs/prompts/scope.md +78 -117
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +98 -132
- package/dist/templates/en/docs/prompts/ui.md +113 -0
- package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/en/docs/templates/spec.template.md +1 -1
- package/dist/templates/en/docs/templates/ui.template.md +8 -8
- package/dist/templates/en/rules/00_system.md +268 -117
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +37 -23
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +138 -240
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +10 -6
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +24 -25
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +175 -305
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +56 -17
- package/dist/templates/zh/briefs/_modules.md +28 -1
- package/dist/templates/zh/docs/global/error_memory.json +40 -0
- package/dist/templates/zh/docs/global/map.json +39 -109
- package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
- package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
- package/dist/templates/zh/docs/global/vision.md +1 -1
- package/dist/templates/zh/docs/prompts/audit.md +43 -57
- package/dist/templates/zh/docs/prompts/code.md +66 -56
- package/dist/templates/zh/docs/prompts/edit.md +52 -42
- package/dist/templates/zh/docs/prompts/fix.md +39 -29
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +67 -86
- package/dist/templates/zh/docs/prompts/map.md +28 -50
- package/dist/templates/zh/docs/prompts/plan.md +100 -199
- package/dist/templates/zh/docs/prompts/recover.md +9 -24
- package/dist/templates/zh/docs/prompts/ref.md +11 -106
- package/dist/templates/zh/docs/prompts/remove.md +39 -74
- package/dist/templates/zh/docs/prompts/revise.md +47 -88
- package/dist/templates/zh/docs/prompts/scope.md +52 -91
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +75 -110
- package/dist/templates/zh/docs/prompts/ui.md +113 -0
- package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/zh/docs/templates/spec.template.md +1 -1
- package/dist/templates/zh/docs/templates/ui.template.md +8 -8
- package/dist/templates/zh/rules/00_system.md +252 -131
- package/dist/templates/zh/rules/90_custom_rules.md +2 -1
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -235
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +174 -301
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -93
- package/dist/templates/en/rules/03_data_governance.md +0 -102
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -94
- package/dist/templates/zh/rules/03_data_governance.md +0 -133
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<protocol_kickoff>
|
|
2
2
|
**Trigger**: `/archi.start [file_path]`
|
|
3
3
|
**Phase**: Strategic Initialization
|
|
4
|
-
**Goal**: Establish
|
|
4
|
+
**Goal**: Establish project constitution (Vision/Tech/Roadmap) from Project Brief.
|
|
5
5
|
|
|
6
6
|
<meta>
|
|
7
7
|
<style>Strict, Professional, CLI-Like</style>
|
|
@@ -20,42 +20,37 @@
|
|
|
20
20
|
**Action**:
|
|
21
21
|
1. Parse `[file_path]` from trigger:
|
|
22
22
|
- If path provided → read that file
|
|
23
|
-
- If not → search `project-brief.md` (project root), then `[[__DOCS_DIR__]]/project-brief.md`
|
|
23
|
+
- If not provided → search `project-brief.md` (project root), then `[[__DOCS_DIR__]]/project-brief.md`
|
|
24
24
|
- If neither exists or empty → goto `<fallback_interview>`
|
|
25
25
|
|
|
26
|
-
2. **Resource
|
|
27
|
-
|
|
26
|
+
2. **Resource scan and read** (must complete before parsing):
|
|
27
|
+
|
|
28
|
+
**a) `brief-assets/` directory scan**: Check if `brief-assets/` exists at project root. If so, read all files (images/PDFs/docs/Schema). Match files referenced in Brief via `./brief-assets/filename` with files read here.
|
|
29
|
+
|
|
30
|
+
**b) Brief full-text external reference check**: Scan Brief for all external references (URLs, file paths, images). Try to access each:
|
|
28
31
|
|
|
29
32
|
| Status | Handling |
|
|
30
33
|
|:---|:---|
|
|
31
|
-
| Accessible | Read content, include in analysis |
|
|
34
|
+
| Accessible (incl. local files in brief-assets/) | Read content, include in analysis |
|
|
32
35
|
| Inaccessible (auth required/404/private) | Mark `[unreadable]`, report to user later |
|
|
33
|
-
| Non-link references
|
|
36
|
+
| Non-link descriptive references | Process normally, no fetch |
|
|
34
37
|
|
|
35
|
-
|
|
38
|
+
**c) Asset semantic tag extraction**: For assets referenced in Brief as `- [semantic label] path`, record tag-to-file mapping for later steps (e.g. `[competitor reference]` → affects design_tokens, `[database Schema]` → affects data_snapshot).
|
|
36
39
|
|
|
37
|
-
3. Parse Brief sections, extract:
|
|
38
|
-
- Project feature tags (UI/Data/CLI/Lib/API — inferred from tech fields and paragraphs)
|
|
39
|
-
- Core feature list
|
|
40
|
-
- Pre-defined design decisions (user's preset design for specific features/pages/flows)
|
|
41
|
-
- Tech preferences (distinguish "confirmed" vs "blank/recommend")
|
|
42
|
-
- Existing resources and context
|
|
43
|
-
- Boundaries and constraints
|
|
44
|
-
- Reference projects
|
|
45
|
-
- Supplementary notes (rules/terminology/background)
|
|
40
|
+
3. Parse Brief sections, extract: project feature tags, core task list, business process (if any), pre-defined design decisions, tech preferences (distinguish "confirmed" vs "blank/recommend"), data model draft (if any), existing API endpoints (if any), existing resources, boundaries and constraints, reference projects, supplementary notes.
|
|
46
41
|
|
|
47
|
-
> Brief is a one-time input file; user may delete after processing.
|
|
42
|
+
> Brief is a one-time input file; user may delete after processing (brief-assets/ likewise).
|
|
48
43
|
|
|
49
44
|
**Output**:
|
|
50
|
-
- If any resources inaccessible → **Immediately output Resource Accessibility Report
|
|
51
|
-
- If all accessible or no external refs → Internal summary
|
|
45
|
+
- If any resources inaccessible → **Immediately output Resource Accessibility Report**, wait for user reply before continuing.
|
|
46
|
+
- If all accessible or no external refs → Internal summary, proceed to `<step_1_gap_analysis>`.
|
|
52
47
|
</step_0_ingest>
|
|
53
48
|
|
|
54
49
|
<step_1_gap_analysis>
|
|
55
|
-
**Role**: Chief Product
|
|
50
|
+
**Role**: Chief Product Strategist (CPO)
|
|
56
51
|
**Input**: Step 0 parsing result.
|
|
57
52
|
|
|
58
|
-
**Action**: Check Brief completeness, identify information gaps.
|
|
53
|
+
**Action**: Check Brief completeness item by item, identify information gaps.
|
|
59
54
|
|
|
60
55
|
**Checklist**:
|
|
61
56
|
|
|
@@ -63,190 +58,161 @@
|
|
|
63
58
|
|:---|:---|:---|
|
|
64
59
|
| Project identity | Name + one-line description + problem statement all filled | Required |
|
|
65
60
|
| Target users | At least core user role described | Required |
|
|
66
|
-
| Core
|
|
61
|
+
| Core tasks | At least 2 concrete tasks listed, each with description | Required |
|
|
67
62
|
| Tech stack – core | Language/runtime + core framework filled (non-empty) | Required |
|
|
68
63
|
| Tech stack – optional | DB/ORM/CSS/deploy etc. blanks | Can supplement |
|
|
69
|
-
| Project starting point | New
|
|
64
|
+
| Project starting point | New or existing codebase (affects architecture) | Required |
|
|
70
65
|
| Existing resources | Design/brand/existing API/3rd-party services explicit? | Can supplement |
|
|
71
|
-
| Style/tone |
|
|
66
|
+
| Style/tone | (UI projects only) Visual keywords / (CLI projects only) Output style / (API projects only) Doc approach | Can supplement |
|
|
72
67
|
| Boundaries | At least 1 anti-goal or hard constraint declared | Suggested |
|
|
73
68
|
| Success metrics | Concrete quantifiable metrics filled | Suggested |
|
|
74
69
|
| Reference projects | At least 1 reference listed | Suggested |
|
|
75
70
|
|
|
76
|
-
**Gap levels**:
|
|
77
|
-
- **Required**: Must ask in Step 2
|
|
78
|
-
- **Can supplement**: AI can recommend but better to confirm
|
|
79
|
-
- **Suggested**: AI can infer, does not block flow
|
|
80
|
-
|
|
81
|
-
**Decision**:
|
|
82
|
-
- No "Required" gaps + no "Can supplement" gaps → skip Step 2, go to Step 3
|
|
83
|
-
- Otherwise → go to Step 2
|
|
71
|
+
**Gap levels**: Required → must ask in Step 2 | Can supplement → AI can recommend, suggest confirm | Suggested → AI can infer
|
|
84
72
|
|
|
85
|
-
**
|
|
86
|
-
```
|
|
87
|
-
### BRIEF Analysis Report
|
|
88
|
-
> **Project**: [name] | **Features**: [activated UI/Data/CLI/Lib/API tags]
|
|
73
|
+
**Decision**: No "Required" + "Can supplement" gaps → skip Step 2 | Has gaps → proceed to Step 2
|
|
89
74
|
|
|
90
|
-
**
|
|
91
|
-
- [list of filled items]
|
|
92
|
-
|
|
93
|
-
**Gaps (require supplement)**:
|
|
94
|
-
- [gap 1]
|
|
95
|
-
- [gap 2]
|
|
96
|
-
|
|
97
|
-
**AI will auto-complete** (no action):
|
|
98
|
-
- [items AI can infer]
|
|
99
|
-
```
|
|
75
|
+
**Output**: Output BRIEF analysis report to user — include project name/feature tags, confirmed items list, information gap list (require supplement), AI auto-complete items.
|
|
100
76
|
</step_1_gap_analysis>
|
|
101
77
|
|
|
102
78
|
<step_2_supplementary>
|
|
103
|
-
**Role**: Product Advisor
|
|
104
79
|
**Trigger**: Only when Step 1 finds "Required" or "Can supplement" gaps.
|
|
105
80
|
**Input**: Step 1 gap list. Max 3–6 questions.
|
|
106
81
|
|
|
107
|
-
[[SKILL: archi-interview-protocol|Follow the skill's core rules and standard output format.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-interview-protocol/SKILL.md` and follow its rules)]]
|
|
82
|
+
[[SKILL: archi-interview-protocol|Follow the skill's core rules and standard output format for questioning.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-interview-protocol/SKILL.md` and follow its rules)]]
|
|
108
83
|
</step_2_supplementary>
|
|
109
84
|
|
|
110
85
|
<step_3_constitution>
|
|
111
86
|
**Role**: Chief Architect
|
|
112
|
-
**Input**: Full Brief
|
|
87
|
+
**Input**: Full Brief + Step 2 supplement answers (if any).
|
|
113
88
|
|
|
114
89
|
**Action**: Generate project constitution files in one pass. All Brief content must be consumed and routed; nothing omitted.
|
|
115
90
|
|
|
116
91
|
### Information Routing Rules
|
|
117
92
|
|
|
118
|
-
> Rule files (`
|
|
93
|
+
> Rule files (`tech_stack`, `90_custom_rules`, etc.) are already injected into context by IDE; AI knows their paths, write directly.
|
|
119
94
|
|
|
120
95
|
| Brief content | Target file |
|
|
121
96
|
|:---|:---|
|
|
122
97
|
| Project identity, target users, success metrics, references | `[[__DOCS_DIR__]]/global/vision.md` |
|
|
123
|
-
| Tech stack, deploy target, 3rd-party libs/services | rule file `
|
|
124
|
-
| Style/tone
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
| Core
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
135
|
-
|
|
98
|
+
| Tech stack, deploy target, 3rd-party libs/services | rule file `tech_stack` |
|
|
99
|
+
| Style/tone — aesthetic direction / density / motion preference | `tech_stack` (UI Protocol) + `design_tokens.json` |
|
|
100
|
+
| (UI projects only) Aesthetic preset + visual reference (brand palette / font / icon / competitor screenshots) | `design_tokens.json` corresponding fields + `vision.md` Visual Reference |
|
|
101
|
+
| (UI projects only) Images in brief-assets/ tagged `[competitor reference]` | `design_tokens.json` aestheticDirection reference + `vision.md` Visual Reference |
|
|
102
|
+
| Core task list | `[[__DOCS_DIR__]]/global/roadmap.json` |
|
|
103
|
+
| Business process (if any) | Inject into Roadmap task `description` / `goal`; aids `/archi.plan` context |
|
|
104
|
+
| Pre-defined design decisions | Inject into Roadmap task `goal`; hard constraint in `/archi.plan` |
|
|
105
|
+
| (Data projects only) Data model draft (if any) | `data_snapshot.json` initial entity skeleton |
|
|
106
|
+
| (API projects only) Existing API endpoints (if any) | `vision.md` Context + Roadmap task `description` injection |
|
|
107
|
+
| Files in brief-assets/ tagged `[database Schema]` | Parse and write to `data_snapshot.json` |
|
|
108
|
+
| Files in brief-assets/ tagged `[API docs]` | Parse and route to `vision.md` Context + related Roadmap tasks |
|
|
109
|
+
| Boundaries and anti-goals | `vision.md` Boundaries |
|
|
110
|
+
| Existing resources | `vision.md` + `tech_stack` by content |
|
|
111
|
+
| Rules/conventions/preferences from supplementary notes | rule file `90_custom_rules` |
|
|
112
|
+
| Domain terminology from supplementary notes | `dictionary.json` |
|
|
113
|
+
| Other background from supplementary notes | `vision.md` Context |
|
|
114
|
+
|
|
115
|
+
> Key: Rule-like content in supplementary notes must go to `90_custom_rules`; do not discard.
|
|
136
116
|
|
|
137
117
|
### 3.1 Vision (`[[__DOCS_DIR__]]/global/vision.md`)
|
|
138
|
-
- Fill from Brief
|
|
139
|
-
- Fill
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
- Fill all Section 1-9 (Global Mandates, Technology Selection, Coding Standards, UI Protocol[?UI], Testing, Deployment, Architecture, Anti-Patterns, **Project Conventions**)
|
|
151
|
-
- Section 5 Testing: Environment Scripts must be complete
|
|
152
|
-
- **Section 9 Project Conventions**: Establish global architecture conventions based on Brief and project features. `/archi.plan` will auto-inherit these instead of re-asking per feature:
|
|
153
|
-
- **Error Handling**: Infer from project type — [?UI] Fail Fast + Form Validation; [?CLI] Fail Fast (stderr); [?API] Schema Validation + Fail Fast; space-separated for multi-select
|
|
154
|
-
- [?UI] **Data Flow**: Based on realtime needs — no realtime → Standard Request (+ SWR/React Query if applicable); Brief mentions realtime/collab → Realtime
|
|
155
|
-
- [?Web/API] **Auth & Access**: Based on Brief user roles — single role → Authenticated; multi-role → RBAC; no auth mentioned → leave empty for per-feature decision in Plan
|
|
156
|
-
- Each item must have Strategy/Default + Rationale (rationale must be specific to this project)
|
|
118
|
+
- Fill from Brief: Core Vision / Target Audience / Boundaries / Design & Experience / Product Principles / background context
|
|
119
|
+
- Fill all placeholders; do not retain template example text
|
|
120
|
+
|
|
121
|
+
### 3.2 Tech Stack (rule file `tech_stack`)
|
|
122
|
+
- Brief confirmed → write directly | Blank/"recommend" → AI recommends and mark `(AI Recommended)` + rationale
|
|
123
|
+
- **AX Optimization**: Prefer AI-friendly tech when recommending
|
|
124
|
+
- Fill complete Section 1-9
|
|
125
|
+
- **Section 9 Project Conventions**: Establish global conventions by project features (Error Handling / Data Flow / Auth & Access); `/archi.plan` will auto-inherit
|
|
126
|
+
- Error Handling: (UI projects only) Fail Fast + Form Validation / (CLI projects only) Fail Fast (stderr) / (API projects only) Schema Validation + Fail Fast
|
|
127
|
+
- (UI projects only) Data Flow: No realtime need → Standard Request / Brief mentions realtime → Realtime
|
|
128
|
+
- (UI or API projects only) Auth & Access: Single role → Authenticated / Multi-role → RBAC / No description → leave empty for Plan
|
|
129
|
+
- Each item must have Strategy/Default + Rationale
|
|
157
130
|
|
|
158
131
|
### 3.3 Custom Rules (rule file `90_custom_rules`)
|
|
159
|
-
- Extract rule-like content from Brief supplementary notes
|
|
160
|
-
- Convert Brief tech red lines into concrete prohibitions
|
|
161
|
-
- If user provided nothing, keep template default
|
|
132
|
+
- Extract rule-like content from Brief supplementary notes + convert tech red lines to prohibitions
|
|
162
133
|
|
|
163
134
|
### 3.4 Roadmap (`[[__DOCS_DIR__]]/global/roadmap.json`)
|
|
164
|
-
[[SKILL: archi-decompose-roadmap|Follow the skill protocol to generate
|
|
135
|
+
[[SKILL: archi-decompose-roadmap|Follow the skill protocol to generate task chain from Brief task list, write to roadmap.json; proceed to next step immediately without user confirmation.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-decompose-roadmap/SKILL.md` and follow its protocol)]]
|
|
165
136
|
|
|
166
137
|
### 3.5 Other global docs (as needed)
|
|
167
138
|
- `dictionary.json`: Extract domain terms from Brief
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
- `error_codes.json`: Predefine core error codes from feature list
|
|
139
|
+
- (Data projects only) `data_snapshot.json`: Initialize core entity skeleton; write empty template if no data description
|
|
140
|
+
- (UI projects only) `design_tokens.json`: Fill aestheticDirection / primitivePalette / mode / motion / illustration / semanticTokens from "Style & Tone" and "Visual Reference"
|
|
141
|
+
- `error_codes.json`: Predefine core error codes from task list
|
|
142
|
+
- (API projects only) `api_snapshot.json`: Initial endpoint registration; extract from Brief if API description exists, otherwise write empty template
|
|
143
|
+
- `env_registry.json`: Initial env var registration
|
|
144
|
+
- (CLI projects only) `command_api.json`: Initial command registration; extract from Brief if command description exists, otherwise write empty template
|
|
145
|
+
- (Lib projects only) `public_api.json`: Initial export registration; extract from Brief if export description exists, otherwise write empty template
|
|
146
|
+
|
|
147
|
+
UI projects only: **UI concept design**: Skip — completed independently by `/archi.ui`. Only ensure `design_tokens.json` is populated.
|
|
178
148
|
|
|
179
149
|
### 3.6 Map (`[[__DOCS_DIR__]]/global/map.json`)
|
|
180
|
-
- `directoryMapping`: Pre-register core directory skeleton
|
|
181
|
-
|
|
182
|
-
- `logicalTopology`: Empty array for now; populate during `/archi.plan`
|
|
183
|
-
- `criticalUserJourneys`: Empty array
|
|
184
|
-
- `featureRelations`: Empty array
|
|
150
|
+
- `directoryMapping`: Pre-register core directory skeleton from tech_stack architecture pattern
|
|
151
|
+
- `logicalTopology` / `criticalUserJourneys` / `featureRelations`: Empty array for now
|
|
185
152
|
|
|
186
|
-
|
|
153
|
+
UI projects only: **UI concept design**: Skip — completed independently by `/archi.ui`.
|
|
154
|
+
|
|
155
|
+
**Output**: Write all files, then run `npx archi render`. Enter step_4_verify.
|
|
187
156
|
</step_3_constitution>
|
|
188
157
|
|
|
189
158
|
<step_4_verify>
|
|
190
159
|
**Role**: Independent Reviewer
|
|
191
|
-
|
|
192
160
|
[[SUBAGENT: archi-silent-audit|mode: init, context: Review step_3 generated global files (vision, tech_stack, roadmap, dictionary, etc.)]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-silent-audit/SKILL.md`, follow mode: init review dimension table item by item)]]
|
|
193
161
|
|
|
194
162
|
[[INCLUDE: shared/verify-result-handling.md]]
|
|
195
163
|
</step_4_verify>
|
|
196
164
|
|
|
197
|
-
<step_4_5_ui_wireframe>
|
|
198
|
-
**Trigger**: Only when project features include [?UI].
|
|
199
|
-
**Action**: [[SKILL: archi-ui-wireframe|Follow the skill protocol to auto-invoke Phase 1 wireframe generation.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-ui-wireframe/SKILL.md` and follow its protocol)]]
|
|
200
|
-
- Start generation without user confirmation
|
|
201
|
-
- Read the just-written vision.md + roadmap.json + design_tokens.json + 02_tech_stack
|
|
202
|
-
- Write `ui_concept.html` + `ui_context.md`
|
|
203
|
-
- Output Phase 1 wireframe summary; await user confirmation before entering Phase 2 styling
|
|
204
|
-
|
|
205
|
-
> This step promotes UI wireframe generation from "recommended next step" to "auto-completed by start", reducing manual user actions.
|
|
206
|
-
</step_4_5_ui_wireframe>
|
|
207
|
-
|
|
208
165
|
<step_5_signoff>
|
|
209
|
-
**Terminal Gate** (
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
166
|
+
**Terminal Gate** (do not skip): Standard check (task --check + render).
|
|
167
|
+
|
|
168
|
+
**Pre-signoff Checklist** (confirm each item after Gate passes, before Output):
|
|
169
|
+
□ vision.md — all placeholders replaced, no template example text remaining
|
|
170
|
+
□ tech_stack.md — Sections 1-9 fully filled, Section 9 Project Conventions includes Strategy + Rationale
|
|
171
|
+
□ roadmap.json — archi-decompose-roadmap Skill executed, task chain generated
|
|
172
|
+
□ map.json — core directory skeleton pre-registered (directoryMapping)
|
|
173
|
+
□ dictionary.json + error_codes.json + env_registry.json — domain terms, core error codes, env vars extracted
|
|
174
|
+
□ (UI projects only) design_tokens.json — generated
|
|
175
|
+
□ (Data projects only) data_snapshot.json — initial entity skeleton written
|
|
176
|
+
□ (API projects only) api_snapshot.json — initial API endpoints registered
|
|
177
|
+
□ (CLI projects only) command_api.json — initial CLI commands registered
|
|
178
|
+
□ (Lib projects only) public_api.json — initial lib exports registered
|
|
179
|
+
□ Step 4 Silent Audit — executed, all CRITICAL issues resolved
|
|
180
|
+
|
|
181
|
+
**Action** (after Checklist confirmed):
|
|
182
|
+
1. Run `npx archi task` to output task progress overview.
|
|
217
183
|
2. Output summary.
|
|
218
184
|
|
|
219
|
-
**Output**: Project init summary including:
|
|
220
|
-
- **Brief
|
|
185
|
+
**Output**: Project init summary, including:
|
|
186
|
+
- **Brief source confirmation**: Key decisions adopted from Brief
|
|
221
187
|
- **AI completions**: Tech/decisions AI recommended and rationale
|
|
222
188
|
- **Roadmap overview**: Task count and phase distribution
|
|
223
189
|
- **Next Steps table**:
|
|
224
190
|
|
|
225
191
|
| Priority | Action | Notes |
|
|
226
192
|
|:---|:---|:---|
|
|
227
|
-
|
|
|
193
|
+
| (UI projects only) Recommended | `/archi.ui` | Generate UI concept design (`screens/` multi-file structure) |
|
|
228
194
|
| Recommended | `/archi.plan INF-01` | Plan the first infrastructure task |
|
|
229
|
-
|
|
|
195
|
+
| (Post-INF) | `/archi.script` | Generate AI automation scripts (validate/dev-up/dev-reset) |
|
|
196
|
+
| Optional | `/archi.scope <scope-brief.md>` | If more requirements to decompose, append to Roadmap |
|
|
230
197
|
</step_5_signoff>
|
|
231
198
|
|
|
232
199
|
<fallback_interview>
|
|
233
200
|
**Trigger**: Brief file not found or empty.
|
|
234
|
-
**Role**: Product Advisor
|
|
235
201
|
|
|
236
202
|
**Action**:
|
|
237
|
-
1.
|
|
203
|
+
1. Inform user `project-brief.md` not found. Suggest:
|
|
238
204
|
- Check project root for the file (should have been generated by `npx archi init`)
|
|
239
205
|
- If lost, re-run `npx archi init` to regenerate
|
|
240
206
|
- Or continue conversation and provide info via interview
|
|
241
|
-
2. If user
|
|
207
|
+
2. If user chooses to continue conversation, guide in this order:
|
|
242
208
|
a. What is the project? (name, one-line description, problem solved)
|
|
243
209
|
b. Who is it for? (target users)
|
|
244
|
-
c.
|
|
210
|
+
c. What are the core tasks? (at least 2–3)
|
|
245
211
|
d. Tech stack? (language/framework, confirmed parts)
|
|
246
|
-
e.
|
|
212
|
+
e. What constraints? (anti-goals, timeline, compatibility)
|
|
247
213
|
3. After collection, write to `project-brief.md` (project root), then goto `<step_1_gap_analysis>`.
|
|
248
214
|
|
|
249
|
-
>
|
|
215
|
+
> This mode is for backward compatibility; core flow remains Brief-driven.
|
|
250
216
|
</fallback_interview>
|
|
251
217
|
|
|
252
218
|
</protocol_kickoff>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<protocol_ui>
|
|
2
|
+
**Trigger**: `/archi.ui` | Auto-loaded by Workflow Dispatch on natural language trigger
|
|
3
|
+
**Goal**: Generate or incrementally update multi-file UI concept designs (`screens/` directory).
|
|
4
|
+
|
|
5
|
+
<meta>
|
|
6
|
+
<style>Visual, Systematic, Incremental</style>
|
|
7
|
+
<language>English</language>
|
|
8
|
+
<principles>
|
|
9
|
+
1. **Auto-Detect**: No subcommands; automatically detects `screens/` directory state to decide full generation or incremental update.
|
|
10
|
+
2. **Multi-File**: Each screen as independent `S-XX.html`, shared styles in `_shared.css`, `index.html` as navigation hub.
|
|
11
|
+
3. **Token-Driven**: Visual styles strictly from `design_tokens.json`; no hardcoding.
|
|
12
|
+
4. **IDE-Native First**: Leverage IDE native capabilities to drive execution rhythm; this protocol defines quality standards and checkpoints without fighting IDE planning/execution mechanisms.
|
|
13
|
+
</principles>
|
|
14
|
+
</meta>
|
|
15
|
+
|
|
16
|
+
<step_1_load>
|
|
17
|
+
**Action**:
|
|
18
|
+
1. **Pre-flight**: Check `architext.json` → `features` contains `ui`. If not → reject ("UI feature not enabled for this project").
|
|
19
|
+
2. **Load**: vision.md (platform/users/north star), roadmap.json (UI-related tasks), design_tokens.json, tech_stack.md (platform/navigation framework), ui_context.md (if exists).
|
|
20
|
+
3. **Mode Detection**:
|
|
21
|
+
|
|
22
|
+
| Condition | Mode | Behavior |
|
|
23
|
+
|:---|:---|:---|
|
|
24
|
+
| `screens/` directory does not exist | **Full Generation** | Extract all UI screens from roadmap → step_2 |
|
|
25
|
+
| `screens/` exists | **Incremental Update** | Compare roadmap + ui_context.md, identify new/changed screens → step_2 |
|
|
26
|
+
|
|
27
|
+
**Output**: Mode determination + context summary. Proceed to step_2_plan.
|
|
28
|
+
</step_1_load>
|
|
29
|
+
|
|
30
|
+
<step_2_plan>
|
|
31
|
+
**Action**:
|
|
32
|
+
|
|
33
|
+
**Full mode**: Extract all UI-related screens from roadmap tasks, assign screen IDs (S-01, S-02...).
|
|
34
|
+
**Incremental mode**: Compare existing `screens/` with roadmap, identify differences:
|
|
35
|
+
|
|
36
|
+
| Diff Type | Action |
|
|
37
|
+
|:---|:---|
|
|
38
|
+
| New screen (roadmap has task but no corresponding S-XX) | Assign new ID, add to generation list |
|
|
39
|
+
| Screen change (existing screen's task has requirement changes) | Add to update list |
|
|
40
|
+
| No change | Skip |
|
|
41
|
+
|
|
42
|
+
**Tokens Check**: Check `design_tokens.json`:
|
|
43
|
+
- `aestheticDirection.preset` empty → guide selection
|
|
44
|
+
- `primitivePalette.brand` empty → guide Hex input
|
|
45
|
+
- Other empty values → AI infers, non-blocking
|
|
46
|
+
|
|
47
|
+
**Output**: Screen plan list (ID / Name / Task / States / Action: add/update/skip).
|
|
48
|
+
|
|
49
|
+
**Gate**: User replies **OK** to proceed to step_3_generate; no file generation without confirmation.
|
|
50
|
+
</step_2_plan>
|
|
51
|
+
|
|
52
|
+
<step_2_5_refinement>
|
|
53
|
+
**Trigger**: User replies non-OK, with corrections, screen additions/removals, or mapping adjustments.
|
|
54
|
+
**Action**: Incorporate feedback, refresh screen plan list and re-output, await confirmation.
|
|
55
|
+
|
|
56
|
+
User replies OK → proceed to step_3_generate.
|
|
57
|
+
</step_2_5_refinement>
|
|
58
|
+
|
|
59
|
+
<step_3_generate>
|
|
60
|
+
**Action**: Call Skill for actual generation.
|
|
61
|
+
|
|
62
|
+
[[SKILL: archi-ui-wireframe|Follow skill protocol to generate multi-file UI concept designs based on confirmed screen plan. Full mode generates all screens; incremental mode generates only new/changed screens.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-ui-wireframe/SKILL.md` and follow its protocol)]]
|
|
63
|
+
|
|
64
|
+
**Artifacts**:
|
|
65
|
+
- `[[__DOCS_DIR__]]/global/screens/_shared.css` — CSS variables (from design_tokens) + base layout + control bar styles
|
|
66
|
+
- `[[__DOCS_DIR__]]/global/screens/S-XX.html` — Each screen as independent file
|
|
67
|
+
- `[[__DOCS_DIR__]]/global/screens/index.html` — Navigation hub listing all screens
|
|
68
|
+
- `[[__DOCS_DIR__]]/global/ui_context.md` — AI screen index (routes reference `screens/S-XX.html`)
|
|
69
|
+
|
|
70
|
+
**Output**: Generated file list + change summary. Proceed to step_4_verify.
|
|
71
|
+
</step_3_generate>
|
|
72
|
+
|
|
73
|
+
<step_4_verify>
|
|
74
|
+
**Role**: Independent Reviewer
|
|
75
|
+
|
|
76
|
+
**Verification checklist**:
|
|
77
|
+
|
|
78
|
+
| Check | Pass Criteria |
|
|
79
|
+
|:---|:---|
|
|
80
|
+
| File completeness | `screens/` contains `index.html` + `_shared.css` + all `S-XX.html` |
|
|
81
|
+
| Cross-file links | All `S-XX.html` links in `index.html` are valid; each `S-XX.html` has back-to-index link |
|
|
82
|
+
| CSS references | Each `S-XX.html` references `_shared.css`; CSS variables from design_tokens |
|
|
83
|
+
| State coverage | Each screen contains default + applicable states (loading/empty/error) |
|
|
84
|
+
| ui_context.md | Screen index routes reference `screens/S-XX.html` paths |
|
|
85
|
+
| (Incremental) Existing screens | Unmodified screen files were not overwritten |
|
|
86
|
+
|
|
87
|
+
Failed items → fix and recheck. All pass → proceed to step_5_signoff.
|
|
88
|
+
</step_4_verify>
|
|
89
|
+
|
|
90
|
+
<step_5_signoff>
|
|
91
|
+
**Pre-signoff Checklist** (confirm before output):
|
|
92
|
+
□ `screens/` directory structure complete (index.html + _shared.css + S-XX.html)
|
|
93
|
+
□ `ui_context.md` generated/updated with correct path references
|
|
94
|
+
□ Step 4 verification all passed
|
|
95
|
+
□ (Incremental) Only target screens modified, other files unchanged
|
|
96
|
+
|
|
97
|
+
**Output**: UI concept design summary:
|
|
98
|
+
- **Mode**: Full generation / Incremental update
|
|
99
|
+
- **Screen coverage**: N screens total (X new / Y updated / Z retained)
|
|
100
|
+
- **Aesthetic direction**: preset + brand color
|
|
101
|
+
- **File list**: Generated/modified files
|
|
102
|
+
|
|
103
|
+
**User confirmation**: Reply **OK** to finish; non-OK enters Refinement (calls Skill for partial update).
|
|
104
|
+
|
|
105
|
+
**Next Steps**:
|
|
106
|
+
|
|
107
|
+
| Priority | Action | Description |
|
|
108
|
+
|:---|:---|:---|
|
|
109
|
+
| Recommended | Open `screens/index.html` in browser | Verify layout and visual design |
|
|
110
|
+
| 1 | `/archi.plan <first pending task ID>` | Start planning tasks |
|
|
111
|
+
</step_5_signoff>
|
|
112
|
+
|
|
113
|
+
</protocol_ui>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
**UI Design Red Lines (Anti-patterns)**:
|
|
2
|
+
- **No purple-gradient-on-white** — AI default aesthetic signature
|
|
3
|
+
- **No emoji as icons** (🔔📁⚙️) → use self-drawn SVG or declared icon library
|
|
4
|
+
- **No identical centered-card layout for all screens** → list/detail/form must differ
|
|
5
|
+
- **No pure-black + pure-white** → use layered grays
|
|
6
|
+
- **No generic feel** → opening must instantly identify aesthetic (Linear vs Notion vs Grafana)
|
|
7
|
+
- **No hardcoding** — use Tokens for colors, variables for spacing, no magic numbers
|
|
@@ -79,7 +79,7 @@ description: Task Specification for {FEATURE_NAME}.
|
|
|
79
79
|
|
|
80
80
|
## 5. Constraints
|
|
81
81
|
|
|
82
|
-
<!-- [AI]: Extract red-line constraints relevant to this task from vision.md +
|
|
82
|
+
<!-- [AI]: Extract red-line constraints relevant to this task from vision.md + tech_stack.md.
|
|
83
83
|
|
|
84
84
|
Format:
|
|
85
85
|
- [constraint content] (ref: [source])
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Task-level UI scope declaration —
|
|
2
|
+
description: Task-level UI scope declaration — describes the screens/component scope this task owns. Screen IDs from ui_context.md; visual prototype in screens/ (for humans).
|
|
3
3
|
glue: Screen IDs referenced from [[__DOCS_DIR__]]/global/ui_context.md. Do not redefine global layout or navigation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# UI Scope: {FEATURE_NAME}
|
|
7
7
|
|
|
8
8
|
> **Screen Index**: `[[__DOCS_DIR__]]/global/ui_context.md` (AI reads screen IDs and navigation graph)
|
|
9
|
-
> **Visual Prototype**: `[[__DOCS_DIR__]]/global/
|
|
9
|
+
> **Visual Prototype**: `[[__DOCS_DIR__]]/global/screens/index.html` (human browser preview, individual screens at `screens/S-XX.html`)
|
|
10
10
|
> **Tokens**: `[[__DOCS_DIR__]]/global/design_tokens.json`
|
|
11
11
|
> **Protocol**: ITP v3.0 (scope limited to components within this task's boundary)
|
|
12
12
|
|
|
@@ -27,15 +27,15 @@ glue: Screen IDs referenced from [[__DOCS_DIR__]]/global/ui_context.md. Do not r
|
|
|
27
27
|
```text
|
|
28
28
|
[ScreenName > modified area]
|
|
29
29
|
NewComponent [Col, Gap:4] ← added by this task
|
|
30
|
-
ExistingComponent ← ref:
|
|
30
|
+
ExistingComponent ← ref: screens/S-XX.html (no modification)
|
|
31
31
|
#NewSubComponents
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
> **Reference rule**: Components already defined in `
|
|
34
|
+
> **Reference rule**: Components already defined in `screens/S-XX.html` → `ref: screens/S-XX.html#ComponentName`; do not copy-paste their structure.
|
|
35
35
|
|
|
36
36
|
## 3. Interactions (new interactions introduced by this task)
|
|
37
37
|
|
|
38
|
-
<!-- [AI]: List only interactions introduced by this task; do not repeat interactions already in
|
|
38
|
+
<!-- [AI]: List only interactions introduced by this task; do not repeat interactions already in screens/S-XX.html -->
|
|
39
39
|
|
|
40
40
|
| Trigger | Target | Action |
|
|
41
41
|
|:---|:---|:---|
|
|
@@ -43,9 +43,9 @@ glue: Screen IDs referenced from [[__DOCS_DIR__]]/global/ui_context.md. Do not r
|
|
|
43
43
|
|
|
44
44
|
## 4. States (state rendering owned by this task)
|
|
45
45
|
|
|
46
|
-
<!-- [AI]: If
|
|
46
|
+
<!-- [AI]: If screens/S-XX.html already fully describes the states, this section may be omitted or only note deltas -->
|
|
47
47
|
|
|
48
|
-
| State | Delta from
|
|
48
|
+
| State | Delta from screens/S-XX.html |
|
|
49
49
|
|:---|:---|
|
|
50
|
-
| `loading` | Same as
|
|
50
|
+
| `loading` | Same as screens/S-XX.html loading (no delta) |
|
|
51
51
|
| `empty` | Different copy for this task's empty state: "{specific copy}" |
|