@uoyo/mvtt 2.0.0-beta.2 → 2.0.0-beta.4
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 +1 -11
- 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 +12 -4
- package/dist/fs/materialize.js.map +1 -1
- package/dist/fs/registry-merge.d.ts +19 -0
- package/dist/fs/registry-merge.d.ts.map +1 -0
- package/dist/fs/registry-merge.js +177 -0
- package/dist/fs/registry-merge.js.map +1 -0
- package/dist/scripts/plan-update.cjs +7563 -0
- package/dist/scripts/session-update.cjs +7568 -0
- package/install-manifest.yaml +8 -2
- package/package.json +3 -2
- package/sources/defaults/config.yaml +7 -7
- package/sources/defaults/session.yaml +9 -16
- package/sources/scripts/plan-update.js +353 -0
- 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-format-constraint.md +14 -0
- package/sources/sections/project-context-profile.md +29 -0
- package/sources/sections/session-update.md +100 -32
- package/sources/skills/mvt-analyze/manifest.yaml +4 -0
- package/sources/skills/mvt-analyze-code/manifest.yaml +24 -4
- package/sources/skills/mvt-bug-detect/business.md +99 -101
- package/sources/skills/mvt-bug-detect/manifest.yaml +84 -84
- package/sources/skills/mvt-check-context/business.md +3 -5
- package/sources/skills/mvt-check-context/manifest.yaml +15 -8
- package/sources/skills/mvt-cleanup/business.md +49 -23
- package/sources/skills/mvt-cleanup/manifest.yaml +18 -10
- package/sources/skills/mvt-config/business.md +1 -2
- package/sources/skills/mvt-config/manifest.yaml +11 -4
- package/sources/skills/mvt-create-skill/business.md +6 -5
- package/sources/skills/mvt-create-skill/manifest.yaml +30 -11
- package/sources/skills/mvt-design/business.md +3 -6
- package/sources/skills/mvt-design/manifest.yaml +17 -1
- package/sources/skills/mvt-fix/business.md +2 -1
- package/sources/skills/mvt-fix/manifest.yaml +9 -3
- package/sources/skills/mvt-help/business.md +2 -4
- package/sources/skills/mvt-help/manifest.yaml +13 -5
- package/sources/skills/mvt-implement/business.md +10 -7
- package/sources/skills/mvt-implement/manifest.yaml +16 -0
- package/sources/skills/mvt-init/business.md +2 -2
- package/sources/skills/mvt-init/manifest.yaml +4 -0
- package/sources/skills/mvt-manage-context/business.md +11 -0
- package/sources/skills/mvt-manage-context/manifest.yaml +20 -3
- package/sources/skills/mvt-plan-dev/business.md +101 -20
- package/sources/skills/mvt-plan-dev/manifest.yaml +21 -19
- package/sources/skills/mvt-quick-dev/business.md +2 -1
- package/sources/skills/mvt-quick-dev/manifest.yaml +24 -6
- package/sources/skills/mvt-refactor/business.md +2 -1
- package/sources/skills/mvt-refactor/manifest.yaml +24 -3
- package/sources/skills/mvt-resume/business.md +28 -68
- package/sources/skills/mvt-resume/manifest.yaml +17 -7
- package/sources/skills/mvt-review/business.md +3 -3
- package/sources/skills/mvt-review/manifest.yaml +25 -1
- package/sources/skills/mvt-status/business.md +14 -18
- package/sources/skills/mvt-status/manifest.yaml +11 -3
- package/sources/skills/mvt-sync-context/business.md +69 -35
- package/sources/skills/mvt-sync-context/manifest.yaml +9 -0
- package/sources/skills/mvt-template/business.md +0 -2
- package/sources/skills/mvt-template/manifest.yaml +13 -8
- package/sources/skills/mvt-test/business.md +3 -3
- package/sources/skills/mvt-test/manifest.yaml +17 -1
- package/sources/skills/mvt-update-plan/business.md +41 -28
- package/sources/skills/mvt-update-plan/manifest.yaml +14 -19
- 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 -16
- package/dist/commands/migrate.d.ts.map +0 -1
- package/dist/commands/migrate.js +0 -118
- package/dist/commands/migrate.js.map +0 -1
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Collect everything that should inform the plan:
|
|
6
6
|
|
|
7
|
-
1.
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
117
|
+
Before writing, validate the assembled YAML:
|
|
51
118
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
|
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
|
|
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
|
+
```
|
|
@@ -20,8 +20,8 @@ sections:
|
|
|
20
20
|
role: Architect
|
|
21
21
|
role_desc: "a Development Planner"
|
|
22
22
|
decision_rules:
|
|
23
|
-
- rule: "active_change is set AND
|
|
24
|
-
- rule: "active_change is set AND
|
|
23
|
+
- rule: "active_change is set AND plan_path is empty -> Generate a fresh plan.yaml"
|
|
24
|
+
- rule: "active_change is set AND plan_path is non-empty -> Confirm before regenerating; default to /mvt-update-plan"
|
|
25
25
|
- rule: "Tasks would exceed 10 -> Stop, propose phasing the change into multiple plans"
|
|
26
26
|
- rule: "Dependencies form a cycle -> Reject and ask the user to resolve"
|
|
27
27
|
- rule: "active_change is empty -> Stop and request /mvt-analyze first"
|
|
@@ -48,6 +48,9 @@ sections:
|
|
|
48
48
|
- type: shared
|
|
49
49
|
source: sections/output-language-constraint.md
|
|
50
50
|
|
|
51
|
+
- type: shared
|
|
52
|
+
source: sections/output-format-constraint.md
|
|
53
|
+
|
|
51
54
|
- type: shared
|
|
52
55
|
source: sections/activation-preflight.md
|
|
53
56
|
params:
|
|
@@ -67,25 +70,24 @@ sections:
|
|
|
67
70
|
|
|
68
71
|
- type: shared
|
|
69
72
|
source: sections/session-update.md
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
In addition to the mandatory updates above, this skill MUST update:
|
|
76
|
-
|
|
77
|
-
- `active_change.plan_path`: Set to `".ai-agents/workspace/artifacts/{active_change.id}/plan.yaml"`
|
|
78
|
-
- `active_change.has_plan`: Set to `true`
|
|
79
|
-
- `recent_changes`: Append (or update if entry with same `id` exists) an entry:
|
|
80
|
-
```yaml
|
|
81
|
-
- id: "{active_change.id}"
|
|
82
|
-
title: "{active_change.title}"
|
|
83
|
-
plan_path: ".ai-agents/workspace/artifacts/{active_change.id}/plan.yaml"
|
|
84
|
-
last_updated: "{current timestamp ISO 8601}"
|
|
85
|
-
```
|
|
86
|
-
Keep max 5 entries (drop the oldest by `last_updated` ascending).
|
|
73
|
+
params:
|
|
74
|
+
current_skill: mvt-plan-dev
|
|
75
|
+
update_active_change: true
|
|
76
|
+
set_plan_path: true
|
|
77
|
+
update_change: true
|
|
87
78
|
|
|
88
79
|
- type: shared
|
|
89
80
|
source: sections/footer-next-steps.md
|
|
90
81
|
params:
|
|
91
82
|
current_skill: mvt-plan-dev
|
|
83
|
+
conditional_suggestions:
|
|
84
|
+
conditions:
|
|
85
|
+
- condition: "plan created, first task is implementation"
|
|
86
|
+
primary: mvt-implement
|
|
87
|
+
primary_desc: "Start implementing the first task"
|
|
88
|
+
- condition: "plan created, first task is design"
|
|
89
|
+
primary: mvt-design
|
|
90
|
+
primary_desc: "Design the architecture for the first task"
|
|
91
|
+
- condition: "plan created, first task is testing"
|
|
92
|
+
primary: mvt-test
|
|
93
|
+
primary_desc: "Write tests for the first task"
|
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
- Verification status: type-check result, test suggestion
|
|
85
85
|
- **No artifact is written. No document is generated.** This is a conversation-only skill.
|
|
86
86
|
|
|
87
|
-
### Step 8:
|
|
87
|
+
### Step 8: State Update
|
|
88
|
+
Apply the State Update rules defined in the **State Update** section below.
|
|
88
89
|
|
|
89
90
|
## Edge Cases & Errors
|
|
90
91
|
|
|
@@ -48,22 +48,40 @@ sections:
|
|
|
48
48
|
- type: shared
|
|
49
49
|
source: sections/output-language-constraint.md
|
|
50
50
|
|
|
51
|
+
- type: shared
|
|
52
|
+
source: sections/output-format-constraint.md
|
|
53
|
+
|
|
51
54
|
- type: inline
|
|
52
55
|
content: |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Do NOT
|
|
57
|
-
- Do NOT
|
|
58
|
-
- Do NOT
|
|
56
|
+
## Operation Mode: Shortcut
|
|
57
|
+
|
|
58
|
+
This skill operates as a shortcut — it can execute at any time without checking workflow prerequisites.
|
|
59
|
+
- Do NOT update `active_change` fields (this is a shortcut operation, not a workflow phase).
|
|
60
|
+
- Do NOT create an `active_change` if one doesn't already exist.
|
|
61
|
+
- Do NOT write any artifact or document — results are conversation-only.
|
|
62
|
+
- Do NOT interact with plan.yaml in any way — this skill is plan-independent.
|
|
59
63
|
|
|
60
64
|
- type: file
|
|
61
65
|
source: ./business.md
|
|
62
66
|
|
|
63
67
|
- type: shared
|
|
64
68
|
source: sections/session-update.md
|
|
69
|
+
params:
|
|
70
|
+
current_skill: mvt-quick-dev
|
|
71
|
+
no_change: true
|
|
65
72
|
|
|
66
73
|
- type: shared
|
|
67
74
|
source: sections/footer-next-steps.md
|
|
68
75
|
params:
|
|
69
76
|
current_skill: mvt-quick-dev
|
|
77
|
+
conditional_suggestions:
|
|
78
|
+
conditions:
|
|
79
|
+
- condition: "change applied, tests exist for affected code"
|
|
80
|
+
primary: mvt-test
|
|
81
|
+
primary_desc: "Run tests on the changed code"
|
|
82
|
+
- condition: "change applied, no tests exist"
|
|
83
|
+
primary: mvt-review
|
|
84
|
+
primary_desc: "Quick review of the change"
|
|
85
|
+
- condition: "change was more complex than expected"
|
|
86
|
+
primary: mvt-analyze
|
|
87
|
+
primary_desc: "Do a full analysis for this change"
|
|
@@ -88,7 +88,8 @@
|
|
|
88
88
|
- `Verification Result` -- tests run, pass/fail counts; or manual checks recommended.
|
|
89
89
|
- `Follow-ups` -- deferred behavior changes spotted during refactoring.
|
|
90
90
|
|
|
91
|
-
### Step 10:
|
|
91
|
+
### Step 10: State Update
|
|
92
|
+
Apply the State Update rules defined in the **State Update** section below.
|
|
92
93
|
|
|
93
94
|
## Edge Cases & Errors
|
|
94
95
|
|
|
@@ -65,13 +65,21 @@ sections:
|
|
|
65
65
|
- type: shared
|
|
66
66
|
source: sections/output-language-constraint.md
|
|
67
67
|
|
|
68
|
+
- type: shared
|
|
69
|
+
source: sections/output-format-constraint.md
|
|
70
|
+
|
|
68
71
|
- type: inline
|
|
69
72
|
content: |
|
|
70
|
-
### Step
|
|
73
|
+
### Step 4: Pre-flight Checks
|
|
71
74
|
- No blocking checks required (shortcut operation).
|
|
72
75
|
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
- type: inline
|
|
77
|
+
content: |
|
|
78
|
+
## Operation Mode: Shortcut
|
|
79
|
+
|
|
80
|
+
This skill operates as a shortcut — it can execute at any time without checking workflow prerequisites.
|
|
81
|
+
- Do NOT update `active_change` fields.
|
|
82
|
+
- Write a `history` entry only (via State Update).
|
|
75
83
|
|
|
76
84
|
- type: file
|
|
77
85
|
source: ./business.md
|
|
@@ -79,8 +87,21 @@ sections:
|
|
|
79
87
|
|
|
80
88
|
- type: shared
|
|
81
89
|
source: sections/session-update.md
|
|
90
|
+
params:
|
|
91
|
+
current_skill: mvt-refactor
|
|
82
92
|
|
|
83
93
|
- type: shared
|
|
84
94
|
source: sections/footer-next-steps.md
|
|
85
95
|
params:
|
|
86
96
|
current_skill: mvt-refactor
|
|
97
|
+
conditional_suggestions:
|
|
98
|
+
conditions:
|
|
99
|
+
- condition: "refactoring complete, tests exist"
|
|
100
|
+
primary: mvt-test
|
|
101
|
+
primary_desc: "Run tests to verify behavior is preserved"
|
|
102
|
+
- condition: "refactoring complete, no tests exist"
|
|
103
|
+
primary: mvt-review
|
|
104
|
+
primary_desc: "Review the refactored code"
|
|
105
|
+
- condition: "refactoring revealed design issues"
|
|
106
|
+
primary: mvt-design
|
|
107
|
+
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."
|
|
@@ -3,7 +3,7 @@ output: .claude/skills/mvt-resume/SKILL.md
|
|
|
3
3
|
|
|
4
4
|
frontmatter:
|
|
5
5
|
name: mvt-resume
|
|
6
|
-
description: "Resume an in-progress development task in a new conversation. Reads session.yaml (active_change,
|
|
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
7
|
|
|
8
8
|
sections:
|
|
9
9
|
- type: inline
|
|
@@ -28,11 +28,11 @@ sections:
|
|
|
28
28
|
decision_rules:
|
|
29
29
|
- rule: "Multiple in_progress plans found -> Pause and display candidate table, wait for user selection"
|
|
30
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
|
|
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
33
|
- rule: "Plan exists and has current_task -> Use current_task's skill_hint as next-step recommendation"
|
|
34
34
|
- rule: "Plan's current_task has been in_progress for >5 days -> Surface stale warning"
|
|
35
|
-
- rule: "Last skill
|
|
35
|
+
- rule: "Last skill was interrupted -> Surface the context, suggest retry"
|
|
36
36
|
boundaries:
|
|
37
37
|
- scope: "read git state (branch, diff, commits)"
|
|
38
38
|
skill: "(Out of scope -- this skill is session-state only)"
|
|
@@ -47,9 +47,6 @@ sections:
|
|
|
47
47
|
- type: shared
|
|
48
48
|
source: sections/activation-load-config.md
|
|
49
49
|
|
|
50
|
-
- type: shared
|
|
51
|
-
source: sections/output-language-constraint.md
|
|
52
|
-
|
|
53
50
|
- type: shared
|
|
54
51
|
source: sections/activation-preflight.md
|
|
55
52
|
params:
|
|
@@ -64,8 +61,21 @@ sections:
|
|
|
64
61
|
|
|
65
62
|
- type: shared
|
|
66
63
|
source: sections/session-update.md
|
|
64
|
+
params:
|
|
65
|
+
read_only: true
|
|
67
66
|
|
|
68
67
|
- type: shared
|
|
69
68
|
source: sections/footer-next-steps.md
|
|
70
69
|
params:
|
|
71
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
|
|
|
@@ -48,12 +48,23 @@ sections:
|
|
|
48
48
|
|
|
49
49
|
Usage: `/mvt-review` or `/mvt-review --aspect {type}`
|
|
50
50
|
|
|
51
|
+
- type: shared
|
|
52
|
+
source: sections/activation-load-context.md
|
|
53
|
+
params:
|
|
54
|
+
extended_context:
|
|
55
|
+
- ".ai-agents/workspace/artifacts/{active_change.id}/analysis.md -- Requirements analysis"
|
|
56
|
+
- ".ai-agents/workspace/artifacts/{active_change.id}/design.md -- Architecture design"
|
|
57
|
+
- ".ai-agents/workspace/artifacts/{active_change.id}/implementation.md -- Implementation record"
|
|
58
|
+
|
|
51
59
|
- type: shared
|
|
52
60
|
source: sections/activation-load-config.md
|
|
53
61
|
|
|
54
62
|
- type: shared
|
|
55
63
|
source: sections/output-language-constraint.md
|
|
56
64
|
|
|
65
|
+
- type: shared
|
|
66
|
+
source: sections/output-format-constraint.md
|
|
67
|
+
|
|
57
68
|
- type: shared
|
|
58
69
|
source: sections/activation-preflight.md
|
|
59
70
|
params:
|
|
@@ -63,7 +74,7 @@ sections:
|
|
|
63
74
|
level: "WARN"
|
|
64
75
|
message: "Session not initialized. Run `/mvt-init` first."
|
|
65
76
|
- order: "2"
|
|
66
|
-
field: "
|
|
77
|
+
field: "review target (user args, implementation.md, or git diff)"
|
|
67
78
|
level: "WARN"
|
|
68
79
|
message: "No code to review. Run `/mvt-implement` first or specify files."
|
|
69
80
|
|
|
@@ -80,8 +91,21 @@ sections:
|
|
|
80
91
|
|
|
81
92
|
- type: shared
|
|
82
93
|
source: sections/session-update.md
|
|
94
|
+
params:
|
|
95
|
+
current_skill: mvt-review
|
|
83
96
|
|
|
84
97
|
- type: shared
|
|
85
98
|
source: sections/footer-next-steps.md
|
|
86
99
|
params:
|
|
87
100
|
current_skill: mvt-review
|
|
101
|
+
conditional_suggestions:
|
|
102
|
+
conditions:
|
|
103
|
+
- condition: "critical issues found"
|
|
104
|
+
primary: mvt-fix
|
|
105
|
+
primary_desc: "Fix the critical issues before merge"
|
|
106
|
+
- condition: "review approved, tests not written"
|
|
107
|
+
primary: mvt-test
|
|
108
|
+
primary_desc: "Add test coverage"
|
|
109
|
+
- condition: "review approved, all checks passed"
|
|
110
|
+
primary: mvt-update-plan
|
|
111
|
+
primary_desc: "Mark review task done in the plan"
|