@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
|
@@ -1,93 +1,101 @@
|
|
|
1
|
-
name: mvt-init
|
|
2
|
-
output: .claude/skills/mvt-init/SKILL.md
|
|
3
|
-
|
|
4
|
-
frontmatter:
|
|
5
|
-
name: mvt-init
|
|
6
|
-
description: "Initialize or refresh a project
|
|
7
|
-
|
|
8
|
-
sections:
|
|
9
|
-
- type: inline
|
|
10
|
-
content: |
|
|
11
|
-
# MVT Init
|
|
12
|
-
|
|
13
|
-
## Purpose
|
|
14
|
-
|
|
15
|
-
Initialize a project by scanning its structure, detecting
|
|
16
|
-
|
|
17
|
-
- type: shared
|
|
18
|
-
source: sections/role-header.md
|
|
19
|
-
params:
|
|
20
|
-
role: Conductor
|
|
21
|
-
role_desc: "a Workflow Coordinator"
|
|
22
|
-
decision_rules:
|
|
23
|
-
- rule: "If user intent is unclear -> Ask a clarifying question before proceeding"
|
|
24
|
-
- rule: "If `session.yaml` shows `initialized_at: \"\"` -> This is a fresh init"
|
|
25
|
-
- rule: "If `session.yaml` shows existing data -> This is a refresh (preserve existing state)"
|
|
26
|
-
- rule: "If no project files found -> Warn user this may be an empty project"
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
name: mvt-init
|
|
2
|
+
output: .claude/skills/mvt-init/SKILL.md
|
|
3
|
+
|
|
4
|
+
frontmatter:
|
|
5
|
+
name: mvt-init
|
|
6
|
+
description: "Initialize or refresh a project by scanning its structure, detecting tech stack, and inferring project type. This skill should be used when starting a new project, re-initializing after structural changes, or setting up the MVTT workspace."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Init
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Initialize a project by scanning its structure, detecting tech stack, inferring project type, and writing the lean project index. This is the entry point for the MVTT framework.
|
|
16
|
+
|
|
17
|
+
- type: shared
|
|
18
|
+
source: sections/role-header.md
|
|
19
|
+
params:
|
|
20
|
+
role: Conductor
|
|
21
|
+
role_desc: "a Workflow Coordinator"
|
|
22
|
+
decision_rules:
|
|
23
|
+
- rule: "If user intent is unclear -> Ask a clarifying question before proceeding"
|
|
24
|
+
- rule: "If `session.yaml` shows `initialized_at: \"\"` -> This is a fresh init"
|
|
25
|
+
- rule: "If `session.yaml` shows existing data -> This is a refresh (preserve existing state)"
|
|
26
|
+
- rule: "If no project files found -> Warn user this may be an empty project"
|
|
27
|
+
- rule: "If multiple languages detected -> Flag as monorepo candidate, identify primary language"
|
|
28
|
+
- rule: "If project type is ambiguous -> Prompt for confirmation between top candidates"
|
|
29
|
+
- rule: "If existing workspace files found on refresh -> Show diff and confirm before overwrite"
|
|
30
|
+
boundaries:
|
|
31
|
+
- scope: "analyze requirements"
|
|
32
|
+
skill: "/mvt-analyze"
|
|
33
|
+
- scope: "analyze existing code"
|
|
34
|
+
skill: "/mvt-analyze-code"
|
|
35
|
+
- scope: "design architecture"
|
|
36
|
+
skill: "/mvt-design"
|
|
37
|
+
- scope: "write implementation code"
|
|
38
|
+
skill: "/mvt-implement"
|
|
39
|
+
|
|
40
|
+
- type: inline
|
|
41
|
+
content: |
|
|
42
|
+
## Variants
|
|
43
|
+
|
|
44
|
+
| Variant | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `/mvt-init` | Standard initialization (scan + detect + write index) |
|
|
47
|
+
| `/mvt-init --refresh` | Re-scan existing project -- preserve user state, update auto-detectable fields, show diff before writing |
|
|
48
|
+
|
|
49
|
+
- type: shared
|
|
50
|
+
source: sections/activation-load-context.md
|
|
51
|
+
params:
|
|
52
|
+
extended_context:
|
|
53
|
+
- "Scan project root for config files (package.json, requirements.txt, pom.xml, etc.)"
|
|
54
|
+
- "Scan project root for directory structure (src/, lib/, app/, tests/, etc.)"
|
|
55
|
+
|
|
56
|
+
- type: shared
|
|
57
|
+
source: sections/activation-load-config.md
|
|
58
|
+
|
|
59
|
+
- type: shared
|
|
60
|
+
source: sections/output-language-constraint.md
|
|
61
|
+
|
|
62
|
+
- type: shared
|
|
63
|
+
source: sections/activation-preflight.md
|
|
64
|
+
params:
|
|
65
|
+
checks:
|
|
66
|
+
- order: "1"
|
|
67
|
+
field: "session and project-context both empty"
|
|
68
|
+
level: "INFO"
|
|
69
|
+
message: "This is a first-time init, proceed normally."
|
|
70
|
+
|
|
71
|
+
- type: file
|
|
72
|
+
source: ./business.md
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
- type: shared
|
|
76
|
+
source: sections/session-update.md
|
|
77
|
+
params:
|
|
78
|
+
update_initialized_at: true
|
|
79
|
+
|
|
80
|
+
- type: shared
|
|
81
|
+
source: sections/footer-next-steps.md
|
|
82
|
+
params:
|
|
83
|
+
current_skill: mvt-init
|
|
84
|
+
conditional_suggestions:
|
|
85
|
+
conditions:
|
|
86
|
+
- condition: "has_existing_code"
|
|
87
|
+
primary: mvt-analyze-code
|
|
88
|
+
primary_desc: "Reverse-analyze existing codebase to generate project-context.md"
|
|
89
|
+
- condition: "empty_project"
|
|
90
|
+
primary: mvt-manage-context
|
|
91
|
+
primary_desc: "Manually add project context, requirements, or team conventions"
|
|
92
|
+
- condition: "default"
|
|
93
|
+
primary: mvt-analyze
|
|
94
|
+
primary_desc: "Start analyzing requirements"
|
|
95
|
+
alternatives:
|
|
96
|
+
- skill: mvt-manage-context
|
|
97
|
+
desc: "Manually add team conventions or domain knowledge"
|
|
98
|
+
- skill: mvt-analyze
|
|
99
|
+
desc: "Start from a requirements document"
|
|
100
|
+
- skill: mvt-status
|
|
101
|
+
desc: "Inspect current project status"
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Parse Subcommand
|
|
4
|
+
|
|
5
|
+
Detect the subcommand from the invocation:
|
|
6
|
+
|
|
7
|
+
| Invocation | Subcommand |
|
|
8
|
+
|------------|-----------|
|
|
9
|
+
| `/mvt-manage-context` | interactive menu (prompt user to pick add / remove / move / rename / list) |
|
|
10
|
+
| `/mvt-manage-context add` | add |
|
|
11
|
+
| `/mvt-manage-context remove [id]` | remove |
|
|
12
|
+
| `/mvt-manage-context move [id]` | move |
|
|
13
|
+
| `/mvt-manage-context rename [id]` | rename |
|
|
14
|
+
| `/mvt-manage-context list` | list |
|
|
15
|
+
|
|
16
|
+
For interactive menu, present the five options and wait for user choice, then enter that flow.
|
|
17
|
+
|
|
18
|
+
### Step 2: Subcommand Routing
|
|
19
|
+
|
|
20
|
+
Switch to the matching section below.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Subcommand: add
|
|
25
|
+
|
|
26
|
+
### 2.1 Collect content
|
|
27
|
+
Prompt user for the knowledge content. Accept either:
|
|
28
|
+
- Pasted text -> save to a new file
|
|
29
|
+
- Path to an existing file -> import in place
|
|
30
|
+
|
|
31
|
+
### 2.2 Detect knowledge type
|
|
32
|
+
Classify the content into one of:
|
|
33
|
+
- `principle` -- coding standards, naming conventions, review rules, team policies
|
|
34
|
+
- `project` -- domain knowledge, business rules, API specs, integration notes
|
|
35
|
+
- `core/user` -- universal principles the user wants applied to **every** skill (rare; explicit opt-in)
|
|
36
|
+
|
|
37
|
+
The skill should suggest a type based on content keywords; the user confirms or overrides.
|
|
38
|
+
|
|
39
|
+
### 2.3 AI Routing -- Score every skill
|
|
40
|
+
|
|
41
|
+
1. Read `.ai-agents/registry.yaml` > `skills.*` -- collect every skill's `name` and `description`.
|
|
42
|
+
2. For each skill, score relevance to the content on a 0-100 scale:
|
|
43
|
+
- 90-100: directly aligned (e.g., review rules + `mvt-review`)
|
|
44
|
+
- 70-89: strongly relevant
|
|
45
|
+
- 50-69: tangentially relevant
|
|
46
|
+
- 0-49: weak match
|
|
47
|
+
3. Read `.ai-agents/config.yaml` > `preferences.context_routing.relevance_threshold` (default 70 if missing).
|
|
48
|
+
4. Display **all** skills sorted by score descending. Do not truncate -- the user sees the full list with scores.
|
|
49
|
+
- Skills at or above threshold: pre-checked, shown with `[High]` / `[Med]` markers (or stars in emoji mode).
|
|
50
|
+
- Skills below threshold: collapsed under an "expand" prompt; not pre-checked.
|
|
51
|
+
|
|
52
|
+
### 2.4 Accept user input
|
|
53
|
+
Accept any of:
|
|
54
|
+
- `Enter` (empty input) -- confirm pre-checked selection
|
|
55
|
+
- Comma-separated indices (e.g. `1,3,5`) -- custom skill selection
|
|
56
|
+
- `s` -- promote to **shared** (write to `registry.yaml > knowledge.shared`)
|
|
57
|
+
- `c` -- promote to **core** (write to `.ai-agents/knowledge/core/user/{filename}` + append entry to `core/manifest.yaml` with `origin: user`)
|
|
58
|
+
- `n` -- **none** (file-only; not auto-loaded)
|
|
59
|
+
- `m` -- **manual** mode (display the full skill list including below-threshold for direct picking)
|
|
60
|
+
- `expand` -- show below-threshold skills inline
|
|
61
|
+
|
|
62
|
+
### 2.5 Resolve target path
|
|
63
|
+
|
|
64
|
+
| User choice | File destination | Registry / manifest update |
|
|
65
|
+
|------------|-----------------|----------------------------|
|
|
66
|
+
| Per-skill (any subset) | `.ai-agents/knowledge/{type}/{filename}` (`type` = `principle` or `project`) | For each chosen skill: append entry to `registry.yaml > skills.{name}.knowledge[]` with `type: static`, `source: knowledge/{type}/`, `files: [{filename}]` |
|
|
67
|
+
| `s` (shared) | `.ai-agents/knowledge/{type}/{filename}` | Append to `registry.yaml > knowledge.shared[]` with the same `type: static` shape |
|
|
68
|
+
| `c` (core) | `.ai-agents/knowledge/core/user/{filename}` | Append to `core/manifest.yaml > files[]` with `path: user/{filename}`, `origin: user`, `auto_load: true` |
|
|
69
|
+
| `n` (none) | `.ai-agents/knowledge/{type}/{filename}` | No registry/manifest change |
|
|
70
|
+
|
|
71
|
+
If the user chose multiple bindings (e.g., shared + per-skill review), apply each rule.
|
|
72
|
+
|
|
73
|
+
### 2.6 Write atomically
|
|
74
|
+
1. Write the knowledge file.
|
|
75
|
+
2. Update `registry.yaml` (and/or `core/manifest.yaml`) with all references.
|
|
76
|
+
3. If any write fails, roll back: delete the new file, revert the registry/manifest edits.
|
|
77
|
+
|
|
78
|
+
### 2.7 Report
|
|
79
|
+
Use the `add / move / rename` output format from the manifest. Show:
|
|
80
|
+
- The routing decision table (skill, score, bound or not)
|
|
81
|
+
- The files modified
|
|
82
|
+
- Token impact estimate (sum of file size / 4)
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Subcommand: remove
|
|
87
|
+
|
|
88
|
+
### 3.1 Identify target
|
|
89
|
+
- If `[id]` was provided: jump to 3.2
|
|
90
|
+
- Otherwise: list all knowledge entries with their IDs and locations (same format as `list`), prompt user to pick one
|
|
91
|
+
|
|
92
|
+
### 3.2 Confirm deletion
|
|
93
|
+
Show the entry's file path, all binding references (shared / per-skill / core), and ask user to confirm.
|
|
94
|
+
|
|
95
|
+
### 3.3 Drop references
|
|
96
|
+
- `registry.yaml > knowledge.shared[]` -- remove entries whose path matches
|
|
97
|
+
- `registry.yaml > skills.*.knowledge[]` -- remove every per-skill entry whose path matches
|
|
98
|
+
- `core/manifest.yaml > files[]` -- if the file lives under `core/user/`, remove the matching entry
|
|
99
|
+
|
|
100
|
+
### 3.4 Delete file
|
|
101
|
+
Delete the physical file. If multiple entries pointed to the same file, only delete after all references are cleared.
|
|
102
|
+
|
|
103
|
+
### 3.5 Report
|
|
104
|
+
Use the `remove` output format. Show every reference dropped.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Subcommand: move
|
|
109
|
+
|
|
110
|
+
### 4.1 Identify source
|
|
111
|
+
- If `[id]` was provided: jump to 4.2
|
|
112
|
+
- Otherwise: prompt user to pick from `list` output
|
|
113
|
+
|
|
114
|
+
### 4.2 Show current binding
|
|
115
|
+
Display where the entry is currently bound (shared / per-skill / core / none).
|
|
116
|
+
|
|
117
|
+
### 4.3 Prompt for new binding
|
|
118
|
+
Use the same UI as `add` step 2.4 (Enter / indices / `s` / `c` / `n`).
|
|
119
|
+
|
|
120
|
+
### 4.4 Apply changes
|
|
121
|
+
- Update registry / manifest references atomically:
|
|
122
|
+
- Remove old references that no longer apply
|
|
123
|
+
- Add new references for newly chosen bindings
|
|
124
|
+
- If the new binding requires the file to live in a different directory (e.g., promoting a `principle/` file to `core/user/`):
|
|
125
|
+
- Move the physical file
|
|
126
|
+
- Update the `path` field in every retained reference to match
|
|
127
|
+
|
|
128
|
+
### 4.5 Report
|
|
129
|
+
Use the `add / move / rename` output format. Highlight which references moved.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Subcommand: rename
|
|
134
|
+
|
|
135
|
+
### 5.1 Identify source
|
|
136
|
+
Same as `move` step 4.1.
|
|
137
|
+
|
|
138
|
+
### 5.2 Prompt for new id
|
|
139
|
+
- Validate uniqueness against existing entries (under the same binding scope)
|
|
140
|
+
- Validate filename safety (no path separators, no leading dots)
|
|
141
|
+
|
|
142
|
+
### 5.3 Apply changes
|
|
143
|
+
- Rename the physical file (`old/path/old-id.md` -> `old/path/new-id.md`)
|
|
144
|
+
- Update every retained reference in `registry.yaml` and `core/manifest.yaml` to point to the new path
|
|
145
|
+
|
|
146
|
+
### 5.4 Report
|
|
147
|
+
Use the `add / move / rename` output format.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Subcommand: list
|
|
152
|
+
|
|
153
|
+
### 6.1 Read sources
|
|
154
|
+
- `.ai-agents/registry.yaml` > `knowledge.shared[]` and `skills.*.knowledge[]`
|
|
155
|
+
- `.ai-agents/knowledge/core/manifest.yaml` > `files[]`
|
|
156
|
+
- Walk `.ai-agents/knowledge/{principle,project}/` for files not referenced anywhere (Unbound)
|
|
157
|
+
|
|
158
|
+
### 6.2 Group and render
|
|
159
|
+
Use the `list` output format. Each row should answer: where is the file, and which skills load it?
|
|
160
|
+
|
|
161
|
+
For Per-Skill rows, list every skill that binds to the file (a single file can be bound to multiple skills).
|
|
162
|
+
|
|
163
|
+
### 6.3 Health hints
|
|
164
|
+
At the bottom of the list, optionally surface:
|
|
165
|
+
- "N file(s) present but unbound -- consider `/mvt-manage-context move` or `/mvt-manage-context remove`"
|
|
166
|
+
- "Total token cost (auto-loaded): ~X tokens" -- approximate
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Cross-cutting rules
|
|
171
|
+
|
|
172
|
+
- **Atomicity**: file system writes and registry/manifest writes must succeed together. On partial failure, restore the previous state.
|
|
173
|
+
- **No edits to framework files**: never write to `.ai-agents/knowledge/core/_framework/`. If user content would land there by accident, redirect to `core/user/`.
|
|
174
|
+
- **Backups**: before mutating `registry.yaml` or `core/manifest.yaml`, copy them to `.ai-agents/.backup/{filename}-{timestamp}.yaml`.
|
|
175
|
+
- **Idempotency**: re-running the same `add` (same content + same bindings) should detect the existing entry and offer "skip / overwrite / cancel" rather than silently duplicating.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
name: mvt-manage-context
|
|
2
|
+
output: .claude/skills/mvt-manage-context/SKILL.md
|
|
3
|
+
|
|
4
|
+
frontmatter:
|
|
5
|
+
name: mvt-manage-context
|
|
6
|
+
description: "Unified entry point for managing knowledge and registry. Supports subcommands: add (with AI routing), remove, move, rename, list. Use this skill instead of mvt-add-context."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Manage Context
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Unified CRUD entry point for project context and knowledge entries. Handles add (with AI-driven skill routing), remove, move, rename, and list operations across `project-context.yaml`, `project-context.md`, `knowledge/principle/`, `knowledge/project/`, `knowledge/core/user/`, and the corresponding `registry.yaml` / `core/manifest.yaml` references.
|
|
16
|
+
|
|
17
|
+
- type: shared
|
|
18
|
+
source: sections/role-header.md
|
|
19
|
+
params:
|
|
20
|
+
role: Conductor
|
|
21
|
+
role_desc: "a Knowledge Curator"
|
|
22
|
+
decision_rules:
|
|
23
|
+
- rule: "User invokes without subcommand -> Show interactive menu of operations"
|
|
24
|
+
- rule: "Add a knowledge file -> Run AI routing, suggest skill bindings, write file + update registry/manifest atomically"
|
|
25
|
+
- rule: "Remove a knowledge entry -> Drop both the file and every registry/manifest reference, show diff"
|
|
26
|
+
- rule: "Move binding (per-skill <-> shared <-> core) -> Update references and (if path changes) physically move the file"
|
|
27
|
+
- rule: "Rename a knowledge id -> Update file path + every registry/manifest reference in lockstep"
|
|
28
|
+
- rule: "List request -> Group entries by binding type and show which skills load each"
|
|
29
|
+
- rule: "AI routing produces no candidate above threshold -> Recommend `none` (file-only) or prompt user to broaden scope"
|
|
30
|
+
boundaries:
|
|
31
|
+
- scope: "analyze code automatically"
|
|
32
|
+
skill: "/mvt-sync-context or /mvt-analyze-code"
|
|
33
|
+
- scope: "make architecture decisions"
|
|
34
|
+
skill: "/mvt-design"
|
|
35
|
+
- scope: "write implementation code"
|
|
36
|
+
skill: "/mvt-implement"
|
|
37
|
+
- scope: "edit framework knowledge under core/_framework/"
|
|
38
|
+
skill: "(Read-only -- framework files are not user-editable)"
|
|
39
|
+
|
|
40
|
+
- type: shared
|
|
41
|
+
source: sections/activation-load-context.md
|
|
42
|
+
|
|
43
|
+
- type: shared
|
|
44
|
+
source: sections/activation-load-config.md
|
|
45
|
+
|
|
46
|
+
- type: shared
|
|
47
|
+
source: sections/output-language-constraint.md
|
|
48
|
+
|
|
49
|
+
- type: inline
|
|
50
|
+
content: |
|
|
51
|
+
### Step 3: Pre-flight Checks
|
|
52
|
+
- No blocking checks required.
|
|
53
|
+
|
|
54
|
+
- type: file
|
|
55
|
+
source: ./business.md
|
|
56
|
+
|
|
57
|
+
- type: inline
|
|
58
|
+
content: |
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
No external template -- output is inline. Format depends on subcommand:
|
|
62
|
+
|
|
63
|
+
### add / move / rename
|
|
64
|
+
```markdown
|
|
65
|
+
## Knowledge Updated
|
|
66
|
+
|
|
67
|
+
### Operation: {add | move | rename}
|
|
68
|
+
|
|
69
|
+
### Routing Decision
|
|
70
|
+
| Skill | Score | Bound? |
|
|
71
|
+
|-------|-------|--------|
|
|
72
|
+
| mvt-review | 92 | Yes |
|
|
73
|
+
| mvt-test | 85 | Yes |
|
|
74
|
+
| mvt-implement | 60 | No (below threshold) |
|
|
75
|
+
|
|
76
|
+
### Files Modified
|
|
77
|
+
- `.ai-agents/knowledge/{path}` -- {created | moved | renamed}
|
|
78
|
+
- `.ai-agents/registry.yaml` -- {entries added/removed}
|
|
79
|
+
- `.ai-agents/knowledge/core/manifest.yaml` -- {entry added/removed} (if applicable)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### remove
|
|
83
|
+
```markdown
|
|
84
|
+
## Knowledge Removed
|
|
85
|
+
|
|
86
|
+
### Removed entry: `{id}`
|
|
87
|
+
- File: `.ai-agents/knowledge/{path}` (deleted)
|
|
88
|
+
- References dropped from:
|
|
89
|
+
- `registry.yaml > knowledge.shared` (if applicable)
|
|
90
|
+
- `registry.yaml > skills.{name}.knowledge` x N (if applicable)
|
|
91
|
+
- `core/manifest.yaml > files[]` (if applicable)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### list
|
|
95
|
+
```markdown
|
|
96
|
+
## Knowledge Inventory
|
|
97
|
+
|
|
98
|
+
### Shared (all skills)
|
|
99
|
+
| id | path | type |
|
|
100
|
+
|----|------|------|
|
|
101
|
+
|
|
102
|
+
### Per-Skill
|
|
103
|
+
| id | path | bound to |
|
|
104
|
+
|----|------|----------|
|
|
105
|
+
|
|
106
|
+
### Core (user contributions)
|
|
107
|
+
| id | path | auto_load |
|
|
108
|
+
|----|------|-----------|
|
|
109
|
+
|
|
110
|
+
### Unbound (file present but not auto-loaded)
|
|
111
|
+
| id | path |
|
|
112
|
+
|----|------|
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
- type: shared
|
|
116
|
+
source: sections/session-update.md
|
|
117
|
+
params:
|
|
118
|
+
read_only: true
|
|
119
|
+
|
|
120
|
+
- type: shared
|
|
121
|
+
source: sections/footer-next-steps.md
|
|
122
|
+
params:
|
|
123
|
+
current_skill: mvt-manage-context
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Gather Source Material
|
|
4
|
+
|
|
5
|
+
Collect everything that should inform the plan:
|
|
6
|
+
|
|
7
|
+
1. Any extra context the user supplies in the current message.
|
|
8
|
+
|
|
9
|
+
If no analysis or design artifacts exist and the user provides no description, prompt for a brief scope summary before proceeding.
|
|
10
|
+
|
|
11
|
+
### Step 2: Detect Regeneration
|
|
12
|
+
|
|
13
|
+
If `active_change.has_plan == true` AND `.ai-agents/workspace/artifacts/{active_change.id}/plan.yaml` already exists:
|
|
14
|
+
|
|
15
|
+
- Read the existing plan.
|
|
16
|
+
- Show a summary (task count, status counts, current_task).
|
|
17
|
+
- Ask: "A plan already exists. Choose: (1) regenerate from scratch (existing tasks discarded), (2) cancel and use `/mvt-update-plan` to evolve it, (3) abort."
|
|
18
|
+
- Only continue with generation on choice (1).
|
|
19
|
+
|
|
20
|
+
### Step 3: Decompose Into Tasks
|
|
21
|
+
|
|
22
|
+
Decompose the change with the following constraints. These constraints are AI-friendly granularity rules — too coarse leaves a task uncompletable in a single skill invocation; too fine turns the plan into noise.
|
|
23
|
+
|
|
24
|
+
| Rule | Detail |
|
|
25
|
+
|------|--------|
|
|
26
|
+
| 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
|
+
| Single responsibility | Each task should map to one focused skill invocation (e.g., one `/mvt-implement` for one feature slice). |
|
|
28
|
+
| 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. |
|
|
30
|
+
| No cycles | Dependency graph must be a DAG. Validation will reject cycles. |
|
|
31
|
+
| Skill hint | Set `skill_hint` to the skill that will most likely execute the task (`mvt-implement`, `mvt-test`, `mvt-fix`, `mvt-review`, etc.). |
|
|
32
|
+
|
|
33
|
+
### Step 4: Assemble plan.yaml
|
|
34
|
+
|
|
35
|
+
Build the plan object following `docs/plan-yaml-schema.md`:
|
|
36
|
+
|
|
37
|
+
- `version: 1`
|
|
38
|
+
- `change_id`: copy from `active_change.id`
|
|
39
|
+
- `title`: copy from `active_change.title`
|
|
40
|
+
- `created_at`: current ISO 8601 timestamp
|
|
41
|
+
- `updated_at`: same as `created_at` initially
|
|
42
|
+
- `status: in_progress`
|
|
43
|
+
- `current_task`: the id of the first task that has `depends_on: []` and `status: pending` (or `in_progress` if you mark one as actively in progress)
|
|
44
|
+
- `tasks[]`: as decomposed above. Initial task statuses:
|
|
45
|
+
- First task → `in_progress`
|
|
46
|
+
- All other tasks → `pending`
|
|
47
|
+
|
|
48
|
+
### Step 5: Validate
|
|
49
|
+
|
|
50
|
+
Before writing, validate the assembled YAML against the schema:
|
|
51
|
+
|
|
52
|
+
- Unique task ids
|
|
53
|
+
- All `depends_on` references resolve
|
|
54
|
+
- No dependency cycles
|
|
55
|
+
- `current_task` references a task with status `pending` or `in_progress`
|
|
56
|
+
|
|
57
|
+
If validation fails, revise the plan and re-validate (do NOT write a broken plan).
|
|
58
|
+
|
|
59
|
+
### Step 6: Write plan.yaml
|
|
60
|
+
|
|
61
|
+
Write to `.ai-agents/workspace/artifacts/{active_change.id}/plan.yaml`. If the artifacts directory does not exist, create it.
|
|
62
|
+
|
|
63
|
+
If a previous `plan.yaml` exists and the user chose regeneration in Step 2, overwrite it. Otherwise, this is a fresh write.
|
|
64
|
+
|
|
65
|
+
### Step 7: Update Session State
|
|
66
|
+
|
|
67
|
+
Apply the standard State Update rules (see shared section above) AND the plan-dev-specific updates:
|
|
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`)
|
|
72
|
+
|
|
73
|
+
### Step 8: Output
|
|
74
|
+
|
|
75
|
+
Render the result via the plan-dev output template, including a tabular summary of all tasks with their initial status and the `current_task` highlight. Surface the schema location so users know how to read or hand-edit it later.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: mvt-plan-dev
|
|
2
|
+
output: .claude/skills/mvt-plan-dev/SKILL.md
|
|
3
|
+
|
|
4
|
+
frontmatter:
|
|
5
|
+
name: mvt-plan-dev
|
|
6
|
+
description: "Generate a structured development plan (plan.yaml) for a large change. This skill should be used when a change is too big for a single implement pass and needs to be tracked across multiple sessions with task-level granularity."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Plan Dev
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Decompose a large change into a structured `plan.yaml` so progress can survive across conversations. Each task carries status, dependencies, acceptance criteria, and a recommended skill, enabling `/mvt-resume` to land precisely on the next executable task in a future session.
|
|
16
|
+
|
|
17
|
+
- type: shared
|
|
18
|
+
source: sections/role-header.md
|
|
19
|
+
params:
|
|
20
|
+
role: Architect
|
|
21
|
+
role_desc: "a Development Planner"
|
|
22
|
+
decision_rules:
|
|
23
|
+
- rule: "active_change is set AND has_plan is false -> Generate a fresh plan.yaml"
|
|
24
|
+
- rule: "active_change is set AND has_plan is true -> Confirm before regenerating; default to /mvt-update-plan"
|
|
25
|
+
- rule: "Tasks would exceed 10 -> Stop, propose phasing the change into multiple plans"
|
|
26
|
+
- rule: "Dependencies form a cycle -> Reject and ask the user to resolve"
|
|
27
|
+
- rule: "active_change is empty -> Stop and request /mvt-analyze first"
|
|
28
|
+
boundaries:
|
|
29
|
+
- scope: "create or modify the active change itself"
|
|
30
|
+
skill: "/mvt-analyze"
|
|
31
|
+
- scope: "design architecture"
|
|
32
|
+
skill: "/mvt-design"
|
|
33
|
+
- scope: "advance task status after completion"
|
|
34
|
+
skill: "/mvt-update-plan"
|
|
35
|
+
- scope: "implement code"
|
|
36
|
+
skill: "/mvt-implement"
|
|
37
|
+
|
|
38
|
+
- type: shared
|
|
39
|
+
source: sections/activation-load-context.md
|
|
40
|
+
params:
|
|
41
|
+
extended_context:
|
|
42
|
+
- ".ai-agents/workspace/artifacts/{active_change.id}/ -- Existing analysis/design artifacts for this change"
|
|
43
|
+
- ".ai-agents/workspace/artifacts/{active_change.id}/plan.yaml -- Existing plan, if any (regeneration mode)"
|
|
44
|
+
|
|
45
|
+
- type: shared
|
|
46
|
+
source: sections/activation-load-config.md
|
|
47
|
+
|
|
48
|
+
- type: shared
|
|
49
|
+
source: sections/output-language-constraint.md
|
|
50
|
+
|
|
51
|
+
- type: shared
|
|
52
|
+
source: sections/activation-preflight.md
|
|
53
|
+
params:
|
|
54
|
+
checks:
|
|
55
|
+
- order: "1"
|
|
56
|
+
field: "session.initialized_at"
|
|
57
|
+
level: "WARN"
|
|
58
|
+
message: 'Session not initialized. Run `/mvt-init` first.'
|
|
59
|
+
- order: "2"
|
|
60
|
+
field: "active_change.id"
|
|
61
|
+
level: "BLOCK"
|
|
62
|
+
message: 'No active change. Run `/mvt-analyze` to create one before planning.'
|
|
63
|
+
|
|
64
|
+
- type: file
|
|
65
|
+
source: ./business.md
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
- type: shared
|
|
69
|
+
source: sections/session-update.md
|
|
70
|
+
|
|
71
|
+
- type: inline
|
|
72
|
+
content: |
|
|
73
|
+
### Plan-Dev Specific State Updates
|
|
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).
|
|
87
|
+
|
|
88
|
+
- type: shared
|
|
89
|
+
source: sections/footer-next-steps.md
|
|
90
|
+
params:
|
|
91
|
+
current_skill: mvt-plan-dev
|