@uoyo/mvtt 2.0.0 → 2.1.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 (61) hide show
  1. package/dist/fs/materialize.d.ts.map +1 -1
  2. package/dist/fs/materialize.js +3 -2
  3. package/dist/fs/materialize.js.map +1 -1
  4. package/dist/scripts/epic-update.cjs +181 -206
  5. package/dist/scripts/epic-update.md +57 -0
  6. package/dist/scripts/plan-update.cjs +203 -215
  7. package/dist/scripts/plan-update.md +59 -0
  8. package/dist/scripts/session-update.cjs +185 -209
  9. package/install-manifest.yaml +4 -0
  10. package/package.json +1 -1
  11. package/sources/defaults/config.yaml +5 -0
  12. package/sources/scripts/epic-update.js +3 -21
  13. package/sources/scripts/epic-update.md +57 -0
  14. package/sources/scripts/plan-update.js +30 -20
  15. package/sources/scripts/plan-update.md +59 -0
  16. package/sources/scripts/session-update.js +7 -23
  17. package/sources/sections/activation-load-config.md +7 -10
  18. package/sources/sections/activation-load-context.md +15 -25
  19. package/sources/sections/activation-preflight.md +1 -1
  20. package/sources/sections/footer-next-steps.md +1 -1
  21. package/sources/sections/language-constraint.md +3 -18
  22. package/sources/sections/output-format-constraint.md +6 -9
  23. package/sources/sections/script-usage-rule.md +32 -0
  24. package/sources/sections/session-update.md +24 -110
  25. package/sources/skills/mvt-analyze/business.md +1 -1
  26. package/sources/skills/mvt-analyze/manifest.yaml +7 -7
  27. package/sources/skills/mvt-analyze-code/manifest.yaml +7 -7
  28. package/sources/skills/mvt-cleanup/business.md +9 -0
  29. package/sources/skills/mvt-cleanup/manifest.yaml +6 -6
  30. package/sources/skills/mvt-config/business.md +1 -0
  31. package/sources/skills/mvt-config/manifest.yaml +1 -0
  32. package/sources/skills/mvt-decompose/business.md +18 -9
  33. package/sources/skills/mvt-decompose/manifest.yaml +7 -7
  34. package/sources/skills/mvt-design/business.md +34 -43
  35. package/sources/skills/mvt-design/manifest.yaml +7 -7
  36. package/sources/skills/mvt-fix/manifest.yaml +6 -6
  37. package/sources/skills/mvt-help/business.md +19 -9
  38. package/sources/skills/mvt-help/manifest.yaml +3 -14
  39. package/sources/skills/mvt-implement/business.md +27 -34
  40. package/sources/skills/mvt-implement/manifest.yaml +8 -14
  41. package/sources/skills/mvt-init/manifest.yaml +6 -6
  42. package/sources/skills/mvt-plan-dev/business.md +12 -2
  43. package/sources/skills/mvt-plan-dev/manifest.yaml +7 -7
  44. package/sources/skills/mvt-resume/manifest.yaml +3 -3
  45. package/sources/skills/mvt-review/business.md +3 -9
  46. package/sources/skills/mvt-review/manifest.yaml +7 -7
  47. package/sources/skills/mvt-status/business.md +2 -12
  48. package/sources/skills/mvt-status/manifest.yaml +3 -3
  49. package/sources/skills/mvt-sync-context/business.md +1 -1
  50. package/sources/skills/mvt-sync-context/manifest.yaml +6 -6
  51. package/sources/skills/mvt-test/business.md +2 -10
  52. package/sources/skills/mvt-test/manifest.yaml +7 -7
  53. package/sources/skills/mvt-update-plan/business.md +12 -27
  54. package/sources/skills/mvt-update-plan/manifest.yaml +12 -6
  55. package/sources/templates/analyze-output/body.md +41 -0
  56. package/sources/templates/decompose-output/body.md +36 -0
  57. package/sources/templates/design-output/body.md +48 -0
  58. package/sources/templates/implement-output/body.md +48 -3
  59. package/sources/templates/project-context/body.md +45 -0
  60. package/sources/templates/review-output/body.md +59 -0
  61. package/sources/templates/test-output/body.md +72 -0
@@ -29,7 +29,9 @@ The mechanical work — mutating the task, recomputing `current_tasks` via the p
29
29
  rules, validating the result, and writing back atomically — is performed by a
30
30
  deterministic script. Do NOT hand-edit `plan.yaml` or reason through the
31
31
  `current_tasks` selection yourself; call the script with the resolved arguments
32
- from Step 1–2:
32
+ from Step 1–2. See the **Script Usage Rule** section for the command template,
33
+ or read `.ai-agents/scripts/plan-update.md` for argument value sources,
34
+ parameter semantics, and output interpretation.
33
35
 
34
36
  ```bash
35
37
  node .ai-agents/scripts/plan-update.cjs --plan "<active_change.plan_path>" --task <task_id> --status <new_status> --projects "<comma,separated,project,names>" [--artifacts "<comma,separated,paths>"] [--notes "<note text>"]
@@ -37,30 +39,7 @@ node .ai-agents/scripts/plan-update.cjs --plan "<active_change.plan_path>" --tas
37
39
 
38
40
  Include `--artifacts` only if artifacts were provided, and `--notes` only if a note was provided; omit each flag otherwise.
39
41
 
40
- | Argument | Value source |
41
- |----------|-------------|
42
- | `--plan` | `active_change.plan_path` resolved from session.yaml |
43
- | `--task` | the `task_id` resolved in Step 1 |
44
- | `--status` | the `new_status` resolved in Step 1 (`pending`/`in_progress`/`done`/`blocked`/`skipped`) |
45
- | `--projects` | comma-separated project names read from `project-context.yaml > projects[].name` |
46
- | `--artifacts` | optional; comma-separated paths to append (the script de-duplicates) |
47
- | `--notes` | optional; overwrites the task's `notes` |
48
-
49
- The script performs, deterministically:
50
-
51
- 1. **Apply**: sets the task status; appends + de-duplicates `--artifacts` (handles `artifacts: null`); overwrites `--notes`; sets `completed_at` to now when status is `done`, else `null`; refreshes `plan.updated_at`.
52
- 2. **Recompute `current_tasks`** (per-project independent advancement): for each project, finds the `in_progress` task or advances the first `pending` task whose `depends_on` are all in `resolvedIds` (done + skipped; blocked does NOT satisfy). Detects `project_switch` when advancement crosses a project boundary. Plan done -> `current_tasks = {}`.
53
- 3. **Validate** the mutated plan (unique ids, valid `depends_on` references, DAG/no-cycle per project, one `in_progress` per project, every task has acceptance, `completed_at` consistency, `current_tasks` validity, project naming constraint, task project membership).
54
- 4. **Write atomically** (temp + rename) only if validation passes.
55
-
56
- **Interpreting the result:**
57
-
58
- - **Exit 0**: success. stdout is a single-line JSON object:
59
- ```json
60
- {"ok":true,"task":{"id":"t1","title":"...","old_status":"in_progress","new_status":"done"},"current_tasks":{"default":"t2"},"plan_status":"in_progress","progress":{"done":1,"total":4},"warning":null,"project_switch":null}
61
- ```
62
- Use these fields directly to render the Output Format block. The file is already written — do NOT read it back to verify. If `warning` is non-null, surface it. If `project_switch` is non-null, note the project boundary crossing.
63
- - **Exit 1**: failure. stderr carries the error (invalid status, task not found, validation failure, parse/write error). The file was **not** modified. Report the error to the user and do not fabricate a success summary.
42
+ **Interpreting the result:** See `.ai-agents/scripts/plan-update.md` "Output interpretation" for the exit-0 / exit-1 protocol. On exit 0, use the JSON fields directly to render the Output Format block. On exit 1, report stderr and do not fabricate a success summary.
64
43
 
65
44
  ### Step 4: Output
66
45
 
@@ -91,14 +70,20 @@ After the Step 3 script reports `plan_status: "done"`:
91
70
  > - **(defer)** Mark child done but don't advance yet
92
71
 
93
72
  4. On **y**:
94
- - `epic-update.cjs --epic <active_epic.epic_path> --complete-child <active_change.id>`
73
+ - Call the Epic Update Script in `--complete-child` mode using the command below:
74
+ ```bash
75
+ node .ai-agents/scripts/epic-update.cjs --epic "<active_epic.epic_path>" --complete-child <active_change.id>
76
+ ```
95
77
  - `session-update.cjs --skill mvt-update-plan --summary "..." --close-change`
96
78
  - Display: next child info from epic-update stdout. Suggest `/mvt-analyze` to start the next sub-change.
97
79
 
98
80
  5. On **n**: No action. Display reminder: "Change remains open. Run other skills (e.g., `/mvt-review`, `/mvt-test`, `/mvt-fix`) as needed; run `/mvt-update-plan` again when ready to advance the epic."
99
81
 
100
82
  6. On **defer**:
101
- - `epic-update.cjs --epic <active_epic.epic_path> --set-child-status <active_change.id> done`
83
+ - Call the Epic Update Script in `--set-child-status` mode using the command below:
84
+ ```bash
85
+ node .ai-agents/scripts/epic-update.cjs --epic "<active_epic.epic_path>" --set-child-status <active_change.id> --child-status done
86
+ ```
102
87
  - `session-update.cjs --skill mvt-update-plan --summary "..." --close-change`
103
88
  - Display: "Child marked done, current_change unchanged."
104
89
 
@@ -43,12 +43,6 @@ sections:
43
43
  - type: shared
44
44
  source: sections/activation-load-config.md
45
45
 
46
- - type: shared
47
- source: sections/language-constraint.md
48
-
49
- - type: shared
50
- source: sections/output-format-constraint.md
51
-
52
46
  - type: shared
53
47
  source: sections/activation-preflight.md
54
48
  params:
@@ -62,6 +56,12 @@ sections:
62
56
  level: "BLOCK"
63
57
  message: 'No active plan. Run `/mvt-plan-dev` to create one.'
64
58
 
59
+ - type: shared
60
+ source: sections/language-constraint.md
61
+
62
+ - type: shared
63
+ source: sections/output-format-constraint.md
64
+
65
65
  - type: inline
66
66
  content: |
67
67
  ## Operation Mode: Shortcut
@@ -108,6 +108,12 @@ sections:
108
108
  current_skill: mvt-update-plan
109
109
  update_change: true
110
110
 
111
+ - type: shared
112
+ source: sections/script-usage-rule.md
113
+ params:
114
+ uses_plan_update: true
115
+ epic_update_inline_modes_only: true
116
+
111
117
  - type: shared
112
118
  source: sections/footer-next-steps.md
113
119
  params:
@@ -1,15 +1,56 @@
1
1
  # Requirements Analysis: {Feature Name}
2
2
 
3
+ <!--
4
+ This template defines the structure of analysis.md.
5
+ Each section below includes a guidance comment explaining what to write.
6
+ Replace {Feature Name} with the actual feature/change name.
7
+ Remove these HTML comments in the final artifact.
8
+ -->
9
+
3
10
  ## Feature Overview
11
+ <!--
12
+ One paragraph: what the requirement asks for, the scope of this analysis,
13
+ and the source of the requirements (file path or "conversation only").
14
+ Keep it concise — the details go in the sections below.
15
+ -->
4
16
 
5
17
  ## Actors
18
+ <!--
19
+ List all actors and stakeholders involved in the feature: user roles,
20
+ system actors, and external services. One line per actor with its role.
21
+ If only one actor is involved, state it explicitly.
22
+ -->
6
23
 
7
24
  ## Requirements
25
+ <!--
26
+ The extracted features and functionality, grouped logically.
27
+ Each requirement: what it does + any assumptions made during extraction.
28
+ This is the core of the analysis — be specific and actionable.
29
+ -->
8
30
 
9
31
  ## Domain Concepts
32
+ <!--
33
+ Key domain entities, terms, and abstractions introduced or affected.
34
+ Present as a glossary where helpful: | Term | Meaning |.
35
+ Include models, value objects, DTOs, and configuration concepts.
36
+ -->
10
37
 
11
38
  ## Business Rules
39
+ <!--
40
+ Extracted business rules and constraints: validation rules, computation
41
+ rules, state transitions, and access restrictions. One rule per bullet
42
+ with a clear statement of the constraint.
43
+ -->
12
44
 
13
45
  ## Ambiguities & Questions
46
+ <!--
47
+ Unclear, missing, or conflicting requirements detected during analysis.
48
+ Each item: the ambiguity + a specific clarification question for the user.
49
+ If no ambiguities were found, write "None detected".
50
+ -->
14
51
 
15
52
  ## Change Tracking
53
+ <!--
54
+ Optional. If this analysis feeds a tracked change, note the change-id and
55
+ a one-line status. Otherwise, omit this section entirely.
56
+ -->
@@ -1,13 +1,49 @@
1
1
  # Epic Decomposition: {Epic Title}
2
2
 
3
+ <!--
4
+ This template defines the structure of epic.md (the narrative companion
5
+ to epic.yaml). Each section below includes a guidance comment explaining
6
+ what to write. Replace {Epic Title} with the actual epic name.
7
+ Remove these HTML comments in the final artifact.
8
+ -->
9
+
3
10
  ## Vision
11
+ <!--
12
+ One-sentence summary of the overall epic goal. This is the single
13
+ cohesive outcome the decomposition aims to deliver.
14
+ -->
4
15
 
5
16
  ## Scope & Out of Scope
17
+ <!--
18
+ What the epic delivers (in scope) vs. what it explicitly excludes
19
+ (out of scope). Two short lists or a two-column table. Boundaries here
20
+ prevent scope creep into the child stories.
21
+ -->
6
22
 
7
23
  ## Cross-cutting Concerns
24
+ <!--
25
+ Themes spanning multiple children: auth, logging, error handling, data
26
+ migration, shared infrastructure, etc. Each concern: which children it
27
+ affects. These are not standalone children — they are shared obligations.
28
+ -->
8
29
 
9
30
  ## Child Stories
31
+ <!--
32
+ Markdown table mirroring epic.yaml children[]. Columns:
33
+ | # | Child | Scope | Status | Depends On |
34
+ One row per child story. Status is `active` for the first child and
35
+ `pending` for the rest. Depends On lists change_ids (empty for roots).
36
+ -->
10
37
 
11
38
  ## Dependency Map
39
+ <!--
40
+ Mermaid flowchart showing child dependencies (the DAG). Each node is a
41
+ child change_id; edges point from dependency to dependent. This must
42
+ match the depends_on relationships in epic.yaml and contain no cycles.
43
+ -->
12
44
 
13
45
  ## Open Questions
46
+ <!--
47
+ Ambiguities or decisions deferred during decomposition. Each item: the
48
+ question + which child it affects (if any). If none, write "None".
49
+ -->
@@ -1,17 +1,65 @@
1
1
  # Architecture Design: {Feature Name}
2
2
 
3
+ <!--
4
+ This template defines the structure of design.md.
5
+ Each section below includes a guidance comment explaining what to write.
6
+ Replace {Feature Name} with the actual feature/change name.
7
+ Remove these HTML comments in the final artifact.
8
+ -->
9
+
3
10
  ## Overview
11
+ <!--
12
+ The problem statement: what is being designed and why. Summarise the
13
+ requirement context (from analysis.md or conversation) and the design
14
+ goal in one short paragraph.
15
+ -->
4
16
 
5
17
  ## Architecture Decision Records
18
+ <!--
19
+ Every ADR from the design process. Each ADR: context, decision, status
20
+ (proposed/accepted/superseded), and consequences. Never zero ADRs — if
21
+ none were needed, produce minimal one-line ADRs. In --plan mode, ADRs
22
+ collapse to one-line `decision: <text>`.
23
+ -->
6
24
 
7
25
  ## Module Design
26
+ <!--
27
+ Table of modules from the design: | Module | Path | Responsibility |
28
+ Dependencies |. Each module's boundary, what it owns, and what it
29
+ depends on. This drives the File Structure and implementation ordering.
30
+ -->
8
31
 
9
32
  ## Key Interfaces
33
+ <!--
34
+ Explicit signatures and endpoints: function signatures, class contracts,
35
+ HTTP endpoints (method + path), event contracts. These are the public
36
+ contracts that /mvt-implement must match exactly.
37
+ -->
10
38
 
11
39
  ## Data Flow
40
+ <!--
41
+ Sequences describing how data moves through the system, including error
42
+ paths. Use prose or mermaid sequence diagrams. Cover the main flow and
43
+ each declared error path.
44
+ -->
12
45
 
13
46
  ## File Structure
47
+ <!--
48
+ Mapping of modules to file/directory paths in this repo. Show the
49
+ intended file layout (create/modify/delete) so /mvt-implement and
50
+ /mvt-plan-dev can locate targets without re-deriving paths.
51
+ -->
14
52
 
15
53
  ## Implementation Guidelines
54
+ <!--
55
+ Ordering hints for /mvt-implement and /mvt-plan-dev: which modules to
56
+ build first, shared dependencies to establish early, and any sequencing
57
+ constraints. Not a task list — just guidance.
58
+ -->
16
59
 
17
60
  ## Change Tracking
61
+ <!--
62
+ List of files expected to be created/modified/deleted by this design.
63
+ This is the footprint estimate; /mvt-implement records the actual
64
+ footprint. If > ~5 files or > 1 new module, /mvt-plan-dev is recommended.
65
+ -->
@@ -1,11 +1,56 @@
1
1
  # Implementation: {Feature Name}
2
2
 
3
- ## Implementation Plan
3
+ <!--
4
+ This template defines the structure of implementation.md.
5
+ Each section below includes a guidance comment explaining what to write.
6
+ Replace {Feature Name} with the actual feature/change name.
7
+ Remove these HTML comments in the final artifact.
8
+ -->
4
9
 
5
- ## Changes
10
+ ## Implementation Summary
11
+ <!--
12
+ One paragraph: what was built, the scope of this implementation, and
13
+ which design or plan task it fulfils. Keep it concise — the details go
14
+ in the sections below.
15
+ -->
6
16
 
7
- ## Implementation Details
17
+ ## Files Touched
18
+ <!--
19
+ Table with columns: Path | Action (create/modify/delete) | Intent (one line)
20
+ List every file written, modified, or deleted during this implementation.
21
+ This is the authoritative record of the change footprint.
22
+ -->
8
23
 
9
24
  ## Design Compliance
25
+ <!--
26
+ Summary of Step 5 design-compliance checks. For each check, state:
27
+ passed / deviated / not-applicable, with a one-line reason.
28
+ mvt-review will read this section and independently verify the claims.
29
+ -->
30
+
31
+ ## Deviations from Design
32
+ <!--
33
+ List any deviations from design.md (files added/removed, interface changes,
34
+ module placement changes). Each entry: what changed + why.
35
+ An empty list (write "None") is acceptable and expected for clean implementations.
36
+ -->
37
+
38
+ ## Self-Check Results
39
+ <!--
40
+ Record Step 6 outcomes: type-checker status (pass/fail/not-configured),
41
+ any suggested test commands, and UI verification status if applicable.
42
+ Do NOT claim "tested" if only a type-check was run.
43
+ -->
44
+
45
+ ## Open TODOs
46
+ <!--
47
+ Anything deferred to /mvt-review, /mvt-test, or a follow-up change.
48
+ Each item: what is pending + who/which skill should handle it.
49
+ Write "None" if nothing is deferred.
50
+ -->
10
51
 
11
52
  ## Change Tracking
53
+ <!--
54
+ Optional. If this change is tracked in plan.yaml, note the task id(s)
55
+ and a one-line status. Otherwise, omit this section entirely.
56
+ -->
@@ -1,13 +1,58 @@
1
1
  # Project: {project name}
2
2
 
3
+ <!--
4
+ This template defines the structure of project-context.md — the
5
+ project semantic document generated by /mvt-analyze-code.
6
+ Each section below includes a guidance comment explaining what to write.
7
+ Replace {project name} with the actual project name.
8
+ Remove these HTML comments in the final artifact.
9
+
10
+ Multi-project note: when the workspace has multiple projects, each
11
+ project's content is written under its own `# Project: {name}` heading
12
+ within the single file. If a section has no relevant content, include
13
+ the heading with "(No relevant content detected)".
14
+ -->
15
+
3
16
  ## Overview
17
+ <!--
18
+ One paragraph: what the project is, its purpose, and its tech stack.
19
+ Inferred from the codebase structure and entry points.
20
+ -->
4
21
 
5
22
  ## Core Terms
23
+ <!--
24
+ Glossary of domain-specific terminology found in the code: class and
25
+ interface names representing domain concepts, abbreviations and their
26
+ expansions, domain jargon from comments and docstrings.
27
+ Present as a table: | Term | Meaning |.
28
+ -->
6
29
 
7
30
  ## Module Structure
31
+ <!--
32
+ Top-level modules and their responsibilities. For each module: path,
33
+ responsibility, and dependencies on other modules. Include domain
34
+ entities (models, schemas, types, interfaces) classified by type
35
+ (domain model, value object, DTO, configuration).
36
+ -->
8
37
 
9
38
  ## Layer Structure
39
+ <!--
40
+ Architectural layers and their boundaries: which layer imports which,
41
+ and any forbidden cross-layer imports. This feeds the forbidden-import
42
+ checks in /mvt-implement and /mvt-review.
43
+ -->
10
44
 
11
45
  ## Key Business Rules
46
+ <!--
47
+ Business logic and constraints extracted from code: validation rules
48
+ (assertions, guards), computation rules (formulas, algorithms), state
49
+ transition rules (workflow steps, status changes), and constraint rules
50
+ (limits, quotas, access restrictions).
51
+ -->
12
52
 
13
53
  ## API Overview
54
+ <!--
55
+ Public interfaces: HTTP endpoints (method + path), public methods of
56
+ service classes, event publishers/subscribers, and CLI commands if
57
+ applicable. This is the external contract surface of the project.
58
+ -->
@@ -1,11 +1,70 @@
1
1
  # Code Review Report
2
2
 
3
+ <!--
4
+ This template defines the structure of review.md.
5
+ Each section below includes a guidance comment explaining what to write.
6
+ Remove these HTML comments in the final artifact.
7
+ -->
8
+
9
+ ## Review Scope
10
+ <!--
11
+ The file list reviewed, the review depth (full / per-module / aspect
12
+ filter), and any fallbacks applied (e.g., "design.md missing -> Group A
13
+ skipped"). This establishes what was and was not covered.
14
+ -->
15
+
3
16
  ## Summary
17
+ <!--
18
+ Counts per severity (Critical / Warning / Suggestion) plus a one-paragraph
19
+ overall verdict: Approve / Approve with comments / Request changes / Block.
20
+ Verdict rule: Critical > 0 -> Request changes; Critical = 0 & Warnings > 5
21
+ -> Approve with comments; Critical = 0 & Warnings <= 5 & Suggestions only
22
+ -> Approve. Code-only review (design.md missing) caps at Approve with comments.
23
+ -->
4
24
 
5
25
  ## Critical Issues
26
+ <!--
27
+ One entry per Critical finding. Each finding: file, line range, severity,
28
+ observation, recommendation. Critical = bug, security flaw, broken
29
+ contract, data loss risk, or layer violation that breaks isolation.
30
+ Merge duplicate findings (same root cause, multiple files) into one entry.
31
+ -->
6
32
 
7
33
  ## Warnings
34
+ <!--
35
+ One entry per Warning finding. Warning = likely problem or significant
36
+ quality issue that is not a bug today but is high-risk or a maintainability
37
+ hazard (e.g., function 200 lines, duplicated logic 3x, missing tests for a
38
+ documented business rule). Same finding format as Critical Issues.
39
+ -->
8
40
 
9
41
  ## Suggestions
42
+ <!--
43
+ One entry per Suggestion finding. Suggestion = improvement, polish, or
44
+ taste preference (e.g., clearer variable name, split a small helper,
45
+ minor docstring gap). Same finding format as Critical Issues.
46
+ -->
47
+
48
+ ## Skipped Checks
49
+ <!--
50
+ Review groups skipped because their inputs were missing (e.g., Group A
51
+ skipped when design.md is absent, Group E skipped when no test files in
52
+ scope). Each entry: the group name + the reason it was skipped.
53
+ If no groups were skipped, write "None".
54
+ -->
55
+
56
+ ## Recommended Next Skill
57
+ <!--
58
+ One-line recommendation based on findings: `/mvt-fix` for Critical
59
+ issues, `/mvt-test` if Group E (tests) gaps, `/mvt-refactor` if Group B
60
+ (quality) is dominant, `/mvt-implement` if review is clean and work
61
+ remains. Tailor to the actual finding distribution.
62
+ -->
10
63
 
11
64
  ## Highlights
65
+ <!--
66
+ Positive observations worth noting: well-structured code, good test
67
+ coverage, clean abstractions, or anything done particularly well.
68
+ Balances the review and reinforces good practices. Optional — omit if
69
+ nothing stands out.
70
+ -->
@@ -1,7 +1,79 @@
1
1
  # Test Design: {Feature Name}
2
2
 
3
+ <!--
4
+ This template defines the structure of test-design.md.
5
+ Each section below includes a guidance comment explaining what to write.
6
+ Replace {Feature Name} with the actual feature/change name.
7
+ Remove these HTML comments in the final artifact.
8
+ -->
9
+
10
+ ## Scope
11
+ <!--
12
+ The target files under test and any fallbacks applied (e.g., resolved
13
+ from implementation.md Files Touched, or git diff, or user argument).
14
+ Establishes what this test design covers.
15
+ -->
16
+
17
+ ## Test Framework & Layout
18
+ <!--
19
+ The chosen test framework (inferred from project manifests or confirmed
20
+ with user) and the file layout convention used (mirror under tests/,
21
+ sibling *.test.ts, etc.). One short paragraph or a small table.
22
+ -->
23
+
24
+ ## Test Scenarios
25
+ <!--
26
+ The Scenario Table from the scenario-identification step. Columns:
27
+ | ID | Scenario | Type (happy/edge/negative/security/performance) | Rule-traced-to |.
28
+ Covers happy paths, boundaries, invalid inputs, business rules from
29
+ project-context.md, and error paths declared in design.md data flow.
30
+ -->
31
+
3
32
  ## Test Cases
33
+ <!--
34
+ The row-level test case table from the design step. Columns:
35
+ | ID | Scenario | Granularity | Preconditions | Inputs | Actions | Expected | Rule-traced-to |.
36
+ Each row maps to one concrete, runnable test. One scenario maps to one
37
+ granularity (unit / integration / E2E).
38
+ -->
4
39
 
5
40
  ## Test Code
41
+ <!--
42
+ The generated test files: file paths and a brief description of what
43
+ each file covers. The actual test source goes into the project tree;
44
+ this section is a record of what was written and where. Include any
45
+ setup/fixture notes that explain non-obvious test infrastructure.
46
+ -->
47
+
48
+ ## Granularity Decisions
49
+ <!--
50
+ Summary of how scenarios were assigned to unit / integration / E2E,
51
+ including any "needs setup" gaps (e.g., integration scenarios flagged
52
+ because the project lacks an integration test setup). One short
53
+ paragraph or a small table.
54
+ -->
6
55
 
7
56
  ## Coverage Analysis
57
+ <!--
58
+ Only when the --coverage flag is set; otherwise omit this heading
59
+ entirely. Map test cases back to target files/functions and business
60
+ rules from project-context.md; list gaps (untested functions, untested
61
+ rules, untested error paths) and recommend additional test cases for
62
+ each gap. Do not auto-generate gap tests unless the user confirms.
63
+ -->
64
+
65
+ ## Implementation Issues Found
66
+ <!--
67
+ Bugs discovered during scenario design or test writing (failing test
68
+ reveals a real bug, not a test bug). Each finding: scenario id, expected
69
+ vs observed, severity (Critical / Warning), and a recommendation to run
70
+ /mvt-fix. Do NOT modify production code from this skill. If none found,
71
+ write "None".
72
+ -->
73
+
74
+ ## Suggested Run Commands
75
+ <!--
76
+ One or two commands the user can copy-paste to execute the generated
77
+ tests (e.g., `npx vitest run path/to/test.test.ts`). Keep it minimal
78
+ and project-appropriate.
79
+ -->