@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.
- package/README.md +184 -193
- package/dist/build/section-loader.d.ts.map +1 -1
- package/dist/build/section-loader.js +18 -8
- package/dist/build/section-loader.js.map +1 -1
- package/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +5 -0
- package/dist/fs/materialize.js.map +1 -1
- package/dist/scripts/session-update.cjs +7568 -0
- package/install-manifest.yaml +2 -0
- package/package.json +3 -2
- package/registry.yaml +6 -0
- package/sources/defaults/config.yaml +7 -7
- package/sources/defaults/session.yaml +9 -16
- package/sources/scripts/session-update.js +351 -0
- package/sources/sections/activation-load-context.md +4 -0
- package/sources/sections/footer-next-steps.md +1 -1
- package/sources/sections/output-language-constraint.md +11 -11
- package/sources/sections/session-update.md +115 -47
- package/sources/skills/mvt-analyze/business.md +7 -7
- package/sources/skills/mvt-analyze/manifest.yaml +1 -0
- package/sources/skills/mvt-analyze-code/manifest.yaml +110 -96
- package/sources/skills/mvt-bug-detect/business.md +99 -0
- package/sources/skills/mvt-bug-detect/manifest.yaml +84 -0
- package/sources/skills/mvt-check-context/business.md +3 -5
- package/sources/skills/mvt-check-context/manifest.yaml +70 -63
- package/sources/skills/mvt-cleanup/business.md +49 -23
- package/sources/skills/mvt-cleanup/manifest.yaml +15 -10
- package/sources/skills/mvt-config/business.md +1 -2
- package/sources/skills/mvt-config/manifest.yaml +103 -96
- package/sources/skills/mvt-create-skill/business.md +84 -76
- package/sources/skills/mvt-create-skill/manifest.yaml +107 -95
- package/sources/skills/mvt-design/business.md +3 -6
- package/sources/skills/mvt-design/manifest.yaml +109 -96
- package/sources/skills/mvt-fix/business.md +39 -9
- package/sources/skills/mvt-fix/manifest.yaml +88 -72
- package/sources/skills/mvt-help/business.md +2 -4
- package/sources/skills/mvt-help/manifest.yaml +75 -67
- package/sources/skills/mvt-implement/business.md +4 -5
- package/sources/skills/mvt-implement/manifest.yaml +93 -80
- package/sources/skills/mvt-init/business.md +2 -2
- package/sources/skills/mvt-init/manifest.yaml +102 -101
- package/sources/skills/mvt-manage-context/business.md +186 -175
- package/sources/skills/mvt-manage-context/manifest.yaml +134 -123
- package/sources/skills/mvt-plan-dev/business.md +101 -20
- package/sources/skills/mvt-plan-dev/manifest.yaml +90 -91
- package/sources/skills/mvt-quick-dev/business.md +2 -1
- package/sources/skills/mvt-quick-dev/manifest.yaml +84 -69
- package/sources/skills/mvt-refactor/business.md +2 -1
- package/sources/skills/mvt-refactor/manifest.yaml +104 -86
- package/sources/skills/mvt-resume/business.md +28 -68
- package/sources/skills/mvt-resume/manifest.yaml +81 -71
- package/sources/skills/mvt-review/business.md +3 -3
- package/sources/skills/mvt-review/manifest.yaml +108 -87
- package/sources/skills/mvt-status/business.md +14 -18
- package/sources/skills/mvt-status/manifest.yaml +74 -66
- package/sources/skills/mvt-sync-context/business.md +155 -150
- package/sources/skills/mvt-sync-context/manifest.yaml +99 -96
- package/sources/skills/mvt-template/business.md +0 -2
- package/sources/skills/mvt-template/manifest.yaml +68 -63
- package/sources/skills/mvt-test/business.md +3 -3
- package/sources/skills/mvt-test/manifest.yaml +115 -102
- package/sources/skills/mvt-update-plan/business.md +83 -72
- package/sources/skills/mvt-update-plan/manifest.yaml +124 -132
- package/sources/templates/analyze-output/body.md +15 -15
- package/sources/templates/design-output/body.md +17 -17
- package/sources/templates/implement-output/body.md +11 -11
- package/sources/templates/review-output/body.md +11 -11
- package/sources/templates/test-output/body.md +7 -7
- package/dist/build/plan-validator.d.ts +0 -26
- package/dist/build/plan-validator.d.ts.map +0 -1
- package/dist/build/plan-validator.js +0 -225
- package/dist/build/plan-validator.js.map +0 -1
- package/dist/commands/build.d.ts +0 -5
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -46
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/migrate.d.ts +0 -18
- package/dist/commands/migrate.d.ts.map +0 -1
- package/dist/commands/migrate.js +0 -163
- package/dist/commands/migrate.js.map +0 -1
- package/dist/fs/protection.d.ts +0 -15
- package/dist/fs/protection.d.ts.map +0 -1
- package/dist/fs/protection.js +0 -16
- 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
|
|
71
|
-
- No blocking checks required (shortcut operation).
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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),
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
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
|
|
10
|
+
If session.yaml is missing or empty, jump to Step 8 with the "no session" branch.
|
|
13
11
|
|
|
14
|
-
### Step
|
|
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 `
|
|
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
|
|
24
|
+
### Step 3: Select Target Change
|
|
27
25
|
|
|
28
26
|
| Candidates | Behavior |
|
|
29
27
|
|------------|----------|
|
|
30
|
-
| 0 |
|
|
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 |
|
|
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.
|
|
47
|
+
After selection, set `selected_change_id` for use in subsequent steps.
|
|
50
48
|
|
|
51
|
-
### Step
|
|
49
|
+
### Step 4: Inspect Recent Artifacts
|
|
52
50
|
|
|
53
|
-
|
|
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
|
|
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 `
|
|
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
|
|
63
|
+
### Step 6: Load Plan Progress
|
|
103
64
|
|
|
104
|
-
|
|
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
|
|
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,
|
|
124
|
-
2. **Plan Progress** --
|
|
125
|
-
3. **Recent Skill History** -- last 5 entries from
|
|
126
|
-
4. **Recent Artifacts** -- the top 5 artifacts collected in Step
|
|
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
|
|
89
|
+
6. **Recommended Next Step** -- the mapped next skill from Step 5, with justification
|
|
129
90
|
|
|
130
|
-
### Step
|
|
91
|
+
### Step 8: Edge Cases
|
|
131
92
|
|
|
132
93
|
- **No session**: report "No session found. Run `/mvt-init` to start a project."
|
|
133
|
-
- **No
|
|
134
|
-
- **
|
|
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,
|
|
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
|
|
32
|
-
- rule: "active_change is empty AND
|
|
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
|
|
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/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- type:
|
|
63
|
-
source:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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**:
|
|
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:
|
|
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
|
|