@uoyo/mvtt 2.0.0-beta.2 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +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/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/session-update.md +100 -32
- package/sources/skills/mvt-analyze/manifest.yaml +1 -0
- package/sources/skills/mvt-analyze-code/manifest.yaml +18 -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 +15 -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 +27 -11
- package/sources/skills/mvt-design/business.md +3 -6
- package/sources/skills/mvt-design/manifest.yaml +14 -1
- package/sources/skills/mvt-fix/business.md +2 -1
- package/sources/skills/mvt-fix/manifest.yaml +6 -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 +4 -5
- package/sources/skills/mvt-implement/manifest.yaml +13 -0
- package/sources/skills/mvt-init/business.md +2 -2
- package/sources/skills/mvt-init/manifest.yaml +1 -0
- package/sources/skills/mvt-manage-context/business.md +11 -0
- package/sources/skills/mvt-manage-context/manifest.yaml +14 -3
- package/sources/skills/mvt-plan-dev/business.md +101 -20
- package/sources/skills/mvt-plan-dev/manifest.yaml +18 -19
- package/sources/skills/mvt-quick-dev/business.md +2 -1
- package/sources/skills/mvt-quick-dev/manifest.yaml +21 -6
- package/sources/skills/mvt-refactor/business.md +2 -1
- package/sources/skills/mvt-refactor/manifest.yaml +21 -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 +22 -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 +14 -9
- package/sources/skills/mvt-sync-context/manifest.yaml +3 -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 +14 -1
- package/sources/skills/mvt-update-plan/business.md +14 -3
- package/sources/skills/mvt-update-plan/manifest.yaml +11 -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
|
@@ -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"
|
|
@@ -67,25 +67,24 @@ sections:
|
|
|
67
67
|
|
|
68
68
|
- type: shared
|
|
69
69
|
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).
|
|
70
|
+
params:
|
|
71
|
+
current_skill: mvt-plan-dev
|
|
72
|
+
update_active_change: true
|
|
73
|
+
set_plan_path: true
|
|
74
|
+
update_change: true
|
|
87
75
|
|
|
88
76
|
- type: shared
|
|
89
77
|
source: sections/footer-next-steps.md
|
|
90
78
|
params:
|
|
91
79
|
current_skill: mvt-plan-dev
|
|
80
|
+
conditional_suggestions:
|
|
81
|
+
conditions:
|
|
82
|
+
- condition: "plan created, first task is implementation"
|
|
83
|
+
primary: mvt-implement
|
|
84
|
+
primary_desc: "Start implementing the first task"
|
|
85
|
+
- condition: "plan created, first task is design"
|
|
86
|
+
primary: mvt-design
|
|
87
|
+
primary_desc: "Design the architecture for the first task"
|
|
88
|
+
- condition: "plan created, first task is testing"
|
|
89
|
+
primary: mvt-test
|
|
90
|
+
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
|
|
|
@@ -50,20 +50,35 @@ sections:
|
|
|
50
50
|
|
|
51
51
|
- type: inline
|
|
52
52
|
content: |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- Do NOT
|
|
57
|
-
- Do NOT
|
|
58
|
-
- Do NOT
|
|
53
|
+
## Operation Mode: Shortcut
|
|
54
|
+
|
|
55
|
+
This skill operates as a shortcut — it can execute at any time without checking workflow prerequisites.
|
|
56
|
+
- Do NOT update `active_change` fields (this is a shortcut operation, not a workflow phase).
|
|
57
|
+
- Do NOT create an `active_change` if one doesn't already exist.
|
|
58
|
+
- Do NOT write any artifact or document — results are conversation-only.
|
|
59
|
+
- Do NOT interact with plan.yaml in any way — this skill is plan-independent.
|
|
59
60
|
|
|
60
61
|
- type: file
|
|
61
62
|
source: ./business.md
|
|
62
63
|
|
|
63
64
|
- type: shared
|
|
64
65
|
source: sections/session-update.md
|
|
66
|
+
params:
|
|
67
|
+
current_skill: mvt-quick-dev
|
|
68
|
+
no_change: true
|
|
65
69
|
|
|
66
70
|
- type: shared
|
|
67
71
|
source: sections/footer-next-steps.md
|
|
68
72
|
params:
|
|
69
73
|
current_skill: mvt-quick-dev
|
|
74
|
+
conditional_suggestions:
|
|
75
|
+
conditions:
|
|
76
|
+
- condition: "change applied, tests exist for affected code"
|
|
77
|
+
primary: mvt-test
|
|
78
|
+
primary_desc: "Run tests on the changed code"
|
|
79
|
+
- condition: "change applied, no tests exist"
|
|
80
|
+
primary: mvt-review
|
|
81
|
+
primary_desc: "Quick review of the change"
|
|
82
|
+
- condition: "change was more complex than expected"
|
|
83
|
+
primary: mvt-analyze
|
|
84
|
+
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
|
|
|
@@ -67,11 +67,16 @@ sections:
|
|
|
67
67
|
|
|
68
68
|
- type: inline
|
|
69
69
|
content: |
|
|
70
|
-
### Step
|
|
70
|
+
### Step 4: Pre-flight Checks
|
|
71
71
|
- No blocking checks required (shortcut operation).
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
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).
|
|
75
80
|
|
|
76
81
|
- type: file
|
|
77
82
|
source: ./business.md
|
|
@@ -79,8 +84,21 @@ sections:
|
|
|
79
84
|
|
|
80
85
|
- type: shared
|
|
81
86
|
source: sections/session-update.md
|
|
87
|
+
params:
|
|
88
|
+
current_skill: mvt-refactor
|
|
82
89
|
|
|
83
90
|
- type: shared
|
|
84
91
|
source: sections/footer-next-steps.md
|
|
85
92
|
params:
|
|
86
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."
|
|
@@ -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,6 +48,14 @@ 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
|
|
|
@@ -63,7 +71,7 @@ sections:
|
|
|
63
71
|
level: "WARN"
|
|
64
72
|
message: "Session not initialized. Run `/mvt-init` first."
|
|
65
73
|
- order: "2"
|
|
66
|
-
field: "
|
|
74
|
+
field: "review target (user args, implementation.md, or git diff)"
|
|
67
75
|
level: "WARN"
|
|
68
76
|
message: "No code to review. Run `/mvt-implement` first or specify files."
|
|
69
77
|
|
|
@@ -80,8 +88,21 @@ sections:
|
|
|
80
88
|
|
|
81
89
|
- type: shared
|
|
82
90
|
source: sections/session-update.md
|
|
91
|
+
params:
|
|
92
|
+
current_skill: mvt-review
|
|
83
93
|
|
|
84
94
|
- type: shared
|
|
85
95
|
source: sections/footer-next-steps.md
|
|
86
96
|
params:
|
|
87
97
|
current_skill: mvt-review
|
|
98
|
+
conditional_suggestions:
|
|
99
|
+
conditions:
|
|
100
|
+
- condition: "critical issues found"
|
|
101
|
+
primary: mvt-fix
|
|
102
|
+
primary_desc: "Fix the critical issues before merge"
|
|
103
|
+
- condition: "review approved, tests not written"
|
|
104
|
+
primary: mvt-test
|
|
105
|
+
primary_desc: "Add test coverage"
|
|
106
|
+
- condition: "review approved, all checks passed"
|
|
107
|
+
primary: mvt-update-plan
|
|
108
|
+
primary_desc: "Mark review task done in the plan"
|
|
@@ -9,24 +9,24 @@
|
|
|
9
9
|
- If `session.yaml` exists but is empty (zero keys), treat as `not initialized` -> recommend `/mvt-init`.
|
|
10
10
|
|
|
11
11
|
### Step 2: Build Activity Timeline
|
|
12
|
-
- **What**: produce the most-recent-first list of
|
|
12
|
+
- **What**: produce the most-recent-first list of history entries with derived metadata.
|
|
13
13
|
- **How**:
|
|
14
|
-
1. Read `
|
|
14
|
+
1. Read `history` from `session.yaml`.
|
|
15
15
|
2. For each entry, attach: relative time (e.g., "2h ago"), `change_id` (if present), and the originating skill name.
|
|
16
16
|
3. Limit to the last 10 entries for the rendered table; keep full count separately for the summary line.
|
|
17
17
|
|
|
18
18
|
### Step 3: Discover All Plans (Multi-Change Dashboard)
|
|
19
19
|
- **What**: produce the canonical plan list across the workspace.
|
|
20
20
|
- **How**:
|
|
21
|
-
1. Iterate `
|
|
22
|
-
2. Glob `.ai-agents/workspace/artifacts/*/plan.yaml` to find any plans not registered in `
|
|
21
|
+
1. Iterate `changes[]` from `session.yaml`. For each entry with a `plan_path`, attempt to read the plan file.
|
|
22
|
+
2. Glob `.ai-agents/workspace/artifacts/*/plan.yaml` to find any plans not registered in `changes` (mark them `unindexed`). **Exclude paths under `artifacts/_archived/`** — those are completed changes archived by `/mvt-cleanup`.
|
|
23
23
|
3. For each plan, extract: `change_id`, `title`, `status`, `current_task`, task progress (`done/total`), `updated_at`, `skill_hint` (from current task if present).
|
|
24
24
|
4. If a plan file is present but malformed, include a row with `(corrupt)` in the status column and mark the file path; do not abort.
|
|
25
25
|
- **Branches**:
|
|
26
26
|
|
|
27
27
|
| Condition | Action |
|
|
28
28
|
|-----------|--------|
|
|
29
|
-
| No plans found anywhere | Skip the Changes Overview section entirely; render
|
|
29
|
+
| No plans found anywhere | Skip the Changes Overview section entirely; render "No active changes." |
|
|
30
30
|
| One plan found | Render Changes Overview with one row |
|
|
31
31
|
| Multiple plans found | Render Changes Overview sorted: `in_progress` desc by `updated_at` first, then `done` desc by `updated_at`, then `abandoned` last |
|
|
32
32
|
| Any plan over the cap (more than ~12 rows) | Show top 10 rows; print a `+N older changes hidden -- see artifacts/` line |
|
|
@@ -37,35 +37,31 @@
|
|
|
37
37
|
1. **Header** -- one-line summary: project name (from `project-context.yaml`), framework version, last synced timestamp.
|
|
38
38
|
2. **Projects** -- table: name | type | tech stack (truncated). Cap at 10 rows; collapse the rest into `+N more`.
|
|
39
39
|
3. **Semantic Context** -- one line: `project-context.md present` / `missing -- run /mvt-analyze-code`.
|
|
40
|
-
4. **Active Change** -- if `active_change` exists: id, title,
|
|
40
|
+
4. **Active Change** -- if `active_change` exists: id, title, start time. Else: `none`.
|
|
41
41
|
5. **Changes Overview** -- table from Step 3 (skip if no plans). Render with these columns:
|
|
42
42
|
|
|
43
|
-
| change-id | title | status | progress | current_task |
|
|
44
|
-
|
|
43
|
+
| change-id | title | status | progress | current_task | updated_at |
|
|
44
|
+
|-----------|-------|--------|----------|--------------|------------|
|
|
45
45
|
6. **Skill History** -- last 5 rows of the timeline from Step 2.
|
|
46
|
-
7. **Recent Actions** -- compact list (max 5).
|
|
47
46
|
|
|
48
|
-
- Hard cap: total rendered output should not exceed ~120 lines. If it would, truncate Skill History
|
|
47
|
+
- Hard cap: total rendered output should not exceed ~120 lines. If it would, truncate Skill History first; never truncate the active change or Changes Overview header rows.
|
|
49
48
|
|
|
50
49
|
### Step 5: Suggest Next Step
|
|
51
50
|
- Resolution order (first match wins):
|
|
52
51
|
1. `active_change` has a plan in `in_progress`, `current_task` is set -> suggest the task's `skill_hint` (or, if missing, recommend `/mvt-update-plan` to set `current_task`).
|
|
53
|
-
2. `
|
|
54
|
-
3. No `active_change
|
|
55
|
-
4. No `active_change`, no missing context -> suggest `/mvt-analyze` to start a new feature OR `/mvt-help` to browse the catalog.
|
|
52
|
+
2. `project-context.md` is missing -> suggest `/mvt-analyze-code`.
|
|
53
|
+
3. No `active_change` or no active plan -> suggest `/mvt-analyze` to start a new feature OR `/mvt-help` to browse the catalog.
|
|
56
54
|
- The suggestion must be a single line: skill command + one-clause reason.
|
|
57
55
|
|
|
58
|
-
### Step 6: (session update handled by shared section)
|
|
59
|
-
|
|
60
56
|
## Edge Cases & Errors
|
|
61
57
|
|
|
62
58
|
| Case | Handling |
|
|
63
59
|
|------|----------|
|
|
64
60
|
| `session.yaml` missing entirely | Render a minimal report (Projects section if available) and recommend `/mvt-init` |
|
|
65
|
-
| `session.yaml` corrupt (parse error) | Surface error with file path, render Projects only, recommend `/mvt-
|
|
66
|
-
| `
|
|
61
|
+
| `session.yaml` corrupt (parse error) | Surface error with file path, render Projects only, recommend `/mvt-init` to reinitialize |
|
|
62
|
+
| `changes[]` references a `plan_path` that no longer exists | Include in Changes Overview with `(missing)` marker; do not delete the index entry from this skill |
|
|
67
63
|
| Plan file's `current_task` references a task id not in `tasks[]` | Render `current_task` as `(invalid: <id>)`; do not attempt to fix |
|
|
68
64
|
| Plan file's `status` is not one of the known values | Render the raw value verbatim; flag in skip-checks of the report |
|
|
69
|
-
| Both `
|
|
65
|
+
| Both `changes[]` and the artifact glob find the same plan | Deduplicate by `change_id`; prefer the indexed entry's metadata |
|
|
70
66
|
| Multiple `in_progress` plans | All rendered in Changes Overview; Step 5's suggestion picks the most recently updated; mention the count in the suggestion line |
|
|
71
67
|
| Workspace contains zero projects | Render header only with a single suggestion: `/mvt-init` |
|
|
@@ -40,9 +40,6 @@ sections:
|
|
|
40
40
|
- type: shared
|
|
41
41
|
source: sections/activation-load-config.md
|
|
42
42
|
|
|
43
|
-
- type: shared
|
|
44
|
-
source: sections/output-language-constraint.md
|
|
45
|
-
|
|
46
43
|
- type: shared
|
|
47
44
|
source: sections/activation-preflight.md
|
|
48
45
|
params:
|
|
@@ -64,3 +61,14 @@ sections:
|
|
|
64
61
|
source: sections/footer-next-steps.md
|
|
65
62
|
params:
|
|
66
63
|
current_skill: mvt-status
|
|
64
|
+
conditional_suggestions:
|
|
65
|
+
conditions:
|
|
66
|
+
- condition: "active change with current_task"
|
|
67
|
+
primary: mvt-resume
|
|
68
|
+
primary_desc: "Resume work on the current task"
|
|
69
|
+
- condition: "project-context.md missing"
|
|
70
|
+
primary: mvt-analyze-code
|
|
71
|
+
primary_desc: "Generate semantic project context"
|
|
72
|
+
- condition: "no active change"
|
|
73
|
+
primary: mvt-analyze
|
|
74
|
+
primary_desc: "Start analyzing a new feature"
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
### Step 1: Identify Completed Changes
|
|
4
4
|
- **What**: produce a candidate list of change-ids whose artifacts will be aggregated.
|
|
5
5
|
- **How**:
|
|
6
|
-
1. Read `session.yaml`. Collect `
|
|
6
|
+
1. Read `session.yaml`. Collect `changes[]` entries with `status: done`.
|
|
7
7
|
2. For each candidate, verify `.ai-agents/workspace/artifacts/{change-id}/` exists AND contains at least one of `analysis.md` or `design.md`. Drop entries with only `plan.yaml`.
|
|
8
|
-
3. (Fallback) If `
|
|
9
|
-
4. Exclude
|
|
8
|
+
3. (Fallback) If `changes[]` is empty, scan `.ai-agents/workspace/artifacts/*/` directly; offer those with `analysis.md` or `design.md`, marked `unindexed`.
|
|
9
|
+
4. Exclude already-archived or irrelevant changes:
|
|
10
|
+
- **Indexed changes**: exclude any `changes[]` entry with `status: abandoned`. For `status: done` entries, Step 1.2's directory existence check already filters out those whose artifacts have been moved to `artifacts/_archived/` by `/mvt-cleanup`.
|
|
11
|
+
- **Fallback scan**: when scanning `artifacts/*/` directly, skip any path under `artifacts/_archived/` (the unified archive directory managed by `/mvt-cleanup`).
|
|
10
12
|
5. Exclude `active_change.id` (work in flight).
|
|
11
13
|
|
|
12
14
|
- **Present** the list:
|
|
@@ -38,10 +40,9 @@ This step establishes the **target structure** that aggregated content must fit
|
|
|
38
40
|
|
|
39
41
|
- **What**: from each selected change-id, extract atomic knowledge items and classify them against the section map from Step 2.
|
|
40
42
|
- **How**:
|
|
41
|
-
1. For each selected change-id, read available artifacts (`analysis.md`, `
|
|
43
|
+
1. For each selected change-id, read available artifacts (`analysis.md`, `implementation.md`).
|
|
42
44
|
2. Extract atomic items. Typical sources:
|
|
43
45
|
- `analysis.md` -> domain terms, actors, business rules, constraints
|
|
44
|
-
- `design.md` -> modules, layers, dependency rules, key interfaces, ADRs
|
|
45
46
|
- `implementation.md` -> files added/changed (informs `.yaml` source_paths), realized vs deviated design points
|
|
46
47
|
3. For each item, match to a section from the Step 2 map:
|
|
47
48
|
- Match by semantic similarity to **section title + 1-line summary**, not by exact string.
|
|
@@ -126,14 +127,18 @@ If user skips verification: proceed directly to Step 7 with Step 5 selections.
|
|
|
126
127
|
1. **Applied summary** -- counts: items added / modified / skipped / orphaned-into-new-section
|
|
127
128
|
2. **Files changed** -- paths + byte deltas
|
|
128
129
|
3. **Backup paths** -- so user can manually revert
|
|
129
|
-
4. **
|
|
130
|
+
4. **Synced changes** -- list all change-ids whose knowledge was aggregated in this run:
|
|
131
|
+
> The following changes have been synced and can be safely archived: {change-id-1}, {change-id-2}, ...
|
|
132
|
+
> Last synced at: {last_synced_at} (updated by this run)
|
|
133
|
+
5. **Out-of-scope reminder** (always print):
|
|
130
134
|
> This skill processes additions and modifications only. Module deletions, renames, and large refactors are NOT detected here. Run `/mvt-analyze-code` periodically to rebuild from ground truth.
|
|
131
|
-
|
|
135
|
+
6. **Suggested next**:
|
|
132
136
|
- Aggregated >= 1 change -> "Run `/mvt-cleanup` to archive these completed changes."
|
|
133
137
|
- Verification flagged code-only entities -> "Run `/mvt-analyze-code` to capture missing entities."
|
|
134
138
|
|
|
135
|
-
### Step 9:
|
|
136
|
-
|
|
139
|
+
### Step 9: State Update
|
|
140
|
+
Apply the State Update rules defined in the **State Update** section below.
|
|
141
|
+
- The `--set-synced` parameter updates `session.last_synced_at`.
|
|
137
142
|
|
|
138
143
|
## Edge Cases & Errors
|
|
139
144
|
|