architext 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -1
- package/README.md +93 -14
- package/README.zh-CN.md +92 -14
- package/dist/index.js +53 -39
- package/dist/templates/en/briefs/_base.md +53 -13
- package/dist/templates/en/briefs/_modules.md +31 -4
- package/dist/templates/en/docs/global/error_memory.json +40 -0
- package/dist/templates/en/docs/global/map.json +46 -90
- package/dist/templates/en/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +6 -13
- package/dist/templates/en/{rules/02_tech_stack.md → docs/global/tech_stack.md} +7 -18
- package/dist/templates/en/docs/global/vision.md +1 -1
- package/dist/templates/en/docs/prompts/audit.md +80 -94
- package/dist/templates/en/docs/prompts/code.md +99 -89
- package/dist/templates/en/docs/prompts/edit.md +61 -51
- package/dist/templates/en/docs/prompts/fix.md +59 -43
- package/dist/templates/en/docs/prompts/help.md +23 -31
- package/dist/templates/en/docs/prompts/inherit.md +97 -117
- package/dist/templates/en/docs/prompts/map.md +48 -69
- package/dist/templates/en/docs/prompts/plan.md +141 -240
- package/dist/templates/en/docs/prompts/recover.md +19 -34
- package/dist/templates/en/docs/prompts/ref.md +43 -138
- package/dist/templates/en/docs/prompts/remove.md +63 -110
- package/dist/templates/en/docs/prompts/revise.md +71 -106
- package/dist/templates/en/docs/prompts/scope.md +78 -117
- package/dist/templates/en/docs/prompts/script.md +102 -0
- package/dist/templates/en/docs/prompts/start.md +98 -132
- package/dist/templates/en/docs/prompts/ui.md +113 -0
- package/dist/templates/en/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/en/docs/templates/spec.template.md +1 -1
- package/dist/templates/en/docs/templates/ui.template.md +8 -8
- package/dist/templates/en/rules/00_system.md +268 -117
- package/dist/templates/en/rules/90_custom_rules.md +3 -1
- package/dist/templates/en/skills/archi-data-sync/SKILL.md +37 -23
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +138 -240
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +10 -6
- package/dist/templates/en/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/en/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +24 -25
- package/dist/templates/en/skills/archi-ui-wireframe/SKILL.md +175 -305
- package/dist/templates/icon.svg +16 -0
- package/dist/templates/zh/briefs/_base.md +56 -17
- package/dist/templates/zh/briefs/_modules.md +28 -1
- package/dist/templates/zh/docs/global/error_memory.json +40 -0
- package/dist/templates/zh/docs/global/map.json +39 -109
- package/dist/templates/zh/{rules/04_cli_tools.md → docs/global/references/cli_reference.md} +0 -7
- package/dist/templates/zh/{rules/02_tech_stack.md → docs/global/tech_stack.md} +9 -20
- package/dist/templates/zh/docs/global/vision.md +1 -1
- package/dist/templates/zh/docs/prompts/audit.md +43 -57
- package/dist/templates/zh/docs/prompts/code.md +66 -56
- package/dist/templates/zh/docs/prompts/edit.md +52 -42
- package/dist/templates/zh/docs/prompts/fix.md +39 -29
- package/dist/templates/zh/docs/prompts/help.md +13 -21
- package/dist/templates/zh/docs/prompts/inherit.md +67 -86
- package/dist/templates/zh/docs/prompts/map.md +28 -50
- package/dist/templates/zh/docs/prompts/plan.md +100 -199
- package/dist/templates/zh/docs/prompts/recover.md +9 -24
- package/dist/templates/zh/docs/prompts/ref.md +11 -106
- package/dist/templates/zh/docs/prompts/remove.md +39 -74
- package/dist/templates/zh/docs/prompts/revise.md +47 -88
- package/dist/templates/zh/docs/prompts/scope.md +52 -91
- package/dist/templates/zh/docs/prompts/script.md +102 -0
- package/dist/templates/zh/docs/prompts/start.md +75 -110
- package/dist/templates/zh/docs/prompts/ui.md +113 -0
- package/dist/templates/zh/docs/shared/ui-redlines.md +7 -0
- package/dist/templates/zh/docs/templates/spec.template.md +1 -1
- package/dist/templates/zh/docs/templates/ui.template.md +8 -8
- package/dist/templates/zh/rules/00_system.md +252 -131
- package/dist/templates/zh/rules/90_custom_rules.md +2 -1
- package/dist/templates/zh/skills/archi-data-sync/SKILL.md +27 -13
- package/dist/templates/zh/skills/archi-decompose-roadmap/SKILL.md +133 -235
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +6 -1
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +6 -2
- package/dist/templates/zh/skills/archi-interview-protocol/SKILL.md +2 -2
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +77 -301
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +4 -5
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +174 -301
- package/package.json +3 -1
- package/dist/templates/en/rules/01_workflow.md +0 -93
- package/dist/templates/en/rules/03_data_governance.md +0 -102
- package/dist/templates/en/rules/99_context_glue.md +0 -53
- package/dist/templates/zh/rules/01_workflow.md +0 -94
- package/dist/templates/zh/rules/03_data_governance.md +0 -133
- package/dist/templates/zh/rules/99_context_glue.md +0 -53
|
@@ -1,96 +1,106 @@
|
|
|
1
1
|
<protocol_edit>
|
|
2
|
-
**Trigger**: `/archi.edit <id> [context]`
|
|
3
|
-
**Goal**:
|
|
2
|
+
**Trigger**: `/archi.edit <id> [context]` | Auto-loaded by Workflow Dispatch on natural language trigger
|
|
3
|
+
**Goal**: Update managed module's Spec/UI docs per new requirements/feedback, and append development plan.
|
|
4
4
|
|
|
5
5
|
<meta>
|
|
6
6
|
<style>Collaborative, Iterative, Traceable</style>
|
|
7
7
|
<language>English</language>
|
|
8
8
|
<principles>
|
|
9
|
-
1. **Doc First**: Must modify docs (Spec/UI) first, then generate Plan.
|
|
10
|
-
2. **Incremental**: Only append new Tasks to Plan
|
|
9
|
+
1. **Doc First**: Must modify docs (Spec/UI) first, then generate Plan. Do not skip docs to change code plan.
|
|
10
|
+
2. **Incremental**: Only append new Tasks to Plan; keep completed history (unless rollback needed).
|
|
11
11
|
3. **Conflict Check**: Check if new requirements conflict with tech_stack / design_tokens.
|
|
12
|
-
4. **Frontmatter Preservation**:
|
|
12
|
+
4. **Frontmatter Preservation**: Do not break existing document Metadata.
|
|
13
|
+
5. **IDE-Native First**: Leverage IDE native capabilities to drive execution rhythm; this protocol defines quality standards and checkpoints, not fight IDE planning/execution mechanisms.
|
|
13
14
|
</principles>
|
|
14
15
|
</meta>
|
|
15
16
|
|
|
16
17
|
<step_1_load>
|
|
17
|
-
**Role**: Product Manager
|
|
18
18
|
**Action**:
|
|
19
|
-
- Read `[[__DOCS_DIR__]]/tasks/<ID>_<Slug
|
|
20
|
-
-
|
|
21
|
-
- Check `Spec-Status`
|
|
22
|
-
|
|
23
|
-
- `Stub` → Proceed to step_1_5_enrich.
|
|
24
|
-
- [?Major UX Change] Quick search for similar product best practices.
|
|
19
|
+
- Read spec.md, ui.md, plan.json under `[[__DOCS_DIR__]]/tasks/<ID>_<Slug>/`.
|
|
20
|
+
- (UI projects only) Read ui_context.md (locate screen scope and navigation for this feature).
|
|
21
|
+
- Check `Spec-Status` in spec.md: `Full` → normal flow step_2 | `Stub` → step_1_5_enrich.
|
|
22
|
+
- (Major UX change) Quick search for similar product best practices.
|
|
25
23
|
</step_1_load>
|
|
26
24
|
|
|
27
25
|
<step_1_5_enrich>
|
|
28
|
-
**
|
|
29
|
-
**Trigger**: spec.md contains `Spec-Status: Stub` (lightweight snapshot generated by `/archi.inherit`).
|
|
26
|
+
**Trigger**: spec.md contains `Spec-Status: Stub` (lightweight snapshot from `/archi.inherit`).
|
|
30
27
|
|
|
31
28
|
**Action**:
|
|
32
|
-
1. Inform user: "This task only
|
|
33
|
-
2. Extract source
|
|
34
|
-
3.
|
|
35
|
-
4.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
7. Generate `plan.json` (all tasks as done, recording implemented content).
|
|
42
|
-
8. Present enriched spec summary to user.
|
|
43
|
-
|
|
44
|
-
**Gate**: User confirms enriched content is correct before proceeding to step_2_refine_docs.
|
|
29
|
+
1. Inform user: "This task has only a lightweight snapshot; must complete full spec before modification."
|
|
30
|
+
2. Extract source paths from stub "Associated Files"; read each (entry + core logic).
|
|
31
|
+
3. Enrich into full spec from code analysis: keep existing overview and flows; add Gherkin Scenarios + interface/type definitions.
|
|
32
|
+
4. Update `Spec-Status: Stub → Full`.
|
|
33
|
+
5. (UI projects only) If module has UI → generate `ui.md`; if new screens needed, [[SKILL: archi-ui-wireframe|invoke skill]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-ui-wireframe/SKILL.md`)]].
|
|
34
|
+
6. Generate `plan.json` (all tasks done).
|
|
35
|
+
7. Output enriched spec summary to user.
|
|
36
|
+
|
|
37
|
+
**Gate**: Proceed to step_2_refine_docs after user confirms.
|
|
45
38
|
**Exception**: Associated files missing/moved → prompt user to update paths.
|
|
46
39
|
</step_1_5_enrich>
|
|
47
40
|
|
|
48
41
|
<step_2_refine_docs>
|
|
49
|
-
**Role**: Requirements Analyst & Designer
|
|
50
42
|
**Action**:
|
|
51
|
-
- Modify spec.md
|
|
52
|
-
-
|
|
43
|
+
- Modify spec.md and ui.md per `[context]`.
|
|
44
|
+
- (UI modified) [[SKILL: archi-ui-wireframe|Follow the skill protocol to sync `screens/S-XX.html` + `ui_context.md`]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-ui-wireframe/SKILL.md`)]]:
|
|
53
45
|
|
|
54
|
-
| Change Type | Criteria |
|
|
46
|
+
| Change Type | Criteria | Handling |
|
|
55
47
|
|:---|:---|:---|
|
|
56
|
-
| No screen impact | Logic/data only
|
|
57
|
-
| Minor UI tweak | New/modified state, popup,
|
|
58
|
-
| Screen structure change | Layout refactor, new
|
|
59
|
-
| Task reduction | Screen/region removed entirely | Call skill
|
|
48
|
+
| No screen impact | Logic/data change only | Update spec.md only |
|
|
49
|
+
| Minor UI tweak | New/modified state, popup, local area | Call skill to update; output `MODIFIED: screens/S-XX.html` |
|
|
50
|
+
| Screen structure change | Layout refactor, new screen, navigation change | Call skill to update |
|
|
51
|
+
| Task reduction | Screen/region removed entirely | Call skill to remove; output `REMOVED: screens/S-XX.html` |
|
|
60
52
|
|
|
61
|
-
- Ask user
|
|
53
|
+
- Ask user when requirements are vague.
|
|
62
54
|
|
|
63
|
-
**Output**: Updated
|
|
55
|
+
**Output**: Updated docs and change summary.
|
|
64
56
|
</step_2_refine_docs>
|
|
65
57
|
|
|
66
58
|
<step_3_update_plan>
|
|
67
|
-
**Role**: Tech Lead
|
|
68
59
|
**Action**:
|
|
69
|
-
- Append new Phase
|
|
70
|
-
-
|
|
71
|
-
- **Status Transition**: If current task status=`done`, reset to `active` after appending the Phase (otherwise `/archi.code` will be rejected by the Status Gate).
|
|
60
|
+
- Append new Phase to `plan.json` with specific Tasks; each must be verifiable.
|
|
61
|
+
- **Status transition**: When status=`done`, after appending Phase must reset to `active`.
|
|
72
62
|
|
|
73
|
-
**Terminal Gate** (
|
|
63
|
+
**Terminal Gate** (do not skip): Standard check (task --check + render).
|
|
74
64
|
| Step | Command | Pass Condition |
|
|
75
65
|
|:---|:---|:---|
|
|
76
|
-
|
|
|
77
|
-
| 2 | `npx archi render` | `.md` views generated |
|
|
78
|
-
| 3 | [if current status=done] `npx archi task <ID> --status active` | Task status reset to active |
|
|
66
|
+
| 3 | [when status=done] `npx archi task <ID> --status active` | Status reset |
|
|
79
67
|
|
|
80
|
-
**Output**: plan.json with new tasks appended; if status transition
|
|
68
|
+
**Output**: plan.json with new tasks appended; if status transition performed, output `MODIFIED: roadmap.json <ID>.status done→active`. Enter step_4_data_sync.
|
|
81
69
|
</step_3_update_plan>
|
|
82
70
|
|
|
83
|
-
<
|
|
71
|
+
<step_4_data_sync>
|
|
72
|
+
**Data governance sync**:
|
|
73
|
+
|
|
74
|
+
[[SUBAGENT: archi-data-sync|context: Scan new business entities/error codes/Schema/endpoints/commands/exports from requirement changes, incrementally sync per 00_system.md]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-data-sync/SKILL.md`, follow its execution protocol)]]
|
|
75
|
+
</step_4_data_sync>
|
|
76
|
+
|
|
77
|
+
<step_4_verify>
|
|
84
78
|
**Role**: Independent Reviewer
|
|
85
79
|
|
|
86
|
-
[[SUBAGENT: archi-silent-audit|mode: plan-docs, context: Review step_2 updated spec.md/ui.md and step_3 appended plan.json new Phase
|
|
80
|
+
[[SUBAGENT: archi-silent-audit|mode: plan-docs, context: Review step_2 updated spec.md/ui.md and step_3 appended plan.json new Phase]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-silent-audit/SKILL.md`, follow mode: plan-docs review)]]
|
|
87
81
|
|
|
88
82
|
[[INCLUDE: shared/verify-result-handling.md]]
|
|
89
|
-
</
|
|
83
|
+
</step_4_verify>
|
|
84
|
+
|
|
85
|
+
<step_6_summary>
|
|
86
|
+
**Pre-signoff Checklist** (confirm each item before Output):
|
|
87
|
+
□ spec.md — updated per context, changes tracked
|
|
88
|
+
□ (if UI changed) ui.md + screens/S-XX.html + ui_context.md — synced
|
|
89
|
+
□ plan.json — new Phase appended (history tasks fully preserved)
|
|
90
|
+
□ (if original status=done) roadmap.json — status reset to active
|
|
91
|
+
□ Global files — related JSON files synced for changes:
|
|
92
|
+
- dictionary.json + error_codes.json + env_registry.json — required
|
|
93
|
+
- (UI projects only) design_tokens.json + ui_context.md
|
|
94
|
+
- (Data projects only) data_snapshot.json
|
|
95
|
+
- (API projects only) api_snapshot.json
|
|
96
|
+
- (CLI projects only) command_api.json
|
|
97
|
+
- (Lib projects only) public_api.json
|
|
98
|
+
□ Step 4 Data Sync — archi-data-sync executed
|
|
99
|
+
□ Step 4 Silent Audit — executed, all CRITICAL issues resolved
|
|
100
|
+
□ Terminal Gate — task --check no ERROR (executed in step_3)
|
|
90
101
|
|
|
91
|
-
<step_4_summary>
|
|
92
102
|
**Action** (Gate must complete in step_3):
|
|
93
103
|
**Output**: Task update summary with Spec/UI/Plan change overview and Next Steps table. Recommend running `/archi.code <ID>`.
|
|
94
|
-
</
|
|
104
|
+
</step_6_summary>
|
|
95
105
|
|
|
96
106
|
</protocol_edit>
|
|
@@ -1,86 +1,102 @@
|
|
|
1
1
|
<protocol_fix>
|
|
2
|
-
**Trigger**: `/archi.fix [id] <context>`
|
|
3
|
-
**Goal**: Diagnose
|
|
2
|
+
**Trigger**: `/archi.fix [id] <context>` | Auto-loaded by Workflow Dispatch on natural language trigger
|
|
3
|
+
**Goal**: Diagnose and fix bugs. If `[id]` not provided, auto-locate related feature module by context.
|
|
4
4
|
|
|
5
5
|
<meta>
|
|
6
6
|
<style>Diagnostic, Surgical, Spec-Compliant</style>
|
|
7
7
|
<language>English</language>
|
|
8
8
|
<principles>
|
|
9
|
-
1. **Spec Immutable**:
|
|
10
|
-
2. **Reproduction**: Must
|
|
11
|
-
3. **Root Cause**: Must analyze root cause, not patch
|
|
9
|
+
1. **Spec Immutable**: Do not modify `spec.md` / `ui.md` (unless the bug is a doc error).
|
|
10
|
+
2. **Reproduction**: Must have reproduction steps or test case first.
|
|
11
|
+
3. **Root Cause**: Must analyze root cause, not patch surface.
|
|
12
12
|
4. **Test-Driven**: Fix plan must include new test cases.
|
|
13
|
-
5. **Auto-Discovery**: If ID not specified, locate Task via
|
|
13
|
+
5. **Auto-Discovery**: If ID not specified, locate Task via context semantic search.
|
|
14
|
+
6. **IDE-Native First**: Leverage IDE native capabilities to drive execution rhythm; this protocol defines quality standards and checkpoints, not fight IDE planning/execution mechanisms.
|
|
14
15
|
</principles>
|
|
15
16
|
</meta>
|
|
16
17
|
|
|
17
18
|
<step_1_diagnose>
|
|
18
|
-
**Role**:
|
|
19
|
+
**Role**: Failure Analyst
|
|
19
20
|
**Action**:
|
|
20
21
|
1. **Resolve Target**:
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
2. Read all docs
|
|
25
|
-
3. Read
|
|
26
|
-
4. Analyze `[context]
|
|
27
|
-
5. **Hypothesis**: Propose 1
|
|
28
|
-
|
|
29
|
-
**Output**: Root Cause Analysis
|
|
22
|
+
- With `<id>`: Lock `tasks/<ID>_<Slug>/`.
|
|
23
|
+
- Without `<id>`: Analyze `[context]` to find most relevant module.
|
|
24
|
+
Single match → auto lock | Multiple matches → list candidates and ask | Cannot locate → error, request ID.
|
|
25
|
+
2. Read all docs and related code in target directory.
|
|
26
|
+
3. Read tech_stack.md (tech red lines) and vision.md (direction anchor).
|
|
27
|
+
4. Analyze `[context]` with code logic to locate potential fault points.
|
|
28
|
+
5. **Hypothesis**: Propose 1–3 root cause hypotheses.
|
|
29
|
+
|
|
30
|
+
**Output**: Fault diagnosis report (Root Cause Analysis).
|
|
30
31
|
</step_1_diagnose>
|
|
31
32
|
|
|
32
33
|
<step_2_plan_fix>
|
|
33
|
-
**Role**: Tech Lead
|
|
34
34
|
**Action**:
|
|
35
|
-
- Update
|
|
36
|
-
- Tasks: 1) Create reproduction test (Red) 2)
|
|
35
|
+
- Update plan.json; append phase `Bugfix: <Bug Title>`.
|
|
36
|
+
- Tasks: 1) Create reproduction test (Red) 2) Fix (Green) 3) Regression test.
|
|
37
37
|
|
|
38
|
-
**Terminal Gate** (
|
|
39
|
-
| Step | Command | Pass Condition |
|
|
40
|
-
|:---|:---|:---|
|
|
41
|
-
| 1 | `npx archi render` | `.md` views generated |
|
|
38
|
+
**Terminal Gate** (do not skip): Standard check (task --check + render).
|
|
42
39
|
|
|
43
40
|
**Output**: plan.json with fix tasks appended.
|
|
44
41
|
</step_2_plan_fix>
|
|
45
42
|
|
|
46
43
|
<step_3_execute_fix>
|
|
47
|
-
**Role**: Senior Engineer (Surgical Fix — bug only, no scope creep)
|
|
48
44
|
**Action**:
|
|
49
|
-
- Modify code
|
|
50
|
-
-
|
|
51
|
-
- Error handling follows `code.md` specs (no swallowing errors/no silent failures).
|
|
45
|
+
- Modify code per Plan. Fix bug only; do not refactor.
|
|
46
|
+
- Error handling follows `code.md` protocol.
|
|
52
47
|
</step_3_execute_fix>
|
|
53
48
|
|
|
54
49
|
<step_4_verify>
|
|
55
|
-
**
|
|
56
|
-
**Terminal Gate** (Do not skip; must complete before step_5 output):
|
|
50
|
+
**Terminal Gate** (do not skip):
|
|
57
51
|
| Step | Command | Pass Condition |
|
|
58
52
|
|:---|:---|:---|
|
|
59
|
-
|
|
|
53
|
+
| 0 | Check `scripts/validate` | If exists, must run; results per script |
|
|
54
|
+
| 1 | Run build command | Build success |
|
|
60
55
|
| 2 | Run type check | Zero type errors |
|
|
61
56
|
| 3 | Run Lint/Format | Pass |
|
|
62
|
-
| 4 | Run tests | Reproduction + regression
|
|
57
|
+
| 4 | Run tests | Reproduction test + regression test pass |
|
|
58
|
+
|
|
59
|
+
Fix any failure until pass.
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
**Code quality review**:
|
|
62
|
+
[[SUBAGENT: archi-silent-audit|mode: code-impl, context: Review fix code; focus Tech/Security/Performance + Spec Immutable]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-silent-audit/SKILL.md`, follow mode: code-impl check)]]
|
|
63
|
+
|
|
64
|
+
[[INCLUDE: shared/verify-result-handling.md]]
|
|
65
65
|
</step_4_verify>
|
|
66
66
|
|
|
67
|
-
<
|
|
68
|
-
**
|
|
67
|
+
<step_4_5_data_sync>
|
|
68
|
+
**Data governance sync**:
|
|
69
|
+
|
|
70
|
+
[[SUBAGENT: archi-data-sync|context: Scan new business entities/error codes/Schema from Bug fix, incrementally sync per 00_system.md]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-data-sync/SKILL.md`, follow its execution protocol)]]
|
|
71
|
+
</step_4_5_data_sync>
|
|
72
|
+
|
|
73
|
+
<step_5_plan_update>
|
|
69
74
|
**Action**:
|
|
70
|
-
1. Update
|
|
71
|
-
2. [
|
|
72
|
-
3. [Bugfix
|
|
75
|
+
1. Update plan.json Bugfix Phase completed tasks `done: true`.
|
|
76
|
+
2. [status=`done` and Bugfix all pass] → keep `done`.
|
|
77
|
+
3. [Bugfix has incomplete items] → `npx archi task <ID> --status active`; signoff note to re-run `/archi.code`.
|
|
78
|
+
|
|
79
|
+
**Output**: `MODIFIED: plan.json Bugfix Phase done flags`. Enter step_6_summary.
|
|
80
|
+
</step_5_plan_update>
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
<step_6_summary>
|
|
83
|
+
**Pre-signoff Checklist** (confirm each item before Output):
|
|
84
|
+
□ Root cause analyzed (not surface patch), Hypothesis output in step_1
|
|
85
|
+
□ plan.json — Bugfix Phase appended (step_2)
|
|
86
|
+
□ Reproduction test created and verified (Red → Green)
|
|
87
|
+
□ Code fix targets Bug only, no opportunistic refactoring
|
|
88
|
+
□ Step 4.5 Data Sync — archi-data-sync executed
|
|
89
|
+
□ Step 4 Terminal Gate — Build / type check / Lint / tests all passed
|
|
90
|
+
□ Step 4 Silent Audit — executed, all CRITICAL issues resolved
|
|
91
|
+
□ plan.json Bugfix Phase — done flags updated (step_5)
|
|
76
92
|
|
|
77
|
-
<step_5_summary>
|
|
78
93
|
**Output**: Bug fix summary with Root Cause analysis, fix content, new tests, and Next Steps table:
|
|
79
94
|
|
|
80
95
|
| Priority | Action | Notes |
|
|
81
96
|
|:---|:---|:---|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
97
|
+
| (If no scripts/) | `/archi.script` | Generate automation validation scripts |
|
|
98
|
+
| Recommended | `/archi.audit <ID>` | Re-audit to confirm fix complete |
|
|
99
|
+
| Optional | `/archi.code <ID>` | If incomplete items, continue implementation |
|
|
100
|
+
</step_6_summary>
|
|
85
101
|
|
|
86
102
|
</protocol_fix>
|
|
@@ -1,69 +1,61 @@
|
|
|
1
1
|
<protocol_help>
|
|
2
2
|
**Trigger**: `/archi.help [question]`
|
|
3
|
-
**Goal**: Project navigation and
|
|
3
|
+
**Goal**: Project navigation and context Q&A. Analyze project current state, recommend next actions; or answer user questions based on project context.
|
|
4
4
|
|
|
5
5
|
<meta>
|
|
6
6
|
<style>Concise, Contextual, Actionable</style>
|
|
7
7
|
<language>English</language>
|
|
8
8
|
<principles>
|
|
9
|
-
1. **Context-Aware**: Answer based on
|
|
10
|
-
2. **Actionable Output**: Every output must include
|
|
11
|
-
3. **Minimal Token**:
|
|
12
|
-
4. **No Audit**:
|
|
9
|
+
1. **Context-Aware**: Answer based on actual project state; no guessing.
|
|
10
|
+
2. **Actionable Output**: Every output must include executable next-step suggestions (concrete command + params).
|
|
11
|
+
3. **Minimal Token**: Concise output; don't restate known info. Present reasoning and suggestions only.
|
|
12
|
+
4. **No Audit**: Do not do deep audit (that's `/archi.audit`). Focus on navigation and Q&A.
|
|
13
13
|
</principles>
|
|
14
14
|
</meta>
|
|
15
15
|
|
|
16
16
|
<step_1_load_context>
|
|
17
|
-
**Role**: Project Observer
|
|
18
17
|
**Action**:
|
|
19
|
-
1.
|
|
20
|
-
2. Scan
|
|
21
|
-
3. [?question] If user provided a question, locate relevant files by
|
|
18
|
+
1. **Load**: roadmap.json (id/title/status/deps/tag only; skip goal/notes).
|
|
19
|
+
2. **Scan Tasks**: Scan tasks/ — get existing Tasks and doc completeness (has spec.md / ui.md / plan.json).
|
|
20
|
+
3. [?question] If user provided a question, locate and read relevant files by semantics.
|
|
22
21
|
|
|
23
22
|
**Output**: Internal context (not shown to user).
|
|
24
23
|
</step_1_load_context>
|
|
25
24
|
|
|
26
25
|
<step_2_route>
|
|
27
|
-
**
|
|
28
|
-
**Action**: Branch based on input:
|
|
26
|
+
**Action**: Branch by input:
|
|
29
27
|
|
|
30
28
|
| Input | Branch |
|
|
31
29
|
|:---|:---|
|
|
32
30
|
| No args | → step_3_navigate (project navigation) |
|
|
33
|
-
| Has `[question]` | → step_4_answer (
|
|
31
|
+
| Has `[question]` | → step_4_answer (context Q&A) |
|
|
34
32
|
|
|
35
33
|
</step_2_route>
|
|
36
34
|
|
|
37
35
|
<step_3_navigate>
|
|
38
|
-
**Role**: Project Navigator
|
|
39
36
|
**Action**:
|
|
40
37
|
1. **Determine project phase**:
|
|
41
38
|
|
|
42
|
-
| Signal | Phase |
|
|
39
|
+
| Signal | Phase | Suggestion |
|
|
43
40
|
|:---|:---|:---|
|
|
44
41
|
| roadmap.json missing | Not initialized | New project → `/archi.start`; existing code → `/archi.inherit` |
|
|
45
|
-
| Has roadmap but no
|
|
46
|
-
| Has Legacy
|
|
47
|
-
| Has active
|
|
48
|
-
| Has active
|
|
49
|
-
| All tasks done |
|
|
50
|
-
| Has blocked
|
|
51
|
-
|
|
52
|
-
2. **Output
|
|
53
|
-
- One-line summary of current state
|
|
54
|
-
- Recommended next action (with specific command)
|
|
55
|
-
- If multiple paths available, list by priority (max 3)
|
|
42
|
+
| Has roadmap but no tasks/ | Started, not planned | `/archi.scope` to plan new tasks |
|
|
43
|
+
| Has Legacy stub (Spec-Status: Stub) | Inherited, not enriched | `/archi.edit LEG-xx` to enrich spec |
|
|
44
|
+
| Has active task and plan.json complete | Ready to code | `/archi.code <ID>` |
|
|
45
|
+
| Has active task but missing spec/plan | Planning incomplete | `/archi.plan <ID>` to complete |
|
|
46
|
+
| All tasks done | Completed | `/archi.scope` to plan new or release |
|
|
47
|
+
| Has blocked task | Blocked | Show block reason and upstream deps |
|
|
48
|
+
|
|
49
|
+
2. **Output**: One-line state summary + recommended next step (with command) + optional paths (≤3, by priority).
|
|
56
50
|
</step_3_navigate>
|
|
57
51
|
|
|
58
52
|
<step_4_answer>
|
|
59
|
-
**Role**: Project Advisor
|
|
60
53
|
**Action**:
|
|
61
|
-
1. Parse `[question]` semantics
|
|
62
|
-
2.
|
|
63
|
-
3.
|
|
64
|
-
4. If insufficient info to answer, state what's missing instead of fabricating.
|
|
54
|
+
1. Parse `[question]` semantics; locate and read relevant project files.
|
|
55
|
+
2. Answer comprehensively; operational questions must include concrete command suggestions.
|
|
56
|
+
3. When info insufficient, state what's missing; do not fabricate.
|
|
65
57
|
|
|
66
|
-
**Output**: Concise answer based on project context + relevant file
|
|
58
|
+
**Output**: Concise answer based on project context + relevant file refs.
|
|
67
59
|
</step_4_answer>
|
|
68
60
|
|
|
69
61
|
</protocol_help>
|