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