architext 0.0.2 → 0.0.4
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 +41 -1
- package/README.md +10 -5
- package/README.zh-CN.md +10 -5
- package/dist/index.js +43 -39
- 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/code.md +21 -28
- package/dist/templates/en/docs/prompts/edit.md +18 -9
- package/dist/templates/en/docs/prompts/inherit.md +42 -23
- package/dist/templates/en/docs/prompts/plan.md +141 -47
- package/dist/templates/en/docs/prompts/recover.md +63 -0
- package/dist/templates/en/docs/prompts/ref.md +258 -0
- package/dist/templates/en/docs/prompts/revise.md +1 -1
- package/dist/templates/en/docs/prompts/scope.md +3 -3
- package/dist/templates/en/docs/prompts/start.md +9 -15
- 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/skills/archi-data-sync/SKILL.md +83 -0
- package/dist/templates/en/skills/archi-decompose-roadmap/SKILL.md +178 -132
- package/dist/templates/en/skills/archi-design-patterns/SKILL.md +139 -0
- package/dist/templates/en/skills/archi-feature-relations/SKILL.md +118 -0
- package/dist/templates/en/skills/archi-silent-audit/SKILL.md +118 -0
- package/dist/templates/zh/briefs/_base.md +2 -2
- package/dist/templates/zh/briefs/_modules.md +2 -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 +8 -8
- package/dist/templates/zh/docs/prompts/code.md +33 -40
- package/dist/templates/zh/docs/prompts/edit.md +19 -10
- package/dist/templates/zh/docs/prompts/fix.md +8 -2
- package/dist/templates/zh/docs/prompts/inherit.md +45 -27
- package/dist/templates/zh/docs/prompts/map.md +2 -1
- package/dist/templates/zh/docs/prompts/plan.md +143 -50
- package/dist/templates/zh/docs/prompts/recover.md +63 -0
- package/dist/templates/zh/docs/prompts/ref.md +258 -0
- package/dist/templates/zh/docs/prompts/remove.md +2 -14
- package/dist/templates/zh/docs/prompts/revise.md +12 -4
- package/dist/templates/zh/docs/prompts/scope.md +6 -6
- package/dist/templates/zh/docs/prompts/start.md +19 -26
- 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 +35 -5
- package/dist/templates/zh/rules/01_workflow.md +5 -4
- package/dist/templates/zh/rules/02_tech_stack.md +7 -6
- package/dist/templates/zh/rules/03_data_governance.md +40 -9
- 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 +82 -37
- package/dist/templates/zh/skills/archi-design-patterns/SKILL.md +139 -0
- package/dist/templates/zh/skills/archi-feature-relations/SKILL.md +118 -0
- package/dist/templates/zh/skills/archi-plan-options/SKILL.md +25 -25
- package/dist/templates/zh/skills/archi-silent-audit/SKILL.md +118 -0
- package/dist/templates/zh/skills/archi-ui-wireframe/SKILL.md +1 -1
- package/package.json +2 -2
- 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
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
**Trigger**: Only when Step 1 finds "Required" or "Can supplement" gaps.
|
|
105
105
|
**Input**: Step 1 gap list. Max 3–6 questions.
|
|
106
106
|
|
|
107
|
-
[[SKILL:
|
|
107
|
+
[[SKILL: archi-interview-protocol|Follow the skill's core rules and standard output format.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-interview-protocol/SKILL.md` and follow its rules)]]
|
|
108
108
|
</step_2_supplementary>
|
|
109
109
|
|
|
110
110
|
<step_3_constitution>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
- If user provided nothing, keep template default
|
|
162
162
|
|
|
163
163
|
### 3.4 Roadmap (`[[__DOCS_DIR__]]/global/roadmap.json`)
|
|
164
|
-
[[SKILL:
|
|
164
|
+
[[SKILL: archi-decompose-roadmap|Follow the skill protocol to generate the task chain from the Brief feature list and write to roadmap.json, then proceed to the next step immediately without user confirmation.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-decompose-roadmap/SKILL.md` and follow its protocol)]]
|
|
165
165
|
|
|
166
166
|
### 3.5 Other global docs (as needed)
|
|
167
167
|
- `dictionary.json`: Extract domain terms from Brief
|
|
@@ -186,23 +186,17 @@
|
|
|
186
186
|
**Output**: Write all files, then run `npx archi render` to generate visual `.md`.
|
|
187
187
|
</step_3_constitution>
|
|
188
188
|
|
|
189
|
-
<
|
|
190
|
-
**Role**:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
2. **Tech Stack consistency**: Is rule file `02_tech_stack` aligned with Brief preferences? Contains full stack?
|
|
194
|
-
3. **Custom Rules**: Did Brief supplementary notes/tech red lines get written to rule file `90_custom_rules`?
|
|
195
|
-
4. **Roadmap compliance**: Run `npx archi task --check` to verify.
|
|
196
|
-
5. [?UI] **Design Tokens**: Does `design_tokens.json` have base color/font/spacing definitions?
|
|
197
|
-
6. **Brief alignment**: All Brief core features mapped to Roadmap tasks?
|
|
198
|
-
7. **Zero omission**: All user-provided content routed to correct files?
|
|
189
|
+
<step_4_verify>
|
|
190
|
+
**Role**: Independent Reviewer
|
|
191
|
+
|
|
192
|
+
[[SUBAGENT: archi-silent-audit|mode: init, context: Review step_3 generated global files (vision, tech_stack, roadmap, dictionary, etc.)]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-silent-audit/SKILL.md`, follow mode: init review dimension table item by item)]]
|
|
199
193
|
|
|
200
|
-
|
|
201
|
-
</
|
|
194
|
+
[[INCLUDE: shared/verify-result-handling.md]]
|
|
195
|
+
</step_4_verify>
|
|
202
196
|
|
|
203
197
|
<step_4_5_ui_wireframe>
|
|
204
198
|
**Trigger**: Only when project features include [?UI].
|
|
205
|
-
**Action**:
|
|
199
|
+
**Action**: [[SKILL: archi-ui-wireframe|Follow the skill protocol to auto-invoke Phase 1 wireframe generation.]][[NO-SKILL: (Skill not installed: read `[[__DOCS_DIR__]]/skills/archi-ui-wireframe/SKILL.md` and follow its protocol)]]
|
|
206
200
|
- Start generation without user confirmation
|
|
207
201
|
- Read the just-written vision.md + roadmap.json + design_tokens.json + 02_tech_stack
|
|
208
202
|
- Write `ui_concept.html` + `ui_context.md`
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "[?Complex] Technical Design — Defines implementation strategy, state flow, parameters and invariants for core mechanisms. Generated only when the task involves non-trivial technical decisions."
|
|
3
|
+
glue: Bridges spec.md (WHAT) and plan.json (DO), defining HOW. plan.json tasks must cover all mechanisms in this doc; spec.md § 2 AC must be traceable to complete paths in this design.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Technical Design: {FEATURE_NAME}
|
|
7
|
+
|
|
8
|
+
> **Spec**: `spec.md` (Acceptance Criteria — constraint source for this design)
|
|
9
|
+
> **Plan**: `plan.json` (Execution tasks — downstream consumer of this design)
|
|
10
|
+
> **Trigger**: [AI: One sentence explaining why this task needs technical design]
|
|
11
|
+
|
|
12
|
+
## 1. Solution Overview
|
|
13
|
+
|
|
14
|
+
<!-- [AI]: 2-3 sentences summarizing the technical approach and key trade-offs.
|
|
15
|
+
- Reference plan.json decisions (e.g. "Data Flow=Realtime WebSocket")
|
|
16
|
+
- Explain why this approach over alternatives (brief ref if discussed in step_2)
|
|
17
|
+
- Do not repeat spec.md acceptance criteria; this section answers "how to implement" not "what to implement"
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
## 2. Core Mechanisms
|
|
21
|
+
|
|
22
|
+
<!-- [AI]: Main body of this doc. Select ≥1 structured pattern per technical need.
|
|
23
|
+
Each mechanism in its own subsection (2.1, 2.2, ...), labeled with pattern type.
|
|
24
|
+
Same task may combine patterns (e.g. State Machine for connection mgmt + Pipeline for message handling).
|
|
25
|
+
|
|
26
|
+
[[SKILL: archi-design-patterns|Follow the skill's pattern selection guide, generate standard-format tables and run self-checks. If any check fails, fix and re-check before proceeding to next mechanism.]]
|
|
27
|
+
-->
|
|
28
|
+
|
|
29
|
+
### 2.1 [Mechanism Name] — Pattern: [State Machine / Pipeline / Decision Matrix / Protocol]
|
|
30
|
+
|
|
31
|
+
<!-- Fill per archi-design-patterns skill's standard format for the chosen pattern -->
|
|
32
|
+
|
|
33
|
+
## 3. Parameters
|
|
34
|
+
|
|
35
|
+
<!-- [AI]: All concrete numeric values used across mechanisms, centralized.
|
|
36
|
+
Prohibit vague descriptions (e.g. "appropriate timeout", "reasonable interval"); must state concrete value + unit + rationale.
|
|
37
|
+
|
|
38
|
+
| Parameter | Value | Unit | Rationale |
|
|
39
|
+
|:---|:---|:---|:---|
|
|
40
|
+
| [name] | [value] | [unit] | [why this value] |
|
|
41
|
+
-->
|
|
42
|
+
|
|
43
|
+
## 4. Invariants
|
|
44
|
+
|
|
45
|
+
<!-- [AI]: Assertions that must hold at any time. Each must be assertable or testable.
|
|
46
|
+
Format: [INV-N] assertion description
|
|
47
|
+
|
|
48
|
+
Constraints:
|
|
49
|
+
- Each invariant must map to at least one plan.json test entry or task notes verification
|
|
50
|
+
- Invariants are implementation "guardrails": AI must ensure no violation when writing code
|
|
51
|
+
-->
|
|
52
|
+
|
|
53
|
+
## 5. Failure Modes
|
|
54
|
+
|
|
55
|
+
<!-- [AI]: Explicitly list possible failure scenarios for core mechanisms. Each must have detection and response.
|
|
56
|
+
|
|
57
|
+
| Failure | Detection | Response | Fallback |
|
|
58
|
+
|:---|:---|:---|:---|
|
|
59
|
+
| [description] | [how to detect: event/timeout/exception type] | [primary recovery: retry/reconnect/rollback] | [if recovery fails: switch mode/prompt user/silent log] |
|
|
60
|
+
|
|
61
|
+
Constraints:
|
|
62
|
+
- Detection must be concrete (no "on error"; write "4xx response / 3 heartbeat timeouts / catch TypeError")
|
|
63
|
+
- Fallback must be observable (no "report error"; write specific UI feedback or exit code)
|
|
64
|
+
-->
|
|
65
|
+
|
|
66
|
+
## 6. Trace Verification
|
|
67
|
+
|
|
68
|
+
<!-- [AI]: From each spec.md § 2 AC, trace the execution path through this design.
|
|
69
|
+
|
|
70
|
+
| AC (from spec § 2) | Trace Path (execution chain in this design) | Result |
|
|
71
|
+
|:---|:---|:---|
|
|
72
|
+
| [Given X When Y Then Z] | [State A →(event)→ State B →(action)→ State C] or [Pipeline Step 1→2→3] | ✓ Reachable |
|
|
73
|
+
| [Given X When Error Then W] | [State A →(error)→ State D; Failure Mode #2 → fallback] | ✓ Reachable |
|
|
74
|
+
|
|
75
|
+
**Gap Check**: If an AC cannot be traced → design has a gap; return to § 2 to add mechanism or § 5 to add failure handling.
|
|
76
|
+
Design is deliverable only when all ACs are ✓.
|
|
77
|
+
-->
|
|
@@ -1,51 +1,86 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Task Specification for {FEATURE_NAME}.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# Task Spec: {FEATURE_NAME}
|
|
6
6
|
|
|
7
7
|
> **Status:** [Draft]
|
|
8
|
-
> **
|
|
8
|
+
> **Task Type:** [Feature / Infra / Polish]
|
|
9
|
+
> **Context:** [AI: One-sentence summary of this task's goal and value]
|
|
9
10
|
|
|
10
|
-
## 1.
|
|
11
|
+
## 1. Overview
|
|
11
12
|
|
|
12
|
-
<!-- [AI
|
|
13
|
+
<!-- [AI]: Brief task background, goal, and user value (2-3 sentences).
|
|
14
|
+
- FEAT task: From user perspective describe "As a [Role], I want to [Action], So that [Benefit]"
|
|
15
|
+
- INF task: Describe the downstream scope this infrastructure supports
|
|
16
|
+
- POLISH task: Describe current state and optimization target
|
|
17
|
+
-->
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
## 2. Acceptance Criteria
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
<!-- [AI]: Core acceptance contract — sole basis for development and testing.
|
|
22
|
+
Select applicable dimension format by Task Type (inferred from ID prefix); may combine multiple dimensions.
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
=== Dimension Building Blocks (select at least one primary dimension) ===
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
▸ Behavioral [FEAT primary]
|
|
27
|
+
Use Gherkin Given/When/Then to define system behavior paths (happy + exception).
|
|
21
28
|
|
|
22
|
-
|
|
29
|
+
▸ Structural [INF primary]
|
|
30
|
+
Use Configuration Contract to define target state of files/config:
|
|
31
|
+
- Path: file path
|
|
32
|
+
- Key Settings: key config items and concrete values (no generic descriptions like "configure X")
|
|
33
|
+
- Constraints: technical red lines
|
|
34
|
+
- Verify: executable command + expected output
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
▸ Quantitative [POLISH primary]
|
|
37
|
+
Use Quality Target to define measurable goals:
|
|
38
|
+
- Metric: metric name
|
|
39
|
+
- Baseline: current value
|
|
40
|
+
- Target: target value
|
|
41
|
+
- Verify: measurement method
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
▸ Contractual [integration / shared engine]
|
|
44
|
+
Define interface contracts for external exposure or integration:
|
|
45
|
+
- External API Input/Output/Error mapping
|
|
46
|
+
- Shared module export type signatures
|
|
27
47
|
|
|
28
|
-
|
|
48
|
+
▸ Invariant [refactoring]
|
|
49
|
+
Declare behavior/interface that must remain unchanged:
|
|
50
|
+
- Preserve: [behavior or interface that must not change]
|
|
51
|
+
- Verify: [regression verification method]
|
|
29
52
|
|
|
30
|
-
|
|
53
|
+
=== Mixed task example ===
|
|
54
|
+
INF task may include Behavioral sub-dimension (e.g. hotkey registration has behavior path)
|
|
55
|
+
FEAT task may include Structural sub-dimension (e.g. config file creation)
|
|
56
|
+
Use sub-headings to distinguish dimensions.
|
|
57
|
+
-->
|
|
31
58
|
|
|
32
|
-
|
|
59
|
+
## 3. Data Requirements
|
|
33
60
|
|
|
34
|
-
|
|
61
|
+
<!-- [AI]: [?Data] Declare data changes, reference table structure in data_snapshot.json.
|
|
62
|
+
Write "N/A" when no data changes.
|
|
35
63
|
|
|
36
|
-
|
|
64
|
+
* Schema: [Table Name] -> [Field] (Add/Modify)
|
|
65
|
+
* API: [Method] [Path]
|
|
66
|
+
* Permissions: [Required Role]
|
|
67
|
+
-->
|
|
37
68
|
|
|
38
|
-
|
|
69
|
+
## 4. Interface Exports
|
|
39
70
|
|
|
40
|
-
|
|
71
|
+
<!-- [AI]: [?Upstream] Public interfaces, conventions, import paths this task exposes to downstream tasks.
|
|
72
|
+
Downstream tasks depend on this declaration rather than guessing. Omit when no downstream consumers.
|
|
41
73
|
|
|
42
|
-
|
|
74
|
+
Format:
|
|
75
|
+
| Export | Value | Consumer |
|
|
76
|
+
|:---|:---|:---|
|
|
77
|
+
| [convention/API/path alias/script] | [concrete value] | [downstream task ID] |
|
|
78
|
+
-->
|
|
43
79
|
|
|
44
|
-
|
|
45
|
-
- Example: `Comment` -> `content` (Add), `parent_id` (Add, nullable)
|
|
80
|
+
## 5. Constraints
|
|
46
81
|
|
|
47
|
-
|
|
48
|
-
- Example: `POST /api/comments`, `GET /api/comments/:id`
|
|
82
|
+
<!-- [AI]: Extract red-line constraints relevant to this task from vision.md + 02_tech_stack.md.
|
|
49
83
|
|
|
50
|
-
|
|
51
|
-
-
|
|
84
|
+
Format:
|
|
85
|
+
- [constraint content] (ref: [source])
|
|
86
|
+
-->
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: archi-data-sync
|
|
3
|
+
type: reviewer
|
|
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
|
+
---
|
|
6
|
+
|
|
7
|
+
# Data governance sync executor
|
|
8
|
+
|
|
9
|
+
## System flow position
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
/archi.* step_N → Verify phase
|
|
13
|
+
↓
|
|
14
|
+
[This Skill] scans output → compare global files → incremental sync → return Diff
|
|
15
|
+
↓
|
|
16
|
+
Main Agent Signoff (confirm Diff)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
> **Skill responsibility boundary**:
|
|
20
|
+
> - Responsible: Scan main Agent output for new business entities/error codes/Schema, compare with global data files, perform incremental sync
|
|
21
|
+
> - Not responsible: Modify `03_data_governance.md` itself (this Skill enforces rules, does not define them)
|
|
22
|
+
> - Not responsible: Register framework concepts (Architext framework concepts must not be registered to global data files)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Authoritative rule source
|
|
27
|
+
|
|
28
|
+
`03_data_governance.md` is the single authoritative source for data governance. All behavior of this Skill must align with that file.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Sync scope
|
|
33
|
+
|
|
34
|
+
| Global file | Sync content | Trigger |
|
|
35
|
+
|:---|:---|:---|
|
|
36
|
+
| `dictionary.json` | New business entities · actions · shared tools · public components | Output contains unregistered business terms or tools |
|
|
37
|
+
| `error_codes.json` | New business error codes | Output contains unregistered error scenarios |
|
|
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
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Execution protocol
|
|
47
|
+
|
|
48
|
+
1. **Read global data files**: Load global files matching project features from table above
|
|
49
|
+
2. **Scan main Agent output**: Identify new business entities, error codes, Schema, endpoints, etc.
|
|
50
|
+
3. **Boundary check**: Do not register framework concepts (scripts, scaffold, roadmap, plan, etc.); sync only project business domain content
|
|
51
|
+
4. **Deduplication**: Compare with existing entries, avoid duplicate registration
|
|
52
|
+
5. **Incremental sync**: Append/modify only, do not delete existing entries
|
|
53
|
+
6. **Output change Diff**
|
|
54
|
+
|
|
55
|
+
### Hard boundaries
|
|
56
|
+
|
|
57
|
+
- **No direct append** — Must check existing content boundary before write, avoid duplicates or conflicts
|
|
58
|
+
- **No framework concept registration** — Sync only project business domain content
|
|
59
|
+
- **No modify `03_data_governance.md`** — This Skill enforces rules, does not define them
|
|
60
|
+
|
|
61
|
+
### Output format
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
### Data Sync Results
|
|
65
|
+
|
|
66
|
+
ADDED:
|
|
67
|
+
- dictionary.json: entities += [new entity names]
|
|
68
|
+
- error_codes.json: businessErrors += [ERR_CODE]
|
|
69
|
+
|
|
70
|
+
MODIFIED:
|
|
71
|
+
- data_snapshot.json: models.User += [new fields]
|
|
72
|
+
|
|
73
|
+
NO CHANGE:
|
|
74
|
+
- [files with no sync needed]
|
|
75
|
+
|
|
76
|
+
**Summary**: X files changed / Y added / Z modified
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
When no sync needed: `### Data Sync Results — NO CHANGES`
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
> **Intermediate output**: This Skill is a review subprogram; after producing change Diff, control returns to caller.
|