@uoyo/mvtt 2.0.0-beta.1 → 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 (84) hide show
  1. package/README.md +184 -193
  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/registry.yaml +6 -0
  12. package/sources/defaults/config.yaml +7 -7
  13. package/sources/defaults/session.yaml +9 -16
  14. package/sources/scripts/session-update.js +351 -0
  15. package/sources/sections/activation-load-context.md +4 -0
  16. package/sources/sections/footer-next-steps.md +1 -1
  17. package/sources/sections/output-language-constraint.md +11 -11
  18. package/sources/sections/session-update.md +115 -47
  19. package/sources/skills/mvt-analyze/business.md +7 -7
  20. package/sources/skills/mvt-analyze/manifest.yaml +1 -0
  21. package/sources/skills/mvt-analyze-code/manifest.yaml +110 -96
  22. package/sources/skills/mvt-bug-detect/business.md +99 -0
  23. package/sources/skills/mvt-bug-detect/manifest.yaml +84 -0
  24. package/sources/skills/mvt-check-context/business.md +3 -5
  25. package/sources/skills/mvt-check-context/manifest.yaml +70 -63
  26. package/sources/skills/mvt-cleanup/business.md +49 -23
  27. package/sources/skills/mvt-cleanup/manifest.yaml +15 -10
  28. package/sources/skills/mvt-config/business.md +1 -2
  29. package/sources/skills/mvt-config/manifest.yaml +103 -96
  30. package/sources/skills/mvt-create-skill/business.md +84 -76
  31. package/sources/skills/mvt-create-skill/manifest.yaml +107 -95
  32. package/sources/skills/mvt-design/business.md +3 -6
  33. package/sources/skills/mvt-design/manifest.yaml +109 -96
  34. package/sources/skills/mvt-fix/business.md +39 -9
  35. package/sources/skills/mvt-fix/manifest.yaml +88 -72
  36. package/sources/skills/mvt-help/business.md +2 -4
  37. package/sources/skills/mvt-help/manifest.yaml +75 -67
  38. package/sources/skills/mvt-implement/business.md +4 -5
  39. package/sources/skills/mvt-implement/manifest.yaml +93 -80
  40. package/sources/skills/mvt-init/business.md +2 -2
  41. package/sources/skills/mvt-init/manifest.yaml +102 -101
  42. package/sources/skills/mvt-manage-context/business.md +186 -175
  43. package/sources/skills/mvt-manage-context/manifest.yaml +134 -123
  44. package/sources/skills/mvt-plan-dev/business.md +101 -20
  45. package/sources/skills/mvt-plan-dev/manifest.yaml +90 -91
  46. package/sources/skills/mvt-quick-dev/business.md +2 -1
  47. package/sources/skills/mvt-quick-dev/manifest.yaml +84 -69
  48. package/sources/skills/mvt-refactor/business.md +2 -1
  49. package/sources/skills/mvt-refactor/manifest.yaml +104 -86
  50. package/sources/skills/mvt-resume/business.md +28 -68
  51. package/sources/skills/mvt-resume/manifest.yaml +81 -71
  52. package/sources/skills/mvt-review/business.md +3 -3
  53. package/sources/skills/mvt-review/manifest.yaml +108 -87
  54. package/sources/skills/mvt-status/business.md +14 -18
  55. package/sources/skills/mvt-status/manifest.yaml +74 -66
  56. package/sources/skills/mvt-sync-context/business.md +155 -150
  57. package/sources/skills/mvt-sync-context/manifest.yaml +99 -96
  58. package/sources/skills/mvt-template/business.md +0 -2
  59. package/sources/skills/mvt-template/manifest.yaml +68 -63
  60. package/sources/skills/mvt-test/business.md +3 -3
  61. package/sources/skills/mvt-test/manifest.yaml +115 -102
  62. package/sources/skills/mvt-update-plan/business.md +83 -72
  63. package/sources/skills/mvt-update-plan/manifest.yaml +124 -132
  64. package/sources/templates/analyze-output/body.md +15 -15
  65. package/sources/templates/design-output/body.md +17 -17
  66. package/sources/templates/implement-output/body.md +11 -11
  67. package/sources/templates/review-output/body.md +11 -11
  68. package/sources/templates/test-output/body.md +7 -7
  69. package/dist/build/plan-validator.d.ts +0 -26
  70. package/dist/build/plan-validator.d.ts.map +0 -1
  71. package/dist/build/plan-validator.js +0 -225
  72. package/dist/build/plan-validator.js.map +0 -1
  73. package/dist/commands/build.d.ts +0 -5
  74. package/dist/commands/build.d.ts.map +0 -1
  75. package/dist/commands/build.js +0 -46
  76. package/dist/commands/build.js.map +0 -1
  77. package/dist/commands/migrate.d.ts +0 -18
  78. package/dist/commands/migrate.d.ts.map +0 -1
  79. package/dist/commands/migrate.js +0 -163
  80. package/dist/commands/migrate.js.map +0 -1
  81. package/dist/fs/protection.d.ts +0 -15
  82. package/dist/fs/protection.d.ts.map +0 -1
  83. package/dist/fs/protection.js +0 -16
  84. package/dist/fs/protection.js.map +0 -1
@@ -1,86 +1,104 @@
1
- name: mvt-refactor
2
- output: .claude/skills/mvt-refactor/SKILL.md
3
-
4
- frontmatter:
5
- name: mvt-refactor
6
- description: "Refactor existing code while preserving behavior. This skill should be used when user wants to improve code structure, rename symbols, extract methods or classes, or reorganize code without changing functionality."
7
-
8
- sections:
9
- - type: inline
10
- content: |
11
- # MVT Refactor
12
-
13
- ## Purpose
14
-
15
- Refactor existing code while preserving observable behavior. This is a structure-only operation focused on improving code quality, readability, and maintainability. This is a shortcut operation that can run at any time.
16
-
17
- - type: shared
18
- source: sections/role-header.md
19
- params:
20
- role: Developer
21
- role_desc: "an Implementation Specialist"
22
- decision_rules:
23
- - rule: "Refactoring target specified -> Analyze and plan the refactoring"
24
- - rule: "No target specified -> Prompt user for refactoring target"
25
- - rule: "Risk level is High -> Warn user and require explicit confirmation"
26
- - rule: "Tests exist for target code -> Recommend running them after refactoring"
27
- - rule: "No tests exist -> Describe how to verify behavior is unchanged"
28
- - rule: "Change requires new module not in design -> Flag for Architect"
29
- boundaries:
30
- - scope: "re-analyze requirements"
31
- skill: "/mvt-analyze"
32
- - scope: "evaluate architecture"
33
- skill: "/mvt-design"
34
- - scope: "review own code"
35
- skill: "/mvt-review"
36
-
37
- - type: inline
38
- content: |
39
- ### Constraints
40
- - Do NOT change observable behavior -- refactoring is structure-only
41
- - Do NOT introduce new features during refactoring
42
- - Do NOT modify unrelated code outside the refactoring scope
43
-
44
- ## Refactoring Types
45
-
46
- | Type | Risk Level | Examples |
47
- |------|------------|----------|
48
- | Rename | Low | Variable, function, file rename |
49
- | Extract Method/Class | Low | Pull repeated logic into a helper |
50
- | Inline | Low | Eliminate a thin wrapper |
51
- | Move | Medium | Relocate code to appropriate module/layer |
52
- | Decompose Conditional | Medium | Simplify complex if/switch logic |
53
- | Replace Inheritance with Composition | High | Class-hierarchy redesign |
54
- | Change Interface/API | High | Modify public contracts |
55
-
56
- - type: shared
57
- source: sections/activation-load-context.md
58
- params:
59
- extended_context:
60
- - "Related source files to be refactored"
61
-
62
- - type: shared
63
- source: sections/activation-load-config.md
64
-
65
- - type: shared
66
- source: sections/output-language-constraint.md
67
-
68
- - type: inline
69
- content: |
70
- ### Step 3: Pre-flight Checks
71
- - No blocking checks required (shortcut operation).
72
-
73
- ### Shortcut Operation Rules
74
- - Can execute at any time without checking workflow prerequisites
75
-
76
- - type: file
77
- source: ./business.md
78
-
79
-
80
- - type: shared
81
- source: sections/session-update.md
82
-
83
- - type: shared
84
- source: sections/footer-next-steps.md
85
- params:
86
- current_skill: mvt-refactor
1
+ name: mvt-refactor
2
+ output: .claude/skills/mvt-refactor/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-refactor
6
+ description: "Refactor existing code while preserving behavior. This skill should be used when user wants to improve code structure, rename symbols, extract methods or classes, or reorganize code without changing functionality."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Refactor
12
+
13
+ ## Purpose
14
+
15
+ Refactor existing code while preserving observable behavior. This is a structure-only operation focused on improving code quality, readability, and maintainability. This is a shortcut operation that can run at any time.
16
+
17
+ - type: shared
18
+ source: sections/role-header.md
19
+ params:
20
+ role: Developer
21
+ role_desc: "an Implementation Specialist"
22
+ decision_rules:
23
+ - rule: "Refactoring target specified -> Analyze and plan the refactoring"
24
+ - rule: "No target specified -> Prompt user for refactoring target"
25
+ - rule: "Risk level is High -> Warn user and require explicit confirmation"
26
+ - rule: "Tests exist for target code -> Recommend running them after refactoring"
27
+ - rule: "No tests exist -> Describe how to verify behavior is unchanged"
28
+ - rule: "Change requires new module not in design -> Flag for Architect"
29
+ boundaries:
30
+ - scope: "re-analyze requirements"
31
+ skill: "/mvt-analyze"
32
+ - scope: "evaluate architecture"
33
+ skill: "/mvt-design"
34
+ - scope: "review own code"
35
+ skill: "/mvt-review"
36
+
37
+ - type: inline
38
+ content: |
39
+ ### Constraints
40
+ - Do NOT change observable behavior -- refactoring is structure-only
41
+ - Do NOT introduce new features during refactoring
42
+ - Do NOT modify unrelated code outside the refactoring scope
43
+
44
+ ## Refactoring Types
45
+
46
+ | Type | Risk Level | Examples |
47
+ |------|------------|----------|
48
+ | Rename | Low | Variable, function, file rename |
49
+ | Extract Method/Class | Low | Pull repeated logic into a helper |
50
+ | Inline | Low | Eliminate a thin wrapper |
51
+ | Move | Medium | Relocate code to appropriate module/layer |
52
+ | Decompose Conditional | Medium | Simplify complex if/switch logic |
53
+ | Replace Inheritance with Composition | High | Class-hierarchy redesign |
54
+ | Change Interface/API | High | Modify public contracts |
55
+
56
+ - type: shared
57
+ source: sections/activation-load-context.md
58
+ params:
59
+ extended_context:
60
+ - "Related source files to be refactored"
61
+
62
+ - type: shared
63
+ source: sections/activation-load-config.md
64
+
65
+ - type: shared
66
+ source: sections/output-language-constraint.md
67
+
68
+ - type: inline
69
+ content: |
70
+ ### Step 4: Pre-flight Checks
71
+ - No blocking checks required (shortcut operation).
72
+
73
+ - type: inline
74
+ content: |
75
+ ## Operation Mode: Shortcut
76
+
77
+ This skill operates as a shortcut — it can execute at any time without checking workflow prerequisites.
78
+ - Do NOT update `active_change` fields.
79
+ - Write a `history` entry only (via State Update).
80
+
81
+ - type: file
82
+ source: ./business.md
83
+
84
+
85
+ - type: shared
86
+ source: sections/session-update.md
87
+ params:
88
+ current_skill: mvt-refactor
89
+
90
+ - type: shared
91
+ source: sections/footer-next-steps.md
92
+ params:
93
+ current_skill: mvt-refactor
94
+ conditional_suggestions:
95
+ conditions:
96
+ - condition: "refactoring complete, tests exist"
97
+ primary: mvt-test
98
+ primary_desc: "Run tests to verify behavior is preserved"
99
+ - condition: "refactoring complete, no tests exist"
100
+ primary: mvt-review
101
+ primary_desc: "Review the refactored code"
102
+ - condition: "refactoring revealed design issues"
103
+ primary: mvt-design
104
+ primary_desc: "Redesign the affected module"
@@ -3,31 +3,29 @@
3
3
  ### Step 1: Read Session State
4
4
 
5
5
  Extract from the already-loaded session context:
6
- - `active_change` -- the current change-id (if any), its phase, plan_path, has_plan
7
- - `recent_changes` -- list of changes with active plans
8
- - `skill_history` -- last 10 entries (skill name, timestamp, status, change_id)
9
- - `recent_actions` -- last 5 entries (what was done, when, outcome)
10
- - `last_command` and `last_skill` -- most recent invocation
6
+ - `active_change` -- the current change-id (if any), plan_path
7
+ - `changes` -- list of changes with active plans
8
+ - `history` -- last 20 entries (skill name, timestamp, change_id)
11
9
 
12
- If session.yaml is missing or empty, jump to Step 6 with the "no session" branch.
10
+ If session.yaml is missing or empty, jump to Step 8 with the "no session" branch.
13
11
 
14
- ### Step 1.5: Discover Pending Plans
12
+ ### Step 2: Discover Pending Plans
15
13
 
16
14
  Scan for in-progress plans using two sources:
17
15
 
18
- 1. **Index path**: For each entry in `recent_changes[]`, read its `plan_path` if the file exists.
19
- 2. **Fallback scan**: Glob `.ai-agents/workspace/artifacts/*/plan.yaml`, read any files not already covered by (1).
16
+ 1. **Index path**: For each entry in `changes[]`, read its `plan_path` if the file exists.
17
+ 2. **Fallback scan**: Glob `.ai-agents/workspace/artifacts/*/plan.yaml`, read any files not already covered by (1). **Skip any paths under `artifacts/_archived/`** — those are completed changes archived by `/mvt-cleanup` and should not appear as resume candidates.
20
18
 
21
19
  For each found plan.yaml, read and filter:
22
20
  - Include only plans where `plan.status == "in_progress"`.
23
21
  - Capture: `change_id`, `title`, task progress (`done_count / total_count`), `updated_at`.
24
22
  - Sort candidates by `updated_at` descending.
25
23
 
26
- ### Step 1.6: Select Target Change
24
+ ### Step 3: Select Target Change
27
25
 
28
26
  | Candidates | Behavior |
29
27
  |------------|----------|
30
- | 0 | Skip to Step 2 use legacy `active_change` / `skill_history` flow (no plan context). |
28
+ | 0 | Jump to Step 8 with the "no plans" edge case report no active plans and suggest `/mvt-plan-dev` or `/mvt-analyze`. |
31
29
  | 1 | Auto-select. Print: "Found one active plan: **{title}** ({progress}). Resuming." |
32
30
  | ≥2 | **Pause and prompt**. Display candidate table and wait for user input. |
33
31
 
@@ -36,9 +34,9 @@ For each found plan.yaml, read and filter:
36
34
  ```
37
35
  Found {N} active plans. Select which to resume:
38
36
 
39
- | # | change-id | title | progress | last_updated |
40
- |---|-----------|-------|----------|--------------|
41
- | 1 | {id} | {t} | {d}/{n} | {relative} |
37
+ | # | change-id | title | progress | updated_at |
38
+ |---|-----------|-------|----------|------------|
39
+ | 1 | {id} | {t} | {d}/{n} | {relative} |
42
40
  | ...
43
41
 
44
42
  Enter a number, a change-id, or "none" to skip plan context:
@@ -46,62 +44,25 @@ Enter a number, a change-id, or "none" to skip plan context:
46
44
 
47
45
  **Explicit argument override**: If the user invoked `/mvt-resume {change-id}`, use that change-id directly — skip the table, locate and load its plan.yaml (error if not found or not in_progress).
48
46
 
49
- After selection, set `selected_change_id` for use in subsequent steps. If "none" or 0 candidates, `selected_change_id = null`.
47
+ After selection, set `selected_change_id` for use in subsequent steps.
50
48
 
51
- ### Step 2: Inspect Recent Artifacts
49
+ ### Step 4: Inspect Recent Artifacts
52
50
 
53
- If `selected_change_id` is set:
54
- - List files under `.ai-agents/workspace/artifacts/{selected_change_id}/`, sorted by mtime descending
51
+ List files under `.ai-agents/workspace/artifacts/{selected_change_id}/`, sorted by mtime descending:
55
52
  - Exclude `plan.yaml` from the artifact list (it gets its own section)
56
53
  - Take the top 5
57
54
 
58
- Else if `active_change.id` is set (no-plan fallback):
59
- - List files under `.ai-agents/workspace/artifacts/{active_change.id}/`, sorted by mtime descending
60
- - Take the top 5
61
-
62
- Otherwise:
63
- - List all files under `.ai-agents/workspace/artifacts/` (recursive), sorted by mtime descending
64
- - Take the top 5
65
-
66
55
  For each artifact, capture: file path, mtime, size (in tokens estimate = chars / 4), and the change-id it belongs to.
67
56
 
68
- ### Step 3: Determine Resume Point
69
-
70
- **Plan-aware path** (when `selected_change_id` has a valid plan.yaml):
57
+ ### Step 5: Determine Resume Point
71
58
 
72
59
  Read the plan's `current_task`. The resume point = that task. Next-step recommendation = the task's `skill_hint` (or infer from task title if skill_hint is absent).
73
60
 
74
- Also filter `skill_history` to entries matching `change_id == selected_change_id` (entries with empty change_id are excluded from this filtered view).
75
-
76
- **Legacy path** (no plan):
77
-
78
- Pick the **resume point** by precedence:
79
-
80
- | Condition | Resume point | Phase label |
81
- |-----------|--------------|-------------|
82
- | `active_change` is set with non-empty `phase` | `{active_change.phase}` | from session |
83
- | `active_change` is set without phase | inferred from last skill in history | inferred |
84
- | `skill_history[0]` exists | last skill | last skill |
85
- | Nothing | `none` | new project |
86
-
87
- Map skill -> next-step recommendation:
88
-
89
- | Last skill | Suggested next |
90
- |-----------|----------------|
91
- | mvt-init | mvt-analyze-code (if has code) or mvt-analyze (if requirements available) |
92
- | mvt-analyze | mvt-design |
93
- | mvt-analyze-code | mvt-analyze (if requirements pending) or mvt-design |
94
- | mvt-design | mvt-plan-dev (if change is large) or mvt-implement |
95
- | mvt-implement | mvt-review |
96
- | mvt-review | mvt-fix (if findings) or mvt-test |
97
- | mvt-fix | mvt-review (re-review) or mvt-test |
98
- | mvt-test | mvt-cleanup or next change |
99
- | mvt-cleanup | new change via mvt-analyze |
100
- | (other) | mvt-status |
61
+ Also filter `history` to entries matching `change_id == selected_change_id` (entries with empty change_id are excluded from this filtered view).
101
62
 
102
- ### Step 4: Load Plan Progress (plan-aware path only)
63
+ ### Step 6: Load Plan Progress
103
64
 
104
- If `selected_change_id` has a plan, generate the **Plan Progress** section:
65
+ Generate the **Plan Progress** section:
105
66
 
106
67
  - Read all tasks from plan.yaml.
107
68
  - Build a compact status table: `| # | id | title | status | skill_hint |`
@@ -116,22 +77,21 @@ And the **Current Task Detail** section:
116
77
  - `notes` (if non-empty)
117
78
  - `skill_hint` -> recommendation
118
79
 
119
- ### Step 5: Generate Resume Report
80
+ ### Step 7: Generate Resume Report
120
81
 
121
82
  Render via the `resume-output.md` template. Sections to fill:
122
83
 
123
- 1. **Active Task** -- name, change-id, phase, started_at (from active_change or selected plan)
124
- 2. **Plan Progress** -- (only when plan exists) task table + counts + current task detail
125
- 3. **Recent Skill History** -- last 5 entries from skill_history (filtered to selected change if applicable)
126
- 4. **Recent Artifacts** -- the top 5 artifacts collected in Step 2 (path, mtime, size)
84
+ 1. **Active Task** -- name, change-id, started_at (from selected plan)
85
+ 2. **Plan Progress** -- task table + counts + current task detail
86
+ 3. **Recent Skill History** -- last 5 entries from history (filtered to selected change if applicable)
87
+ 4. **Recent Artifacts** -- the top 5 artifacts collected in Step 4 (path, mtime, size)
127
88
  5. **Resume Point** -- a one-paragraph natural-language summary of "where we are"
128
- 6. **Recommended Next Step** -- the mapped next skill from Step 3, with justification
89
+ 6. **Recommended Next Step** -- the mapped next skill from Step 5, with justification
129
90
 
130
- ### Step 6: Edge Cases
91
+ ### Step 8: Edge Cases
131
92
 
132
93
  - **No session**: report "No session found. Run `/mvt-init` to start a project."
133
- - **No active_change AND no history AND no plans**: report "No active task. Suggested entry points: `/mvt-init`, `/mvt-analyze`, `/mvt-status`."
134
- - **active_change set but referenced artifacts missing**: warn "Artifact directory `{path}` not found -- task state may be stale. Verify with `/mvt-status` or run `/mvt-cleanup`."
135
- - **Last skill ended in failure** (skill_history entry status=failed): surface the failure summary first, suggest retry of that skill rather than advancing.
94
+ - **No active plans**: report "No active plans found. Start a new change with `/mvt-analyze` or run `/mvt-status` to check project state."
95
+ - **Selected change but referenced artifacts missing**: warn "Artifact directory `{path}` not found -- task state may be stale. Verify with `/mvt-status` or run `/mvt-cleanup`."
136
96
  - **Plan exists but plan.yaml is invalid** (parse error or schema violation): warn "plan.yaml is corrupted or invalid. Run `/mvt-plan-dev` to regenerate, or `/mvt-status` to inspect."
137
97
  - **Stale task warning**: If plan's `current_task` has status `in_progress` but the plan's `updated_at` is more than 5 days old, append a notice: "Current task has been in_progress for {N} days without updates. Consider running `/mvt-update-plan` to refresh status."
@@ -1,71 +1,81 @@
1
- name: mvt-resume
2
- output: .claude/skills/mvt-resume/SKILL.md
3
-
4
- frontmatter:
5
- name: mvt-resume
6
- description: "Resume an in-progress development task in a new conversation. Reads session.yaml (active_change, skill_history, recent_actions) and recent artifacts to reconstruct context. Does not read git state."
7
-
8
- sections:
9
- - type: inline
10
- content: |
11
- # MVT Resume
12
-
13
- ## Purpose
14
-
15
- Reconstruct an in-progress development task in a fresh conversation by replaying state from `session.yaml`, recent artifacts, and plan.yaml (if one exists). When multiple plans are in-flight, prompt the user to select which change to resume. Use this skill at the start of a new conversation to pick up exactly where the last session left off.
16
-
17
- ## Arguments
18
-
19
- | Argument | Required | Description |
20
- |----------|----------|-------------|
21
- | `{change-id}` | No | Directly resume a specific change (skips candidate selection). Error if not found or not in_progress. |
22
-
23
- - type: shared
24
- source: sections/role-header.md
25
- params:
26
- role: Conductor
27
- role_desc: "a Workflow Coordinator"
28
- decision_rules:
29
- - rule: "Multiple in_progress plans found -> Pause and display candidate table, wait for user selection"
30
- - rule: "Exactly one in_progress plan found -> Auto-select it and proceed"
31
- - rule: "No plans found BUT active_change is set -> Fall back to legacy skill_history-based resume"
32
- - rule: "active_change is empty AND skill_history is empty AND no plans -> Recommend `/mvt-init` or `/mvt-status`"
33
- - rule: "Plan exists and has current_task -> Use current_task's skill_hint as next-step recommendation"
34
- - rule: "Plan's current_task has been in_progress for >5 days -> Surface stale warning"
35
- - rule: "Last skill failed or was interrupted -> Surface the failure context, suggest retry"
36
- boundaries:
37
- - scope: "read git state (branch, diff, commits)"
38
- skill: "(Out of scope -- this skill is session-state only)"
39
- - scope: "modify any files"
40
- skill: "(Read-only)"
41
- - scope: "run analyses or tests"
42
- skill: "(Use the recommended next skill)"
43
-
44
- - type: shared
45
- source: sections/activation-load-context.md
46
-
47
- - type: shared
48
- source: sections/activation-load-config.md
49
-
50
- - type: shared
51
- source: sections/output-language-constraint.md
52
-
53
- - type: shared
54
- source: sections/activation-preflight.md
55
- params:
56
- checks:
57
- - order: "1"
58
- field: "session.initialized_at"
59
- level: "WARN"
60
- message: "Session not initialized. Run `/mvt-init` first."
61
-
62
- - type: file
63
- source: ./business.md
64
-
65
- - type: shared
66
- source: sections/session-update.md
67
-
68
- - type: shared
69
- source: sections/footer-next-steps.md
70
- params:
71
- current_skill: mvt-resume
1
+ name: mvt-resume
2
+ output: .claude/skills/mvt-resume/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-resume
6
+ description: "Resume an in-progress development task in a new conversation. Reads session.yaml (active_change, history) and recent artifacts to reconstruct context. Does not read git state."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Resume
12
+
13
+ ## Purpose
14
+
15
+ Reconstruct an in-progress development task in a fresh conversation by replaying state from `session.yaml`, recent artifacts, and plan.yaml (if one exists). When multiple plans are in-flight, prompt the user to select which change to resume. Use this skill at the start of a new conversation to pick up exactly where the last session left off.
16
+
17
+ ## Arguments
18
+
19
+ | Argument | Required | Description |
20
+ |----------|----------|-------------|
21
+ | `{change-id}` | No | Directly resume a specific change (skips candidate selection). Error if not found or not in_progress. |
22
+
23
+ - type: shared
24
+ source: sections/role-header.md
25
+ params:
26
+ role: Conductor
27
+ role_desc: "a Workflow Coordinator"
28
+ decision_rules:
29
+ - rule: "Multiple in_progress plans found -> Pause and display candidate table, wait for user selection"
30
+ - rule: "Exactly one in_progress plan found -> Auto-select it and proceed"
31
+ - rule: "No plans found -> Report no active plans, suggest `/mvt-analyze` or `/mvt-plan-dev`"
32
+ - rule: "active_change is empty AND history is empty AND no plans -> Recommend `/mvt-init` or `/mvt-status`"
33
+ - rule: "Plan exists and has current_task -> Use current_task's skill_hint as next-step recommendation"
34
+ - rule: "Plan's current_task has been in_progress for >5 days -> Surface stale warning"
35
+ - rule: "Last skill was interrupted -> Surface the context, suggest retry"
36
+ boundaries:
37
+ - scope: "read git state (branch, diff, commits)"
38
+ skill: "(Out of scope -- this skill is session-state only)"
39
+ - scope: "modify any files"
40
+ skill: "(Read-only)"
41
+ - scope: "run analyses or tests"
42
+ skill: "(Use the recommended next skill)"
43
+
44
+ - type: shared
45
+ source: sections/activation-load-context.md
46
+
47
+ - type: shared
48
+ source: sections/activation-load-config.md
49
+
50
+ - type: shared
51
+ source: sections/activation-preflight.md
52
+ params:
53
+ checks:
54
+ - order: "1"
55
+ field: "session.initialized_at"
56
+ level: "WARN"
57
+ message: "Session not initialized. Run `/mvt-init` first."
58
+
59
+ - type: file
60
+ source: ./business.md
61
+
62
+ - type: shared
63
+ source: sections/session-update.md
64
+ params:
65
+ read_only: true
66
+
67
+ - type: shared
68
+ source: sections/footer-next-steps.md
69
+ params:
70
+ current_skill: mvt-resume
71
+ conditional_suggestions:
72
+ conditions:
73
+ - condition: "plan has current_task with skill_hint"
74
+ primary: mvt-implement
75
+ primary_desc: "Continue with the next planned task (use skill_hint)"
76
+ - condition: "no active plans found"
77
+ primary: mvt-analyze
78
+ primary_desc: "Start a new feature"
79
+ - condition: "plan stale (>5 days without updates)"
80
+ primary: mvt-update-plan
81
+ primary_desc: "Refresh plan status before continuing"
@@ -81,8 +81,7 @@
81
81
  - Each finding must include: file, line range, severity, observation, recommendation.
82
82
 
83
83
  ### Step 6: Write Artifact
84
- - **Path**: `.ai-agents/workspace/artifacts/{active_change.id}/review.md` if `active_change` exists; else `.ai-agents/workspace/artifacts/_ad-hoc-review-{YYYY-MM-DD-HHMM}/review.md`.
85
- - **Template**: `.ai-agents/skills/_templates/review-output.md` (custom override at `_templates/custom/...` takes precedence).
84
+ - **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`.
86
85
  - **Required content** (mapped to template headings):
87
86
  - `Review Scope` -- file list, depth, aspect filter, fallbacks applied (e.g., "design.md missing -> Group A skipped").
88
87
  - `Summary` -- counts per severity + one-paragraph overall verdict (Approve / Approve with comments / Request changes / Block).
@@ -98,7 +97,8 @@
98
97
  - Critical = 0, Warnings <= 5, Suggestions only -> verdict is `Approve`.
99
98
  - Code-only review (design.md missing) -> verdict cannot be higher than `Approve with comments` (call it out explicitly).
100
99
 
101
- ### Step 8: (session update handled by shared section)
100
+ ### Step 8: State Update
101
+ Apply the State Update rules defined in the **State Update** section below.
102
102
 
103
103
  ## Edge Cases & Errors
104
104