architext 0.0.4 → 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 +27 -1
- package/README.md +84 -7
- package/README.zh-CN.md +84 -7
- package/dist/index.js +38 -38
- package/dist/templates/en/briefs/_base.md +44 -11
- package/dist/templates/en/briefs/_modules.md +31 -4
- package/dist/templates/en/docs/prompts/audit.md +80 -94
- package/dist/templates/en/docs/prompts/code.md +87 -89
- package/dist/templates/en/docs/prompts/edit.md +47 -51
- 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 +91 -116
- package/dist/templates/en/docs/prompts/map.md +47 -69
- package/dist/templates/en/docs/prompts/plan.md +134 -239
- 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 +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 +89 -129
- 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 +12 -12
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +3 -34
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +1 -0
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +4 -4
- 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 +20 -20
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +315 -270
- package/dist/templates/zh/briefs/_base.md +44 -12
- package/dist/templates/zh/briefs/_modules.md +27 -0
- package/dist/templates/zh/docs/prompts/audit.md +42 -56
- package/dist/templates/zh/docs/prompts/code.md +47 -49
- package/dist/templates/zh/docs/prompts/edit.md +38 -42
- package/dist/templates/zh/docs/prompts/fix.md +30 -29
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +59 -83
- package/dist/templates/zh/docs/prompts/map.md +24 -47
- package/dist/templates/zh/docs/prompts/plan.md +92 -197
- 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 +31 -71
- package/dist/templates/zh/docs/prompts/revise.md +37 -86
- package/dist/templates/zh/docs/prompts/scope.md +51 -91
- package/dist/templates/zh/docs/prompts/start.md +67 -106
- package/dist/templates/zh/rules/00_system.md +18 -91
- package/dist/templates/zh/rules/01_workflow.md +60 -59
- package/dist/templates/zh/rules/03_data_governance.md +41 -68
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +2 -33
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +1 -0
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -1
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +1 -0
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +317 -269
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Command Dispatcher & Workflow Controller. Handles /archi
|
|
2
|
+
description: Command Dispatcher & Workflow Controller. Handles /archi.* routing and mode transitions.
|
|
3
3
|
globs: **/*
|
|
4
4
|
applyTo: **/*
|
|
5
5
|
alwaysApply: true
|
|
@@ -9,85 +9,87 @@ alwaysApply: true
|
|
|
9
9
|
|
|
10
10
|
> **Role**: Mode Switcher. Default to "General Architect" mode, only load specific protocol when explicit command is detected.
|
|
11
11
|
|
|
12
|
-
> ⛔ **STOP CHECK** — Self-check before each response
|
|
12
|
+
> ⛔ **STOP CHECK** — Self-check before each response:
|
|
13
13
|
> | Violation | Correct Action |
|
|
14
14
|
> |:---|:---|
|
|
15
|
-
> | Received `/archi.*`
|
|
16
|
-
> | User request involves behavior change but code was modified directly | Stop →
|
|
17
|
-
> | Ran
|
|
15
|
+
> | Received `/archi.*` but started executing without loading protocol file | Stop → Load protocol file first |
|
|
16
|
+
> | User request involves behavior change but code was modified directly | Stop → Load and execute the corresponding protocol |
|
|
17
|
+
> | Ran `npx archi` without confirming working directory | Stop → Pass Working Directory Gate (see `04_cli_tools.md`) |
|
|
18
18
|
|
|
19
19
|
## 1. Explicit Command Routing
|
|
20
20
|
|
|
21
|
-
**Trigger**: When user input starts with `/archi.`, immediately load the corresponding protocol
|
|
21
|
+
**Trigger**: When user input starts with `/archi.`, immediately load the corresponding protocol.
|
|
22
22
|
|
|
23
|
-
| Command | Target Template |
|
|
24
|
-
|
|
25
|
-
| `/archi.start` | `[[
|
|
26
|
-
| `/archi.inherit` | `[[
|
|
27
|
-
| `/archi.scope` | `[[
|
|
28
|
-
| `/archi.plan` | `[[
|
|
29
|
-
| `/archi.edit` | `[[
|
|
30
|
-
| `/archi.revise` | `[[
|
|
31
|
-
| `/archi.code` | `[[
|
|
32
|
-
| `/archi.audit` | `[[
|
|
33
|
-
| `/archi.fix` | `[[
|
|
34
|
-
| `/archi.map` | `[[
|
|
35
|
-
| `/archi.remove` | `[[
|
|
36
|
-
| `/archi.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
>
|
|
23
|
+
| Command | Target Template |
|
|
24
|
+
|:---|:---|
|
|
25
|
+
| `/archi.start` | `[[__PROMPTS_PATH__]]/archi.start.md` |
|
|
26
|
+
| `/archi.inherit` | `[[__PROMPTS_PATH__]]/archi.inherit.md` |
|
|
27
|
+
| `/archi.scope` | `[[__PROMPTS_PATH__]]/archi.scope.md` |
|
|
28
|
+
| `/archi.plan` | `[[__PROMPTS_PATH__]]/archi.plan.md` |
|
|
29
|
+
| `/archi.edit` | `[[__PROMPTS_PATH__]]/archi.edit.md` |
|
|
30
|
+
| `/archi.revise` | `[[__PROMPTS_PATH__]]/archi.revise.md` |
|
|
31
|
+
| `/archi.code` | `[[__PROMPTS_PATH__]]/archi.code.md` |
|
|
32
|
+
| `/archi.audit` | `[[__PROMPTS_PATH__]]/archi.audit.md` |
|
|
33
|
+
| `/archi.fix` | `[[__PROMPTS_PATH__]]/archi.fix.md` |
|
|
34
|
+
| `/archi.map` | `[[__PROMPTS_PATH__]]/archi.map.md` |
|
|
35
|
+
| `/archi.remove` | `[[__PROMPTS_PATH__]]/archi.remove.md` |
|
|
36
|
+
| `/archi.ref` | `[[__PROMPTS_PATH__]]/archi.ref.md` |
|
|
37
|
+
| `/archi.recover` | `[[__PROMPTS_PATH__]]/archi.recover.md` |
|
|
38
|
+
| `/archi.help` | `[[__PROMPTS_PATH__]]/archi.help.md` |
|
|
39
|
+
|
|
40
|
+
> **Protocol Load Gate** (forbidden to skip, complete in order):
|
|
41
|
+
> 1. **Read** target `.md` full text → if file not found, stop: `Protocol file not found, execution aborted`
|
|
42
|
+
> 2. **Override** — May override: `<system_role>`, `<thinking_process>`, `<communication_style>`. Cannot override: `<core_philosophy>`, `<critical_protocols>`.
|
|
41
43
|
> 3. **Execute** `<step_1>` — forbidden to execute any protocol content before step 1 is complete
|
|
42
44
|
|
|
43
45
|
---
|
|
44
46
|
|
|
45
|
-
## 2. Natural Language
|
|
46
|
-
|
|
47
|
-
**Trigger**: User input is not `/archi.` command text.
|
|
47
|
+
## 2. Natural Language Dispatch
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
**Trigger**: User input is not an `/archi.` command and involves business changes.
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
**Decision Criterion**: Does this change affect documented behavior (interfaces/logic/scenarios in spec.md, interactions/structure in ui.md, implementation steps in plan.json)?
|
|
51
|
+
### §2.0 Non-protocol scenarios (answer directly)
|
|
54
52
|
|
|
55
53
|
| Intent Type | Action |
|
|
56
54
|
|:---|:---|
|
|
57
|
-
| Pure conversation / code reading / architecture discussion | ✅ Answer directly
|
|
55
|
+
| Pure conversation / code reading / architecture discussion | ✅ Answer directly |
|
|
58
56
|
| Trivial edits (typo/comments/formatting/log messages) | ✅ Execute directly |
|
|
59
|
-
| Behavior change (logic/interface/type/UI) | 🔀 Route → `/archi.edit` + `/archi.code` |
|
|
60
|
-
| Bug fix | 🔀 Route → `/archi.fix` |
|
|
61
|
-
| New feature | 🔀 Route → `/archi.scope` or `/archi.plan` |
|
|
62
|
-
| Large-scale refactoring | 🔀 Route → `/archi.revise` |
|
|
63
57
|
|
|
64
|
-
### 2.
|
|
58
|
+
### §2.1 Pre-flight (triggered when business changes are involved)
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
2. Recommend the specific command + parameters
|
|
69
|
-
3. Ask the user whether to proceed
|
|
60
|
+
1. Scan `roadmap.json` + `tasks/<ID>_*/` directory to match user intent to tasks.
|
|
61
|
+
2. Determine protocol to load per the table below:
|
|
70
62
|
|
|
71
|
-
|
|
63
|
+
| Check Result | Load Protocol | Confirmation |
|
|
64
|
+
|:---|:---|:---|
|
|
65
|
+
| No matching task in roadmap | `scope.md` | Inform "Let me help you scope this" then start |
|
|
66
|
+
| Has task · no spec.md | `plan.md` | Inform "This task needs planning, I'll do it" then start |
|
|
67
|
+
| Has spec+plan · status=active | `code.md` | Start directly (IDE native plan mode drives rhythm) |
|
|
68
|
+
| status=done · user wants changes | `edit.md` | Inform "I'll update docs before changing code" then start |
|
|
69
|
+
| User describes abnormal behavior | `fix.md` | Start diagnosis directly |
|
|
70
|
+
| Affects >1 task or global assets | `revise.md` | Output impact assessment first, await confirmation |
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
3. After loading protocol, follow §1 **Protocol Load Gate** (read full text → override → step_1).
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
- Inform the user that the module is not managed
|
|
77
|
-
- Suggest `/archi.inherit` or `/archi.scope` to bring it under management
|
|
78
|
-
- After user confirms "temporary adjustment", proceed with direct modification
|
|
74
|
+
### §2.2 Chain Continuation
|
|
79
75
|
|
|
80
|
-
|
|
76
|
+
Each protocol's Signoff Next Steps already points to the next protocol. AI must:
|
|
77
|
+
- Proactively suggest next step ("Spec is ready, shall we start implementing?")
|
|
78
|
+
- After user confirms, load next protocol and continue
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
| Transition | Chaining Rule |
|
|
81
|
+
|:---|:---|
|
|
82
|
+
| scope → plan | May chain (after scope, ask "Want to plan the first task?") |
|
|
83
|
+
| plan → code | **Must await user confirmation** (spec is the most important checkpoint) |
|
|
84
|
+
| code → audit | Built-in (code.md step_5 already has silent audit) |
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
> ⛔ **Prohibited**: Auto-chaining from plan to code without user confirmation.
|
|
87
|
+
|
|
88
|
+
### §2.3 IDE Collaboration
|
|
89
|
+
|
|
90
|
+
Leverage IDE native capabilities (plan mode / agent mode / checkpoint) to drive execution rhythm.
|
|
91
|
+
Protocols define "what to do, what to check" — do not fight IDE planning/execution capabilities.
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
### §2.4 Unmanaged Code
|
|
92
94
|
|
|
93
|
-
|
|
95
|
+
Target not registered in `map.json` and has no Task → **STOP & ASK**, prompt user to adopt via `/archi.inherit` or `/archi.scope`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
2
|
description: AI collaboration governance rules for JSON data files. Defines read/write specs, update timing & format constraints for global data files.
|
|
3
3
|
globs: "**/*.json"
|
|
4
4
|
applyTo: "**/*.json"
|
|
@@ -11,14 +11,18 @@ alwaysApply: true
|
|
|
11
11
|
|
|
12
12
|
## 1. Data File Registry
|
|
13
13
|
|
|
14
|
-
| File |
|
|
15
|
-
|
|
16
|
-
| `roadmap.json` |
|
|
17
|
-
| `map.json` |
|
|
18
|
-
| `dictionary.json` |
|
|
19
|
-
| `design_tokens.json`
|
|
20
|
-
| `data_snapshot.json`
|
|
21
|
-
| `error_codes.json` |
|
|
14
|
+
| File | Read When | Write When |
|
|
15
|
+
|:---|:---|:---|
|
|
16
|
+
| `roadmap.json` | plan/code start | start creates; AI edit or `npx archi task` updates |
|
|
17
|
+
| `map.json` | When touching code (via context_glue) | plan Step 3; inherit Step 3.6; /archi.map |
|
|
18
|
+
| `dictionary.json` | When generating variable names | plan Step 3; code/fix step_5 auto-appends |
|
|
19
|
+
| `design_tokens.json` [?UI] | When generating UI code | start creates; update on design changes |
|
|
20
|
+
| `data_snapshot.json` [?Data] | plan design / code implementation | Plan designs Schema; Code syncs changes |
|
|
21
|
+
| `error_codes.json` | When writing error handling | plan Step 3; code/fix step_5 auto-appends |
|
|
22
|
+
| `api_snapshot.json` [?API] | When implementing endpoints | plan Step 3 registers; Code syncs |
|
|
23
|
+
| `env_registry.json` [?API] | When introducing config items | Code appends immediately on new env var |
|
|
24
|
+
| `command_api.json` [?CLI] | When implementing commands | plan Step 3 registers; Code syncs |
|
|
25
|
+
| `public_api.json` [?Lib] | When adding/modifying exports | plan Step 3 registers; Code syncs |
|
|
22
26
|
|
|
23
27
|
---
|
|
24
28
|
|
|
@@ -26,19 +30,19 @@ alwaysApply: true
|
|
|
26
30
|
|
|
27
31
|
### 2.1 Format Constraints
|
|
28
32
|
|
|
29
|
-
- **JSON Only**:
|
|
30
|
-
- **Schema Stability**:
|
|
31
|
-
- **Tier 1 (Strict)**: `roadmap.json`, `plan.json` — CLI
|
|
32
|
-
- **Tier 2 (Flexible)**:
|
|
33
|
-
- **Valid JSON**:
|
|
33
|
+
- **JSON Only**: `.json` is the single source of truth. `.md` views are auto-generated by `npx archi render`; forbidden to edit directly.
|
|
34
|
+
- **Schema Stability**:
|
|
35
|
+
- **Tier 1 (Strict)**: `roadmap.json`, `plan.json` — CLI depends on these; Zod Schema validated; forbidden to change arbitrarily.
|
|
36
|
+
- **Tier 2 (Flexible)**: All other files only validate top-level keys. **All Tier 2 files may freely extend fields (new keys / new array item properties) without CLI changes.**
|
|
37
|
+
- **Valid JSON**: No trailing commas, no comments.
|
|
34
38
|
|
|
35
39
|
### 2.2 Read/Write Discipline
|
|
36
40
|
|
|
37
41
|
| Scenario | Rule |
|
|
38
42
|
|:---|:---|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
43
|
+
| Consult data | Read `.json`; forbidden to read `.md` view (may be stale) |
|
|
44
|
+
| Update Roadmap status | Prefer `npx archi task <ID> --status <s>`; batch may edit JSON directly |
|
|
45
|
+
| Update other data | AI directly edits `.json` |
|
|
42
46
|
| After updates | Run `npx archi render` to regenerate `.md` views |
|
|
43
47
|
|
|
44
48
|
---
|
|
@@ -50,47 +54,47 @@ alwaysApply: true
|
|
|
50
54
|
- **Structure**: `phases[] → tasks[]`, each task must have `id`, `title`, `status`, `deps`.
|
|
51
55
|
- **Status values**: `pending` | `active` | `done` | `blocked`.
|
|
52
56
|
- **Dependency integrity**: IDs in `deps` must exist in tasks.
|
|
53
|
-
- **Slug rule**: `slug`
|
|
57
|
+
- **Slug rule**: `slug` used for tasks folder naming, format `Snake_Case`.
|
|
54
58
|
|
|
55
59
|
### `map.json`
|
|
56
60
|
|
|
57
|
-
- **Directory Mapping**: Must reflect
|
|
61
|
+
- **Directory Mapping**: Must reflect real physical file tree.
|
|
58
62
|
- **Logical Topology**: Must register each Task Module's responsibility.
|
|
59
|
-
- **Feature Relations
|
|
60
|
-
- **Self-Correction**:
|
|
61
|
-
- **Extensible**: If existing fields cannot adequately describe the project architecture, you may add fields to items (e.g. `tags`, `owner`) or add new top-level keys.
|
|
63
|
+
- **Feature Relations**: `featureRelations` records aggregator-source linkages, written by AI during plan/inherit.
|
|
64
|
+
- **Self-Correction**: Code references violating topology hierarchy must report error and stop.
|
|
62
65
|
|
|
63
66
|
### `dictionary.json`
|
|
64
67
|
|
|
65
|
-
- **Naming Authority**:
|
|
66
|
-
- **Boundary**: Only register
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- **utilities**: Shared tools (e.g. logger, AppError, fetchClient) must be registered; AI must use registered utilities instead of raw APIs (refer to `replaces` field).
|
|
70
|
-
- **components** [?UI]: Must search existing components before creating new ones; prioritize reuse.
|
|
71
|
-
- **Extensible**: If existing fields cannot adequately describe a term/tool, you may add fields to array items (e.g. `tags`, `scope`, `deprecated`) or add new top-level arrays (e.g. `enums`, `constants`).
|
|
68
|
+
- **Naming Authority**: `entities[].codeName` is the supreme law; forbidden to use `forbiddenSynonyms`.
|
|
69
|
+
- **Boundary**: Only register project business domain; Architext framework concepts forbidden.
|
|
70
|
+
- verbs maintain project-wide verb consistency; utilities must be registered and used instead of raw APIs.
|
|
71
|
+
- [?UI]: components — search existing before creating new ones.
|
|
72
72
|
|
|
73
73
|
### `design_tokens.json` [?UI]
|
|
74
74
|
|
|
75
|
-
- **Token Only**: Styles must
|
|
75
|
+
- **Token Only**: Styles must use Tokens; forbidden to hardcode Hex/px/rem.
|
|
76
76
|
- **Dark Mode**: Must define both `light` and `dark` values.
|
|
77
|
-
- **Extensible**: If existing Token structure cannot cover project needs (e.g. `motion`, `breakpoints`, `z-index`), you may add new properties freely.
|
|
78
77
|
|
|
79
78
|
### `data_snapshot.json` [?Data]
|
|
80
79
|
|
|
81
|
-
- **Structure**: `models[]` (name
|
|
82
|
-
- **Design First**: Plan
|
|
83
|
-
- **Sync Back**: After Code phase
|
|
84
|
-
- **Extensible**: If existing fields cannot adequately describe data models (e.g. need to record `indexes`, `triggers`, `seedData`), you may add fields to model items or at the top level.
|
|
80
|
+
- **Structure**: `models[]` (name/fields/types/constraints) + `relationships[]` (1:1/1:N/M:N/self-ref).
|
|
81
|
+
- **Design First**: Plan must define model structure, precise to field names and types; forbidden to write "TBD".
|
|
82
|
+
- **Sync Back**: After Code phase, must sync actual changes back.
|
|
85
83
|
|
|
86
84
|
### `error_codes.json`
|
|
87
85
|
|
|
88
|
-
- **Boundary**: Only register
|
|
89
|
-
- **
|
|
90
|
-
- **Code
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
- **Boundary**: Only register project business domain errors; framework infrastructure errors forbidden.
|
|
87
|
+
- **Code Format**: `ERR_[MODULE]_[REASON]`.
|
|
88
|
+
- **Design Before Code**: Must register error codes before writing error handling, including `message` and `recovery`.
|
|
89
|
+
|
|
90
|
+
### Conditional File Rules
|
|
91
|
+
|
|
92
|
+
| File | Core Rules |
|
|
93
|
+
|:---|:---|
|
|
94
|
+
| `api_snapshot.json` [?API] | endpoints[] registry; Register First — forbidden to implement unregistered endpoints; owner marks Task ID |
|
|
95
|
+
| `env_registry.json` [?API] | Register on introduce; required/example mandatory |
|
|
96
|
+
| `command_api.json` [?CLI] | Sync on modify; owner marks Task ID |
|
|
97
|
+
| `public_api.json` [?Lib] | stable changes require /archi.edit; full TS signature; owner marks Task ID |
|
|
94
98
|
|
|
95
99
|
---
|
|
96
100
|
|
|
@@ -99,4 +103,4 @@ alwaysApply: true
|
|
|
99
103
|
- **Location**: `tasks/<ID>_<Slug>/plan.json`
|
|
100
104
|
- **Checkbox Updates**: AI sets `done` to `true` directly after completing steps during `/archi.code`.
|
|
101
105
|
- **Append Rule**: `/archi.edit` appends new Phases while preserving completed history.
|
|
102
|
-
- **Verification**: Run `npx archi plan <ID>` to verify completion
|
|
106
|
+
- **Verification**: Run `npx archi plan <ID>` to verify completion.
|
|
@@ -4,9 +4,9 @@ type: reviewer
|
|
|
4
4
|
description: Data governance sync executor. In isolated context, scans main Agent output, compares with global data file state, performs incremental sync per 03_data_governance.md rules, returns change Diff.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Data
|
|
7
|
+
# Data Governance Sync Executor
|
|
8
8
|
|
|
9
|
-
## System
|
|
9
|
+
## System Flow Position
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
/archi.* step_N → Verify phase
|
|
@@ -23,27 +23,27 @@ Main Agent Signoff (confirm Diff)
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
-
## Authoritative
|
|
26
|
+
## Authoritative Rule Source
|
|
27
27
|
|
|
28
28
|
`03_data_governance.md` is the single authoritative source for data governance. All behavior of this Skill must align with that file.
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## Sync
|
|
32
|
+
## Sync Scope
|
|
33
33
|
|
|
34
34
|
| Global file | Sync content | Trigger |
|
|
35
35
|
|:---|:---|:---|
|
|
36
36
|
| `dictionary.json` | New business entities · actions · shared tools · public components | Output contains unregistered business terms or tools |
|
|
37
37
|
| `error_codes.json` | New business error codes | Output contains unregistered error scenarios |
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
38
|
+
| [?Data] `data_snapshot.json` | Schema changes | Output has data model add/modify |
|
|
39
|
+
| [?API] `api_snapshot.json` | New endpoints | Output has new HTTP/RPC endpoints |
|
|
40
|
+
| [?API] `env_registry.json` | New env vars | Output introduces new `process.env.X` |
|
|
41
|
+
| [?CLI] `command_api.json` | New commands | Output has new CLI commands |
|
|
42
|
+
| [?Lib] `public_api.json` | New public exports | Output has new public exports |
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
|
-
## Execution
|
|
46
|
+
## Execution Protocol
|
|
47
47
|
|
|
48
48
|
1. **Read global data files**: Load global files matching project features from table above
|
|
49
49
|
2. **Scan main Agent output**: Identify new business entities, error codes, Schema, endpoints, etc.
|
|
@@ -52,13 +52,13 @@ Main Agent Signoff (confirm Diff)
|
|
|
52
52
|
5. **Incremental sync**: Append/modify only, do not delete existing entries
|
|
53
53
|
6. **Output change Diff**
|
|
54
54
|
|
|
55
|
-
### Hard
|
|
55
|
+
### Hard Boundaries
|
|
56
56
|
|
|
57
57
|
- **No direct append** — Must check existing content boundary before write, avoid duplicates or conflicts
|
|
58
58
|
- **No framework concept registration** — Sync only project business domain content
|
|
59
59
|
- **No modify `03_data_governance.md`** — This Skill enforces rules, does not define them
|
|
60
60
|
|
|
61
|
-
### Output
|
|
61
|
+
### Output Format
|
|
62
62
|
|
|
63
63
|
```
|
|
64
64
|
### Data Sync Results
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-decompose-roadmap
|
|
3
|
+
type: subagent
|
|
3
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
|
|
|
@@ -27,7 +28,7 @@ Brief → [This Skill] → roadmap.json tasks
|
|
|
27
28
|
>
|
|
28
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
|
|:---|:---|:---|:---|
|
|
@@ -275,10 +276,6 @@ Route cross-cutting concerns by **effort weight**: lightweight → inject into g
|
|
|
275
276
|
}
|
|
276
277
|
```
|
|
277
278
|
|
|
278
|
-
> **ID prefix vs tag responsibility separation**:
|
|
279
|
-
> - `id` prefix (`INF-` / `FEAT-` / `POLISH-` / `EDIT-`) = task type, determines `/archi.plan` spec acceptance format
|
|
280
|
-
> - `tag` = business domain label, for human categorization only, does not affect AI behavior
|
|
281
|
-
|
|
282
279
|
`deps` empty or all `done` → `pending`; has incomplete deps → `blocked`
|
|
283
280
|
|
|
284
281
|
---
|
|
@@ -291,35 +288,7 @@ Route cross-cutting concerns by **effort weight**: lightweight → inject into g
|
|
|
291
288
|
|
|
292
289
|
Three outputs:
|
|
293
290
|
|
|
294
|
-
**① Task data** (directly maps to `roadmap.json` phases/tasks):
|
|
295
|
-
|
|
296
|
-
```json
|
|
297
|
-
{
|
|
298
|
-
"phases": [
|
|
299
|
-
{
|
|
300
|
-
"id": "phase-infra",
|
|
301
|
-
"name": "Infrastructure",
|
|
302
|
-
"tasks": [
|
|
303
|
-
{ "id": "INF-01", "title": "...", "status": "pending", "description": "...", "goal": "...", "deps": [], "tag": "Infra", "slug": "..." }
|
|
304
|
-
]
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"id": "phase-core",
|
|
308
|
-
"name": "Core Features",
|
|
309
|
-
"tasks": [
|
|
310
|
-
{ "id": "FEAT-01", "title": "...", "status": "blocked", "description": "...", "goal": "...", "deps": ["INF-01"], "tag": "Core", "slug": "..." }
|
|
311
|
-
]
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"id": "phase-polish",
|
|
315
|
-
"name": "Polish & Launch",
|
|
316
|
-
"tasks": [
|
|
317
|
-
{ "id": "POLISH-01", "title": "...", "status": "blocked", "description": "...", "goal": "...", "deps": ["FEAT-01"], "tag": "Quality", "slug": "..." }
|
|
318
|
-
]
|
|
319
|
-
}
|
|
320
|
-
]
|
|
321
|
-
}
|
|
322
|
-
```
|
|
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`):
|
|
323
292
|
|
|
324
293
|
**② NFR merge list** (return with task data; caller appends as `nfr` top-level field; `/archi.plan` step_1_load must read):
|
|
325
294
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-design-patterns
|
|
3
|
+
type: specialist
|
|
3
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.
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -4,9 +4,9 @@ type: reviewer
|
|
|
4
4
|
description: featureRelations linkage handler. In isolated context, handles map.json featureRelations register/check/cleanup, ensures aggregator Tasks maintain correct linkage with their sources.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# featureRelations
|
|
7
|
+
# featureRelations Linkage Handler
|
|
8
8
|
|
|
9
|
-
## System
|
|
9
|
+
## System Flow Position
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
/archi.* step_N → Verify phase
|
|
@@ -22,7 +22,7 @@ Main Agent Signoff (confirm linkage prompts)
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
## Modes and
|
|
25
|
+
## Modes and Behavior
|
|
26
26
|
|
|
27
27
|
### Mode `register` (caller: plan, inherit)
|
|
28
28
|
|
|
@@ -71,7 +71,7 @@ Remove featureRelations entries referencing removed Task, assess impact.
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
-
## Output
|
|
74
|
+
## Output Format
|
|
75
75
|
|
|
76
76
|
### register mode
|
|
77
77
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-interview-protocol
|
|
3
|
+
type: specialist
|
|
3
4
|
description: Architext supplementary interview protocol. Standardizes how to ask about information gaps: multiple-choice first, AI recommendation + [Recommended] marking, [Z] Custom fallback, complete AI+/AI- analysis, option descriptions state concrete behavior. Produces standard Q-table and INPUT prompt line, referenced by /archi.start, /archi.scope, and /archi.plan supplementary confirmation steps.
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -19,7 +20,7 @@ Information gap detected
|
|
|
19
20
|
> - Responsible for: how to ask (format / rules / tone)
|
|
20
21
|
> - Not responsible for: what to ask (determined by caller's gap list), how to handle user answers (determined by caller)
|
|
21
22
|
|
|
22
|
-
##
|
|
23
|
+
## Invocation Modes
|
|
23
24
|
|
|
24
25
|
| Caller | Trigger Step | Trigger Condition | Max Questions |
|
|
25
26
|
|:---|:---|:---|:---|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archi-plan-options
|
|
3
|
+
type: subprocess
|
|
3
4
|
description: Architext architecture decision option library. Defines candidate approaches and AI+/AI- analysis for five core dimensions (Core Structure / Interaction Pattern / Data Flow / Error Handling / Access & Scope), covering Web/CLI/API/Lib/Mobile/MiniApp/Extension/Desktop/AI Agent project types. Includes convention inheritance rules, project tag routing logic, and recommend vs. expand criteria. Referenced by /archi.plan step_2 Part 2 (architecture recommendation phase).
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -14,7 +15,7 @@ description: Architext architecture decision option library. Defines candidate a
|
|
|
14
15
|
↓
|
|
15
16
|
Direct recommendation row (most dimensions) or Q-table (when user decision needed)
|
|
16
17
|
↓
|
|
17
|
-
Written into
|
|
18
|
+
Written into Task Proposal architecture recommendation table
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
> **Skill responsibility boundary**:
|
|
@@ -36,7 +37,7 @@ Read `02_tech_stack.md` Section 9 (project conventions).
|
|
|
36
37
|
|
|
37
38
|
### Step 2 · Project Tag Routing
|
|
38
39
|
|
|
39
|
-
Use project tags activated in step_1_load (`
|
|
40
|
+
Use project tags activated in step_1_load (`ui` / `data` / `cli` / `lib` / `api` / `mobile` / `miniapp` / `extension` / `desktop` / `ai`) to select applicable dimensions; skip inapplicable ones. Routing rules are in each dimension's heading.
|
|
40
41
|
|
|
41
42
|
### Step 3 · Recommend vs. Expand
|
|
42
43
|
|
|
@@ -361,4 +362,4 @@ Only add supplementary handling if this feature has **special exception scenario
|
|
|
361
362
|
|
|
362
363
|
---
|
|
363
364
|
|
|
364
|
-
> **Intermediate artifact**: This Skill is a subroutine. After producing a recommendation row or Q-table, control returns to `/archi.plan` step_2, where the caller assembles the output into the
|
|
365
|
+
> **Intermediate artifact**: This Skill is a subroutine. After producing a recommendation row or Q-table, control returns to `/archi.plan` step_2, where the caller assembles the output into the Task Proposal's architecture recommendation table.
|
|
@@ -6,7 +6,7 @@ description: Embedded lightweight review. In an isolated context, reviews main A
|
|
|
6
6
|
|
|
7
7
|
# Embedded Lightweight Review
|
|
8
8
|
|
|
9
|
-
## System
|
|
9
|
+
## System Flow Position
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
/archi.* step_N → Verify phase
|
|
@@ -27,25 +27,25 @@ Main Agent Signoff (must respond to findings)
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## Modes and
|
|
30
|
+
## Modes and Review Dimensions
|
|
31
31
|
|
|
32
32
|
### Mode `init` (caller: start, inherit)
|
|
33
33
|
|
|
34
34
|
Review global file quality for new/inherited projects.
|
|
35
35
|
|
|
36
|
-
| # | Dimension | Review
|
|
36
|
+
| # | Dimension | Review Points |
|
|
37
37
|
|:---|:---|:---|
|
|
38
38
|
| 1 | **Vision-Roadmap alignment** | Roadmap task direction aligns with vision.md north star |
|
|
39
39
|
| 2 | **Tech Stack consistency** | `02_tech_stack.md` matches actual deps/config |
|
|
40
40
|
| 3 | **Global file completeness** | Required global files present (vision, roadmap, map, dictionary, tech_stack, custom_rules) |
|
|
41
41
|
| 4 | **Zero info omission** | All Brief/code info routed to corresponding files |
|
|
42
|
-
| 5 |
|
|
42
|
+
| 5 | [?UI] **Design Tokens** | `design_tokens.json` has base colors/fonts/spacing |
|
|
43
43
|
|
|
44
44
|
### Mode `plan-docs` (caller: plan)
|
|
45
45
|
|
|
46
46
|
Review planning doc (spec/ui/plan) quality.
|
|
47
47
|
|
|
48
|
-
| # | Dimension | Review
|
|
48
|
+
| # | Dimension | Review Points |
|
|
49
49
|
|:---|:---|:---|
|
|
50
50
|
| 1 | **Design Fidelity** | spec § 2 fully covers confirmed functional design |
|
|
51
51
|
| 2 | **Dimension Match** | spec § 2 dimension format matches Task Type |
|
|
@@ -54,39 +54,39 @@ Review planning doc (spec/ui/plan) quality.
|
|
|
54
54
|
| 5 | **Notes Quality** | plan.json each task notes has deliverable+constraint+executable verification |
|
|
55
55
|
| 6 | **Interface Exports** | INF task § 4 filled; interface declared when downstream deps exist |
|
|
56
56
|
| 7 | **Constraints** | § 5 includes vision.md + tech_stack red lines |
|
|
57
|
-
| 8 |
|
|
58
|
-
| 9 |
|
|
59
|
-
| 10 |
|
|
60
|
-
| 11 |
|
|
57
|
+
| 8 | [?Data] **Data Integrity** | Entities and fields match confirmed core entities |
|
|
58
|
+
| 9 | [?Complex] **Design Trace** | design.md § 6 all ACs traceable |
|
|
59
|
+
| 10 | [?Complex] **Parameter Specificity** | design.md § 3 params concrete (no vague terms) |
|
|
60
|
+
| 11 | [?Complex] **Self-Check Pass** | design.md § 2 mechanism self-check list passes |
|
|
61
61
|
|
|
62
62
|
### Mode `code-impl` (caller: code)
|
|
63
63
|
|
|
64
64
|
Review code implementation quality.
|
|
65
65
|
|
|
66
|
-
| # | Dimension | Review
|
|
66
|
+
| # | Dimension | Review Points |
|
|
67
67
|
|:---|:---|:---|
|
|
68
68
|
| 1 | **Tech Consistency** | Matches `02_tech_stack.md` (libs/patterns/API style) |
|
|
69
69
|
| 2 | **SOTA** | Reject outdated patterns; use tech_stack best practices |
|
|
70
70
|
| 3 | **Security** | No sensitive info leak; input validated |
|
|
71
71
|
| 4 | **Performance** | Avoid unnecessary large deps/full imports/useless computation/memory leaks |
|
|
72
|
-
| 5 |
|
|
73
|
-
| 6 |
|
|
74
|
-
| 7 |
|
|
75
|
-
| 8 |
|
|
76
|
-
| 9 |
|
|
77
|
-
| 10 |
|
|
78
|
-
| 11 |
|
|
72
|
+
| 5 | [?UI] **Design Compliance** | Styles use Token/Preset only; no hardcoded magic values |
|
|
73
|
+
| 6 | [?UI] **Accessibility** | Necessary a11y attributes present |
|
|
74
|
+
| 7 | [?Data] **Data Integrity** | Matches `data_snapshot.json`; field names/types consistent |
|
|
75
|
+
| 8 | [?i18n] **I18n** | No hardcoded strings; use Key/dictionary reference |
|
|
76
|
+
| 9 | [?Complex] **Design Compliance** | State transitions/flows/protocols match design.md § 2 |
|
|
77
|
+
| 10 | [?Complex] **Invariant Enforcement** | design.md § 4 invariants have assert/runtime checks in code |
|
|
78
|
+
| 11 | [?Complex] **Parameter Alignment** | Code values match design.md § 3 param table |
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
|
-
## Execution
|
|
82
|
+
## Execution Protocol
|
|
83
83
|
|
|
84
84
|
1. **Load context**: Load required docs and code per caller-provided file paths
|
|
85
85
|
2. **Filter dimensions by mode**: Execute only dimensions for current mode
|
|
86
86
|
3. **Review item by item**: Each dimension outputs PASS or finding (level+location+description)
|
|
87
87
|
4. **Output finding list**: Return sorted by level
|
|
88
88
|
|
|
89
|
-
### Finding
|
|
89
|
+
### Finding Levels
|
|
90
90
|
|
|
91
91
|
| Level | Meaning | Main Agent must |
|
|
92
92
|
|:---|:---|:---|
|
|
@@ -94,7 +94,7 @@ Review code implementation quality.
|
|
|
94
94
|
| `WARNING` | Risk | **Must explain** handling in signoff report |
|
|
95
95
|
| `INFO` | Suggestion | May decide whether to handle |
|
|
96
96
|
|
|
97
|
-
### Output
|
|
97
|
+
### Output Format
|
|
98
98
|
|
|
99
99
|
```
|
|
100
100
|
### Silent Audit Results (mode: <mode>)
|