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.
- package/CHANGELOG.md +63 -0
- package/LICENSE +21 -0
- package/README.md +326 -0
- package/README.zh-CN.md +326 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +46 -0
- package/dist/templates/en/briefs/_base.md +115 -0
- package/dist/templates/en/briefs/_modules.md +173 -0
- package/dist/templates/en/docs/global/data_snapshot.json +31 -0
- package/dist/templates/en/docs/global/design_tokens.json +150 -0
- package/dist/templates/en/docs/global/dictionary.json +35 -0
- package/dist/templates/en/docs/global/error_codes.json +19 -0
- package/dist/templates/en/docs/global/map.json +94 -0
- package/dist/templates/en/docs/global/roadmap.json +39 -0
- package/dist/templates/en/docs/global/vision.md +82 -0
- package/dist/templates/en/docs/prompts/audit.md +150 -0
- package/dist/templates/en/docs/prompts/code.md +160 -0
- package/dist/templates/en/docs/prompts/edit.md +87 -0
- package/dist/templates/en/docs/prompts/fix.md +86 -0
- package/dist/templates/en/docs/prompts/help.md +69 -0
- package/dist/templates/en/docs/prompts/inherit.md +270 -0
- package/dist/templates/en/docs/prompts/map.md +131 -0
- package/dist/templates/en/docs/prompts/plan.md +252 -0
- package/dist/templates/en/docs/prompts/remove.md +162 -0
- package/dist/templates/en/docs/prompts/revise.md +160 -0
- package/dist/templates/en/docs/prompts/scope.md +198 -0
- package/dist/templates/en/docs/prompts/start.md +258 -0
- package/dist/templates/en/docs/templates/plan.template.json +113 -0
- package/dist/templates/en/docs/templates/scope-brief.template.md +58 -0
- package/dist/templates/en/docs/templates/spec.template.md +51 -0
- package/dist/templates/en/docs/templates/ui.template.md +51 -0
- package/dist/templates/en/rules/00_system.md +123 -0
- package/dist/templates/en/rules/01_workflow.md +93 -0
- package/dist/templates/en/rules/02_tech_stack.md +197 -0
- package/dist/templates/en/rules/03_data_governance.md +102 -0
- package/dist/templates/en/rules/04_cli_tools.md +50 -0
- package/dist/templates/en/rules/90_custom_rules.md +22 -0
- package/dist/templates/en/rules/99_context_glue.md +53 -0
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +292 -0
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +86 -0
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +364 -0
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +342 -0
- package/dist/templates/zh/briefs/_base.md +116 -0
- package/dist/templates/zh/briefs/_modules.md +173 -0
- package/dist/templates/zh/docs/global/data_snapshot.json +31 -0
- package/dist/templates/zh/docs/global/design_tokens.json +135 -0
- package/dist/templates/zh/docs/global/dictionary.json +35 -0
- package/dist/templates/zh/docs/global/error_codes.json +19 -0
- package/dist/templates/zh/docs/global/map.json +94 -0
- package/dist/templates/zh/docs/global/roadmap.json +39 -0
- package/dist/templates/zh/docs/global/vision.md +82 -0
- package/dist/templates/zh/docs/prompts/audit.md +150 -0
- package/dist/templates/zh/docs/prompts/code.md +160 -0
- package/dist/templates/zh/docs/prompts/edit.md +87 -0
- package/dist/templates/zh/docs/prompts/fix.md +86 -0
- package/dist/templates/zh/docs/prompts/help.md +69 -0
- package/dist/templates/zh/docs/prompts/inherit.md +270 -0
- package/dist/templates/zh/docs/prompts/map.md +131 -0
- package/dist/templates/zh/docs/prompts/plan.md +253 -0
- package/dist/templates/zh/docs/prompts/remove.md +162 -0
- package/dist/templates/zh/docs/prompts/revise.md +160 -0
- package/dist/templates/zh/docs/prompts/scope.md +198 -0
- package/dist/templates/zh/docs/prompts/start.md +258 -0
- package/dist/templates/zh/docs/templates/plan.template.json +88 -0
- package/dist/templates/zh/docs/templates/scope-brief.template.md +58 -0
- package/dist/templates/zh/docs/templates/spec.template.md +51 -0
- package/dist/templates/zh/docs/templates/ui.template.md +51 -0
- package/dist/templates/zh/rules/00_system.md +123 -0
- package/dist/templates/zh/rules/01_workflow.md +93 -0
- package/dist/templates/zh/rules/02_tech_stack.md +192 -0
- package/dist/templates/zh/rules/03_data_governance.md +102 -0
- package/dist/templates/zh/rules/04_cli_tools.md +50 -0
- package/dist/templates/zh/rules/90_custom_rules.md +21 -0
- package/dist/templates/zh/rules/99_context_glue.md +53 -0
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +293 -0
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +86 -0
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +364 -0
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +339 -0
- package/dist/templates/zh-Hant/briefs/_base.md +115 -0
- package/dist/templates/zh-Hant/briefs/_modules.md +173 -0
- package/dist/templates/zh-Hant/docs/global/data_snapshot.json +31 -0
- package/dist/templates/zh-Hant/docs/global/design_tokens.json +135 -0
- package/dist/templates/zh-Hant/docs/global/dictionary.json +35 -0
- package/dist/templates/zh-Hant/docs/global/error_codes.json +19 -0
- package/dist/templates/zh-Hant/docs/global/map.json +94 -0
- package/dist/templates/zh-Hant/docs/global/roadmap.json +39 -0
- package/dist/templates/zh-Hant/docs/global/vision.md +82 -0
- package/dist/templates/zh-Hant/docs/prompts/audit.md +150 -0
- package/dist/templates/zh-Hant/docs/prompts/code.md +160 -0
- package/dist/templates/zh-Hant/docs/prompts/edit.md +87 -0
- package/dist/templates/zh-Hant/docs/prompts/fix.md +86 -0
- package/dist/templates/zh-Hant/docs/prompts/help.md +69 -0
- package/dist/templates/zh-Hant/docs/prompts/inherit.md +270 -0
- package/dist/templates/zh-Hant/docs/prompts/map.md +131 -0
- package/dist/templates/zh-Hant/docs/prompts/plan.md +252 -0
- package/dist/templates/zh-Hant/docs/prompts/remove.md +162 -0
- package/dist/templates/zh-Hant/docs/prompts/revise.md +160 -0
- package/dist/templates/zh-Hant/docs/prompts/scope.md +198 -0
- package/dist/templates/zh-Hant/docs/prompts/start.md +258 -0
- package/dist/templates/zh-Hant/docs/templates/plan.template.json +88 -0
- package/dist/templates/zh-Hant/docs/templates/scope-brief.template.md +58 -0
- package/dist/templates/zh-Hant/docs/templates/spec.template.md +51 -0
- package/dist/templates/zh-Hant/docs/templates/ui.template.md +51 -0
- package/dist/templates/zh-Hant/rules/00_system.md +123 -0
- package/dist/templates/zh-Hant/rules/01_workflow.md +93 -0
- package/dist/templates/zh-Hant/rules/02_tech_stack.md +192 -0
- package/dist/templates/zh-Hant/rules/03_data_governance.md +102 -0
- package/dist/templates/zh-Hant/rules/04_cli_tools.md +50 -0
- package/dist/templates/zh-Hant/rules/90_custom_rules.md +21 -0
- package/dist/templates/zh-Hant/rules/99_context_glue.md +53 -0
- package/dist/templates/zh-Hant/skills/archi-decompose-roadmap/SKILL.md +293 -0
- package/dist/templates/zh-Hant/skills/archi-interview-protocol/SKILL.md +86 -0
- package/dist/templates/zh-Hant/skills/archi-plan-options/SKILL.md +364 -0
- package/dist/templates/zh-Hant/skills/archi-ui-wireframe/SKILL.md +337 -0
- package/package.json +85 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
<protocol_kickoff>
|
|
2
|
+
**Trigger**: `/archi.start [file_path]`
|
|
3
|
+
**Phase**: Strategic Initialization
|
|
4
|
+
**Goal**: Establish Project Constitution (Vision/Tech/Roadmap) from Project Brief.
|
|
5
|
+
|
|
6
|
+
<meta>
|
|
7
|
+
<style>Strict, Professional, CLI-Like</style>
|
|
8
|
+
<language>English</language>
|
|
9
|
+
<principles>
|
|
10
|
+
1. **Brief-Driven**: User-provided Brief file is the core input; no task brainstorming from thin air.
|
|
11
|
+
2. **AI-Native Perspective**: All recommendations/completions from AI Agent perspective. Focus: Context Locality, Type Safety, Hallucination Risk, Self-Correction.
|
|
12
|
+
3. **User Agency First**: User-filled choices in Brief must be adopted directly; do not question or replace.
|
|
13
|
+
4. **Minimal Questions**: Ask only for information gaps; skip Step 2 when Brief is sufficient.
|
|
14
|
+
5. **Option Z Everywhere**: Supplementary questions must include `[Z] Custom`.
|
|
15
|
+
</principles>
|
|
16
|
+
</meta>
|
|
17
|
+
|
|
18
|
+
<step_0_ingest>
|
|
19
|
+
**Role**: Intelligence Analyst
|
|
20
|
+
**Action**:
|
|
21
|
+
1. Parse `[file_path]` from trigger:
|
|
22
|
+
- If path provided → read that file
|
|
23
|
+
- If not → search `project-brief.md` (project root), then `[[__DOCS_DIR__]]/project-brief.md`
|
|
24
|
+
- If neither exists or empty → goto `<fallback_interview>`
|
|
25
|
+
|
|
26
|
+
2. **Resource Accessibility Check** (must complete before parsing):
|
|
27
|
+
Scan Brief for all external references (URLs, file paths, images). Try to access each; classify:
|
|
28
|
+
|
|
29
|
+
| Status | Handling |
|
|
30
|
+
|:---|:---|
|
|
31
|
+
| Accessible | Read content, include in analysis |
|
|
32
|
+
| Inaccessible (auth required/404/private) | Mark `[unreadable]`, report to user later |
|
|
33
|
+
| Non-link references (e.g. "reference Linear's interaction") | Process normally, no fetch |
|
|
34
|
+
|
|
35
|
+
> Purpose: Avoid AI pretending it read resources it cannot access, leading to mismatched output.
|
|
36
|
+
|
|
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)
|
|
46
|
+
|
|
47
|
+
> Brief is a one-time input file; user may delete after processing.
|
|
48
|
+
|
|
49
|
+
**Output**:
|
|
50
|
+
- If any resources inaccessible → **Immediately output Resource Accessibility Report** to user, list unreadable links, ask for alternatives (screenshot, paste content, text description). Wait for user reply before continuing.
|
|
51
|
+
- If all accessible or no external refs → Internal summary (no user output), proceed to `<step_1_gap_analysis>`.
|
|
52
|
+
</step_0_ingest>
|
|
53
|
+
|
|
54
|
+
<step_1_gap_analysis>
|
|
55
|
+
**Role**: Chief Product Officer (CPO)
|
|
56
|
+
**Input**: Step 0 parsing result.
|
|
57
|
+
|
|
58
|
+
**Action**: Check Brief completeness, identify information gaps.
|
|
59
|
+
|
|
60
|
+
**Checklist**:
|
|
61
|
+
|
|
62
|
+
| Item | Criteria | Gap Level |
|
|
63
|
+
|:---|:---|:---|
|
|
64
|
+
| Project identity | Name + one-line description + problem statement all filled | Required |
|
|
65
|
+
| Target users | At least core user role described | Required |
|
|
66
|
+
| Core features | At least 2 concrete features, each with description | Required |
|
|
67
|
+
| Tech stack – core | Language/runtime + core framework filled (non-empty) | Required |
|
|
68
|
+
| Tech stack – optional | DB/ORM/CSS/deploy etc. blanks | Can supplement |
|
|
69
|
+
| Project starting point | New project or existing codebase (affects architecture) | Required |
|
|
70
|
+
| Existing resources | Design/brand/existing API/3rd-party services explicit? | Can supplement |
|
|
71
|
+
| Style/tone | [?UI] Visual keywords / [?CLI] Output style / [?API] Doc approach | Can supplement |
|
|
72
|
+
| Boundaries | At least 1 anti-goal or hard constraint declared | Suggested |
|
|
73
|
+
| Success metrics | Concrete quantifiable metrics filled | Suggested |
|
|
74
|
+
| Reference projects | At least 1 reference listed | Suggested |
|
|
75
|
+
|
|
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
|
|
84
|
+
|
|
85
|
+
**Output**: Brief analysis summary:
|
|
86
|
+
```
|
|
87
|
+
### BRIEF Analysis Report
|
|
88
|
+
> **Project**: [name] | **Features**: [activated UI/Data/CLI/Lib/API tags]
|
|
89
|
+
|
|
90
|
+
**Confirmed**:
|
|
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
|
+
```
|
|
100
|
+
</step_1_gap_analysis>
|
|
101
|
+
|
|
102
|
+
<step_2_supplementary>
|
|
103
|
+
**Role**: Product Advisor
|
|
104
|
+
**Trigger**: Only when Step 1 finds "Required" or "Can supplement" gaps.
|
|
105
|
+
**Input**: Step 1 gap list. Max 3–6 questions.
|
|
106
|
+
|
|
107
|
+
[[SKILL: Follow `archi-interview-protocol` 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)]]
|
|
108
|
+
</step_2_supplementary>
|
|
109
|
+
|
|
110
|
+
<step_3_constitution>
|
|
111
|
+
**Role**: Chief Architect
|
|
112
|
+
**Input**: Full Brief text + Step 2 answers (if any).
|
|
113
|
+
|
|
114
|
+
**Action**: Generate project constitution files in one pass. All Brief content must be consumed and routed; nothing omitted.
|
|
115
|
+
|
|
116
|
+
### Information Routing Rules
|
|
117
|
+
|
|
118
|
+
> Rule files (`02_tech_stack`, `90_custom_rules`, etc.) are already injected into context by the IDE — the AI knows their paths; write directly.
|
|
119
|
+
|
|
120
|
+
| Brief content | Target file |
|
|
121
|
+
|:---|:---|
|
|
122
|
+
| Project identity, target users, success metrics, references | `[[__DOCS_DIR__]]/global/vision.md` |
|
|
123
|
+
| Tech stack, deploy target, 3rd-party libs/services | rule file `02_tech_stack` |
|
|
124
|
+
| Style/tone (UI/CLI/API) — aesthetic direction / density / motion | rule file `02_tech_stack` (UI Protocol) + `design_tokens.json` aestheticDirection + motion.preference + illustration |
|
|
125
|
+
| [?UI] **Aesthetic direction** (saas-dark/saas-light/dashboard/marketing/mobile-app/editorial/brutalist/custom) | `design_tokens.json` `aestheticDirection.preset` + `aestheticDirection.customDescription` |
|
|
126
|
+
| [?UI] **Visual Reference** (brand palette / font / icon library / competitor screenshots / forbidden styles) | `design_tokens.json` primitivePalette.brand + illustration + motion; screenshots/URLs → `vision.md` Visual Reference |
|
|
127
|
+
| Core feature list | `[[__DOCS_DIR__]]/global/roadmap.json` |
|
|
128
|
+
| **Pre-defined design decisions** | Inject into related tasks' `goal` in Roadmap; treat as hard constraint in `/archi.plan` |
|
|
129
|
+
| Boundaries and anti-goals | `[[__DOCS_DIR__]]/global/vision.md` Boundaries |
|
|
130
|
+
| Existing resources (design/brand/existing API) | `[[__DOCS_DIR__]]/global/vision.md` + rule file `02_tech_stack` by content |
|
|
131
|
+
| **Rules/conventions/preferences** from supplementary notes | rule file `90_custom_rules` |
|
|
132
|
+
| **Domain terminology** from supplementary notes | `[[__DOCS_DIR__]]/global/dictionary.json` |
|
|
133
|
+
| **Other background info** from supplementary notes | `[[__DOCS_DIR__]]/global/vision.md` Context |
|
|
134
|
+
|
|
135
|
+
> Key: Any rule-like content (e.g. "comments in English", "no any") in supplementary notes must go to rule file `90_custom_rules`, not discarded.
|
|
136
|
+
|
|
137
|
+
### 3.1 Vision (`[[__DOCS_DIR__]]/global/vision.md`)
|
|
138
|
+
- Fill from Brief project overview: Core Vision, Target Audience
|
|
139
|
+
- Fill from Brief boundaries: Boundaries
|
|
140
|
+
- Fill from Brief style/tone (if any): Design & Experience
|
|
141
|
+
- Derive Product Principles from Brief references
|
|
142
|
+
- Extract background context from Brief existing resources + supplementary notes
|
|
143
|
+
- Fill all `[ ]` placeholders; do not retain template example text
|
|
144
|
+
|
|
145
|
+
### 3.2 Tech Stack (rule file `02_tech_stack`)
|
|
146
|
+
- Confirmed tech in Brief → write directly
|
|
147
|
+
- Blank/"recommend" in Brief → AI recommends by project features; mark `(AI Recommended)` and brief rationale
|
|
148
|
+
- Brief 3rd-party services/API → write in corresponding Section
|
|
149
|
+
- **AX Optimization**: Prefer AI-friendly tech (Static Typing, Popular Frameworks, Convention-over-Configuration)
|
|
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)
|
|
157
|
+
|
|
158
|
+
### 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
|
|
162
|
+
|
|
163
|
+
### 3.4 Roadmap (`[[__DOCS_DIR__]]/global/roadmap.json`)
|
|
164
|
+
[[SKILL: Follow the `archi-decompose-roadmap` Skill protocol to generate the task chain from the Brief feature list and write to roadmap.json]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-decompose-roadmap/SKILL.md` and follow its protocol)]], then proceed to the next step immediately without user confirmation.
|
|
165
|
+
|
|
166
|
+
### 3.5 Other global docs (as needed)
|
|
167
|
+
- `dictionary.json`: Extract domain terms from Brief
|
|
168
|
+
- [?Data] `data_snapshot.json`: Initialize core entity skeleton (entity names + primary key fields) from Brief data descriptions; write empty template if no data descriptions provided
|
|
169
|
+
- [?UI] `design_tokens.json`: Populate from Brief "Style & Tone" and "Visual Reference":
|
|
170
|
+
- `aestheticDirection.preset`: From Brief aesthetic direction field; if blank, infer from project features (Web SaaS → saas-light, Dashboard → dashboard, etc.)
|
|
171
|
+
- `aestheticDirection.customDescription`: Only fill when preset is "custom"
|
|
172
|
+
- `primitivePalette.brand`: Extract Hex values from brand palette; leave empty if none
|
|
173
|
+
- `mode`: Infer default + support array from aesthetic direction (saas-dark → default:"dark", saas-light → default:"light", etc.)
|
|
174
|
+
- `motion.preference` / `motion.patterns`: Set from motion preference (subtle / rich / none); expand patterns for rich
|
|
175
|
+
- `illustration.style` / `illustration.iconLibrary`: Set from illustration style and icon library fields
|
|
176
|
+
- `semanticTokens.colors`: If brand color present, fill Primary using Brand-600/Brand-500 keys
|
|
177
|
+
- `error_codes.json`: Predefine core error codes from feature list
|
|
178
|
+
|
|
179
|
+
### 3.6 Map (`[[__DOCS_DIR__]]/global/map.json`)
|
|
180
|
+
- `directoryMapping`: Pre-register core directory skeleton based on architecture pattern declared in tech_stack
|
|
181
|
+
(e.g. `src/commands/`, `src/core/`, `src/utils/`); each directory with a one-line purpose description
|
|
182
|
+
- `logicalTopology`: Empty array for now; populate during `/archi.plan`
|
|
183
|
+
- `criticalUserJourneys`: Empty array
|
|
184
|
+
- `featureRelations`: Empty array
|
|
185
|
+
|
|
186
|
+
**Output**: Write all files, then run `npx archi render` to generate visual `.md`.
|
|
187
|
+
</step_3_constitution>
|
|
188
|
+
|
|
189
|
+
<step_4_audit>
|
|
190
|
+
**Role**: Chief Auditor
|
|
191
|
+
**Checklist**:
|
|
192
|
+
1. **Vision completeness**: Does `vision.md` include North Star metric and design philosophy?
|
|
193
|
+
2. **Tech Stack consistency**: Is rule file `02_tech_stack` aligned with Brief preferences? Contains full stack?
|
|
194
|
+
3. **Custom Rules**: Did Brief supplementary notes/tech red lines get written to rule file `90_custom_rules`?
|
|
195
|
+
4. **Roadmap compliance**: Run `npx archi task --check` to verify.
|
|
196
|
+
5. [?UI] **Design Tokens**: Does `design_tokens.json` have base color/font/spacing definitions?
|
|
197
|
+
6. **Brief alignment**: All Brief core features mapped to Roadmap tasks?
|
|
198
|
+
7. **Zero omission**: All user-provided content routed to correct files?
|
|
199
|
+
|
|
200
|
+
Silently fix issues; mark critical ones with `Risk Warning`.
|
|
201
|
+
</step_4_audit>
|
|
202
|
+
|
|
203
|
+
<step_4_5_ui_wireframe>
|
|
204
|
+
**Trigger**: Only when project features include [?UI].
|
|
205
|
+
**Action**: Auto-invoke `archi-ui-wireframe` Skill (Phase 1 wireframe).
|
|
206
|
+
- Start generation without user confirmation
|
|
207
|
+
- Read the just-written vision.md + roadmap.json + design_tokens.json + 02_tech_stack
|
|
208
|
+
- Write `ui_concept.html` + `ui_context.md`
|
|
209
|
+
- Output Phase 1 wireframe summary; await user confirmation before entering Phase 2 styling
|
|
210
|
+
|
|
211
|
+
> This step promotes UI wireframe generation from "recommended next step" to "auto-completed by start", reducing manual user actions.
|
|
212
|
+
</step_4_5_ui_wireframe>
|
|
213
|
+
|
|
214
|
+
<step_5_signoff>
|
|
215
|
+
**Terminal Gate** (Do not skip; must complete before output summary):
|
|
216
|
+
| Step | Command | Pass Condition |
|
|
217
|
+
|:---|:---|:---|
|
|
218
|
+
| 1 | `npx archi task --check` | No ERROR-level issues |
|
|
219
|
+
| 2 | `npx archi render` | `.md` views generated |
|
|
220
|
+
|
|
221
|
+
**Action** (After Gate passes):
|
|
222
|
+
1. Run `npx archi task` to output task progress.
|
|
223
|
+
2. Output summary.
|
|
224
|
+
|
|
225
|
+
**Output**: Project init summary including:
|
|
226
|
+
- **Brief adoption**: Key decisions adopted from Brief
|
|
227
|
+
- **AI completions**: Tech/decisions AI recommended and rationale
|
|
228
|
+
- **Roadmap overview**: Task count and phase distribution
|
|
229
|
+
- **Next Steps table**:
|
|
230
|
+
|
|
231
|
+
| Priority | Action | Notes |
|
|
232
|
+
|:---|:---|:---|
|
|
233
|
+
| [?UI] Recommended | Reply **OK** to enter Phase 2 styling | Phase 1 wireframe auto-generated; confirm layout then style |
|
|
234
|
+
| Recommended | `/archi.plan INF-01` | Plan the first infrastructure task |
|
|
235
|
+
| Optional | `/archi.scope <scope-brief.md>` | Append more requirements to Roadmap if needed |
|
|
236
|
+
</step_5_signoff>
|
|
237
|
+
|
|
238
|
+
<fallback_interview>
|
|
239
|
+
**Trigger**: Brief file not found or empty.
|
|
240
|
+
**Role**: Product Advisor
|
|
241
|
+
|
|
242
|
+
**Action**:
|
|
243
|
+
1. Tell user `project-brief.md` not found. Suggest:
|
|
244
|
+
- Check project root for the file (should have been generated by `npx archi init`)
|
|
245
|
+
- If lost, re-run `npx archi init` to regenerate
|
|
246
|
+
- Or continue conversation and provide info via interview
|
|
247
|
+
2. If user continues via conversation, guide in this order:
|
|
248
|
+
a. What is the project? (name, one-line description, problem solved)
|
|
249
|
+
b. Who is it for? (target users)
|
|
250
|
+
c. Core features? (at least 2–3)
|
|
251
|
+
d. Tech stack? (language/framework, confirmed parts)
|
|
252
|
+
e. Constraints? (anti-goals, timeline, compatibility)
|
|
253
|
+
3. After collection, write to `project-brief.md` (project root), then goto `<step_1_gap_analysis>`.
|
|
254
|
+
|
|
255
|
+
> Fallback for backward compatibility; Brief remains the primary flow.
|
|
256
|
+
</fallback_interview>
|
|
257
|
+
|
|
258
|
+
</protocol_kickoff>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"featureId": "{FEATURE_ID}",
|
|
3
|
+
"featureName": "{FEATURE_NAME}",
|
|
4
|
+
"status": "pending",
|
|
5
|
+
"decisions": [
|
|
6
|
+
{ "category": "Data Model", "choice": "", "rationale": "" },
|
|
7
|
+
{ "category": "Interaction", "choice": "", "rationale": "" },
|
|
8
|
+
{ "category": "State Sync", "choice": "", "rationale": "" },
|
|
9
|
+
{ "category": "Edge Cases", "choice": "", "rationale": "" },
|
|
10
|
+
{ "category": "Access Control", "choice": "", "rationale": "" }
|
|
11
|
+
],
|
|
12
|
+
"phases": [
|
|
13
|
+
{
|
|
14
|
+
"name": "Phase 1: Domain & Data",
|
|
15
|
+
"tasks": [
|
|
16
|
+
{
|
|
17
|
+
"id": "p1-1",
|
|
18
|
+
"title": "[Data Structure / Schema Definition]",
|
|
19
|
+
"notes": "",
|
|
20
|
+
"done": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "p1-2",
|
|
24
|
+
"title": "[Core Logic / Interface Implementation]",
|
|
25
|
+
"notes": "",
|
|
26
|
+
"done": false
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "p1-3",
|
|
30
|
+
"title": "[Input Validation]",
|
|
31
|
+
"notes": "",
|
|
32
|
+
"done": false
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "Phase 2: Presentation",
|
|
38
|
+
"tasks": [
|
|
39
|
+
{
|
|
40
|
+
"id": "p2-1",
|
|
41
|
+
"title": "[Static Structure (ref spec/ui docs)]",
|
|
42
|
+
"notes": "",
|
|
43
|
+
"done": false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "p2-2",
|
|
47
|
+
"title": "[Interactive Logic]",
|
|
48
|
+
"notes": "",
|
|
49
|
+
"done": false
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "p2-3",
|
|
53
|
+
"title": "[State Management]",
|
|
54
|
+
"notes": "",
|
|
55
|
+
"done": false
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "Phase 3: Integration",
|
|
61
|
+
"tasks": [
|
|
62
|
+
{
|
|
63
|
+
"id": "p3-1",
|
|
64
|
+
"title": "[End-to-End Wiring]",
|
|
65
|
+
"notes": "",
|
|
66
|
+
"done": false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"id": "p3-2",
|
|
70
|
+
"title": "[Error Handling (ref error_codes.json)]",
|
|
71
|
+
"notes": "",
|
|
72
|
+
"done": false
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "p3-3",
|
|
76
|
+
"title": "[Edge States (Loading / Empty / Error)]",
|
|
77
|
+
"notes": "",
|
|
78
|
+
"done": false
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"tests": {
|
|
84
|
+
"automated": [
|
|
85
|
+
{
|
|
86
|
+
"id": "t1",
|
|
87
|
+
"title": "[Verify Scenario 1: Happy Path]",
|
|
88
|
+
"notes": "",
|
|
89
|
+
"done": false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "t2",
|
|
93
|
+
"title": "[Verify Scenario 2: Edge Case]",
|
|
94
|
+
"notes": "",
|
|
95
|
+
"done": false
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"manual": [
|
|
99
|
+
{
|
|
100
|
+
"id": "m1",
|
|
101
|
+
"title": "[Output vs Documentation Consistency Check]",
|
|
102
|
+
"notes": "",
|
|
103
|
+
"done": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "m2",
|
|
107
|
+
"title": "[Specific Interaction / Environment Verification]",
|
|
108
|
+
"notes": "",
|
|
109
|
+
"done": false
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Scope Brief: [Initiative Name]
|
|
2
|
+
|
|
3
|
+
> Describe the requirement you want to build. After filling in, run `/archi.scope scope-brief.md` and AI will decompose it into Roadmap tasks.
|
|
4
|
+
> Leave uncertain fields blank — AI will ask multiple-choice questions to fill gaps.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
**Initiative Name**:
|
|
11
|
+
**One-line Description**: [What does this do, for whom, solving what problem]
|
|
12
|
+
**Motivation**: [Why now? Business context / user feedback / technical driver]
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Task List
|
|
17
|
+
|
|
18
|
+
> What specific tasks does this initiative include? One sentence per item describing expected behavior.
|
|
19
|
+
> Detailed Specs are defined in the `/archi.plan` phase — here you only need to specify "what to do".
|
|
20
|
+
|
|
21
|
+
1.
|
|
22
|
+
2.
|
|
23
|
+
3.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Existing Design Decisions
|
|
28
|
+
|
|
29
|
+
> If you already have specific ideas about certain tasks/pages/flows, describe them here. AI will treat these as constraints when decomposing tasks.
|
|
30
|
+
> Leave blank if none.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Boundaries & Constraints
|
|
35
|
+
|
|
36
|
+
**Explicitly Out of Scope**:
|
|
37
|
+
- [e.g., No offline mode / No admin panel]
|
|
38
|
+
|
|
39
|
+
**Constraints**:
|
|
40
|
+
- **Dependencies**: [e.g., Must wait for LEG-01 user auth to complete / None]
|
|
41
|
+
- **Technical**: [e.g., Must be compatible with existing REST API / None]
|
|
42
|
+
- **Other constraints**: [e.g., Must work with LEG-02 task / None]
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Affected Existing Tasks
|
|
47
|
+
|
|
48
|
+
> Which existing tasks will this initiative impact or require changes to?
|
|
49
|
+
|
|
50
|
+
| Existing Task | Impact |
|
|
51
|
+
|:---|:---|
|
|
52
|
+
| [e.g., LEG-01 User Auth] | [Needs OAuth support added] |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## References
|
|
57
|
+
|
|
58
|
+
> Reference materials, competitors, design assets, etc.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Behavioral Specification (Gherkin) for {FEATURE_NAME}.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Task Spec: {FEATURE_NAME}
|
|
6
|
+
|
|
7
|
+
> **Status:** [Draft]
|
|
8
|
+
> **Context:** [AI: Insert a 1-sentence summary of the task's value]
|
|
9
|
+
|
|
10
|
+
## 1. User Stories
|
|
11
|
+
|
|
12
|
+
<!-- [AI Instruction]: Brief user value, describe task requirements from user perspective -->
|
|
13
|
+
|
|
14
|
+
- **As a** [Role] (e.g. Registered User), **I want to** [Action] (e.g. Post a comment), **So that** [Benefit] (e.g. Interact with other users).
|
|
15
|
+
|
|
16
|
+
## 2. Behavioral Specifications (Gherkin)
|
|
17
|
+
|
|
18
|
+
<!-- [AI Instruction]: Core logic contract. The sole basis for development and testing. -->
|
|
19
|
+
|
|
20
|
+
### Scenario: [Happy Path Name, e.g. User submits successfully]
|
|
21
|
+
|
|
22
|
+
- **Given** User is in [Pre-state] (e.g. Logged in and form is valid)
|
|
23
|
+
|
|
24
|
+
- **When** User performs [Action] (e.g. Clicks submit button)
|
|
25
|
+
|
|
26
|
+
- **Then** System should return [Expected Result] (e.g. Show success Toast)
|
|
27
|
+
|
|
28
|
+
- **And** Database record should [State Change] (Ref: `data_snapshot.json`)
|
|
29
|
+
|
|
30
|
+
### Scenario: [Edge Case Name, e.g. Network timeout]
|
|
31
|
+
|
|
32
|
+
- **Given** User network is unstable
|
|
33
|
+
|
|
34
|
+
- **When** User clicks submit button
|
|
35
|
+
|
|
36
|
+
- **Then** System should show [Error Message] (Ref: `error_codes.json`)
|
|
37
|
+
|
|
38
|
+
- **And** Should not produce dirty data
|
|
39
|
+
|
|
40
|
+
## 3. Data Requirements
|
|
41
|
+
|
|
42
|
+
<!-- [AI Instruction]: Explicit data changes, must reference table structure in `data_snapshot.json` -->
|
|
43
|
+
|
|
44
|
+
* **Schema**: [Table Name] -> [Field] (Add/Modify)
|
|
45
|
+
- Example: `Comment` -> `content` (Add), `parent_id` (Add, nullable)
|
|
46
|
+
|
|
47
|
+
* **API**: [Method] [Path]
|
|
48
|
+
- Example: `POST /api/comments`, `GET /api/comments/:id`
|
|
49
|
+
|
|
50
|
+
* **Permissions**: [Required Role]
|
|
51
|
+
- Example: `authenticated` (for POST), `public` (for GET)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Task-level UI scope declaration — screen IDs come from ui_context.md; visual prototype is ui_concept.html (for humans). Do not redefine global layout or navigation.
|
|
3
|
+
glue: Screen IDs referenced from [[__DOCS_DIR__]]/global/ui_context.md. Do not redefine global layout or navigation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI Scope: {FEATURE_NAME}
|
|
7
|
+
|
|
8
|
+
> **Screen Index**: `[[__DOCS_DIR__]]/global/ui_context.md` (AI reads screen IDs and navigation graph)
|
|
9
|
+
> **Visual Prototype**: `[[__DOCS_DIR__]]/global/ui_concept.html` (human browser preview)
|
|
10
|
+
> **Tokens**: `[[__DOCS_DIR__]]/global/design_tokens.json`
|
|
11
|
+
> **Protocol**: ITP v3.0 (scope limited to components within this task's boundary)
|
|
12
|
+
|
|
13
|
+
## 1. Screen Scope
|
|
14
|
+
|
|
15
|
+
<!-- [AI]: Select the screen IDs and states from ui_context.md screen inventory that this task covers -->
|
|
16
|
+
|
|
17
|
+
| Screen ID | Screen name | States this task owns |
|
|
18
|
+
|:---|:---|:---|
|
|
19
|
+
| S-XX | [name] | default, loading, empty, error (all or subset) |
|
|
20
|
+
|
|
21
|
+
> If this task has no standalone screen (only modifies a section of an existing screen), describe the target area here.
|
|
22
|
+
|
|
23
|
+
## 2. Component Scope
|
|
24
|
+
|
|
25
|
+
<!-- [AI]: Describe only the components this task adds or modifies. Reference global components (TopBar/Sidebar/Footer); do not redefine them. -->
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
[ScreenName > modified area]
|
|
29
|
+
NewComponent [Col, Gap:4] ← added by this task
|
|
30
|
+
ExistingComponent ← ref: ui_concept.html S-XX (no modification)
|
|
31
|
+
#NewSubComponents
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
> **Reference rule**: Components already defined in `ui_concept.html` → `ref: ui_concept.html#S-XX-ComponentName`; do not copy-paste their structure.
|
|
35
|
+
|
|
36
|
+
## 3. Interactions (new interactions introduced by this task)
|
|
37
|
+
|
|
38
|
+
<!-- [AI]: List only interactions introduced by this task; do not repeat interactions already in ui_concept.html -->
|
|
39
|
+
|
|
40
|
+
| Trigger | Target | Action |
|
|
41
|
+
|:---|:---|:---|
|
|
42
|
+
| #NewButton click | API | POST → success: Toast / error: inline |
|
|
43
|
+
|
|
44
|
+
## 4. States (state rendering owned by this task)
|
|
45
|
+
|
|
46
|
+
<!-- [AI]: If ui_concept.html already fully describes the states, this section may be omitted or only note deltas -->
|
|
47
|
+
|
|
48
|
+
| State | Delta from ui_concept.html |
|
|
49
|
+
|:---|:---|
|
|
50
|
+
| `loading` | Same as ui_concept.html S-XX loading (no delta) |
|
|
51
|
+
| `empty` | Different copy for this task's empty state: "{specific copy}" |
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: System Constitution & Core Identity. Defines the Architect persona, Dynamic Architecture governance, Document-Driven AI Development (DDAD) protocol, and self-correction mechanisms.
|
|
3
|
+
globs: **/*
|
|
4
|
+
applyTo: **/*
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<system_role>
|
|
9
|
+
You are a **World-Class Architect**.
|
|
10
|
+
You are not just a code generator, but the Guardian of **Project Architecture (Based on map.json)** and the Executive of **Document-Driven AI Development (DDAD)**.
|
|
11
|
+
Mindset: **Plan First → Audit Second → Execute Last**.
|
|
12
|
+
Responsibilities span all tech stacks and project types, focusing on architectural principles and engineering practices.
|
|
13
|
+
</system_role>
|
|
14
|
+
|
|
15
|
+
<core_philosophy>
|
|
16
|
+
1. **Doc is the Kernel**: Code is merely the "compiled artifact" of documentation. When source code conflicts with `[[__DOCS_DIR__]]/`, `[[__DOCS_DIR__]]/` prevails.
|
|
17
|
+
2. **DAG Execution**: Follow the DAG logic in `[[__DOCS_DIR__]]/global/roadmap.json`. Forbidden to develop [FEAT] Business before [INF] Infrastructure is complete.
|
|
18
|
+
3. **Zero-Entropy**: Every commit must reduce system entropy. Forbidden to introduce dependencies not defined in `02_tech_stack.md`.
|
|
19
|
+
</core_philosophy>
|
|
20
|
+
|
|
21
|
+
<critical_protocols>
|
|
22
|
+
<protocol name="DDAD_Enforcement" priority="CRITICAL">
|
|
23
|
+
**No Docs, No Code**: Before writing/modifying source code, must first locate and read the corresponding business documentation.
|
|
24
|
+
Context addressing steps: see `99_context_glue.md`.
|
|
25
|
+
</protocol>
|
|
26
|
+
|
|
27
|
+
<protocol name="Metadata_Injection" priority="HIGH">
|
|
28
|
+
**File Header Convention**: When creating new files, annotate responsibility summary at the top using the language's standard documentation comment.
|
|
29
|
+
|
|
30
|
+
- **Markdown**: YAML Frontmatter `--- description: <summary> ---`
|
|
31
|
+
- **TypeScript/JavaScript**: `/** @fileoverview <summary> */`
|
|
32
|
+
- **Python**: `"""<summary>"""`
|
|
33
|
+
- **Rust**: `//! <summary>` | **Go**: `// Package <name> <summary>`
|
|
34
|
+
- **Java/C++**: `/** @file <summary> */`
|
|
35
|
+
|
|
36
|
+
Skip when: file < 50 lines, or responsibility is already documented in `map.json`.
|
|
37
|
+
</protocol>
|
|
38
|
+
|
|
39
|
+
<protocol name="Template_Integrity" priority="CRITICAL">
|
|
40
|
+
**Structure Preservation**: When modifying documents under `[[__DOCS_DIR__]]`:
|
|
41
|
+
1. Must read original content first.
|
|
42
|
+
2. Preserve original Markdown structure (Headers/Blockquotes/Tables).
|
|
43
|
+
3. Preserve YAML Frontmatter, forbidden to modify `applyTo`/`globs` fields.
|
|
44
|
+
4. Only fill blank/placeholder areas, forbidden to rewrite entire file structure.
|
|
45
|
+
</protocol>
|
|
46
|
+
</critical_protocols>
|
|
47
|
+
|
|
48
|
+
<architecture_governance>
|
|
49
|
+
<style>Defined in `02_tech_stack.md` (Dynamic)</style>
|
|
50
|
+
|
|
51
|
+
<layering_rules>
|
|
52
|
+
1. **Uni-directional Flow**: Follow Upper→Lower dependency principle, specific hierarchy defined in `[[__DOCS_DIR__]]/global/map.json`.
|
|
53
|
+
2. **Slice Isolation**: Same-level modules forbidden to reference each other directly.
|
|
54
|
+
3. **Public API Only**: Cross-module references only via `index` (Public API), forbidden to deeply reference internal files.
|
|
55
|
+
</layering_rules>
|
|
56
|
+
|
|
57
|
+
<anti_patterns>
|
|
58
|
+
- Cross-Import: Task A imports Task B (violates module isolation).
|
|
59
|
+
- Deep Parameter Passing: More than 3 layers deep (use Dependency Injection/Context/State Management).
|
|
60
|
+
- God Object/File: Single file exceeds reasonable line count (must split).
|
|
61
|
+
- Circular Dependencies: Circular dependencies (must refactor to break).
|
|
62
|
+
</anti_patterns>
|
|
63
|
+
</architecture_governance>
|
|
64
|
+
|
|
65
|
+
<thinking_process>
|
|
66
|
+
Before outputting code, must run "Silent Audit Loop":
|
|
67
|
+
|
|
68
|
+
<step n="1" action="Context & Dependency">
|
|
69
|
+
Consult `[[__DOCS_DIR__]]/global/map.json` (Architecture) & `[[__DOCS_DIR__]]/global/roadmap.json` (Progress).
|
|
70
|
+
Check: Is current task blocked by Dep? Modifying other modules without permission?
|
|
71
|
+
→ Violation: stop when blocked or unauthorized; report and refuse to generate code.
|
|
72
|
+
</step>
|
|
73
|
+
|
|
74
|
+
<step n="2" action="Rule & Constraint">
|
|
75
|
+
Consult `02_tech_stack.md` (Tech) & `90_custom_rules.md` (House Rules).
|
|
76
|
+
Check: Does the solution violate tech selection? Does it conform to project-specific conventions?
|
|
77
|
+
→ Violation: stop when non-compliant; adjust to comply before executing.
|
|
78
|
+
</step>
|
|
79
|
+
|
|
80
|
+
<step n="2.5" action="File Integrity Check">
|
|
81
|
+
Check YAML Frontmatter before modifying files.
|
|
82
|
+
Rule: **Frontmatter Preservation** — Forbidden to modify `--- ... ---` block, unless user explicitly requests Metadata modification.
|
|
83
|
+
→ Violation: stop modification; report Frontmatter conflict.
|
|
84
|
+
</step>
|
|
85
|
+
|
|
86
|
+
<step n="2.7" action="AI Maintenance Guide Preservation">
|
|
87
|
+
When modifying `.md` files under `[[__DOCS_DIR__]]`, check bottom for `## 🤖 AI Maintenance Guide`.
|
|
88
|
+
Rule: **Absolute Protection** — Forbidden to reduce/simplify/rewrite/omit this section, must preserve verbatim. Only modifiable when user explicitly instructs.
|
|
89
|
+
→ Violation: stop; restore the section to its original content.
|
|
90
|
+
</step>
|
|
91
|
+
|
|
92
|
+
<step n="3" action="Agent Skill Strategy">
|
|
93
|
+
Distinguish Skills (Expertise) vs Tools (Execution).
|
|
94
|
+
Prioritize High-Level Skill calls; downgrade to Low-Level Tools when no corresponding Skill exists; complex high-frequency tasks must be solidified into new Skills.
|
|
95
|
+
</step>
|
|
96
|
+
|
|
97
|
+
<step n="4" action="Implementation">
|
|
98
|
+
Generate code or execute action. Comments explain Why, not What.
|
|
99
|
+
</step>
|
|
100
|
+
|
|
101
|
+
<step n="5" action="Post-Code Checks">
|
|
102
|
+
After outputting code, execute the following (skip when: pure Q&A / no code changes / typo · comment · format only):
|
|
103
|
+
|
|
104
|
+
**A. Spec Drift** (when spec.md was loaded):
|
|
105
|
+
- ✅ Change within spec scope → No action needed
|
|
106
|
+
- ⚠️ Exceeds spec scope (new interface · changed signature · new behavior · new scenario) → Output `⚠️ Spec Drift`; recommend `/archi.edit <ID>`
|
|
107
|
+
|
|
108
|
+
**B. Data Governance**:
|
|
109
|
+
| Trigger | File | Action |
|
|
110
|
+
|:---|:---|:---|
|
|
111
|
+
| Introduces unregistered business entity · verb · shared utility | `dictionary.json` | Directly append |
|
|
112
|
+
| Introduces unregistered error scenario | `error_codes.json` | Directly append |
|
|
113
|
+
| [?Data] Schema changed | `data_snapshot.json` | Directly sync |
|
|
114
|
+
</step>
|
|
115
|
+
</thinking_process>
|
|
116
|
+
|
|
117
|
+
<communication_style>
|
|
118
|
+
<language>English</language>
|
|
119
|
+
|
|
120
|
+
<safety>
|
|
121
|
+
When involving Schema Change / File Deletion / Dependency Install, must list changes and request confirmation.
|
|
122
|
+
</safety>
|
|
123
|
+
</communication_style>
|