@uoyo/mvtt 2.0.0-beta.1 → 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/README.md +194 -193
- package/dist/commands/migrate.d.ts +0 -2
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +0 -45
- package/dist/commands/migrate.js.map +1 -1
- package/package.json +1 -1
- package/registry.yaml +6 -0
- package/sources/sections/output-language-constraint.md +11 -11
- package/sources/sections/session-update.md +47 -47
- package/sources/skills/mvt-analyze/business.md +7 -7
- package/sources/skills/mvt-analyze-code/manifest.yaml +96 -96
- 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/manifest.yaml +63 -63
- package/sources/skills/mvt-config/manifest.yaml +96 -96
- package/sources/skills/mvt-create-skill/business.md +81 -74
- package/sources/skills/mvt-create-skill/manifest.yaml +91 -95
- package/sources/skills/mvt-design/manifest.yaml +96 -96
- package/sources/skills/mvt-fix/business.md +37 -8
- package/sources/skills/mvt-fix/manifest.yaml +85 -72
- package/sources/skills/mvt-help/manifest.yaml +67 -67
- package/sources/skills/mvt-implement/manifest.yaml +80 -80
- package/sources/skills/mvt-init/manifest.yaml +101 -101
- package/sources/skills/mvt-manage-context/business.md +175 -175
- package/sources/skills/mvt-manage-context/manifest.yaml +123 -123
- package/sources/skills/mvt-plan-dev/manifest.yaml +91 -91
- package/sources/skills/mvt-quick-dev/manifest.yaml +69 -69
- package/sources/skills/mvt-refactor/manifest.yaml +86 -86
- package/sources/skills/mvt-resume/manifest.yaml +71 -71
- package/sources/skills/mvt-review/manifest.yaml +87 -87
- package/sources/skills/mvt-status/manifest.yaml +66 -66
- package/sources/skills/mvt-sync-context/business.md +150 -150
- package/sources/skills/mvt-sync-context/manifest.yaml +96 -96
- package/sources/skills/mvt-template/manifest.yaml +63 -63
- package/sources/skills/mvt-test/manifest.yaml +102 -102
- package/sources/skills/mvt-update-plan/business.md +72 -72
- package/sources/skills/mvt-update-plan/manifest.yaml +132 -132
- package/sources/templates/analyze-output/body.md +15 -15
- package/sources/templates/design-output/body.md +17 -17
- package/sources/templates/implement-output/body.md +11 -11
- package/sources/templates/review-output/body.md +11 -11
- package/sources/templates/test-output/body.md +7 -7
- 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
|
@@ -1,175 +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.
|
|
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.
|
|
@@ -1,123 +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
|
|
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
|