@uoyo/mvtt 2.0.0-beta.2 → 2.0.0-beta.3

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.
Files changed (72) hide show
  1. package/README.md +1 -11
  2. package/dist/build/section-loader.d.ts.map +1 -1
  3. package/dist/build/section-loader.js +18 -8
  4. package/dist/build/section-loader.js.map +1 -1
  5. package/dist/fs/materialize.d.ts.map +1 -1
  6. package/dist/fs/materialize.js +5 -0
  7. package/dist/fs/materialize.js.map +1 -1
  8. package/dist/scripts/session-update.cjs +7568 -0
  9. package/install-manifest.yaml +2 -0
  10. package/package.json +3 -2
  11. package/sources/defaults/config.yaml +7 -7
  12. package/sources/defaults/session.yaml +9 -16
  13. package/sources/scripts/session-update.js +351 -0
  14. package/sources/sections/activation-load-context.md +4 -0
  15. package/sources/sections/footer-next-steps.md +1 -1
  16. package/sources/sections/session-update.md +100 -32
  17. package/sources/skills/mvt-analyze/manifest.yaml +1 -0
  18. package/sources/skills/mvt-analyze-code/manifest.yaml +18 -4
  19. package/sources/skills/mvt-bug-detect/business.md +99 -101
  20. package/sources/skills/mvt-bug-detect/manifest.yaml +84 -84
  21. package/sources/skills/mvt-check-context/business.md +3 -5
  22. package/sources/skills/mvt-check-context/manifest.yaml +15 -8
  23. package/sources/skills/mvt-cleanup/business.md +49 -23
  24. package/sources/skills/mvt-cleanup/manifest.yaml +15 -10
  25. package/sources/skills/mvt-config/business.md +1 -2
  26. package/sources/skills/mvt-config/manifest.yaml +11 -4
  27. package/sources/skills/mvt-create-skill/business.md +6 -5
  28. package/sources/skills/mvt-create-skill/manifest.yaml +27 -11
  29. package/sources/skills/mvt-design/business.md +3 -6
  30. package/sources/skills/mvt-design/manifest.yaml +14 -1
  31. package/sources/skills/mvt-fix/business.md +2 -1
  32. package/sources/skills/mvt-fix/manifest.yaml +6 -3
  33. package/sources/skills/mvt-help/business.md +2 -4
  34. package/sources/skills/mvt-help/manifest.yaml +13 -5
  35. package/sources/skills/mvt-implement/business.md +4 -5
  36. package/sources/skills/mvt-implement/manifest.yaml +13 -0
  37. package/sources/skills/mvt-init/business.md +2 -2
  38. package/sources/skills/mvt-init/manifest.yaml +1 -0
  39. package/sources/skills/mvt-manage-context/business.md +11 -0
  40. package/sources/skills/mvt-manage-context/manifest.yaml +14 -3
  41. package/sources/skills/mvt-plan-dev/business.md +101 -20
  42. package/sources/skills/mvt-plan-dev/manifest.yaml +18 -19
  43. package/sources/skills/mvt-quick-dev/business.md +2 -1
  44. package/sources/skills/mvt-quick-dev/manifest.yaml +21 -6
  45. package/sources/skills/mvt-refactor/business.md +2 -1
  46. package/sources/skills/mvt-refactor/manifest.yaml +21 -3
  47. package/sources/skills/mvt-resume/business.md +28 -68
  48. package/sources/skills/mvt-resume/manifest.yaml +17 -7
  49. package/sources/skills/mvt-review/business.md +3 -3
  50. package/sources/skills/mvt-review/manifest.yaml +22 -1
  51. package/sources/skills/mvt-status/business.md +14 -18
  52. package/sources/skills/mvt-status/manifest.yaml +11 -3
  53. package/sources/skills/mvt-sync-context/business.md +14 -9
  54. package/sources/skills/mvt-sync-context/manifest.yaml +3 -0
  55. package/sources/skills/mvt-template/business.md +0 -2
  56. package/sources/skills/mvt-template/manifest.yaml +13 -8
  57. package/sources/skills/mvt-test/business.md +3 -3
  58. package/sources/skills/mvt-test/manifest.yaml +14 -1
  59. package/sources/skills/mvt-update-plan/business.md +14 -3
  60. package/sources/skills/mvt-update-plan/manifest.yaml +11 -19
  61. package/dist/build/plan-validator.d.ts +0 -26
  62. package/dist/build/plan-validator.d.ts.map +0 -1
  63. package/dist/build/plan-validator.js +0 -225
  64. package/dist/build/plan-validator.js.map +0 -1
  65. package/dist/commands/build.d.ts +0 -5
  66. package/dist/commands/build.d.ts.map +0 -1
  67. package/dist/commands/build.js +0 -46
  68. package/dist/commands/build.js.map +0 -1
  69. package/dist/commands/migrate.d.ts +0 -16
  70. package/dist/commands/migrate.d.ts.map +0 -1
  71. package/dist/commands/migrate.js +0 -118
  72. package/dist/commands/migrate.js.map +0 -1
@@ -60,6 +60,7 @@
60
60
  | 3 | `preferences.output.no_emojis` | Default `true` |
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
+ | 6 | `preferences.history_limits.*` | Show each limit with current value; accept new int or Enter to keep |
63
64
 
64
65
  - After all stages, render a Summary Preview table: `key | from | to`, then a single confirmation prompt to apply ALL changes atomically.
65
66
  - If the user aborts at the summary, discard all in-progress values; do not write anything.
@@ -73,8 +74,6 @@
73
74
  6. Report the keys that changed.
74
75
  - Do NOT reset `knowledge.shared` to defaults if the user has added entries via `/mvt-manage-context` -- preserve user-added knowledge ids; only reset preferences. Surface this exception in the diff.
75
76
 
76
- ### Step 8: (session update handled by shared section)
77
-
78
77
  ## Knowledge Inspection (sub-flow used by Interactive Menu and Show All)
79
78
  - **View**: list shared knowledge ids from `registry.yaml > knowledge.shared`, then per-skill knowledge ids grouped by skill (`registry.yaml > skills.*.knowledge`). Show token estimates from each entry's manifest if available.
80
79
  - **Modify**: this skill does NOT mutate knowledge settings; defer to `/mvt-manage-context`. Print the suggested command (`/mvt-manage-context move`, `/mvt-manage-context add`, etc.) instead of doing the work here.
@@ -56,12 +56,9 @@ sections:
56
56
  - type: shared
57
57
  source: sections/activation-load-config.md
58
58
 
59
- - type: shared
60
- source: sections/output-language-constraint.md
61
-
62
59
  - type: inline
63
60
  content: |
64
- ### Step 3: Pre-flight Checks
61
+ ### Step 4: Pre-flight Checks
65
62
  - No blocking checks required (config is always accessible)
66
63
 
67
64
  ## Configuration Keys
@@ -75,6 +72,8 @@ sections:
75
72
  | `preferences.output.no_emojis` | bool | `true` | Disable emojis in output |
76
73
  | `preferences.output.data_format` | enum | `yaml` | Data output format (yaml, json) |
77
74
  | `preferences.context_routing.relevance_threshold` | int | `70` | AI routing threshold for `/mvt-manage-context add` (0-100) |
75
+ | `preferences.history_limits.history` | int | `20` | Max history entries (1-100) |
76
+ | `preferences.history_limits.changes` | int | `20` | Max changes entries (1-100) |
78
77
 
79
78
  ### Knowledge Settings
80
79
 
@@ -94,3 +93,11 @@ sections:
94
93
  source: sections/footer-next-steps.md
95
94
  params:
96
95
  current_skill: mvt-config
96
+ conditional_suggestions:
97
+ conditions:
98
+ - condition: "configuration updated"
99
+ primary: mvt-status
100
+ primary_desc: "Check project status with new settings"
101
+ - condition: "language changed"
102
+ primary: mvt-help
103
+ primary_desc: "Verify output in the new language"
@@ -27,7 +27,7 @@ The `name` and `description` in YAML frontmatter determine when Claude will use
27
27
  ### Step 1: Load Inputs
28
28
  - **Recommended**:
29
29
  - One existing skill's SKILL.md under `.claude/skills/<existing>/SKILL.md` as a structural reference (to extract shared section patterns like Activation Protocol, State Update, Next Steps).
30
- - `registry.yaml` -- to check for name collisions and understand skill categories.
30
+ - `.ai-agents/registry.yaml` -- to check for name collisions and understand skill categories.
31
31
 
32
32
  ### Step 2: Understand Usage with Concrete Examples
33
33
  Skip only when usage patterns are already crystal clear.
@@ -136,7 +136,7 @@ Walk this checklist; any failed item must be fixed before declaring success.
136
136
  | Standard sections present | SKILL.md contains Role, Activation Protocol, Execution Flow, Edge Cases & Errors, State Update, Suggested Next Steps |
137
137
  | Knowledge files exist | Every file referenced in `knowledge:` resolves on disk |
138
138
  | Template path correct | If `template:` set, file exists at that path; the template is headings-only |
139
- | Word budget | SKILL.md body under ~5k words (run a quick `wc` if available) |
139
+ | Word budget | SKILL.md body under ~5k words (use any available word-count method, e.g., editor statistics) |
140
140
  | Standard skeleton | Execution Flow contains Load Inputs, main steps with branches, Edge Cases & Errors |
141
141
 
142
142
  Show the user how to invoke: `/{name}`.
@@ -148,14 +148,15 @@ Tell the user the iteration loop:
148
148
  3. Decide whether to update SKILL.md, add a `references/` file, add a knowledge entry, or split into a new skill.
149
149
  4. Re-run `/mvt-create-skill` to refine, or edit the source files directly and rebuild.
150
150
 
151
- ### Step 10: (session update handled by shared section)
151
+ ### Step 10: State Update
152
+ Apply the State Update rules defined in the **State Update** section below.
152
153
 
153
154
  ## Edge Cases & Errors
154
155
 
155
156
  | Case | Handling |
156
157
  |------|----------|
157
158
  | Skill name collides with an existing registry entry | STOP at Step 3; ask user to rename; do not generate any file |
158
- | User wants the skill to mutate `session.yaml` fields beyond `skill_history` | Surface that ownership rules forbid this (e.g., `recent_changes` is owned by `/mvt-plan-dev`/`/mvt-update-plan`); recommend redesign |
159
+ | User wants the skill to mutate `session.yaml` fields beyond `history` | Surface that ownership rules forbid this (e.g., `changes` is owned by `/mvt-plan-dev`/`/mvt-update-plan`); recommend redesign |
159
160
  | Output template is requested but the skill is conversation-only (no persisted file) | Refuse to create a template; explain that templates are for document structure, not conversation replies |
160
161
  | User asks to skip the registry registration step | Refuse; an unregistered skill is invisible to `/mvt-help`, `/mvt-status`, and `/mvt-resume`. Registration is non-negotiable |
161
162
  | Skill duplicates an existing skill's responsibility | Surface the overlap (cite the existing skill's description); propose merging or sub-classing as a variant rather than creating a duplicate |
@@ -225,7 +226,7 @@ Copy the following sections verbatim from this document (the assembled SKILL.md
225
226
  | Load Config | Load Config step within Activation Protocol | Copy as-is |
226
227
  | Output Language Constraint | Output Language Constraint step within Activation Protocol | Copy as-is |
227
228
  | Pre-flight Checks | Pre-flight Checks step within Activation Protocol | Replace `checks` table with skill-specific checks; if none required, use a single INFO row |
228
- | State Update | `## State Update (Required)` | Replace `/{name}` with the new skill's command; include `active_change` conditional block only if the skill creates changes; include `Shortcut Operation Rules` only if category is `shortcut` |
229
+ | State Update | `## State Update` | Replace `/{name}` with the new skill's command; include `active_change` conditional block only if the skill creates changes; include `Shortcut Operation Rules` only if category is `shortcut` |
229
230
  | Suggested Next Steps | `## Suggested Next Steps` | Replace `current_skill` with the new skill name; replace conditional suggestions with skill-appropriate ones |
230
231
 
231
232
  **Important**: Do NOT paraphrase or rewrite the standard sections. Copy them character-for-character from this document and only substitute the skill-specific values. This ensures consistency across all MVTT skills.
@@ -27,16 +27,16 @@ sections:
27
27
  - rule: "Skill needs bundled resources -> Plan scripts/references/assets in Step 3"
28
28
  - rule: "Usage patterns unclear -> Ask for concrete examples before proceeding"
29
29
  boundaries:
30
- - scope: "Generated skills must follow MVTT SKILL.md standard structure"
31
- skill: "(constraint)"
32
- - scope: "Skill names may use `mvt-` prefix or a project-specific prefix (e.g., `app-`, `proj-`)"
33
- skill: "(constraint)"
34
- - scope: "All custom skills MUST be registered in `registry.yaml` with `custom: true`"
35
- skill: "(to prevent overwrite during framework updates)"
36
- - scope: "Description field must use third-person with effective trigger keywords"
37
- skill: "(constraint)"
38
- - scope: "SKILL.md body target <5k words; move detailed content to references/"
39
- skill: "(progressive disclosure)"
30
+ - scope: "generate skills that deviate from MVTT SKILL.md standard structure"
31
+ skill: "the standard structure as documented"
32
+ - scope: "use arbitrary prefixes without validating naming conventions"
33
+ skill: "`mvt-` or a project-specific prefix like `app-`, `proj-`"
34
+ - scope: "create skills without registering in registry.yaml"
35
+ skill: "`custom: true` in registry.yaml"
36
+ - scope: "write vague or first-person descriptions"
37
+ skill: "third-person with effective trigger keywords"
38
+ - scope: "exceed ~5k words in SKILL.md body"
39
+ skill: "references/ for detailed content"
40
40
 
41
41
  - type: shared
42
42
  source: sections/activation-load-context.md
@@ -52,7 +52,7 @@ sections:
52
52
 
53
53
  - type: inline
54
54
  content: |
55
- ### Step 3: Pre-flight Checks
55
+ ### Step 4: Pre-flight Checks
56
56
  - No blocking checks required.
57
57
 
58
58
  - type: file
@@ -85,7 +85,23 @@ sections:
85
85
  4. Use `/mvt-create-skill` to refine, or edit skill files directly
86
86
  ```
87
87
 
88
+ - type: shared
89
+ source: sections/session-update.md
90
+ params:
91
+ current_skill: mvt-create-skill
92
+
88
93
  - type: shared
89
94
  source: sections/footer-next-steps.md
90
95
  params:
91
96
  current_skill: mvt-create-skill
97
+ conditional_suggestions:
98
+ conditions:
99
+ - condition: "skill created successfully"
100
+ primary: mvt-help
101
+ primary_desc: "Verify the new skill appears in the catalog"
102
+ - condition: "skill needs knowledge entries"
103
+ primary: mvt-manage-context
104
+ primary_desc: "Add knowledge files for the new skill"
105
+ - condition: "skill needs testing with real tasks"
106
+ primary: mvt-status
107
+ primary_desc: "Check project state before testing the skill"
@@ -82,8 +82,7 @@
82
82
  - **Confirmation format**: present a one-screen summary -- style chosen, modules added/changed, ADRs requiring review, a single yes/no prompt. Do not dump the full artifact.
83
83
 
84
84
  ### Step 8: Write Artifact
85
- - **Path**: `.ai-agents/workspace/artifacts/{active_change.id}/design.md`.
86
- - **Template**: `.ai-agents/skills/_templates/design-output.md`; if `_templates/custom/design-output.md` exists, use the custom version.
85
+ - **Path and template**: as defined in the **Artifact Structure** section below.
87
86
  - **Required sections** (filled per template headings, but content must include):
88
87
  - `Overview` -- the problem statement (Step 2).
89
88
  - `Architecture Decision Records` -- every ADR from Step 6.
@@ -99,10 +98,8 @@
99
98
  - 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.
100
99
  - Otherwise recommend `/mvt-implement` directly.
101
100
 
102
- ### Step 10: (session update handled by shared section)
103
-
104
- ## Variants
105
- - `/mvt-design --plan` flag: skip Step 5 (data flow detail) and Step 6 (full ADR fields). In `--plan` mode, ADRs collapse to a one-line `decision: <text>`. Step 8 still writes `design.md` but with the abbreviated content. The output is a high-level plan, not an implementation-ready blueprint -- mark the artifact with a top-line `Mode: plan` indicator.
101
+ ### Step 10: State Update
102
+ Apply the State Update rules defined in the **State Update** section below.
106
103
 
107
104
  ## Edge Cases & Errors
108
105
 
@@ -41,7 +41,7 @@ sections:
41
41
  | Variant | Description |
42
42
  |---------|-------------|
43
43
  | `/mvt-design` | Full architecture design |
44
- | `/mvt-design --plan` | High-level implementation plan only |
44
+ | `/mvt-design --plan` | High-level implementation plan only: skip Step 5 (data flow detail) and Step 6 (full ADR fields). ADRs collapse to one-line `decision: <text>`. Step 8 writes `design.md` with abbreviated content and a top-line `Mode: plan` indicator. If the request is actually small (1 file), downgrade to a 5-line summary in chat and do NOT write `design.md`. |
45
45
 
46
46
  - type: shared
47
47
  source: sections/activation-load-context.md
@@ -89,8 +89,21 @@ sections:
89
89
 
90
90
  - type: shared
91
91
  source: sections/session-update.md
92
+ params:
93
+ current_skill: mvt-design
92
94
 
93
95
  - type: shared
94
96
  source: sections/footer-next-steps.md
95
97
  params:
96
98
  current_skill: mvt-design
99
+ conditional_suggestions:
100
+ conditions:
101
+ - condition: "design complete, change tracking lists >5 files or >1 new module"
102
+ primary: mvt-plan-dev
103
+ primary_desc: "Create a structured implementation plan"
104
+ - condition: "design complete, small scope"
105
+ primary: mvt-implement
106
+ primary_desc: "Implement the designed architecture"
107
+ - condition: "design has proposed ADRs needing stakeholder review"
108
+ primary: mvt-review
109
+ primary_desc: "Review the design decisions"
@@ -118,7 +118,8 @@
118
118
  - `Regression risk` -- scope of behavior potentially affected, plus what tests guard it.
119
119
  - `Follow-ups` -- TODOs, deferred refactors, related issues.
120
120
 
121
- ### Step 9: (session update handled by shared section)
121
+ ### Step 9: State Update
122
+ Apply the State Update rules defined in the **State Update** section below.
122
123
 
123
124
  ## Edge Cases & Errors
124
125
 
@@ -58,15 +58,18 @@ sections:
58
58
 
59
59
  - type: inline
60
60
  content: |
61
- ### Shortcut Operation Rules
62
- - Can execute at any time without checking workflow prerequisites
63
- - Do NOT update `progress` (this is a shortcut operation, not a workflow phase)
61
+ ## Operation Mode: Shortcut
62
+
63
+ This skill operates as a shortcut it can execute at any time without checking workflow prerequisites.
64
+ - Do NOT update `progress` (this is a shortcut operation, not a workflow phase).
64
65
 
65
66
  - type: file
66
67
  source: ./business.md
67
68
 
68
69
  - type: shared
69
70
  source: sections/session-update.md
71
+ params:
72
+ current_skill: mvt-fix
70
73
 
71
74
  - type: shared
72
75
  source: sections/footer-next-steps.md
@@ -13,7 +13,7 @@
13
13
  |-----------|---------------|
14
14
  | `session.yaml` missing or `initialized_at` empty | `/mvt-init` -- Initialize the project |
15
15
  | Initialized AND `project-context.md` does not exist | `/mvt-analyze-code` -- Analyze existing code |
16
- | No requirements (no `analysis.md` for active change AND no completed `/mvt-analyze` in `skill_history`) | `/mvt-analyze` -- Analyze requirements |
16
+ | No requirements (no `analysis.md` for active change AND no completed `/mvt-analyze` in `history`) | `/mvt-analyze` -- Analyze requirements |
17
17
  | No requirements, but user describes a simple change directly | `/mvt-quick-dev` -- Implement a simple change quickly |
18
18
  | Requirements present, no `design.md` | `/mvt-design` -- Design architecture |
19
19
  | `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 |
@@ -60,15 +60,13 @@ Color-code based on current progress: green (done), yellow (current/recommended)
60
60
  | "Compare `/mvt-X` and `/mvt-Y`" | Pull descriptions from registry; if both are workflow skills, mention their relative position in the diagram |
61
61
  | Asks about something not in registry | Reply: "No skill matches that. Available skills: see catalog above." Do not invent skills |
62
62
 
63
- ### Step 6: (session update handled by shared section)
64
-
65
63
  ## Edge Cases & Errors
66
64
 
67
65
  | Case | Handling |
68
66
  |------|----------|
69
67
  | `registry.yaml` missing | STOP at Step 1; recommend `mvtt install`; show no catalog |
70
68
  | `session.yaml` missing | Render catalog (Step 3) and diagram (Step 4) without the "current position" highlight; Step 2 recommends `/mvt-init` |
71
- | `recent_changes[]` references a `plan_path` that no longer exists | Ignore for help purposes; do not warn -- `/mvt-status` is the right place for that |
69
+ | `changes[]` references a `plan_path` that no longer exists | Ignore for help purposes; do not warn -- `/mvt-status` is the right place for that |
72
70
  | 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 |
73
71
  | 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 |
74
72
  | Workflow diagram cannot be rendered (mermaid unsupported in environment) | Fall back to a textual flow: `init -> analyze-code -> analyze -> design -> [plan-dev] -> implement -> review -> test` |
@@ -24,12 +24,9 @@ sections:
24
24
  - type: shared
25
25
  source: sections/activation-load-config.md
26
26
 
27
- - type: shared
28
- source: sections/output-language-constraint.md
29
-
30
27
  - type: inline
31
28
  content: |
32
- ### Step 3: Pre-flight Checks
29
+ ### Step 4: Pre-flight Checks
33
30
  - No blocking checks required.
34
31
 
35
32
  - type: file
@@ -46,7 +43,7 @@ sections:
46
43
 
47
44
  ### Current Status
48
45
  - **Project**: {name} ({initialized/not initialized})
49
- - **Last Skill**: {last command from skill_history}
46
+ - **Last Skill**: {last command from history}
50
47
  - **Recommended Next**: `/mvt-{next}` -- {description}
51
48
 
52
49
  ### Workflow
@@ -65,3 +62,14 @@ sections:
65
62
  source: sections/footer-next-steps.md
66
63
  params:
67
64
  current_skill: mvt-help
65
+ conditional_suggestions:
66
+ conditions:
67
+ - condition: "project not initialized"
68
+ primary: mvt-init
69
+ primary_desc: "Initialize the project"
70
+ - condition: "project initialized, no active change"
71
+ primary: mvt-analyze
72
+ primary_desc: "Start analyzing requirements for a new feature"
73
+ - condition: "active change in progress"
74
+ primary: mvt-resume
75
+ primary_desc: "Resume work on the active change"
@@ -59,8 +59,7 @@
59
59
  3. UI/frontend changes: per project rules, ask user to verify in browser; do NOT claim "tested" if you only ran type-check.
60
60
 
61
61
  ### Step 7: Write Artifact
62
- - **Path**: `.ai-agents/workspace/artifacts/{active_change.id}/implementation.md`.
63
- - **Template**: `.ai-agents/skills/_templates/implement-output.md` (custom override at `_templates/custom/...` takes precedence).
62
+ - **Path and template**: as defined in the **Artifact Structure** section below.
64
63
  - **Required content** (mapped to template headings):
65
64
  - `Implementation Summary` -- one paragraph: what was built, scope.
66
65
  - `Files Touched` -- table: path | create/modify/delete | one-line intent.
@@ -73,10 +72,10 @@
73
72
  ### Step 8: Plan-Aware Progress Hint (if applicable)
74
73
  - If `plan.yaml` exists and a single `current_task` covers this implementation, suggest the user run `/mvt-update-plan <task-id> done` (or `blocked` with reason).
75
74
  - Do NOT modify `plan.yaml` directly from this skill; it is owned by `/mvt-update-plan`.
76
- - Do NOT modify `recent_changes` directly; it is owned by `/mvt-plan-dev` / `/mvt-update-plan`.
75
+ - Do NOT modify `changes` directly; it is owned by `/mvt-plan-dev` / `/mvt-update-plan`.
77
76
 
78
- ### Step 9: (session update handled by shared section)
79
- - Standard `skill_history` entry must include `change_id`. All other state mutations are delegated.
77
+ ### Step 9: State Update
78
+ Apply the State Update rules defined in the **State Update** section below.
80
79
 
81
80
  ## Edge Cases & Errors
82
81
 
@@ -73,8 +73,21 @@ sections:
73
73
 
74
74
  - type: shared
75
75
  source: sections/session-update.md
76
+ params:
77
+ current_skill: mvt-implement
76
78
 
77
79
  - type: shared
78
80
  source: sections/footer-next-steps.md
79
81
  params:
80
82
  current_skill: mvt-implement
83
+ conditional_suggestions:
84
+ conditions:
85
+ - condition: "implementation complete, no tests written yet"
86
+ primary: mvt-test
87
+ primary_desc: "Generate tests for the implementation"
88
+ - condition: "implementation deviates from design"
89
+ primary: mvt-review
90
+ primary_desc: "Review code for design compliance"
91
+ - condition: "plan exists with remaining tasks"
92
+ primary: mvt-update-plan
93
+ primary_desc: "Mark current task done and advance to next"
@@ -126,7 +126,7 @@ For each target file, check if it already exists:
126
126
  After writing all files, validate:
127
127
  - `project-context.yaml` is valid YAML with `projects[]` containing at least one entry
128
128
  - Each project entry has required fields: `name`, `path`, `type`, `tech_stack.primary_language`
129
- - `session.yaml` is structurally intact and contains: `session`, `active_change` (with `plan_path` / `has_plan`), `recent_changes` (array), `skill_history`, `recent_actions`
129
+ - `session.yaml` is structurally intact and contains: `session` (with `initialized_at`, `last_synced_at`), `active_change` (with `plan_path`), `changes` (array), `history`
130
130
 
131
131
  If any validation fails → report the specific error and offer to retry or skip.
132
132
 
@@ -135,7 +135,7 @@ If any validation fails → report the specific error and offer to retry or skip
135
135
  When `--refresh` is specified:
136
136
 
137
137
  1. **Preserve** the following from existing files:
138
- - `session.yaml` > `skill_history` and `recent_actions`
138
+ - `session.yaml` > `history`
139
139
  - `project-context.yaml` > any user-added custom fields (fields not in the standard schema)
140
140
  - `config.yaml` > `preferences` section
141
141
 
@@ -75,6 +75,7 @@ sections:
75
75
  - type: shared
76
76
  source: sections/session-update.md
77
77
  params:
78
+ current_skill: mvt-init
78
79
  update_initialized_at: true
79
80
 
80
81
  - type: shared
@@ -173,3 +173,14 @@ At the bottom of the list, optionally surface:
173
173
  - **No edits to framework files**: never write to `.ai-agents/knowledge/core/_framework/`. If user content would land there by accident, redirect to `core/user/`.
174
174
  - **Backups**: before mutating `registry.yaml` or `core/manifest.yaml`, copy them to `.ai-agents/.backup/{filename}-{timestamp}.yaml`.
175
175
  - **Idempotency**: re-running the same `add` (same content + same bindings) should detect the existing entry and offer "skip / overwrite / cancel" rather than silently duplicating.
176
+
177
+ ## Edge Cases & Errors
178
+
179
+ | Case | Handling |
180
+ |------|----------|
181
+ | File path points outside `.ai-agents/knowledge/` | Reject with error: knowledge files must reside under the managed directory tree |
182
+ | `registry.yaml` or `core/manifest.yaml` is malformed (parse error) | Abort the operation; print the parse error; suggest manual fix or restore from `.ai-agents/.backup/` |
183
+ | User attempts to `remove` a core framework file (`core/_framework/*`) | Refuse: framework files are read-only and managed by the installer |
184
+ | `add` target file already exists on disk but has no registry entry | Offer "register existing / overwrite / cancel" instead of blindly writing |
185
+ | `move` destination binding already has an entry with the same id | Prompt for rename or cancel; do not silently overwrite |
186
+ | Disk write fails mid-operation (permission denied, disk full) | Roll back all registry/manifest changes using the backup copies; report partial failure |
@@ -34,8 +34,8 @@ sections:
34
34
  skill: "/mvt-design"
35
35
  - scope: "write implementation code"
36
36
  skill: "/mvt-implement"
37
- - scope: "edit framework knowledge under core/_framework/"
38
- skill: "(Read-only -- framework files are not user-editable)"
37
+ - scope: "edit framework knowledge under core/_framework/ (framework files are read-only)"
38
+ skill: "(constraint)"
39
39
 
40
40
  - type: shared
41
41
  source: sections/activation-load-context.md
@@ -48,7 +48,7 @@ sections:
48
48
 
49
49
  - type: inline
50
50
  content: |
51
- ### Step 3: Pre-flight Checks
51
+ ### Step 4: Pre-flight Checks
52
52
  - No blocking checks required.
53
53
 
54
54
  - type: file
@@ -121,3 +121,14 @@ sections:
121
121
  source: sections/footer-next-steps.md
122
122
  params:
123
123
  current_skill: mvt-manage-context
124
+ conditional_suggestions:
125
+ conditions:
126
+ - condition: "knowledge added or moved"
127
+ primary: mvt-check-context
128
+ primary_desc: "Verify context health after the change"
129
+ - condition: "knowledge removed"
130
+ primary: mvt-check-context
131
+ primary_desc: "Confirm token savings"
132
+ - condition: "large knowledge files detected"
133
+ primary: mvt-cleanup
134
+ primary_desc: "Clean up workspace to reduce context load"
@@ -4,13 +4,15 @@
4
4
 
5
5
  Collect everything that should inform the plan:
6
6
 
7
- 1. Any extra context the user supplies in the current message.
7
+ 1. The analysis artifact at `.ai-agents/workspace/artifacts/{active_change.id}/` (if any).
8
+ 2. The design artifact (if `/mvt-design` was run for this change).
9
+ 3. Any extra context the user supplies in the current message.
8
10
 
9
11
  If no analysis or design artifacts exist and the user provides no description, prompt for a brief scope summary before proceeding.
10
12
 
11
13
  ### Step 2: Detect Regeneration
12
14
 
13
- If `active_change.has_plan == true` AND `.ai-agents/workspace/artifacts/{active_change.id}/plan.yaml` already exists:
15
+ If `active_change.plan_path is non-empty` AND `.ai-agents/workspace/artifacts/{active_change.id}/plan.yaml` already exists:
14
16
 
15
17
  - Read the existing plan.
16
18
  - Show a summary (task count, status counts, current_task).
@@ -26,13 +28,58 @@ Decompose the change with the following constraints. These constraints are AI-fr
26
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). |
27
29
  | Single responsibility | Each task should map to one focused skill invocation (e.g., one `/mvt-implement` for one feature slice). |
28
30
  | Independently verifiable | Each task must have at least one acceptance criterion that a human or test can check. |
29
- | Explicit dependencies | If task B requires output from task A, list `A` in B's `depends_on`. Avoid hidden ordering. |
31
+ | 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. |
30
32
  | No cycles | Dependency graph must be a DAG. Validation will reject cycles. |
31
- | Skill hint | Set `skill_hint` to the skill that will most likely execute the task (`mvt-implement`, `mvt-test`, `mvt-fix`, `mvt-review`, etc.). |
33
+ | 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. |
32
34
 
33
35
  ### Step 4: Assemble plan.yaml
34
36
 
35
- Build the plan object following `docs/plan-yaml-schema.md`:
37
+ Build the plan object following the schema below. Here is a minimal reference sample showing the exact YAML shape to emit:
38
+
39
+ ```yaml
40
+ version: 1
41
+ change_id: "20260531-feature-name"
42
+ title: "Feature Name"
43
+ created_at: "2026-05-31T11:30:00"
44
+ updated_at: "2026-05-31T11:30:00"
45
+ status: in_progress
46
+ current_task: "t1-foundation-layer"
47
+
48
+ tasks:
49
+ - id: "t1-foundation-layer"
50
+ title: "Foundation types and interfaces"
51
+ status: in_progress
52
+ completed_at: null
53
+ depends_on: []
54
+ skill_hint: mvt-implement
55
+ artifacts:
56
+ files:
57
+ - "src/core/types.ts"
58
+ - "src/core/interfaces.ts"
59
+ notes: >
60
+ Define the data contract and shared interfaces.
61
+ Referenced by ADR-2 in the design artifact.
62
+ acceptance:
63
+ - "All new types compile without errors"
64
+ - "tsc clean; existing tests pass"
65
+
66
+ - id: "t2-core-logic"
67
+ title: "Core business logic implementation"
68
+ status: pending
69
+ completed_at: null
70
+ depends_on: ["t1-foundation-layer"]
71
+ skill_hint: mvt-implement
72
+ artifacts: null
73
+ notes: >
74
+ Implement the main processing pipeline using types from t1.
75
+ Must handle partial failures gracefully per design spec.
76
+ acceptance:
77
+ - "Pipeline processes valid input end-to-end"
78
+ - "Partial failures return error object without crashing"
79
+ - "tsc clean; existing tests pass"
80
+ ```
81
+
82
+ #### Top-level fields
36
83
 
37
84
  - `version: 1`
38
85
  - `change_id`: copy from `active_change.id`
@@ -40,19 +87,42 @@ Build the plan object following `docs/plan-yaml-schema.md`:
40
87
  - `created_at`: current ISO 8601 timestamp
41
88
  - `updated_at`: same as `created_at` initially
42
89
  - `status: in_progress`
43
- - `current_task`: the id of the first task that has `depends_on: []` and `status: pending` (or `in_progress` if you mark one as actively in progress)
44
- - `tasks[]`: as decomposed above. Initial task statuses:
45
- - First task → `in_progress`
46
- - All other tasks → `pending`
90
+ - `current_task`: the `id` of the first executable task (a task with `depends_on: []`), set to `in_progress`
91
+
92
+ #### Task fields
93
+
94
+ For each task, populate:
95
+
96
+ - **`id`**: format `t{n}-{kebab-slug}` (e.g., `t1-backend-types`, `t3-dev-panel-ui`). The sequence number reflects natural execution order; keep the slug to 2–5 words.
97
+ - **`title`**: one-line descriptive title.
98
+ - **`status`**: first executable task → `in_progress`; all others → `pending`.
99
+ - **`completed_at`**: `null` for all tasks on initial creation (set by `/mvt-update-plan` when marking `done`).
100
+ - **`depends_on`**: array of task ids. Empty array `[]` means no dependencies.
101
+ - **`skill_hint`**: the skill name (without `/`) that will execute this task.
102
+ - **`artifacts`**: structured object. On initial plan creation, set to `null` or pre-populate with planned target files if known:
103
+ ```yaml
104
+ artifacts:
105
+ files:
106
+ - "src/path/to/expected-file.ts"
107
+ ```
108
+ - **`notes`**: multiline string (use YAML `>` or `|` scalar) containing implementation context — scope description, constraints, references to design decisions or ADRs, key technical considerations. This is the primary guidance that `/mvt-implement` or other skills read when executing the task. Write enough detail that the executing skill can proceed without re-reading the full analysis/design. Keep to 3–8 lines.
109
+ - **`acceptance`**: array of strings. Each entry is a single verifiable assertion. Write criteria that are:
110
+ - **Specific**: "getDiagnostic() returns `{ listening, port, sseClientConnected }`" not "method works correctly"
111
+ - **Testable**: can be checked by a human review, a compiler (`tsc clean`), or an automated test
112
+ - **Independent**: each criterion stands alone; avoid "see above"
113
+ - Always include at least one build/type-check criterion (e.g., `"tsc clean; existing tests pass"`) for implementation tasks
47
114
 
48
115
  ### Step 5: Validate
49
116
 
50
- Before writing, validate the assembled YAML against the schema:
117
+ Before writing, validate the assembled YAML:
51
118
 
52
- - Unique task ids
53
- - All `depends_on` references resolve
54
- - No dependency cycles
55
- - `current_task` references a task with status `pending` or `in_progress`
119
+ 1. **Unique IDs** — no two tasks share the same `id`
120
+ 2. **Valid references** — every `depends_on` entry references an existing task `id`
121
+ 3. **No cycles** — the dependency graph is a DAG
122
+ 4. **current_task validity** — references a task with status `pending` or `in_progress`
123
+ 5. **Acceptance required** — every task has at least one acceptance criterion
124
+ 6. **Single in_progress** — at most one task has status `in_progress`
125
+ 7. **completed_at consistency** — must be `null` for all non-done tasks
56
126
 
57
127
  If validation fails, revise the plan and re-validate (do NOT write a broken plan).
58
128
 
@@ -64,12 +134,23 @@ If a previous `plan.yaml` exists and the user chose regeneration in Step 2, over
64
134
 
65
135
  ### Step 7: Update Session State
66
136
 
67
- Apply the standard State Update rules (see shared section above) AND the plan-dev-specific updates:
68
-
69
- - `active_change.plan_path` -> the new file path
70
- - `active_change.has_plan` -> `true`
71
- - `recent_changes[]` -> upsert an entry for this change (refresh `last_updated`)
137
+ Apply the standard State Update rules (see State Update section below).
72
138
 
73
139
  ### Step 8: Output
74
140
 
75
- Render the result via the plan-dev output template, including a tabular summary of all tasks with their initial status and the `current_task` highlight. Surface the schema location so users know how to read or hand-edit it later.
141
+ Render an inline summary (no external template). Structure:
142
+
143
+ ```markdown
144
+ ## Development Plan: {title}
145
+
146
+ **Change**: `{change_id}`
147
+ **Tasks**: {total_count} | **Status**: {status}
148
+
149
+ ### Task Breakdown
150
+
151
+ | # | id | title | status | skill | depends_on |
152
+ |---|----|----|--------|-------|------------|
153
+ | 1 | {id} | {title} | {status} | {skill_hint} | {deps_or_"—"} |
154
+ | ... |
155
+
156
+ ```