@uoyo/mvtt 2.0.0-beta.0 → 2.0.0-beta.1
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 +131 -147
- 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 +18 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +163 -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 +192 -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 +34 -26
- package/sources/skills/mvt-check-context/business.md +89 -42
- package/sources/skills/mvt-check-context/manifest.yaml +10 -21
- 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 +15 -27
- package/sources/skills/mvt-create-skill/business.md +224 -111
- package/sources/skills/mvt-create-skill/manifest.yaml +31 -15
- package/sources/skills/mvt-design/business.md +116 -34
- package/sources/skills/mvt-design/manifest.yaml +22 -31
- package/sources/skills/mvt-fix/business.md +103 -28
- package/sources/skills/mvt-fix/manifest.yaml +8 -22
- package/sources/skills/mvt-help/business.md +74 -70
- package/sources/skills/mvt-help/manifest.yaml +16 -10
- package/sources/skills/mvt-implement/business.md +91 -32
- package/sources/skills/mvt-implement/manifest.yaml +17 -33
- package/sources/skills/mvt-init/business.md +164 -49
- package/sources/skills/mvt-init/manifest.yaml +36 -28
- 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 +17 -32
- 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 +15 -34
- package/sources/skills/mvt-status/business.md +71 -24
- package/sources/skills/mvt-status/manifest.yaml +18 -26
- package/sources/skills/mvt-sync-context/business.md +148 -23
- package/sources/skills/mvt-sync-context/manifest.yaml +51 -39
- package/sources/skills/mvt-template/business.md +96 -49
- package/sources/skills/mvt-template/manifest.yaml +13 -21
- package/sources/skills/mvt-test/business.md +104 -36
- package/sources/skills/mvt-test/manifest.yaml +14 -23
- 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 +8 -31
- 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 +6 -27
- 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 +6 -40
- package/sources/templates/review-output/manifest.yaml +11 -11
- package/sources/templates/test-output/body.md +4 -28
- package/sources/templates/test-output/manifest.yaml +11 -11
- 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,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
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Load Inputs
|
|
4
|
+
- **Required**:
|
|
5
|
+
- User's change description (free text or file path).
|
|
6
|
+
- **Fallback**: if no project context exists (no `project-context.md`), proceed as "context-light" (skip layer compliance checks).
|
|
7
|
+
|
|
8
|
+
### Step 2: Classify Complexity
|
|
9
|
+
- **What**: determine the change tier based on scope signals in the user's description.
|
|
10
|
+
- **How**: apply the classification table below. Walk signals top-to-bottom; the first match wins.
|
|
11
|
+
|
|
12
|
+
| Tier | Criteria | Behavior |
|
|
13
|
+
|------|----------|----------|
|
|
14
|
+
| **Trivial** | 1 file, no new concepts, no interface change, ≤10 lines affected | Implement directly, conversation-only |
|
|
15
|
+
| **Simple** | 1-3 files, no new module, no interface break, existing patterns sufficient | Implement after showing plan, conversation-only |
|
|
16
|
+
| **Complex** | >3 files, new module, interface break, new dependency, or ambiguous scope | STOP -- recommend `/mvt-analyze` or `/mvt-design` |
|
|
17
|
+
|
|
18
|
+
Scope signals (heuristic):
|
|
19
|
+
|
|
20
|
+
| Signal | Suggests |
|
|
21
|
+
|--------|----------|
|
|
22
|
+
| Mentions specific file/symbol | Trivial/Simple |
|
|
23
|
+
| "add a field/property/column" | Simple |
|
|
24
|
+
| "change label/text/color" | Trivial |
|
|
25
|
+
| "new API/endpoint/module" | Complex |
|
|
26
|
+
| "refactor/redesign/migrate" | Complex |
|
|
27
|
+
| "integration with X" | Complex |
|
|
28
|
+
| Affects >1 module (per `project-context.md`) | Complex |
|
|
29
|
+
| Introduces new dependency | Complex |
|
|
30
|
+
|
|
31
|
+
- **Branches**:
|
|
32
|
+
|
|
33
|
+
| Condition | Action |
|
|
34
|
+
|-----------|--------|
|
|
35
|
+
| Classified as Trivial or Simple | Proceed to Step 3 |
|
|
36
|
+
| Classified as Complex | STOP; recommend `/mvt-analyze` or `/mvt-design` |
|
|
37
|
+
| Ambiguous (could be Simple or Complex) | Ask user to confirm scope before proceeding |
|
|
38
|
+
|
|
39
|
+
### Step 3: Locate Target
|
|
40
|
+
- **What**: resolve the exact file(s) and symbol(s) to change.
|
|
41
|
+
- **How**:
|
|
42
|
+
1. Parse the change description for file paths, class/function/variable names, or module references.
|
|
43
|
+
2. Resolve each reference using Glob/Grep against the project tree.
|
|
44
|
+
3. Verify each target: exists on disk (for modifications) or parent path exists (for new files).
|
|
45
|
+
4. If a target cannot be uniquely resolved, ask the user for clarification before continuing.
|
|
46
|
+
5. Cross-reference `project-context.md` layer rules (if available) -- flag any change that would violate layer constraints.
|
|
47
|
+
- **Output of this step**: a target list (`path | action | one-line intent`).
|
|
48
|
+
|
|
49
|
+
### Step 4: Plan the Change
|
|
50
|
+
- **What**: produce an ordered file list before writing any code.
|
|
51
|
+
- **How**:
|
|
52
|
+
1. For each target from Step 3, decide: `create | modify | delete`, and write a one-line intent.
|
|
53
|
+
2. Topologically order by dependency if multiple files are involved.
|
|
54
|
+
- **Branches**:
|
|
55
|
+
|
|
56
|
+
| Condition | Action |
|
|
57
|
+
|-----------|--------|
|
|
58
|
+
| Trivial tier | Proceed silently (change is small and reversible) |
|
|
59
|
+
| Simple tier | Show the plan to the user as a preview; wait for confirmation before proceeding |
|
|
60
|
+
| Plan exceeds 3 files | Escalate to Complex -- STOP, recommend standard workflow |
|
|
61
|
+
| Plan introduces an unplanned module | Escalate to Complex -- STOP, recommend standard workflow |
|
|
62
|
+
|
|
63
|
+
### Step 5: Implement
|
|
64
|
+
- **What**: write/modify the planned files.
|
|
65
|
+
- **How**:
|
|
66
|
+
1. Apply changes one file at a time, in the order determined by Step 4.
|
|
67
|
+
2. Follow `coding-standards.md` if available; match surrounding code style otherwise.
|
|
68
|
+
3. Respect module/layer rules from `project-context.md`. Forbidden imports must NOT appear.
|
|
69
|
+
4. Add error handling at system boundaries only (HTTP, DB, external API, file IO, message bus). Do NOT add try/catch around internal calls.
|
|
70
|
+
5. Inline comments only for non-obvious algorithmic choices or deliberate workarounds with a reason.
|
|
71
|
+
6. Do NOT introduce abstractions, helpers, or feature flags beyond what the task requires.
|
|
72
|
+
|
|
73
|
+
### Step 6: Quick Verify
|
|
74
|
+
- **What**: light-weight verification before reporting completion.
|
|
75
|
+
- **How**:
|
|
76
|
+
1. If a type-checker is configured for the project (`tsc`, `mypy`, `cargo check`, etc.), run it on changed files only. Surface failures.
|
|
77
|
+
2. If existing tests cover the changed code, suggest the test command but do not auto-run unless user explicitly approved.
|
|
78
|
+
3. For frontend/UI changes, note that user should verify in browser; do NOT claim "tested" based on type-check alone.
|
|
79
|
+
|
|
80
|
+
### Step 7: Summarize in Conversation
|
|
81
|
+
- **What**: present the result without writing any artifact file.
|
|
82
|
+
- **How**: output a brief summary containing:
|
|
83
|
+
- Files touched: `path | action`
|
|
84
|
+
- Verification status: type-check result, test suggestion
|
|
85
|
+
- **No artifact is written. No document is generated.** This is a conversation-only skill.
|
|
86
|
+
|
|
87
|
+
### Step 8: (session update handled by shared section)
|
|
88
|
+
|
|
89
|
+
## Edge Cases & Errors
|
|
90
|
+
|
|
91
|
+
| Case | Handling |
|
|
92
|
+
|------|----------|
|
|
93
|
+
| Change description is vague ("improve performance") | STOP -- ask for specifics; cannot classify without concrete scope |
|
|
94
|
+
| Target file doesn't exist | Ask whether it is a new file or a wrong path; do not silently create |
|
|
95
|
+
| Implementation reveals the change is actually Complex | STOP -- revert partial changes, recommend `/mvt-analyze` |
|
|
96
|
+
| Active change is in the middle of `/mvt-implement` | Warn about potential conflicts; ask user to confirm before proceeding |
|
|
97
|
+
| No `active_change` and change is Simple | Proceed without creating an `active_change`; conversation-only result |
|
|
98
|
+
| Change touches a file also being modified in an active plan | Surface the conflict; user must resolve outside this skill |
|
|
99
|
+
| User wants to save progress notes | Direct them to the standard workflow (`/mvt-analyze` -> `/mvt-design` -> `/mvt-implement`) which produces artifacts |
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: mvt-quick-dev
|
|
2
|
+
output: .claude/skills/mvt-quick-dev/SKILL.md
|
|
3
|
+
|
|
4
|
+
frontmatter:
|
|
5
|
+
name: mvt-quick-dev
|
|
6
|
+
description: "Quickly implement simple, well-scoped changes without the full analyze-design-implement workflow. This skill should be used when the change is small (1-3 files), architecturally neutral, and clearly specified — such as adding a field, fixing a label, adjusting config, or making a targeted enhancement."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Quick Dev
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Implement simple, well-scoped changes quickly, bypassing the full workflow. For changes that are small (1-3 files), architecturally neutral, and clearly specified. Produces no artifacts — results are conversation-only.
|
|
16
|
+
|
|
17
|
+
- type: shared
|
|
18
|
+
source: sections/role-header.md
|
|
19
|
+
params:
|
|
20
|
+
role: Developer
|
|
21
|
+
role_desc: "an Implementation Specialist"
|
|
22
|
+
decision_rules:
|
|
23
|
+
- rule: "Change is Trivial (1 file, ≤10 lines) -> Implement directly, conversation-only"
|
|
24
|
+
- rule: "Change is Simple (1-3 files, no module break) -> Implement, show plan first, conversation-only"
|
|
25
|
+
- rule: "Change is Complex -> STOP, recommend /mvt-analyze or /mvt-design"
|
|
26
|
+
- rule: "Ambiguous scope -> Ask user to confirm before proceeding"
|
|
27
|
+
- rule: "Implementation reveals unexpected complexity -> Revert and escalate"
|
|
28
|
+
- rule: "Existing tests cover changed code -> Suggest running them"
|
|
29
|
+
boundaries:
|
|
30
|
+
- scope: "analyze complex requirements"
|
|
31
|
+
skill: "/mvt-analyze"
|
|
32
|
+
- scope: "design architecture"
|
|
33
|
+
skill: "/mvt-design"
|
|
34
|
+
- scope: "review code"
|
|
35
|
+
skill: "/mvt-review"
|
|
36
|
+
|
|
37
|
+
- type: shared
|
|
38
|
+
source: sections/activation-load-context.md
|
|
39
|
+
params:
|
|
40
|
+
extended_context:
|
|
41
|
+
- ".ai-agents/knowledge/project/_generated/project-context.md -- Module/layer map (optional)"
|
|
42
|
+
- ".ai-agents/knowledge/principle/coding-standards.md -- Coding standards (optional)"
|
|
43
|
+
- "Target source files (load based on change description)"
|
|
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: inline
|
|
52
|
+
content: |
|
|
53
|
+
### Shortcut Operation Rules
|
|
54
|
+
- Can execute at any time without checking workflow prerequisites
|
|
55
|
+
- Do NOT update `progress` (this is a shortcut operation, not a workflow phase)
|
|
56
|
+
- Do NOT create an `active_change` if one doesn't already exist
|
|
57
|
+
- Do NOT write any artifact or document — results are conversation-only
|
|
58
|
+
- Do NOT interact with plan.yaml in any way — this skill is plan-independent
|
|
59
|
+
|
|
60
|
+
- type: file
|
|
61
|
+
source: ./business.md
|
|
62
|
+
|
|
63
|
+
- type: shared
|
|
64
|
+
source: sections/session-update.md
|
|
65
|
+
|
|
66
|
+
- type: shared
|
|
67
|
+
source: sections/footer-next-steps.md
|
|
68
|
+
params:
|
|
69
|
+
current_skill: mvt-quick-dev
|