mindforge-cc 2.0.0-alpha.9 → 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 (157) hide show
  1. package/.agent/CLAUDE.md +26 -0
  2. package/.agent/mindforge/add-backlog.md +32 -0
  3. package/.agent/mindforge/agent.md +31 -0
  4. package/.agent/mindforge/do.md +31 -0
  5. package/.agent/mindforge/execute-phase.md +23 -0
  6. package/.agent/mindforge/install-skill.md +20 -11
  7. package/.agent/mindforge/learn.md +142 -0
  8. package/.agent/mindforge/marketplace.md +120 -0
  9. package/.agent/mindforge/new-runtime.md +19 -0
  10. package/.agent/mindforge/note.md +35 -0
  11. package/.agent/mindforge/plant-seed.md +31 -0
  12. package/.agent/mindforge/remember.md +16 -4
  13. package/.agent/mindforge/review-backlog.md +34 -0
  14. package/.agent/mindforge/session-report.md +39 -0
  15. package/.agent/mindforge/ui-phase.md +34 -0
  16. package/.agent/mindforge/ui-review.md +36 -0
  17. package/.agent/mindforge/validate-phase.md +31 -0
  18. package/.agent/mindforge/workstreams.md +35 -0
  19. package/.claude/CLAUDE.md +26 -0
  20. package/.claude/commands/mindforge/add-backlog.md +32 -0
  21. package/.claude/commands/mindforge/agent.md +31 -0
  22. package/.claude/commands/mindforge/approve.md +27 -15
  23. package/.claude/commands/mindforge/audit.md +30 -26
  24. package/.claude/commands/mindforge/auto.md +29 -18
  25. package/.claude/commands/mindforge/benchmark.md +26 -29
  26. package/.claude/commands/mindforge/browse.md +24 -22
  27. package/.claude/commands/mindforge/complete-milestone.md +28 -14
  28. package/.claude/commands/mindforge/costs.md +26 -9
  29. package/.claude/commands/mindforge/cross-review.md +27 -13
  30. package/.claude/commands/mindforge/dashboard.md +35 -98
  31. package/.claude/commands/mindforge/debug.md +34 -126
  32. package/.claude/commands/mindforge/discuss-phase.md +36 -138
  33. package/.claude/commands/mindforge/do.md +31 -0
  34. package/.claude/commands/mindforge/execute-phase.md +37 -167
  35. package/.claude/commands/mindforge/health.md +27 -17
  36. package/.claude/commands/mindforge/help.md +25 -19
  37. package/.claude/commands/mindforge/init-org.md +37 -131
  38. package/.claude/commands/mindforge/init-project.md +40 -155
  39. package/.claude/commands/mindforge/install-skill.md +32 -15
  40. package/.claude/commands/mindforge/learn.md +36 -0
  41. package/.claude/commands/mindforge/map-codebase.md +36 -298
  42. package/.claude/commands/mindforge/marketplace.md +33 -0
  43. package/.claude/commands/mindforge/metrics.md +29 -18
  44. package/.claude/commands/mindforge/migrate.md +33 -40
  45. package/.claude/commands/mindforge/milestone.md +35 -12
  46. package/.claude/commands/mindforge/new-runtime.md +29 -0
  47. package/.claude/commands/mindforge/next.md +34 -105
  48. package/.claude/commands/mindforge/note.md +35 -0
  49. package/.claude/commands/mindforge/plan-phase.md +34 -125
  50. package/.claude/commands/mindforge/plant-seed.md +31 -0
  51. package/.claude/commands/mindforge/plugins.md +30 -36
  52. package/.claude/commands/mindforge/pr-review.md +32 -41
  53. package/.claude/commands/mindforge/profile-team.md +26 -19
  54. package/.claude/commands/mindforge/publish-skill.md +28 -17
  55. package/.claude/commands/mindforge/qa.md +27 -12
  56. package/.claude/commands/mindforge/quick.md +35 -135
  57. package/.claude/commands/mindforge/release.md +27 -8
  58. package/.claude/commands/mindforge/remember.md +25 -10
  59. package/.claude/commands/mindforge/research.md +27 -9
  60. package/.claude/commands/mindforge/retrospective.md +28 -22
  61. package/.claude/commands/mindforge/review-backlog.md +34 -0
  62. package/.claude/commands/mindforge/review.md +37 -157
  63. package/.claude/commands/mindforge/security-scan.md +34 -233
  64. package/.claude/commands/mindforge/session-report.md +39 -0
  65. package/.claude/commands/mindforge/ship.md +34 -100
  66. package/.claude/commands/mindforge/skills.md +36 -141
  67. package/.claude/commands/mindforge/status.md +30 -104
  68. package/.claude/commands/mindforge/steer.md +25 -10
  69. package/.claude/commands/mindforge/sync-confluence.md +28 -9
  70. package/.claude/commands/mindforge/sync-jira.md +32 -12
  71. package/.claude/commands/mindforge/tokens.md +25 -6
  72. package/.claude/commands/mindforge/ui-phase.md +34 -0
  73. package/.claude/commands/mindforge/ui-review.md +36 -0
  74. package/.claude/commands/mindforge/update.md +33 -42
  75. package/.claude/commands/mindforge/validate-phase.md +31 -0
  76. package/.claude/commands/mindforge/verify-phase.md +30 -62
  77. package/.claude/commands/mindforge/workspace.md +28 -25
  78. package/.claude/commands/mindforge/workstreams.md +35 -0
  79. package/.mindforge/distribution/marketplace.md +53 -0
  80. package/.mindforge/org/skills/MANIFEST.md +1 -0
  81. package/.mindforge/personas/advisor-researcher.md +89 -0
  82. package/.mindforge/personas/analyst.md +112 -52
  83. package/.mindforge/personas/architect.md +100 -67
  84. package/.mindforge/personas/assumptions-analyzer-extend.md +87 -0
  85. package/.mindforge/personas/assumptions-analyzer.md +109 -0
  86. package/.mindforge/personas/codebase-mapper-extend.md +93 -0
  87. package/.mindforge/personas/codebase-mapper.md +770 -0
  88. package/.mindforge/personas/coverage-specialist.md +104 -0
  89. package/.mindforge/personas/debug-specialist.md +118 -52
  90. package/.mindforge/personas/debugger.md +97 -0
  91. package/.mindforge/personas/decision-architect.md +102 -0
  92. package/.mindforge/personas/developer.md +97 -85
  93. package/.mindforge/personas/executor.md +88 -0
  94. package/.mindforge/personas/integration-checker.md +92 -0
  95. package/.mindforge/personas/nyquist-auditor.md +84 -0
  96. package/.mindforge/personas/phase-researcher.md +107 -0
  97. package/.mindforge/personas/plan-checker.md +92 -0
  98. package/.mindforge/personas/planner.md +105 -0
  99. package/.mindforge/personas/project-researcher.md +99 -0
  100. package/.mindforge/personas/qa-engineer.md +113 -61
  101. package/.mindforge/personas/release-manager.md +102 -64
  102. package/.mindforge/personas/research-agent.md +108 -24
  103. package/.mindforge/personas/research-synthesizer.md +101 -0
  104. package/.mindforge/personas/roadmapper-extend.md +100 -0
  105. package/.mindforge/personas/roadmapper.md +103 -0
  106. package/.mindforge/personas/security-reviewer.md +114 -91
  107. package/.mindforge/personas/tech-writer.md +118 -51
  108. package/.mindforge/personas/ui-auditor.md +94 -0
  109. package/.mindforge/personas/ui-checker.md +89 -0
  110. package/.mindforge/personas/ui-researcher.md +99 -0
  111. package/.mindforge/personas/user-profiler.md +93 -0
  112. package/.mindforge/personas/verifier.md +101 -0
  113. package/.mindforge/production/production-checklist.md +34 -123
  114. package/.mindforge/skills-builder/auto-capture-protocol.md +88 -0
  115. package/.mindforge/skills-builder/learn-protocol.md +161 -0
  116. package/.mindforge/skills-builder/quality-scoring.md +120 -0
  117. package/.planning/AUDIT.jsonl +1 -0
  118. package/.planning/decisions/ADR-036-learn-command-docs-as-skill-source.md +26 -0
  119. package/.planning/decisions/ADR-037-auto-capture-frequency-threshold.md +26 -0
  120. package/.planning/decisions/ADR-038-skill-quality-minimum-60.md +27 -0
  121. package/CHANGELOG.md +78 -0
  122. package/MINDFORGE.md +11 -0
  123. package/README.md +80 -6
  124. package/bin/autonomous/auto-runner.js +12 -0
  125. package/bin/install.js +8 -2
  126. package/bin/installer-core.js +129 -26
  127. package/bin/migrations/1.0.0-to-2.0.0.js +115 -0
  128. package/bin/migrations/schema-versions.js +12 -0
  129. package/bin/mindforge-cli.js +35 -0
  130. package/bin/review/cross-review-engine.js +11 -0
  131. package/bin/skill-registry.js +167 -0
  132. package/bin/skill-validator.js +144 -0
  133. package/bin/skills-builder/learn-cli.js +57 -0
  134. package/bin/skills-builder/marketplace-cli.js +54 -0
  135. package/bin/skills-builder/marketplace-client.js +198 -0
  136. package/bin/skills-builder/pattern-detector.js +144 -0
  137. package/bin/skills-builder/skill-generator.js +258 -0
  138. package/bin/skills-builder/skill-registrar.js +107 -0
  139. package/bin/skills-builder/skill-scorer.js +263 -0
  140. package/bin/skills-builder/source-loader.js +268 -0
  141. package/docs/Context/Master-Context.md +6 -13
  142. package/docs/PERSONAS.md +611 -0
  143. package/docs/architecture/README.md +6 -1
  144. package/docs/architecture/adr-039-multi-runtime-support.md +20 -0
  145. package/docs/architecture/adr-040-additive-schema-migration.md +21 -0
  146. package/docs/architecture/adr-041-stable-runtime-interface-contract.md +20 -0
  147. package/docs/architecture/decision-records-index.md +3 -0
  148. package/docs/commands-reference.md +3 -0
  149. package/docs/mindforge-md-reference.md +4 -0
  150. package/docs/reference/commands.md +53 -43
  151. package/docs/skills-authoring-guide.md +29 -0
  152. package/docs/skills-publishing-guide.md +3 -2
  153. package/docs/testing-current-version.md +3 -3
  154. package/docs/upgrade.md +16 -2
  155. package/docs/user-guide.md +57 -8
  156. package/docs/usp-features.md +21 -6
  157. package/package.json +1 -1
@@ -1,16 +1,31 @@
1
- # /mindforge:qa
1
+ ---
2
+ name: mindforge:qa
3
+ description: Run systematic visual QA on changed UI surfaces
4
+ argument-hint: [--phase N] [--auto]
5
+ allowed-tools:
6
+ - run_command
7
+ - list_dir
8
+ - open_browser_url
9
+ - view_file
10
+ ---
2
11
 
3
- ## Usage
4
- `@mindforge qa [--phase N] [--auto]`
12
+ <objective>
13
+ Automatically identify UI regressions and visual bugs by scanning phase diffs for frontend changes, navigating to affected pages, and performing automated sanity checks.
14
+ </objective>
5
15
 
6
- ## Description
7
- Runs systematic visual QA on UI surfaces changed in the current phase.
8
- Analyzes git diff to find pages, navigates to them, and looks for errors.
16
+ <execution_context>
17
+ .claude/commands/mindforge/qa.md
18
+ </execution_context>
9
19
 
10
- ## Options
11
- - `--phase N`: Target specific phase for reporting (defaults to current).
12
- - `--auto`: Automatically run after successful wave execution if configured.
20
+ <context>
21
+ Scope: Files changed in the target phase.
22
+ Output: QA-REPORT report and automated Playwright regression tests.
23
+ </context>
13
24
 
14
- ## Output
15
- - `QA-REPORT-[N].md`: Found bugs with screenshots.
16
- - `tests/regression/*.test.ts`: Playwright tests to prevent bug recurrence.
25
+ <process>
26
+ 1. **Diff Analysis**: Identify changed pages/routes from git history.
27
+ 2. **Visual Scan**: Navigate to affected URLs using the browser tool.
28
+ 3. **Bug Hunting**: Look for console errors, hydration issues, and visual brokenness.
29
+ 4. **Reporting**: Generate a `QA-REPORT-[N].md` with screenshots of findings.
30
+ 5. **Sanitization**: Draft regression tests in `tests/regression/` to prevent recurrence.
31
+ </process>
@@ -1,135 +1,35 @@
1
- # MindForge — Quick Command
2
- # Usage: /mindforge:quick [--research] [--review] [--full]
3
- # For ad-hoc tasks that don't need full lifecycle management.
4
-
5
- ## When to use quick vs plan-phase
6
- Use QUICK for:
7
- - Bug fixes not tied to a current phase
8
- - Small improvements (< 3 files, < 2 hours)
9
- - Dependency updates
10
- - Documentation corrections
11
- - One-off scripts or utilities
12
-
13
- Use PLAN-PHASE for:
14
- - Feature development
15
- - Anything touching more than 6 files
16
- - Anything requiring research before implementation
17
- - Anything with external dependencies or stakeholder requirements
18
-
19
- ## Step 1 — Task intake
20
-
21
- Ask the user:
22
- "What do you want to do?"
23
-
24
- Listen to the description. If the task sounds larger than "quick" scope
25
- (more than 6 files, architectural change, new feature), say:
26
- "This sounds like more than a quick task. I recommend using /mindforge:plan-phase
27
- instead to ensure it's properly planned and verified. Want to proceed with quick anyway?"
28
-
29
- ## Step 2 Optional research (--research flag or user requests it)
30
-
31
- If `--research` is provided or the task involves unfamiliar libraries:
32
- Spawn a focused research subagent. Give it:
33
- - The task description
34
- - The current tech stack from PROJECT.md
35
- Ask it to: investigate the best approach, identify gotchas, recommend specific
36
- libraries (with versions), and write a brief research note.
37
-
38
- Report research findings to the user before proceeding.
39
-
40
- ## Step 3 — Create a quick plan
41
-
42
- ### Sequential quick task numbering
43
- Determine the next quick task number by scanning `.planning/quick/`:
44
- 1. List directories matching `[0-9][0-9][0-9]-*`
45
- 2. Take the max numeric prefix and add 1 (start at 001 if none exist)
46
- 3. If a directory already exists for the chosen number, require `--force` to proceed
47
-
48
- Create `.planning/quick/[NNN]-[slug]/PLAN.md` where NNN is a sequential number
49
- and slug is a 2-4 word kebab-case description.
50
-
51
- Example: `.planning/quick/001-fix-login-null-check/PLAN.md`
52
-
53
- Use the standard XML plan format:
54
- ```xml
55
- <task type="quick">
56
- <n>[task name]</n>
57
- <persona>[appropriate persona]</persona>
58
- <files>[files to touch]</files>
59
- <context>[relevant context]</context>
60
- <action>[implementation instructions]</action>
61
- <verify>[verification command]</verify>
62
- <done>[definition of done]</done>
63
- </task>
64
- ```
65
-
66
- Show the plan to the user. Wait for approval before executing.
67
-
68
- ## Step 4 — Execute the quick plan
69
-
70
- ### Security auto-trigger (mandatory)
71
- Before execution, scan the task description and files for security keywords:
72
- auth, authentication, login, password, token, JWT, session, payment, PII, upload,
73
- credential, secret, key.
74
-
75
- If any keyword matches: load `security-review/SKILL.md` and activate
76
- `security-reviewer.md` persona for the implementation. This is required even
77
- without the `--full` flag.
78
-
79
- 1. Load persona from `.mindforge/personas/`
80
- 2. Load any relevant skills based on task keywords
81
- 3. Execute the plan
82
- 4. Run `<verify>` — must pass before committing
83
- 5. Commit: `[type](quick/[NNN]): [task name]`
84
- 6. Write `.planning/quick/[NNN]-[slug]/SUMMARY.md`
85
-
86
- ### STATE.md update policy
87
- Quick tasks do not change phase status. If there is no active phase, note the
88
- quick task completion in STATE.md under "Last completed task".
89
-
90
- ## Step 5 — Optional review (--review flag)
91
-
92
- If `--review` is provided:
93
- Activate `code-quality.md` skill on the diff.
94
- Report any issues before committing.
95
- If BLOCKING issues found: fix before commit.
96
-
97
- ## Step 6 — Optional full mode (--full flag)
98
-
99
- If `--full` is provided, additionally:
100
- - Run the project's full test suite (not just task-specific verify)
101
- - Run the type checker and linter
102
- - Activate `security-reviewer.md` if the task touches any security-sensitive code
103
- - Write an AUDIT entry for the quick task
104
-
105
- ## Linting always runs
106
- Regardless of flags, after every quick task execution:
107
- 1. Run the project's linter (from CONVENTIONS.md — check which linter applies)
108
- 2. If lint errors found: fix them before committing.
109
- 3. Linting is not part of `--full` — it is always part of quick.
110
-
111
- ## Flags are composable
112
- ```
113
- /mindforge:quick # minimal — task, plan, execute
114
- /mindforge:quick --research # adds domain research step
115
- /mindforge:quick --review # adds code quality review of diff
116
- /mindforge:quick --full # adds full test suite + linting + security
117
- /mindforge:quick --research --full # all of the above
118
- ```
119
-
120
- ## AUDIT entry for quick tasks
121
- ```json
122
- {
123
- "id": "uuid",
124
- "timestamp": "ISO-8601",
125
- "event": "quick_task_completed",
126
- "agent": "mindforge-orchestrator",
127
- "phase": null,
128
- "session_id": "sess_abc",
129
- "quick_id": "001",
130
- "task_name": "Fix login null check",
131
- "commit_sha": "abc1234",
132
- "files_changed": ["src/auth/login.ts"],
133
- "flags_used": ["--review"]
134
- }
135
- ```
1
+ ---
2
+ name: mindforge:quick
3
+ description: Execute an ad-hoc task without full lifecycle management
4
+ argument-hint: [--research] [--review] [--full]
5
+ allowed-tools:
6
+ - run_command
7
+ - view_file
8
+ - write_to_file
9
+ - list_dir
10
+ ---
11
+
12
+ <objective>
13
+ Provide a lightweight workflow for small bug fixes, documentation updates, or dependency maintenance that bypasses the formal phase planning while maintaining strict security and quality guardrails.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/quick.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Scope: < 6 files, < 2 hours of work.
22
+ Storage: .planning/quick/[NNN]-[slug]/
23
+ Flags: --research (add pre-analysis), --review (add quality check), --full (add comprehensive tests/linting).
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Intake**: Verify the task fits within the "Quick" scope. Redirect to `/mindforge:plan-phase` if too large.
28
+ 2. **Research (Optional)**: If `--research` is set, spawn a subagent to investigate the approach and write a research note.
29
+ 3. **Plan**: Generate an XML-based task plan in the `.planning/quick/` directory with a sequential ID.
30
+ 4. **Security Check**: Automatically load `security-review/SKILL.md` if the task touches sensitive keywords (Auth, PII, Secrets).
31
+ 5. **Execute**: Implement the plan, run the specified verify command, and fix any lint errors.
32
+ 6. **Review (Optional)**: If `--review` is set, perform a code quality audit on the diff.
33
+ 7. **Finalize**: Commit the changes with the `quick/[NNN]` prefix and write a `SUMMARY.md`.
34
+ 8. **Audit**: Log `quick_task_completed` with file counts and flag usage.
35
+ </process>
@@ -1,10 +1,29 @@
1
- # MindForge — Release Command
2
- # Usage: /mindforge:release [--version X.Y.Z] [--dry-run] [--checklist-only]
3
- # ⚠️ This command is for releasing the MindForge framework itself.
4
- # For releasing your project phases, use /mindforge:ship instead.
1
+ ---
2
+ name: mindforge:release
3
+ description: Execute the MindForge framework release pipeline
4
+ argument-hint: [--version X.Y.Z] [--dry-run]
5
+ allowed-tools:
6
+ - run_command
7
+ - view_file
8
+ - write_to_file
9
+ ---
5
10
 
6
- ## Purpose
7
- Execute the complete MindForge v1.0.0 (or any version) release pipeline.
8
- Intended for the MindForge core team.
11
+ <objective>
12
+ Coordinate the release of the MindForge framework itself (Core Team only), ensuring all readiness checks pass, changelogs are updated, and packages are correctly versioned.
13
+ </objective>
9
14
 
10
- ## Gate: Production Readiness Checklist
15
+ <execution_context>
16
+ .claude/commands/mindforge/release.md
17
+ </execution_context>
18
+
19
+ <context>
20
+ Scope: Framework Core (not project phases).
21
+ Gates: Production readiness checklist.
22
+ </context>
23
+
24
+ <process>
25
+ 1. **Checklist Audit**: Verify all framework readiness items (tests, docs, security) are marked [x].
26
+ 2. **Dry Run**: Preview the release artifacts and target version.
27
+ 3. **Pipeline Execution**: Bump versions, update the main CHANGELOG.md, and tag the release in git.
28
+ 4. **Finalize**: Trigger the publication to the official registry.
29
+ </process>
@@ -1,14 +1,29 @@
1
- # /mindforge:remember
1
+ ---
2
+ name: mindforge:remember
3
+ description: Manage long-term memory and knowledge graph entries
4
+ argument-hint: [--add "content"] [--search "query"] [--promote "id"]
5
+ allowed-tools:
6
+ - view_file
7
+ - write_to_file
8
+ - run_command
9
+ ---
2
10
 
3
- Manage the MindForge long-term memory (knowledge graph).
11
+ <objective>
12
+ Provide a manual interface for steering the agent's long-term memory, allowing users to add specific project knowledge, search the existing graph, and promote local learnings to global availability.
13
+ </objective>
4
14
 
5
- ## Usage
15
+ <execution_context>
16
+ .claude/commands/mindforge/remember.md
17
+ </execution_context>
6
18
 
7
- - `/mindforge:remember --add "Your knowledge content"`: Manually add an entry.
8
- - `/mindforge:remember --search "your query"`: Search the knowledge base.
9
- - `/mindforge:remember --stats`: View memory statistics.
10
- - `/mindforge:remember --promote "id"`: Promote a project entry to global memory.
19
+ <context>
20
+ Storage: MindForge Knowledge Graph.
21
+ Visibility: Project-local vs. Global memory.
22
+ </context>
11
23
 
12
- ## Description
13
-
14
- MindForge capture, stores, and retrieves knowledge (architectural decisions, code patterns, team preferences) across all sessions and projects. This command allows for manual management and querying of this data.
24
+ <process>
25
+ 1. **Add**: Capture one-off decisions or constraints manually into the memory store.
26
+ 2. **Search**: Query the knowledge base across sessions to retrieve previously captured patterns.
27
+ 3. **Promote**: Elevate a specific project-level finding to "Global" status for use in future repositories.
28
+ 4. **Analyze**: Provide stats on memory usage and activation frequency.
29
+ </process>
@@ -1,11 +1,29 @@
1
- # MindForge v2 — Research Command
2
- # Usage: /mindforge:research [topic] [--type general|library|codebase|compliance] [--url URL]
1
+ ---
2
+ name: mindforge:research
3
+ description: Perform deep technical or architectural research
4
+ argument-hint: [topic] [--type library|codebase|compliance]
5
+ allowed-tools:
6
+ - run_command
7
+ - read_url_content
8
+ - view_file
9
+ ---
3
10
 
4
- ## Purpose
5
- Deep research using Gemini 1.5 Pro's 1-million-token context window.
6
- Incorporate local code context and remote documentation simultaneously.
11
+ <objective>
12
+ Leverage large-context models to ingest massive amounts of external documentation and local code simultaneously to answer complex architectural or compliance questions.
13
+ </objective>
7
14
 
8
- ## Capabilities
9
- - Ingest full library documentation.
10
- - Codebase-wide architectural analysis.
11
- - Regulatory compliance audits.
15
+ <execution_context>
16
+ .claude/commands/mindforge/research.md
17
+ </execution_context>
18
+
19
+ <context>
20
+ Engine: Gemini 2.0 Pro (high token limit required).
21
+ Analysis Areas: Library integration, codebase-wide patterns, compliance audits.
22
+ </context>
23
+
24
+ <process>
25
+ 1. **Define Scope**: Identify target documentation URLs and local source paths.
26
+ 2. **Ingest**: Read all relevant sources into the analysis model's context.
27
+ 3. **Synthesize**: Answer the user's research topic with citations to specific docs and files.
28
+ 4. **Document**: Capture key findings for possible promotion to a skill via `/mindforge:learn`.
29
+ </process>
@@ -1,26 +1,32 @@
1
- # MindForge — Retrospective Command
2
- # Usage: /mindforge:retrospective [phase N|milestone M] [--template agile|4ls|starfish]
1
+ ---
2
+ name: mindforge:retrospective
3
+ description: Facilitate a structured retrospective with metrics and insights
4
+ argument-hint: [phase N|milestone M] [--template agile|4ls|starfish]
5
+ allowed-tools:
6
+ - view_file
7
+ - write_to_file
8
+ - list_dir
9
+ ---
3
10
 
4
- Facilitate a structured retrospective with objective metrics + qualitative insights.
11
+ <objective>
12
+ Guide the project team through a structured reflection session at the end of a phase or milestone, combining quantitative delivery data with qualitative feedback to drive process improvement.
13
+ </objective>
5
14
 
6
- ## Workflow
7
- 1. Gather quantitative signals (tasks, verify pass rate, findings, UAT, approvals).
8
- 2. Run structured discussion by template.
9
- 3. Write retrospective artifact in `.planning/phases/...` or `.planning/milestones/...`.
10
- 4. Create follow-up tasks/tickets for action items.
11
- 5. Update metrics with retrospective-completed event.
15
+ <execution_context>
16
+ .claude/commands/mindforge/retrospective.md
17
+ </execution_context>
12
18
 
13
- ## Step 5 — Apply learnings to MINDFORGE.md
14
- Ask explicitly:
15
- `Based on this retrospective, should we update MINDFORGE.md to improve future phases?`
19
+ <context>
20
+ Target: Specified Phase or Milestone.
21
+ Data: Task stats, pass rates, UAT results, security findings.
22
+ Knowledge: MINDFORGE.md (for potential config updates).
23
+ </objective>
16
24
 
17
- If yes:
18
- - propose exact config changes
19
- - apply only after confirmation
20
- - commit with clear rationale
21
-
22
- Common mappings:
23
- - vague plans -> lower discuss threshold / enable auto-discuss
24
- - low verify pass rate -> lower max tasks per phase
25
- - rising security findings -> force-load `security-review,data-privacy`
26
- - frequent compaction pressure -> lower compaction threshold
25
+ <process>
26
+ 1. **Signal Gathering**: Collect quantitative performance data for the target period.
27
+ 2. **Facilitate Discussion**: Run the interview based on the selected template (Agile, 4Ls, etc.).
28
+ 3. **Document**: Write the retrospective artifact in the phase or milestone directory.
29
+ 4. **Action Items**: Create follow-up tasks for process improvements.
30
+ 5. **Config Update**: Prompt the user to update `MINDFORGE.md` based on learnings (e.g., adjusting task limits).
31
+ 6. **Log**: Record `retrospective_completed` in metrics.
32
+ </process>
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: mindforge:review-backlog
3
+ description: Review and promote backlog items to the active phase sequence
4
+ argument-hint: [optional filters]
5
+ allowed-tools:
6
+ - view_file
7
+ - write_to_file
8
+ - replace_file_content
9
+ - multi_replace_file_content
10
+ ---
11
+
12
+ <objective>
13
+ Review items currently parked in the ROADMAP.md backlog and facilitate their promotion to the active development plan.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/review-backlog.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Target File: ROADMAP.md, STATE.md
22
+ State: Resolves the next available phase number from STATE.md for promotion.
23
+ </context>
24
+
25
+ <process>
26
+ 1. **Read ROADMAP.md**: Extract all items under the `## Backlog` section (999.x).
27
+ 2. **Present to User**: List the backlog items and ask which one(s) should be promoted.
28
+ 3. **Determine Promotion Slot**: Read STATE.md to find the next sequential phase number.
29
+ 4. **Promote Item**:
30
+ - Move the item from the backlog to the active milestone list.
31
+ - Renumber the item to the next available phase number.
32
+ 5. **Update STATE.md**: Add the new phase to STATE.md in `unplanned` or `planned` status as appropriate.
33
+ 6. **Confirm**: Summarize the promotion to the user.
34
+ </process>
@@ -1,157 +1,37 @@
1
- # MindForge — Review Command
2
- # Usage: /mindforge:review [path|phase N|--staged|--last-commit]
3
- # Performs a comprehensive code review using code-quality and security skills.
4
-
5
- ## Review targets
6
- - `/mindforge:review` (no args) → review all uncommitted changes (`git diff`)
7
- - `/mindforge:review --staged` → review staged changes (`git diff --cached`)
8
- - `/mindforge:review --last-commit` → review the last commit (`git diff HEAD~1`)
9
- - `/mindforge:review phase [N]` → review all commits in phase N
10
- - `/mindforge:review [file-path]` → review a specific file
11
- - `/mindforge:review [dir-path]` → review all files in a directory
12
-
13
- ## Step 1 Establish review scope
14
-
15
- Based on the target argument, build the file list to review:
16
- ```bash
17
- # Uncommitted changes
18
- git diff --name-only
19
-
20
- # Staged changes
21
- git diff --cached --name-only
22
-
23
- # Last commit
24
- git diff HEAD~1 --name-only
25
-
26
- # Phase N (all commits between phase start and phase end tags)
27
- git log --oneline --name-only [phase-start-sha]..[phase-end-sha]
28
- ```
29
-
30
- Display the file list to the user before reviewing:
31
- "Reviewing [N] files: [list]"
32
-
33
- ## Step 2 Load review personas and skills
34
-
35
- Activate TWO personas simultaneously for a comprehensive review:
36
-
37
- **Primary:** `code-quality.md` — structural quality, conventions, complexity
38
- **Secondary:** `security-reviewer.md` — security issues, data exposure, auth
39
-
40
- Load these skills:
41
- - `code-quality/SKILL.md` — always
42
- - `security-review/SKILL.md` — always
43
- - Contextual skills based on file types detected in the diff:
44
- - `.ts`/`.tsx` → also load `api-design/SKILL.md` (if routes present)
45
- - Database migration files → also load `database-patterns/SKILL.md`
46
- - UI component files → also load `accessibility/SKILL.md`
47
-
48
- ## Step 3 — Review each file
49
-
50
- For each file in the review scope:
51
-
52
- **Read the full file content** (not just the diff — context matters).
53
- **Read the diff for this file** to understand what changed.
54
-
55
- Apply ALL of the following checks:
56
-
57
- ### Code quality checks
58
- - [ ] Functions within length limits (CONVENTIONS.md standard)
59
- - [ ] Cyclomatic complexity ≤ 10 (count if/else/switch/catch/ternary branches)
60
- - [ ] No magic numbers (named constants used instead)
61
- - [ ] No commented-out code
62
- - [ ] No `TODO` or `FIXME` left uncommitted
63
- - [ ] Error handling is explicit (no empty catch blocks)
64
- - [ ] Naming is precise and unambiguous (no `data`, `info`, `temp`)
65
- - [ ] Every exported function has a JSDoc/docstring
66
- - [ ] DRY: no logic duplicated 3+ times
67
- - [ ] No dead code (imports/variables defined but never used)
68
-
69
- ### Convention checks (from CONVENTIONS.md)
70
- - [ ] File naming follows convention
71
- - [ ] Import order follows the defined order
72
- - [ ] All forbidden patterns are absent
73
- - [ ] Architecture boundaries respected (services don't import routes, etc.)
74
-
75
- ### Security checks (from security-review SKILL)
76
- - [ ] No hardcoded credentials or secrets
77
- - [ ] User input validated at boundaries
78
- - [ ] SQL queries parameterised
79
- - [ ] Sensitive data not in logs or error messages
80
- - [ ] New dependencies CVE-scanned
81
-
82
- ### Type safety (TypeScript projects)
83
- - [ ] No `any` types without justification comment
84
- - [ ] No `as unknown as X` casting without justification
85
- - [ ] All function parameters typed (no implicit any)
86
- - [ ] Return types explicitly declared on public functions
87
-
88
- ## Step 4 — Write the review report
89
-
90
- Create `.planning/phases/[current-phase]/CODE-REVIEW-[timestamp].md`
91
- or `.planning/quick/review-[timestamp].md` for ad-hoc reviews:
92
-
93
- ```markdown
94
- # Code Review Report
95
- **Date:** [ISO-8601]
96
- **Reviewer:** MindForge (code-quality + security-reviewer)
97
- **Scope:** [what was reviewed]
98
- **Files reviewed:** [N]
99
-
100
- ## Summary
101
- [2-3 sentences: overall quality, major themes, recommendation]
102
-
103
- ## Findings
104
-
105
- ### 🔴 Blocking (must fix before merge)
106
- | # | File | Line | Issue | Recommendation |
107
- |---|---|---|---|---|
108
- | 1 | src/auth/login.ts | 47 | Parameterised query not used | Use `db.query('SELECT * FROM users WHERE id = $1', [id])` |
109
-
110
- ### 🟠 Major (should fix in this PR)
111
- | # | File | Line | Issue | Recommendation |
112
- |---|---|---|---|---|
113
- | 1 | src/api/users.ts | 23 | Function is 67 lines (limit: 40) | Extract `validateUserInput` to separate function |
114
-
115
- ### 🟡 Minor (fix in follow-up)
116
- | # | File | Line | Issue | Recommendation |
117
- |---|---|---|---|---|
118
- | 1 | src/models/order.ts | 8 | Missing JSDoc on exported function | Add `@param`, `@returns`, `@throws` |
119
-
120
- ### 💡 Suggestions (optional improvements)
121
- | # | File | Line | Suggestion |
122
- |---|---|---|---|
123
- | 1 | src/services/email.ts | 15 | Consider memoising the template compilation |
124
-
125
- ## Metrics
126
- - Files reviewed: [N]
127
- - Lines reviewed: [N]
128
- - Blocking findings: [N]
129
- - Major findings: [N]
130
- - Minor findings: [N]
131
- - Suggestions: [N]
132
-
133
- ## Verdict
134
- ✅ APPROVED — No blocking or major findings
135
- ⚠️ APPROVED WITH CONDITIONS — Fix [N] major findings
136
- ❌ CHANGES REQUIRED — [N] blocking findings must be fixed
137
- ```
138
-
139
- ## Step 5 — Write AUDIT entry
140
-
141
- ```json
142
- {
143
- "event": "code_review_completed",
144
- "scope": "[what was reviewed]",
145
- "files_reviewed": [N],
146
- "blocking_findings": [N],
147
- "major_findings": [N],
148
- "verdict": "approved | changes_required",
149
- "report_path": ".planning/.../CODE-REVIEW-[timestamp].md"
150
- }
151
- ```
152
-
153
- ## Step 6 — Report to user
154
-
155
- Display a summary of findings.
156
- If blocking findings exist: do not allow merge.
157
- Tell the user: "Fix the [N] blocking issues, then run /mindforge:review again to re-check."
1
+ ---
2
+ name: mindforge:review
3
+ description: Perform a comprehensive code quality and security review
4
+ argument-hint: [path|phase N|--staged|--last-commit]
5
+ allowed-tools:
6
+ - run_command
7
+ - view_file
8
+ - write_to_file
9
+ - list_dir
10
+ ---
11
+
12
+ <objective>
13
+ Conduct a deep code review of a specified target (files, directories, phases, or git SHAs), focusing on structural quality, security vulnerabilities, and adherence to project conventions.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/review.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Target: Staged changes, last commit, specific phase, or path.
22
+ Personas: code-quality.md, security-reviewer.md
23
+ Skills: code-quality, security-review, accessibility (for UI), api-design (for routes), database-patterns (for migrations).
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Establish Scope**: Use `git diff` or `git log` to determine the list of files needing review.
28
+ 2. **Initialize Personas**: Load the appropriate reviewer personas and skills based on file types.
29
+ 3. **Audit Implementation**: For each file, read full content and check:
30
+ - Code quality (complexity, naming, error handling).
31
+ - Conventions (from CONVENTIONS.md).
32
+ - Security (secrets, validation, injection).
33
+ - Type safety (TS specifics).
34
+ 4. **Generate Report**: Write `CODE-REVIEW-[timestamp].md` with categorized findings (Blocking, Major, Minor, Suggestion) and an overall verdict.
35
+ 5. **Update State**: Log `code_review_completed` in `AUDIT.jsonl`.
36
+ 6. **Report**: Summarize findings to the user and block merge if "Blocking" issues exist.
37
+ </process>