@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
|
@@ -2,12 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
### Step 1: Load Inputs
|
|
4
4
|
- **Recommended**:
|
|
5
|
-
- `.ai-agents/knowledge/project/_generated/project-context.md` -- existence check only, to detect whether semantic context has been generated.
|
|
5
|
+
- `.ai-agents/knowledge/project/_generated/project-context.md` -- existence check only, to detect whether semantic context has been generated. This generated semantic context (`.md`) is distinct from the structural project index (`.ai-agents/workspace/project-context.yaml`) loaded during activation.
|
|
6
6
|
- **Fallback**: any missing optional file is treated as "feature absent" for assessment purposes; do not abort. If `registry.yaml` itself is missing, surface the error and recommend `mvtt install`.
|
|
7
7
|
|
|
8
8
|
### Step 2: Assess User Position
|
|
9
9
|
- **What**: pick exactly one recommended next skill based on the current workspace state.
|
|
10
10
|
- **How**: walk the table top-to-bottom; the first row whose condition holds wins.
|
|
11
|
+
- **Evidence conventions**:
|
|
12
|
+
- Active change artifacts resolve under `.ai-agents/workspace/artifacts/{active_change.id}/`.
|
|
13
|
+
- `analysis.md`, `design.md`, `implementation.md`, `review.md`, and `test-design.md` refer to files in the active change artifact directory unless stated otherwise.
|
|
14
|
+
- Completed skill history matches `session.yaml > history[].skill` exactly, using the `/mvt-` prefix and case-sensitive skill name. When `active_change.id` is non-empty, prefer history rows whose `change_id` matches the active change; use unmatched history only as fallback context.
|
|
15
|
+
- `Change Tracking lists > 5 files` means `design.md > ## Change Tracking` names more than five affected files.
|
|
16
|
+
- A `review.md` has Critical findings when its severity summary or Critical Issues section reports one or more Critical findings.
|
|
17
|
+
- **Runtime recommendation**: store the winning row as the primary runtime recommendation. Use that same recommendation in Current Status, "What should I do next?" answers, and as the first Suggested Next Steps item.
|
|
11
18
|
|
|
12
19
|
| Condition | Recommendation |
|
|
13
20
|
|-----------|---------------|
|
|
@@ -20,13 +27,13 @@
|
|
|
20
27
|
| `design.md` exists, change is large (Change Tracking lists > 5 files OR ADR includes breaking change OR > 1 new module) | `/mvt-plan-dev` -- Decompose into tracked plan |
|
|
21
28
|
| `design.md` (or `plan.yaml`) ready, no `implementation.md` | `/mvt-implement` -- Implement the design |
|
|
22
29
|
| `implementation.md` exists, no `review.md` | `/mvt-review` -- Review the code |
|
|
30
|
+
| `review.md` has Critical findings | `/mvt-fix` -- Fix critical issues before continuing; surface prominently above the catalog |
|
|
23
31
|
| `review.md` exists with no Critical findings, no `test-design.md` | `/mvt-test` -- Write tests |
|
|
24
|
-
| `review.md` has Critical findings | `/mvt-fix` -- Fix critical issues before continuing |
|
|
25
32
|
| All of the above complete | `/mvt-cleanup` -- Tidy artifacts, OR start a new feature with `/mvt-analyze` |
|
|
26
33
|
|
|
27
34
|
### Step 3: Display Skills Catalog
|
|
28
35
|
Read `registry.yaml` > `skills` section.
|
|
29
|
-
Display all skills as a single flat table
|
|
36
|
+
Display all skills as a single flat table:
|
|
30
37
|
- Header row: `Skill | Description`
|
|
31
38
|
|
|
32
39
|
For each skill, show: `/{skill-name}` | `description` field from registry.
|
|
@@ -46,9 +53,13 @@ flowchart LR
|
|
|
46
53
|
C -.->|epic scale| DC[decompose]
|
|
47
54
|
DC --> C2[analyze<br/>epic-child]
|
|
48
55
|
C2 --> D
|
|
56
|
+
|
|
57
|
+
classDef done fill:#c6efce,stroke:#2e7d32,color:#2e7d32
|
|
58
|
+
classDef current fill:#ffeb9c,stroke:#f59e0b,color:#b45309
|
|
59
|
+
classDef pending fill:#f0f0f0,stroke:#9ca3af,color:#6b7280
|
|
49
60
|
```
|
|
50
61
|
|
|
51
|
-
|
|
62
|
+
Apply `:::done`, `:::current`, and `:::pending` to nodes based on current progress: green/done, yellow/current recommendation, gray/pending. The "current" node is whichever skill the Step 2 table recommended; "done" is determined by the same evidence the Step 2 table consumed.
|
|
52
63
|
|
|
53
64
|
### Step 5: Respond to User Questions
|
|
54
65
|
- **What**: handle the user's free-form question after the catalog is rendered.
|
|
@@ -56,10 +67,10 @@ Color-code based on current progress: green (done), yellow (current/recommended)
|
|
|
56
67
|
|
|
57
68
|
| Question pattern | Response |
|
|
58
69
|
|------------------|----------|
|
|
59
|
-
| "What should I do next?" / no specific question | Repeat the
|
|
60
|
-
| "What does `/mvt-X` do?" / asks about a specific skill | Read the skill's metadata from `registry.yaml
|
|
70
|
+
| "What should I do next?" / no specific question | Repeat the primary runtime recommendation in one line, followed by a reason explaining why the matched current state fact applies |
|
|
71
|
+
| "What does `/mvt-X` do?" / asks about a specific skill | Read the skill's metadata from `registry.yaml`; show name and description. If `template` exists, mention it. If `custom: true` is set, note it. If `knowledge` exists on that skill entry, show it; otherwise omit knowledge. Mention "see the skill's SKILL.md for the full procedure" -- do NOT inline the full SKILL.md content (too large) |
|
|
61
72
|
| "Compare `/mvt-X` and `/mvt-Y`" | Pull descriptions from registry; if both are workflow skills, mention their relative position in the diagram |
|
|
62
|
-
| Asks about something not in registry |
|
|
73
|
+
| Asks about something not in registry | Do not invent skills. Use simple keyword overlap against skill names and descriptions in `registry.yaml`; if there are close matches, show up to two "closest matches" with one-line reasons. If no close matches exist, say no skill matches and point to the catalog. |
|
|
63
74
|
|
|
64
75
|
## Edge Cases & Errors
|
|
65
76
|
|
|
@@ -68,7 +79,6 @@ Color-code based on current progress: green (done), yellow (current/recommended)
|
|
|
68
79
|
| `registry.yaml` missing | STOP at Step 1; recommend `mvtt install`; show no catalog |
|
|
69
80
|
| `session.yaml` missing | Render catalog (Step 3) and diagram (Step 4) without the "current position" highlight; Step 2 recommends `/mvt-init` |
|
|
70
81
|
| `changes[]` references a `plan_path` that no longer exists | Ignore for help purposes; do not warn -- `/mvt-status` is the right place for that |
|
|
71
|
-
| User invokes `/mvt-help` while inside an active change with Critical review findings | Step 2's recommendation is `/mvt-fix`; surface this prominently above the catalog |
|
|
72
82
|
| User asks about a custom skill (registry entry with `custom: true`) | Treat identically to built-ins; the only difference is showing `custom: true` in the metadata view |
|
|
73
|
-
| Workflow diagram cannot be rendered (mermaid unsupported in environment) | Fall back to a textual flow: `init -> analyze-code -> analyze -> [decompose (epic) -> analyze (epic-child)] -> design -> [plan-dev] -> implement -> review -> test` |
|
|
83
|
+
| Workflow diagram cannot be rendered (mermaid unsupported in environment) | Fall back to a textual flow: `init -> analyze-code -> analyze -> [decompose (epic) -> analyze (epic-child)] -> design -> [plan-dev] -> implement -> review -> test`; mark nodes with `[done]`, `[current]`, or `[pending]` using the same evidence rules |
|
|
74
84
|
| Epic-pending state (`active_epic` non-empty, `active_change` empty) | Step 2's recommendation is `/mvt-analyze` to start the next sub-change; the decompose path is shown in the workflow diagram |
|
|
@@ -40,15 +40,15 @@ sections:
|
|
|
40
40
|
## MVT Help
|
|
41
41
|
|
|
42
42
|
### Current Status
|
|
43
|
-
- **Project**: {
|
|
43
|
+
- **Project**: {project names from `project-context.yaml > projects[]`, comma-separated} ({initialized/not initialized from `session.yaml > session.initialized_at`})
|
|
44
44
|
- **Last Skill**: {last command from history}
|
|
45
|
-
- **Recommended Next**:
|
|
45
|
+
- **Recommended Next**: {primary runtime recommendation from Step 2}
|
|
46
46
|
|
|
47
47
|
### Workflow
|
|
48
48
|
{Mermaid flowchart with current position highlighted}
|
|
49
49
|
|
|
50
50
|
### Available Skills
|
|
51
|
-
{
|
|
51
|
+
{Single flat skills table, sorted by registry declaration order}
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
- type: shared
|
|
@@ -60,14 +60,3 @@ sections:
|
|
|
60
60
|
source: sections/footer-next-steps.md
|
|
61
61
|
params:
|
|
62
62
|
current_skill: mvt-help
|
|
63
|
-
conditional_suggestions:
|
|
64
|
-
conditions:
|
|
65
|
-
- condition: "project not initialized"
|
|
66
|
-
primary: mvt-init
|
|
67
|
-
primary_desc: "Initialize the project"
|
|
68
|
-
- condition: "project initialized, no active change"
|
|
69
|
-
primary: mvt-analyze
|
|
70
|
-
primary_desc: "Start analyzing requirements for a new feature"
|
|
71
|
-
- condition: "active change in progress"
|
|
72
|
-
primary: mvt-resume
|
|
73
|
-
primary_desc: "Resume work on the active change"
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
- **What**: produce an ordered file list with the smallest possible commit boundary per group.
|
|
12
12
|
- **How**:
|
|
13
13
|
1. Take `Change Tracking` from `design.md` as the source of truth for which files are in scope.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
16
|
-
4. For
|
|
17
|
-
|
|
14
|
+
2. Derive dependencies from `Module Design`, `Key Interfaces`, and `Data Flow`.
|
|
15
|
+
3. Order files dependency-first: shared types/contracts -> dependency-free internals -> dependents -> entry points/controllers/routes/UI shells.
|
|
16
|
+
4. For async/event flows: event schemas first; then producers and consumers after shared contracts. Put producers before consumers only when consumers import producer-side types.
|
|
17
|
+
5. Group consecutive files that share a single conceptual change into one commit boundary.
|
|
18
|
+
6. For each file, decide: `create | modify | delete`, and write a one-line intent.
|
|
19
|
+
- **Plan-aware behavior**: if `plan.yaml` exists, resolve one active task before planning. Candidate task ids come from deduplicated `current_tasks`; if one remains, use it. If several remain, prefer an explicit user task id, then match current paths against each candidate's `artifacts.files` and project paths; if still ambiguous, ask the user. Treat the resolved task's `artifacts.files` as a starting-scope hint only; `design.md` Change Tracking remains authoritative. Confirm Step 3 before touching files beyond the hint, and never absorb files that belong to another task.
|
|
18
20
|
- **Output of this step**: an in-conversation list shown to user as a preview, with no write yet.
|
|
19
21
|
|
|
20
22
|
### Step 3: Confirm Scope (when needed)
|
|
@@ -39,18 +41,19 @@
|
|
|
39
41
|
|
|
40
42
|
### Step 5: Verify Design Compliance
|
|
41
43
|
- **What**: confirm the implementation matches the design before writing the artifact.
|
|
42
|
-
- **How**: run the checks below
|
|
44
|
+
- **How**: run the checks below and record the result in `implementation.md > Design Compliance`. `mvt-review` will use this section as an input and independently verify claimed passes or undocumented deviations.
|
|
43
45
|
|
|
44
|
-
| Check | Mode | Action on failure |
|
|
45
|
-
|
|
46
|
-
| Files touched == Change Tracking ± deviation noted | Auto (compare
|
|
47
|
-
| Each file lives in the module/layer assigned by `Module Design` |
|
|
48
|
-
| Public interfaces match `Key Interfaces` (signatures, endpoints) |
|
|
49
|
-
| Forbidden cross-layer imports absent | Auto (grep
|
|
50
|
-
| Error handling lives only at boundaries listed in design | Manual (read code) | Refactor or document why an interior catch was needed |
|
|
51
|
-
| No new external deps not listed in `design.md` ADRs | Auto (diff
|
|
46
|
+
| Check | Mode | Failure level | Action on failure |
|
|
47
|
+
|-------|------|---------------|-------------------|
|
|
48
|
+
| Files touched == Change Tracking ± deviation noted | Auto (mechanical list compare) | WARN-and-document | Update `Deviations from Design` OR revert extras |
|
|
49
|
+
| Each file lives in the module/layer assigned by `Module Design` | Semi-auto (path heuristic; downgrade to Manual if design tables lack path/module mapping) | WARN-and-document | Move file or mark deliberate exception with rationale |
|
|
50
|
+
| Public interfaces match `Key Interfaces` (signatures, endpoints) | Semi-auto (grep can find declarations; signature compatibility is Manual) | BLOCK | Adjust to match OR stop and require `/mvt-design` re-run for a deliberate contract change |
|
|
51
|
+
| Forbidden cross-layer imports absent | Auto (mechanical grep against `project-context.md` rules) | BLOCK | Fix before artifact write |
|
|
52
|
+
| Error handling lives only at boundaries listed in design | Manual (read code) | FIX-in-place | Refactor or document why an interior catch was needed |
|
|
53
|
+
| No new external deps not listed in `design.md` ADRs | Auto (mechanical manifest diff; Manual if no manifest exists) | BLOCK | Remove the dependency OR stop and add an ADR via `/mvt-design` |
|
|
52
54
|
|
|
53
55
|
- **On any BLOCK failure**: stop, fix, re-run Step 5. Do not proceed to Step 6.
|
|
56
|
+
- **If `design.md` is missing**: skip only the checks that require design (`Change Tracking`, `Module Design`, `Key Interfaces`, boundary error-handling list, external-dependency ADRs). Still run forbidden import checks when `project-context.md` contains layer or import rules.
|
|
54
57
|
|
|
55
58
|
### Step 6: Run Quick Self-Check
|
|
56
59
|
- **What**: light-weight verification before handing off to `/mvt-review` or `/mvt-test`.
|
|
@@ -60,20 +63,11 @@
|
|
|
60
63
|
3. UI/frontend changes: per project rules, ask user to verify in browser; do NOT claim "tested" if you only ran type-check.
|
|
61
64
|
|
|
62
65
|
### Step 7: Write Artifact
|
|
63
|
-
- **Path
|
|
64
|
-
- **
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
4. For single-task or plan-less changes, write the content at the top level without a per-task wrapper (existing behavior).
|
|
69
|
-
- **Required content** (mapped to template headings):
|
|
70
|
-
- `Implementation Summary` -- one paragraph: what was built, scope.
|
|
71
|
-
- `Files Touched` -- table: path | create/modify/delete | one-line intent.
|
|
72
|
-
- `Design Compliance` -- summary of Step 5 checks (passed / deviated, with reasons).
|
|
73
|
-
- `Deviations from Design` -- empty list is acceptable; otherwise list each deviation with rationale.
|
|
74
|
-
- `Self-Check Results` -- type-check status, suggested test commands (Step 6).
|
|
75
|
-
- `Open TODOs` -- anything deferred for `/mvt-review`, `/mvt-test`, or follow-up changes.
|
|
76
|
-
- The actual source code goes to the project tree; the artifact is a record, not the code itself.
|
|
66
|
+
- **Path**: `.ai-agents/workspace/artifacts/{change-id}/implementation.md` — always this filename, one file per change. Never per-task suffixed names.
|
|
67
|
+
- **Template**: load from the **Artifact Structure** section below. Follow the HTML comments for what each section should contain; strip comments from the final artifact.
|
|
68
|
+
- **Multi-task accumulation**: if `plan.yaml` drives implementation across separate invocations, append a `## Task: {id} — {title}` section per task — never overwrite a *different* task's section. If `## Task: {id}` for the *same* task already exists (re-implementation after `blocked` or rescope), replace that section's content in place — preserve any `### Deliverables` subsection within it. Single-task or plan-less: write at top level without a task wrapper.
|
|
69
|
+
- **Required coverage**: cover only content that is applicable to this implementation. Preserve enough information for downstream skills to understand what changed, files touched, design compliance, deviations, validation results, and open TODOs. 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.
|
|
70
|
+
- The artifact is a record, not the code. Reference file paths and summarise intent — do NOT paste source listings.
|
|
77
71
|
|
|
78
72
|
### Step 8: Deliverables Handoff (if applicable)
|
|
79
73
|
|
|
@@ -101,18 +95,16 @@
|
|
|
101
95
|
{Document invariants, preconditions, or side effects that downstream tasks must respect.}
|
|
102
96
|
```
|
|
103
97
|
|
|
104
|
-
- **After writing deliverables**, call `plan-update.cjs` with both flags in a single invocation:
|
|
98
|
+
- **After writing deliverables**, call `plan-update.cjs` with both deliverables flags in a single invocation. Use the command below as authoritative:
|
|
105
99
|
```bash
|
|
106
100
|
node .ai-agents/scripts/plan-update.cjs \
|
|
107
101
|
--plan "<active_change.plan_path>" \
|
|
108
102
|
--task <current_task_id> \
|
|
109
|
-
--status <current_status> \
|
|
110
103
|
--deliverables-pointer current \
|
|
111
|
-
--mark-deliverable-stale <downstream_task_id1>[,<downstream_task_id2>,...]
|
|
112
|
-
--projects <project_list>
|
|
104
|
+
--mark-deliverable-stale <downstream_task_id1>[,<downstream_task_id2>,...]
|
|
113
105
|
```
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
Use this exact metadata-only command. Do NOT add `--status`, hand-edit `plan.yaml`, choose `current_tasks`, or read `.cjs`/`.js` source.
|
|
107
|
+
Pass ALL downstream dependent task ids as a comma-separated list to `--mark-deliverable-stale` so that `/mvt-resume` and `/mvt-status` can surface the stale warning.
|
|
116
108
|
- **On user decline**: do not write deliverables and do not call `plan-update.cjs` with the deliverables flags. The downstream tasks will not receive stale warnings, which is acceptable if the user considers the contract unchanged.
|
|
117
109
|
- **Error handling**: if `plan-update.cjs` rejects (e.g., malformed freshness), surface stderr and leave `implementation.md` as written. The deliverables content is the source of truth; the pointer can be retried via `/mvt-update-plan`.
|
|
118
110
|
|
|
@@ -126,7 +118,7 @@
|
|
|
126
118
|
|
|
127
119
|
| Case | Handling |
|
|
128
120
|
|------|----------|
|
|
129
|
-
| `design.md` missing | WARN, ask user; if they proceed, mark artifact "Source: conversation only"
|
|
121
|
+
| `design.md` missing | WARN, ask user; if they proceed, mark artifact "Source: conversation only"; in Step 5 skip checks that require design.md but still run forbidden import checks from `project-context.md` when rules exist |
|
|
130
122
|
| Implementation reveals the design is infeasible | STOP at Step 4, document the blocker in conversation, recommend `/mvt-design` re-run -- do not silently improvise an alternative |
|
|
131
123
|
| Type-checker fails on pre-existing errors unrelated to the change | Note in artifact, do not attempt blanket fixes outside scope |
|
|
132
124
|
| User aborts at Step 3 confirmation | Do not write any source files or artifact |
|
|
@@ -135,3 +127,4 @@
|
|
|
135
127
|
| Plan task is `blocked` or `done` already | Refuse to implement that task; ask user to pick another task from `current_tasks` or run `/mvt-update-plan` |
|
|
136
128
|
| Deliverables already exist and user declines to update | Leave existing deliverables in place; do not call `plan-update.cjs` with deliverables flags |
|
|
137
129
|
| `plan-update.cjs` rejects deliverables pointer | Surface error; leave `implementation.md` as written (content is source of truth, pointer can be retried) |
|
|
130
|
+
| Re-implementing a task whose `## Task: {id}` section already exists in `implementation.md` | Replace that section's content in place; preserve any `### Deliverables` subsection within it. Do NOT create a second `## Task: {id}` section |
|
|
@@ -40,12 +40,6 @@ sections:
|
|
|
40
40
|
- type: shared
|
|
41
41
|
source: sections/activation-load-config.md
|
|
42
42
|
|
|
43
|
-
- type: shared
|
|
44
|
-
source: sections/language-constraint.md
|
|
45
|
-
|
|
46
|
-
- type: shared
|
|
47
|
-
source: sections/output-format-constraint.md
|
|
48
|
-
|
|
49
43
|
- type: shared
|
|
50
44
|
source: sections/activation-preflight.md
|
|
51
45
|
params:
|
|
@@ -58,10 +52,12 @@ sections:
|
|
|
58
52
|
field: "projects[] in project-context.yaml"
|
|
59
53
|
level: "BLOCK"
|
|
60
54
|
message: "Project not initialized. Run `/mvt-init` first."
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
|
|
56
|
+
- type: shared
|
|
57
|
+
source: sections/language-constraint.md
|
|
58
|
+
|
|
59
|
+
- type: shared
|
|
60
|
+
source: sections/output-format-constraint.md
|
|
65
61
|
|
|
66
62
|
- type: file
|
|
67
63
|
source: ./business.md
|
|
@@ -69,10 +65,8 @@ sections:
|
|
|
69
65
|
- type: inline
|
|
70
66
|
content: |
|
|
71
67
|
## Artifact Structure
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
The template defines section headings only. Generate content for each section based on implementation results.
|
|
75
|
-
Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/implementation.md`
|
|
68
|
+
Template location: `.ai-agents/skills/_templates/implement-output.md`
|
|
69
|
+
Custom override: `.ai-agents/skills/_templates/custom/implement-output.md` (takes precedence if present)
|
|
76
70
|
|
|
77
71
|
- type: shared
|
|
78
72
|
source: sections/session-update.md
|
|
@@ -55,12 +55,6 @@ sections:
|
|
|
55
55
|
- type: shared
|
|
56
56
|
source: sections/activation-load-config.md
|
|
57
57
|
|
|
58
|
-
- type: shared
|
|
59
|
-
source: sections/language-constraint.md
|
|
60
|
-
|
|
61
|
-
- type: shared
|
|
62
|
-
source: sections/output-format-constraint.md
|
|
63
|
-
|
|
64
58
|
- type: shared
|
|
65
59
|
source: sections/activation-preflight.md
|
|
66
60
|
params:
|
|
@@ -70,6 +64,12 @@ sections:
|
|
|
70
64
|
level: "INFO"
|
|
71
65
|
message: "This is a first-time init, proceed normally."
|
|
72
66
|
|
|
67
|
+
- type: shared
|
|
68
|
+
source: sections/language-constraint.md
|
|
69
|
+
|
|
70
|
+
- type: shared
|
|
71
|
+
source: sections/output-format-constraint.md
|
|
72
|
+
|
|
73
73
|
- type: file
|
|
74
74
|
source: ./business.md
|
|
75
75
|
|
|
@@ -21,17 +21,27 @@ If `active_change.plan_path is non-empty` AND `.ai-agents/workspace/artifacts/{a
|
|
|
21
21
|
|
|
22
22
|
### Step 3: Decompose Into Tasks
|
|
23
23
|
|
|
24
|
-
Decompose the change with the following constraints. These constraints are AI-friendly
|
|
24
|
+
Decompose the change with the following constraints. These constraints are AI-friendly decomposition rules.
|
|
25
|
+
|
|
26
|
+
**Granularity guidance** — read from `preferences.planning.granularity` in `.ai-agents/config.yaml`. Default: `medium`.
|
|
27
|
+
|
|
28
|
+
| Level | Decomposition style |
|
|
29
|
+
|-------|---------------------|
|
|
30
|
+
| `coarse` | Prefer fewer, larger tasks — combine related work into broader task boundaries |
|
|
31
|
+
| `medium` | Balanced — each task maps to one focused skill invocation |
|
|
32
|
+
| `fine` | Prefer more, smaller tasks — split work into narrower, focused units |
|
|
33
|
+
|
|
34
|
+
This is **qualitative AI guidance**, not a hard task count constraint. A complex change may produce many tasks; a simple one may produce few — both are valid at any granularity level.
|
|
25
35
|
|
|
26
36
|
| Rule | Detail |
|
|
27
37
|
|------|--------|
|
|
28
|
-
| Count | Aim for 3–10 tasks at the top level. If the change clearly needs more, stop and propose phasing into multiple plans (one per phase). |
|
|
29
38
|
| Single responsibility | Each task should map to one focused skill invocation (e.g., one `/mvt-implement` for one feature slice). |
|
|
30
39
|
| Independently verifiable | Each task must have at least one acceptance criterion that a human or test can check. |
|
|
31
40
|
| Explicit dependencies | If task B requires output from task A, list `A` in B's `depends_on`. Avoid hidden ordering. Tasks that can run in parallel should have no dependency between them. |
|
|
32
41
|
| No cycles | Dependency graph must be a DAG. Validation will reject cycles. |
|
|
33
42
|
| Skill hint | Set `skill_hint` to the skill best suited to execute the task (without `/` prefix): `mvt-implement`, `mvt-test`, `mvt-fix`, `mvt-design`, `mvt-review`, `mvt-refactor`, etc. |
|
|
34
43
|
| Project attribution | Each task must have a `project` array listing which projects it belongs to. In a single-project workspace (`projects.length == 1`), set `project: ["default"]` (or the sole project's name). In a multi-project workspace, auto-infer from the task's file paths matching `projects[].path` and `projects[].source_paths`; if ambiguous, prompt the user. Cross-project tasks list multiple project names. |
|
|
44
|
+
| Invalid value handling | If `granularity` contains a value other than `coarse`, `medium`, `fine`, warn the user and fall back to `medium`. |
|
|
35
45
|
|
|
36
46
|
### Step 4: Assemble plan.yaml
|
|
37
47
|
|
|
@@ -22,7 +22,7 @@ sections:
|
|
|
22
22
|
decision_rules:
|
|
23
23
|
- rule: "active_change is set AND plan_path is empty -> Generate a fresh plan.yaml"
|
|
24
24
|
- rule: "active_change is set AND plan_path is non-empty -> Confirm before regenerating; default to /mvt-update-plan"
|
|
25
|
-
- rule: "
|
|
25
|
+
- rule: "Plan grows beyond practical manageability -> Stop, propose phasing the change into multiple plans"
|
|
26
26
|
- rule: "Dependencies form a cycle -> Reject and ask the user to resolve"
|
|
27
27
|
- rule: "active_change is empty -> Stop and request /mvt-analyze first"
|
|
28
28
|
boundaries:
|
|
@@ -45,12 +45,6 @@ sections:
|
|
|
45
45
|
- type: shared
|
|
46
46
|
source: sections/activation-load-config.md
|
|
47
47
|
|
|
48
|
-
- type: shared
|
|
49
|
-
source: sections/language-constraint.md
|
|
50
|
-
|
|
51
|
-
- type: shared
|
|
52
|
-
source: sections/output-format-constraint.md
|
|
53
|
-
|
|
54
48
|
- type: shared
|
|
55
49
|
source: sections/activation-preflight.md
|
|
56
50
|
params:
|
|
@@ -64,6 +58,12 @@ sections:
|
|
|
64
58
|
level: "BLOCK"
|
|
65
59
|
message: 'No active change. Run `/mvt-analyze` to create one before planning.'
|
|
66
60
|
|
|
61
|
+
- type: shared
|
|
62
|
+
source: sections/language-constraint.md
|
|
63
|
+
|
|
64
|
+
- type: shared
|
|
65
|
+
source: sections/output-format-constraint.md
|
|
66
|
+
|
|
67
67
|
- type: file
|
|
68
68
|
source: ./business.md
|
|
69
69
|
|
|
@@ -47,9 +47,6 @@ sections:
|
|
|
47
47
|
- type: shared
|
|
48
48
|
source: sections/activation-load-config.md
|
|
49
49
|
|
|
50
|
-
- type: shared
|
|
51
|
-
source: sections/language-constraint.md
|
|
52
|
-
|
|
53
50
|
- type: shared
|
|
54
51
|
source: sections/activation-preflight.md
|
|
55
52
|
params:
|
|
@@ -59,6 +56,9 @@ sections:
|
|
|
59
56
|
level: "WARN"
|
|
60
57
|
message: "Session not initialized. Run `/mvt-init` first."
|
|
61
58
|
|
|
59
|
+
- type: shared
|
|
60
|
+
source: sections/language-constraint.md
|
|
61
|
+
|
|
62
62
|
- type: file
|
|
63
63
|
source: ./business.md
|
|
64
64
|
|
|
@@ -47,6 +47,7 @@ This step applies only when the workspace has multiple projects (`projects.lengt
|
|
|
47
47
|
- **How**: walk the checklist below. Skip any group whose inputs were missing per Step 1 fallback notes.
|
|
48
48
|
|
|
49
49
|
**Group A -- Design / Layer Compliance** (requires design.md OR project-context.md)
|
|
50
|
+
- If `implementation.md > Design Compliance` exists, use it as the implementer's self-check claim set. Independently verify claimed passes and investigate any skipped, deviated, or undocumented item; do not repeat every mechanical self-check when the claim is already supported.
|
|
50
51
|
- Each file is in the module/layer assigned by design or project-context.
|
|
51
52
|
- Dependency direction respects layer rules (no upward imports, no forbidden cross-module reaches).
|
|
52
53
|
- Public interfaces match `Key Interfaces` from design.
|
|
@@ -96,15 +97,8 @@ This step applies only when the workspace has multiple projects (`projects.lengt
|
|
|
96
97
|
- Each finding must include: file, line range, severity, observation, recommendation.
|
|
97
98
|
|
|
98
99
|
### Step 7: Write Artifact
|
|
99
|
-
- **Path and template**: as defined in the **Artifact Structure** section below. If no `active_change` exists, use `.ai-agents/workspace/artifacts/_ad-hoc-review-{YYYY-MM-DD-HHMM}/review.md`.
|
|
100
|
-
- **Required content
|
|
101
|
-
- `Review Scope` -- file list, depth, aspect filter, fallbacks applied (e.g., "design.md missing -> Group A skipped").
|
|
102
|
-
- `Summary` -- counts per severity + one-paragraph overall verdict (Approve / Approve with comments / Request changes / Block).
|
|
103
|
-
- `Critical Findings` -- one entry per finding.
|
|
104
|
-
- `Warnings`.
|
|
105
|
-
- `Suggestions`.
|
|
106
|
-
- `Skipped Checks` -- groups skipped because inputs were missing, with reason.
|
|
107
|
-
- `Recommended Next Skill` -- e.g., `/mvt-fix` for Critical, `/mvt-test` if Group E gaps, `/mvt-refactor` if Group B is dominant.
|
|
100
|
+
- **Path and template**: as defined in the **Artifact Structure** section below. If no `active_change` exists, use `.ai-agents/workspace/artifacts/_ad-hoc-review-{YYYY-MM-DD-HHMM}/review.md`. Follow the HTML comments in the template for what each section should contain; strip comments from the final artifact.
|
|
101
|
+
- **Required coverage**: cover only content that is applicable to this review. Preserve enough information for the user to understand what was reviewed, the verdict, material findings, skipped checks, and the recommended next step. 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.
|
|
108
102
|
|
|
109
103
|
### Step 8: Verdict Rule
|
|
110
104
|
- Critical > 0 -> verdict is `Request changes`. Suggest `/mvt-fix`.
|
|
@@ -59,12 +59,6 @@ sections:
|
|
|
59
59
|
- type: shared
|
|
60
60
|
source: sections/activation-load-config.md
|
|
61
61
|
|
|
62
|
-
- type: shared
|
|
63
|
-
source: sections/language-constraint.md
|
|
64
|
-
|
|
65
|
-
- type: shared
|
|
66
|
-
source: sections/output-format-constraint.md
|
|
67
|
-
|
|
68
62
|
- type: shared
|
|
69
63
|
source: sections/activation-preflight.md
|
|
70
64
|
params:
|
|
@@ -78,6 +72,12 @@ sections:
|
|
|
78
72
|
level: "WARN"
|
|
79
73
|
message: "No code to review. Run `/mvt-implement` first or specify files."
|
|
80
74
|
|
|
75
|
+
- type: shared
|
|
76
|
+
source: sections/language-constraint.md
|
|
77
|
+
|
|
78
|
+
- type: shared
|
|
79
|
+
source: sections/output-format-constraint.md
|
|
80
|
+
|
|
81
81
|
- type: file
|
|
82
82
|
source: ./business.md
|
|
83
83
|
|
|
@@ -86,7 +86,7 @@ sections:
|
|
|
86
86
|
## Artifact Structure
|
|
87
87
|
Read the document structure template from: `.ai-agents/skills/_templates/review-output.md`
|
|
88
88
|
If a custom version exists at `.ai-agents/skills/_templates/custom/review-output.md`, use the custom version instead.
|
|
89
|
-
The template defines section
|
|
89
|
+
The template defines section structure and guidance comments. Generate applicable content based on review results.
|
|
90
90
|
Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/review.md`
|
|
91
91
|
|
|
92
92
|
- type: shared
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
| Condition | Action |
|
|
28
28
|
|-----------|--------|
|
|
29
|
-
| No plans found anywhere | Skip the Changes Overview section entirely; render "No active
|
|
29
|
+
| No plans found anywhere | Skip the Changes Overview section entirely; render "No active plans." |
|
|
30
30
|
| One plan found | Render Changes Overview with one row |
|
|
31
31
|
| Multiple plans found | Render Changes Overview sorted: `in_progress` desc by `updated_at` first, then `done` desc by `updated_at`, then `abandoned` last |
|
|
32
32
|
| Any plan over the cap (more than ~12 rows) | Show top 10 rows; print a `+N older changes hidden -- see artifacts/` line |
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
### Step 4: Build the Status Report
|
|
35
35
|
- Render in this order, omitting any section whose inputs were unavailable:
|
|
36
36
|
|
|
37
|
-
1. **Header** -- one-line summary: project name (from `project-context.yaml`),
|
|
37
|
+
1. **Header** -- one-line summary: project name (from `project-context.yaml`), last synced timestamp.
|
|
38
38
|
2. **Projects** -- table: name | type | tech stack (truncated). Cap at 10 rows; collapse the rest into `+N more`.
|
|
39
39
|
3. **Semantic Context** -- one line: `project-context.md present` / `missing -- run /mvt-analyze-code`.
|
|
40
40
|
4. **Active Change** -- if `active_change` exists: id, title, start time. Else: `none`.
|
|
@@ -64,20 +64,10 @@
|
|
|
64
64
|
|-----------|-------|--------|----------|---------------|---------|------------|
|
|
65
65
|
|
|
66
66
|
For `current_tasks`, display as a compact representation: if single-project, show the task id only; if multi-project, show `web: t2, api: t1` format. The `project` column lists the distinct projects across all tasks in the plan.
|
|
67
|
-
|
|
68
|
-
If any task has `deliverables.freshness == "stale"`, append a warning row: "Stale deliverables: {task_ids} -- run `/mvt-implement` to refresh"
|
|
69
67
|
6. **Skill History** -- last 5 rows of the timeline from Step 2.
|
|
70
68
|
|
|
71
69
|
- Hard cap: total rendered output should not exceed ~120 lines. If it would, truncate Skill History first; never truncate the active change or Changes Overview header rows.
|
|
72
70
|
|
|
73
|
-
### Step 5: Suggest Next Step
|
|
74
|
-
- Resolution order (first match wins):
|
|
75
|
-
1. `active_change` has a plan in `in_progress`, `current_tasks` has entries -> suggest the relevant task's `skill_hint` (or, if missing, recommend `/mvt-update-plan` to set `current_tasks`).
|
|
76
|
-
2. `active_epic.id` non-empty AND `active_change.id` empty (epic-pending state) -> suggest `/mvt-analyze` -- Start the next sub-change in the epic.
|
|
77
|
-
3. `project-context.md` is missing -> suggest `/mvt-analyze-code`.
|
|
78
|
-
4. No `active_change` or no active plan -> suggest `/mvt-analyze` to start a new feature OR `/mvt-help` to browse the catalog.
|
|
79
|
-
- The suggestion must be a single line: skill command + one-clause reason.
|
|
80
|
-
|
|
81
71
|
## Edge Cases & Errors
|
|
82
72
|
|
|
83
73
|
| Case | Handling |
|
|
@@ -40,9 +40,6 @@ sections:
|
|
|
40
40
|
- type: shared
|
|
41
41
|
source: sections/activation-load-config.md
|
|
42
42
|
|
|
43
|
-
- type: shared
|
|
44
|
-
source: sections/language-constraint.md
|
|
45
|
-
|
|
46
43
|
- type: shared
|
|
47
44
|
source: sections/activation-preflight.md
|
|
48
45
|
params:
|
|
@@ -52,6 +49,9 @@ sections:
|
|
|
52
49
|
level: "WARN"
|
|
53
50
|
message: "Session not initialized. Run `/mvt-init` first."
|
|
54
51
|
|
|
52
|
+
- type: shared
|
|
53
|
+
source: sections/language-constraint.md
|
|
54
|
+
|
|
55
55
|
- type: file
|
|
56
56
|
source: ./business.md
|
|
57
57
|
|
|
@@ -181,7 +181,7 @@ If user skips verification: proceed directly to Step 10 with Step 7 selections.
|
|
|
181
181
|
### Step 12: State Update
|
|
182
182
|
Apply the State Update rules defined in the **State Update** section below.
|
|
183
183
|
- The `--set-synced` parameter updates `session.last_synced_at`.
|
|
184
|
-
-
|
|
184
|
+
- When updating a plan that has project attribution, pass `--projects` to `plan-update.cjs`; read `.ai-agents/scripts/plan-update.md` only if the workflow needs flags or value sources not rendered in this skill. Do NOT hand-edit `plan.yaml` or read `.cjs`/`.js` source.
|
|
185
185
|
|
|
186
186
|
## Edge Cases & Errors
|
|
187
187
|
|
|
@@ -57,12 +57,6 @@ sections:
|
|
|
57
57
|
- type: shared
|
|
58
58
|
source: sections/activation-load-config.md
|
|
59
59
|
|
|
60
|
-
- type: shared
|
|
61
|
-
source: sections/language-constraint.md
|
|
62
|
-
|
|
63
|
-
- type: shared
|
|
64
|
-
source: sections/output-format-constraint.md
|
|
65
|
-
|
|
66
60
|
- type: shared
|
|
67
61
|
source: sections/activation-preflight.md
|
|
68
62
|
params:
|
|
@@ -76,6 +70,12 @@ sections:
|
|
|
76
70
|
level: "BLOCK"
|
|
77
71
|
message: "project-context.md not found. Run `/mvt-analyze-code` to create the initial document; this skill only handles incremental updates."
|
|
78
72
|
|
|
73
|
+
- type: shared
|
|
74
|
+
source: sections/language-constraint.md
|
|
75
|
+
|
|
76
|
+
- type: shared
|
|
77
|
+
source: sections/output-format-constraint.md
|
|
78
|
+
|
|
79
79
|
- type: shared
|
|
80
80
|
source: sections/project-context-profile.md
|
|
81
81
|
|
|
@@ -91,16 +91,8 @@ This step applies only when the workspace has multiple projects (`projects.lengt
|
|
|
91
91
|
- Record each finding with: scenario id, expected vs observed, severity (Critical / Warning), and recommend `/mvt-fix`.
|
|
92
92
|
|
|
93
93
|
### Step 10: Write Artifact
|
|
94
|
-
- **Path and template**: as defined in the **Artifact Structure** section below.
|
|
95
|
-
- **Required content
|
|
96
|
-
- `Scope` -- target files, fallbacks applied.
|
|
97
|
-
- `Test Framework & Layout` -- chosen framework, file layout convention.
|
|
98
|
-
- `Test Scenarios` -- the Scenario Table from Step 4.
|
|
99
|
-
- `Test Cases` -- the row-level table from Step 6.
|
|
100
|
-
- `Granularity Decisions` -- summary from Step 5, including any "needs setup" gaps.
|
|
101
|
-
- `Coverage Analysis` -- only when `--coverage`; otherwise omit the heading.
|
|
102
|
-
- `Implementation Issues Found` -- from Step 9; empty list is fine.
|
|
103
|
-
- `Suggested Run Commands` -- one or two commands the user can copy-paste.
|
|
94
|
+
- **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.
|
|
95
|
+
- **Required coverage**: cover only content that is applicable to this test effort. Preserve enough information for the user to understand the target scope, chosen framework/layout, scenarios and runnable test cases, granularity choices, coverage gaps when `--coverage` is set, implementation issues when found, and practical run commands when tests are generated. 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.
|
|
104
96
|
- The actual test files go to the project tree; the artifact is a record.
|
|
105
97
|
|
|
106
98
|
### Step 11: State Update
|
|
@@ -54,12 +54,6 @@ sections:
|
|
|
54
54
|
- type: shared
|
|
55
55
|
source: sections/activation-load-config.md
|
|
56
56
|
|
|
57
|
-
- type: shared
|
|
58
|
-
source: sections/language-constraint.md
|
|
59
|
-
|
|
60
|
-
- type: shared
|
|
61
|
-
source: sections/output-format-constraint.md
|
|
62
|
-
|
|
63
57
|
- type: shared
|
|
64
58
|
source: sections/activation-preflight.md
|
|
65
59
|
params:
|
|
@@ -73,6 +67,12 @@ sections:
|
|
|
73
67
|
level: "WARN"
|
|
74
68
|
message: "No implementation found. Run `/mvt-implement` first."
|
|
75
69
|
|
|
70
|
+
- type: shared
|
|
71
|
+
source: sections/language-constraint.md
|
|
72
|
+
|
|
73
|
+
- type: shared
|
|
74
|
+
source: sections/output-format-constraint.md
|
|
75
|
+
|
|
76
76
|
- type: inline
|
|
77
77
|
content: |
|
|
78
78
|
## Test Case Types
|
|
@@ -93,7 +93,7 @@ sections:
|
|
|
93
93
|
## Artifact Structure
|
|
94
94
|
Read the document structure template from: `.ai-agents/skills/_templates/test-output.md`
|
|
95
95
|
If a custom version exists at `.ai-agents/skills/_templates/custom/test-output.md`, use the custom version instead.
|
|
96
|
-
The template defines section
|
|
96
|
+
The template defines section structure and guidance comments. Generate applicable content based on test design results.
|
|
97
97
|
Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/tests/test-design.md`
|
|
98
98
|
|
|
99
99
|
- type: shared
|