@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,79 +1,91 @@
1
- name: mvt-create-skill
2
- output: .claude/skills/mvt-create-skill/SKILL.md
3
-
4
- frontmatter:
5
- name: mvt-create-skill
6
- description: "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."
7
-
8
- sections:
9
- - type: inline
10
- content: |
11
- # MVT Custom Skill
12
-
13
- ## Purpose
14
-
15
- Guide users through designing and creating custom MVTT-compliant skills. Generates properly structured SKILL.md files with optional output templates, ensuring compatibility with the 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: "User provides skill name -> Validate and proceed with design"
24
- - rule: "Name conflicts with existing skill -> Warn and ask for alternative"
25
- - rule: "Skill needs output template -> Create template in `_templates/` and update manifest"
26
- - rule: "Skill needs state updates -> Include session.yaml update rules"
27
- boundaries:
28
- - scope: "Generated skills must follow MVTT SKILL.md standard structure"
29
- skill: "(constraint)"
30
- - scope: "Skill names may use `mvt-` prefix or a project-specific prefix (e.g., `app-`, `proj-`)"
31
- skill: "(constraint)"
32
- - scope: "All custom skills MUST be registered in `registry.yaml` with `custom: true`"
33
- skill: "(to prevent overwrite during framework updates)"
34
- - scope: "Description field must contain effective trigger keywords"
35
- skill: "(constraint)"
36
-
37
- - type: shared
38
- source: sections/activation-load-context.md
39
- params:
40
- extended_context:
41
- - "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
-
44
- - type: shared
45
- source: sections/activation-load-config.md
46
-
47
- - type: inline
48
- content: |
49
- ### Step 3: Pre-flight Checks
50
- - No blocking checks required.
51
-
52
- ### Step 4: Execute
53
- Proceed to Execution Flow below.
54
-
55
- - type: file
56
- source: ./business.md
57
-
58
- - type: inline
59
- content: |
60
- ## Output Format
61
-
62
- No external template -- output is the generated skill file itself plus a creation summary:
63
-
64
- ```markdown
65
- ## Custom Skill Created
66
-
67
- - **Skill**: `/{name}`
68
- - **Location**: `.claude/skills/{name}/SKILL.md`
69
- - **Registry**: `registry.yaml` (custom: true)
70
- - **Template**: {created/none}
71
- - **Category**: {category}
72
-
73
- You can now use `/{name}` to invoke your new skill.
74
-
75
- ---
76
- **Suggested Next Steps**:
77
- - Test your new skill by running `/{name}`
78
- - `/mvt-help` -- View updated skills list
79
- ```
1
+ name: mvt-create-skill
2
+ output: .claude/skills/mvt-create-skill/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-create-skill
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
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Create Skill
12
+
13
+ ## Purpose
14
+
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
+
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: "User provides skill name -> Validate and proceed with design"
24
+ - rule: "Name conflicts with existing skill -> Warn and ask for alternative"
25
+ - rule: "Skill needs output template -> Create template in `_templates/` and update manifest"
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"
29
+ boundaries:
30
+ - scope: "Generated skills must follow MVTT SKILL.md standard structure"
31
+ skill: "(constraint)"
32
+ - scope: "Skill names may use `mvt-` prefix or a project-specific prefix (e.g., `app-`, `proj-`)"
33
+ skill: "(constraint)"
34
+ - scope: "All custom skills MUST be registered in `registry.yaml` with `custom: true`"
35
+ skill: "(to prevent overwrite during framework updates)"
36
+ - scope: "Description field must use third-person with effective trigger keywords"
37
+ skill: "(constraint)"
38
+ - scope: "SKILL.md body target <5k words; move detailed content to references/"
39
+ skill: "(progressive disclosure)"
40
+
41
+ - type: shared
42
+ source: sections/activation-load-context.md
43
+ params:
44
+ extended_context:
45
+ - "Load one existing SKILL.md as structural reference (e.g., `.claude/skills/mvt-status/SKILL.md`)"
46
+
47
+ - type: shared
48
+ source: sections/activation-load-config.md
49
+
50
+ - type: shared
51
+ source: sections/output-language-constraint.md
52
+
53
+ - type: inline
54
+ content: |
55
+ ### Step 3: Pre-flight Checks
56
+ - No blocking checks required.
57
+
58
+ - type: file
59
+ source: ./business.md
60
+
61
+ - type: inline
62
+ content: |
63
+ ## Output Format
64
+
65
+ No external template -- output is the generated skill files plus a creation summary:
66
+
67
+ ```markdown
68
+ ## Custom Skill Created
69
+
70
+ - **Skill**: `/{name}`
71
+ - **Agent**: {agent role}
72
+ - **Location**: `.claude/skills/{name}/SKILL.md`
73
+ - **Registry**: `registry.yaml` (custom: true)
74
+ - **Template**: {created/none}
75
+ - **Resources**: {scripts/references/assets listing, or none}
76
+ - **Knowledge**: {per-skill entries / shared only}
77
+ - **Context Budget**: SKILL.md body ~{N} words
78
+
79
+ Use `/{name}` to invoke the new skill.
80
+
81
+ ### Iteration
82
+ 1. Use `/{name}` on real tasks
83
+ 2. Notice struggles or inefficiencies
84
+ 3. Update SKILL.md or bundled resources as needed
85
+ 4. Use `/mvt-create-skill` to refine, or edit skill files directly
86
+ ```
87
+
88
+ - type: shared
89
+ source: sections/footer-next-steps.md
90
+ params:
91
+ current_skill: mvt-create-skill
@@ -1,34 +1,116 @@
1
- ## Execution Flow
2
-
3
- ### Step 1: Review Requirements
4
- - Load requirements from `project-context.yaml`
5
- - Load analysis artifact if exists
6
- - Identify key architectural concerns (scalability, security, performance, etc.)
7
-
8
- ### Step 2: Select Architecture Approach
9
- - Check active pattern in config
10
- - Load pattern-specific knowledge
11
- - If `--plan` flag -> Skip to high-level plan, omit detailed interfaces
12
-
13
- ### Step 3: Design Module Structure
14
- - Define modules with responsibilities and layers
15
- - Define interfaces between modules
16
- - Establish dependency direction rules
17
-
18
- ### Step 4: Create Data Flow Design
19
- - Design request/response flows
20
- - Define service interactions
21
- - Create sequence diagrams (Mermaid)
22
-
23
- ### Step 5: Document Decisions
24
- - Record Architecture Decision Records (ADRs)
25
- - Include rationale, alternatives considered, and trade-offs
26
-
27
- ### Step 6: Update Workspace
28
- 1. Update `.ai-agents/workspace/session.yaml`:
29
- - Set `progress.design: done`
30
- - Set `session.last_command: "/mvt-design"`
31
- - Append one-line summary to `recent_actions` (keep max 3)
32
- 2. Update `.ai-agents/workspace/project-context.yaml`:
33
- - Write to `architecture` section (modules, decisions, interfaces)
34
- 3. Write artifact: `.ai-agents/workspace/artifacts/{change-id}/design.md`
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 |
@@ -1,105 +1,96 @@
1
- name: mvt-design
2
- output: .claude/skills/mvt-design/SKILL.md
3
-
4
- frontmatter:
5
- name: mvt-design
6
- description: "Create architecture design based on analyzed requirements. Applies architectural patterns, defines module structure, and creates technical blueprints. Use when user wants to design system architecture."
7
-
8
- sections:
9
- - type: inline
10
- content: |
11
- # MVT Design
12
-
13
- ## Purpose
14
-
15
- Design system architecture based on analyzed requirements. Apply architectural patterns and create technical blueprints that guide implementation. This is the second phase in the full workflow: analyze -> design -> implement -> review -> test.
16
-
17
- - type: shared
18
- source: sections/role-header.md
19
- params:
20
- role: Architect
21
- role_desc: "a System Architecture Expert"
22
- decision_rules:
23
- - rule: "Multiple valid patterns exist -> Present top 2-3 options with pros/cons table, recommend one"
24
- - rule: "Trade-off affects performance vs maintainability -> Document as ADR, state the trade-off"
25
- - rule: "User asks for technology choice -> Evaluate against: requirements fit, team familiarity, maintenance cost"
26
- - rule: "Design needs breaking change -> Highlight impact scope, list affected files, propose migration"
27
- - rule: "Requirements are ambiguous -> Stop and ask clarification before designing"
28
- - rule: "Pattern conflicts with project structure -> Report conflict, suggest pattern change via `/mvt-config`"
29
- boundaries:
30
- - scope: "write implementation code"
31
- skill: "/mvt-implement"
32
- - scope: "re-analyze requirements"
33
- skill: "/mvt-analyze"
34
- - scope: "review code"
35
- skill: "/mvt-review"
36
-
37
- - type: inline
38
- content: |
39
- ## Variants
40
-
41
- | Variant | Description |
42
- |---------|-------------|
43
- | `/mvt-design` | Full architecture design |
44
- | `/mvt-design --plan` | High-level implementation plan only |
45
-
46
- - type: shared
47
- source: sections/activation-load-context.md
48
- params:
49
- extended_context:
50
- - ".ai-agents/knowledge/patterns/{pattern.active}/ -- Active architecture pattern knowledge"
51
- - ".ai-agents/knowledge/core/ -- Core knowledge files"
52
- - ".ai-agents/workspace/artifacts/{active_change.id}/analysis.md -- Analysis from previous phase"
53
-
54
- - type: shared
55
- source: sections/activation-load-config.md
56
-
57
- - type: shared
58
- source: sections/activation-preflight.md
59
- params:
60
- checks:
61
- - order: "1"
62
- field: "session.initialized_at"
63
- level: "BLOCK"
64
- message: 'Session not initialized. Run `/mvt-init` first.'
65
- - order: "2"
66
- field: "project.name"
67
- level: "BLOCK"
68
- message: 'Project not initialized. Run `/mvt-init` first.'
69
- - order: "3"
70
- field: "pattern.active"
71
- level: "BLOCK"
72
- message: 'Architecture pattern required. Run `/mvt-init` to detect and set the pattern.'
73
- - order: "4"
74
- field: "requirements in project-context"
75
- level: "WARN"
76
- message: 'No requirements found. Run `/mvt-analyze` first." (allow user to proceed)'
77
-
78
- - type: inline
79
- content: |
80
- ### Step 4: Execute
81
- Proceed to Execution Flow below.
82
-
83
- - type: file
84
- source: ./business.md
85
-
86
- - type: inline
87
- content: |
88
- ## Output Format
89
-
90
- Read and use the output template from: `.ai-agents/skills/_templates/design-output.md`
91
-
92
- If a custom version exists at `.ai-agents/skills/_templates/custom/design-output.md`, use the custom version instead.
93
-
94
- Fill the template placeholders with the design results.
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-implement
102
- next_primary_desc: "Start implementing this design"
103
- always_show:
104
- - skill: mvt-status
105
- desc: "Check current workflow progress"
1
+ name: mvt-design
2
+ output: .claude/skills/mvt-design/SKILL.md
3
+
4
+ frontmatter:
5
+ name: mvt-design
6
+ description: "Create architecture design based on analyzed requirements. This skill should be used when user wants to design system architecture, define module structure, or create technical blueprints for implementation."
7
+
8
+ sections:
9
+ - type: inline
10
+ content: |
11
+ # MVT Design
12
+
13
+ ## Purpose
14
+
15
+ Design system architecture based on analyzed requirements. Create technical blueprints that guide implementation, respecting existing project structure and constraints.
16
+
17
+ - type: shared
18
+ source: sections/role-header.md
19
+ params:
20
+ role: Architect
21
+ role_desc: "a System Architecture Expert"
22
+ decision_rules:
23
+ - rule: "Multiple valid approaches exist -> Present top 2-3 options with pros/cons table, recommend one"
24
+ - rule: "Trade-off affects performance vs maintainability -> Document as ADR, state the trade-off"
25
+ - rule: "User asks for technology choice -> Evaluate against: requirements fit, team familiarity, maintenance cost"
26
+ - rule: "Design needs breaking change -> Highlight impact scope, list affected files, propose migration"
27
+ - rule: "Requirements are ambiguous -> Stop and ask clarification before designing"
28
+ - rule: "Layer constraint violation in design -> Flag and suggest alternative that respects existing boundaries"
29
+ boundaries:
30
+ - scope: "write implementation code"
31
+ skill: "/mvt-implement"
32
+ - scope: "re-analyze requirements"
33
+ skill: "/mvt-analyze"
34
+ - scope: "review code"
35
+ skill: "/mvt-review"
36
+
37
+ - type: inline
38
+ content: |
39
+ ## Variants
40
+
41
+ | Variant | Description |
42
+ |---------|-------------|
43
+ | `/mvt-design` | Full architecture design |
44
+ | `/mvt-design --plan` | High-level implementation plan only |
45
+
46
+ - type: shared
47
+ source: sections/activation-load-context.md
48
+ params:
49
+ extended_context:
50
+ - ".ai-agents/workspace/artifacts/{active_change.id}/analysis.md -- Analysis from previous phase"
51
+
52
+ - type: shared
53
+ source: sections/activation-load-config.md
54
+
55
+ - type: shared
56
+ source: sections/output-language-constraint.md
57
+
58
+ - type: shared
59
+ source: sections/activation-preflight.md
60
+ params:
61
+ checks:
62
+ - order: "1"
63
+ field: "session.initialized_at"
64
+ level: "BLOCK"
65
+ message: "Session not initialized. Run `/mvt-init` first."
66
+ - order: "2"
67
+ field: "projects[] in project-context.yaml"
68
+ level: "BLOCK"
69
+ message: "Project not initialized. Run `/mvt-init` first."
70
+ - order: "3"
71
+ field: "project-context.md"
72
+ level: "WARN"
73
+ message: "No project-context.md found. Run `/mvt-analyze-code` for better design context. (allow user to proceed)"
74
+ - order: "4"
75
+ field: "requirements in project-context.md"
76
+ level: "WARN"
77
+ message: "No requirements found. Run `/mvt-analyze` first. (allow user to proceed)"
78
+
79
+ - type: file
80
+ source: ./business.md
81
+
82
+ - type: inline
83
+ content: |
84
+ ## Artifact Structure
85
+ Read the document structure template from: `.ai-agents/skills/_templates/design-output.md`
86
+ If a custom version exists at `.ai-agents/skills/_templates/custom/design-output.md`, use the custom version instead.
87
+ The template defines section headings only. Generate content for each section based on design results.
88
+ Write the artifact to: `.ai-agents/workspace/artifacts/{change-id}/design.md`
89
+
90
+ - type: shared
91
+ source: sections/session-update.md
92
+
93
+ - type: shared
94
+ source: sections/footer-next-steps.md
95
+ params:
96
+ current_skill: mvt-design