@uoyo/mvtt 2.0.0-beta.1 → 2.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +184 -193
  2. package/dist/build/section-loader.d.ts.map +1 -1
  3. package/dist/build/section-loader.js +18 -8
  4. package/dist/build/section-loader.js.map +1 -1
  5. package/dist/fs/materialize.d.ts.map +1 -1
  6. package/dist/fs/materialize.js +5 -0
  7. package/dist/fs/materialize.js.map +1 -1
  8. package/dist/scripts/session-update.cjs +7568 -0
  9. package/install-manifest.yaml +2 -0
  10. package/package.json +3 -2
  11. package/registry.yaml +6 -0
  12. package/sources/defaults/config.yaml +7 -7
  13. package/sources/defaults/session.yaml +9 -16
  14. package/sources/scripts/session-update.js +351 -0
  15. package/sources/sections/activation-load-context.md +4 -0
  16. package/sources/sections/footer-next-steps.md +1 -1
  17. package/sources/sections/output-language-constraint.md +11 -11
  18. package/sources/sections/session-update.md +115 -47
  19. package/sources/skills/mvt-analyze/business.md +7 -7
  20. package/sources/skills/mvt-analyze/manifest.yaml +1 -0
  21. package/sources/skills/mvt-analyze-code/manifest.yaml +110 -96
  22. package/sources/skills/mvt-bug-detect/business.md +99 -0
  23. package/sources/skills/mvt-bug-detect/manifest.yaml +84 -0
  24. package/sources/skills/mvt-check-context/business.md +3 -5
  25. package/sources/skills/mvt-check-context/manifest.yaml +70 -63
  26. package/sources/skills/mvt-cleanup/business.md +49 -23
  27. package/sources/skills/mvt-cleanup/manifest.yaml +15 -10
  28. package/sources/skills/mvt-config/business.md +1 -2
  29. package/sources/skills/mvt-config/manifest.yaml +103 -96
  30. package/sources/skills/mvt-create-skill/business.md +84 -76
  31. package/sources/skills/mvt-create-skill/manifest.yaml +107 -95
  32. package/sources/skills/mvt-design/business.md +3 -6
  33. package/sources/skills/mvt-design/manifest.yaml +109 -96
  34. package/sources/skills/mvt-fix/business.md +39 -9
  35. package/sources/skills/mvt-fix/manifest.yaml +88 -72
  36. package/sources/skills/mvt-help/business.md +2 -4
  37. package/sources/skills/mvt-help/manifest.yaml +75 -67
  38. package/sources/skills/mvt-implement/business.md +4 -5
  39. package/sources/skills/mvt-implement/manifest.yaml +93 -80
  40. package/sources/skills/mvt-init/business.md +2 -2
  41. package/sources/skills/mvt-init/manifest.yaml +102 -101
  42. package/sources/skills/mvt-manage-context/business.md +186 -175
  43. package/sources/skills/mvt-manage-context/manifest.yaml +134 -123
  44. package/sources/skills/mvt-plan-dev/business.md +101 -20
  45. package/sources/skills/mvt-plan-dev/manifest.yaml +90 -91
  46. package/sources/skills/mvt-quick-dev/business.md +2 -1
  47. package/sources/skills/mvt-quick-dev/manifest.yaml +84 -69
  48. package/sources/skills/mvt-refactor/business.md +2 -1
  49. package/sources/skills/mvt-refactor/manifest.yaml +104 -86
  50. package/sources/skills/mvt-resume/business.md +28 -68
  51. package/sources/skills/mvt-resume/manifest.yaml +81 -71
  52. package/sources/skills/mvt-review/business.md +3 -3
  53. package/sources/skills/mvt-review/manifest.yaml +108 -87
  54. package/sources/skills/mvt-status/business.md +14 -18
  55. package/sources/skills/mvt-status/manifest.yaml +74 -66
  56. package/sources/skills/mvt-sync-context/business.md +155 -150
  57. package/sources/skills/mvt-sync-context/manifest.yaml +99 -96
  58. package/sources/skills/mvt-template/business.md +0 -2
  59. package/sources/skills/mvt-template/manifest.yaml +68 -63
  60. package/sources/skills/mvt-test/business.md +3 -3
  61. package/sources/skills/mvt-test/manifest.yaml +115 -102
  62. package/sources/skills/mvt-update-plan/business.md +83 -72
  63. package/sources/skills/mvt-update-plan/manifest.yaml +124 -132
  64. package/sources/templates/analyze-output/body.md +15 -15
  65. package/sources/templates/design-output/body.md +17 -17
  66. package/sources/templates/implement-output/body.md +11 -11
  67. package/sources/templates/review-output/body.md +11 -11
  68. package/sources/templates/test-output/body.md +7 -7
  69. package/dist/build/plan-validator.d.ts +0 -26
  70. package/dist/build/plan-validator.d.ts.map +0 -1
  71. package/dist/build/plan-validator.js +0 -225
  72. package/dist/build/plan-validator.js.map +0 -1
  73. package/dist/commands/build.d.ts +0 -5
  74. package/dist/commands/build.d.ts.map +0 -1
  75. package/dist/commands/build.js +0 -46
  76. package/dist/commands/build.js.map +0 -1
  77. package/dist/commands/migrate.d.ts +0 -18
  78. package/dist/commands/migrate.d.ts.map +0 -1
  79. package/dist/commands/migrate.js +0 -163
  80. package/dist/commands/migrate.js.map +0 -1
  81. package/dist/fs/protection.d.ts +0 -15
  82. package/dist/fs/protection.d.ts.map +0 -1
  83. package/dist/fs/protection.js +0 -16
  84. package/dist/fs/protection.js.map +0 -1
@@ -1,175 +1,186 @@
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.
176
+
177
+ ## Edge Cases & Errors
178
+
179
+ | Case | Handling |
180
+ |------|----------|
181
+ | File path points outside `.ai-agents/knowledge/` | Reject with error: knowledge files must reside under the managed directory tree |
182
+ | `registry.yaml` or `core/manifest.yaml` is malformed (parse error) | Abort the operation; print the parse error; suggest manual fix or restore from `.ai-agents/.backup/` |
183
+ | User attempts to `remove` a core framework file (`core/_framework/*`) | Refuse: framework files are read-only and managed by the installer |
184
+ | `add` target file already exists on disk but has no registry entry | Offer "register existing / overwrite / cancel" instead of blindly writing |
185
+ | `move` destination binding already has an entry with the same id | Prompt for rename or cancel; do not silently overwrite |
186
+ | Disk write fails mid-operation (permission denied, disk full) | Roll back all registry/manifest changes using the backup copies; report partial failure |
@@ -1,123 +1,134 @@
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/ (framework files are read-only)"
38
+ skill: "(constraint)"
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 4: 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
124
+ conditional_suggestions:
125
+ conditions:
126
+ - condition: "knowledge added or moved"
127
+ primary: mvt-check-context
128
+ primary_desc: "Verify context health after the change"
129
+ - condition: "knowledge removed"
130
+ primary: mvt-check-context
131
+ primary_desc: "Confirm token savings"
132
+ - condition: "large knowledge files detected"
133
+ primary: mvt-cleanup
134
+ primary_desc: "Clean up workspace to reduce context load"