@uoyo/mvtt 2.1.0 → 2.2.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/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +18 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/fs/core-manifest.d.ts +4 -3
- package/dist/fs/core-manifest.d.ts.map +1 -1
- package/dist/fs/core-manifest.js +5 -4
- package/dist/fs/core-manifest.js.map +1 -1
- package/dist/fs/materialize.d.ts +2 -0
- package/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +3 -3
- package/dist/fs/materialize.js.map +1 -1
- package/dist/fs/registry-merge.d.ts +4 -3
- package/dist/fs/registry-merge.d.ts.map +1 -1
- package/dist/fs/registry-merge.js +5 -4
- package/dist/fs/registry-merge.js.map +1 -1
- package/dist/scripts/epic-update.cjs +54 -1
- package/dist/scripts/plan-update.cjs +34 -17
- package/dist/scripts/plan-update.md +9 -0
- package/dist/scripts/session-update.cjs +59 -1
- package/package.json +3 -3
- package/sources/scripts/epic-update.js +70 -1
- package/sources/scripts/plan-update.js +44 -22
- package/sources/scripts/plan-update.md +9 -0
- package/sources/scripts/session-update.js +78 -1
- package/sources/sections/activation-protocol.md +46 -0
- package/sources/sections/role-header.md +1 -1
- package/sources/sections/session-update.md +8 -2
- package/sources/skills/mvt-analyze/manifest.yaml +6 -9
- package/sources/skills/mvt-analyze-code/business.md +3 -0
- package/sources/skills/mvt-analyze-code/manifest.yaml +4 -8
- package/sources/skills/mvt-bug-detect/manifest.yaml +3 -4
- package/sources/skills/mvt-check-context/business.md +2 -2
- package/sources/skills/mvt-check-context/manifest.yaml +3 -6
- package/sources/skills/mvt-cleanup/business.md +40 -13
- package/sources/skills/mvt-cleanup/manifest.yaml +7 -8
- package/sources/skills/mvt-config/business.md +44 -49
- package/sources/skills/mvt-config/manifest.yaml +20 -25
- package/sources/skills/mvt-create-skill/business.md +15 -11
- package/sources/skills/mvt-create-skill/manifest.yaml +6 -9
- package/sources/skills/mvt-decompose/business.md +3 -0
- package/sources/skills/mvt-decompose/manifest.yaml +8 -10
- package/sources/skills/mvt-design/business.md +1 -1
- package/sources/skills/mvt-design/manifest.yaml +6 -8
- package/sources/skills/mvt-fix/business.md +7 -1
- package/sources/skills/mvt-fix/manifest.yaml +5 -9
- package/sources/skills/mvt-help/business.md +1 -0
- package/sources/skills/mvt-help/manifest.yaml +4 -4
- package/sources/skills/mvt-implement/business.md +1 -1
- package/sources/skills/mvt-implement/manifest.yaml +4 -7
- package/sources/skills/mvt-init/manifest.yaml +6 -9
- package/sources/skills/mvt-manage-context/business.md +4 -2
- package/sources/skills/mvt-manage-context/manifest.yaml +3 -6
- package/sources/skills/mvt-plan-dev/business.md +8 -6
- package/sources/skills/mvt-plan-dev/manifest.yaml +6 -10
- package/sources/skills/mvt-quick-dev/business.md +1 -1
- package/sources/skills/mvt-quick-dev/manifest.yaml +3 -4
- package/sources/skills/mvt-refactor/business.md +1 -1
- package/sources/skills/mvt-refactor/manifest.yaml +3 -4
- package/sources/skills/mvt-resume/business.md +3 -3
- package/sources/skills/mvt-resume/manifest.yaml +7 -10
- package/sources/skills/mvt-review/business.md +10 -3
- package/sources/skills/mvt-review/manifest.yaml +10 -11
- package/sources/skills/mvt-status/business.md +10 -9
- package/sources/skills/mvt-status/manifest.yaml +4 -7
- package/sources/skills/mvt-sync-context/business.md +19 -17
- package/sources/skills/mvt-sync-context/manifest.yaml +5 -9
- package/sources/skills/mvt-template/business.md +5 -5
- package/sources/skills/mvt-template/manifest.yaml +3 -6
- package/sources/skills/mvt-test/business.md +10 -2
- package/sources/skills/mvt-test/manifest.yaml +8 -11
- package/sources/skills/mvt-update-plan/business.md +6 -2
- package/sources/skills/mvt-update-plan/manifest.yaml +6 -10
- package/sources/sections/activation-load-config.md +0 -8
- package/sources/sections/activation-load-context.md +0 -49
- package/sources/sections/activation-preflight.md +0 -14
|
@@ -23,7 +23,7 @@ This skill measures only files the **user** can reduce or relocate. Framework-fi
|
|
|
23
23
|
### Step 3: Estimate Token Consumption
|
|
24
24
|
- **What**: produce a per-file tokens estimate and per-category subtotals, with **per-project breakdown**.
|
|
25
25
|
- **How**:
|
|
26
|
-
1. For each in-scope file: tokens
|
|
26
|
+
1. For each in-scope file: compute characters mechanically and estimate tokens as `ceil(characters / 4)`.
|
|
27
27
|
2. Group by category: `Index`, `Semantic Context`, `Shared Knowledge`, `Per-Skill Knowledge`, `Artifacts`.
|
|
28
28
|
3. For Shared Knowledge, compute total once -- this is per-skill overhead (loaded by every skill invocation).
|
|
29
29
|
4. For Per-Skill Knowledge, compute totals per skill so users can see which skill is heaviest.
|
|
@@ -63,7 +63,7 @@ This skill measures only files the **user** can reduce or relocate. Framework-fi
|
|
|
63
63
|
| A single Shared Knowledge file is `oversized` | "{path} is {N} tokens. Split or move to per-skill." | `/mvt-manage-context move` |
|
|
64
64
|
| Per-skill Knowledge entry exists in `registry.yaml` but its referenced files are missing | "{skill} declares knowledge `{id}` but `{path}` is missing." | `/mvt-manage-context remove` (or restore the file) |
|
|
65
65
|
| A knowledge file exists on disk but no `registry.yaml` entry references it | "{path} is unused (not loaded by any skill)." | `/mvt-manage-context remove` |
|
|
66
|
-
| Two knowledge entries reference identical content (same hash) | "{a} and {b} are duplicates. Consolidate." | manual edit |
|
|
66
|
+
| Two knowledge entries reference identical content (same SHA-256 hash computed from file bytes) | "{a} and {b} are duplicates. Consolidate." | manual edit |
|
|
67
67
|
|
|
68
68
|
- **Constraints on recommendations**:
|
|
69
69
|
- Never recommend changes to framework files (`_framework/`, `mvt-*/SKILL.md`).
|
|
@@ -25,20 +25,17 @@ sections:
|
|
|
25
25
|
- rule: "Total tokens > 25,000 -> Report as \"Oversized\", strongly recommend cleanup"
|
|
26
26
|
boundaries:
|
|
27
27
|
- scope: "modify any files"
|
|
28
|
-
|
|
28
|
+
guidance: "Only analyze and recommend"
|
|
29
29
|
- scope: "clean up artifacts"
|
|
30
30
|
skill: "/mvt-cleanup"
|
|
31
31
|
- scope: "modify context"
|
|
32
32
|
skill: "/mvt-manage-context"
|
|
33
33
|
|
|
34
34
|
- type: shared
|
|
35
|
-
source: sections/activation-
|
|
35
|
+
source: sections/activation-protocol.md
|
|
36
36
|
params:
|
|
37
37
|
extended_context:
|
|
38
|
-
- ".ai-agents/config.yaml -- Framework configuration (
|
|
39
|
-
|
|
40
|
-
- type: shared
|
|
41
|
-
source: sections/activation-load-config.md
|
|
38
|
+
- ".ai-agents/config.yaml -- Framework configuration (read thresholds and preferences; do not count config itself as context payload)"
|
|
42
39
|
|
|
43
40
|
- type: shared
|
|
44
41
|
source: sections/language-constraint.md
|
|
@@ -16,7 +16,7 @@ This check ensures `/mvt-sync-context` has processed a change's knowledge before
|
|
|
16
16
|
- **What**: produce a per-change-id inventory with size and last-modified data.
|
|
17
17
|
- **How**:
|
|
18
18
|
1. Walk `.ai-agents/workspace/artifacts/` and group files by their parent change-id directory. **Exclude the `_archived/` subdirectory** from the walk — it contains previously archived changes and is not subject to re-inventory.
|
|
19
|
-
2. For each file: characters, estimated tokens (`
|
|
19
|
+
2. For each file: characters, estimated tokens (`ceil(characters / 4)`), last-modified (mtime).
|
|
20
20
|
3. For each change-id directory, sum tokens and file count.
|
|
21
21
|
4. Mark each change-id as `active | in-recent-changes | unindexed | legacy-pattern`:
|
|
22
22
|
- `active` if it matches `session.active_change.id`.
|
|
@@ -30,12 +30,12 @@ This check ensures `/mvt-sync-context` has processed a change's knowledge before
|
|
|
30
30
|
|
|
31
31
|
| Source | Rule | Proposed action |
|
|
32
32
|
|--------|------|-----------------|
|
|
33
|
-
| `changes[]` entry with `status: done` AND any task in plan is older than the active change's start | Summarize: generate a `summary.md` from the change's artifacts, then move the **entire** `artifacts/{id}/` directory (including `summary.md`) to `artifacts/_archived/{id}/` |
|
|
33
|
+
| `changes[]` entry with `status: done` AND `artifacts/{id}/` exists AND (any task in plan is older than the active change's start **OR** plan metadata is missing, unreadable, or absent for this change) | Summarize: generate a `summary.md` from the change's artifacts, then move the **entire** `artifacts/{id}/` directory (including `summary.md`) to `artifacts/_archived/{id}/` |
|
|
34
34
|
| `changes[]` entry with `status: done` AND `epic_id` non-empty AND parent epic status is NOT `done` | **Epic integrity warning**: mark the candidate as `epic-unsafe` -- archiving a sub-change whose parent epic is still in-progress may leave the epic in an inconsistent state. Default to `n` (skip) in the cleanup plan. User may override to force-archive. |
|
|
35
35
|
| Artifact directory under `artifacts/` whose id starts with `epic-` AND contains `epic.yaml` with `status: done` | **Batch archive candidate**: mark for batch suggestion in Step 7 -- read `epic.yaml.children[]` for child change-ids to offer as batch archive options alongside the epic |
|
|
36
36
|
| Change-id directory marked `unindexed` | List for user review (do NOT auto-archive -- could be in-flight work the user just hasn't registered) |
|
|
37
|
-
| `history` entries beyond the most recent N (from `config.yaml > preferences.history_limits.history`, default
|
|
38
|
-
| Directory `knowledge/patterns/` exists |
|
|
37
|
+
| `history` entries beyond the most recent N (from `config.yaml > preferences.history_limits.history`, default 10) | Truncate via `session-update.cjs --truncate-history <N>` |
|
|
38
|
+
| Directory `knowledge/patterns/` exists | Archive to `.ai-agents/knowledge/_archived/legacy-patterns/` after confirmation (legacy pattern data; no replacement) |
|
|
39
39
|
| Empty change-id directories (zero files inside) | Propose deletion of the directory itself |
|
|
40
40
|
|
|
41
41
|
- For each candidate, compute: `current size (tokens)` -> `projected size (tokens)`, expected savings.
|
|
@@ -79,10 +79,12 @@ This check ensures `/mvt-sync-context` has processed a change's knowledge before
|
|
|
79
79
|
|
|
80
80
|
Per ADR-8: archive = abandon references; no post-archive `epic_id` integrity maintenance. Child changes that are also `status: done` are eligible for batch archiving; in-progress or pending children are excluded with a note.
|
|
81
81
|
|
|
82
|
-
3. **
|
|
83
|
-
4. **
|
|
84
|
-
5.
|
|
85
|
-
6.
|
|
82
|
+
3. **Archive legacy-pattern action**: move `knowledge/patterns/` to `.ai-agents/knowledge/_archived/legacy-patterns/`. If that destination exists, preserve existing content and ask for a timestamped suffix. Do not hard-delete this directory.
|
|
83
|
+
4. **Delete action**: remove only the items explicitly marked for deletion in the confirmed plan; never recurse beyond what was listed.
|
|
84
|
+
5. **Stale history truncation**: call `session-update.cjs --truncate-history <N>` where N is from `config.yaml > preferences.history_limits.history` (default 10).
|
|
85
|
+
6. All file mutations atomic where possible (write-temp + rename, copy-then-delete for moves).
|
|
86
|
+
7. If any single action fails, STOP further actions; report what completed, what failed, and leave a recoverable state (do not partially overwrite a file with truncated content).
|
|
87
|
+
8. **Index synchronization**: after all archive moves finish, re-glob `artifacts/_archived/` for the actual moved change-id and epic-id directories from this run. The `--remove-change` id set MUST equal the set of change-id directories actually moved into `_archived/`; the `--remove-epic` id set MUST equal the set of epic directories actually moved. If the sets differ from the planned ids, use the actual moved-dir set and report the mismatch.
|
|
86
88
|
|
|
87
89
|
### Step 8: Report Result
|
|
88
90
|
- Print the actually-applied actions (may differ from the plan if Step 7 stopped early).
|
|
@@ -95,23 +97,48 @@ Based on the actual cleanup actions performed, choose the appropriate session-up
|
|
|
95
97
|
|
|
96
98
|
| Actual cleanup action | session-update parameters |
|
|
97
99
|
|----------------------|---------------------------|
|
|
98
|
-
| Closed `active_change` (all plan tasks completed) | `--close-change --truncate-history <N>` |
|
|
99
|
-
|
|
|
100
|
+
| Closed `active_change` (all plan tasks completed) **+** archived old done changes | `--close-change --remove-change <ids> --truncate-history <N>` |
|
|
101
|
+
| Closed `active_change` only (no old changes archived) | `--close-change --truncate-history <N>` |
|
|
102
|
+
| Archived old changes only (active_change still in progress) | `--remove-change <ids> --truncate-history <N>` |
|
|
103
|
+
| Archived epic + its children (batch archive) | `--remove-epic <epic_id> --remove-change <child1>,<child2> --truncate-history <N>` |
|
|
100
104
|
| `--dry-run` mode (no modifications made) | **Do NOT call** session-update script; only record history |
|
|
101
105
|
|
|
102
|
-
N is read from `config.yaml > preferences.history_limits.history` (default
|
|
106
|
+
N is read from `config.yaml > preferences.history_limits.history` (default 10). `<ids>` is a comma-separated list from the actual moved-dir set collected in Step 7.8.
|
|
103
107
|
|
|
104
108
|
### Step 10: State Update
|
|
105
109
|
Apply the State Update rules defined in the **State Update** section below.
|
|
106
110
|
|
|
107
|
-
**Pre-filled
|
|
111
|
+
**Pre-filled examples** (one per Step 9 row):
|
|
112
|
+
|
|
108
113
|
```bash
|
|
114
|
+
# Row 1: closed active_change + archived old done changes
|
|
115
|
+
node .ai-agents/scripts/session-update.cjs \
|
|
116
|
+
--skill mvt-cleanup \
|
|
117
|
+
--close-change \
|
|
118
|
+
--remove-change <archived_change_ids> \
|
|
119
|
+
--truncate-history 10
|
|
120
|
+
|
|
121
|
+
# Row 2: closed active_change only
|
|
109
122
|
node .ai-agents/scripts/session-update.cjs \
|
|
110
123
|
--skill mvt-cleanup \
|
|
111
124
|
--close-change \
|
|
112
125
|
--truncate-history 10
|
|
126
|
+
|
|
127
|
+
# Row 3: archived old changes only
|
|
128
|
+
node .ai-agents/scripts/session-update.cjs \
|
|
129
|
+
--skill mvt-cleanup \
|
|
130
|
+
--remove-change <archived_change_ids> \
|
|
131
|
+
--truncate-history 10
|
|
132
|
+
|
|
133
|
+
# Row 4: batch archive (epic + its children)
|
|
134
|
+
node .ai-agents/scripts/session-update.cjs \
|
|
135
|
+
--skill mvt-cleanup \
|
|
136
|
+
--remove-epic <archived_epic_id> \
|
|
137
|
+
--remove-change <archived_child_ids> \
|
|
138
|
+
--truncate-history 10
|
|
113
139
|
```
|
|
114
|
-
|
|
140
|
+
|
|
141
|
+
Replace `10` with the actual `config.yaml > preferences.history_limits.history` value, and `<archived_change_ids>` / `<archived_child_ids>` with the comma-separated id list collected in Step 7.8, `<archived_epic_id>` with the batch-archived epic id. Drop any `--remove-*` flag whose id list is empty.
|
|
115
142
|
|
|
116
143
|
## Edge Cases & Errors
|
|
117
144
|
|
|
@@ -43,20 +43,17 @@ sections:
|
|
|
43
43
|
| `/mvt-cleanup --dry-run` | Preview what would be cleaned |
|
|
44
44
|
|
|
45
45
|
- type: shared
|
|
46
|
-
source: sections/activation-
|
|
46
|
+
source: sections/activation-protocol.md
|
|
47
47
|
params:
|
|
48
|
+
activation_reads:
|
|
49
|
+
- session.yaml
|
|
48
50
|
extended_context:
|
|
49
51
|
- "Scan all files under `.ai-agents/workspace/artifacts/` (all change-id directories)"
|
|
50
|
-
|
|
51
|
-
- type: shared
|
|
52
|
-
source: sections/activation-load-config.md
|
|
53
|
-
|
|
54
|
-
- type: shared
|
|
55
|
-
source: sections/activation-preflight.md
|
|
56
|
-
params:
|
|
52
|
+
has_preflight: true
|
|
57
53
|
checks:
|
|
58
54
|
- order: "1"
|
|
59
55
|
field: "project not initialized"
|
|
56
|
+
condition: "session.yaml missing OR session.initialized_at is empty"
|
|
60
57
|
level: "REQUIRED"
|
|
61
58
|
message: "Project must be initialized (session.yaml exists)"
|
|
62
59
|
|
|
@@ -75,6 +72,8 @@ sections:
|
|
|
75
72
|
current_skill: mvt-cleanup
|
|
76
73
|
truncate_history: true
|
|
77
74
|
close_change: true
|
|
75
|
+
remove_change: true
|
|
76
|
+
remove_epic: true
|
|
78
77
|
|
|
79
78
|
- type: shared
|
|
80
79
|
source: sections/footer-next-steps.md
|
|
@@ -1,57 +1,62 @@
|
|
|
1
1
|
## Execution Flow
|
|
2
2
|
|
|
3
|
+
`/mvt-config` takes no arguments. Every invocation opens the Interactive Menu (Step 2); all actions -- viewing settings, editing a key, and guided setup -- are reached from there. There is no `set` / `show` / `wizard` / `reset` invocation form.
|
|
4
|
+
|
|
3
5
|
### Step 1: Load Inputs
|
|
6
|
+
- **Required**:
|
|
7
|
+
- `.ai-agents/config.yaml` -- the configuration to inspect and edit.
|
|
4
8
|
- **Recommended**:
|
|
5
|
-
- `.ai-agents/knowledge/core/manifest.yaml` -- only when computing token estimates for shared knowledge view.
|
|
9
|
+
- `.ai-agents/knowledge/core/manifest.yaml` -- only when computing token estimates for the shared knowledge view.
|
|
6
10
|
- **Fallback**: if `config.yaml` is missing, surface the error and recommend `mvtt install` or `/mvt-init`. Do not silently create a fresh config from this skill.
|
|
7
11
|
|
|
8
|
-
### Step 2:
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
3. Show the category detail view: keys with current values, type, default, allowed values.
|
|
25
|
-
4. Let user pick a key to edit; reuse Step 5 (Direct Set) sub-flow for validation, preview, confirmation, write.
|
|
26
|
-
5. After write, return to the top-level menu until user quits.
|
|
27
|
-
6. No write happens unless the Step 5 sub-flow confirms.
|
|
28
|
-
|
|
29
|
-
### Step 4: Show All
|
|
12
|
+
### Step 2: Interactive Menu (entry point)
|
|
13
|
+
1. Read current `config.yaml`.
|
|
14
|
+
2. Render the top-level menu with these actions:
|
|
15
|
+
|
|
16
|
+
| # | Action | Goes to |
|
|
17
|
+
|---|--------|---------|
|
|
18
|
+
| 1 | View all settings | Step 3 |
|
|
19
|
+
| 2 | Edit a setting | Step 4 |
|
|
20
|
+
| 3 | Guided setup (walk through common settings) | Step 5 |
|
|
21
|
+
| `q` | Quit | -- exit, no write |
|
|
22
|
+
|
|
23
|
+
3. Wait for the user's selection. Re-render the menu after any action completes, until the user quits.
|
|
24
|
+
4. On an unrecognized selection, re-print the menu and prompt again. Do not exit.
|
|
25
|
+
5. No write happens unless the user confirms -- either in the Edit sub-flow (Step 4) or at the Guided-setup summary (Step 5).
|
|
26
|
+
|
|
27
|
+
### Step 3: View All
|
|
30
28
|
- Print every key with `current value | type | default`. Mark values that differ from default with a `*`.
|
|
31
|
-
- Print the Configuration Keys reference table (provided in shared section above) below the values, for context.
|
|
32
|
-
- No write.
|
|
29
|
+
- Print the Configuration Keys reference table (provided in the shared section above) below the values, for context.
|
|
30
|
+
- No write. Return to the top-level menu (Step 2).
|
|
33
31
|
|
|
34
|
-
### Step
|
|
35
|
-
1.
|
|
36
|
-
|
|
32
|
+
### Step 4: Edit a Setting
|
|
33
|
+
1. Render a numbered list of editable keys grouped by category (User Preferences, etc.) with current values inline.
|
|
34
|
+
2. Wait for the user to select a key (or `b` to go back to the top-level menu).
|
|
35
|
+
3. Show the key detail: current value, type, default, allowed values.
|
|
36
|
+
4. Run the **Edit sub-flow** (below) for the selected key.
|
|
37
|
+
5. After the sub-flow completes (write or cancel), return to the editable-key list, then to the top-level menu.
|
|
38
|
+
|
|
39
|
+
#### Edit sub-flow (validate -> preview -> confirm -> write)
|
|
40
|
+
Used by Step 4 and by each stage of Step 5.
|
|
41
|
+
|
|
42
|
+
1. **Validate key exists**: the key must match one of the rows in the Configuration Keys table. If not, report it and return without writing.
|
|
37
43
|
2. **Validate value type and constraints**:
|
|
38
44
|
|
|
39
45
|
| Type | Validation |
|
|
40
46
|
|------|------------|
|
|
41
|
-
| `enum` | Value MUST be in the allowed list. Reject with the allowed list shown. For `language` enums (`en-US` = English, `zh-CN` = 简体中文), reject other locale strings -- ask user to pick from the allowed list (do not fuzzy-match) |
|
|
47
|
+
| `enum` | Value MUST be in the allowed list. Reject with the allowed list shown. For `language` enums (`en-US` = English, `zh-CN` = 简体中文), reject other locale strings -- ask the user to pick from the allowed list (do not fuzzy-match) |
|
|
42
48
|
| `bool` | Accept exactly `true` / `false` (case-insensitive). Reject `yes`/`1`/`y` |
|
|
43
49
|
| `int` | Parse as integer; check range when range is documented (e.g., `relevance_threshold` must be 0-100) |
|
|
44
|
-
| `list` | Parse as comma-separated tokens; for knowledge map entries (`_all` and project keys), every token must be a registered knowledge id |
|
|
45
50
|
|
|
46
51
|
3. **Preview**: render `key: <current> -> <new>` on a single line.
|
|
47
|
-
4. **Confirm**: prompt `Apply this change? (y/n)`.
|
|
52
|
+
4. **Confirm**: prompt `Apply this change? (y/n)`. On `n`, discard and return.
|
|
48
53
|
5. **Write atomically**:
|
|
49
54
|
- Read the current file, mutate only the targeted key, preserve all other content and formatting (do NOT rewrite the whole file from a template -- the user may have comments).
|
|
50
55
|
- Write to a temp file in the same directory, then rename. On any error, do not touch the original.
|
|
51
56
|
6. Report the new value and a one-line "what this affects" hint (e.g., "applies to subsequent skill invocations").
|
|
52
57
|
|
|
53
|
-
### Step
|
|
54
|
-
- Walk the user through these stages in order. Each stage uses the
|
|
58
|
+
### Step 5: Guided Setup
|
|
59
|
+
- Selected from the top-level menu. Walk the user through these stages in order. Each stage uses the Edit sub-flow's validation rules. Defer the actual write to the end.
|
|
55
60
|
|
|
56
61
|
| Stage | Key | Notes |
|
|
57
62
|
|-------|-----|-------|
|
|
@@ -65,17 +70,9 @@
|
|
|
65
70
|
|
|
66
71
|
- After all stages, render a Summary Preview table: `key | from | to`, then a single confirmation prompt to apply ALL changes atomically.
|
|
67
72
|
- If the user aborts at the summary, discard all in-progress values; do not write anything.
|
|
73
|
+
- After applying (or aborting), return to the top-level menu (Step 2).
|
|
68
74
|
|
|
69
|
-
|
|
70
|
-
1. Build the diff between current `config.yaml` and framework defaults: list every key that will revert.
|
|
71
|
-
2. Render the diff as `key | current | will-become-default`.
|
|
72
|
-
3. Require explicit confirmation: `Reset all settings to defaults? (y/n)`.
|
|
73
|
-
4. Backup current `config.yaml` to `config.yaml.bak` before writing.
|
|
74
|
-
5. Write defaults atomically.
|
|
75
|
-
6. Report the keys that changed.
|
|
76
|
-
- Do NOT reset knowledge map entries (`_all`, project keys) to defaults if the user has added entries via `/mvt-manage-context` -- preserve user-added knowledge ids; only reset preferences. Surface this exception in the diff.
|
|
77
|
-
|
|
78
|
-
## Knowledge Inspection (sub-flow used by Interactive Menu and Show All)
|
|
75
|
+
## Knowledge Inspection (sub-flow used by View All and Edit a Setting)
|
|
79
76
|
- **View**: list global knowledge ids from `registry.yaml > knowledge._all` and project-specific ids from `knowledge.{projectName}`, then per-skill knowledge ids grouped by skill (`registry.yaml > skills.*.knowledge`). Show token estimates from each entry's manifest if available.
|
|
80
77
|
- **Modify**: this skill does NOT mutate knowledge settings; defer to `/mvt-manage-context`. Print the suggested command (`/mvt-manage-context move`, `/mvt-manage-context add`, etc.) instead of doing the work here.
|
|
81
78
|
|
|
@@ -85,10 +82,8 @@
|
|
|
85
82
|
|------|----------|
|
|
86
83
|
| `config.yaml` missing | STOP; recommend `mvtt install` or `/mvt-init` |
|
|
87
84
|
| `config.yaml` exists but unparseable YAML | Surface error with line number; refuse to write; recommend manual fix or `mvtt install --refresh` |
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
| User aborts mid-
|
|
91
|
-
| `.bak` from previous reset already exists | Overwrite (only the most recent backup is useful) |
|
|
85
|
+
| Editing a deprecated key (`preferences.language`) | Print migration hint: `Run mvtt update --migrate-config` to split into the two language fields. Do not mutate the deprecated key |
|
|
86
|
+
| Guided-setup stage receives an empty value | Treat as "accept default for this stage", continue |
|
|
87
|
+
| User aborts mid guided-setup | No partial write; the temp values are discarded |
|
|
92
88
|
| Concurrent edit detected (mtime changed during preview->write) | Abort write, surface a message, ask user to re-run |
|
|
93
|
-
| `
|
|
94
|
-
| `reset` invoked but `config.yaml` already matches defaults | Report "nothing to reset", do not write |
|
|
89
|
+
| User asks to edit `knowledge._all` or any knowledge map key | Refuse and route to `/mvt-manage-context`; this skill inspects knowledge settings but does not mutate them |
|
|
@@ -12,7 +12,7 @@ sections:
|
|
|
12
12
|
|
|
13
13
|
## Purpose
|
|
14
14
|
|
|
15
|
-
Manage MVTT framework configuration
|
|
15
|
+
Manage MVTT framework configuration through an interactive menu: view all settings, edit an individual key, or run a guided setup for common configurations.
|
|
16
16
|
|
|
17
17
|
- type: shared
|
|
18
18
|
source: sections/role-header.md
|
|
@@ -20,13 +20,12 @@ sections:
|
|
|
20
20
|
role: Conductor
|
|
21
21
|
role_desc: "a Workflow Coordinator"
|
|
22
22
|
decision_rules:
|
|
23
|
-
- rule: "
|
|
24
|
-
- rule: "
|
|
25
|
-
- rule: "
|
|
26
|
-
- rule: "
|
|
27
|
-
- rule: "
|
|
28
|
-
- rule: "Invalid
|
|
29
|
-
- rule: "Invalid value type -> Show expected type and exit"
|
|
23
|
+
- rule: "Any invocation -> Open the interactive configuration menu (this skill takes no arguments)"
|
|
24
|
+
- rule: "Menu: View all settings -> Display every key with current value, type, default"
|
|
25
|
+
- rule: "Menu: Edit a setting -> Pick a key, validate, preview, confirm, write"
|
|
26
|
+
- rule: "Menu: Guided setup -> Walk common settings in order, apply atomically at the end"
|
|
27
|
+
- rule: "Invalid key -> Show available keys and return to the menu"
|
|
28
|
+
- rule: "Invalid value type -> Show expected type and re-prompt"
|
|
30
29
|
boundaries:
|
|
31
30
|
- scope: "analyze requirements"
|
|
32
31
|
skill: "/mvt-analyze"
|
|
@@ -37,25 +36,22 @@ sections:
|
|
|
37
36
|
|
|
38
37
|
- type: inline
|
|
39
38
|
content: |
|
|
40
|
-
##
|
|
39
|
+
## Usage
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
41
|
+
`/mvt-config` takes no arguments. It always opens an interactive menu; all actions are reached from there.
|
|
42
|
+
|
|
43
|
+
| Menu action | Description |
|
|
44
|
+
|-------------|-------------|
|
|
45
|
+
| View all settings | Display every configuration key with its current value, type, and default |
|
|
46
|
+
| Edit a setting | Pick a key, then validate, preview, confirm, and write the change |
|
|
47
|
+
| Guided setup | Walk through common settings in order and apply them atomically |
|
|
49
48
|
|
|
50
49
|
- type: shared
|
|
51
|
-
source: sections/activation-
|
|
50
|
+
source: sections/activation-protocol.md
|
|
52
51
|
params:
|
|
53
52
|
extended_context:
|
|
54
53
|
- ".ai-agents/config.yaml -- Current configuration (this skill's primary target)"
|
|
55
54
|
|
|
56
|
-
- type: shared
|
|
57
|
-
source: sections/activation-load-config.md
|
|
58
|
-
|
|
59
55
|
- type: shared
|
|
60
56
|
source: sections/language-constraint.md
|
|
61
57
|
|
|
@@ -72,15 +68,14 @@ sections:
|
|
|
72
68
|
| `preferences.output.no_emojis` | bool | `true` | Disable emojis in output |
|
|
73
69
|
| `preferences.output.data_format` | enum | `yaml` | Data output format (yaml, json) |
|
|
74
70
|
| `preferences.context_routing.relevance_threshold` | int | `70` | AI routing threshold for `/mvt-manage-context add` (0-100) |
|
|
75
|
-
| `preferences.history_limits.history` | int | `
|
|
76
|
-
| `preferences.history_limits.changes` | int | `
|
|
71
|
+
| `preferences.history_limits.history` | int | `10` | Max history entries (1-100) |
|
|
72
|
+
| `preferences.history_limits.changes` | int | `10` | Max changes entries (1-100) |
|
|
73
|
+
| `preferences.context_thresholds.*` | map | built-in thresholds | Optional context health thresholds read by `/mvt-check-context`; omitted keys use built-in defaults |
|
|
77
74
|
| `preferences.planning.granularity` | enum | `medium` | Task decomposition granularity for `/mvt-plan-dev`. Qualitative AI guidance, not hard limits. Values: `coarse` (fewer, larger tasks), `medium` (balanced), `fine` (more, smaller tasks) |
|
|
78
75
|
|
|
79
76
|
### Knowledge Settings
|
|
80
77
|
|
|
81
|
-
|
|
82
|
-
|-----|------|---------|-------------|
|
|
83
|
-
| `knowledge._all` | list | `[core, project-context]` | Global knowledge entries in registry.yaml under `_all` key, loaded by all skills across all projects |
|
|
78
|
+
Knowledge routing is managed by `/mvt-manage-context`, not by `/mvt-config`. Requests to change `knowledge.*` keys must be refused and routed there.
|
|
84
79
|
|
|
85
80
|
- type: file
|
|
86
81
|
source: ./business.md
|
|
@@ -45,7 +45,7 @@ Collect core metadata. Each field has an explicit constraint -- do not accept va
|
|
|
45
45
|
|
|
46
46
|
| Field | Constraint | Notes |
|
|
47
47
|
|-------|------------|-------|
|
|
48
|
-
| Name | Lowercase, kebab-case, no spaces
|
|
48
|
+
| Name | Lowercase, kebab-case, no spaces, must match `^[a-z][a-z0-9-]*$`. Prefix `mvt-` for framework skills; project-specific prefixes (e.g., `app-`, `proj-`) are also acceptable | Reject if invalid or if it conflicts with an existing entry in `registry.yaml` |
|
|
49
49
|
| Agent role | One of: `conductor`, `analyst`, `architect`, `developer`, `reviewer`, `tester` | Maps the skill to an existing role family |
|
|
50
50
|
| Purpose | One sentence | Will become the SKILL.md `## Purpose` section |
|
|
51
51
|
| Category | One of: `workflow`, `shortcut`, `project`, `utility` | Drives how `/mvt-help` groups it |
|
|
@@ -77,7 +77,7 @@ If the user is unsure on any field, propose a default and ask for confirmation r
|
|
|
77
77
|
|--------|----------|
|
|
78
78
|
| Input parameters | What does the skill need from the user / workspace? |
|
|
79
79
|
| Execution mode | Interactive / automated / hybrid |
|
|
80
|
-
| Pre-flight checks | List, with severity (BLOCK / WARN);
|
|
80
|
+
| Pre-flight checks | List, with severity (BLOCK / WARN); these populate the Pre-flight part of the Activation Protocol copied into the generated SKILL.md |
|
|
81
81
|
| Decision rules (in role-header) | 3-7 imperative rules covering the major branches |
|
|
82
82
|
| Boundaries | What is in-scope vs delegated to other skills |
|
|
83
83
|
| Execution Flow steps | Bulleted titles only (full content comes in Step 6) |
|
|
@@ -86,7 +86,7 @@ If the user is unsure on any field, propose a default and ask for confirmation r
|
|
|
86
86
|
### Step 6: Generate Skill Files
|
|
87
87
|
1. Create skill directory: `.claude/skills/{name}/`.
|
|
88
88
|
2. Generate a complete `SKILL.md` file (see Generated SKILL.md Structure below). This file must be fully self-contained — there is no assembler or build step to resolve shared section references. All content must be inlined directly into the SKILL.md.
|
|
89
|
-
3. For standard sections (Activation Protocol,
|
|
89
|
+
3. For standard sections (Activation Protocol, Language Constraint, Output Format Constraint, State Update, Next Steps), read the existing shared section files under `.ai-agents/sections/` or the corresponding installed skill section and substitute only the skill-specific values (role, decision rules, boundaries, pre-flight checks, next-skill suggestions). Do NOT reproduce these sections from memory; use the checked-in source text as the canonical template.
|
|
90
90
|
4. For skill-specific sections (frontmatter, Purpose, Execution Flow, Edge Cases & Errors), generate fresh content following the skeleton below.
|
|
91
91
|
- `## Execution Flow`
|
|
92
92
|
- `### Step 1: Load Inputs` -- list required and recommended files, plus fallback rules.
|
|
@@ -100,16 +100,21 @@ If the user is unsure on any field, propose a default and ask for confirmation r
|
|
|
100
100
|
7. SKILL.md word budget: aim for the body to be under ~5k words. Push reference material to `references/`.
|
|
101
101
|
|
|
102
102
|
### Step 7: Register in Registry (MANDATORY)
|
|
103
|
-
|
|
103
|
+
Create a pre-write backup of `.ai-agents/registry.yaml`, then add the skill entry to `.ai-agents/registry.yaml` > `skills` section using structured YAML serialization (not hand-written string concatenation):
|
|
104
104
|
|
|
105
105
|
```yaml
|
|
106
106
|
{name}:
|
|
107
107
|
description: "{third-person description with trigger keywords}"
|
|
108
108
|
custom: true
|
|
109
|
+
template: "_templates/{name}-output.md" # include ONLY if an output template was created in Step 6; omit this key otherwise
|
|
109
110
|
```
|
|
110
111
|
|
|
112
|
+
- If an output template was created in Step 6, set `template:` to its path so `/mvt-template` can discover it; otherwise omit the key entirely.
|
|
111
113
|
- The `custom: true` field is **required** for user-created skills; without it, framework updates will overwrite the entry.
|
|
112
|
-
-
|
|
114
|
+
- Refuse to overwrite an existing skill key.
|
|
115
|
+
- Escape `description` through the YAML serializer; never interpolate raw user text into YAML.
|
|
116
|
+
- Validate the YAML still parses after the write; if not, restore the backup and surface the parse error.
|
|
117
|
+
- Post-write, assert the skills entry count increased by exactly 1 and no existing sibling skill entry changed.
|
|
113
118
|
|
|
114
119
|
### Step 8: Validation
|
|
115
120
|
Walk this checklist; any failed item must be fixed before declaring success.
|
|
@@ -150,7 +155,7 @@ Apply the State Update rules defined in the **State Update** section below.
|
|
|
150
155
|
| Skill duplicates an existing skill's responsibility | Surface the overlap (cite the existing skill's description); propose merging or sub-classing as a variant rather than creating a duplicate |
|
|
151
156
|
| User provides a non-third-person description ("Use this skill when you need...") | Rewrite to third-person before saving; show the rewrite for confirmation |
|
|
152
157
|
| Generated SKILL.md is missing a standard section (e.g., State Update, Next Steps) | Abort generation; inform user which section is missing; read an existing SKILL.md for the correct structure |
|
|
153
|
-
| `registry.yaml` parse fails after
|
|
158
|
+
| `registry.yaml` parse fails after write | Restore from the pre-write backup; surface the error; do not leave the registry corrupt |
|
|
154
159
|
|
|
155
160
|
## Generated SKILL.md Structure
|
|
156
161
|
|
|
@@ -210,11 +215,10 @@ Copy the following sections verbatim from this document (the assembled SKILL.md
|
|
|
210
215
|
|
|
211
216
|
| Section | Source in this document | What to replace |
|
|
212
217
|
|---------|----------------------|-----------------|
|
|
213
|
-
| Activation Protocol | `## Activation Protocol` |
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
| Pre-flight Checks | Pre-flight Checks step within Activation Protocol | Replace `checks` table with skill-specific checks; if none required, use a single INFO row |
|
|
218
|
+
| Activation Protocol | `## Activation Protocol` (the whole Load + Resolve block) | Copy the entire block as-is. The block already covers context loading, project scope, knowledge, config preferences, and pre-flight. Adjust only two skill-specific parts: under Load, the Extended Context entries (add the files/directives this skill needs, or drop the Extended Context bullet if none); under Resolve > Pre-flight, the checks table (skill-specific checks, or a single INFO row if none required) |
|
|
219
|
+
| Language Constraint | `## Language Constraint` | Copy as-is (separate section, not part of Activation Protocol) |
|
|
220
|
+
| Output Format Constraint | `## Output Format Constraint` | Copy as-is (separate section); include only if the skill writes persisted markdown |
|
|
217
221
|
| State Update | `## State Update` | Replace `/{name}` with the new skill's command; include `active_change` conditional block only if the skill creates changes; include `Shortcut Operation Rules` if the user opted for shortcut semantics during Step 5 design |
|
|
218
222
|
| Suggested Next Steps | `## Suggested Next Steps` | Replace `current_skill` with the new skill name; replace conditional suggestions with skill-appropriate ones |
|
|
219
223
|
|
|
220
|
-
**Important**: Do NOT paraphrase or rewrite the standard sections.
|
|
224
|
+
**Important**: Do NOT paraphrase or rewrite the standard sections. Load them from the checked-in shared section sources or a selected installed exemplar and only substitute the skill-specific values. This ensures consistency across all MVTT skills.
|
|
@@ -28,25 +28,22 @@ sections:
|
|
|
28
28
|
- rule: "Usage patterns unclear -> Ask for concrete examples before proceeding"
|
|
29
29
|
boundaries:
|
|
30
30
|
- scope: "generate skills that deviate from MVTT SKILL.md standard structure"
|
|
31
|
-
|
|
31
|
+
guidance: "follow the standard structure as documented"
|
|
32
32
|
- scope: "use arbitrary prefixes without validating naming conventions"
|
|
33
|
-
|
|
33
|
+
guidance: "use `mvt-` or a project-specific prefix like `app-`, `proj-`"
|
|
34
34
|
- scope: "create skills without registering in registry.yaml"
|
|
35
|
-
|
|
35
|
+
guidance: "register with `custom: true` in registry.yaml"
|
|
36
36
|
- scope: "write vague or first-person descriptions"
|
|
37
|
-
|
|
37
|
+
guidance: "write third-person with effective trigger keywords"
|
|
38
38
|
- scope: "exceed ~5k words in SKILL.md body"
|
|
39
|
-
|
|
39
|
+
guidance: "push detailed content to references/"
|
|
40
40
|
|
|
41
41
|
- type: shared
|
|
42
|
-
source: sections/activation-
|
|
42
|
+
source: sections/activation-protocol.md
|
|
43
43
|
params:
|
|
44
44
|
extended_context:
|
|
45
45
|
- "Load one existing SKILL.md as structural reference (e.g., `.claude/skills/mvt-status/SKILL.md`)"
|
|
46
46
|
|
|
47
|
-
- type: shared
|
|
48
|
-
source: sections/activation-load-config.md
|
|
49
|
-
|
|
50
47
|
- type: shared
|
|
51
48
|
source: sections/language-constraint.md
|
|
52
49
|
|
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
### Step 6: Write Artifacts
|
|
57
57
|
Write two artifacts:
|
|
58
58
|
|
|
59
|
+
Before writing, derive `epic_id` and check whether `.ai-agents/workspace/artifacts/{epic_id}/` already exists. If it exists, do NOT overwrite it; warn the user and ask for a disambiguating slug, then re-run the preview from Step 5 with the new id.
|
|
60
|
+
|
|
59
61
|
1. **epic.md** (narrative) -- `.ai-agents/workspace/artifacts/{epic_id}/epic.md`
|
|
60
62
|
- Uses the `decompose-output` template. Follow the HTML comments in the template for what each section should contain (including the Child Stories table format and the Dependency Map mermaid flowchart); strip comments from the final artifact.
|
|
61
63
|
- **Required coverage**: cover only content that is applicable to this decomposition. Preserve enough information for the user to understand the epic vision, boundaries, cross-cutting concerns, child stories, dependencies, and unresolved questions. Do not create empty or artificial sections just because an item is named here; if the template omits or renames a section, place applicable content in the closest relevant section.
|
|
@@ -67,6 +69,7 @@ Write two artifacts:
|
|
|
67
69
|
|
|
68
70
|
**Self-validation checklist** (verify before writing):
|
|
69
71
|
- [ ] All `change_id` values are unique
|
|
72
|
+
- [ ] `.ai-agents/workspace/artifacts/{epic_id}/` does not already exist
|
|
70
73
|
- [ ] All `depends_on` references exist in `children[]`
|
|
71
74
|
- [ ] No cycles in the dependency graph
|
|
72
75
|
- [ ] Exactly one child has `status: active`
|
|
@@ -33,27 +33,25 @@ sections:
|
|
|
33
33
|
skill: "/mvt-analyze"
|
|
34
34
|
|
|
35
35
|
- type: shared
|
|
36
|
-
source: sections/activation-
|
|
37
|
-
|
|
38
|
-
- type: shared
|
|
39
|
-
source: sections/activation-load-config.md
|
|
40
|
-
|
|
41
|
-
- type: shared
|
|
42
|
-
source: sections/activation-preflight.md
|
|
36
|
+
source: sections/activation-protocol.md
|
|
43
37
|
params:
|
|
38
|
+
activation_reads:
|
|
39
|
+
- session.yaml
|
|
40
|
+
has_preflight: true
|
|
44
41
|
checks:
|
|
45
42
|
- order: "1"
|
|
46
43
|
field: "session.initialized_at"
|
|
47
44
|
level: "WARN"
|
|
48
|
-
message:
|
|
45
|
+
message: "Session not initialized. Run `/mvt-init` first."
|
|
49
46
|
- order: "2"
|
|
50
47
|
field: "projects[] in project-context.yaml"
|
|
51
48
|
level: "WARN"
|
|
52
|
-
message:
|
|
49
|
+
message: "Project not initialized. Run `/mvt-init` first."
|
|
53
50
|
- order: "3"
|
|
54
51
|
field: "active_change.id"
|
|
52
|
+
condition: "active_change.id is non-empty"
|
|
55
53
|
level: "WARN"
|
|
56
|
-
message:
|
|
54
|
+
message: "An active change already exists. Decomposing will create a new epic alongside it. Continue? (y/n)"
|
|
57
55
|
|
|
58
56
|
- type: shared
|
|
59
57
|
source: sections/language-constraint.md
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
- Do NOT modify `project-context.yaml` or `project-context.md` here.
|
|
87
87
|
|
|
88
88
|
### Step 8: Suggest Plan Decomposition
|
|
89
|
-
- If `Change Tracking` lists more than
|
|
89
|
+
- If `Change Tracking` lists more than 5 files OR Module Design adds more than 1 new module OR ADRs include any breaking change, recommend `/mvt-plan-dev` as the next step.
|
|
90
90
|
- Otherwise recommend `/mvt-implement` directly.
|
|
91
91
|
|
|
92
92
|
### Step 9: State Update
|
|
@@ -44,17 +44,15 @@ sections:
|
|
|
44
44
|
| `/mvt-design --plan` | High-level implementation plan only: skip Step 5 (data flow detail) and Step 6 (full ADR fields). ADRs collapse to one-line `decision: <text>`. Step 8 writes `design.md` with abbreviated content and a top-line `Mode: plan` indicator. If the request is actually small (1 file), downgrade to a 5-line summary in chat and do NOT write `design.md`. |
|
|
45
45
|
|
|
46
46
|
- type: shared
|
|
47
|
-
source: sections/activation-
|
|
47
|
+
source: sections/activation-protocol.md
|
|
48
48
|
params:
|
|
49
|
+
activation_reads:
|
|
50
|
+
- session.yaml
|
|
49
51
|
extended_context:
|
|
50
52
|
- ".ai-agents/workspace/artifacts/{active_change.id}/analysis.md -- Analysis from previous phase"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- type: shared
|
|
56
|
-
source: sections/activation-preflight.md
|
|
57
|
-
params:
|
|
53
|
+
- ".ai-agents/knowledge/project/_generated/project-context.md -- Current semantic project context"
|
|
54
|
+
- ".ai-agents/workspace/artifacts/*/design.md -- Prior design artifacts for related changes (load only relevant matches)"
|
|
55
|
+
has_preflight: true
|
|
58
56
|
checks:
|
|
59
57
|
- order: "1"
|
|
60
58
|
field: "session.initialized_at"
|