@uoyo/mvtt 2.0.0-beta.0 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +131 -147
- package/dist/build/assembler.d.ts.map +1 -1
- package/dist/build/assembler.js +2 -0
- package/dist/build/assembler.js.map +1 -1
- package/dist/build/plan-validator.d.ts +26 -0
- package/dist/build/plan-validator.d.ts.map +1 -0
- package/dist/build/plan-validator.js +225 -0
- package/dist/build/plan-validator.js.map +1 -0
- package/dist/build/section-loader.d.ts.map +1 -1
- package/dist/build/section-loader.js +45 -9
- package/dist/build/section-loader.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -11
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +0 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/install.d.ts +1 -4
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +18 -14
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/migrate.d.ts +18 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +163 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +35 -2
- package/dist/commands/update.js.map +1 -1
- package/dist/fs/core-manifest.d.ts +17 -0
- package/dist/fs/core-manifest.d.ts.map +1 -0
- package/dist/fs/core-manifest.js +76 -0
- package/dist/fs/core-manifest.js.map +1 -0
- package/dist/fs/install-manifest.d.ts +1 -2
- package/dist/fs/install-manifest.d.ts.map +1 -1
- package/dist/fs/install-manifest.js +1 -2
- package/dist/fs/install-manifest.js.map +1 -1
- package/dist/fs/materialize.d.ts.map +1 -1
- package/dist/fs/materialize.js +23 -3
- package/dist/fs/materialize.js.map +1 -1
- package/dist/types/core-manifest.d.ts +12 -0
- package/dist/types/core-manifest.d.ts.map +1 -0
- package/dist/types/core-manifest.js +2 -0
- package/dist/types/core-manifest.js.map +1 -0
- package/dist/types/registry.d.ts +13 -5
- package/dist/types/registry.d.ts.map +1 -1
- package/install-manifest.yaml +31 -27
- package/package.json +57 -57
- package/registry.yaml +192 -209
- package/sources/defaults/config.yaml +27 -30
- package/sources/defaults/project-context.yaml +15 -26
- package/sources/defaults/session.yaml +31 -23
- package/sources/knowledge/core/manifest.yaml +4 -45
- package/sources/sections/activation-load-config.md +11 -5
- package/sources/sections/activation-load-context.md +26 -11
- package/sources/sections/activation-preflight.md +14 -4
- package/sources/sections/footer-next-steps.md +35 -9
- package/sources/sections/output-language-constraint.md +11 -0
- package/sources/sections/role-header.md +13 -13
- package/sources/sections/session-update.md +47 -0
- package/sources/skills/mvt-analyze/business.md +69 -33
- package/sources/skills/mvt-analyze/manifest.yaml +90 -89
- package/sources/skills/mvt-analyze-code/business.md +82 -35
- package/sources/skills/mvt-analyze-code/manifest.yaml +34 -26
- package/sources/skills/mvt-check-context/business.md +89 -42
- package/sources/skills/mvt-check-context/manifest.yaml +10 -21
- package/sources/skills/mvt-cleanup/business.md +80 -31
- package/sources/skills/mvt-cleanup/manifest.yaml +85 -93
- package/sources/skills/mvt-config/business.md +94 -26
- package/sources/skills/mvt-config/manifest.yaml +15 -27
- package/sources/skills/mvt-create-skill/business.md +224 -111
- package/sources/skills/mvt-create-skill/manifest.yaml +31 -15
- package/sources/skills/mvt-design/business.md +116 -34
- package/sources/skills/mvt-design/manifest.yaml +22 -31
- package/sources/skills/mvt-fix/business.md +103 -28
- package/sources/skills/mvt-fix/manifest.yaml +8 -22
- package/sources/skills/mvt-help/business.md +74 -70
- package/sources/skills/mvt-help/manifest.yaml +16 -10
- package/sources/skills/mvt-implement/business.md +91 -32
- package/sources/skills/mvt-implement/manifest.yaml +17 -33
- package/sources/skills/mvt-init/business.md +164 -49
- package/sources/skills/mvt-init/manifest.yaml +36 -28
- package/sources/skills/mvt-manage-context/business.md +175 -0
- package/sources/skills/mvt-manage-context/manifest.yaml +123 -0
- package/sources/skills/mvt-plan-dev/business.md +75 -0
- package/sources/skills/mvt-plan-dev/manifest.yaml +91 -0
- package/sources/skills/mvt-quick-dev/business.md +99 -0
- package/sources/skills/mvt-quick-dev/manifest.yaml +69 -0
- package/sources/skills/mvt-refactor/business.md +104 -33
- package/sources/skills/mvt-refactor/manifest.yaml +17 -32
- package/sources/skills/mvt-resume/business.md +137 -0
- package/sources/skills/mvt-resume/manifest.yaml +71 -0
- package/sources/skills/mvt-review/business.md +112 -49
- package/sources/skills/mvt-review/manifest.yaml +15 -34
- package/sources/skills/mvt-status/business.md +71 -24
- package/sources/skills/mvt-status/manifest.yaml +18 -26
- package/sources/skills/mvt-sync-context/business.md +148 -23
- package/sources/skills/mvt-sync-context/manifest.yaml +51 -39
- package/sources/skills/mvt-template/business.md +96 -49
- package/sources/skills/mvt-template/manifest.yaml +13 -21
- package/sources/skills/mvt-test/business.md +104 -36
- package/sources/skills/mvt-test/manifest.yaml +14 -23
- package/sources/skills/mvt-update-plan/business.md +72 -0
- package/sources/skills/mvt-update-plan/manifest.yaml +132 -0
- package/sources/templates/analyze-output/body.md +8 -31
- package/sources/templates/analyze-output/manifest.yaml +11 -11
- package/sources/templates/design-output/body.md +17 -50
- package/sources/templates/design-output/manifest.yaml +11 -11
- package/sources/templates/implement-output/body.md +6 -27
- package/sources/templates/implement-output/manifest.yaml +11 -11
- package/sources/templates/project-context/body.md +13 -0
- package/sources/templates/project-context/manifest.yaml +12 -0
- package/sources/templates/review-output/body.md +6 -40
- package/sources/templates/review-output/manifest.yaml +11 -11
- package/sources/templates/test-output/body.md +4 -28
- package/sources/templates/test-output/manifest.yaml +11 -11
- package/sources/knowledge/core/review-principles.md +0 -51
- package/sources/knowledge/patterns/clean-architecture/manifest.yaml +0 -66
- package/sources/knowledge/patterns/clean-architecture/review-checklist.md +0 -230
- package/sources/knowledge/patterns/ddd/manifest.yaml +0 -83
- package/sources/knowledge/patterns/ddd/review-checklist.md +0 -226
- package/sources/knowledge/patterns/ddd/tactical-patterns.md +0 -12
- package/sources/knowledge/patterns/frontend-react/manifest.yaml +0 -44
- package/sources/knowledge/patterns/frontend-react/review-checklist.md +0 -78
- package/sources/knowledge/patterns/manifest.yaml +0 -113
- package/sources/skills/mvt-add-context/business.md +0 -47
- package/sources/skills/mvt-add-context/manifest.yaml +0 -83
- package/sources/templates/analyze-code-output/body.md +0 -44
- package/sources/templates/analyze-code-output/manifest.yaml +0 -11
- package/sources/templates/cleanup-output/body.md +0 -9
- package/sources/templates/cleanup-output/manifest.yaml +0 -11
- package/sources/templates/config-output/body.md +0 -11
- package/sources/templates/config-output/manifest.yaml +0 -11
- package/sources/templates/context-check-output/body.md +0 -32
- package/sources/templates/context-check-output/manifest.yaml +0 -11
- package/sources/templates/fix-output/body.md +0 -30
- package/sources/templates/fix-output/manifest.yaml +0 -11
- package/sources/templates/init-output/body.md +0 -34
- package/sources/templates/init-output/manifest.yaml +0 -11
- package/sources/templates/refactor-output/body.md +0 -32
- package/sources/templates/refactor-output/manifest.yaml +0 -11
- package/sources/templates/status-output/body.md +0 -36
- package/sources/templates/status-output/manifest.yaml +0 -11
- package/sources/templates/sync-context-output/body.md +0 -16
- package/sources/templates/sync-context-output/manifest.yaml +0 -11
|
@@ -1,111 +1,224 @@
|
|
|
1
|
-
##
|
|
2
|
-
|
|
3
|
-
###
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
1
|
+
## Design Principles
|
|
2
|
+
|
|
3
|
+
### Progressive Disclosure
|
|
4
|
+
Skills use a three-level loading system to manage context efficiently:
|
|
5
|
+
1. **Metadata (name + description)** -- Always in context (~100 words). Determines when Claude triggers the skill.
|
|
6
|
+
2. **SKILL.md body** -- Loaded when skill triggers. Target <5k words. Keep only essential procedural instructions and workflow guidance.
|
|
7
|
+
3. **Bundled resources** -- Loaded on demand by Claude. Unlimited size.
|
|
8
|
+
|
|
9
|
+
**Avoid duplication**: information should live in either SKILL.md, `references/`, or knowledge entries -- not in multiple places.
|
|
10
|
+
|
|
11
|
+
### Writing Style
|
|
12
|
+
Write the entire skill using **imperative/infinitive form** (verb-first instructions), not second person. Use objective, instructional language ("To accomplish X, do Y" rather than "You should do X"). This maintains consistency and clarity for AI consumption.
|
|
13
|
+
|
|
14
|
+
### Description Quality
|
|
15
|
+
The `name` and `description` in YAML frontmatter determine when Claude will use the skill. Guidelines:
|
|
16
|
+
- Be specific about what the skill does and when to use it.
|
|
17
|
+
- Use third-person ("This skill should be used when...").
|
|
18
|
+
- Include: what it does + when to trigger + how it differs from similar skills.
|
|
19
|
+
|
|
20
|
+
| Good | Bad |
|
|
21
|
+
|------|-----|
|
|
22
|
+
| "Create custom MVTT skills through interactive guided workflow. Use when user wants to create a new skill, extend the framework with custom functionality, or build project-specific automation." | "Skill creator" |
|
|
23
|
+
| "Analyze requirements documents and extract domain concepts. Use when user provides requirements text or asks to understand project scope." | "Analyze stuff" |
|
|
24
|
+
|
|
25
|
+
## Execution Flow
|
|
26
|
+
|
|
27
|
+
### Step 1: Load Inputs
|
|
28
|
+
- **Recommended**:
|
|
29
|
+
- One existing skill manifest under `sources/skills/<existing>/manifest.yaml` (or `.ai-agents/skills/<existing>/`) as a structural reference.
|
|
30
|
+
- `sources/sections/` -- the catalog of shared sections this new skill can reuse (role-header, activation-load-context, activation-load-config, output-language-constraint, activation-preflight, session-update, footer-next-steps).
|
|
31
|
+
|
|
32
|
+
### Step 2: Understand Usage with Concrete Examples
|
|
33
|
+
Skip only when usage patterns are already crystal clear.
|
|
34
|
+
|
|
35
|
+
Ask up to 3 of the following (do not ask all at once):
|
|
36
|
+
- "Can you give 1-2 concrete examples of how this skill would be used?"
|
|
37
|
+
- "What would a user say or do that should trigger this skill?"
|
|
38
|
+
- "Are there edge cases or variations in how this skill gets invoked?"
|
|
39
|
+
- "What does success look like? What does the AI produce / write?"
|
|
40
|
+
|
|
41
|
+
Conclude this step with a short paragraph stating the skill's purpose in one sentence and listing 1-3 representative invocations.
|
|
42
|
+
|
|
43
|
+
### Step 3: Gather Requirements
|
|
44
|
+
Collect core metadata. Each field has an explicit constraint -- do not accept vague answers.
|
|
45
|
+
|
|
46
|
+
| Field | Constraint | Notes |
|
|
47
|
+
|-------|------------|-------|
|
|
48
|
+
| Name | Lowercase, kebab-case, no spaces. Prefix `mvt-` for framework skills; project-specific prefixes (e.g., `app-`, `proj-`) are also acceptable | Reject if conflicts with an existing entry in `registry.yaml` |
|
|
49
|
+
| Agent role | One of: `conductor`, `analyst`, `architect`, `developer`, `reviewer`, `tester` | Maps the skill to an existing role family |
|
|
50
|
+
| Purpose | One sentence | Will become the SKILL.md `## Purpose` section |
|
|
51
|
+
| Category | One of: `workflow`, `shortcut`, `project`, `utility` | Drives how `/mvt-help` groups it |
|
|
52
|
+
| Description | Third-person, includes what + when + how it differs | Will become the frontmatter `description` |
|
|
53
|
+
| Dependencies | List of skill names that must run first, OR `none` | Becomes `depends_on` in registry |
|
|
54
|
+
| Variants (optional) | List of flag/sub-mode entries | Becomes the Variants table |
|
|
55
|
+
|
|
56
|
+
If the user is unsure on any field, propose a default and ask for confirmation rather than leaving it blank.
|
|
57
|
+
|
|
58
|
+
### Step 4: Plan Reusable Contents
|
|
59
|
+
- **What**: decide which resources (beyond the SKILL.md body) the new skill needs.
|
|
60
|
+
- **How**: for each example from Step 2, ask: "If we executed this from scratch, what reusable resource would have helped?" Map each answer to one of the categories below.
|
|
61
|
+
|
|
62
|
+
| Resource | Directory | Use when | Example |
|
|
63
|
+
|----------|-----------|----------|---------|
|
|
64
|
+
| Scripts | `scripts/` | Same code rewritten repeatedly OR deterministic reliability needed | `scripts/validate_schema.py` |
|
|
65
|
+
| References | `references/` | Documentation Claude should read while working (schemas, API docs, policies) | `references/api_spec.md` |
|
|
66
|
+
| Assets | `assets/` | Files used in the output, not in context (templates, icons, fonts) | `assets/report_template.md` |
|
|
67
|
+
| Knowledge | (declared in registry) | Loaded via Activation Protocol; share across skills or manage via `/mvt-manage-context` | `knowledge/principle/coding-standards/` |
|
|
68
|
+
| Output template | `_templates/` | Persisted document that needs a stable structure | `_templates/{name}-output.md` |
|
|
69
|
+
|
|
70
|
+
- **Reuse vs new**: before declaring a new shared resource, grep `sources/sections/` and existing knowledge entries -- prefer reusing what is already there.
|
|
71
|
+
- **Output of this step**: a checklist `(name | category | purpose | path)` shown to user.
|
|
72
|
+
|
|
73
|
+
### Step 5: Design the Skill
|
|
74
|
+
- **What**: produce a one-page outline before generating any file.
|
|
75
|
+
- **How**: load an existing skill (e.g., `sources/skills/mvt-analyze/manifest.yaml`) as a structural reference, then fill in:
|
|
76
|
+
|
|
77
|
+
| Aspect | Decision |
|
|
78
|
+
|--------|----------|
|
|
79
|
+
| Input parameters | What does the skill need from the user / workspace? |
|
|
80
|
+
| Execution mode | Interactive / automated / hybrid |
|
|
81
|
+
| Pre-flight checks | List, with severity (BLOCK / WARN); defer to `activation-preflight.md` shared section |
|
|
82
|
+
| Decision rules (in role-header) | 3-7 imperative rules covering the major branches |
|
|
83
|
+
| Boundaries | What is in-scope vs delegated to other skills |
|
|
84
|
+
| Execution Flow steps | Bulleted titles only (full content comes in Step 6) |
|
|
85
|
+
| Output | What gets written to disk (artifact path + template) OR pure conversation output |
|
|
86
|
+
|
|
87
|
+
### Step 6: Generate Skill Files
|
|
88
|
+
1. Create source directory: `sources/skills/{name}/` (or `.claude/skills/{name}/` if working directly in an installed workspace).
|
|
89
|
+
2. Generate `manifest.yaml` using the standard structure (see Generated Manifest Structure below). The manifest MUST reuse shared sections wherever applicable; do not inline content that already exists as a shared section.
|
|
90
|
+
3. Generate `business.md` containing the Execution Flow. Follow the **standard skeleton** used across all MVTT skills:
|
|
91
|
+
- `## Execution Flow`
|
|
92
|
+
- `### Step 1: Load Inputs` -- list required and recommended files, plus fallback rules.
|
|
93
|
+
- Skill-specific main steps (1-5 of them), each with **What / How / Branches** sub-structure when there is real branching.
|
|
94
|
+
- `### Step N: User Confirmation` -- only when destructive or non-obvious; describe trigger conditions.
|
|
95
|
+
- `### Step N+1: Write Artifacts` -- only when the skill persists files; specify path, template, required content.
|
|
96
|
+
- Final session update step (delegated to shared section).
|
|
97
|
+
- `## Edge Cases & Errors` table with at least 3 rows.
|
|
98
|
+
4. If an output template was decided in Step 4, create `_templates/{name}-output.md` with **headings only** (this is a document structure, not a conversation reply template).
|
|
99
|
+
5. If scripts / references / assets are needed, create them in the skill directory.
|
|
100
|
+
6. SKILL.md word budget: aim for the assembled body to be under ~5k words. Push reference material to `references/`.
|
|
101
|
+
|
|
102
|
+
### Step 7: Register in Registry (MANDATORY)
|
|
103
|
+
Append the skill entry to `.ai-agents/registry.yaml` > `skills` section:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
{name}:
|
|
107
|
+
agent: {agent}
|
|
108
|
+
description: "{third-person description with trigger keywords}"
|
|
109
|
+
path: .claude/skills/{name}/SKILL.md
|
|
110
|
+
template: {template_path_or_null}
|
|
111
|
+
category: {category}
|
|
112
|
+
depends_on: {dependencies_or_omitted}
|
|
113
|
+
custom: true
|
|
114
|
+
knowledge:
|
|
115
|
+
{entries_or_empty_list}
|
|
116
|
+
next_suggestions:
|
|
117
|
+
primary: {suggested_next_skill}
|
|
118
|
+
primary_desc: "{when to use the next skill}"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
- The `custom: true` field is **required** for user-created skills; without it, framework updates will overwrite the entry.
|
|
122
|
+
- If the skill has no specific knowledge needs, set `knowledge: []` or omit the key entirely.
|
|
123
|
+
- Validate the YAML still parses after the append; if not, abort and surface the parse error.
|
|
124
|
+
|
|
125
|
+
### Step 8: Validation
|
|
126
|
+
Walk this checklist; any failed item must be fixed before declaring success.
|
|
127
|
+
|
|
128
|
+
| Check | Pass criterion |
|
|
129
|
+
|-------|----------------|
|
|
130
|
+
| Frontmatter present | `name` and `description` exist in the manifest's `frontmatter:` block |
|
|
131
|
+
| Description quality | Third-person, includes what + when, distinguishes from neighbors |
|
|
132
|
+
| Writing style | Imperative/infinitive throughout; no "you" / "your" |
|
|
133
|
+
| Naming uniqueness | No collision with another entry in `registry.yaml` |
|
|
134
|
+
| `custom: true` | Set in registry entry |
|
|
135
|
+
| Knowledge files exist | Every file referenced in `knowledge:` resolves on disk |
|
|
136
|
+
| Template path correct | If `template:` set, file exists at that path; the template is headings-only |
|
|
137
|
+
| Word budget | Assembled SKILL.md body under ~5k words (run a quick `wc` if available) |
|
|
138
|
+
| Standard skeleton | business.md contains Load Inputs, main steps with branches, Edge Cases & Errors |
|
|
139
|
+
| Build green | If running inside the framework repo, `npm run build` succeeds |
|
|
140
|
+
|
|
141
|
+
Show the user how to invoke: `/{name}`.
|
|
142
|
+
|
|
143
|
+
### Step 9: Iteration Guidance
|
|
144
|
+
Tell the user the iteration loop:
|
|
145
|
+
1. Use `/{name}` on real tasks.
|
|
146
|
+
2. Notice struggles or inefficiencies.
|
|
147
|
+
3. Decide whether to update SKILL.md, add a `references/` file, add a knowledge entry, or split into a new skill.
|
|
148
|
+
4. Re-run `/mvt-create-skill` to refine, or edit the source files directly and rebuild.
|
|
149
|
+
|
|
150
|
+
### Step 10: (session update handled by shared section)
|
|
151
|
+
|
|
152
|
+
## Edge Cases & Errors
|
|
153
|
+
|
|
154
|
+
| Case | Handling |
|
|
155
|
+
|------|----------|
|
|
156
|
+
| Skill name collides with an existing registry entry | STOP at Step 3; ask user to rename; do not generate any file |
|
|
157
|
+
| User wants the skill to mutate `session.yaml` fields beyond `skill_history` | Surface that ownership rules forbid this (e.g., `recent_changes` is owned by `/mvt-plan-dev`/`/mvt-update-plan`); recommend redesign |
|
|
158
|
+
| Output template is requested but the skill is conversation-only (no persisted file) | Refuse to create a template; explain that templates are for document structure, not conversation replies |
|
|
159
|
+
| User asks to skip the registry registration step | Refuse; an unregistered skill is invisible to `/mvt-help`, `/mvt-status`, and the assembler. Registration is non-negotiable |
|
|
160
|
+
| 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 |
|
|
161
|
+
| User provides a non-third-person description ("Use this skill when you need...") | Rewrite to third-person before saving; show the rewrite for confirmation |
|
|
162
|
+
| Generated manifest references a shared section that does not exist | Abort with the missing section path; do NOT invent a new section silently -- recommend creating it via a separate change |
|
|
163
|
+
| `registry.yaml` parse fails after append | Restore from a pre-append backup; surface the error; do not leave the registry corrupt |
|
|
164
|
+
|
|
165
|
+
## Generated Manifest Structure
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
name: {name}
|
|
169
|
+
output: .claude/skills/{name}/SKILL.md
|
|
170
|
+
|
|
171
|
+
frontmatter:
|
|
172
|
+
name: {name}
|
|
173
|
+
description: "{third-person description with trigger keywords}"
|
|
174
|
+
|
|
175
|
+
sections:
|
|
176
|
+
- type: inline
|
|
177
|
+
content: |
|
|
178
|
+
# {Title}
|
|
179
|
+
|
|
180
|
+
## Purpose
|
|
181
|
+
|
|
182
|
+
{concise purpose statement}
|
|
183
|
+
|
|
184
|
+
- type: shared
|
|
185
|
+
source: sections/role-header.md
|
|
186
|
+
params:
|
|
187
|
+
role: {Agent Role}
|
|
188
|
+
role_desc: "{role description}"
|
|
189
|
+
decision_rules:
|
|
190
|
+
{generated rules}
|
|
191
|
+
boundaries:
|
|
192
|
+
{generated boundaries}
|
|
193
|
+
|
|
194
|
+
- type: shared
|
|
195
|
+
source: sections/activation-load-context.md
|
|
196
|
+
params:
|
|
197
|
+
extended_context:
|
|
198
|
+
{if needed, list additional context sources}
|
|
199
|
+
|
|
200
|
+
- type: shared
|
|
201
|
+
source: sections/activation-load-config.md
|
|
202
|
+
|
|
203
|
+
- type: shared
|
|
204
|
+
source: sections/output-language-constraint.md
|
|
205
|
+
|
|
206
|
+
- type: shared
|
|
207
|
+
source: sections/activation-preflight.md
|
|
208
|
+
params:
|
|
209
|
+
checks:
|
|
210
|
+
{if needed, list preflight checks}
|
|
211
|
+
|
|
212
|
+
- type: file
|
|
213
|
+
source: ./business.md
|
|
214
|
+
|
|
215
|
+
- type: shared
|
|
216
|
+
source: sections/session-update.md
|
|
217
|
+
|
|
218
|
+
- type: shared
|
|
219
|
+
source: sections/footer-next-steps.md
|
|
220
|
+
params:
|
|
221
|
+
current_skill: {name}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Note: State Update and Suggested Next Steps are handled by shared sections (`sections/session-update.md` and `sections/footer-next-steps.md`) and must be referenced from the manifest, not duplicated as inline content.
|
|
@@ -3,16 +3,16 @@ output: .claude/skills/mvt-create-skill/SKILL.md
|
|
|
3
3
|
|
|
4
4
|
frontmatter:
|
|
5
5
|
name: mvt-create-skill
|
|
6
|
-
description: "Create custom MVTT skills through interactive guided workflow.
|
|
6
|
+
description: "Create custom MVTT skills through interactive guided workflow. This skill should be used when user wants to create a new skill, extend the framework with custom functionality, or build project-specific automation."
|
|
7
7
|
|
|
8
8
|
sections:
|
|
9
9
|
- type: inline
|
|
10
10
|
content: |
|
|
11
|
-
# MVT
|
|
11
|
+
# MVT Create Skill
|
|
12
12
|
|
|
13
13
|
## Purpose
|
|
14
14
|
|
|
15
|
-
Guide users through designing and creating custom MVTT-compliant skills. Generates properly structured SKILL.md files with optional
|
|
15
|
+
Guide users through designing and creating custom MVTT-compliant skills. Follows a structured process: understand use cases, plan reusable resources, design the skill, generate files, and validate. Generates properly structured SKILL.md files with optional bundled resources (scripts, references, assets), manifest.yaml, and registry entries -- ensuring compatibility with the MVTT framework.
|
|
16
16
|
|
|
17
17
|
- type: shared
|
|
18
18
|
source: sections/role-header.md
|
|
@@ -24,6 +24,8 @@ sections:
|
|
|
24
24
|
- rule: "Name conflicts with existing skill -> Warn and ask for alternative"
|
|
25
25
|
- rule: "Skill needs output template -> Create template in `_templates/` and update manifest"
|
|
26
26
|
- rule: "Skill needs state updates -> Include session.yaml update rules"
|
|
27
|
+
- rule: "Skill needs bundled resources -> Plan scripts/references/assets in Step 3"
|
|
28
|
+
- rule: "Usage patterns unclear -> Ask for concrete examples before proceeding"
|
|
27
29
|
boundaries:
|
|
28
30
|
- scope: "Generated skills must follow MVTT SKILL.md standard structure"
|
|
29
31
|
skill: "(constraint)"
|
|
@@ -31,27 +33,28 @@ sections:
|
|
|
31
33
|
skill: "(constraint)"
|
|
32
34
|
- scope: "All custom skills MUST be registered in `registry.yaml` with `custom: true`"
|
|
33
35
|
skill: "(to prevent overwrite during framework updates)"
|
|
34
|
-
- scope: "Description field must
|
|
36
|
+
- scope: "Description field must use third-person with effective trigger keywords"
|
|
35
37
|
skill: "(constraint)"
|
|
38
|
+
- scope: "SKILL.md body target <5k words; move detailed content to references/"
|
|
39
|
+
skill: "(progressive disclosure)"
|
|
36
40
|
|
|
37
41
|
- type: shared
|
|
38
42
|
source: sections/activation-load-context.md
|
|
39
43
|
params:
|
|
40
44
|
extended_context:
|
|
41
45
|
- "Load one existing SKILL.md as structural reference (e.g., `.claude/skills/mvt-status/SKILL.md`)"
|
|
42
|
-
- ".ai-agents/registry.yaml -- Registered skills list"
|
|
43
46
|
|
|
44
47
|
- type: shared
|
|
45
48
|
source: sections/activation-load-config.md
|
|
46
49
|
|
|
50
|
+
- type: shared
|
|
51
|
+
source: sections/output-language-constraint.md
|
|
52
|
+
|
|
47
53
|
- type: inline
|
|
48
54
|
content: |
|
|
49
55
|
### Step 3: Pre-flight Checks
|
|
50
56
|
- No blocking checks required.
|
|
51
57
|
|
|
52
|
-
### Step 4: Execute
|
|
53
|
-
Proceed to Execution Flow below.
|
|
54
|
-
|
|
55
58
|
- type: file
|
|
56
59
|
source: ./business.md
|
|
57
60
|
|
|
@@ -59,21 +62,34 @@ sections:
|
|
|
59
62
|
content: |
|
|
60
63
|
## Output Format
|
|
61
64
|
|
|
62
|
-
No external template -- output is the generated skill
|
|
65
|
+
No external template -- output is the generated skill files plus a creation summary:
|
|
63
66
|
|
|
64
67
|
```markdown
|
|
65
68
|
## Custom Skill Created
|
|
66
69
|
|
|
67
70
|
- **Skill**: `/{name}`
|
|
71
|
+
- **Agent**: {agent role}
|
|
68
72
|
- **Location**: `.claude/skills/{name}/SKILL.md`
|
|
73
|
+
- **Manifest**: Generated with shared sections
|
|
69
74
|
- **Registry**: `registry.yaml` (custom: true)
|
|
70
75
|
- **Template**: {created/none}
|
|
71
|
-
- **
|
|
76
|
+
- **Resources**: {scripts/references/assets listing, or none}
|
|
77
|
+
- **Knowledge**: {per-skill entries / shared only}
|
|
78
|
+
- **Context Budget**: SKILL.md body ~{N} words
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
Use `/{name}` to invoke the new skill.
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
### Iteration
|
|
83
|
+
1. Use `/{name}` on real tasks
|
|
84
|
+
2. Notice struggles or inefficiencies
|
|
85
|
+
3. Update SKILL.md or bundled resources as needed
|
|
86
|
+
4. Use `/mvt-create-skill` to refine, or edit skill files directly
|
|
79
87
|
```
|
|
88
|
+
|
|
89
|
+
- type: shared
|
|
90
|
+
source: sections/session-update.md
|
|
91
|
+
|
|
92
|
+
- type: shared
|
|
93
|
+
source: sections/footer-next-steps.md
|
|
94
|
+
params:
|
|
95
|
+
current_skill: mvt-create-skill
|
|
@@ -1,34 +1,116 @@
|
|
|
1
|
-
## Execution Flow
|
|
2
|
-
|
|
3
|
-
### Step 1:
|
|
4
|
-
-
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
### Step
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
## Execution Flow
|
|
2
|
+
|
|
3
|
+
### Step 1: Load Inputs
|
|
4
|
+
- **Required**:
|
|
5
|
+
- Existing design artifacts of related prior changes (`artifacts/*/design.md`) -- to stay consistent.
|
|
6
|
+
- **Fallback**:
|
|
7
|
+
- If `analysis.md` is missing, surface a WARN and accept the user's free-text intent as the requirement input.
|
|
8
|
+
- If `project-context.md` is missing, proceed but mark the design as "context-light" and skip the layer-compliance check in Step 4.
|
|
9
|
+
|
|
10
|
+
### Step 2: Frame the Problem
|
|
11
|
+
- **What**: produce a one-paragraph problem statement plus a list of explicit architectural concerns (3-7 items).
|
|
12
|
+
- **How**:
|
|
13
|
+
1. From `analysis.md`, lift the goal, actors, and primary use cases.
|
|
14
|
+
2. Derive concerns by scanning the requirements for: scalability, latency, consistency, security/auth, persistence, observability, deployment, integration with existing modules.
|
|
15
|
+
3. Drop any concern that is not actually exercised by the requirements -- do not invent NFRs.
|
|
16
|
+
- **Output of this step**: a Concerns Table with columns `concern | source-of-evidence | priority(must/should/nice)`.
|
|
17
|
+
|
|
18
|
+
### Step 3: Choose Architecture Style
|
|
19
|
+
- **What**: select the smallest viable architecture style for this change. Escalate only when concerns force it.
|
|
20
|
+
- **How**: pick the row that matches the dominant concerns; multiple changes within the same project should normally pick the same style unless requirements force otherwise.
|
|
21
|
+
|
|
22
|
+
| Style | Use when | Avoid when |
|
|
23
|
+
|-------|----------|------------|
|
|
24
|
+
| Plain CRUD / 3-layer | Single resource flow, no domain rules beyond validation | Complex business invariants, multi-step workflows |
|
|
25
|
+
| Service-oriented within a module | Multiple use cases sharing entities, transactions across them | Cross-team boundaries, independent deployment needs |
|
|
26
|
+
| Domain-driven (aggregates, domain services) | Rich business rules, invariants, multiple actors per workflow | Simple read-mostly resources |
|
|
27
|
+
| Event-driven / async | Long-running flows, decoupled side-effects, retry/back-pressure | Strong synchronous contracts, immediate-consistency reads |
|
|
28
|
+
| Multi-service / boundary split | Independent scaling or deployment, separate teams | Single team, single deployment pipeline -- DEFER |
|
|
29
|
+
|
|
30
|
+
- If the requirements suggest "multi-service" but project is currently single-service: STOP and ask user to confirm scope expansion before designing across services.
|
|
31
|
+
|
|
32
|
+
### Step 4: Design Module Structure
|
|
33
|
+
- **What**: list modules (new and modified), their responsibilities, owned entities, and interfaces.
|
|
34
|
+
- **How**:
|
|
35
|
+
1. Map each Concern (Step 2) to one owning module.
|
|
36
|
+
2. For every module, write: name, responsibility (one sentence), owned entities, public interface (function/class signatures or HTTP endpoints), dependencies on other modules.
|
|
37
|
+
3. Validate dependency direction against `project-context.md` layer rules (e.g., domain -> infra forbidden). If violation found, redesign or flag it as an explicit ADR (Step 6).
|
|
38
|
+
4. Use the existing module names from `project-context.md` whenever possible -- introduce a new module only when no existing one fits.
|
|
39
|
+
- **Branches**:
|
|
40
|
+
|
|
41
|
+
| Condition | Action |
|
|
42
|
+
|-----------|--------|
|
|
43
|
+
| Layer-compliance check passes | Proceed |
|
|
44
|
+
| Single layer violation, fix is local | Adjust module placement, document in change tracking |
|
|
45
|
+
| Systemic violation (style mismatch with existing project) | STOP, raise ADR (Step 6) and ask user to confirm direction before continuing |
|
|
46
|
+
|
|
47
|
+
### Step 5: Define Data Flow
|
|
48
|
+
- **What**: for each primary use case, produce a sequence of module interactions.
|
|
49
|
+
- **How**:
|
|
50
|
+
1. For each use case (from Step 2 / analysis.md), list the trigger, the modules involved, the call order, and the persistence/event boundaries.
|
|
51
|
+
2. Render as a Mermaid `sequenceDiagram` if there are >= 3 participants OR there are async/event hops; otherwise a numbered list is fine.
|
|
52
|
+
3. Mark transactional boundaries explicitly (`-- transaction begin/end`).
|
|
53
|
+
4. Identify error paths for each flow: what happens if step N fails? Document fallback behavior (retry, compensating action, user-visible error).
|
|
54
|
+
|
|
55
|
+
### Step 6: Document Decisions (ADRs)
|
|
56
|
+
- **What**: capture every non-obvious choice as an Architecture Decision Record.
|
|
57
|
+
- **How**: write one ADR per decision with these fields:
|
|
58
|
+
|
|
59
|
+
| Field | Required content |
|
|
60
|
+
|-------|------------------|
|
|
61
|
+
| Title | Short imperative ("Use event sourcing for orders") |
|
|
62
|
+
| Status | proposed / accepted / superseded |
|
|
63
|
+
| Context | What concerns + constraints forced this decision (cite Step 2/3) |
|
|
64
|
+
| Decision | The chosen option, stated unambiguously |
|
|
65
|
+
| Alternatives | At least 1 rejected option, with the rejection reason |
|
|
66
|
+
| Consequences | Positive and negative impacts; which downstream skills/modules pay the cost |
|
|
67
|
+
|
|
68
|
+
- Decisions that MUST be ADRs (do not skip):
|
|
69
|
+
- Choice of architecture style (Step 3) when more than one row was viable.
|
|
70
|
+
- Any layer-rule violation accepted as a deliberate exception.
|
|
71
|
+
- Introduction of a new external dependency (DB, queue, library category).
|
|
72
|
+
- Breaking change to an existing public interface.
|
|
73
|
+
|
|
74
|
+
### Step 7: User Confirmation Before Write
|
|
75
|
+
- **When to confirm before writing the artifact**:
|
|
76
|
+
- Step 3 escalated to multi-service.
|
|
77
|
+
- Step 4 raised a systemic layer violation.
|
|
78
|
+
- Step 6 contains any ADR with `status: proposed` for a breaking change.
|
|
79
|
+
- The design adds a new external dependency.
|
|
80
|
+
- **When to write silently**:
|
|
81
|
+
- Single-module addition that fits existing layers, no ADR escalations, no breaking change.
|
|
82
|
+
- **Confirmation format**: present a one-screen summary -- style chosen, modules added/changed, ADRs requiring review, a single yes/no prompt. Do not dump the full artifact.
|
|
83
|
+
|
|
84
|
+
### Step 8: Write Artifact
|
|
85
|
+
- **Path**: `.ai-agents/workspace/artifacts/{active_change.id}/design.md`.
|
|
86
|
+
- **Template**: `.ai-agents/skills/_templates/design-output.md`; if `_templates/custom/design-output.md` exists, use the custom version.
|
|
87
|
+
- **Required sections** (filled per template headings, but content must include):
|
|
88
|
+
- `Overview` -- the problem statement (Step 2).
|
|
89
|
+
- `Architecture Decision Records` -- every ADR from Step 6.
|
|
90
|
+
- `Module Design` -- table of modules from Step 4.
|
|
91
|
+
- `Key Interfaces` -- explicit signatures/endpoints.
|
|
92
|
+
- `Data Flow` -- sequences from Step 5, including error paths.
|
|
93
|
+
- `File Structure` -- mapping of modules to file/directory paths in this repo.
|
|
94
|
+
- `Implementation Guidelines` -- ordering hints for `/mvt-implement` and `/mvt-plan-dev`.
|
|
95
|
+
- `Change Tracking` -- list of files expected to be created/modified/deleted.
|
|
96
|
+
- Do NOT modify `project-context.yaml` or `project-context.md` here.
|
|
97
|
+
|
|
98
|
+
### Step 9: Suggest Plan Decomposition
|
|
99
|
+
- 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.
|
|
100
|
+
- Otherwise recommend `/mvt-implement` directly.
|
|
101
|
+
|
|
102
|
+
### Step 10: (session update handled by shared section)
|
|
103
|
+
|
|
104
|
+
## Variants
|
|
105
|
+
- `/mvt-design --plan` flag: skip Step 5 (data flow detail) and Step 6 (full ADR fields). In `--plan` mode, ADRs collapse to a one-line `decision: <text>`. Step 8 still writes `design.md` but with the abbreviated content. The output is a high-level plan, not an implementation-ready blueprint -- mark the artifact with a top-line `Mode: plan` indicator.
|
|
106
|
+
|
|
107
|
+
## Edge Cases & Errors
|
|
108
|
+
|
|
109
|
+
| Case | Handling |
|
|
110
|
+
|------|----------|
|
|
111
|
+
| `analysis.md` missing entirely | Proceed with user's free-text intent; mark artifact with "Source: conversation only"; recommend `/mvt-analyze` as a follow-up |
|
|
112
|
+
| Requirements are mutually contradictory | STOP at Step 2; surface contradictions; do not invent a resolution |
|
|
113
|
+
| User wants to skip ADRs ("just write the design") | Refuse silently-skipping; produce minimal one-line ADRs (Step 6 abbreviated form) but never zero |
|
|
114
|
+
| Design directly contradicts an existing accepted ADR | Treat as superseding; new ADR must reference and `supersedes:` the old one |
|
|
115
|
+
| `--plan` mode but request is actually small (1 file) | Downgrade to a 5-line summary in chat, do NOT write `design.md` |
|
|
116
|
+
| User aborts at Step 7 confirmation | Do not write artifact; keep a conversation-only summary |
|