@uoyo/mvtt 2.0.0-beta.0 → 2.0.0-beta.2
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/LICENSE +21 -21
- package/README.md +194 -209
- package/dist/build/assembler.d.ts.map +1 -1
- package/dist/build/assembler.js +2 -0
- package/dist/build/assembler.js.map +1 -1
- package/dist/build/plan-validator.d.ts +26 -0
- package/dist/build/plan-validator.d.ts.map +1 -0
- package/dist/build/plan-validator.js +225 -0
- package/dist/build/plan-validator.js.map +1 -0
- package/dist/build/section-loader.d.ts.map +1 -1
- package/dist/build/section-loader.js +45 -9
- package/dist/build/section-loader.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -11
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +0 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/install.d.ts +1 -4
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +18 -14
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/migrate.d.ts +16 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +118 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +35 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/fs/core-manifest.d.ts +17 -0
- package/dist/fs/core-manifest.d.ts.map +1 -0
- package/dist/fs/core-manifest.js +76 -0
- package/dist/fs/core-manifest.js.map +1 -0
- package/dist/fs/install-manifest.d.ts +1 -2
- package/dist/fs/install-manifest.d.ts.map +1 -1
- package/dist/fs/install-manifest.js +1 -2
- package/dist/fs/install-manifest.js.map +1 -1
- package/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +23 -3
- package/dist/fs/materialize.js.map +1 -1
- package/dist/types/core-manifest.d.ts +12 -0
- package/dist/types/core-manifest.d.ts.map +1 -0
- package/dist/types/core-manifest.js +2 -0
- package/dist/types/core-manifest.js.map +1 -0
- package/dist/types/registry.d.ts +13 -5
- package/dist/types/registry.d.ts.map +1 -1
- package/install-manifest.yaml +31 -27
- package/package.json +57 -57
- package/registry.yaml +198 -209
- package/sources/defaults/config.yaml +27 -30
- package/sources/defaults/project-context.yaml +15 -26
- package/sources/defaults/session.yaml +31 -23
- package/sources/knowledge/core/manifest.yaml +4 -45
- package/sources/sections/activation-load-config.md +11 -5
- package/sources/sections/activation-load-context.md +26 -11
- package/sources/sections/activation-preflight.md +14 -4
- package/sources/sections/footer-next-steps.md +35 -9
- package/sources/sections/output-language-constraint.md +11 -0
- package/sources/sections/role-header.md +13 -13
- package/sources/sections/session-update.md +47 -0
- package/sources/skills/mvt-analyze/business.md +69 -33
- package/sources/skills/mvt-analyze/manifest.yaml +90 -89
- package/sources/skills/mvt-analyze-code/business.md +82 -35
- package/sources/skills/mvt-analyze-code/manifest.yaml +96 -88
- package/sources/skills/mvt-bug-detect/business.md +101 -0
- package/sources/skills/mvt-bug-detect/manifest.yaml +84 -0
- package/sources/skills/mvt-check-context/business.md +89 -42
- package/sources/skills/mvt-check-context/manifest.yaml +63 -74
- package/sources/skills/mvt-cleanup/business.md +80 -31
- package/sources/skills/mvt-cleanup/manifest.yaml +85 -93
- package/sources/skills/mvt-config/business.md +94 -26
- package/sources/skills/mvt-config/manifest.yaml +96 -108
- package/sources/skills/mvt-create-skill/business.md +231 -111
- package/sources/skills/mvt-create-skill/manifest.yaml +91 -79
- package/sources/skills/mvt-design/business.md +116 -34
- package/sources/skills/mvt-design/manifest.yaml +96 -105
- package/sources/skills/mvt-fix/business.md +132 -28
- package/sources/skills/mvt-fix/manifest.yaml +85 -86
- package/sources/skills/mvt-help/business.md +74 -70
- package/sources/skills/mvt-help/manifest.yaml +67 -61
- package/sources/skills/mvt-implement/business.md +91 -32
- package/sources/skills/mvt-implement/manifest.yaml +80 -96
- package/sources/skills/mvt-init/business.md +164 -49
- package/sources/skills/mvt-init/manifest.yaml +101 -93
- package/sources/skills/mvt-manage-context/business.md +175 -0
- package/sources/skills/mvt-manage-context/manifest.yaml +123 -0
- package/sources/skills/mvt-plan-dev/business.md +75 -0
- package/sources/skills/mvt-plan-dev/manifest.yaml +91 -0
- package/sources/skills/mvt-quick-dev/business.md +99 -0
- package/sources/skills/mvt-quick-dev/manifest.yaml +69 -0
- package/sources/skills/mvt-refactor/business.md +104 -33
- package/sources/skills/mvt-refactor/manifest.yaml +86 -101
- package/sources/skills/mvt-resume/business.md +137 -0
- package/sources/skills/mvt-resume/manifest.yaml +71 -0
- package/sources/skills/mvt-review/business.md +112 -49
- package/sources/skills/mvt-review/manifest.yaml +87 -106
- package/sources/skills/mvt-status/business.md +71 -24
- package/sources/skills/mvt-status/manifest.yaml +66 -74
- package/sources/skills/mvt-sync-context/business.md +150 -25
- package/sources/skills/mvt-sync-context/manifest.yaml +96 -84
- package/sources/skills/mvt-template/business.md +96 -49
- package/sources/skills/mvt-template/manifest.yaml +63 -71
- package/sources/skills/mvt-test/business.md +104 -36
- package/sources/skills/mvt-test/manifest.yaml +102 -111
- package/sources/skills/mvt-update-plan/business.md +72 -0
- package/sources/skills/mvt-update-plan/manifest.yaml +132 -0
- package/sources/templates/analyze-output/body.md +15 -38
- package/sources/templates/analyze-output/manifest.yaml +11 -11
- package/sources/templates/design-output/body.md +17 -50
- package/sources/templates/design-output/manifest.yaml +11 -11
- package/sources/templates/implement-output/body.md +11 -32
- package/sources/templates/implement-output/manifest.yaml +11 -11
- package/sources/templates/project-context/body.md +13 -0
- package/sources/templates/project-context/manifest.yaml +12 -0
- package/sources/templates/review-output/body.md +11 -45
- package/sources/templates/review-output/manifest.yaml +11 -11
- package/sources/templates/test-output/body.md +7 -31
- package/sources/templates/test-output/manifest.yaml +11 -11
- 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
- package/sources/knowledge/core/review-principles.md +0 -51
- package/sources/knowledge/patterns/clean-architecture/manifest.yaml +0 -66
- package/sources/knowledge/patterns/clean-architecture/review-checklist.md +0 -230
- package/sources/knowledge/patterns/ddd/manifest.yaml +0 -83
- package/sources/knowledge/patterns/ddd/review-checklist.md +0 -226
- package/sources/knowledge/patterns/ddd/tactical-patterns.md +0 -12
- package/sources/knowledge/patterns/frontend-react/manifest.yaml +0 -44
- package/sources/knowledge/patterns/frontend-react/review-checklist.md +0 -78
- package/sources/knowledge/patterns/manifest.yaml +0 -113
- package/sources/skills/mvt-add-context/business.md +0 -47
- package/sources/skills/mvt-add-context/manifest.yaml +0 -83
- package/sources/templates/analyze-code-output/body.md +0 -44
- package/sources/templates/analyze-code-output/manifest.yaml +0 -11
- package/sources/templates/cleanup-output/body.md +0 -9
- package/sources/templates/cleanup-output/manifest.yaml +0 -11
- package/sources/templates/config-output/body.md +0 -11
- package/sources/templates/config-output/manifest.yaml +0 -11
- package/sources/templates/context-check-output/body.md +0 -32
- package/sources/templates/context-check-output/manifest.yaml +0 -11
- package/sources/templates/fix-output/body.md +0 -30
- package/sources/templates/fix-output/manifest.yaml +0 -11
- package/sources/templates/init-output/body.md +0 -34
- package/sources/templates/init-output/manifest.yaml +0 -11
- package/sources/templates/refactor-output/body.md +0 -32
- package/sources/templates/refactor-output/manifest.yaml +0 -11
- package/sources/templates/status-output/body.md +0 -36
- package/sources/templates/status-output/manifest.yaml +0 -11
- package/sources/templates/sync-context-output/body.md +0 -16
- package/sources/templates/sync-context-output/manifest.yaml +0 -11
|
@@ -0,0 +1,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, skill_history, recent_actions) and recent artifacts to reconstruct context. Does not read git state."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Resume
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Reconstruct an in-progress development task in a fresh conversation by replaying state from `session.yaml`, recent artifacts, and plan.yaml (if one exists). When multiple plans are in-flight, prompt the user to select which change to resume. Use this skill at the start of a new conversation to pick up exactly where the last session left off.
|
|
16
|
+
|
|
17
|
+
## Arguments
|
|
18
|
+
|
|
19
|
+
| Argument | Required | Description |
|
|
20
|
+
|----------|----------|-------------|
|
|
21
|
+
| `{change-id}` | No | Directly resume a specific change (skips candidate selection). Error if not found or not in_progress. |
|
|
22
|
+
|
|
23
|
+
- type: shared
|
|
24
|
+
source: sections/role-header.md
|
|
25
|
+
params:
|
|
26
|
+
role: Conductor
|
|
27
|
+
role_desc: "a Workflow Coordinator"
|
|
28
|
+
decision_rules:
|
|
29
|
+
- rule: "Multiple in_progress plans found -> Pause and display candidate table, wait for user selection"
|
|
30
|
+
- rule: "Exactly one in_progress plan found -> Auto-select it and proceed"
|
|
31
|
+
- rule: "No plans found BUT active_change is set -> Fall back to legacy skill_history-based resume"
|
|
32
|
+
- rule: "active_change is empty AND skill_history is empty AND no plans -> Recommend `/mvt-init` or `/mvt-status`"
|
|
33
|
+
- rule: "Plan exists and has current_task -> Use current_task's skill_hint as next-step recommendation"
|
|
34
|
+
- rule: "Plan's current_task has been in_progress for >5 days -> Surface stale warning"
|
|
35
|
+
- rule: "Last skill failed or was interrupted -> Surface the failure context, suggest retry"
|
|
36
|
+
boundaries:
|
|
37
|
+
- scope: "read git state (branch, diff, commits)"
|
|
38
|
+
skill: "(Out of scope -- this skill is session-state only)"
|
|
39
|
+
- scope: "modify any files"
|
|
40
|
+
skill: "(Read-only)"
|
|
41
|
+
- scope: "run analyses or tests"
|
|
42
|
+
skill: "(Use the recommended next skill)"
|
|
43
|
+
|
|
44
|
+
- type: shared
|
|
45
|
+
source: sections/activation-load-context.md
|
|
46
|
+
|
|
47
|
+
- type: shared
|
|
48
|
+
source: sections/activation-load-config.md
|
|
49
|
+
|
|
50
|
+
- type: shared
|
|
51
|
+
source: sections/output-language-constraint.md
|
|
52
|
+
|
|
53
|
+
- type: shared
|
|
54
|
+
source: sections/activation-preflight.md
|
|
55
|
+
params:
|
|
56
|
+
checks:
|
|
57
|
+
- order: "1"
|
|
58
|
+
field: "session.initialized_at"
|
|
59
|
+
level: "WARN"
|
|
60
|
+
message: "Session not initialized. Run `/mvt-init` first."
|
|
61
|
+
|
|
62
|
+
- type: file
|
|
63
|
+
source: ./business.md
|
|
64
|
+
|
|
65
|
+
- type: shared
|
|
66
|
+
source: sections/session-update.md
|
|
67
|
+
|
|
68
|
+
- type: shared
|
|
69
|
+
source: sections/footer-next-steps.md
|
|
70
|
+
params:
|
|
71
|
+
current_skill: mvt-resume
|
|
@@ -1,49 +1,112 @@
|
|
|
1
|
-
## Execution Flow
|
|
2
|
-
|
|
3
|
-
### Step 1:
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Step
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Load Inputs
|
|
4
|
+
- **Required**:
|
|
5
|
+
- The set of files to review (see Step 2 for resolution).
|
|
6
|
+
- **Fallback**:
|
|
7
|
+
- If `design.md`/`implementation.md` are missing, downgrade to "code-only review": skip the design-compliance checks (Step 4 row group A) and note the limitation in the artifact.
|
|
8
|
+
- If `project-context.md` is missing, skip layer-compliance checks and note the limitation.
|
|
9
|
+
|
|
10
|
+
### Step 2: Resolve Review Target
|
|
11
|
+
- **What**: produce a definitive file list to review.
|
|
12
|
+
- **How**: pick the FIRST source that yields a non-empty list.
|
|
13
|
+
|
|
14
|
+
| Source | Condition |
|
|
15
|
+
|--------|-----------|
|
|
16
|
+
| User-provided file paths | User passed paths/globs as arguments |
|
|
17
|
+
| `--aspect` filter | User specified an aspect; intersect aspect-relevant files with the active change's `Change Tracking` |
|
|
18
|
+
| `implementation.md` -> `Files Touched` | Active change has implementation artifact |
|
|
19
|
+
| `git diff --name-only main...HEAD` | Inside a feature branch |
|
|
20
|
+
| `git diff --name-only HEAD~1` | Last-commit fallback |
|
|
21
|
+
|
|
22
|
+
- If the resolved list is empty, STOP and ask the user to specify the target.
|
|
23
|
+
- If the list exceeds ~30 files, ask the user to scope down OR confirm a high-level (per-module) review depth.
|
|
24
|
+
|
|
25
|
+
### Step 3: Determine Review Depth
|
|
26
|
+
- **Default**: full review across all axes (Step 4).
|
|
27
|
+
- `--aspect <name>`: narrow to a single axis. Supported aspects: `architecture`, `quality`, `errors`, `edge-cases`, `security`, `naming`, `tests`. Other aspects -> ask user to clarify.
|
|
28
|
+
- For files >300 lines, do a structural pass first (interfaces, exports, key paths) before line-level review; do not attempt line-by-line on huge files.
|
|
29
|
+
|
|
30
|
+
### Step 4: Run Review Checks
|
|
31
|
+
- **What**: produce findings, each tagged with severity, location, and a concrete remedy.
|
|
32
|
+
- **How**: walk the checklist below. Skip any group whose inputs were missing per Step 1 fallback notes.
|
|
33
|
+
|
|
34
|
+
**Group A -- Design / Layer Compliance** (requires design.md OR project-context.md)
|
|
35
|
+
- Each file is in the module/layer assigned by design or project-context.
|
|
36
|
+
- Dependency direction respects layer rules (no upward imports, no forbidden cross-module reaches).
|
|
37
|
+
- Public interfaces match `Key Interfaces` from design.
|
|
38
|
+
- Implementation `Deviations from Design` are documented; undocumented deviations are findings.
|
|
39
|
+
|
|
40
|
+
**Group B -- Code Quality**
|
|
41
|
+
- Functions are small and focused; flag functions > ~50 lines or with > ~3 nested control levels.
|
|
42
|
+
- Naming is clear, consistent with `naming-conventions.md`, and matches surrounding code.
|
|
43
|
+
- No duplication: same logic appearing >= 3 times warrants extraction.
|
|
44
|
+
- No premature abstraction: a single-use helper / interface / wrapper is a finding.
|
|
45
|
+
- No dead code, unused imports, commented-out blocks left behind.
|
|
46
|
+
|
|
47
|
+
**Group C -- Error Handling**
|
|
48
|
+
- Error handling appears only at system boundaries (HTTP, DB, external API, file IO, queue).
|
|
49
|
+
- Interior try/catch must have an explicit reason in a one-line comment, otherwise findable.
|
|
50
|
+
- No swallowed errors (catch without rethrow / log / explicit recovery).
|
|
51
|
+
- Error types are specific where the language supports it (no bare `catch Exception` without rethrow).
|
|
52
|
+
|
|
53
|
+
**Group D -- Edge Cases**
|
|
54
|
+
- Boundary inputs handled: empty / null / max length / negative / zero / unicode.
|
|
55
|
+
- Concurrency: shared state, async ordering, idempotency where required by design.
|
|
56
|
+
- Resource lifecycle: opened resources are closed on all paths.
|
|
57
|
+
- Off-by-one: loop bounds, slice indices, pagination cursors.
|
|
58
|
+
|
|
59
|
+
**Group E -- Tests** (if test files are in scope)
|
|
60
|
+
- Each business rule from `project-context.md` has at least one test case.
|
|
61
|
+
- Tests assert behavior, not implementation details.
|
|
62
|
+
- No `skip` / `only` / commented-out tests left in.
|
|
63
|
+
- Test names describe the scenario, not the function name.
|
|
64
|
+
|
|
65
|
+
**Group F -- Security** (if user requirements mention auth/data sensitivity OR `--aspect security`)
|
|
66
|
+
- No secrets in code or test fixtures.
|
|
67
|
+
- Input validation at every external boundary.
|
|
68
|
+
- Auth/authz checks present on every protected endpoint or operation.
|
|
69
|
+
- SQL/NoSQL/HTML rendered through parameterized / escaped APIs.
|
|
70
|
+
|
|
71
|
+
### Step 5: Categorize and De-duplicate Findings
|
|
72
|
+
- **Severity**: assign each finding using the table below.
|
|
73
|
+
|
|
74
|
+
| Level | Definition | Examples |
|
|
75
|
+
|-------|------------|----------|
|
|
76
|
+
| **Critical** | Bug, security flaw, broken contract, data loss risk, layer violation that breaks isolation | Swallowed exception in payment path; missing auth on protected endpoint; forbidden cross-layer import |
|
|
77
|
+
| **Warning** | Likely problem or significant quality issue: not a bug today, but high-risk or maintainability hazard | Function 200 lines; duplicated logic 3x; missing tests for a documented business rule |
|
|
78
|
+
| **Suggestion** | Improvement, polish, taste preference | Variable name could be clearer; could split a small helper; minor docstring gap |
|
|
79
|
+
|
|
80
|
+
- Merge duplicate findings (same root cause appearing in multiple files) into one entry with a list of locations.
|
|
81
|
+
- Each finding must include: file, line range, severity, observation, recommendation.
|
|
82
|
+
|
|
83
|
+
### Step 6: Write Artifact
|
|
84
|
+
- **Path**: `.ai-agents/workspace/artifacts/{active_change.id}/review.md` if `active_change` exists; else `.ai-agents/workspace/artifacts/_ad-hoc-review-{YYYY-MM-DD-HHMM}/review.md`.
|
|
85
|
+
- **Template**: `.ai-agents/skills/_templates/review-output.md` (custom override at `_templates/custom/...` takes precedence).
|
|
86
|
+
- **Required content** (mapped to template headings):
|
|
87
|
+
- `Review Scope` -- file list, depth, aspect filter, fallbacks applied (e.g., "design.md missing -> Group A skipped").
|
|
88
|
+
- `Summary` -- counts per severity + one-paragraph overall verdict (Approve / Approve with comments / Request changes / Block).
|
|
89
|
+
- `Critical Findings` -- one entry per finding.
|
|
90
|
+
- `Warnings`.
|
|
91
|
+
- `Suggestions`.
|
|
92
|
+
- `Skipped Checks` -- groups skipped because inputs were missing, with reason.
|
|
93
|
+
- `Recommended Next Skill` -- e.g., `/mvt-fix` for Critical, `/mvt-test` if Group E gaps, `/mvt-refactor` if Group B is dominant.
|
|
94
|
+
|
|
95
|
+
### Step 7: Verdict Rule
|
|
96
|
+
- Critical > 0 -> verdict is `Request changes`. Suggest `/mvt-fix`.
|
|
97
|
+
- Critical = 0, Warnings > 5 -> verdict is `Approve with comments`.
|
|
98
|
+
- Critical = 0, Warnings <= 5, Suggestions only -> verdict is `Approve`.
|
|
99
|
+
- Code-only review (design.md missing) -> verdict cannot be higher than `Approve with comments` (call it out explicitly).
|
|
100
|
+
|
|
101
|
+
### Step 8: (session update handled by shared section)
|
|
102
|
+
|
|
103
|
+
## Edge Cases & Errors
|
|
104
|
+
|
|
105
|
+
| Case | Handling |
|
|
106
|
+
|------|----------|
|
|
107
|
+
| Review target is generated code (build output, lockfile, vendored dep) | Skip with a one-line note in artifact; do not flag findings |
|
|
108
|
+
| All Group A inputs missing | Run as code-only review; cap verdict at `Approve with comments` |
|
|
109
|
+
| User asked for review but there are zero changes | STOP, report "no diff to review", do not write artifact |
|
|
110
|
+
| Findings in the same file conflict (e.g., quality says "extract", architecture says "do not introduce a new module") | Defer to architecture; record the tension in `Suggestions` |
|
|
111
|
+
| Implementation explicitly documents a deviation from design (in `Deviations from Design`) | Treat as accepted -- flag only if the deviation is itself problematic |
|
|
112
|
+
| Reviewer finds bugs requiring discussion before fix | Mark Critical, but do NOT auto-invoke `/mvt-fix`; leave the call to the user |
|
|
@@ -1,106 +1,87 @@
|
|
|
1
|
-
name: mvt-review
|
|
2
|
-
output: .claude/skills/mvt-review/SKILL.md
|
|
3
|
-
|
|
4
|
-
frontmatter:
|
|
5
|
-
name: mvt-review
|
|
6
|
-
description: "Perform code review for quality, standards compliance, and best practices.
|
|
7
|
-
|
|
8
|
-
sections:
|
|
9
|
-
- type: inline
|
|
10
|
-
content: |
|
|
11
|
-
# MVT Review
|
|
12
|
-
|
|
13
|
-
## Purpose
|
|
14
|
-
|
|
15
|
-
Review code for quality, standards compliance, and best practices. Identify issues by severity, suggest improvements, and ensure architecture compliance.
|
|
16
|
-
|
|
17
|
-
- type: shared
|
|
18
|
-
source: sections/role-header.md
|
|
19
|
-
params:
|
|
20
|
-
role: Reviewer
|
|
21
|
-
role_desc: "a Code Quality Guardian"
|
|
22
|
-
decision_rules:
|
|
23
|
-
- rule: "Critical issue found (security, data loss, crash) -> Mark as CRITICAL, require fix before merge"
|
|
24
|
-
- rule: "
|
|
25
|
-
- rule: "Minor style issue -> Note as suggestion, don't block"
|
|
26
|
-
- rule: "Subjective preference -> Mark as \"non-blocking\" optional improvement"
|
|
27
|
-
- rule: "Good code pattern found -> Highlight positively"
|
|
28
|
-
- rule: "Bug found -> Document with reproduction steps, suggest `/mvt-fix`"
|
|
29
|
-
- rule: "Insufficient test coverage -> Recommend specific scenarios, suggest `/mvt-test`"
|
|
30
|
-
boundaries:
|
|
31
|
-
- scope: "fix code directly"
|
|
32
|
-
skill: "/mvt-fix"
|
|
33
|
-
- scope: "make architecture decisions"
|
|
34
|
-
skill: "/mvt-design"
|
|
35
|
-
- scope: "modify source code"
|
|
36
|
-
skill: "(This is a read-only review)"
|
|
37
|
-
|
|
38
|
-
- type: inline
|
|
39
|
-
content: |
|
|
40
|
-
## Aspect Options
|
|
41
|
-
|
|
42
|
-
| Aspect | Focus Areas |
|
|
43
|
-
|--------|-------------|
|
|
44
|
-
| `architecture` |
|
|
45
|
-
| `security` | Input validation, injection prevention, authentication |
|
|
46
|
-
| `performance` | N+1 queries, memory leaks, caching |
|
|
47
|
-
| `style` | Naming conventions, formatting, documentation |
|
|
48
|
-
|
|
49
|
-
Usage: `/mvt-review` or `/mvt-review --aspect {type}`
|
|
50
|
-
|
|
51
|
-
- type: shared
|
|
52
|
-
source: sections/activation-load-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- type:
|
|
85
|
-
source:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
content: |
|
|
89
|
-
## Output Format
|
|
90
|
-
|
|
91
|
-
Read and use the output template from: `.ai-agents/skills/_templates/review-output.md`
|
|
92
|
-
|
|
93
|
-
If a custom version exists at `.ai-agents/skills/_templates/custom/review-output.md`, use the custom version instead.
|
|
94
|
-
|
|
95
|
-
Fill the template placeholders with the review results.
|
|
96
|
-
|
|
97
|
-
Every response MUST end with a Suggested Next Steps section.
|
|
98
|
-
|
|
99
|
-
- type: shared
|
|
100
|
-
source: sections/footer-next-steps.md
|
|
101
|
-
params:
|
|
102
|
-
next_primary: mvt-fix
|
|
103
|
-
next_primary_desc: "Address critical issues"
|
|
104
|
-
next_alternatives:
|
|
105
|
-
- skill: mvt-test
|
|
106
|
-
when: "Add missing tests"
|
|
1
|
+
name: mvt-review
|
|
2
|
+
output: .claude/skills/mvt-review/SKILL.md
|
|
3
|
+
|
|
4
|
+
frontmatter:
|
|
5
|
+
name: mvt-review
|
|
6
|
+
description: "Perform code review for quality, standards compliance, and best practices. This skill should be used when user wants code reviewed, quality checked, or to identify issues before merging."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Review
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Review code for quality, standards compliance, and best practices. Identify issues by severity, suggest improvements, and ensure architecture compliance.
|
|
16
|
+
|
|
17
|
+
- type: shared
|
|
18
|
+
source: sections/role-header.md
|
|
19
|
+
params:
|
|
20
|
+
role: Reviewer
|
|
21
|
+
role_desc: "a Code Quality Guardian"
|
|
22
|
+
decision_rules:
|
|
23
|
+
- rule: "Critical issue found (security, data loss, crash) -> Mark as CRITICAL, require fix before merge"
|
|
24
|
+
- rule: "Layer violation found -> Flag for Architect, suggest `/mvt-design`"
|
|
25
|
+
- rule: "Minor style issue -> Note as suggestion, don't block"
|
|
26
|
+
- rule: "Subjective preference -> Mark as \"non-blocking\" optional improvement"
|
|
27
|
+
- rule: "Good code pattern found -> Highlight positively"
|
|
28
|
+
- rule: "Bug found -> Document with reproduction steps, suggest `/mvt-fix`"
|
|
29
|
+
- rule: "Insufficient test coverage -> Recommend specific scenarios, suggest `/mvt-test`"
|
|
30
|
+
boundaries:
|
|
31
|
+
- scope: "fix code directly"
|
|
32
|
+
skill: "/mvt-fix"
|
|
33
|
+
- scope: "make architecture decisions"
|
|
34
|
+
skill: "/mvt-design"
|
|
35
|
+
- scope: "modify source code"
|
|
36
|
+
skill: "(This is a read-only review)"
|
|
37
|
+
|
|
38
|
+
- type: inline
|
|
39
|
+
content: |
|
|
40
|
+
## Aspect Options
|
|
41
|
+
|
|
42
|
+
| Aspect | Focus Areas |
|
|
43
|
+
|--------|-------------|
|
|
44
|
+
| `architecture` | Layer compliance, module boundaries, dependency direction |
|
|
45
|
+
| `security` | Input validation, injection prevention, authentication |
|
|
46
|
+
| `performance` | N+1 queries, memory leaks, caching |
|
|
47
|
+
| `style` | Naming conventions, formatting, documentation |
|
|
48
|
+
|
|
49
|
+
Usage: `/mvt-review` or `/mvt-review --aspect {type}`
|
|
50
|
+
|
|
51
|
+
- type: shared
|
|
52
|
+
source: sections/activation-load-config.md
|
|
53
|
+
|
|
54
|
+
- type: shared
|
|
55
|
+
source: sections/output-language-constraint.md
|
|
56
|
+
|
|
57
|
+
- type: shared
|
|
58
|
+
source: sections/activation-preflight.md
|
|
59
|
+
params:
|
|
60
|
+
checks:
|
|
61
|
+
- order: "1"
|
|
62
|
+
field: "session.initialized_at"
|
|
63
|
+
level: "WARN"
|
|
64
|
+
message: "Session not initialized. Run `/mvt-init` first."
|
|
65
|
+
- order: "2"
|
|
66
|
+
field: "no code to review"
|
|
67
|
+
level: "WARN"
|
|
68
|
+
message: "No code to review. Run `/mvt-implement` first or specify files."
|
|
69
|
+
|
|
70
|
+
- type: file
|
|
71
|
+
source: ./business.md
|
|
72
|
+
|
|
73
|
+
- type: inline
|
|
74
|
+
content: |
|
|
75
|
+
## Artifact Structure
|
|
76
|
+
Read the document structure template from: `.ai-agents/skills/_templates/review-output.md`
|
|
77
|
+
If a custom version exists at `.ai-agents/skills/_templates/custom/review-output.md`, use the custom version instead.
|
|
78
|
+
The template defines section headings only. Generate content for each section based on review results.
|
|
79
|
+
Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/review.md`
|
|
80
|
+
|
|
81
|
+
- type: shared
|
|
82
|
+
source: sections/session-update.md
|
|
83
|
+
|
|
84
|
+
- type: shared
|
|
85
|
+
source: sections/footer-next-steps.md
|
|
86
|
+
params:
|
|
87
|
+
current_skill: mvt-review
|
|
@@ -1,24 +1,71 @@
|
|
|
1
|
-
## Execution Flow
|
|
2
|
-
|
|
3
|
-
### Step 1: Load
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Load Inputs
|
|
4
|
+
- **Recommended**:
|
|
5
|
+
- `.ai-agents/knowledge/project/_generated/project-context.md` -- semantic context (only checked for existence here, not parsed).
|
|
6
|
+
- **Fallback / robustness**:
|
|
7
|
+
- If a YAML file is missing, mark its section as `(unavailable)` in the report and continue. Do not abort the whole skill.
|
|
8
|
+
- If a YAML file fails to parse, surface a one-line error with the file path and skip the affected section. Do not attempt automatic repair.
|
|
9
|
+
- If `session.yaml` exists but is empty (zero keys), treat as `not initialized` -> recommend `/mvt-init`.
|
|
10
|
+
|
|
11
|
+
### Step 2: Build Activity Timeline
|
|
12
|
+
- **What**: produce the most-recent-first list of skill_history entries with derived metadata.
|
|
13
|
+
- **How**:
|
|
14
|
+
1. Read `skill_history` from `session.yaml`.
|
|
15
|
+
2. For each entry, attach: relative time (e.g., "2h ago"), `change_id` (if present), and the originating skill name.
|
|
16
|
+
3. Limit to the last 10 entries for the rendered table; keep full count separately for the summary line.
|
|
17
|
+
|
|
18
|
+
### Step 3: Discover All Plans (Multi-Change Dashboard)
|
|
19
|
+
- **What**: produce the canonical plan list across the workspace.
|
|
20
|
+
- **How**:
|
|
21
|
+
1. Iterate `recent_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 `recent_changes` (mark them `unindexed`).
|
|
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
|
+
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
|
+
- **Branches**:
|
|
26
|
+
|
|
27
|
+
| Condition | Action |
|
|
28
|
+
|-----------|--------|
|
|
29
|
+
| No plans found anywhere | Skip the Changes Overview section entirely; render only legacy `active_change` summary |
|
|
30
|
+
| One plan found | Render Changes Overview with one row |
|
|
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
|
+
| Any plan over the cap (more than ~12 rows) | Show top 10 rows; print a `+N older changes hidden -- see artifacts/` line |
|
|
33
|
+
|
|
34
|
+
### Step 4: Build the Status Report
|
|
35
|
+
- Render in this order, omitting any section whose inputs were unavailable:
|
|
36
|
+
|
|
37
|
+
1. **Header** -- one-line summary: project name (from `project-context.yaml`), framework version, last synced timestamp.
|
|
38
|
+
2. **Projects** -- table: name | type | tech stack (truncated). Cap at 10 rows; collapse the rest into `+N more`.
|
|
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, current phase, start time. Else: `none`.
|
|
41
|
+
5. **Changes Overview** -- table from Step 3 (skip if no plans). Render with these columns:
|
|
42
|
+
|
|
43
|
+
| change-id | title | status | progress | current_task | last_updated |
|
|
44
|
+
|-----------|-------|--------|----------|--------------|--------------|
|
|
45
|
+
6. **Skill History** -- last 5 rows of the timeline from Step 2.
|
|
46
|
+
7. **Recent Actions** -- compact list (max 5).
|
|
47
|
+
|
|
48
|
+
- Hard cap: total rendered output should not exceed ~120 lines. If it would, truncate Skill History and Recent Actions first; never truncate the active change or Changes Overview header rows.
|
|
49
|
+
|
|
50
|
+
### Step 5: Suggest Next Step
|
|
51
|
+
- Resolution order (first match wins):
|
|
52
|
+
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. `active_change` exists but no plan -> infer next workflow phase from `skill_history` (last completed phase determines next).
|
|
54
|
+
3. No `active_change`, but `project-context.md` is missing -> suggest `/mvt-analyze-code`.
|
|
55
|
+
4. No `active_change`, no missing context -> suggest `/mvt-analyze` to start a new feature OR `/mvt-help` to browse the catalog.
|
|
56
|
+
- The suggestion must be a single line: skill command + one-clause reason.
|
|
57
|
+
|
|
58
|
+
### Step 6: (session update handled by shared section)
|
|
59
|
+
|
|
60
|
+
## Edge Cases & Errors
|
|
61
|
+
|
|
62
|
+
| Case | Handling |
|
|
63
|
+
|------|----------|
|
|
64
|
+
| `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-sync-context` |
|
|
66
|
+
| `recent_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
|
+
| Plan file's `current_task` references a task id not in `tasks[]` | Render `current_task` as `(invalid: <id>)`; do not attempt to fix |
|
|
68
|
+
| 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 `recent_changes[]` and the artifact glob find the same plan | Deduplicate by `change_id`; prefer the indexed entry's metadata |
|
|
70
|
+
| 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
|
+
| Workspace contains zero projects | Render header only with a single suggestion: `/mvt-init` |
|