mindforge-cc 2.1.0 → 2.1.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.
- package/.agent/bin/lib/commands.cjs +959 -0
- package/.agent/bin/lib/config.cjs +421 -0
- package/.agent/bin/lib/core.cjs +1166 -0
- package/.agent/bin/lib/frontmatter.cjs +307 -0
- package/.agent/bin/lib/init.cjs +1336 -0
- package/.agent/bin/lib/milestone.cjs +252 -0
- package/.agent/bin/lib/model-profiles.cjs +68 -0
- package/.agent/bin/lib/phase.cjs +888 -0
- package/.agent/bin/lib/profile-output.cjs +952 -0
- package/.agent/bin/lib/profile-pipeline.cjs +539 -0
- package/.agent/bin/lib/roadmap.cjs +329 -0
- package/.agent/bin/lib/security.cjs +356 -0
- package/.agent/bin/lib/state.cjs +969 -0
- package/.agent/bin/lib/template.cjs +222 -0
- package/.agent/bin/lib/uat.cjs +189 -0
- package/.agent/bin/lib/verify.cjs +851 -0
- package/.agent/bin/lib/workstream.cjs +491 -0
- package/.agent/bin/mindforge-tools.cjs +897 -0
- package/.agent/file-manifest.json +219 -0
- package/.agent/hooks/mindforge-check-update.js +114 -0
- package/.agent/hooks/mindforge-context-monitor.js +156 -0
- package/.agent/hooks/mindforge-prompt-guard.js +96 -0
- package/.agent/hooks/mindforge-statusline.js +119 -0
- package/.agent/hooks/mindforge-workflow-guard.js +94 -0
- package/.agent/mindforge/discuss-phase.md +1 -1
- package/.agent/mindforge/help.md +1 -1
- package/.agent/mindforge/learn.md +3 -2
- package/.agent/mindforge/research.md +3 -2
- package/.agent/mindforge/steer.md +1 -1
- package/.agent/settings.json +38 -0
- package/.agent/skills/mindforge-add-backlog/SKILL.md +72 -0
- package/.agent/skills/mindforge-add-phase/SKILL.md +39 -0
- package/.agent/skills/mindforge-add-tests/SKILL.md +28 -0
- package/.agent/skills/mindforge-add-todo/SKILL.md +42 -0
- package/.agent/skills/mindforge-audit-milestone/SKILL.md +29 -0
- package/.agent/skills/mindforge-audit-uat/SKILL.md +20 -0
- package/.agent/skills/mindforge-autonomous/SKILL.md +33 -0
- package/.agent/skills/mindforge-check-todos/SKILL.md +40 -0
- package/.agent/skills/mindforge-cleanup/SKILL.md +19 -0
- package/.agent/skills/mindforge-complete-milestone/SKILL.md +131 -0
- package/.agent/skills/mindforge-debug/SKILL.md +163 -0
- package/.agent/skills/mindforge-discuss-phase/SKILL.md +54 -0
- package/.agent/skills/mindforge-do/SKILL.md +26 -0
- package/.agent/skills/mindforge-execute-phase/SKILL.md +49 -0
- package/.agent/skills/mindforge-fast/SKILL.md +23 -0
- package/.agent/skills/mindforge-forensics/SKILL.md +49 -0
- package/.agent/skills/mindforge-health/SKILL.md +17 -0
- package/.agent/skills/mindforge-help/SKILL.md +23 -0
- package/.agent/skills/mindforge-insert-phase/SKILL.md +28 -0
- package/.agent/skills/mindforge-join-discord/SKILL.md +19 -0
- package/.agent/skills/mindforge-list-phase-assumptions/SKILL.md +41 -0
- package/.agent/skills/mindforge-list-workspaces/SKILL.md +17 -0
- package/.agent/skills/mindforge-manager/SKILL.md +32 -0
- package/.agent/skills/mindforge-map-codebase/SKILL.md +64 -0
- package/.agent/skills/mindforge-milestone-summary/SKILL.md +44 -0
- package/.agent/skills/mindforge-new-milestone/SKILL.md +38 -0
- package/.agent/skills/mindforge-new-project/SKILL.md +36 -0
- package/.agent/skills/mindforge-new-workspace/SKILL.md +39 -0
- package/.agent/skills/mindforge-next/SKILL.md +19 -0
- package/.agent/skills/mindforge-note/SKILL.md +29 -0
- package/.agent/skills/mindforge-pause-work/SKILL.md +35 -0
- package/.agent/skills/mindforge-plan-milestone-gaps/SKILL.md +28 -0
- package/.agent/skills/mindforge-plan-phase/SKILL.md +37 -0
- package/.agent/skills/mindforge-plant-seed/SKILL.md +22 -0
- package/.agent/skills/mindforge-pr-branch/SKILL.md +21 -0
- package/.agent/skills/mindforge-profile-user/SKILL.md +38 -0
- package/.agent/skills/mindforge-progress/SKILL.md +19 -0
- package/.agent/skills/mindforge-quick/SKILL.md +38 -0
- package/.agent/skills/mindforge-reapply-patches/SKILL.md +124 -0
- package/.agent/skills/mindforge-remove-phase/SKILL.md +26 -0
- package/.agent/skills/mindforge-remove-workspace/SKILL.md +22 -0
- package/.agent/skills/mindforge-research-phase/SKILL.md +186 -0
- package/.agent/skills/mindforge-resume-work/SKILL.md +35 -0
- package/.agent/skills/mindforge-review/SKILL.md +31 -0
- package/.agent/skills/mindforge-review-backlog/SKILL.md +58 -0
- package/.agent/skills/mindforge-session-report/SKILL.md +16 -0
- package/.agent/skills/mindforge-set-profile/SKILL.md +9 -0
- package/.agent/skills/mindforge-settings/SKILL.md +32 -0
- package/.agent/skills/mindforge-ship/SKILL.md +16 -0
- package/.agent/skills/mindforge-stats/SKILL.md +16 -0
- package/.agent/skills/mindforge-thread/SKILL.md +123 -0
- package/.agent/skills/mindforge-ui-phase/SKILL.md +24 -0
- package/.agent/skills/mindforge-ui-review/SKILL.md +24 -0
- package/.agent/skills/mindforge-update/SKILL.md +35 -0
- package/.agent/skills/mindforge-validate-phase/SKILL.md +26 -0
- package/.agent/skills/mindforge-verify-work/SKILL.md +30 -0
- package/.agent/skills/mindforge-workstreams/SKILL.md +65 -0
- package/.agent/workflows/mindforge-add-phase.md +112 -0
- package/.agent/workflows/mindforge-add-tests.md +351 -0
- package/.agent/workflows/mindforge-add-todo.md +158 -0
- package/.agent/workflows/mindforge-audit-milestone.md +332 -0
- package/.agent/workflows/mindforge-audit-uat.md +109 -0
- package/.agent/workflows/mindforge-autonomous.md +815 -0
- package/.agent/workflows/mindforge-check-todos.md +177 -0
- package/.agent/workflows/mindforge-cleanup.md +152 -0
- package/.agent/workflows/mindforge-complete-milestone.md +766 -0
- package/.agent/workflows/mindforge-diagnose-issues.md +220 -0
- package/.agent/workflows/mindforge-discovery-phase.md +289 -0
- package/.agent/workflows/mindforge-discuss-phase-assumptions.md +645 -0
- package/.agent/workflows/mindforge-discuss-phase.md +1047 -0
- package/.agent/workflows/mindforge-do.md +104 -0
- package/.agent/workflows/mindforge-execute-phase.md +838 -0
- package/.agent/workflows/mindforge-execute-plan.md +509 -0
- package/.agent/workflows/mindforge-fast.md +105 -0
- package/.agent/workflows/mindforge-forensics.md +265 -0
- package/.agent/workflows/mindforge-health.md +181 -0
- package/.agent/workflows/mindforge-help.md +606 -0
- package/.agent/workflows/mindforge-insert-phase.md +130 -0
- package/.agent/workflows/mindforge-list-phase-assumptions.md +178 -0
- package/.agent/workflows/mindforge-list-workspaces.md +56 -0
- package/.agent/workflows/mindforge-manager.md +360 -0
- package/.agent/workflows/mindforge-map-codebase.md +370 -0
- package/.agent/workflows/mindforge-milestone-summary.md +223 -0
- package/.agent/workflows/mindforge-new-milestone.md +469 -0
- package/.agent/workflows/mindforge-new-project.md +1226 -0
- package/.agent/workflows/mindforge-new-workspace.md +237 -0
- package/.agent/workflows/mindforge-next.md +97 -0
- package/.agent/workflows/mindforge-node-repair.md +92 -0
- package/.agent/workflows/mindforge-note.md +156 -0
- package/.agent/workflows/mindforge-pause-work.md +176 -0
- package/.agent/workflows/mindforge-plan-milestone-gaps.md +273 -0
- package/.agent/workflows/mindforge-plan-phase.md +848 -0
- package/.agent/workflows/mindforge-plant-seed.md +169 -0
- package/.agent/workflows/mindforge-pr-branch.md +129 -0
- package/.agent/workflows/mindforge-profile-user.md +450 -0
- package/.agent/workflows/mindforge-progress.md +507 -0
- package/.agent/workflows/mindforge-quick.md +732 -0
- package/.agent/workflows/mindforge-remove-phase.md +155 -0
- package/.agent/workflows/mindforge-remove-workspace.md +90 -0
- package/.agent/workflows/mindforge-research-phase.md +74 -0
- package/.agent/workflows/mindforge-resume-project.md +325 -0
- package/.agent/workflows/mindforge-review.md +228 -0
- package/.agent/workflows/mindforge-session-report.md +146 -0
- package/.agent/workflows/mindforge-settings.md +283 -0
- package/.agent/workflows/mindforge-ship.md +228 -0
- package/.agent/workflows/mindforge-stats.md +60 -0
- package/.agent/workflows/mindforge-transition.md +671 -0
- package/.agent/workflows/mindforge-ui-phase.md +290 -0
- package/.agent/workflows/mindforge-ui-review.md +157 -0
- package/.agent/workflows/mindforge-update.md +323 -0
- package/.agent/workflows/mindforge-validate-phase.md +167 -0
- package/.agent/workflows/mindforge-verify-phase.md +254 -0
- package/.agent/workflows/mindforge-verify-work.md +623 -0
- package/.mindforge/personas/advisor-researcher.md +3 -3
- package/.mindforge/personas/debug-specialist.md +1 -1
- package/.mindforge/personas/debugger.md +1 -1
- package/.mindforge/personas/developer.md +1 -1
- package/.mindforge/personas/phase-researcher.md +4 -4
- package/.mindforge/personas/project-researcher.md +3 -3
- package/.mindforge/personas/research-agent.md +4 -3
- package/.mindforge/personas/tech-writer.md +1 -1
- package/.mindforge/personas/ui-researcher.md +1 -1
- package/.planning/ROADMAP.md +10 -0
- package/CHANGELOG.md +34 -0
- package/README.md +70 -45
- package/RELEASENOTES.md +26 -26
- package/bin/install.js +41 -41
- package/bin/installer-core.js +67 -26
- package/bin/wizard/setup-wizard.js +11 -24
- package/bin/wizard/theme.js +141 -0
- package/docs/PERSONAS.md +119 -87
- package/docs/References/checkpoints.md +778 -0
- package/docs/References/config-reference.md +81 -0
- package/docs/References/continuation-format.md +249 -0
- package/docs/References/decimal-phase-calculation.md +64 -0
- package/docs/References/git-integration.md +295 -0
- package/docs/References/git-planning-commit.md +38 -0
- package/docs/References/model-profile-resolution.md +36 -0
- package/docs/References/model-profiles.md +139 -0
- package/docs/References/phase-argument-parsing.md +61 -0
- package/docs/References/planning-config.md +202 -0
- package/docs/References/questioning.md +162 -0
- package/docs/References/tdd.md +263 -0
- package/docs/References/ui-brand.md +160 -0
- package/docs/References/user-profiling.md +681 -0
- package/docs/References/verification-patterns.md +612 -0
- package/docs/References/workstream-flag.md +58 -0
- package/docs/Templates/Agents/CLAUDE-MD.md +122 -0
- package/docs/Templates/Agents/COPILOT-INSTRUCTIONS.md +7 -0
- package/docs/Templates/Agents/DEBUGGER-PROMPT.md +91 -0
- package/docs/Templates/Agents/PLANNER-PROMPT.md +117 -0
- package/docs/Templates/Codebase/architecture.md +255 -0
- package/docs/Templates/Codebase/concerns.md +310 -0
- package/docs/Templates/Codebase/conventions.md +307 -0
- package/docs/Templates/Codebase/integrations.md +280 -0
- package/docs/Templates/Codebase/stack.md +186 -0
- package/docs/Templates/Codebase/structure.md +285 -0
- package/docs/Templates/Codebase/testing.md +480 -0
- package/docs/Templates/Execution/CONTINUE-HERE.md +78 -0
- package/docs/Templates/Execution/DISCUSSION-LOG.md +63 -0
- package/docs/Templates/Execution/PHASE-PROMPT.md +610 -0
- package/docs/Templates/Execution/STATE.md +176 -0
- package/docs/Templates/Execution/SUMMARY-COMPLEX.md +59 -0
- package/docs/Templates/Execution/SUMMARY-MINIMAL.md +41 -0
- package/docs/Templates/Execution/SUMMARY-STANDARD.md +48 -0
- package/docs/Templates/Execution/SUMMARY.md +248 -0
- package/docs/Templates/Profile/DEV-PREFERENCES.md +21 -0
- package/docs/Templates/Profile/USER-PROFILE.md +146 -0
- package/docs/Templates/Profile/USER-SETUP.md +311 -0
- package/docs/Templates/Project/DISCOVERY.md +146 -0
- package/docs/Templates/Project/MILESTONE-ARCHIVE.md +123 -0
- package/docs/Templates/Project/MILESTONE.md +115 -0
- package/docs/Templates/Project/PROJECT.md +206 -0
- package/docs/Templates/Project/REQUIREMENTS.md +231 -0
- package/docs/Templates/Project/RETROSPECTIVE.md +54 -0
- package/docs/Templates/Project/ROADMAP.md +202 -0
- package/docs/Templates/Quality/DEBUG.md +164 -0
- package/docs/Templates/Quality/UAT.md +280 -0
- package/docs/Templates/Quality/UI-SPEC.md +100 -0
- package/docs/Templates/Quality/VALIDATION.md +76 -0
- package/docs/Templates/Quality/VERIFICATION-REPORT.md +322 -0
- package/docs/Templates/Research/ARCHITECTURE.md +204 -0
- package/docs/Templates/Research/FEATURES.md +147 -0
- package/docs/Templates/Research/PITFALLS.md +200 -0
- package/docs/Templates/Research/STACK.md +120 -0
- package/docs/Templates/Research/SUMMARY.md +170 -0
- package/docs/Templates/System/CONFIG.json +43 -0
- package/docs/Templates/System/CONTEXT.md +352 -0
- package/docs/architecture/README.md +54 -42
- package/docs/commands-reference.md +62 -14
- package/docs/getting-started.md +26 -18
- package/docs/skills-authoring-guide.md +40 -12
- package/docs/tutorial.md +83 -116
- package/docs/user-guide.md +72 -198
- package/package.json +7 -2
- package/.mindforge/memory/knowledge-base.jsonl +0 -7
- package/.mindforge/memory/pattern-library.jsonl +0 -1
- package/.mindforge/memory/team-preferences.jsonl +0 -4
- package/.planning/browser-daemon.log +0 -32
- package/docs/mindforge-md-reference.md +0 -57
- package/docs/reference/config-reference.md +0 -64
- /package/{.mindforge/memory/decision-library.jsonl → .planning/phases/01-migrate-gsd-to-mindforge/.gitkeep} +0 -0
- /package/docs/{reference → References}/audit-events.md +0 -0
- /package/docs/{reference → References}/commands.md +0 -0
- /package/docs/{reference → References}/sdk-api.md +0 -0
- /package/docs/{reference → References}/skills-api.md +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mindforge-verify-work
|
|
3
|
+
description: Validate built features through conversational UAT
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Validate built features through conversational testing with persistent state.
|
|
8
|
+
|
|
9
|
+
Purpose: Confirm what the agent built actually works from user's perspective. One test at a time, plain text responses, no interrogation. When issues are found, automatically diagnose, plan fixes, and prepare for execution.
|
|
10
|
+
|
|
11
|
+
Output: {phase_num}-UAT.md tracking all test results. If issues found: diagnosed gaps, verified fix plans ready for /mindforge-execute-phase
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<execution_context>
|
|
15
|
+
@.agent/workflows/mindforge-verify-work.md
|
|
16
|
+
@.agent/templates/UAT.md
|
|
17
|
+
</execution_context>
|
|
18
|
+
|
|
19
|
+
<context>
|
|
20
|
+
Phase: $ARGUMENTS (optional)
|
|
21
|
+
- If provided: Test specific phase (e.g., "4")
|
|
22
|
+
- If not provided: Check for active sessions or prompt for phase
|
|
23
|
+
|
|
24
|
+
Context files are resolved inside the workflow (`init verify-work`) and delegated via `<files_to_read>` blocks.
|
|
25
|
+
</context>
|
|
26
|
+
|
|
27
|
+
<process>
|
|
28
|
+
Execute the verify-work workflow from @.agent/workflows/mindforge-verify-work.md end-to-end.
|
|
29
|
+
Preserve all workflow gates (session management, test presentation, diagnosis, fix planning, routing).
|
|
30
|
+
</process>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mindforge-workstreams
|
|
3
|
+
description: Manage parallel workstreams — list, create, switch, status, progress, complete, and resume
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# /mindforge-workstreams
|
|
8
|
+
|
|
9
|
+
Manage parallel workstreams for concurrent milestone work.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
`/mindforge-workstreams [subcommand] [args]`
|
|
14
|
+
|
|
15
|
+
### Subcommands
|
|
16
|
+
|
|
17
|
+
| Command | Description |
|
|
18
|
+
|---------|-------------|
|
|
19
|
+
| `list` | List all workstreams with status |
|
|
20
|
+
| `create <name>` | Create a new workstream |
|
|
21
|
+
| `status <name>` | Detailed status for one workstream |
|
|
22
|
+
| `switch <name>` | Set active workstream |
|
|
23
|
+
| `progress` | Progress summary across all workstreams |
|
|
24
|
+
| `complete <name>` | Archive a completed workstream |
|
|
25
|
+
| `resume <name>` | Resume work in a workstream |
|
|
26
|
+
|
|
27
|
+
## Step 1: Parse Subcommand
|
|
28
|
+
|
|
29
|
+
Parse the user's input to determine which workstream operation to perform.
|
|
30
|
+
If no subcommand given, default to `list`.
|
|
31
|
+
|
|
32
|
+
## Step 2: Execute Operation
|
|
33
|
+
|
|
34
|
+
### list
|
|
35
|
+
Run: `node "$MindForge_TOOLS" workstream list --raw --cwd "$CWD"`
|
|
36
|
+
Display the workstreams in a table format showing name, status, current phase, and progress.
|
|
37
|
+
|
|
38
|
+
### create
|
|
39
|
+
Run: `node "$MindForge_TOOLS" workstream create <name> --raw --cwd "$CWD"`
|
|
40
|
+
After creation, display the new workstream path and suggest next steps:
|
|
41
|
+
- `/mindforge-new-milestone --ws <name>` to set up the milestone
|
|
42
|
+
|
|
43
|
+
### status
|
|
44
|
+
Run: `node "$MindForge_TOOLS" workstream status <name> --raw --cwd "$CWD"`
|
|
45
|
+
Display detailed phase breakdown and state information.
|
|
46
|
+
|
|
47
|
+
### switch
|
|
48
|
+
Run: `node "$MindForge_TOOLS" workstream set <name> --raw --cwd "$CWD"`
|
|
49
|
+
Also set `MindForge_WORKSTREAM` env var for the current session.
|
|
50
|
+
|
|
51
|
+
### progress
|
|
52
|
+
Run: `node "$MindForge_TOOLS" workstream progress --raw --cwd "$CWD"`
|
|
53
|
+
Display a progress overview across all workstreams.
|
|
54
|
+
|
|
55
|
+
### complete
|
|
56
|
+
Run: `node "$MindForge_TOOLS" workstream complete <name> --raw --cwd "$CWD"`
|
|
57
|
+
Archive the workstream to milestones/.
|
|
58
|
+
|
|
59
|
+
### resume
|
|
60
|
+
Set the workstream as active and suggest `/mindforge-resume-work --ws <name>`.
|
|
61
|
+
|
|
62
|
+
## Step 3: Display Results
|
|
63
|
+
|
|
64
|
+
Format the JSON output from mindforge-tools into a human-readable display.
|
|
65
|
+
Include the `${MindForge_WS}` flag in any routing suggestions.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Add a new integer phase to the end of the current milestone in the roadmap. Automatically calculates next phase number, creates phase directory, and updates roadmap structure.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
</required_reading>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="parse_arguments">
|
|
12
|
+
Parse the command arguments:
|
|
13
|
+
- All arguments become the phase description
|
|
14
|
+
- Example: `/mindforge-add-phase Add authentication` → description = "Add authentication"
|
|
15
|
+
- Example: `/mindforge-add-phase Fix critical performance issues` → description = "Fix critical performance issues"
|
|
16
|
+
|
|
17
|
+
If no arguments provided:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
ERROR: Phase description required
|
|
21
|
+
Usage: /mindforge-add-phase <description>
|
|
22
|
+
Example: /mindforge-add-phase Add authentication system
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Exit.
|
|
26
|
+
</step>
|
|
27
|
+
|
|
28
|
+
<step name="init_context">
|
|
29
|
+
Load phase operation context:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
INIT=$(node ".agent/bin/mindforge-tools.cjs" init phase-op "0")
|
|
33
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Check `roadmap_exists` from init JSON. If false:
|
|
37
|
+
```
|
|
38
|
+
ERROR: No roadmap found (.planning/ROADMAP.md)
|
|
39
|
+
Run /mindforge-new-project to initialize.
|
|
40
|
+
```
|
|
41
|
+
Exit.
|
|
42
|
+
</step>
|
|
43
|
+
|
|
44
|
+
<step name="add_phase">
|
|
45
|
+
**Delegate the phase addition to mindforge-tools:**
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
RESULT=$(node ".agent/bin/mindforge-tools.cjs" phase add "${description}")
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The CLI handles:
|
|
52
|
+
- Finding the highest existing integer phase number
|
|
53
|
+
- Calculating next phase number (max + 1)
|
|
54
|
+
- Generating slug from description
|
|
55
|
+
- Creating the phase directory (`.planning/phases/{NN}-{slug}/`)
|
|
56
|
+
- Inserting the phase entry into ROADMAP.md with Goal, Depends on, and Plans sections
|
|
57
|
+
|
|
58
|
+
Extract from result: `phase_number`, `padded`, `name`, `slug`, `directory`.
|
|
59
|
+
</step>
|
|
60
|
+
|
|
61
|
+
<step name="update_project_state">
|
|
62
|
+
Update STATE.md to reflect the new phase:
|
|
63
|
+
|
|
64
|
+
1. Read `.planning/STATE.md`
|
|
65
|
+
2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
|
|
66
|
+
```
|
|
67
|
+
- Phase {N} added: {description}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If "Roadmap Evolution" section doesn't exist, create it.
|
|
71
|
+
</step>
|
|
72
|
+
|
|
73
|
+
<step name="completion">
|
|
74
|
+
Present completion summary:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Phase {N} added to current milestone:
|
|
78
|
+
- Description: {description}
|
|
79
|
+
- Directory: .planning/phases/{phase-num}-{slug}/
|
|
80
|
+
- Status: Not planned yet
|
|
81
|
+
|
|
82
|
+
Roadmap updated: .planning/ROADMAP.md
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ▶ Next Up
|
|
87
|
+
|
|
88
|
+
**Phase {N}: {description}**
|
|
89
|
+
|
|
90
|
+
`/mindforge-plan-phase {N}`
|
|
91
|
+
|
|
92
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
**Also available:**
|
|
97
|
+
- `/mindforge-add-phase <description>` — add another phase
|
|
98
|
+
- Review roadmap
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
```
|
|
102
|
+
</step>
|
|
103
|
+
|
|
104
|
+
</process>
|
|
105
|
+
|
|
106
|
+
<success_criteria>
|
|
107
|
+
- [ ] `mindforge-tools phase add` executed successfully
|
|
108
|
+
- [ ] Phase directory created
|
|
109
|
+
- [ ] Roadmap updated with new phase entry
|
|
110
|
+
- [ ] STATE.md updated with roadmap evolution note
|
|
111
|
+
- [ ] User informed of next steps
|
|
112
|
+
</success_criteria>
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Generate unit and E2E tests for a completed phase based on its SUMMARY.md, CONTEXT.md, and implementation. Classifies each changed file into TDD (unit), E2E (browser), or Skip categories, presents a test plan for user approval, then generates tests following RED-GREEN conventions.
|
|
3
|
+
|
|
4
|
+
Users currently hand-craft `/mindforge-quick` prompts for test generation after each phase. This workflow standardizes the process with proper classification, quality gates, and gap reporting.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="parse_arguments">
|
|
14
|
+
Parse `$ARGUMENTS` for:
|
|
15
|
+
- Phase number (integer, decimal, or letter-suffix) → store as `$PHASE_ARG`
|
|
16
|
+
- Remaining text after phase number → store as `$EXTRA_INSTRUCTIONS` (optional)
|
|
17
|
+
|
|
18
|
+
Example: `/mindforge-add-tests 12 focus on edge cases` → `$PHASE_ARG=12`, `$EXTRA_INSTRUCTIONS="focus on edge cases"`
|
|
19
|
+
|
|
20
|
+
If no phase argument provided:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
ERROR: Phase number required
|
|
24
|
+
Usage: /mindforge-add-tests <phase> [additional instructions]
|
|
25
|
+
Example: /mindforge-add-tests 12
|
|
26
|
+
Example: /mindforge-add-tests 12 focus on edge cases in the pricing module
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Exit.
|
|
30
|
+
</step>
|
|
31
|
+
|
|
32
|
+
<step name="init_context">
|
|
33
|
+
Load phase operation context:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
INIT=$(node ".agent/bin/mindforge-tools.cjs" init phase-op "${PHASE_ARG}")
|
|
37
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Extract from init JSON: `phase_dir`, `phase_number`, `phase_name`.
|
|
41
|
+
|
|
42
|
+
Verify the phase directory exists. If not:
|
|
43
|
+
```
|
|
44
|
+
ERROR: Phase directory not found for phase ${PHASE_ARG}
|
|
45
|
+
Ensure the phase exists in .planning/phases/
|
|
46
|
+
```
|
|
47
|
+
Exit.
|
|
48
|
+
|
|
49
|
+
Read the phase artifacts (in order of priority):
|
|
50
|
+
1. `${phase_dir}/*-SUMMARY.md` — what was implemented, files changed
|
|
51
|
+
2. `${phase_dir}/CONTEXT.md` — acceptance criteria, decisions
|
|
52
|
+
3. `${phase_dir}/*-VERIFICATION.md` — user-verified scenarios (if UAT was done)
|
|
53
|
+
|
|
54
|
+
If no SUMMARY.md exists:
|
|
55
|
+
```
|
|
56
|
+
ERROR: No SUMMARY.md found for phase ${PHASE_ARG}
|
|
57
|
+
This command works on completed phases. Run /mindforge-execute-phase first.
|
|
58
|
+
```
|
|
59
|
+
Exit.
|
|
60
|
+
|
|
61
|
+
Present banner:
|
|
62
|
+
```
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
MindForge ► ADD TESTS — Phase ${phase_number}: ${phase_name}
|
|
65
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
66
|
+
```
|
|
67
|
+
</step>
|
|
68
|
+
|
|
69
|
+
<step name="analyze_implementation">
|
|
70
|
+
Extract the list of files modified by the phase from SUMMARY.md ("Files Changed" or equivalent section).
|
|
71
|
+
|
|
72
|
+
For each file, classify into one of three categories:
|
|
73
|
+
|
|
74
|
+
| Category | Criteria | Test Type |
|
|
75
|
+
|----------|----------|-----------|
|
|
76
|
+
| **TDD** | Pure functions where `expect(fn(input)).toBe(output)` is writable | Unit tests |
|
|
77
|
+
| **E2E** | UI behavior verifiable by browser automation | Playwright/E2E tests |
|
|
78
|
+
| **Skip** | Not meaningfully testable or already covered | None |
|
|
79
|
+
|
|
80
|
+
**TDD classification — apply when:**
|
|
81
|
+
- Business logic: calculations, pricing, tax rules, validation
|
|
82
|
+
- Data transformations: mapping, filtering, aggregation, formatting
|
|
83
|
+
- Parsers: CSV, JSON, XML, custom format parsing
|
|
84
|
+
- Validators: input validation, schema validation, business rules
|
|
85
|
+
- State machines: status transitions, workflow steps
|
|
86
|
+
- Utilities: string manipulation, date handling, number formatting
|
|
87
|
+
|
|
88
|
+
**E2E classification — apply when:**
|
|
89
|
+
- Keyboard shortcuts: key bindings, modifier keys, chord sequences
|
|
90
|
+
- Navigation: page transitions, routing, breadcrumbs, back/forward
|
|
91
|
+
- Form interactions: submit, validation errors, field focus, autocomplete
|
|
92
|
+
- Selection: row selection, multi-select, shift-click ranges
|
|
93
|
+
- Drag and drop: reordering, moving between containers
|
|
94
|
+
- Modal dialogs: open, close, confirm, cancel
|
|
95
|
+
- Data grids: sorting, filtering, inline editing, column resize
|
|
96
|
+
|
|
97
|
+
**Skip classification — apply when:**
|
|
98
|
+
- UI layout/styling: CSS classes, visual appearance, responsive breakpoints
|
|
99
|
+
- Configuration: config files, environment variables, feature flags
|
|
100
|
+
- Glue code: dependency injection setup, middleware registration, routing tables
|
|
101
|
+
- Migrations: database migrations, schema changes
|
|
102
|
+
- Simple CRUD: basic create/read/update/delete with no business logic
|
|
103
|
+
- Type definitions: records, DTOs, interfaces with no logic
|
|
104
|
+
|
|
105
|
+
Read each file to verify classification. Don't classify based on filename alone.
|
|
106
|
+
</step>
|
|
107
|
+
|
|
108
|
+
<step name="present_classification">
|
|
109
|
+
Present the classification to the user for confirmation before proceeding:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
AskUserQuestion(
|
|
113
|
+
header: "Test Classification",
|
|
114
|
+
question: |
|
|
115
|
+
## Files classified for testing
|
|
116
|
+
|
|
117
|
+
### TDD (Unit Tests) — {N} files
|
|
118
|
+
{list of files with brief reason}
|
|
119
|
+
|
|
120
|
+
### E2E (Browser Tests) — {M} files
|
|
121
|
+
{list of files with brief reason}
|
|
122
|
+
|
|
123
|
+
### Skip — {K} files
|
|
124
|
+
{list of files with brief reason}
|
|
125
|
+
|
|
126
|
+
{if $EXTRA_INSTRUCTIONS: "Additional instructions: ${EXTRA_INSTRUCTIONS}"}
|
|
127
|
+
|
|
128
|
+
How would you like to proceed?
|
|
129
|
+
options:
|
|
130
|
+
- "Approve and generate test plan"
|
|
131
|
+
- "Adjust classification (I'll specify changes)"
|
|
132
|
+
- "Cancel"
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
If user selects "Adjust classification": apply their changes and re-present.
|
|
137
|
+
If user selects "Cancel": exit gracefully.
|
|
138
|
+
</step>
|
|
139
|
+
|
|
140
|
+
<step name="discover_test_structure">
|
|
141
|
+
Before generating the test plan, discover the project's existing test structure:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Find existing test directories
|
|
145
|
+
find . -type d -name "*test*" -o -name "*spec*" -o -name "*__tests__*" 2>/dev/null | head -20
|
|
146
|
+
# Find existing test files for convention matching
|
|
147
|
+
find . -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "*Tests.fs" -o -name "*Test.fs" \) 2>/dev/null | head -20
|
|
148
|
+
# Check for test runners
|
|
149
|
+
ls package.json *.sln 2>/dev/null
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Identify:
|
|
153
|
+
- Test directory structure (where unit tests live, where E2E tests live)
|
|
154
|
+
- Naming conventions (`.test.ts`, `.spec.ts`, `*Tests.fs`, etc.)
|
|
155
|
+
- Test runner commands (how to execute unit tests, how to execute E2E tests)
|
|
156
|
+
- Test framework (xUnit, NUnit, Jest, Playwright, etc.)
|
|
157
|
+
|
|
158
|
+
If test structure is ambiguous, ask the user:
|
|
159
|
+
```
|
|
160
|
+
AskUserQuestion(
|
|
161
|
+
header: "Test Structure",
|
|
162
|
+
question: "I found multiple test locations. Where should I create tests?",
|
|
163
|
+
options: [list discovered locations]
|
|
164
|
+
)
|
|
165
|
+
```
|
|
166
|
+
</step>
|
|
167
|
+
|
|
168
|
+
<step name="generate_test_plan">
|
|
169
|
+
For each approved file, create a detailed test plan.
|
|
170
|
+
|
|
171
|
+
**For TDD files**, plan tests following RED-GREEN-REFACTOR:
|
|
172
|
+
1. Identify testable functions/methods in the file
|
|
173
|
+
2. For each function: list input scenarios, expected outputs, edge cases
|
|
174
|
+
3. Note: since code already exists, tests may pass immediately — that's OK, but verify they test the RIGHT behavior
|
|
175
|
+
|
|
176
|
+
**For E2E files**, plan tests following RED-GREEN gates:
|
|
177
|
+
1. Identify user scenarios from CONTEXT.md/VERIFICATION.md
|
|
178
|
+
2. For each scenario: describe the user action, expected outcome, assertions
|
|
179
|
+
3. Note: RED gate means confirming the test would fail if the feature were broken
|
|
180
|
+
|
|
181
|
+
Present the complete test plan:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
AskUserQuestion(
|
|
185
|
+
header: "Test Plan",
|
|
186
|
+
question: |
|
|
187
|
+
## Test Generation Plan
|
|
188
|
+
|
|
189
|
+
### Unit Tests ({N} tests across {M} files)
|
|
190
|
+
{for each file: test file path, list of test cases}
|
|
191
|
+
|
|
192
|
+
### E2E Tests ({P} tests across {Q} files)
|
|
193
|
+
{for each file: test file path, list of test scenarios}
|
|
194
|
+
|
|
195
|
+
### Test Commands
|
|
196
|
+
- Unit: {discovered test command}
|
|
197
|
+
- E2E: {discovered e2e command}
|
|
198
|
+
|
|
199
|
+
Ready to generate?
|
|
200
|
+
options:
|
|
201
|
+
- "Generate all"
|
|
202
|
+
- "Cherry-pick (I'll specify which)"
|
|
203
|
+
- "Adjust plan"
|
|
204
|
+
)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
If "Cherry-pick": ask user which tests to include.
|
|
208
|
+
If "Adjust plan": apply changes and re-present.
|
|
209
|
+
</step>
|
|
210
|
+
|
|
211
|
+
<step name="execute_tdd_generation">
|
|
212
|
+
For each approved TDD test:
|
|
213
|
+
|
|
214
|
+
1. **Create test file** following discovered project conventions (directory, naming, imports)
|
|
215
|
+
|
|
216
|
+
2. **Write test** with clear arrange/act/assert structure:
|
|
217
|
+
```
|
|
218
|
+
// Arrange — set up inputs and expected outputs
|
|
219
|
+
// Act — call the function under test
|
|
220
|
+
// Assert — verify the output matches expectations
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
3. **Run the test**:
|
|
224
|
+
```bash
|
|
225
|
+
{discovered test command}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
4. **Evaluate result:**
|
|
229
|
+
- **Test passes**: Good — the implementation satisfies the test. Verify the test checks meaningful behavior (not just that it compiles).
|
|
230
|
+
- **Test fails with assertion error**: This may be a genuine bug discovered by the test. Flag it:
|
|
231
|
+
```
|
|
232
|
+
⚠️ Potential bug found: {test name}
|
|
233
|
+
Expected: {expected}
|
|
234
|
+
Actual: {actual}
|
|
235
|
+
File: {implementation file}
|
|
236
|
+
```
|
|
237
|
+
Do NOT fix the implementation — this is a test-generation command, not a fix command. Record the finding.
|
|
238
|
+
- **Test fails with error (import, syntax, etc.)**: This is a test error. Fix the test and re-run.
|
|
239
|
+
</step>
|
|
240
|
+
|
|
241
|
+
<step name="execute_e2e_generation">
|
|
242
|
+
For each approved E2E test:
|
|
243
|
+
|
|
244
|
+
1. **Check for existing tests** covering the same scenario:
|
|
245
|
+
```bash
|
|
246
|
+
grep -r "{scenario keyword}" {e2e test directory} 2>/dev/null
|
|
247
|
+
```
|
|
248
|
+
If found, extend rather than duplicate.
|
|
249
|
+
|
|
250
|
+
2. **Create test file** targeting the user scenario from CONTEXT.md/VERIFICATION.md
|
|
251
|
+
|
|
252
|
+
3. **Run the E2E test**:
|
|
253
|
+
```bash
|
|
254
|
+
{discovered e2e command}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
4. **Evaluate result:**
|
|
258
|
+
- **GREEN (passes)**: Record success
|
|
259
|
+
- **RED (fails)**: Determine if it's a test issue or a genuine application bug. Flag bugs:
|
|
260
|
+
```
|
|
261
|
+
⚠️ E2E failure: {test name}
|
|
262
|
+
Scenario: {description}
|
|
263
|
+
Error: {error message}
|
|
264
|
+
```
|
|
265
|
+
- **Cannot run**: Report blocker. Do NOT mark as complete.
|
|
266
|
+
```
|
|
267
|
+
🛑 E2E blocker: {reason tests cannot run}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**No-skip rule:** If E2E tests cannot execute (missing dependencies, environment issues), report the blocker and mark the test as incomplete. Never mark success without actually running the test.
|
|
271
|
+
</step>
|
|
272
|
+
|
|
273
|
+
<step name="summary_and_commit">
|
|
274
|
+
Create a test coverage report and present to user:
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
278
|
+
MindForge ► TEST GENERATION COMPLETE
|
|
279
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
280
|
+
|
|
281
|
+
## Results
|
|
282
|
+
|
|
283
|
+
| Category | Generated | Passing | Failing | Blocked |
|
|
284
|
+
|----------|-----------|---------|---------|---------|
|
|
285
|
+
| Unit | {N} | {n1} | {n2} | {n3} |
|
|
286
|
+
| E2E | {M} | {m1} | {m2} | {m3} |
|
|
287
|
+
|
|
288
|
+
## Files Created/Modified
|
|
289
|
+
{list of test files with paths}
|
|
290
|
+
|
|
291
|
+
## Coverage Gaps
|
|
292
|
+
{areas that couldn't be tested and why}
|
|
293
|
+
|
|
294
|
+
## Bugs Discovered
|
|
295
|
+
{any assertion failures that indicate implementation bugs}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Record test generation in project state:
|
|
299
|
+
```bash
|
|
300
|
+
node ".agent/bin/mindforge-tools.cjs" state-snapshot
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
If there are passing tests to commit:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
git add {test files}
|
|
307
|
+
git commit -m "test(phase-${phase_number}): add unit and E2E tests from add-tests command"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Present next steps:
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## ▶ Next Up
|
|
316
|
+
|
|
317
|
+
{if bugs discovered:}
|
|
318
|
+
**Fix discovered bugs:** `/mindforge-quick fix the {N} test failures discovered in phase ${phase_number}`
|
|
319
|
+
|
|
320
|
+
{if blocked tests:}
|
|
321
|
+
**Resolve test blockers:** {description of what's needed}
|
|
322
|
+
|
|
323
|
+
{otherwise:}
|
|
324
|
+
**All tests passing!** Phase ${phase_number} is fully tested.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
**Also available:**
|
|
329
|
+
- `/mindforge-add-tests {next_phase}` — test another phase
|
|
330
|
+
- `/mindforge-verify-work {phase_number}` — run UAT verification
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
```
|
|
334
|
+
</step>
|
|
335
|
+
|
|
336
|
+
</process>
|
|
337
|
+
|
|
338
|
+
<success_criteria>
|
|
339
|
+
- [ ] Phase artifacts loaded (SUMMARY.md, CONTEXT.md, optionally VERIFICATION.md)
|
|
340
|
+
- [ ] All changed files classified into TDD/E2E/Skip categories
|
|
341
|
+
- [ ] Classification presented to user and approved
|
|
342
|
+
- [ ] Project test structure discovered (directories, conventions, runners)
|
|
343
|
+
- [ ] Test plan presented to user and approved
|
|
344
|
+
- [ ] TDD tests generated with arrange/act/assert structure
|
|
345
|
+
- [ ] E2E tests generated targeting user scenarios
|
|
346
|
+
- [ ] All tests executed — no untested tests marked as passing
|
|
347
|
+
- [ ] Bugs discovered by tests flagged (not fixed)
|
|
348
|
+
- [ ] Test files committed with proper message
|
|
349
|
+
- [ ] Coverage gaps documented
|
|
350
|
+
- [ ] Next steps presented to user
|
|
351
|
+
</success_criteria>
|