@uoyo/mvtt 2.0.0 → 2.1.0
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/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +3 -2
- package/dist/fs/materialize.js.map +1 -1
- package/dist/scripts/epic-update.cjs +181 -206
- package/dist/scripts/epic-update.md +57 -0
- package/dist/scripts/plan-update.cjs +203 -215
- package/dist/scripts/plan-update.md +59 -0
- package/dist/scripts/session-update.cjs +185 -209
- package/install-manifest.yaml +4 -0
- package/package.json +1 -1
- package/sources/defaults/config.yaml +5 -0
- package/sources/scripts/epic-update.js +3 -21
- package/sources/scripts/epic-update.md +57 -0
- package/sources/scripts/plan-update.js +30 -20
- package/sources/scripts/plan-update.md +59 -0
- package/sources/scripts/session-update.js +7 -23
- package/sources/sections/activation-load-config.md +7 -10
- package/sources/sections/activation-load-context.md +15 -25
- package/sources/sections/activation-preflight.md +1 -1
- package/sources/sections/footer-next-steps.md +1 -1
- package/sources/sections/language-constraint.md +3 -18
- package/sources/sections/output-format-constraint.md +6 -9
- package/sources/sections/script-usage-rule.md +32 -0
- package/sources/sections/session-update.md +24 -110
- package/sources/skills/mvt-analyze/business.md +1 -1
- package/sources/skills/mvt-analyze/manifest.yaml +7 -7
- package/sources/skills/mvt-analyze-code/manifest.yaml +7 -7
- package/sources/skills/mvt-cleanup/business.md +9 -0
- package/sources/skills/mvt-cleanup/manifest.yaml +6 -6
- package/sources/skills/mvt-config/business.md +1 -0
- package/sources/skills/mvt-config/manifest.yaml +1 -0
- package/sources/skills/mvt-decompose/business.md +18 -9
- package/sources/skills/mvt-decompose/manifest.yaml +7 -7
- package/sources/skills/mvt-design/business.md +34 -43
- package/sources/skills/mvt-design/manifest.yaml +7 -7
- package/sources/skills/mvt-fix/manifest.yaml +6 -6
- package/sources/skills/mvt-help/business.md +19 -9
- package/sources/skills/mvt-help/manifest.yaml +3 -14
- package/sources/skills/mvt-implement/business.md +27 -34
- package/sources/skills/mvt-implement/manifest.yaml +8 -14
- package/sources/skills/mvt-init/manifest.yaml +6 -6
- package/sources/skills/mvt-plan-dev/business.md +12 -2
- package/sources/skills/mvt-plan-dev/manifest.yaml +7 -7
- package/sources/skills/mvt-resume/manifest.yaml +3 -3
- package/sources/skills/mvt-review/business.md +3 -9
- package/sources/skills/mvt-review/manifest.yaml +7 -7
- package/sources/skills/mvt-status/business.md +2 -12
- package/sources/skills/mvt-status/manifest.yaml +3 -3
- package/sources/skills/mvt-sync-context/business.md +1 -1
- package/sources/skills/mvt-sync-context/manifest.yaml +6 -6
- package/sources/skills/mvt-test/business.md +2 -10
- package/sources/skills/mvt-test/manifest.yaml +7 -7
- package/sources/skills/mvt-update-plan/business.md +12 -27
- package/sources/skills/mvt-update-plan/manifest.yaml +12 -6
- package/sources/templates/analyze-output/body.md +41 -0
- package/sources/templates/decompose-output/body.md +36 -0
- package/sources/templates/design-output/body.md +48 -0
- package/sources/templates/implement-output/body.md +48 -3
- package/sources/templates/project-context/body.md +45 -0
- package/sources/templates/review-output/body.md +59 -0
- package/sources/templates/test-output/body.md +72 -0
|
@@ -6,148 +6,62 @@ This skill is read-only and does NOT modify `.ai-agents/workspace/session.yaml`.
|
|
|
6
6
|
{{^read_only}}
|
|
7
7
|
## State Update
|
|
8
8
|
|
|
9
|
-
After
|
|
9
|
+
After the skill's main task, run the session update script **exactly once**:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
node .ai-agents/scripts/session-update.cjs --skill
|
|
12
|
+
node .ai-agents/scripts/session-update.cjs --skill {{current_skill}} --summary "<concise one-line summary>"{{#update_active_change}} --new-change "<active_change.title>" --change-id <active_change.id>{{#link_subchange_to_epic}} --epic-id <active_epic.id>{{/link_subchange_to_epic}}{{/update_active_change}}{{#set_plan_path}} --set-plan-path ".ai-agents/workspace/artifacts/{active_change.id}/plan.yaml"{{/set_plan_path}}{{#update_change}} --update-change{{/update_change}}{{#close_change}} --close-change{{/close_change}}{{#set_change_status}} --set-change-status <status>{{/set_change_status}}{{#new_epic}} --new-epic "<epic_title>" --epic-id <epic_id>{{/new_epic}}{{#set_epic_path}} --set-epic-path <epic_path>{{/set_epic_path}}{{#set_epic_status}} --set-epic-status <status>{{/set_epic_status}}{{#close_epic}} --close-epic{{/close_epic}}{{#no_change}} --no-change{{/no_change}}{{#set_synced}} --set-synced{{/set_synced}}{{#truncate_history}} --truncate-history <count>{{/truncate_history}}{{#update_initialized_at}} --set-initialized{{/update_initialized_at}}
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Write `--summary` as one concise line in the configured `interaction_language`.
|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### Critical flag semantics
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|----------|-------------|---------|
|
|
22
|
-
| `--skill` | The exact skill command name without the leading `/` | `{{current_skill}}` |
|
|
23
|
-
| `--summary` | A concise one-line description of what this invocation accomplished, in the configured `interaction_language` | `"Identified auth requirements and created change chg-001"` |
|
|
20
|
+
- Use only the flags rendered in the command above; do not invent extra session-update flags.
|
|
24
21
|
{{#update_active_change}}
|
|
25
|
-
|
|
26
|
-
| `--change-id` | The unique identifier of the new change (same value written to `active_change.id`) | `chg-001` |
|
|
22
|
+
- `--new-change` and `--change-id` are required together; they set `active_change.{id,title,created_at}` and snapshot any prior active change into `changes[]`.
|
|
27
23
|
{{/update_active_change}}
|
|
28
|
-
{{#set_plan_path}}
|
|
29
|
-
|
|
30
|
-
{{/set_plan_path}}
|
|
31
|
-
{{#update_change}}
|
|
32
|
-
|
|
33
|
-
{{/update_change}}
|
|
24
|
+
{{#set_plan_path}}{{#update_change}}
|
|
25
|
+
- `--set-plan-path` must be used with `--update-change`; together they persist the active change's `plan_path` into `changes[]`.
|
|
26
|
+
{{/update_change}}{{/set_plan_path}}
|
|
27
|
+
{{#update_change}}{{^set_plan_path}}
|
|
28
|
+
- `--update-change` upserts the current `active_change` into `changes[]`, refreshes `updated_at`, and preserves the configured change-history limit.
|
|
29
|
+
{{/set_plan_path}}{{/update_change}}
|
|
34
30
|
{{#close_change}}
|
|
35
|
-
|
|
31
|
+
- `--close-change` snapshots `active_change` into `changes[]` with `status: done`, then clears all active-change fields.
|
|
36
32
|
{{/close_change}}
|
|
37
33
|
{{#set_change_status}}
|
|
38
|
-
|
|
34
|
+
- `--set-change-status` sets the matching `changes[]` entry to `active`, `done`, or `abandoned`.
|
|
39
35
|
{{/set_change_status}}
|
|
40
36
|
{{#no_change}}
|
|
41
|
-
|
|
37
|
+
- `--no-change` forces `history[].change_id` to empty instead of falling back to `active_change.id`.
|
|
42
38
|
{{/no_change}}
|
|
43
39
|
{{#set_synced}}
|
|
44
|
-
|
|
40
|
+
- `--set-synced` refreshes `session.last_synced_at`.
|
|
45
41
|
{{/set_synced}}
|
|
46
42
|
{{#truncate_history}}
|
|
47
|
-
|
|
43
|
+
- `--truncate-history` keeps the most recent N `history[]` entries; use the configured history limit.
|
|
48
44
|
{{/truncate_history}}
|
|
49
45
|
{{#update_initialized_at}}
|
|
50
|
-
|
|
46
|
+
- `--set-initialized` sets `session.initialized_at` only when it is empty.
|
|
51
47
|
{{/update_initialized_at}}
|
|
52
48
|
{{#new_epic}}
|
|
53
|
-
|
|
54
|
-
| `--epic-id` | The unique identifier of the new epic. Required when using `--new-epic`. Format: `epic-{YYYYMMDD}-{slug}`. | `"epic-20260608-ecommerce-platform"` |
|
|
49
|
+
- `--new-epic` requires `--epic-id`; together they set `active_epic.{id,title,created_at}` and snapshot any prior active epic into `epics[]`.
|
|
55
50
|
{{/new_epic}}
|
|
56
51
|
{{#set_epic_path}}
|
|
57
|
-
|
|
52
|
+
- `--set-epic-path` records the written `epic.yaml` path on `active_epic.epic_path`.
|
|
58
53
|
{{/set_epic_path}}
|
|
59
54
|
{{#set_epic_status}}
|
|
60
|
-
|
|
55
|
+
- `--set-epic-status` sets the matching `epics[]` entry to `in_progress`, `done`, or `abandoned`.
|
|
61
56
|
{{/set_epic_status}}
|
|
62
57
|
{{#close_epic}}
|
|
63
|
-
|
|
58
|
+
- `--close-epic` snapshots `active_epic` into `epics[]` with `status: done`, then clears all active-epic fields.
|
|
64
59
|
{{/close_epic}}
|
|
65
60
|
{{#link_subchange_to_epic}}
|
|
66
|
-
|
|
61
|
+
- `--epic-id` with `--new-change` links the new active change to its parent epic; do not use it outside `--new-epic` or `--new-change`.
|
|
67
62
|
{{/link_subchange_to_epic}}
|
|
68
63
|
|
|
69
|
-
|
|
70
|
-
### Parameter semantics
|
|
71
|
-
|
|
72
|
-
| Argument | When to use | Effect on `session.yaml` |
|
|
73
|
-
|----------|-------------|--------------------------|
|
|
74
|
-
| `--new-change` + `--change-id` | Skill creates or identifies a new change | Sets `active_change.id`, `.title`, `.created_at`. Auto-snapshots old `active_change` into `changes[]` if non-empty. Requires both arguments together. |
|
|
75
|
-
{{#link_subchange_to_epic}}
|
|
76
|
-
| `--epic-id` (with `--new-change`) | Skill creates a new sub-change inside an existing epic (epic-child mode) | Writes `active_change.epic_id` so the new sub-change is linked to the parent epic. Only valid when used together with `--new-change`. |
|
|
77
|
-
{{/link_subchange_to_epic}}
|
|
78
|
-
{{#set_plan_path}}
|
|
79
|
-
| `--set-plan-path` | Skill creates a new `plan.yaml` for the active change | Sets `active_change.plan_path`. Must be used together with `--update-change`. |
|
|
80
|
-
{{/set_plan_path}}
|
|
81
|
-
{{#update_change}}
|
|
82
|
-
| `--update-change` | Skill creates or modifies a plan (i.e., after `plan.yaml` is written/updated) | Upserts current `active_change` into `changes[]` (with `status: active`), sets `updated_at`, sorts ascending, truncates to configured limit. |
|
|
83
|
-
{{/update_change}}
|
|
84
|
-
{{#close_change}}
|
|
85
|
-
| `--close-change` | All plan tasks are completed | Snapshots `active_change` into `changes[]` with `status: done`, then clears all `active_change` fields. |
|
|
86
|
-
{{/close_change}}
|
|
87
|
-
{{#set_change_status}}
|
|
88
|
-
| `--set-change-status` | Explicitly mark a change as `done` or `abandoned` | Sets `status` on the `changes[]` entry whose `id` matches `active_change.id`. |
|
|
89
|
-
{{/set_change_status}}
|
|
90
|
-
{{#set_epic_path}}
|
|
91
|
-
| `--set-epic-path` | Skill writes or moves the `epic.yaml` file (e.g., after `/mvt-decompose` writes the artifacts) | Sets `active_epic.epic_path`. |
|
|
92
|
-
{{/set_epic_path}}
|
|
93
|
-
{{#set_epic_status}}
|
|
94
|
-
| `--set-epic-status` | Skill marks the active epic as `done` or `abandoned` (rarely used directly — `epic-update.cjs` usually drives this) | Sets `status` on the `epics[]` entry whose `id` matches `active_epic.id`. |
|
|
95
|
-
{{/set_epic_status}}
|
|
96
|
-
{{#close_epic}}
|
|
97
|
-
| `--close-epic` | Skill closes the active epic (e.g., after archiving a completed epic) | Snapshots `active_epic` into `epics[]` with `status: done`, then clears all `active_epic` fields. |
|
|
98
|
-
{{/close_epic}}
|
|
99
|
-
{{#no_change}}
|
|
100
|
-
| `--no-change` | Skill should not be associated with any change | Forces `history[].change_id` to empty string, skipping the `active_change.id` fallback. |
|
|
101
|
-
{{/no_change}}
|
|
102
|
-
{{#set_synced}}
|
|
103
|
-
| `--set-synced` | Skill synchronizes context files | Sets `session.last_synced_at` to the current time. |
|
|
104
|
-
{{/set_synced}}
|
|
105
|
-
{{#truncate_history}}
|
|
106
|
-
| `--truncate-history` | Maintenance: trim old history entries | Keeps the most recent N entries in `history[]`, discards older ones. |
|
|
107
|
-
{{/truncate_history}}
|
|
108
|
-
{{#update_initialized_at}}
|
|
109
|
-
| `--set-initialized` | Skill initializes the project for the first time | Sets `session.initialized_at` (idempotent — only writes if empty). |
|
|
110
|
-
{{/update_initialized_at}}
|
|
111
|
-
{{/update_active_change}}
|
|
112
|
-
{{^update_active_change}}
|
|
113
|
-
### Parameter semantics
|
|
114
|
-
|
|
115
|
-
| Argument | When to use | Effect on `session.yaml` |
|
|
116
|
-
|----------|-------------|--------------------------|
|
|
117
|
-
{{#new_epic}}
|
|
118
|
-
| `--new-epic` + `--epic-id` | Skill creates a new epic (e.g., `/mvt-decompose`) | Sets `active_epic.{id,title,created_at}`. Auto-snapshots old `active_epic` into `epics[]` if non-empty. Requires both arguments together. |
|
|
119
|
-
{{/new_epic}}
|
|
120
|
-
{{#update_change}}
|
|
121
|
-
| `--update-change` | Skill modifies a plan (i.e., after `plan.yaml` is updated) | Upserts current `active_change` into `changes[]` (with `status: active`), sets `updated_at`, sorts ascending, truncates to configured limit. |
|
|
122
|
-
{{/update_change}}
|
|
123
|
-
{{#close_change}}
|
|
124
|
-
| `--close-change` | All plan tasks are completed | Snapshots `active_change` into `changes[]` with `status: done`, then clears all `active_change` fields. |
|
|
125
|
-
{{/close_change}}
|
|
126
|
-
{{#set_change_status}}
|
|
127
|
-
| `--set-change-status` | Explicitly mark a change as `done` or `abandoned` | Sets `status` on the `changes[]` entry whose `id` matches `active_change.id`. |
|
|
128
|
-
{{/set_change_status}}
|
|
129
|
-
{{#set_epic_path}}
|
|
130
|
-
| `--set-epic-path` | Skill writes or moves the `epic.yaml` file (e.g., after `/mvt-decompose` writes the artifacts) | Sets `active_epic.epic_path`. |
|
|
131
|
-
{{/set_epic_path}}
|
|
132
|
-
{{#set_epic_status}}
|
|
133
|
-
| `--set-epic-status` | Skill marks the active epic as `done` or `abandoned` (rarely used directly — `epic-update.cjs` usually drives this) | Sets `status` on the `epics[]` entry whose `id` matches `active_epic.id`. |
|
|
134
|
-
{{/set_epic_status}}
|
|
135
|
-
{{#close_epic}}
|
|
136
|
-
| `--close-epic` | Skill closes the active epic (e.g., after archiving a completed epic) | Snapshots `active_epic` into `epics[]` with `status: done`, then clears all `active_epic` fields. |
|
|
137
|
-
{{/close_epic}}
|
|
138
|
-
{{#no_change}}
|
|
139
|
-
| `--no-change` | Skill should not be associated with any change | Forces `history[].change_id` to empty string, skipping the `active_change.id` fallback. |
|
|
140
|
-
{{/no_change}}
|
|
141
|
-
{{#set_synced}}
|
|
142
|
-
| `--set-synced` | Skill synchronizes context files | Sets `session.last_synced_at` to the current time. |
|
|
143
|
-
{{/set_synced}}
|
|
144
|
-
{{#truncate_history}}
|
|
145
|
-
| `--truncate-history` | Maintenance: trim old history entries | Keeps the most recent N entries in `history[]`, discards older ones. |
|
|
146
|
-
{{/truncate_history}}
|
|
147
|
-
{{#update_initialized_at}}
|
|
148
|
-
| `--set-initialized` | Skill initializes the project for the first time | Sets `session.initialized_at` (idempotent — only writes if empty). |
|
|
149
|
-
{{/update_initialized_at}}
|
|
150
|
-
{{/update_active_change}}
|
|
64
|
+
If the script exits with code 0, the state update was applied successfully; do not read or verify the session file.
|
|
151
65
|
|
|
152
66
|
### Failure handling
|
|
153
67
|
|
|
@@ -8,7 +8,7 @@ In this state the user is starting a new sub-change within an existing epic. Rea
|
|
|
8
8
|
|----------|-------------|----------|
|
|
9
9
|
| A | Empty | Auto-use `current_change` child's scope from `epic.yaml` as the requirement input. Proceed to Step 3. |
|
|
10
10
|
| B | Supplements current child | Merge user message with `current_change` child's scope. Proceed to Step 3. |
|
|
11
|
-
| C | Points to different child | Locate target in `children[]`. If `depends_on` has unfinished prerequisites → warn and ask to confirm forced reorder (y/n). If deps satisfied → confirm switch (y/n). On confirmed reorder: call `epic-update.cjs --epic <epic_path> --switch-active <target_id>`. If target not in `children[]` → offer to treat as independent change (exit epic-child mode) or `--add-child`. |
|
|
11
|
+
| C | Points to different child | Locate target in `children[]`. If `depends_on` has unfinished prerequisites → warn and ask to confirm forced reorder (y/n). If deps satisfied → confirm switch (y/n). On confirmed reorder: call the Epic Update Script in `--switch-active` mode with `node .ai-agents/scripts/epic-update.cjs --epic <epic_path> --switch-active <target_id>`. If target not in `children[]` → offer to treat as independent change (exit epic-child mode) or use `--add-child` mode to append it as a new child. Read `.ai-agents/scripts/epic-update.md` only if a required mode or flag is not rendered here. Do NOT hand-edit `epic.yaml`, advance `current_change`, or read `.cjs`/`.js` source. |
|
|
12
12
|
|
|
13
13
|
## Execution Flow
|
|
14
14
|
|
|
@@ -41,12 +41,6 @@ sections:
|
|
|
41
41
|
- type: shared
|
|
42
42
|
source: sections/activation-load-config.md
|
|
43
43
|
|
|
44
|
-
- type: shared
|
|
45
|
-
source: sections/language-constraint.md
|
|
46
|
-
|
|
47
|
-
- type: shared
|
|
48
|
-
source: sections/output-format-constraint.md
|
|
49
|
-
|
|
50
44
|
- type: shared
|
|
51
45
|
source: sections/activation-preflight.md
|
|
52
46
|
params:
|
|
@@ -60,6 +54,12 @@ sections:
|
|
|
60
54
|
level: "WARN"
|
|
61
55
|
message: 'Project not initialized. Run `/mvt-init` first.'
|
|
62
56
|
|
|
57
|
+
- type: shared
|
|
58
|
+
source: sections/language-constraint.md
|
|
59
|
+
|
|
60
|
+
- type: shared
|
|
61
|
+
source: sections/output-format-constraint.md
|
|
62
|
+
|
|
63
63
|
- type: file
|
|
64
64
|
source: ./business.md
|
|
65
65
|
|
|
@@ -68,7 +68,7 @@ sections:
|
|
|
68
68
|
## Artifact Structure
|
|
69
69
|
Read the document structure template from: `.ai-agents/skills/_templates/analyze-output.md`
|
|
70
70
|
If a custom version exists at `.ai-agents/skills/_templates/custom/analyze-output.md`, use the custom version instead.
|
|
71
|
-
The template defines section
|
|
71
|
+
The template defines section structure and guidance comments. Generate applicable content based on analysis results.
|
|
72
72
|
Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/analysis.md`
|
|
73
73
|
|
|
74
74
|
- type: shared
|
|
@@ -53,12 +53,6 @@ sections:
|
|
|
53
53
|
- type: shared
|
|
54
54
|
source: sections/activation-load-config.md
|
|
55
55
|
|
|
56
|
-
- type: shared
|
|
57
|
-
source: sections/language-constraint.md
|
|
58
|
-
|
|
59
|
-
- type: shared
|
|
60
|
-
source: sections/output-format-constraint.md
|
|
61
|
-
|
|
62
56
|
- type: shared
|
|
63
57
|
source: sections/activation-preflight.md
|
|
64
58
|
params:
|
|
@@ -72,6 +66,12 @@ sections:
|
|
|
72
66
|
level: "WARN"
|
|
73
67
|
message: "No projects registered. Run `/mvt-init` first."
|
|
74
68
|
|
|
69
|
+
- type: shared
|
|
70
|
+
source: sections/language-constraint.md
|
|
71
|
+
|
|
72
|
+
- type: shared
|
|
73
|
+
source: sections/output-format-constraint.md
|
|
74
|
+
|
|
75
75
|
- type: inline
|
|
76
76
|
content: |
|
|
77
77
|
## Operation Mode: Independent
|
|
@@ -88,7 +88,7 @@ sections:
|
|
|
88
88
|
## Artifact Structure
|
|
89
89
|
Read the document structure template from: `.ai-agents/skills/_templates/project-context.md`
|
|
90
90
|
If a custom version exists at `.ai-agents/skills/_templates/custom/project-context.md`, use the custom version instead.
|
|
91
|
-
The template defines section
|
|
91
|
+
The template defines section structure and guidance comments. Generate applicable content based on code analysis results.
|
|
92
92
|
Write the artifact to: `.ai-agents/knowledge/project/_generated/project-context.md`
|
|
93
93
|
|
|
94
94
|
- type: shared
|
|
@@ -104,6 +104,15 @@ N is read from `config.yaml > preferences.history_limits.history` (default 20).
|
|
|
104
104
|
### Step 10: State Update
|
|
105
105
|
Apply the State Update rules defined in the **State Update** section below.
|
|
106
106
|
|
|
107
|
+
**Pre-filled example** (closed active_change + history truncation):
|
|
108
|
+
```bash
|
|
109
|
+
node .ai-agents/scripts/session-update.cjs \
|
|
110
|
+
--skill mvt-cleanup \
|
|
111
|
+
--close-change \
|
|
112
|
+
--truncate-history 10
|
|
113
|
+
```
|
|
114
|
+
Replace `10` with the actual `config.yaml > preferences.history_limits.history` value. If only truncating history (active_change still in progress), omit `--close-change`.
|
|
115
|
+
|
|
107
116
|
## Edge Cases & Errors
|
|
108
117
|
|
|
109
118
|
| Case | Handling |
|
|
@@ -51,12 +51,6 @@ sections:
|
|
|
51
51
|
- type: shared
|
|
52
52
|
source: sections/activation-load-config.md
|
|
53
53
|
|
|
54
|
-
- type: shared
|
|
55
|
-
source: sections/language-constraint.md
|
|
56
|
-
|
|
57
|
-
- type: shared
|
|
58
|
-
source: sections/output-format-constraint.md
|
|
59
|
-
|
|
60
54
|
- type: shared
|
|
61
55
|
source: sections/activation-preflight.md
|
|
62
56
|
params:
|
|
@@ -66,6 +60,12 @@ sections:
|
|
|
66
60
|
level: "REQUIRED"
|
|
67
61
|
message: "Project must be initialized (session.yaml exists)"
|
|
68
62
|
|
|
63
|
+
- type: shared
|
|
64
|
+
source: sections/language-constraint.md
|
|
65
|
+
|
|
66
|
+
- type: shared
|
|
67
|
+
source: sections/output-format-constraint.md
|
|
68
|
+
|
|
69
69
|
- type: file
|
|
70
70
|
source: ./business.md
|
|
71
71
|
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
| 4 | `preferences.output.data_format` | Default `yaml`; allowed: `yaml`, `json` |
|
|
62
62
|
| 5 | `preferences.context_routing.relevance_threshold` | Default `70`; allowed: 0-100 |
|
|
63
63
|
| 6 | `preferences.history_limits.*` | Show each limit with current value; accept new int or Enter to keep |
|
|
64
|
+
| 7 | `preferences.planning.granularity` | Default `medium`; allowed: `coarse`, `medium`, `fine` |
|
|
64
65
|
|
|
65
66
|
- After all stages, render a Summary Preview table: `key | from | to`, then a single confirmation prompt to apply ALL changes atomically.
|
|
66
67
|
- If the user aborts at the summary, discard all in-progress values; do not write anything.
|
|
@@ -74,6 +74,7 @@ sections:
|
|
|
74
74
|
| `preferences.context_routing.relevance_threshold` | int | `70` | AI routing threshold for `/mvt-manage-context add` (0-100) |
|
|
75
75
|
| `preferences.history_limits.history` | int | `20` | Max history entries (1-100) |
|
|
76
76
|
| `preferences.history_limits.changes` | int | `20` | Max changes entries (1-100) |
|
|
77
|
+
| `preferences.planning.granularity` | enum | `medium` | Task decomposition granularity for `/mvt-plan-dev`. Qualitative AI guidance, not hard limits. Values: `coarse` (fewer, larger tasks), `medium` (balanced), `fine` (more, smaller tasks) |
|
|
77
78
|
|
|
78
79
|
### Knowledge Settings
|
|
79
80
|
|
|
@@ -54,16 +54,11 @@
|
|
|
54
54
|
- **On confirmation**: proceed to Step 6.
|
|
55
55
|
|
|
56
56
|
### Step 6: Write Artifacts
|
|
57
|
-
Write two artifacts
|
|
57
|
+
Write two artifacts:
|
|
58
58
|
|
|
59
59
|
1. **epic.md** (narrative) -- `.ai-agents/workspace/artifacts/{epic_id}/epic.md`
|
|
60
|
-
- Uses the `decompose-output` template.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| # | Child | Scope | Status | Depends On |
|
|
64
|
-
|---|-------|-------|--------|------------|
|
|
65
|
-
|
|
66
|
-
- **Dependency Map**: Mermaid flowchart showing child dependencies
|
|
60
|
+
- Uses the `decompose-output` template. Follow the HTML comments in the template for what each section should contain (including the Child Stories table format and the Dependency Map mermaid flowchart); strip comments from the final artifact.
|
|
61
|
+
- **Required coverage**: cover only content that is applicable to this decomposition. Preserve enough information for the user to understand the epic vision, boundaries, cross-cutting concerns, child stories, dependencies, and unresolved questions. Do not create empty or artificial sections just because an item is named here; if the template omits or renames a section, place applicable content in the closest relevant section.
|
|
67
62
|
|
|
68
63
|
2. **epic.yaml** (structured) -- `.ai-agents/workspace/artifacts/{epic_id}/epic.yaml`
|
|
69
64
|
- Follows the schema defined in Artifact Structure
|
|
@@ -78,11 +73,25 @@ Write two artifacts using the `decompose-output` template for `epic.md`:
|
|
|
78
73
|
- [ ] `current_change` matches the active child's `change_id`
|
|
79
74
|
- [ ] Each child has non-empty `title` and `scope`
|
|
80
75
|
|
|
81
|
-
**Optional safety net**: after writing,
|
|
76
|
+
**Optional safety net**: after writing, validate the epic using the Epic Update Script command below:
|
|
82
77
|
```bash
|
|
83
78
|
node .ai-agents/scripts/epic-update.cjs --validate .ai-agents/workspace/artifacts/{epic_id}/epic.yaml
|
|
84
79
|
```
|
|
85
80
|
|
|
81
|
+
If the epic needs children added later (e.g. a missed sub-change discovered during analysis), use `--add-child`:
|
|
82
|
+
```bash
|
|
83
|
+
node .ai-agents/scripts/epic-update.cjs --epic .ai-agents/workspace/artifacts/{epic_id}/epic.yaml \
|
|
84
|
+
--add-child <new_child_id> --child-title "<title>" --child-scope "<scope>"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
To advance the epic after a child change completes, use `--complete-child`:
|
|
88
|
+
```bash
|
|
89
|
+
node .ai-agents/scripts/epic-update.cjs --epic .ai-agents/workspace/artifacts/{epic_id}/epic.yaml \
|
|
90
|
+
--complete-child <completed_child_id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For post-write epic mutations, use the rendered `epic-update.cjs` commands. Do NOT hand-edit `epic.yaml`, advance `current_change`, or read `.cjs`/`.js` source.
|
|
94
|
+
|
|
86
95
|
### Step 7: Update Session
|
|
87
96
|
Run the session update command (see State Update section) to:
|
|
88
97
|
1. Create a new `active_epic` in session.yaml
|
|
@@ -38,12 +38,6 @@ sections:
|
|
|
38
38
|
- type: shared
|
|
39
39
|
source: sections/activation-load-config.md
|
|
40
40
|
|
|
41
|
-
- type: shared
|
|
42
|
-
source: sections/language-constraint.md
|
|
43
|
-
|
|
44
|
-
- type: shared
|
|
45
|
-
source: sections/output-format-constraint.md
|
|
46
|
-
|
|
47
41
|
- type: shared
|
|
48
42
|
source: sections/activation-preflight.md
|
|
49
43
|
params:
|
|
@@ -61,6 +55,12 @@ sections:
|
|
|
61
55
|
level: "WARN"
|
|
62
56
|
message: 'An active change already exists. Decomposing will create a new epic alongside it. Continue? (y/n)'
|
|
63
57
|
|
|
58
|
+
- type: shared
|
|
59
|
+
source: sections/language-constraint.md
|
|
60
|
+
|
|
61
|
+
- type: shared
|
|
62
|
+
source: sections/output-format-constraint.md
|
|
63
|
+
|
|
64
64
|
- type: file
|
|
65
65
|
source: ./business.md
|
|
66
66
|
|
|
@@ -71,7 +71,7 @@ sections:
|
|
|
71
71
|
**epic.md** (narrative):
|
|
72
72
|
Read the document structure template from: `.ai-agents/skills/_templates/decompose-output.md`
|
|
73
73
|
If a custom version exists at `.ai-agents/skills/_templates/custom/decompose-output.md`, use the custom version instead.
|
|
74
|
-
The template defines section
|
|
74
|
+
The template defines section structure and guidance comments. Generate applicable content based on decomposition results.
|
|
75
75
|
Write to: `.ai-agents/workspace/artifacts/{epic_id}/epic.md`
|
|
76
76
|
|
|
77
77
|
**epic.yaml** (structured):
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
- Existing design artifacts of related prior changes (`artifacts/*/design.md`) -- to stay consistent.
|
|
6
6
|
- **Fallback**:
|
|
7
7
|
- If `analysis.md` is missing, surface a WARN and accept the user's free-text intent as the requirement input.
|
|
8
|
-
- If `project-context.md` is missing, proceed but mark the design as "context-light" and skip the layer-compliance check in Step
|
|
8
|
+
- If `project-context.md` is missing, proceed but mark the design as "context-light" and skip the layer-compliance check in Step 3.
|
|
9
9
|
|
|
10
10
|
### Step 2: Frame the Problem
|
|
11
11
|
- **What**: produce a one-paragraph problem statement plus a list of explicit architectural concerns (3-7 items).
|
|
@@ -15,36 +15,35 @@
|
|
|
15
15
|
3. Drop any concern that is not actually exercised by the requirements -- do not invent NFRs.
|
|
16
16
|
- **Output of this step**: a Concerns Table with columns `concern | source-of-evidence | priority(must/should/nice)`.
|
|
17
17
|
|
|
18
|
-
### Step 3:
|
|
19
|
-
- **What**: select the smallest viable architecture style for this change. Escalate only when concerns force it.
|
|
20
|
-
- **How**: pick the row that matches the dominant concerns; multiple changes within the same project should normally pick the same style unless requirements force otherwise.
|
|
21
|
-
|
|
22
|
-
| Style | Use when | Avoid when |
|
|
23
|
-
|-------|----------|------------|
|
|
24
|
-
| Plain CRUD / 3-layer | Single resource flow, no domain rules beyond validation | Complex business invariants, multi-step workflows |
|
|
25
|
-
| Service-oriented within a module | Multiple use cases sharing entities, transactions across them | Cross-team boundaries, independent deployment needs |
|
|
26
|
-
| Domain-driven (aggregates, domain services) | Rich business rules, invariants, multiple actors per workflow | Simple read-mostly resources |
|
|
27
|
-
| Event-driven / async | Long-running flows, decoupled side-effects, retry/back-pressure | Strong synchronous contracts, immediate-consistency reads |
|
|
28
|
-
| Multi-service / boundary split | Independent scaling or deployment, separate teams | Single team, single deployment pipeline -- DEFER |
|
|
29
|
-
|
|
30
|
-
- If the requirements suggest "multi-service" but project is currently single-service: STOP and ask user to confirm scope expansion before designing across services.
|
|
31
|
-
|
|
32
|
-
### Step 4: Design Module Structure
|
|
18
|
+
### Step 3: Design Module Structure
|
|
33
19
|
- **What**: list modules (new and modified), their responsibilities, owned entities, and interfaces.
|
|
34
20
|
- **How**:
|
|
35
|
-
1.
|
|
36
|
-
2.
|
|
37
|
-
3.
|
|
38
|
-
|
|
21
|
+
1. Follow existing project architecture first: `project-context.md`, accepted ADRs, framework constraints, and domain rules override the examples below.
|
|
22
|
+
2. Start simple. Add a boundary, abstraction, async flow, dependency, or new module only when a must/should concern requires it.
|
|
23
|
+
3. For each must/should Concern (Step 2), choose the smallest response that satisfies it. Use the table as examples, not a closed list; if no row fits, derive a response from the concern itself.
|
|
24
|
+
|
|
25
|
+
| Concern signal (example) | Smallest architectural response | Module consequence |
|
|
26
|
+
|---------------------------|----------------------------------|--------------------|
|
|
27
|
+
| Simple data lifecycle | CRUD-oriented service/repository shape | Resource module with validation and persistence boundary |
|
|
28
|
+
| Rich business invariant | Domain model or aggregate boundary | Entity or aggregate module owns invariant enforcement |
|
|
29
|
+
| Shared multi-step workflow | Application service or use-case coordinator | Workflow module coordinates existing modules |
|
|
30
|
+
| Async side effect or retry need | Event handler or queue boundary | Producer/consumer or handler module; mark event boundary |
|
|
31
|
+
| Independent deployment, scaling, or team ownership | Service boundary candidate | STOP if it implies a new deployable service, runtime, or cross-service contract |
|
|
32
|
+
|
|
33
|
+
4. Output the concern mapping as `concern | response | owning module | boundary impact`.
|
|
34
|
+
5. For every module, write: name, responsibility (one sentence), owned entities, public interface (function/class signatures or HTTP endpoints), dependencies on other modules.
|
|
35
|
+
6. Reuse existing module names from `project-context.md` whenever possible. Add a new module only when no existing module fits.
|
|
36
|
+
7. Validate dependency direction against `project-context.md` layer rules (e.g., domain -> infra forbidden). If violation found, redesign or flag it as an explicit ADR (Step 5).
|
|
39
37
|
- **Branches**:
|
|
40
38
|
|
|
41
39
|
| Condition | Action |
|
|
42
40
|
|-----------|--------|
|
|
43
41
|
| Layer-compliance check passes | Proceed |
|
|
44
42
|
| Single layer violation, fix is local | Adjust module placement, document in change tracking |
|
|
45
|
-
|
|
|
43
|
+
| Architectural response implies a new deployable service, runtime, or cross-service contract | STOP, ask user to confirm scope expansion before designing across boundaries |
|
|
44
|
+
| Systemic violation (mismatch with existing project architecture) | STOP, raise ADR (Step 5) and ask user to confirm direction before continuing |
|
|
46
45
|
|
|
47
|
-
### Step
|
|
46
|
+
### Step 4: Define Data Flow
|
|
48
47
|
- **What**: for each primary use case, produce a sequence of module interactions.
|
|
49
48
|
- **How**:
|
|
50
49
|
1. For each use case (from Step 2 / analysis.md), list the trigger, the modules involved, the call order, and the persistence/event boundaries.
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
3. Mark transactional boundaries explicitly (`-- transaction begin/end`).
|
|
53
52
|
4. Identify error paths for each flow: what happens if step N fails? Document fallback behavior (retry, compensating action, user-visible error).
|
|
54
53
|
|
|
55
|
-
### Step
|
|
54
|
+
### Step 5: Document Decisions (ADRs)
|
|
56
55
|
- **What**: capture every non-obvious choice as an Architecture Decision Record.
|
|
57
56
|
- **How**: write one ADR per decision with these fields:
|
|
58
57
|
|
|
@@ -66,39 +65,31 @@
|
|
|
66
65
|
| Consequences | Positive and negative impacts; which downstream skills/modules pay the cost |
|
|
67
66
|
|
|
68
67
|
- Decisions that MUST be ADRs (do not skip):
|
|
69
|
-
-
|
|
68
|
+
- Any architectural response that changes module boundaries, deployment/runtime boundaries, persistence boundaries, async/event boundaries, or public contracts.
|
|
70
69
|
- Any layer-rule violation accepted as a deliberate exception.
|
|
71
70
|
- Introduction of a new external dependency (DB, queue, library category).
|
|
72
71
|
- Breaking change to an existing public interface.
|
|
73
72
|
|
|
74
|
-
### Step
|
|
73
|
+
### Step 6: User Confirmation Before Write
|
|
75
74
|
- **When to confirm before writing the artifact**:
|
|
76
|
-
- Step 3
|
|
77
|
-
- Step
|
|
78
|
-
- Step
|
|
75
|
+
- Step 3 identified a new deployable service, runtime, or cross-service contract.
|
|
76
|
+
- Step 3 raised a systemic layer violation.
|
|
77
|
+
- Step 5 contains any ADR with `status: proposed` for a breaking change.
|
|
79
78
|
- The design adds a new external dependency.
|
|
80
79
|
- **When to write silently**:
|
|
81
80
|
- Single-module addition that fits existing layers, no ADR escalations, no breaking change.
|
|
82
|
-
- **Confirmation format**: present a one-screen summary --
|
|
83
|
-
|
|
84
|
-
### Step
|
|
85
|
-
- **Path and template**: as defined in the **Artifact Structure** section below.
|
|
86
|
-
- **Required sections
|
|
87
|
-
- `Overview` -- the problem statement (Step 2).
|
|
88
|
-
- `Architecture Decision Records` -- every ADR from Step 6.
|
|
89
|
-
- `Module Design` -- table of modules from Step 4.
|
|
90
|
-
- `Key Interfaces` -- explicit signatures/endpoints.
|
|
91
|
-
- `Data Flow` -- sequences from Step 5, including error paths.
|
|
92
|
-
- `File Structure` -- mapping of modules to file/directory paths in this repo.
|
|
93
|
-
- `Implementation Guidelines` -- ordering hints for `/mvt-implement` and `/mvt-plan-dev`.
|
|
94
|
-
- `Change Tracking` -- list of files expected to be created/modified/deleted.
|
|
81
|
+
- **Confirmation format**: present a one-screen summary -- module boundary changes, deployment/runtime boundary changes, ADRs requiring review, external dependencies, and a single yes/no prompt. Do not dump the full artifact.
|
|
82
|
+
|
|
83
|
+
### Step 7: Write Artifact
|
|
84
|
+
- **Path and template**: as defined in the **Artifact Structure** section below. Follow the HTML comments in the template for what each section should contain; strip comments from the final artifact.
|
|
85
|
+
- **Required coverage**: cover only content that is applicable to this design. Preserve enough information for downstream skills to understand the problem, decisions made, module/interface/data-flow impacts, expected file changes, and implementation guidance. Do not create empty or artificial sections just because an item is named here; if the template omits or renames a section, place applicable content in the closest relevant section.
|
|
95
86
|
- Do NOT modify `project-context.yaml` or `project-context.md` here.
|
|
96
87
|
|
|
97
|
-
### Step
|
|
88
|
+
### Step 8: Suggest Plan Decomposition
|
|
98
89
|
- If `Change Tracking` lists more than ~5 files OR Module Design adds more than 1 new module OR ADRs include any breaking change, recommend `/mvt-plan-dev` as the next step.
|
|
99
90
|
- Otherwise recommend `/mvt-implement` directly.
|
|
100
91
|
|
|
101
|
-
### Step
|
|
92
|
+
### Step 9: State Update
|
|
102
93
|
Apply the State Update rules defined in the **State Update** section below.
|
|
103
94
|
|
|
104
95
|
## Edge Cases & Errors
|
|
@@ -52,12 +52,6 @@ sections:
|
|
|
52
52
|
- type: shared
|
|
53
53
|
source: sections/activation-load-config.md
|
|
54
54
|
|
|
55
|
-
- type: shared
|
|
56
|
-
source: sections/language-constraint.md
|
|
57
|
-
|
|
58
|
-
- type: shared
|
|
59
|
-
source: sections/output-format-constraint.md
|
|
60
|
-
|
|
61
55
|
- type: shared
|
|
62
56
|
source: sections/activation-preflight.md
|
|
63
57
|
params:
|
|
@@ -79,6 +73,12 @@ sections:
|
|
|
79
73
|
level: "WARN"
|
|
80
74
|
message: "No requirements found. Run `/mvt-analyze` first. (allow user to proceed)"
|
|
81
75
|
|
|
76
|
+
- type: shared
|
|
77
|
+
source: sections/language-constraint.md
|
|
78
|
+
|
|
79
|
+
- type: shared
|
|
80
|
+
source: sections/output-format-constraint.md
|
|
81
|
+
|
|
82
82
|
- type: file
|
|
83
83
|
source: ./business.md
|
|
84
84
|
|
|
@@ -87,7 +87,7 @@ sections:
|
|
|
87
87
|
## Artifact Structure
|
|
88
88
|
Read the document structure template from: `.ai-agents/skills/_templates/design-output.md`
|
|
89
89
|
If a custom version exists at `.ai-agents/skills/_templates/custom/design-output.md`, use the custom version instead.
|
|
90
|
-
The template defines section
|
|
90
|
+
The template defines section structure and guidance comments. Generate applicable content based on design results.
|
|
91
91
|
Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/design.md`
|
|
92
92
|
|
|
93
93
|
- type: shared
|
|
@@ -44,12 +44,6 @@ sections:
|
|
|
44
44
|
- type: shared
|
|
45
45
|
source: sections/activation-load-config.md
|
|
46
46
|
|
|
47
|
-
- type: shared
|
|
48
|
-
source: sections/language-constraint.md
|
|
49
|
-
|
|
50
|
-
- type: shared
|
|
51
|
-
source: sections/output-format-constraint.md
|
|
52
|
-
|
|
53
47
|
- type: shared
|
|
54
48
|
source: sections/activation-preflight.md
|
|
55
49
|
params:
|
|
@@ -59,6 +53,12 @@ sections:
|
|
|
59
53
|
level: "WARN"
|
|
60
54
|
message: 'Session not initialized. Run `/mvt-init` first.'
|
|
61
55
|
|
|
56
|
+
- type: shared
|
|
57
|
+
source: sections/language-constraint.md
|
|
58
|
+
|
|
59
|
+
- type: shared
|
|
60
|
+
source: sections/output-format-constraint.md
|
|
61
|
+
|
|
62
62
|
- type: inline
|
|
63
63
|
content: |
|
|
64
64
|
## Operation Mode: Shortcut
|