@uoyo/mvtt 2.0.0-beta.0 → 2.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +194 -209
  3. package/dist/build/assembler.d.ts.map +1 -1
  4. package/dist/build/assembler.js +2 -0
  5. package/dist/build/assembler.js.map +1 -1
  6. package/dist/build/plan-validator.d.ts +26 -0
  7. package/dist/build/plan-validator.d.ts.map +1 -0
  8. package/dist/build/plan-validator.js +225 -0
  9. package/dist/build/plan-validator.js.map +1 -0
  10. package/dist/build/section-loader.d.ts.map +1 -1
  11. package/dist/build/section-loader.js +45 -9
  12. package/dist/build/section-loader.js.map +1 -1
  13. package/dist/cli.d.ts.map +1 -1
  14. package/dist/cli.js +2 -11
  15. package/dist/cli.js.map +1 -1
  16. package/dist/commands/doctor.d.ts.map +1 -1
  17. package/dist/commands/doctor.js +0 -1
  18. package/dist/commands/doctor.js.map +1 -1
  19. package/dist/commands/install.d.ts +1 -4
  20. package/dist/commands/install.d.ts.map +1 -1
  21. package/dist/commands/install.js +18 -14
  22. package/dist/commands/install.js.map +1 -1
  23. package/dist/commands/migrate.d.ts +16 -0
  24. package/dist/commands/migrate.d.ts.map +1 -0
  25. package/dist/commands/migrate.js +118 -0
  26. package/dist/commands/migrate.js.map +1 -0
  27. package/dist/commands/update.d.ts.map +1 -1
  28. package/dist/commands/update.js +35 -2
  29. package/dist/commands/update.js.map +1 -1
  30. package/dist/fs/core-manifest.d.ts +17 -0
  31. package/dist/fs/core-manifest.d.ts.map +1 -0
  32. package/dist/fs/core-manifest.js +76 -0
  33. package/dist/fs/core-manifest.js.map +1 -0
  34. package/dist/fs/install-manifest.d.ts +1 -2
  35. package/dist/fs/install-manifest.d.ts.map +1 -1
  36. package/dist/fs/install-manifest.js +1 -2
  37. package/dist/fs/install-manifest.js.map +1 -1
  38. package/dist/fs/materialize.d.ts.map +1 -1
  39. package/dist/fs/materialize.js +23 -3
  40. package/dist/fs/materialize.js.map +1 -1
  41. package/dist/types/core-manifest.d.ts +12 -0
  42. package/dist/types/core-manifest.d.ts.map +1 -0
  43. package/dist/types/core-manifest.js +2 -0
  44. package/dist/types/core-manifest.js.map +1 -0
  45. package/dist/types/registry.d.ts +13 -5
  46. package/dist/types/registry.d.ts.map +1 -1
  47. package/install-manifest.yaml +31 -27
  48. package/package.json +57 -57
  49. package/registry.yaml +198 -209
  50. package/sources/defaults/config.yaml +27 -30
  51. package/sources/defaults/project-context.yaml +15 -26
  52. package/sources/defaults/session.yaml +31 -23
  53. package/sources/knowledge/core/manifest.yaml +4 -45
  54. package/sources/sections/activation-load-config.md +11 -5
  55. package/sources/sections/activation-load-context.md +26 -11
  56. package/sources/sections/activation-preflight.md +14 -4
  57. package/sources/sections/footer-next-steps.md +35 -9
  58. package/sources/sections/output-language-constraint.md +11 -0
  59. package/sources/sections/role-header.md +13 -13
  60. package/sources/sections/session-update.md +47 -0
  61. package/sources/skills/mvt-analyze/business.md +69 -33
  62. package/sources/skills/mvt-analyze/manifest.yaml +90 -89
  63. package/sources/skills/mvt-analyze-code/business.md +82 -35
  64. package/sources/skills/mvt-analyze-code/manifest.yaml +96 -88
  65. package/sources/skills/mvt-bug-detect/business.md +101 -0
  66. package/sources/skills/mvt-bug-detect/manifest.yaml +84 -0
  67. package/sources/skills/mvt-check-context/business.md +89 -42
  68. package/sources/skills/mvt-check-context/manifest.yaml +63 -74
  69. package/sources/skills/mvt-cleanup/business.md +80 -31
  70. package/sources/skills/mvt-cleanup/manifest.yaml +85 -93
  71. package/sources/skills/mvt-config/business.md +94 -26
  72. package/sources/skills/mvt-config/manifest.yaml +96 -108
  73. package/sources/skills/mvt-create-skill/business.md +231 -111
  74. package/sources/skills/mvt-create-skill/manifest.yaml +91 -79
  75. package/sources/skills/mvt-design/business.md +116 -34
  76. package/sources/skills/mvt-design/manifest.yaml +96 -105
  77. package/sources/skills/mvt-fix/business.md +132 -28
  78. package/sources/skills/mvt-fix/manifest.yaml +85 -86
  79. package/sources/skills/mvt-help/business.md +74 -70
  80. package/sources/skills/mvt-help/manifest.yaml +67 -61
  81. package/sources/skills/mvt-implement/business.md +91 -32
  82. package/sources/skills/mvt-implement/manifest.yaml +80 -96
  83. package/sources/skills/mvt-init/business.md +164 -49
  84. package/sources/skills/mvt-init/manifest.yaml +101 -93
  85. package/sources/skills/mvt-manage-context/business.md +175 -0
  86. package/sources/skills/mvt-manage-context/manifest.yaml +123 -0
  87. package/sources/skills/mvt-plan-dev/business.md +75 -0
  88. package/sources/skills/mvt-plan-dev/manifest.yaml +91 -0
  89. package/sources/skills/mvt-quick-dev/business.md +99 -0
  90. package/sources/skills/mvt-quick-dev/manifest.yaml +69 -0
  91. package/sources/skills/mvt-refactor/business.md +104 -33
  92. package/sources/skills/mvt-refactor/manifest.yaml +86 -101
  93. package/sources/skills/mvt-resume/business.md +137 -0
  94. package/sources/skills/mvt-resume/manifest.yaml +71 -0
  95. package/sources/skills/mvt-review/business.md +112 -49
  96. package/sources/skills/mvt-review/manifest.yaml +87 -106
  97. package/sources/skills/mvt-status/business.md +71 -24
  98. package/sources/skills/mvt-status/manifest.yaml +66 -74
  99. package/sources/skills/mvt-sync-context/business.md +150 -25
  100. package/sources/skills/mvt-sync-context/manifest.yaml +96 -84
  101. package/sources/skills/mvt-template/business.md +96 -49
  102. package/sources/skills/mvt-template/manifest.yaml +63 -71
  103. package/sources/skills/mvt-test/business.md +104 -36
  104. package/sources/skills/mvt-test/manifest.yaml +102 -111
  105. package/sources/skills/mvt-update-plan/business.md +72 -0
  106. package/sources/skills/mvt-update-plan/manifest.yaml +132 -0
  107. package/sources/templates/analyze-output/body.md +15 -38
  108. package/sources/templates/analyze-output/manifest.yaml +11 -11
  109. package/sources/templates/design-output/body.md +17 -50
  110. package/sources/templates/design-output/manifest.yaml +11 -11
  111. package/sources/templates/implement-output/body.md +11 -32
  112. package/sources/templates/implement-output/manifest.yaml +11 -11
  113. package/sources/templates/project-context/body.md +13 -0
  114. package/sources/templates/project-context/manifest.yaml +12 -0
  115. package/sources/templates/review-output/body.md +11 -45
  116. package/sources/templates/review-output/manifest.yaml +11 -11
  117. package/sources/templates/test-output/body.md +7 -31
  118. package/sources/templates/test-output/manifest.yaml +11 -11
  119. package/dist/fs/protection.d.ts +0 -15
  120. package/dist/fs/protection.d.ts.map +0 -1
  121. package/dist/fs/protection.js +0 -16
  122. package/dist/fs/protection.js.map +0 -1
  123. package/sources/knowledge/core/review-principles.md +0 -51
  124. package/sources/knowledge/patterns/clean-architecture/manifest.yaml +0 -66
  125. package/sources/knowledge/patterns/clean-architecture/review-checklist.md +0 -230
  126. package/sources/knowledge/patterns/ddd/manifest.yaml +0 -83
  127. package/sources/knowledge/patterns/ddd/review-checklist.md +0 -226
  128. package/sources/knowledge/patterns/ddd/tactical-patterns.md +0 -12
  129. package/sources/knowledge/patterns/frontend-react/manifest.yaml +0 -44
  130. package/sources/knowledge/patterns/frontend-react/review-checklist.md +0 -78
  131. package/sources/knowledge/patterns/manifest.yaml +0 -113
  132. package/sources/skills/mvt-add-context/business.md +0 -47
  133. package/sources/skills/mvt-add-context/manifest.yaml +0 -83
  134. package/sources/templates/analyze-code-output/body.md +0 -44
  135. package/sources/templates/analyze-code-output/manifest.yaml +0 -11
  136. package/sources/templates/cleanup-output/body.md +0 -9
  137. package/sources/templates/cleanup-output/manifest.yaml +0 -11
  138. package/sources/templates/config-output/body.md +0 -11
  139. package/sources/templates/config-output/manifest.yaml +0 -11
  140. package/sources/templates/context-check-output/body.md +0 -32
  141. package/sources/templates/context-check-output/manifest.yaml +0 -11
  142. package/sources/templates/fix-output/body.md +0 -30
  143. package/sources/templates/fix-output/manifest.yaml +0 -11
  144. package/sources/templates/init-output/body.md +0 -34
  145. package/sources/templates/init-output/manifest.yaml +0 -11
  146. package/sources/templates/refactor-output/body.md +0 -32
  147. package/sources/templates/refactor-output/manifest.yaml +0 -11
  148. package/sources/templates/status-output/body.md +0 -36
  149. package/sources/templates/status-output/manifest.yaml +0 -11
  150. package/sources/templates/sync-context-output/body.md +0 -16
  151. package/sources/templates/sync-context-output/manifest.yaml +0 -11
@@ -1,108 +1,96 @@
1
- name: mvt-config
2
- output: .claude/skills/mvt-config/SKILL.md
3
-
4
- frontmatter:
5
- name: mvt-config
6
- description: "Interactive configuration management for framework settings. Use when user wants to change language, output format, architecture pattern, or other framework settings."
7
-
8
- sections:
9
- - type: inline
10
- content: |
11
- # MVT Config
12
-
13
- ## Purpose
14
-
15
- Interactive configuration management for MVTT framework settings. Provides guided setup, direct key-value setting, and a setup wizard for common configurations.
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: "No arguments -> Show interactive configuration menu"
24
- - rule: "`show` argument -> Display all current settings"
25
- - rule: "`set {key} {value}` -> Validate and apply the specific setting"
26
- - rule: "`wizard` argument -> Start guided setup flow"
27
- - rule: "`reset` argument -> Reset all settings to defaults after confirmation"
28
- - rule: "Invalid key -> Show available keys and exit"
29
- - rule: "Invalid value type -> Show expected type and exit"
30
- boundaries:
31
- - scope: "analyze requirements"
32
- skill: "/mvt-analyze"
33
- - scope: "design architecture"
34
- skill: "/mvt-design"
35
- - scope: "write implementation code"
36
- skill: "/mvt-implement"
37
-
38
- - type: inline
39
- content: |
40
- ## Variants
41
-
42
- | Variant | Description |
43
- |---------|-------------|
44
- | `/mvt-config` | Show interactive configuration menu |
45
- | `/mvt-config show` | Display all current settings |
46
- | `/mvt-config set {key} {value}` | Set a specific configuration value |
47
- | `/mvt-config wizard` | Start guided setup wizard |
48
- | `/mvt-config reset` | Reset all settings to defaults |
49
-
50
- - type: shared
51
- source: sections/activation-load-context.md
52
- params:
53
- extended_context:
54
- - ".ai-agents/config.yaml -- Current configuration (this skill's primary target)"
55
-
56
- - type: shared
57
- source: sections/activation-load-config.md
58
-
59
- - type: inline
60
- content: |
61
- ### Step 3: Pre-flight Checks
62
- - No blocking checks required (config is always accessible)
63
-
64
- ### Step 4: Execute
65
- Proceed to Execution Flow below.
66
-
67
- ## Configuration Keys
68
-
69
- ### User Preferences
70
-
71
- | Key | Type | Default | Description |
72
- |-----|------|---------|-------------|
73
- | `preferences.language` | enum | `en-US` | Output language for all responses and documents (en-US, zh-CN) |
74
- | `preferences.output.no_emojis` | bool | `true` | Disable emojis in output |
75
- | `preferences.output.data_format` | enum | `yaml` | Data output format (yaml, json) |
76
-
77
- ### Pattern Settings
78
-
79
- | Key | Type | Default | Description |
80
- |-----|------|---------|-------------|
81
- | `pattern.active` | enum | `` | Active architecture pattern |
82
- | `pattern.selection.auto_detect` | bool | `true` | Auto-detect pattern on init |
83
- | `pattern.selection.confirm_with_user` | bool | `true` | Confirm pattern with user |
84
-
85
- - type: file
86
- source: ./business.md
87
-
88
- - type: inline
89
- content: |
90
- ## Output Format
91
-
92
- Read and use the output template from: `.ai-agents/skills/_templates/config-output.md`
93
-
94
- If a custom version exists at `.ai-agents/skills/_templates/custom/config-output.md`, use the custom version instead.
95
-
96
- Every response MUST end with a Suggested Next Steps section.
97
-
98
- - type: shared
99
- source: sections/footer-next-steps.md
100
- params:
101
- next_primary: mvt-config
102
- next_primary_desc: "`show` -- Verify changes"
103
- next_alternatives:
104
- - skill: mvt-init
105
- when: "--refresh -- Re-analyze with new pattern"
106
- always_show:
107
- - skill: mvt-status
108
- desc: "Check current project state"
1
+ name: mvt-config
2
+ output: .claude/skills/mvt-config/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-config
6
+ description: "Manage MVTT framework configuration interactively. This skill should be used when user wants to change language, output format, or other framework settings."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Config
12
+
13
+ ## Purpose
14
+
15
+ Manage MVTT framework configuration interactively. Provide guided setup, direct key-value setting, and a setup wizard for common configurations.
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: "No arguments -> Show interactive configuration menu"
24
+ - rule: "`show` argument -> Display all current settings"
25
+ - rule: "`set {key} {value}` -> Validate and apply the specific setting"
26
+ - rule: "`wizard` argument -> Start guided setup flow"
27
+ - rule: "`reset` argument -> Reset all settings to defaults after confirmation"
28
+ - rule: "Invalid key -> Show available keys and exit"
29
+ - rule: "Invalid value type -> Show expected type and exit"
30
+ boundaries:
31
+ - scope: "analyze requirements"
32
+ skill: "/mvt-analyze"
33
+ - scope: "design architecture"
34
+ skill: "/mvt-design"
35
+ - scope: "write implementation code"
36
+ skill: "/mvt-implement"
37
+
38
+ - type: inline
39
+ content: |
40
+ ## Variants
41
+
42
+ | Variant | Description |
43
+ |---------|-------------|
44
+ | `/mvt-config` | Show interactive configuration menu |
45
+ | `/mvt-config show` | Display all current settings |
46
+ | `/mvt-config set {key} {value}` | Set a specific configuration value |
47
+ | `/mvt-config wizard` | Start guided setup wizard |
48
+ | `/mvt-config reset` | Reset all settings to defaults |
49
+
50
+ - type: shared
51
+ source: sections/activation-load-context.md
52
+ params:
53
+ extended_context:
54
+ - ".ai-agents/config.yaml -- Current configuration (this skill's primary target)"
55
+
56
+ - type: shared
57
+ source: sections/activation-load-config.md
58
+
59
+ - type: shared
60
+ source: sections/output-language-constraint.md
61
+
62
+ - type: inline
63
+ content: |
64
+ ### Step 3: Pre-flight Checks
65
+ - No blocking checks required (config is always accessible)
66
+
67
+ ## Configuration Keys
68
+
69
+ ### User Preferences
70
+
71
+ | Key | Type | Default | Description |
72
+ |-----|------|---------|-------------|
73
+ | `preferences.interaction_language` | enum | `en-US` | Language for interactive output: chat replies, prompts, tables (en-US, zh-CN) |
74
+ | `preferences.document_output_language` | enum | `en-US` | Language for persisted documents: artifacts, project-context.md (falls back to interaction_language) |
75
+ | `preferences.output.no_emojis` | bool | `true` | Disable emojis in output |
76
+ | `preferences.output.data_format` | enum | `yaml` | Data output format (yaml, json) |
77
+ | `preferences.context_routing.relevance_threshold` | int | `70` | AI routing threshold for `/mvt-manage-context add` (0-100) |
78
+
79
+ ### Knowledge Settings
80
+
81
+ | Key | Type | Default | Description |
82
+ |-----|------|---------|-------------|
83
+ | `knowledge.shared` | list | `[core, project-context]` | Shared knowledge entries in registry.yaml, loaded by all skills |
84
+
85
+ - type: file
86
+ source: ./business.md
87
+
88
+ - type: shared
89
+ source: sections/session-update.md
90
+ params:
91
+ read_only: true
92
+
93
+ - type: shared
94
+ source: sections/footer-next-steps.md
95
+ params:
96
+ current_skill: mvt-config
@@ -1,111 +1,231 @@
1
- ## Execution Flow
2
-
3
- ### Step 1: Requirements Gathering
4
- Ask the user for:
5
- - **Skill name**: Suggest `mvt-` prefix for consistency, but also accept project-specific prefixes (e.g., `app-`, `proj-`)
6
- - **Purpose**: What does this skill do?
7
- - **Category**: workflow / utility / project-specific
8
- - **Trigger keywords**: What phrases should invoke this skill? (used for `description` field)
9
-
10
- ### Step 2: Skill Design
11
- - Load an existing skill file as structural reference
12
- - Load config.yaml for project configuration context
13
- - Determine required input parameters
14
- - Determine execution mode: interactive / automated / hybrid
15
- - Determine output format needs
16
-
17
- ### Step 3: Template Decision
18
- - Does the skill need an output template?
19
- - Yes -> Choose: adapt existing template or create new one
20
- - No -> Skip template creation
21
- - Does the skill need context loading beyond session + project-context?
22
- - Yes -> Define the file list
23
- - No -> Use only basic loading
24
-
25
- ### Step 4: Generate Skill Files
26
- 1. Create `.claude/skills/{name}/SKILL.md` with standard structure:
27
- - YAML frontmatter (`name`, `description`)
28
- - Purpose section
29
- - Role section (Decision Rules + Boundaries)
30
- - Context Loading section
31
- - Execution Flow section
32
- - State Update section (MANDATORY see below)
33
- - Output Format section
34
- - Suggested Next Steps section
35
- 2. If output template needed -> Create `.ai-agents/skills/_templates/{name}-output.md`
36
- 3. Update registry if template was created
37
-
38
- ### Step 4.5: Register in Registry (MANDATORY)
39
- Append the new skill entry to `.ai-agents/registry.yaml` > `skills` section:
40
- ```yaml
41
- {name}:
42
- agent: {agent}
43
- path: .claude/skills/{name}/SKILL.md
44
- template: {template_path_or_null}
45
- category: {category}
46
- mode: independent
47
- custom: true
48
- ```
49
- The `custom: true` field is **required** for all user-created skills. It protects the skill from being overwritten during framework updates.
50
-
51
- ### Step 5: Validation
52
- - Verify SKILL.md format compliance (frontmatter has `name` + `description`)
53
- - Confirm no naming conflicts with existing skills
54
- - Verify `registry.yaml` entry includes `custom: true`
55
- - Show the user how to invoke: `/{name}`
56
-
57
- ## Generated Skill Structure
58
-
59
- ```markdown
60
- ---
61
- name: mvt-{name}
62
- description: '{trigger keyword description}'
63
- ---
64
-
65
- # MVT {Name}
66
-
67
- ## Purpose
68
- {user-defined purpose}
69
-
70
- ## Role
71
- You are the **Conductor** -- a Workflow Coordinator.
72
-
73
- ### Decision Rules
74
- {generated based on skill purpose}
75
-
76
- ### Boundaries
77
- {standard boundaries}
78
-
79
- ## Activation Protocol
80
-
81
- ### Step 1: Load Context (Context Foundation)
82
- Load the following files as foundational context:
83
- - `.ai-agents/workspace/session.yaml` -- Current workflow state
84
- - `.ai-agents/workspace/project-context.yaml` -- Project domain data
85
-
86
- ### Step 2: Load Config & Apply Preferences (Config Foundation)
87
- Read `.ai-agents/config.yaml` and enforce the following throughout this entire session:
88
- - `preferences.language` Use this language for ALL output
89
- - `preferences.output.no_emojis` If true, never use emojis
90
- - `preferences.output.data_format` Use this format for data sections
91
-
92
- ### Step 3: Pre-flight Checks
93
- {skill-specific checks}
94
-
95
- ### Step 4: Execute
96
- Proceed to Execution Flow below.
97
-
98
- ## Execution Flow
99
- {generated based on user requirements}
100
-
101
- ## State Update (Required)
102
- After execution, update `.ai-agents/workspace/session.yaml`:
103
- - Set `session.last_command: "/{name}"`
104
- - Append one-line summary to `recent_actions` (keep max 3)
105
-
106
- ## Output Format
107
- {template reference or inline format}
108
-
109
- ## Suggested Next Steps
110
- {contextual suggestions}
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's SKILL.md under `.claude/skills/<existing>/SKILL.md` as a structural reference (to extract shared section patterns like Activation Protocol, State Update, Next Steps).
30
+ - `registry.yaml` -- to check for name collisions and understand skill categories.
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, check existing skills' SKILL.md files and knowledge entries -- prefer reusing patterns that already exist.
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's SKILL.md (e.g., `.claude/skills/mvt-fix/SKILL.md`) 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 skill directory: `.claude/skills/{name}/`.
89
+ 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.
90
+ 3. For standard sections (Activation Protocol, Load Config, Language Constraint, Pre-flight, State Update, Next Steps), copy them verbatim from this document's own SKILL.md and substitute only the skill-specific values (role, decision rules, boundaries, pre-flight checks, next-skill suggestions). Do NOT paraphrase standard sections — copy character-for-character to ensure consistency.
91
+ 4. For skill-specific sections (frontmatter, Purpose, Execution Flow, Edge Cases & Errors), generate fresh content following the skeleton below.
92
+ - `## Execution Flow`
93
+ - `### Step 1: Load Inputs` -- list required and recommended files, plus fallback rules.
94
+ - Skill-specific main steps (1-5 of them), each with **What / How / Branches** sub-structure when there is real branching.
95
+ - `### Step N: User Confirmation` -- only when destructive or non-obvious; describe trigger conditions.
96
+ - `### Step N+1: Write Artifacts` -- only when the skill persists files; specify path, template, required content.
97
+ - Final session update step.
98
+ - `## Edge Cases & Errors` table with at least 3 rows.
99
+ 5. If an output template was decided in Step 4, create `.ai-agents/skills/_templates/{name}-output.md` with **headings only** (this is a document structure, not a conversation reply template). If a custom version directory exists at `_templates/custom/`, note that users can override there.
100
+ 6. If scripts / references / assets are needed, create them under the skill directory.
101
+ 7. SKILL.md word budget: aim for the body to be under ~5k words. Push reference material to `references/`.
102
+
103
+ ### Step 7: Register in Registry (MANDATORY)
104
+ Append the skill entry to `.ai-agents/registry.yaml` > `skills` section:
105
+
106
+ ```yaml
107
+ {name}:
108
+ agent: {agent}
109
+ description: "{third-person description with trigger keywords}"
110
+ path: .claude/skills/{name}/SKILL.md
111
+ template: {template_path_or_null}
112
+ category: {category}
113
+ depends_on: {dependencies_or_omitted}
114
+ custom: true
115
+ knowledge:
116
+ {entries_or_empty_list}
117
+ next_suggestions:
118
+ primary: {suggested_next_skill}
119
+ primary_desc: "{when to use the next skill}"
120
+ ```
121
+
122
+ - The `custom: true` field is **required** for user-created skills; without it, framework updates will overwrite the entry.
123
+ - If the skill has no specific knowledge needs, set `knowledge: []` or omit the key entirely.
124
+ - Validate the YAML still parses after the append; if not, abort and surface the parse error.
125
+
126
+ ### Step 8: Validation
127
+ Walk this checklist; any failed item must be fixed before declaring success.
128
+
129
+ | Check | Pass criterion |
130
+ |-------|----------------|
131
+ | Frontmatter present | `name` and `description` exist in SKILL.md YAML frontmatter |
132
+ | Description quality | Third-person, includes what + when, distinguishes from neighbors |
133
+ | Writing style | Imperative/infinitive throughout; no "you" / "your" |
134
+ | Naming uniqueness | No collision with another entry in `registry.yaml` |
135
+ | `custom: true` | Set in registry entry |
136
+ | Standard sections present | SKILL.md contains Role, Activation Protocol, Execution Flow, Edge Cases & Errors, State Update, Suggested Next Steps |
137
+ | Knowledge files exist | Every file referenced in `knowledge:` resolves on disk |
138
+ | Template path correct | If `template:` set, file exists at that path; the template is headings-only |
139
+ | Word budget | SKILL.md body under ~5k words (run a quick `wc` if available) |
140
+ | Standard skeleton | Execution Flow contains Load Inputs, main steps with branches, Edge Cases & Errors |
141
+
142
+ Show the user how to invoke: `/{name}`.
143
+
144
+ ### Step 9: Iteration Guidance
145
+ Tell the user the iteration loop:
146
+ 1. Use `/{name}` on real tasks.
147
+ 2. Notice struggles or inefficiencies.
148
+ 3. Decide whether to update SKILL.md, add a `references/` file, add a knowledge entry, or split into a new skill.
149
+ 4. Re-run `/mvt-create-skill` to refine, or edit the source files directly and rebuild.
150
+
151
+ ### Step 10: (session update handled by shared section)
152
+
153
+ ## Edge Cases & Errors
154
+
155
+ | Case | Handling |
156
+ |------|----------|
157
+ | Skill name collides with an existing registry entry | STOP at Step 3; ask user to rename; do not generate any file |
158
+ | 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 |
159
+ | 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 |
160
+ | User asks to skip the registry registration step | Refuse; an unregistered skill is invisible to `/mvt-help`, `/mvt-status`, and `/mvt-resume`. Registration is non-negotiable |
161
+ | 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 |
162
+ | User provides a non-third-person description ("Use this skill when you need...") | Rewrite to third-person before saving; show the rewrite for confirmation |
163
+ | 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 |
164
+ | `registry.yaml` parse fails after append | Restore from a pre-append backup; surface the error; do not leave the registry corrupt |
165
+
166
+ ## Generated SKILL.md Structure
167
+
168
+ The generated SKILL.md consists of two parts: **skill-specific sections** (generated fresh) and **standard sections** (copied from this document with skill-specific values replaced).
169
+
170
+ ### Skill-specific sections (generate fresh)
171
+
172
+ ```markdown
173
+ ---
174
+ name: '{name}'
175
+ description: '{third-person description with trigger keywords}'
176
+ ---
177
+
178
+ # {Title}
179
+
180
+ ## Purpose
181
+
182
+ {concise purpose statement}
183
+
184
+ ## Role
185
+
186
+ You are the **{Agent Role}** -- {role description}.
187
+
188
+ ### Decision Rules
189
+ {generated rules, one per line, verb-first}
190
+
191
+ ### Boundaries
192
+ - Do NOT {scope} (use `/{skill}` instead)
193
+ {repeat for each boundary}
194
+
195
+ ## Execution Flow
196
+
197
+ ### Step 1: Load Inputs
198
+ {required and recommended inputs, plus fallback rules}
199
+
200
+ {skill-specific steps 2-N}
201
+
202
+ ### Step N: User Confirmation
203
+ {only when destructive or non-obvious; describe trigger conditions}
204
+
205
+ ### Step N+1: Write Artifacts
206
+ {only when the skill persists files; specify path, template, required content}
207
+ {if shortcut/conversation-only: "No artifact -- results are conversation-only."}
208
+
209
+ {final session update step if not shortcut, or shortcut operation rules}
210
+
211
+ ## Edge Cases & Errors
212
+
213
+ | Case | Handling |
214
+ |------|----------|
215
+ {at least 3 rows}
216
+ ```
217
+
218
+ ### Standard sections (copy from this document)
219
+
220
+ Copy the following sections verbatim from this document (the assembled SKILL.md you are currently reading), replacing only the skill-specific values indicated:
221
+
222
+ | Section | Source in this document | What to replace |
223
+ |---------|----------------------|-----------------|
224
+ | Activation Protocol | `## Activation Protocol` | Add `extended_context` entries if the skill needs additional context sources; otherwise copy as-is |
225
+ | Load Config | Load Config step within Activation Protocol | Copy as-is |
226
+ | Output Language Constraint | Output Language Constraint step within Activation Protocol | Copy as-is |
227
+ | 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 |
228
+ | State Update | `## State Update (Required)` | Replace `/{name}` with the new skill's command; include `active_change` conditional block only if the skill creates changes; include `Shortcut Operation Rules` only if category is `shortcut` |
229
+ | Suggested Next Steps | `## Suggested Next Steps` | Replace `current_skill` with the new skill name; replace conditional suggestions with skill-appropriate ones |
230
+
231
+ **Important**: Do NOT paraphrase or rewrite the standard sections. Copy them character-for-character from this document and only substitute the skill-specific values. This ensures consistency across all MVTT skills.