@uoyo/mvtt 2.0.0-beta.0

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 (163) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +209 -0
  3. package/dist/build/assembler.d.ts +6 -0
  4. package/dist/build/assembler.d.ts.map +1 -0
  5. package/dist/build/assembler.js +32 -0
  6. package/dist/build/assembler.js.map +1 -0
  7. package/dist/build/section-loader.d.ts +4 -0
  8. package/dist/build/section-loader.d.ts.map +1 -0
  9. package/dist/build/section-loader.js +55 -0
  10. package/dist/build/section-loader.js.map +1 -0
  11. package/dist/build/validator.d.ts +6 -0
  12. package/dist/build/validator.d.ts.map +1 -0
  13. package/dist/build/validator.js +77 -0
  14. package/dist/build/validator.js.map +1 -0
  15. package/dist/cli.d.ts +2 -0
  16. package/dist/cli.d.ts.map +1 -0
  17. package/dist/cli.js +49 -0
  18. package/dist/cli.js.map +1 -0
  19. package/dist/commands/build.d.ts +5 -0
  20. package/dist/commands/build.d.ts.map +1 -0
  21. package/dist/commands/build.js +46 -0
  22. package/dist/commands/build.js.map +1 -0
  23. package/dist/commands/doctor.d.ts +2 -0
  24. package/dist/commands/doctor.d.ts.map +1 -0
  25. package/dist/commands/doctor.js +79 -0
  26. package/dist/commands/doctor.js.map +1 -0
  27. package/dist/commands/install.d.ts +5 -0
  28. package/dist/commands/install.d.ts.map +1 -0
  29. package/dist/commands/install.js +63 -0
  30. package/dist/commands/install.js.map +1 -0
  31. package/dist/commands/shared.d.ts +2 -0
  32. package/dist/commands/shared.d.ts.map +1 -0
  33. package/dist/commands/shared.js +2 -0
  34. package/dist/commands/shared.js.map +1 -0
  35. package/dist/commands/uninstall.d.ts +2 -0
  36. package/dist/commands/uninstall.d.ts.map +1 -0
  37. package/dist/commands/uninstall.js +56 -0
  38. package/dist/commands/uninstall.js.map +1 -0
  39. package/dist/commands/update.d.ts +5 -0
  40. package/dist/commands/update.d.ts.map +1 -0
  41. package/dist/commands/update.js +59 -0
  42. package/dist/commands/update.js.map +1 -0
  43. package/dist/fs/hash.d.ts +3 -0
  44. package/dist/fs/hash.d.ts.map +1 -0
  45. package/dist/fs/hash.js +10 -0
  46. package/dist/fs/hash.js.map +1 -0
  47. package/dist/fs/install-manifest.d.ts +16 -0
  48. package/dist/fs/install-manifest.d.ts.map +1 -0
  49. package/dist/fs/install-manifest.js +29 -0
  50. package/dist/fs/install-manifest.js.map +1 -0
  51. package/dist/fs/materialize.d.ts +14 -0
  52. package/dist/fs/materialize.d.ts.map +1 -0
  53. package/dist/fs/materialize.js +116 -0
  54. package/dist/fs/materialize.js.map +1 -0
  55. package/dist/fs/protection.d.ts +15 -0
  56. package/dist/fs/protection.d.ts.map +1 -0
  57. package/dist/fs/protection.js +16 -0
  58. package/dist/fs/protection.js.map +1 -0
  59. package/dist/index.d.ts +3 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +17 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/types/manifest.d.ts +21 -0
  64. package/dist/types/manifest.d.ts.map +1 -0
  65. package/dist/types/manifest.js +2 -0
  66. package/dist/types/manifest.js.map +1 -0
  67. package/dist/types/registry.d.ts +25 -0
  68. package/dist/types/registry.d.ts.map +1 -0
  69. package/dist/types/registry.js +2 -0
  70. package/dist/types/registry.js.map +1 -0
  71. package/dist/util/color.d.ts +9 -0
  72. package/dist/util/color.d.ts.map +1 -0
  73. package/dist/util/color.js +13 -0
  74. package/dist/util/color.js.map +1 -0
  75. package/dist/util/package.d.ts +3 -0
  76. package/dist/util/package.d.ts.map +1 -0
  77. package/dist/util/package.js +13 -0
  78. package/dist/util/package.js.map +1 -0
  79. package/install-manifest.yaml +27 -0
  80. package/package.json +57 -0
  81. package/registry.yaml +209 -0
  82. package/sources/defaults/config.yaml +30 -0
  83. package/sources/defaults/project-context.yaml +26 -0
  84. package/sources/defaults/session.yaml +23 -0
  85. package/sources/knowledge/core/manifest.yaml +47 -0
  86. package/sources/knowledge/core/review-principles.md +51 -0
  87. package/sources/knowledge/patterns/clean-architecture/manifest.yaml +66 -0
  88. package/sources/knowledge/patterns/clean-architecture/review-checklist.md +230 -0
  89. package/sources/knowledge/patterns/ddd/manifest.yaml +83 -0
  90. package/sources/knowledge/patterns/ddd/review-checklist.md +226 -0
  91. package/sources/knowledge/patterns/ddd/tactical-patterns.md +12 -0
  92. package/sources/knowledge/patterns/frontend-react/manifest.yaml +44 -0
  93. package/sources/knowledge/patterns/frontend-react/review-checklist.md +78 -0
  94. package/sources/knowledge/patterns/manifest.yaml +113 -0
  95. package/sources/sections/activation-load-config.md +5 -0
  96. package/sources/sections/activation-load-context.md +11 -0
  97. package/sources/sections/activation-preflight.md +4 -0
  98. package/sources/sections/footer-next-steps.md +9 -0
  99. package/sources/sections/role-header.md +13 -0
  100. package/sources/skills/mvt-add-context/business.md +47 -0
  101. package/sources/skills/mvt-add-context/manifest.yaml +83 -0
  102. package/sources/skills/mvt-analyze/business.md +33 -0
  103. package/sources/skills/mvt-analyze/manifest.yaml +89 -0
  104. package/sources/skills/mvt-analyze-code/business.md +35 -0
  105. package/sources/skills/mvt-analyze-code/manifest.yaml +88 -0
  106. package/sources/skills/mvt-check-context/business.md +42 -0
  107. package/sources/skills/mvt-check-context/manifest.yaml +74 -0
  108. package/sources/skills/mvt-cleanup/business.md +31 -0
  109. package/sources/skills/mvt-cleanup/manifest.yaml +93 -0
  110. package/sources/skills/mvt-config/business.md +26 -0
  111. package/sources/skills/mvt-config/manifest.yaml +108 -0
  112. package/sources/skills/mvt-create-skill/business.md +111 -0
  113. package/sources/skills/mvt-create-skill/manifest.yaml +79 -0
  114. package/sources/skills/mvt-design/business.md +34 -0
  115. package/sources/skills/mvt-design/manifest.yaml +105 -0
  116. package/sources/skills/mvt-fix/business.md +28 -0
  117. package/sources/skills/mvt-fix/manifest.yaml +86 -0
  118. package/sources/skills/mvt-help/business.md +70 -0
  119. package/sources/skills/mvt-help/manifest.yaml +61 -0
  120. package/sources/skills/mvt-implement/business.md +32 -0
  121. package/sources/skills/mvt-implement/manifest.yaml +96 -0
  122. package/sources/skills/mvt-init/business.md +49 -0
  123. package/sources/skills/mvt-init/manifest.yaml +93 -0
  124. package/sources/skills/mvt-refactor/business.md +33 -0
  125. package/sources/skills/mvt-refactor/manifest.yaml +101 -0
  126. package/sources/skills/mvt-review/business.md +49 -0
  127. package/sources/skills/mvt-review/manifest.yaml +106 -0
  128. package/sources/skills/mvt-status/business.md +24 -0
  129. package/sources/skills/mvt-status/manifest.yaml +74 -0
  130. package/sources/skills/mvt-sync-context/business.md +25 -0
  131. package/sources/skills/mvt-sync-context/manifest.yaml +84 -0
  132. package/sources/skills/mvt-template/business.md +49 -0
  133. package/sources/skills/mvt-template/manifest.yaml +71 -0
  134. package/sources/skills/mvt-test/business.md +36 -0
  135. package/sources/skills/mvt-test/manifest.yaml +111 -0
  136. package/sources/templates/analyze-code-output/body.md +44 -0
  137. package/sources/templates/analyze-code-output/manifest.yaml +11 -0
  138. package/sources/templates/analyze-output/body.md +38 -0
  139. package/sources/templates/analyze-output/manifest.yaml +11 -0
  140. package/sources/templates/cleanup-output/body.md +9 -0
  141. package/sources/templates/cleanup-output/manifest.yaml +11 -0
  142. package/sources/templates/config-output/body.md +11 -0
  143. package/sources/templates/config-output/manifest.yaml +11 -0
  144. package/sources/templates/context-check-output/body.md +32 -0
  145. package/sources/templates/context-check-output/manifest.yaml +11 -0
  146. package/sources/templates/design-output/body.md +50 -0
  147. package/sources/templates/design-output/manifest.yaml +11 -0
  148. package/sources/templates/fix-output/body.md +30 -0
  149. package/sources/templates/fix-output/manifest.yaml +11 -0
  150. package/sources/templates/implement-output/body.md +32 -0
  151. package/sources/templates/implement-output/manifest.yaml +11 -0
  152. package/sources/templates/init-output/body.md +34 -0
  153. package/sources/templates/init-output/manifest.yaml +11 -0
  154. package/sources/templates/refactor-output/body.md +32 -0
  155. package/sources/templates/refactor-output/manifest.yaml +11 -0
  156. package/sources/templates/review-output/body.md +45 -0
  157. package/sources/templates/review-output/manifest.yaml +11 -0
  158. package/sources/templates/status-output/body.md +36 -0
  159. package/sources/templates/status-output/manifest.yaml +11 -0
  160. package/sources/templates/sync-context-output/body.md +16 -0
  161. package/sources/templates/sync-context-output/manifest.yaml +11 -0
  162. package/sources/templates/test-output/body.md +31 -0
  163. package/sources/templates/test-output/manifest.yaml +11 -0
@@ -0,0 +1,28 @@
1
+ ## Execution Flow
2
+
3
+ ### Step 1: Understand the Issue
4
+ - Parse user description of the bug
5
+ - Identify affected files and modules
6
+ - Reproduce or confirm the issue
7
+
8
+ ### Step 2: Root Cause Analysis
9
+ - Generate hypotheses for the bug cause
10
+ - Examine relevant code for each hypothesis
11
+ - Test each hypothesis against the evidence
12
+ - Identify the confirmed root cause
13
+
14
+ ### Step 3: Plan the Fix
15
+ - Determine the minimal change required
16
+ - Check for side effects on related code
17
+ - Verify the fix won't break existing behavior
18
+
19
+ ### Step 4: Apply the Fix
20
+ - Make the targeted code change
21
+ - Verify fix addresses the root cause
22
+ - Document what was changed and why
23
+
24
+ ### Step 5: Update Workspace
25
+ 1. Update `.ai-agents/workspace/session.yaml`:
26
+ - Set `session.last_command: "/mvt-fix"`
27
+ - Append one-line summary to `recent_actions` (keep max 3)
28
+ - Do NOT update `progress` (shortcut operation)
@@ -0,0 +1,86 @@
1
+ name: mvt-fix
2
+ output: .claude/skills/mvt-fix/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-fix
6
+ description: "Diagnose and fix bugs or issues in the codebase. Performs root cause analysis and applies targeted fixes. Use when user reports a bug, error, or wants to fix an issue."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Fix
12
+
13
+ ## Purpose
14
+
15
+ Diagnose bugs and issues, perform root cause analysis, and apply targeted fixes. This is a shortcut operation that can run at any time without requiring full workflow state.
16
+
17
+ - type: shared
18
+ source: sections/role-header.md
19
+ params:
20
+ role: Developer
21
+ role_desc: "an Implementation Specialist"
22
+ decision_rules:
23
+ - rule: "Bug description provided -> Analyze the issue, propose fix, apply after user confirms"
24
+ - rule: "Error message provided -> Trace to root cause, fix the source not the symptom"
25
+ - rule: "Multiple possible causes -> List hypotheses with evidence, verify each"
26
+ - rule: "Fix requires architecture change -> Stop and suggest `/mvt-design`"
27
+ - rule: "Fix affects other modules -> Document impact scope before applying"
28
+ boundaries:
29
+ - scope: "re-analyze requirements"
30
+ skill: "/mvt-analyze"
31
+ - scope: "evaluate architecture"
32
+ skill: "/mvt-design"
33
+ - scope: "review own fix"
34
+ skill: "/mvt-review"
35
+
36
+ - type: shared
37
+ source: sections/activation-load-context.md
38
+ params:
39
+ extended_context:
40
+ - "Related source files only (load based on bug description)"
41
+
42
+ - type: shared
43
+ source: sections/activation-load-config.md
44
+
45
+ - type: shared
46
+ source: sections/activation-preflight.md
47
+ params:
48
+ checks:
49
+ - order: "1"
50
+ field: "session.initialized_at"
51
+ level: "WARN"
52
+ message: 'Session not initialized. Run `/mvt-init` first.'
53
+
54
+ - type: inline
55
+ content: |
56
+ ### Shortcut Operation Rules
57
+ - Can execute at any time without checking workflow prerequisites
58
+ - Do NOT update `progress` in `session.yaml` after completion
59
+ - Only update `session.last_command` and `recent_actions`
60
+
61
+ ### Step 4: Execute
62
+ Proceed to Execution Flow below.
63
+
64
+ - type: file
65
+ source: ./business.md
66
+
67
+ - type: inline
68
+ content: |
69
+ ## Output Format
70
+
71
+ Read and use the output template from: `.ai-agents/skills/_templates/fix-output.md`
72
+
73
+ If a custom version exists at `.ai-agents/skills/_templates/custom/fix-output.md`, use the custom version instead.
74
+
75
+ Fill the template placeholders with the fix results.
76
+
77
+ Every response MUST end with a Suggested Next Steps section.
78
+
79
+ - type: shared
80
+ source: sections/footer-next-steps.md
81
+ params:
82
+ next_primary: mvt-review
83
+ next_primary_desc: "Verify the fix"
84
+ next_alternatives:
85
+ - skill: mvt-test
86
+ when: "Add regression tests"
@@ -0,0 +1,70 @@
1
+ ## Execution Flow
2
+
3
+ ### Step 1: Load Current State
4
+ - Read session.yaml: check initialization, active change, phase progress
5
+ - Read project-context.yaml: check project info completeness
6
+ - Read config.yaml: check pattern.active
7
+
8
+ ### Step 2: Assess User Position
9
+ Determine where the user is in the workflow and what to recommend:
10
+
11
+ | Condition | Recommendation |
12
+ |-----------|---------------|
13
+ | Not initialized | `/mvt-init` -- Initialize the project |
14
+ | Initialized, no requirements | `/mvt-analyze` -- Analyze requirements |
15
+ | Requirements exist, no architecture | `/mvt-design` -- Design architecture |
16
+ | Architecture exists, not implemented | `/mvt-implement` -- Implement the design |
17
+ | Implemented, not reviewed | `/mvt-review` -- Review the code |
18
+ | Reviewed, not tested | `/mvt-test` -- Write tests |
19
+ | All phases complete | `/mvt-cleanup` or start new feature |
20
+
21
+ ### Step 3: Display Skills Catalog
22
+ Show all available skills grouped by category:
23
+
24
+ **Workflow Skills** (sequential phases):
25
+ | Skill | Description |
26
+ |-------|-------------|
27
+ | `/mvt-analyze` | Analyze requirements and extract domain concepts |
28
+ | `/mvt-analyze-code` | Reverse-analyze existing code to generate context |
29
+ | `/mvt-design` | Create architecture design based on requirements |
30
+ | `/mvt-implement` | Implement features based on architecture design |
31
+ | `/mvt-review` | Code review for quality and standards compliance |
32
+ | `/mvt-test` | Generate tests to validate implementations |
33
+
34
+ **Shortcut Skills** (anytime, no prerequisites):
35
+ | Skill | Description |
36
+ |-------|-------------|
37
+ | `/mvt-fix` | Diagnose and fix bugs or issues |
38
+ | `/mvt-refactor` | Refactor code while preserving behavior |
39
+
40
+ **Project Management Skills**:
41
+ | Skill | Description |
42
+ |-------|-------------|
43
+ | `/mvt-init` | Initialize or refresh project setup |
44
+ | `/mvt-status` | Show current project and workflow status |
45
+ | `/mvt-config` | Manage framework configuration |
46
+ | `/mvt-sync-context` | Synchronize context with code changes |
47
+ | `/mvt-cleanup` | Clean up workspace artifacts |
48
+
49
+ **Utility Skills**:
50
+ | Skill | Description |
51
+ |-------|-------------|
52
+ | `/mvt-help` | Show this help information |
53
+ | `/mvt-create-skill` | Create custom MVTT skills through guided workflow |
54
+ | `/mvt-add-context` | Interactively add or update project context |
55
+ | `/mvt-check-context` | Analyze context token load and optimization |
56
+ | `/mvt-template` | View, customize, and manage output templates |
57
+
58
+ ### Step 4: Show Workflow Diagram
59
+ Display the standard workflow with current position highlighted:
60
+
61
+ ```mermaid
62
+ flowchart LR
63
+ A[analyze] --> B[design] --> C[implement] --> D[review] --> E[test]
64
+ ```
65
+
66
+ Color-code based on current progress: green (done), yellow (current/recommended), gray (pending).
67
+
68
+ ### Step 5: Respond to User Questions
69
+ - If user asks about a specific skill -> Provide usage details for that skill
70
+ - If user asks "what should I do next" -> Give contextual recommendation based on Step 2
@@ -0,0 +1,61 @@
1
+ name: mvt-help
2
+ output: .claude/skills/mvt-help/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-help
6
+ description: "Show available skills, current project status, and workflow guidance. Use when user is new to MVTT, wants to know what commands are available, or needs guidance on what to do next."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Help
12
+
13
+ ## Purpose
14
+
15
+ Help users navigate the MVTT framework by showing available skills, current project status, and contextual guidance on what to do next. This is the entry point for new users and a quick reference for experienced ones.
16
+
17
+ ## Role
18
+
19
+ You are the **Conductor** -- a Workflow Coordinator.
20
+
21
+ - type: shared
22
+ source: sections/activation-load-context.md
23
+
24
+ - type: shared
25
+ source: sections/activation-load-config.md
26
+
27
+ - type: inline
28
+ content: |
29
+ ### Step 3: Pre-flight Checks
30
+ - No blocking checks required.
31
+
32
+ ### Step 4: Execute
33
+ Proceed to Execution Flow below.
34
+
35
+ - type: file
36
+ source: ./business.md
37
+
38
+ - type: inline
39
+ content: |
40
+ ## Output Format
41
+
42
+ Output is generated inline (no external template). Structure:
43
+
44
+ ```markdown
45
+ ## MVT Help
46
+
47
+ ### Current Status
48
+ - **Project**: {name} ({initialized/not initialized})
49
+ - **Current Phase**: {phase}
50
+ - **Recommended Next**: `/mvt-{next}` -- {description}
51
+
52
+ ### Workflow
53
+ {Mermaid flowchart with current position highlighted}
54
+
55
+ ### Available Skills
56
+ {Skills tables grouped by category, as defined in Step 3}
57
+
58
+ ---
59
+ **Suggested Next Steps**:
60
+ - `/mvt-{recommended}` -- {description}
61
+ ```
@@ -0,0 +1,32 @@
1
+ ## Execution Flow
2
+
3
+ ### Step 1: Load Design Context
4
+ - Read architecture design from artifacts
5
+ - Read module structure from `project-context.yaml`
6
+ - Read coding standards if available
7
+ - Identify files to create or modify
8
+
9
+ ### Step 2: Plan Implementation
10
+ - Map design components to file structure
11
+ - Define implementation order (dependencies first)
12
+ - Identify shared utilities or base classes needed
13
+
14
+ ### Step 3: Implement Code
15
+ - Follow architecture module boundaries
16
+ - Use interfaces defined in design
17
+ - Apply coding standards
18
+ - Add error handling at system boundaries
19
+ - Include inline comments for complex logic only
20
+
21
+ ### Step 4: Verify Design Compliance
22
+ - Check each file against its designated module/layer
23
+ - Verify dependency direction (no layer violations)
24
+ - Confirm interface contracts are satisfied
25
+
26
+ ### Step 5: Update Workspace
27
+ 1. Update `.ai-agents/workspace/session.yaml`:
28
+ - Set `progress.implement: done`
29
+ - Set `session.last_command: "/mvt-implement"`
30
+ - Append one-line summary to `recent_actions` (keep max 3)
31
+ 2. Write artifact: `.ai-agents/workspace/artifacts/{change-id}/implementation.md`
32
+ 3. Write the actual code files to the project
@@ -0,0 +1,96 @@
1
+ name: mvt-implement
2
+ output: .claude/skills/mvt-implement/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-implement
6
+ description: "Implement features based on architecture design. Writes production code following established patterns and design blueprints. Use when user wants to implement a feature or write code."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Implement
12
+
13
+ ## Purpose
14
+
15
+ Write production code based on architecture designs. Follow established patterns, module boundaries, and coding standards. This is the third phase in the full workflow: analyze -> design -> implement -> review -> test.
16
+
17
+ - type: shared
18
+ source: sections/role-header.md
19
+ params:
20
+ role: Developer
21
+ role_desc: "an Implementation Specialist"
22
+ decision_rules:
23
+ - rule: "Architecture design exists -> Follow the module boundaries, interfaces, and patterns defined in it"
24
+ - rule: "Architecture missing -> Warn that `/mvt-design` is recommended, proceed if user confirms"
25
+ - rule: "Code requires new module not in design -> Stop and flag for Architect via `/mvt-design`"
26
+ - rule: "Multiple implementation approaches -> Pick the simplest that satisfies requirements; note alternatives"
27
+ - rule: "Error handling needed -> Add for external boundaries (user input, APIs, I/O); trust internal code"
28
+ - rule: "Existing tests cover changed code -> Mention which tests may need updating"
29
+ boundaries:
30
+ - scope: "re-analyze requirements"
31
+ skill: "/mvt-analyze"
32
+ - scope: "evaluate or change architecture"
33
+ skill: "/mvt-design"
34
+ - scope: "review own code"
35
+ skill: "/mvt-review"
36
+
37
+ - type: shared
38
+ source: sections/activation-load-context.md
39
+ params:
40
+ extended_context:
41
+ - ".ai-agents/knowledge/patterns/{pattern.active}/ -- Active architecture pattern knowledge"
42
+ - ".ai-agents/knowledge/principle/coding-standards.md -- Project coding standards"
43
+ - ".ai-agents/workspace/artifacts/{active_change.id}/ -- Analysis and design artifacts"
44
+
45
+ - type: shared
46
+ source: sections/activation-load-config.md
47
+
48
+ - type: shared
49
+ source: sections/activation-preflight.md
50
+ params:
51
+ checks:
52
+ - order: "1"
53
+ field: "session.initialized_at"
54
+ level: "BLOCK"
55
+ message: 'Session not initialized. Run `/mvt-init` first.'
56
+ - order: "2"
57
+ field: "project.name"
58
+ level: "BLOCK"
59
+ message: 'Project not initialized. Run `/mvt-init` first.'
60
+ - order: "3"
61
+ field: "pattern.active"
62
+ level: "WARN"
63
+ message: 'Architecture pattern not set. Suggest `/mvt-init`." (allow user to proceed)'
64
+ - order: "4"
65
+ field: "modules in architecture"
66
+ level: "WARN"
67
+ message: 'No architecture defined. Run `/mvt-design` first." (allow user to proceed)'
68
+
69
+ - type: inline
70
+ content: |
71
+ ### Step 4: Execute
72
+ Proceed to Execution Flow below.
73
+
74
+ - type: file
75
+ source: ./business.md
76
+
77
+ - type: inline
78
+ content: |
79
+ ## Output Format
80
+
81
+ Read and use the output template from: `.ai-agents/skills/_templates/implement-output.md`
82
+
83
+ If a custom version exists at `.ai-agents/skills/_templates/custom/implement-output.md`, use the custom version instead.
84
+
85
+ Fill the template placeholders with the implementation results.
86
+
87
+ Every response MUST end with a Suggested Next Steps section.
88
+
89
+ - type: shared
90
+ source: sections/footer-next-steps.md
91
+ params:
92
+ next_primary: mvt-review
93
+ next_primary_desc: "Review the implementation"
94
+ next_alternatives:
95
+ - skill: mvt-test
96
+ when: "Write tests for the implementation"
@@ -0,0 +1,49 @@
1
+ ## Execution Flow
2
+
3
+ ### Step 1: Project Discovery
4
+ - Scan project root for:
5
+ - Package managers (package.json, requirements.txt, Cargo.toml, go.mod, pom.xml, etc.)
6
+ - Framework config files (.eslintrc, tsconfig.json, vite.config, etc.)
7
+ - Source directories (src/, lib/, app/, etc.)
8
+ - Test directories (tests/, __tests__/, spec/, etc.)
9
+
10
+ ### Step 2: Tech Stack Detection
11
+ - Identify primary language
12
+ - Identify frameworks and libraries
13
+ - Identify build tools
14
+ - Identify test framework
15
+
16
+ ### Step 3: Architecture Pattern Suggestion
17
+ - Analyze directory structure against known patterns
18
+ - Compare with available patterns in `.ai-agents/knowledge/patterns/`
19
+ - Rank pattern matches by confidence
20
+ - Present recommendation with alternatives
21
+
22
+ Available patterns:
23
+ 1. `ddd` -- Domain-Driven Design
24
+ 2. `clean-architecture` -- Layer separation with dependency inversion
25
+ 3. `frontend-react` -- React/Next.js frontend
26
+ 4. `generic` -- Simple projects without specific architecture
27
+
28
+ ### Step 4: User Confirmation
29
+ - Present detected info and suggested pattern
30
+ - Wait for user to confirm or select alternative
31
+ - Options: `yes` (accept), pattern name (select different), `analyze` (create custom), `none` (skip)
32
+
33
+ ### Step 5: Update Workspace
34
+ 1. Write `.ai-agents/workspace/project-context.yaml`:
35
+ - Set `project.name`, `project.type`, `project.root`
36
+ - Set `tech_stack` (language, framework, build_tool, test_framework)
37
+ - Set `architecture.pattern` if selected
38
+ 2. Write `.ai-agents/workspace/session.yaml`:
39
+ - Set `session.initialized_at` to current timestamp
40
+ - Set `session.last_command: "/mvt-init"`
41
+ - Append one-line summary to `recent_actions` (keep max 3)
42
+ 3. Write `.ai-agents/config.yaml`:
43
+ - Set `pattern.active` to selected pattern
44
+
45
+ ### Step 6 (--deep only): Extended Analysis
46
+ - Map module structure (directories -> modules)
47
+ - Identify key entities and services
48
+ - Map dependency relationships
49
+ - Generate architecture overview diagram
@@ -0,0 +1,93 @@
1
+ name: mvt-init
2
+ output: .claude/skills/mvt-init/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-init
6
+ description: "Initialize or refresh a project with comprehensive analysis. Detects tech stack, suggests architecture patterns, and sets up workspace state. Use when starting a new project or refreshing an existing one."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Init
12
+
13
+ ## Purpose
14
+
15
+ Initialize a project by scanning its structure, detecting the tech stack, suggesting an architecture pattern, and setting up the workspace state files. This is the entry point for the MVTT framework.
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: "If user intent is unclear -> Ask a clarifying question before proceeding"
24
+ - rule: "If `session.yaml` shows `initialized_at: \"\"` -> This is a fresh init"
25
+ - rule: "If `session.yaml` shows existing data -> This is a refresh (preserve existing state)"
26
+ - rule: "If no project files found -> Warn user this may be an empty project"
27
+ boundaries:
28
+ - scope: "analyze requirements"
29
+ skill: "/mvt-analyze"
30
+ - scope: "design architecture"
31
+ skill: "/mvt-design"
32
+ - scope: "write implementation code"
33
+ skill: "/mvt-implement"
34
+
35
+ - type: inline
36
+ content: |
37
+ ## Variants
38
+
39
+ | Variant | Description |
40
+ |---------|-------------|
41
+ | `/mvt-init` | Standard initialization (balanced scan) |
42
+ | `/mvt-init --light` | Quick scan, minimal analysis |
43
+ | `/mvt-init --deep` | Exhaustive scan, comprehensive analysis |
44
+ | `/mvt-init --refresh` | Re-scan existing project, preserve workspace state |
45
+
46
+ - type: shared
47
+ source: sections/activation-load-context.md
48
+ params:
49
+ extended_context:
50
+ - "Scan project root for config files (package.json, requirements.txt, pom.xml, etc.)"
51
+
52
+ - type: shared
53
+ source: sections/activation-load-config.md
54
+
55
+ - type: shared
56
+ source: sections/activation-preflight.md
57
+ params:
58
+ checks:
59
+ - order: "1"
60
+ field: "session and project-context both empty"
61
+ level: "INFO"
62
+ message: "This is a first-time init, proceed normally."
63
+
64
+ - type: inline
65
+ content: |
66
+ ### Step 4: Execute
67
+ Proceed to Execution Flow below.
68
+
69
+ - type: file
70
+ source: ./business.md
71
+
72
+ - type: inline
73
+ content: |
74
+ ## Output Format
75
+
76
+ Read and use the output template from: `.ai-agents/skills/_templates/init-output.md`
77
+
78
+ If a custom version exists at `.ai-agents/skills/_templates/custom/init-output.md`, use the custom version instead.
79
+
80
+ Fill the template placeholders with the initialization results.
81
+
82
+ Every response MUST end with a Suggested Next Steps section.
83
+
84
+ - type: shared
85
+ source: sections/footer-next-steps.md
86
+ params:
87
+ next_primary: mvt-analyze
88
+ next_primary_desc: "Start analyzing requirements"
89
+ always_show:
90
+ - skill: mvt-status
91
+ desc: "View project status"
92
+ - skill: mvt-config
93
+ desc: "Adjust configuration settings"
@@ -0,0 +1,33 @@
1
+ ## Execution Flow
2
+
3
+ ### Step 1: Analyze Current Code
4
+ - Read target files
5
+ - Understand current behavior
6
+ - Classify refactoring type from the types table
7
+ - Identify refactoring opportunities
8
+
9
+ ### Step 2: Risk Assessment
10
+ - Assess risk level based on refactoring type
11
+ - Identify all callers/dependents of the target code
12
+ - Estimate impact scope (files and modules affected)
13
+ - Check for existing tests covering the target code
14
+
15
+ ### Step 3: Plan Refactoring
16
+ - Define refactoring goals
17
+ - Identify incremental steps
18
+ - Ensure behavior preservation strategy
19
+
20
+ ### Step 4: Execute Refactoring
21
+ - Apply changes incrementally
22
+ - Verify behavior at each step
23
+
24
+ ### Step 5: Verify Behavior Preservation
25
+ - If tests exist -> Suggest running them
26
+ - If no tests -> Describe how to verify behavior is unchanged
27
+ - Confirm no regressions in dependent code
28
+
29
+ ### Step 6: Update Workspace
30
+ 1. Update `.ai-agents/workspace/session.yaml`:
31
+ - Set `session.last_command: "/mvt-refactor"`
32
+ - Append one-line summary to `recent_actions` (keep max 3)
33
+ - Do NOT update `progress` (shortcut operation)
@@ -0,0 +1,101 @@
1
+ name: mvt-refactor
2
+ output: .claude/skills/mvt-refactor/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-refactor
6
+ description: "Refactor existing code while preserving behavior. Supports extract, rename, move, decompose, and other refactoring types. Use when user wants to improve code structure without changing functionality."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Refactor
12
+
13
+ ## Purpose
14
+
15
+ Refactor existing code while preserving observable behavior. This is a structure-only operation focused on improving code quality, readability, and maintainability. This is a shortcut operation that can run at any time.
16
+
17
+ - type: shared
18
+ source: sections/role-header.md
19
+ params:
20
+ role: Developer
21
+ role_desc: "an Implementation Specialist"
22
+ decision_rules:
23
+ - rule: "Refactoring target specified -> Analyze and plan the refactoring"
24
+ - rule: "No target specified -> Ask user what to refactor"
25
+ - rule: "Risk level is High -> Warn user and require explicit confirmation"
26
+ - rule: "Tests exist for target code -> Recommend running them after refactoring"
27
+ - rule: "No tests exist -> Describe how to verify behavior is unchanged"
28
+ - rule: "Change requires new module not in design -> Flag for Architect"
29
+ boundaries:
30
+ - scope: "re-analyze requirements"
31
+ skill: "/mvt-analyze"
32
+ - scope: "evaluate architecture"
33
+ skill: "/mvt-design"
34
+ - scope: "review own code"
35
+ skill: "/mvt-review"
36
+
37
+ - type: inline
38
+ content: |
39
+ ### Constraints
40
+ - Do NOT change observable behavior -- refactoring is structure-only
41
+ - Do NOT introduce new features during refactoring
42
+ - Do NOT modify unrelated code outside the refactoring scope
43
+
44
+ ## Refactoring Types
45
+
46
+ | Type | Description | Risk Level |
47
+ |------|-------------|------------|
48
+ | Extract Method/Class | Pull logic into new method or class | Low |
49
+ | Rename | Rename symbols for clarity | Low |
50
+ | Move | Relocate code to appropriate module/layer | Medium |
51
+ | Decompose Conditional | Simplify complex if/switch logic | Medium |
52
+ | Replace Inheritance with Composition | Change class hierarchy | High |
53
+ | Change Interface/API | Modify public contracts | High |
54
+
55
+ - type: shared
56
+ source: sections/activation-load-context.md
57
+ params:
58
+ extended_context:
59
+ - ".ai-agents/knowledge/patterns/{pattern.active}/ -- Active architecture pattern knowledge"
60
+ - ".ai-agents/knowledge/principle/coding-standards.md -- Project coding standards"
61
+ - "Related source files to be refactored"
62
+
63
+ - type: shared
64
+ source: sections/activation-load-config.md
65
+
66
+ - type: inline
67
+ content: |
68
+ ### Step 3: Pre-flight Checks
69
+ - No blocking checks required (shortcut operation).
70
+
71
+ ### Shortcut Operation Rules
72
+ - Can execute at any time without checking workflow prerequisites
73
+ - Do NOT update `progress` in `session.yaml` after completion
74
+ - Only update `session.last_command` and `recent_actions`
75
+
76
+ ### Step 4: Execute
77
+ Proceed to Execution Flow below.
78
+
79
+ - type: file
80
+ source: ./business.md
81
+
82
+ - type: inline
83
+ content: |
84
+ ## Output Format
85
+
86
+ Read and use the output template from: `.ai-agents/skills/_templates/refactor-output.md`
87
+
88
+ If a custom version exists at `.ai-agents/skills/_templates/custom/refactor-output.md`, use the custom version instead.
89
+
90
+ Fill the template placeholders with the refactoring results.
91
+
92
+ Every response MUST end with a Suggested Next Steps section.
93
+
94
+ - type: shared
95
+ source: sections/footer-next-steps.md
96
+ params:
97
+ next_primary: mvt-review
98
+ next_primary_desc: "Verify refactoring changes"
99
+ next_alternatives:
100
+ - skill: mvt-test
101
+ when: "Run tests to confirm behavior preservation"