@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.
- package/README.md +184 -193
- package/dist/build/section-loader.d.ts.map +1 -1
- package/dist/build/section-loader.js +18 -8
- package/dist/build/section-loader.js.map +1 -1
- package/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +5 -0
- package/dist/fs/materialize.js.map +1 -1
- package/dist/scripts/session-update.cjs +7568 -0
- package/install-manifest.yaml +2 -0
- package/package.json +3 -2
- package/registry.yaml +6 -0
- package/sources/defaults/config.yaml +7 -7
- package/sources/defaults/session.yaml +9 -16
- package/sources/scripts/session-update.js +351 -0
- package/sources/sections/activation-load-context.md +4 -0
- package/sources/sections/footer-next-steps.md +1 -1
- package/sources/sections/output-language-constraint.md +11 -11
- package/sources/sections/session-update.md +115 -47
- package/sources/skills/mvt-analyze/business.md +7 -7
- package/sources/skills/mvt-analyze/manifest.yaml +1 -0
- package/sources/skills/mvt-analyze-code/manifest.yaml +110 -96
- package/sources/skills/mvt-bug-detect/business.md +99 -0
- package/sources/skills/mvt-bug-detect/manifest.yaml +84 -0
- package/sources/skills/mvt-check-context/business.md +3 -5
- package/sources/skills/mvt-check-context/manifest.yaml +70 -63
- package/sources/skills/mvt-cleanup/business.md +49 -23
- package/sources/skills/mvt-cleanup/manifest.yaml +15 -10
- package/sources/skills/mvt-config/business.md +1 -2
- package/sources/skills/mvt-config/manifest.yaml +103 -96
- package/sources/skills/mvt-create-skill/business.md +84 -76
- package/sources/skills/mvt-create-skill/manifest.yaml +107 -95
- package/sources/skills/mvt-design/business.md +3 -6
- package/sources/skills/mvt-design/manifest.yaml +109 -96
- package/sources/skills/mvt-fix/business.md +39 -9
- package/sources/skills/mvt-fix/manifest.yaml +88 -72
- package/sources/skills/mvt-help/business.md +2 -4
- package/sources/skills/mvt-help/manifest.yaml +75 -67
- package/sources/skills/mvt-implement/business.md +4 -5
- package/sources/skills/mvt-implement/manifest.yaml +93 -80
- package/sources/skills/mvt-init/business.md +2 -2
- package/sources/skills/mvt-init/manifest.yaml +102 -101
- package/sources/skills/mvt-manage-context/business.md +186 -175
- package/sources/skills/mvt-manage-context/manifest.yaml +134 -123
- package/sources/skills/mvt-plan-dev/business.md +101 -20
- package/sources/skills/mvt-plan-dev/manifest.yaml +90 -91
- package/sources/skills/mvt-quick-dev/business.md +2 -1
- package/sources/skills/mvt-quick-dev/manifest.yaml +84 -69
- package/sources/skills/mvt-refactor/business.md +2 -1
- package/sources/skills/mvt-refactor/manifest.yaml +104 -86
- package/sources/skills/mvt-resume/business.md +28 -68
- package/sources/skills/mvt-resume/manifest.yaml +81 -71
- package/sources/skills/mvt-review/business.md +3 -3
- package/sources/skills/mvt-review/manifest.yaml +108 -87
- package/sources/skills/mvt-status/business.md +14 -18
- package/sources/skills/mvt-status/manifest.yaml +74 -66
- package/sources/skills/mvt-sync-context/business.md +155 -150
- package/sources/skills/mvt-sync-context/manifest.yaml +99 -96
- package/sources/skills/mvt-template/business.md +0 -2
- package/sources/skills/mvt-template/manifest.yaml +68 -63
- package/sources/skills/mvt-test/business.md +3 -3
- package/sources/skills/mvt-test/manifest.yaml +115 -102
- package/sources/skills/mvt-update-plan/business.md +83 -72
- package/sources/skills/mvt-update-plan/manifest.yaml +124 -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/build/plan-validator.d.ts +0 -26
- package/dist/build/plan-validator.d.ts.map +0 -1
- package/dist/build/plan-validator.js +0 -225
- package/dist/build/plan-validator.js.map +0 -1
- package/dist/commands/build.d.ts +0 -5
- package/dist/commands/build.d.ts.map +0 -1
- package/dist/commands/build.js +0 -46
- package/dist/commands/build.js.map +0 -1
- package/dist/commands/migrate.d.ts +0 -18
- package/dist/commands/migrate.d.ts.map +0 -1
- package/dist/commands/migrate.js +0 -163
- package/dist/commands/migrate.js.map +0 -1
- 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,150 +1,155 @@
|
|
|
1
|
-
## Execution Flow
|
|
2
|
-
|
|
3
|
-
### Step 1: Identify Completed Changes
|
|
4
|
-
- **What**: produce a candidate list of change-ids whose artifacts will be aggregated.
|
|
5
|
-
- **How**:
|
|
6
|
-
1. Read `session.yaml`. Collect `
|
|
7
|
-
2. For each candidate, verify `.ai-agents/workspace/artifacts/{change-id}/` exists AND contains at least one of `analysis.md` or `design.md`. Drop entries with only `plan.yaml`.
|
|
8
|
-
3. (Fallback) If `
|
|
9
|
-
4. Exclude
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- `
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- `
|
|
55
|
-
- `
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- **
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
| Artifact item
|
|
99
|
-
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
|
146
|
-
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Identify Completed Changes
|
|
4
|
+
- **What**: produce a candidate list of change-ids whose artifacts will be aggregated.
|
|
5
|
+
- **How**:
|
|
6
|
+
1. Read `session.yaml`. Collect `changes[]` entries with `status: done`.
|
|
7
|
+
2. For each candidate, verify `.ai-agents/workspace/artifacts/{change-id}/` exists AND contains at least one of `analysis.md` or `design.md`. Drop entries with only `plan.yaml`.
|
|
8
|
+
3. (Fallback) If `changes[]` is empty, scan `.ai-agents/workspace/artifacts/*/` directly; offer those with `analysis.md` or `design.md`, marked `unindexed`.
|
|
9
|
+
4. Exclude already-archived or irrelevant changes:
|
|
10
|
+
- **Indexed changes**: exclude any `changes[]` entry with `status: abandoned`. For `status: done` entries, Step 1.2's directory existence check already filters out those whose artifacts have been moved to `artifacts/_archived/` by `/mvt-cleanup`.
|
|
11
|
+
- **Fallback scan**: when scanning `artifacts/*/` directly, skip any path under `artifacts/_archived/` (the unified archive directory managed by `/mvt-cleanup`).
|
|
12
|
+
5. Exclude `active_change.id` (work in flight).
|
|
13
|
+
|
|
14
|
+
- **Present** the list:
|
|
15
|
+
|
|
16
|
+
| # | change-id | title | status | analysis.md | design.md | implementation.md |
|
|
17
|
+
|---|-----------|-------|--------|-------------|-----------|-------------------|
|
|
18
|
+
|
|
19
|
+
- **Always print before user confirmation**:
|
|
20
|
+
> Run `/mvt-sync-context` BEFORE `/mvt-cleanup`. Once cleanup archives a change-id, this skill will skip it.
|
|
21
|
+
|
|
22
|
+
- **Prompt**: "Select changes to aggregate. Indices (e.g. 1,3,5), `a` for all, `n` to cancel."
|
|
23
|
+
|
|
24
|
+
- Cancel / empty selection -> stop with "no changes applied".
|
|
25
|
+
|
|
26
|
+
### Step 2: Read Current Project Context (Adaptive Structure Discovery)
|
|
27
|
+
|
|
28
|
+
This step establishes the **target structure** that aggregated content must fit into. The structure is NOT assumed -- it is derived from the current document.
|
|
29
|
+
|
|
30
|
+
1. Read `.ai-agents/knowledge/project/_generated/project-context.md`.
|
|
31
|
+
- Already required by preflight; if discovered missing here, STOP and recommend `/mvt-analyze-code`.
|
|
32
|
+
2. Parse the current `.md` into a section map:
|
|
33
|
+
- Each top-level `##` heading -> one section anchor.
|
|
34
|
+
- Record: section title (verbatim), byte range, and a 1-line semantic summary derived from the section's content (e.g., "lists domain terms with definitions" or "describes module dependencies").
|
|
35
|
+
- The summary is what enables matching in Step 3 -- section titles may be in any language and may not match conventional names (Terms / Modules / etc.).
|
|
36
|
+
3. If the document has zero `##` sections (single block) -> STOP. Recommend `/mvt-analyze-code` to establish a sectioned baseline first.
|
|
37
|
+
4. Read `.ai-agents/workspace/project-context.yaml`. Record current `projects[].source_paths`, `modules`, and `tech_stack` for diff comparison in Step 4d.
|
|
38
|
+
|
|
39
|
+
### Step 3: Extract and Classify Artifact Content
|
|
40
|
+
|
|
41
|
+
- **What**: from each selected change-id, extract atomic knowledge items and classify them against the section map from Step 2.
|
|
42
|
+
- **How**:
|
|
43
|
+
1. For each selected change-id, read available artifacts (`analysis.md`, `implementation.md`).
|
|
44
|
+
2. Extract atomic items. Typical sources:
|
|
45
|
+
- `analysis.md` -> domain terms, actors, business rules, constraints
|
|
46
|
+
- `implementation.md` -> files added/changed (informs `.yaml` source_paths), realized vs deviated design points
|
|
47
|
+
3. For each item, match to a section from the Step 2 map:
|
|
48
|
+
- Match by semantic similarity to **section title + 1-line summary**, not by exact string.
|
|
49
|
+
- Confidence levels:
|
|
50
|
+
- **mapped**: exactly one section matches with high confidence
|
|
51
|
+
- **ambiguous**: 2+ sections plausibly match
|
|
52
|
+
- **orphan**: no section matches; propose a new section name
|
|
53
|
+
4. For each item, also detect change type relative to current section content:
|
|
54
|
+
- `new` -- target section does not contain this entity
|
|
55
|
+
- `modify` -- target section mentions the entity but artifact provides a different value
|
|
56
|
+
- `redundant` -- already present, no change (will be filtered out, not shown to user)
|
|
57
|
+
|
|
58
|
+
### Step 4: Render the Update Plan (Four Tables)
|
|
59
|
+
|
|
60
|
+
#### 4a. Section-mapped items
|
|
61
|
+
| # | change-id | item | type | target section | classification |
|
|
62
|
+
|---|-----------|------|------|----------------|----------------|
|
|
63
|
+
|
|
64
|
+
#### 4b. Conflicts requiring resolution (every `modify` item)
|
|
65
|
+
| # | item | section | current value | proposed value (from {change-id}) |
|
|
66
|
+
|---|------|---------|---------------|-----------------------------------|
|
|
67
|
+
|
|
68
|
+
#### 4c. Ambiguous and orphan items
|
|
69
|
+
| # | item | reason | candidate sections (or proposed new section) |
|
|
70
|
+
|---|------|--------|----------------------------------------------|
|
|
71
|
+
|
|
72
|
+
#### 4d. Implied yaml changes
|
|
73
|
+
| # | yaml field | current | proposed |
|
|
74
|
+
|---|------------|---------|----------|
|
|
75
|
+
|
|
76
|
+
### Step 5: User Confirmation (Per-Table)
|
|
77
|
+
|
|
78
|
+
- **4a**: default = accept all. User input: indices to drop, or `e <n>` to edit a single item's target section.
|
|
79
|
+
- **4b**: **explicit per-row decision required**. Format `<index>:<keep|replace|edit>`. Example: `1:replace,2:keep,3:edit`. No default.
|
|
80
|
+
- **4c**: per row, user picks an existing section, types a new section name, or `skip`.
|
|
81
|
+
- **4d**: default = accept; user can drop indices.
|
|
82
|
+
|
|
83
|
+
Then ask: **"Run optional read-only code verification before applying? (y/n)"**
|
|
84
|
+
|
|
85
|
+
### Step 6: (Optional) Read-only Code Verification
|
|
86
|
+
|
|
87
|
+
This step catches artifacts claiming entities never actually delivered. It is **read-only** -- it never writes anything to `.md` or `.yaml`.
|
|
88
|
+
|
|
89
|
+
If user opts in:
|
|
90
|
+
1. For each accepted item naming a code entity (module path, file, class, function), search the codebase under registered `source_paths`:
|
|
91
|
+
- Module path -> directory exists?
|
|
92
|
+
- File -> file exists?
|
|
93
|
+
- Symbol -> grep within source_paths
|
|
94
|
+
2. Classify findings:
|
|
95
|
+
|
|
96
|
+
| Finding | Action |
|
|
97
|
+
|---------|--------|
|
|
98
|
+
| Artifact item matches code | Mark `verified`; keep in apply list |
|
|
99
|
+
| Artifact item NOT found in code | Flag `unverified`; ask user: drop or proceed (likely reverted / un-merged) |
|
|
100
|
+
| Code contains module / file / symbol that NO artifact item references | **Do NOT add to apply list.** Print: `Code-only entity detected: {path}. Run /mvt-analyze-code for ground-truth rebuild.` |
|
|
101
|
+
|
|
102
|
+
3. Re-render the apply list with `verified` / `unverified` markers; final confirmation.
|
|
103
|
+
|
|
104
|
+
If user skips verification: proceed directly to Step 7 with Step 5 selections.
|
|
105
|
+
|
|
106
|
+
### Step 7: Apply Updates (Merge Mode)
|
|
107
|
+
|
|
108
|
+
- **Pre-write**:
|
|
109
|
+
1. Backup: `project-context.md` -> `project-context.md.bak`; `project-context.yaml` -> `project-context.yaml.bak`. Overwrite any prior `.bak`.
|
|
110
|
+
2. Backup write failure -> STOP, do not modify originals.
|
|
111
|
+
|
|
112
|
+
- **Update `project-context.md`** (merge, never rewrite):
|
|
113
|
+
1. Each `new` item: append to target section, matching the section's existing style (bullet vs paragraph).
|
|
114
|
+
2. Each `modify` item with `replace`: replace the matching line in place. Smallest possible diff.
|
|
115
|
+
3. Each `orphan` item with new-section choice: append a new `##` section at end of file.
|
|
116
|
+
4. **Never delete** any existing line. **Never reorder** existing sections.
|
|
117
|
+
|
|
118
|
+
- **Update `project-context.yaml`** (structured merge):
|
|
119
|
+
1. Apply accepted entries from Table 4d.
|
|
120
|
+
2. Add new `source_paths` to matching project entry; add new modules to `modules[]`.
|
|
121
|
+
3. **Never delete** an existing yaml entry in this skill.
|
|
122
|
+
|
|
123
|
+
- **Atomicity**: temp + rename per file. If `.md` write succeeds but `.yaml` fails (or vice versa) -> restore the failed one from `.bak`, keep the other; report partial success.
|
|
124
|
+
|
|
125
|
+
### Step 8: Report
|
|
126
|
+
|
|
127
|
+
1. **Applied summary** -- counts: items added / modified / skipped / orphaned-into-new-section
|
|
128
|
+
2. **Files changed** -- paths + byte deltas
|
|
129
|
+
3. **Backup paths** -- so user can manually revert
|
|
130
|
+
4. **Synced changes** -- list all change-ids whose knowledge was aggregated in this run:
|
|
131
|
+
> The following changes have been synced and can be safely archived: {change-id-1}, {change-id-2}, ...
|
|
132
|
+
> Last synced at: {last_synced_at} (updated by this run)
|
|
133
|
+
5. **Out-of-scope reminder** (always print):
|
|
134
|
+
> This skill processes additions and modifications only. Module deletions, renames, and large refactors are NOT detected here. Run `/mvt-analyze-code` periodically to rebuild from ground truth.
|
|
135
|
+
6. **Suggested next**:
|
|
136
|
+
- Aggregated >= 1 change -> "Run `/mvt-cleanup` to archive these completed changes."
|
|
137
|
+
- Verification flagged code-only entities -> "Run `/mvt-analyze-code` to capture missing entities."
|
|
138
|
+
|
|
139
|
+
### Step 9: State Update
|
|
140
|
+
Apply the State Update rules defined in the **State Update** section below.
|
|
141
|
+
- The `--set-synced` parameter updates `session.last_synced_at`.
|
|
142
|
+
|
|
143
|
+
## Edge Cases & Errors
|
|
144
|
+
|
|
145
|
+
| Case | Handling |
|
|
146
|
+
|------|----------|
|
|
147
|
+
| `project-context.md` does not exist | Caught at preflight; recommend `/mvt-analyze-code` |
|
|
148
|
+
| `.md` has zero `##` sections | STOP at Step 2; recommend `/mvt-analyze-code` |
|
|
149
|
+
| Selected change-id has only `plan.yaml` | Filtered in Step 1; will not appear |
|
|
150
|
+
| `modify` with `replace` but the existing line cannot be located deterministically | Fall back to append + flag as duplicate-needs-manual-edit; do NOT silently overwrite the wrong line |
|
|
151
|
+
| `.md.bak` already exists | Overwrite (only the most recent backup matters) |
|
|
152
|
+
| User aborts at Step 5 | Do not write; report "no changes applied" |
|
|
153
|
+
| Step 6 verification finds zero matches for everything | Strong warning; require explicit confirm before proceeding (artifacts likely describe planned, not delivered, work) |
|
|
154
|
+
| Two artifacts contradict each other (design says layer A, implementation says layer B) | Surface in Table 4b as cross-artifact conflict; user picks |
|
|
155
|
+
| change-id was archived between Step 1 and Step 7 | Skip with note; do not error the run |
|
|
@@ -1,96 +1,99 @@
|
|
|
1
|
-
name: mvt-sync-context
|
|
2
|
-
output: .claude/skills/mvt-sync-context/SKILL.md
|
|
3
|
-
|
|
4
|
-
frontmatter:
|
|
5
|
-
name: mvt-sync-context
|
|
6
|
-
description: "Aggregate completed change artifacts (analysis/design/implementation) and merge new domain knowledge into project-context.md and project-context.yaml. This skill should be used after one or more changes are completed to keep long-term project knowledge in sync with delivered work."
|
|
7
|
-
|
|
8
|
-
sections:
|
|
9
|
-
- type: inline
|
|
10
|
-
content: |
|
|
11
|
-
# MVT Sync Context
|
|
12
|
-
|
|
13
|
-
## Purpose
|
|
14
|
-
|
|
15
|
-
Keep `project-context.md` (semantic) and `project-context.yaml` (structural index) in sync with completed work. This is an artifact-driven, incremental synchronization: it reads workspace artifacts of completed changes, classifies new domain knowledge, and merges it into the long-term context. It does NOT scan code for new content; an optional read-only code verification step can validate that artifact-claimed entities exist.
|
|
16
|
-
|
|
17
|
-
- type: shared
|
|
18
|
-
source: sections/role-header.md
|
|
19
|
-
params:
|
|
20
|
-
role: Conductor
|
|
21
|
-
role_desc: "a Workflow Coordinator"
|
|
22
|
-
decision_rules:
|
|
23
|
-
- rule: "Completed changes found -> List for user confirmation, then aggregate"
|
|
24
|
-
- rule: "No completed changes since last sync -> Report nothing to do"
|
|
25
|
-
- rule: "Conflicts with existing project-context.md -> Render conflict table, require user resolution"
|
|
26
|
-
- rule: "User opts in to code verification -> Run read-only scan; flag artifact entries that cannot be located"
|
|
27
|
-
- rule: "Code-only entities discovered (in code, not in artifacts) -> Do NOT write; recommend /mvt-analyze-code"
|
|
28
|
-
- rule: "Artifact references modules/source_paths absent from project-context.yaml -> Propose yaml additions for user confirmation"
|
|
29
|
-
boundaries:
|
|
30
|
-
- scope: "regenerate project-context.md from full code scan"
|
|
31
|
-
skill: "/mvt-analyze-code"
|
|
32
|
-
- scope: "archive completed change artifacts"
|
|
33
|
-
skill: "/mvt-cleanup"
|
|
34
|
-
- scope: "manage shared / per-skill knowledge files"
|
|
35
|
-
skill: "/mvt-manage-context"
|
|
36
|
-
|
|
37
|
-
- type: inline
|
|
38
|
-
content: |
|
|
39
|
-
### When to Use
|
|
40
|
-
- After one or more changes are marked `completed` and you want to fold their knowledge into long-term context
|
|
41
|
-
- BEFORE running `/mvt-cleanup` (sync first, archive after)
|
|
42
|
-
- When `project-context.md` looks behind delivered work but you do not want to pay a full `/mvt-analyze-code` regeneration
|
|
43
|
-
|
|
44
|
-
### When NOT to Use
|
|
45
|
-
- For deletions, renames, or module deprecations -> use `/mvt-analyze-code` (full ground-truth rebuild)
|
|
46
|
-
- To pick up code changes never recorded as MVTT changes -> use `/mvt-analyze-code`
|
|
47
|
-
- To clean / archive workspace -> use `/mvt-cleanup`
|
|
48
|
-
|
|
49
|
-
- type: shared
|
|
50
|
-
source: sections/activation-load-context.md
|
|
51
|
-
params:
|
|
52
|
-
extended_context:
|
|
53
|
-
- ".ai-agents/workspace/artifacts/{change-id}/ -- Source artifacts for completed changes"
|
|
54
|
-
- ".ai-agents/knowledge/project/_generated/project-context.md -- Current semantic context (merge target)"
|
|
55
|
-
- ".ai-agents/workspace/project-context.yaml -- Current structural index (merge target)"
|
|
56
|
-
|
|
57
|
-
- type: shared
|
|
58
|
-
source: sections/activation-load-config.md
|
|
59
|
-
|
|
60
|
-
- type: shared
|
|
61
|
-
source: sections/output-language-constraint.md
|
|
62
|
-
|
|
63
|
-
- type: shared
|
|
64
|
-
source: sections/activation-preflight.md
|
|
65
|
-
params:
|
|
66
|
-
checks:
|
|
67
|
-
- order: "1"
|
|
68
|
-
field: "session.initialized_at"
|
|
69
|
-
level: "BLOCK"
|
|
70
|
-
message: "Session not initialized. Run `/mvt-init` first."
|
|
71
|
-
- order: "2"
|
|
72
|
-
field: ".ai-agents/knowledge/project/_generated/project-context.md exists"
|
|
73
|
-
level: "BLOCK"
|
|
74
|
-
message: "project-context.md not found. Run `/mvt-analyze-code` to create the initial document; this skill only handles incremental updates."
|
|
75
|
-
|
|
76
|
-
- type: file
|
|
77
|
-
source: ./business.md
|
|
78
|
-
|
|
79
|
-
- type: shared
|
|
80
|
-
source: sections/session-update.md
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- condition: "
|
|
92
|
-
primary: "mvt-
|
|
93
|
-
primary_desc: "
|
|
94
|
-
- condition: "
|
|
95
|
-
primary: "mvt-
|
|
96
|
-
primary_desc: "
|
|
1
|
+
name: mvt-sync-context
|
|
2
|
+
output: .claude/skills/mvt-sync-context/SKILL.md
|
|
3
|
+
|
|
4
|
+
frontmatter:
|
|
5
|
+
name: mvt-sync-context
|
|
6
|
+
description: "Aggregate completed change artifacts (analysis/design/implementation) and merge new domain knowledge into project-context.md and project-context.yaml. This skill should be used after one or more changes are completed to keep long-term project knowledge in sync with delivered work."
|
|
7
|
+
|
|
8
|
+
sections:
|
|
9
|
+
- type: inline
|
|
10
|
+
content: |
|
|
11
|
+
# MVT Sync Context
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Keep `project-context.md` (semantic) and `project-context.yaml` (structural index) in sync with completed work. This is an artifact-driven, incremental synchronization: it reads workspace artifacts of completed changes, classifies new domain knowledge, and merges it into the long-term context. It does NOT scan code for new content; an optional read-only code verification step can validate that artifact-claimed entities exist.
|
|
16
|
+
|
|
17
|
+
- type: shared
|
|
18
|
+
source: sections/role-header.md
|
|
19
|
+
params:
|
|
20
|
+
role: Conductor
|
|
21
|
+
role_desc: "a Workflow Coordinator"
|
|
22
|
+
decision_rules:
|
|
23
|
+
- rule: "Completed changes found -> List for user confirmation, then aggregate"
|
|
24
|
+
- rule: "No completed changes since last sync -> Report nothing to do"
|
|
25
|
+
- rule: "Conflicts with existing project-context.md -> Render conflict table, require user resolution"
|
|
26
|
+
- rule: "User opts in to code verification -> Run read-only scan; flag artifact entries that cannot be located"
|
|
27
|
+
- rule: "Code-only entities discovered (in code, not in artifacts) -> Do NOT write; recommend /mvt-analyze-code"
|
|
28
|
+
- rule: "Artifact references modules/source_paths absent from project-context.yaml -> Propose yaml additions for user confirmation"
|
|
29
|
+
boundaries:
|
|
30
|
+
- scope: "regenerate project-context.md from full code scan"
|
|
31
|
+
skill: "/mvt-analyze-code"
|
|
32
|
+
- scope: "archive completed change artifacts"
|
|
33
|
+
skill: "/mvt-cleanup"
|
|
34
|
+
- scope: "manage shared / per-skill knowledge files"
|
|
35
|
+
skill: "/mvt-manage-context"
|
|
36
|
+
|
|
37
|
+
- type: inline
|
|
38
|
+
content: |
|
|
39
|
+
### When to Use
|
|
40
|
+
- After one or more changes are marked `completed` and you want to fold their knowledge into long-term context
|
|
41
|
+
- BEFORE running `/mvt-cleanup` (sync first, archive after)
|
|
42
|
+
- When `project-context.md` looks behind delivered work but you do not want to pay a full `/mvt-analyze-code` regeneration
|
|
43
|
+
|
|
44
|
+
### When NOT to Use
|
|
45
|
+
- For deletions, renames, or module deprecations -> use `/mvt-analyze-code` (full ground-truth rebuild)
|
|
46
|
+
- To pick up code changes never recorded as MVTT changes -> use `/mvt-analyze-code`
|
|
47
|
+
- To clean / archive workspace -> use `/mvt-cleanup`
|
|
48
|
+
|
|
49
|
+
- type: shared
|
|
50
|
+
source: sections/activation-load-context.md
|
|
51
|
+
params:
|
|
52
|
+
extended_context:
|
|
53
|
+
- ".ai-agents/workspace/artifacts/{change-id}/ -- Source artifacts for completed changes"
|
|
54
|
+
- ".ai-agents/knowledge/project/_generated/project-context.md -- Current semantic context (merge target)"
|
|
55
|
+
- ".ai-agents/workspace/project-context.yaml -- Current structural index (merge target)"
|
|
56
|
+
|
|
57
|
+
- type: shared
|
|
58
|
+
source: sections/activation-load-config.md
|
|
59
|
+
|
|
60
|
+
- type: shared
|
|
61
|
+
source: sections/output-language-constraint.md
|
|
62
|
+
|
|
63
|
+
- type: shared
|
|
64
|
+
source: sections/activation-preflight.md
|
|
65
|
+
params:
|
|
66
|
+
checks:
|
|
67
|
+
- order: "1"
|
|
68
|
+
field: "session.initialized_at"
|
|
69
|
+
level: "BLOCK"
|
|
70
|
+
message: "Session not initialized. Run `/mvt-init` first."
|
|
71
|
+
- order: "2"
|
|
72
|
+
field: ".ai-agents/knowledge/project/_generated/project-context.md exists"
|
|
73
|
+
level: "BLOCK"
|
|
74
|
+
message: "project-context.md not found. Run `/mvt-analyze-code` to create the initial document; this skill only handles incremental updates."
|
|
75
|
+
|
|
76
|
+
- type: file
|
|
77
|
+
source: ./business.md
|
|
78
|
+
|
|
79
|
+
- type: shared
|
|
80
|
+
source: sections/session-update.md
|
|
81
|
+
params:
|
|
82
|
+
current_skill: mvt-sync-context
|
|
83
|
+
set_synced: true
|
|
84
|
+
|
|
85
|
+
- type: shared
|
|
86
|
+
source: sections/footer-next-steps.md
|
|
87
|
+
params:
|
|
88
|
+
current_skill: mvt-sync-context
|
|
89
|
+
conditional_suggestions:
|
|
90
|
+
conditions:
|
|
91
|
+
- condition: "merge applied successfully"
|
|
92
|
+
primary: "mvt-cleanup"
|
|
93
|
+
primary_desc: "Archive aggregated change artifacts now that knowledge is sync'd"
|
|
94
|
+
- condition: "code verification flagged code-only entities"
|
|
95
|
+
primary: "mvt-analyze-code"
|
|
96
|
+
primary_desc: "Regenerate project-context.md from full code scan"
|
|
97
|
+
- condition: "default"
|
|
98
|
+
primary: "mvt-check-context"
|
|
99
|
+
primary_desc: "Audit token cost and overall context health"
|