mindforge-cc 2.0.0 → 2.1.1
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/add-backlog.md +32 -0
- package/.agent/mindforge/agent.md +31 -0
- package/.agent/mindforge/discuss-phase.md +1 -1
- package/.agent/mindforge/do.md +31 -0
- package/.agent/mindforge/help.md +1 -1
- package/.agent/mindforge/learn.md +3 -2
- package/.agent/mindforge/note.md +35 -0
- package/.agent/mindforge/plant-seed.md +31 -0
- package/.agent/mindforge/research.md +3 -2
- package/.agent/mindforge/review-backlog.md +34 -0
- package/.agent/mindforge/session-report.md +39 -0
- package/.agent/mindforge/steer.md +1 -1
- package/.agent/mindforge/ui-phase.md +34 -0
- package/.agent/mindforge/ui-review.md +36 -0
- package/.agent/mindforge/validate-phase.md +31 -0
- package/.agent/mindforge/workstreams.md +35 -0
- 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/.claude/commands/mindforge/add-backlog.md +32 -0
- package/.claude/commands/mindforge/agent.md +31 -0
- package/.claude/commands/mindforge/approve.md +27 -15
- package/.claude/commands/mindforge/audit.md +30 -26
- package/.claude/commands/mindforge/auto.md +29 -18
- package/.claude/commands/mindforge/benchmark.md +26 -29
- package/.claude/commands/mindforge/browse.md +24 -22
- package/.claude/commands/mindforge/complete-milestone.md +28 -14
- package/.claude/commands/mindforge/costs.md +26 -9
- package/.claude/commands/mindforge/cross-review.md +27 -13
- package/.claude/commands/mindforge/dashboard.md +35 -98
- package/.claude/commands/mindforge/debug.md +34 -126
- package/.claude/commands/mindforge/discuss-phase.md +36 -138
- package/.claude/commands/mindforge/do.md +31 -0
- package/.claude/commands/mindforge/execute-phase.md +37 -190
- package/.claude/commands/mindforge/health.md +27 -17
- package/.claude/commands/mindforge/help.md +25 -19
- package/.claude/commands/mindforge/init-org.md +37 -131
- package/.claude/commands/mindforge/init-project.md +40 -155
- package/.claude/commands/mindforge/install-skill.md +32 -15
- package/.claude/commands/mindforge/learn.md +36 -142
- package/.claude/commands/mindforge/map-codebase.md +36 -298
- package/.claude/commands/mindforge/marketplace.md +33 -120
- package/.claude/commands/mindforge/metrics.md +29 -18
- package/.claude/commands/mindforge/migrate.md +33 -40
- package/.claude/commands/mindforge/milestone.md +35 -12
- package/.claude/commands/mindforge/new-runtime.md +25 -15
- package/.claude/commands/mindforge/next.md +34 -105
- package/.claude/commands/mindforge/note.md +35 -0
- package/.claude/commands/mindforge/plan-phase.md +34 -125
- package/.claude/commands/mindforge/plant-seed.md +31 -0
- package/.claude/commands/mindforge/plugins.md +30 -36
- package/.claude/commands/mindforge/pr-review.md +32 -41
- package/.claude/commands/mindforge/profile-team.md +26 -19
- package/.claude/commands/mindforge/publish-skill.md +28 -17
- package/.claude/commands/mindforge/qa.md +27 -12
- package/.claude/commands/mindforge/quick.md +35 -135
- package/.claude/commands/mindforge/release.md +27 -8
- package/.claude/commands/mindforge/remember.md +25 -10
- package/.claude/commands/mindforge/research.md +27 -9
- package/.claude/commands/mindforge/retrospective.md +28 -22
- package/.claude/commands/mindforge/review-backlog.md +34 -0
- package/.claude/commands/mindforge/review.md +37 -157
- package/.claude/commands/mindforge/security-scan.md +34 -233
- package/.claude/commands/mindforge/session-report.md +39 -0
- package/.claude/commands/mindforge/ship.md +34 -100
- package/.claude/commands/mindforge/skills.md +36 -141
- package/.claude/commands/mindforge/status.md +30 -104
- package/.claude/commands/mindforge/steer.md +25 -10
- package/.claude/commands/mindforge/sync-confluence.md +28 -9
- package/.claude/commands/mindforge/sync-jira.md +32 -12
- package/.claude/commands/mindforge/tokens.md +25 -6
- package/.claude/commands/mindforge/ui-phase.md +34 -0
- package/.claude/commands/mindforge/ui-review.md +36 -0
- package/.claude/commands/mindforge/update.md +33 -42
- package/.claude/commands/mindforge/validate-phase.md +31 -0
- package/.claude/commands/mindforge/verify-phase.md +30 -62
- package/.claude/commands/mindforge/workspace.md +28 -25
- package/.claude/commands/mindforge/workstreams.md +35 -0
- package/.mindforge/memory/decision-library.jsonl +0 -0
- package/.mindforge/memory/knowledge-base.jsonl +7 -0
- package/.mindforge/memory/pattern-library.jsonl +1 -0
- package/.mindforge/memory/team-preferences.jsonl +4 -0
- package/.mindforge/personas/advisor-researcher.md +89 -0
- package/.mindforge/personas/analyst.md +112 -52
- package/.mindforge/personas/architect.md +100 -67
- package/.mindforge/personas/assumptions-analyzer-extend.md +87 -0
- package/.mindforge/personas/assumptions-analyzer.md +109 -0
- package/.mindforge/personas/codebase-mapper-extend.md +93 -0
- package/.mindforge/personas/codebase-mapper.md +770 -0
- package/.mindforge/personas/coverage-specialist.md +104 -0
- package/.mindforge/personas/debug-specialist.md +118 -52
- package/.mindforge/personas/debugger.md +97 -0
- package/.mindforge/personas/decision-architect.md +102 -0
- package/.mindforge/personas/developer.md +97 -85
- package/.mindforge/personas/executor.md +88 -0
- package/.mindforge/personas/integration-checker.md +92 -0
- package/.mindforge/personas/nyquist-auditor.md +84 -0
- package/.mindforge/personas/phase-researcher.md +107 -0
- package/.mindforge/personas/plan-checker.md +92 -0
- package/.mindforge/personas/planner.md +105 -0
- package/.mindforge/personas/project-researcher.md +99 -0
- package/.mindforge/personas/qa-engineer.md +113 -61
- package/.mindforge/personas/release-manager.md +102 -64
- package/.mindforge/personas/research-agent.md +109 -24
- package/.mindforge/personas/research-synthesizer.md +101 -0
- package/.mindforge/personas/roadmapper-extend.md +100 -0
- package/.mindforge/personas/roadmapper.md +103 -0
- package/.mindforge/personas/security-reviewer.md +114 -91
- package/.mindforge/personas/tech-writer.md +118 -51
- package/.mindforge/personas/ui-auditor.md +94 -0
- package/.mindforge/personas/ui-checker.md +89 -0
- package/.mindforge/personas/ui-researcher.md +99 -0
- package/.mindforge/personas/user-profiler.md +93 -0
- package/.mindforge/personas/verifier.md +101 -0
- package/.planning/ROADMAP.md +10 -0
- package/.planning/browser-daemon.log +32 -0
- package/.planning/phases/01-migrate-gsd-to-mindforge/.gitkeep +0 -0
- package/CHANGELOG.md +41 -0
- package/MINDFORGE.md +2 -0
- package/README.md +40 -3
- package/bin/installer-core.js +3 -4
- package/docs/PERSONAS.md +611 -0
- package/docs/commands-reference.md +1 -0
- package/docs/{Context → context}/Master-Context.md +6 -13
- package/docs/references/checkpoints.md +778 -0
- package/docs/{reference → references}/commands.md +53 -43
- 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/skills-authoring-guide.md +1 -1
- 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/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/System/CONFIG.json +43 -0
- package/docs/templates/System/CONTEXT.md +352 -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/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/user-guide.md +1 -1
- package/package.json +7 -2
- /package/docs/{reference → references}/audit-events.md +0 -0
- /package/docs/{reference → references}/config-reference.md +0 -0
- /package/docs/{reference → references}/sdk-api.md +0 -0
- /package/docs/{reference → references}/skills-api.md +0 -0
|
@@ -1,157 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
git log
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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>
|
|
@@ -1,233 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- Scan for: missing auth middleware, direct object references, path traversal
|
|
36
|
-
- Patterns to flag:
|
|
37
|
-
```
|
|
38
|
-
req.params.userId # Direct user ID from request — verify ownership check
|
|
39
|
-
fs.readFile(userInput) # Path traversal risk
|
|
40
|
-
WHERE id = ${id} # Direct injection without parameterisation
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### A02 — Cryptographic Failures
|
|
44
|
-
- Scan for: weak algorithms, insecure transport, unencrypted sensitive data
|
|
45
|
-
- Patterns to flag:
|
|
46
|
-
```
|
|
47
|
-
md5(, sha1(, sha256(password # Weak password hashing
|
|
48
|
-
http:// # Non-HTTPS URLs in API calls
|
|
49
|
-
Math.random() # Cryptographically insecure random
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### A03 — Injection
|
|
53
|
-
- Scan for: SQL, NoSQL, OS, LDAP injection
|
|
54
|
-
- Patterns to flag:
|
|
55
|
-
```
|
|
56
|
-
`SELECT * FROM users WHERE email = '${ # SQL injection
|
|
57
|
-
exec(, execSync(, child_process # OS command injection
|
|
58
|
-
eval(userInput # Code injection
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### A04 — Insecure Design
|
|
62
|
-
- Scan for: missing rate limiting, no input validation, trust boundary issues
|
|
63
|
-
- Patterns to flag: endpoints without validation middleware, no rate limit decorators
|
|
64
|
-
|
|
65
|
-
### A05 — Security Misconfiguration
|
|
66
|
-
- Scan for: debug mode in production, default credentials, verbose errors
|
|
67
|
-
- Patterns to flag:
|
|
68
|
-
```
|
|
69
|
-
console.error(err) # Exposes stack traces to clients
|
|
70
|
-
NODE_ENV !== 'production' # Debug code paths
|
|
71
|
-
ALLOW_ALL, *, cors({origin: '*'}) # Overly permissive CORS
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### A06 — Vulnerable Components
|
|
75
|
-
- Run: `npm audit --audit-level=moderate` or `pip-audit`
|
|
76
|
-
- Flag any HIGH or CRITICAL CVEs
|
|
77
|
-
|
|
78
|
-
### A07 — Authentication Failures
|
|
79
|
-
- Scan for: missing password complexity, no brute force protection, weak sessions
|
|
80
|
-
- Patterns to flag:
|
|
81
|
-
```
|
|
82
|
-
bcrypt.hashSync(pass, 1) # Cost factor too low
|
|
83
|
-
jwt.verify(token, '', { # Empty secret
|
|
84
|
-
session.destroy( # Verify redirect after destroy
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### A08 — Software and Data Integrity Failures
|
|
88
|
-
- Check: no package-lock.json means no integrity guarantee
|
|
89
|
-
- Check: any `curl | sh` or `wget | bash` patterns
|
|
90
|
-
|
|
91
|
-
### A09 — Security Logging Failures
|
|
92
|
-
- Scan for: no logging on auth failures, admin actions not logged, PII in logs
|
|
93
|
-
- Patterns to flag:
|
|
94
|
-
```
|
|
95
|
-
user.email in any log statement
|
|
96
|
-
password in any log statement
|
|
97
|
-
catch(e) {} # Silent failure = no security log
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### A10 — SSRF
|
|
101
|
-
- Scan for: server-side requests to user-controlled URLs
|
|
102
|
-
- Patterns to flag:
|
|
103
|
-
```
|
|
104
|
-
fetch(req., axios.get(req., axios.post(req., http.get(req.,
|
|
105
|
-
req.body.url, req.params.url, req.query.url, req.headers
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Step 4 — Secret detection (--secrets or always as part of default scan)
|
|
109
|
-
|
|
110
|
-
Pattern-based scan across all files in scope:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# High confidence patterns (always flag as CRITICAL)
|
|
114
|
-
grep -rn -E "(sk-[a-zA-Z0-9]{20,}|AKIA[A-Z0-9]{16}|ghp_[a-zA-Z0-9]{36})" .
|
|
115
|
-
|
|
116
|
-
# Credential assignment patterns (flag as HIGH)
|
|
117
|
-
grep -rn -E "(password|passwd|secret|api_key|apikey|access_token)\s*=\s*['\"][^'\"]{8,}" .
|
|
118
|
-
|
|
119
|
-
# Azure connection strings
|
|
120
|
-
grep -rn -E "DefaultEndpointsProtocol=https;AccountName=" .
|
|
121
|
-
|
|
122
|
-
# GCP service account keys
|
|
123
|
-
grep -rn -E "\"type\"\\s*:\\s*\"service_account\"" .
|
|
124
|
-
|
|
125
|
-
# PEM/Certificate content
|
|
126
|
-
grep -rn "-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----" .
|
|
127
|
-
|
|
128
|
-
# Database URLs with credentials
|
|
129
|
-
grep -rn -E "postgres://[^:]+:[^@]+@|mysql://[^:]+:[^@]+@" .
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Report each finding with:
|
|
133
|
-
- File and line number
|
|
134
|
-
- The matched pattern (redact the actual secret value: show first 4 chars + ***)
|
|
135
|
-
- Severity: CRITICAL if a real credential pattern, HIGH if credential-shaped pattern
|
|
136
|
-
Redaction applies to both console output and the report file.
|
|
137
|
-
|
|
138
|
-
## Step 5 — Dependency audit (--deps flag)
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
# Node.js projects
|
|
142
|
-
npm audit --json 2>/dev/null | node -e "
|
|
143
|
-
const data = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf8'));
|
|
144
|
-
const vulns = data.vulnerabilities || {};
|
|
145
|
-
Object.entries(vulns).forEach(([name, v]) => {
|
|
146
|
-
if (['high','critical'].includes(v.severity)) {
|
|
147
|
-
console.log(v.severity.toUpperCase() + ': ' + name + ' — ' + v.via[0]?.title);
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
# Python projects
|
|
153
|
-
pip-audit --format json 2>/dev/null
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Step 6 — Write security scan report
|
|
157
|
-
|
|
158
|
-
`.planning/SECURITY-SCAN-[timestamp].md`:
|
|
159
|
-
|
|
160
|
-
```markdown
|
|
161
|
-
# Security Scan Report
|
|
162
|
-
**Date:** [ISO-8601]
|
|
163
|
-
**Scope:** [what was scanned]
|
|
164
|
-
**Scanner:** MindForge Security Reviewer
|
|
165
|
-
|
|
166
|
-
## Executive Summary
|
|
167
|
-
[1-2 sentences: overall security posture, number of findings by severity]
|
|
168
|
-
|
|
169
|
-
## Critical Findings (fix immediately — block all merges)
|
|
170
|
-
[OWASP category] | [File:Line] | [Description] | [Remediation]
|
|
171
|
-
|
|
172
|
-
## High Findings (fix before next release)
|
|
173
|
-
...
|
|
174
|
-
|
|
175
|
-
## Medium Findings (fix in next sprint)
|
|
176
|
-
...
|
|
177
|
-
|
|
178
|
-
## Low Findings (backlog)
|
|
179
|
-
...
|
|
180
|
-
|
|
181
|
-
## Dependency Audit
|
|
182
|
-
| Package | Version | Severity | CVE | Fixed in |
|
|
183
|
-
|---|---|---|---|---|
|
|
184
|
-
|
|
185
|
-
## Secret Detection
|
|
186
|
-
| File | Pattern | Severity | Action |
|
|
187
|
-
|---|---|---|---|
|
|
188
|
-
|
|
189
|
-
## Verdict
|
|
190
|
-
✅ CLEAN — No critical or high findings
|
|
191
|
-
⚠️ ISSUES — [N] critical, [N] high findings require attention
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Important: scan report visibility
|
|
195
|
-
|
|
196
|
-
Security scan reports are written to `.planning/SECURITY-SCAN-[timestamp].md`.
|
|
197
|
-
|
|
198
|
-
**Private repository:** Keep reports committed — they are valuable for audit
|
|
199
|
-
history and team security review.
|
|
200
|
-
|
|
201
|
-
**Public repository:** Add `.planning/SECURITY-SCAN-*.md` to `.gitignore`
|
|
202
|
-
to avoid exposing vulnerability information to potential attackers.
|
|
203
|
-
|
|
204
|
-
MindForge does not make this decision for you — configure `.gitignore`
|
|
205
|
-
based on your repository's visibility.
|
|
206
|
-
|
|
207
|
-
## Step 7 — Write AUDIT entry
|
|
208
|
-
|
|
209
|
-
```json
|
|
210
|
-
{
|
|
211
|
-
"event": "security_scan_completed",
|
|
212
|
-
"scope": "[path or 'staged changes']",
|
|
213
|
-
"flags": ["--deps", "--secrets"],
|
|
214
|
-
"critical_findings": [N],
|
|
215
|
-
"high_findings": [N],
|
|
216
|
-
"secrets_detected": [N],
|
|
217
|
-
"vulnerable_deps": [N],
|
|
218
|
-
"report_path": ".planning/SECURITY-SCAN-[timestamp].md"
|
|
219
|
-
}
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
## Automatic blocking behaviour
|
|
223
|
-
If CRITICAL findings are detected: print a prominent warning:
|
|
224
|
-
```
|
|
225
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
226
|
-
🔴 CRITICAL SECURITY FINDINGS DETECTED
|
|
227
|
-
|
|
228
|
-
[N] critical issues must be fixed before any code is merged.
|
|
229
|
-
See: .planning/SECURITY-SCAN-[timestamp].md
|
|
230
|
-
|
|
231
|
-
Do NOT commit or deploy until these are resolved.
|
|
232
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
233
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: mindforge:security-scan
|
|
3
|
+
description: Perform a standalone security scan for OWASP Top 10 vulnerabilities and leaked secrets
|
|
4
|
+
argument-hint: [path] [--deep] [--deps] [--secrets]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- run_command
|
|
7
|
+
- view_file
|
|
8
|
+
- write_to_file
|
|
9
|
+
- list_dir
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Execute a rigorous security audit of the codebase, scanning for OWASP vulnerabilities, hardcoded secrets, and vulnerable dependencies to ensure production readiness and compliance.
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<execution_context>
|
|
17
|
+
.claude/commands/mindforge/security-scan.md
|
|
18
|
+
</execution_context>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
Mode: Runs entirely under the `security-reviewer.md` persona.
|
|
22
|
+
Flags: --deep (all files), --deps (CVE scan), --secrets (fast secret detection).
|
|
23
|
+
Output: .planning/SECURITY-SCAN-[timestamp].md
|
|
24
|
+
</context>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
1. **Build Scope**: Determine target files using `git diff` or `find` based on flags.
|
|
28
|
+
2. **Top 10 Scan**: Audit for Access Control, Crypto failures, Injection, Insecure Design, etc.
|
|
29
|
+
3. **Secret Detection**: Run pattern-based grep for high-confidence strings (API keys, connection strings, private keys). Redact values in output.
|
|
30
|
+
4. **Dependency Audit**: If `--deps` is set, run `npm audit` or `pip-audit` and parse JSON for HIGH/CRITICAL CVEs.
|
|
31
|
+
5. **Generate Report**: Write `SECURITY-SCAN-[timestamp].md` with categorized findings and a final verdict (CLEAN/ISSUES).
|
|
32
|
+
6. **Alert**: If CRITICAL findings exist, block merging and display a prominent warning.
|
|
33
|
+
7. **Audit**: Log `security_scan_completed` event.
|
|
34
|
+
</process>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mindforge:session-report
|
|
3
|
+
description: Generate a post-session summary document capturing work performed and resource usage
|
|
4
|
+
argument-hint: none
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- run_command
|
|
7
|
+
- view_file
|
|
8
|
+
- write_to_file
|
|
9
|
+
- list_dir
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Generate a comprehensive summary of an active coding session, providing a clear trail of work for stakeholders and a diagnostic record of resource usage (tokens, time, etc.).
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<execution_context>
|
|
17
|
+
.claude/commands/mindforge/session-report.md
|
|
18
|
+
</execution_context>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
Storage: .planning/reports/
|
|
22
|
+
Data sources: Git logs, terminal history, `STATE.md`, and session memory.
|
|
23
|
+
</context>
|
|
24
|
+
|
|
25
|
+
<process>
|
|
26
|
+
1. **Gather Data**:
|
|
27
|
+
- Get recent git commits and diff summaries.
|
|
28
|
+
- Read the current `STATE.md` for phase/plan status updates.
|
|
29
|
+
- Extract key decisions or findings from the session.
|
|
30
|
+
2. **Profile Resources**:
|
|
31
|
+
- Estimate token usage if possible.
|
|
32
|
+
- Calculate session duration.
|
|
33
|
+
3. **Draft Report**: Create `SESSION_REPORT_[timestamp].md` containing:
|
|
34
|
+
- Summary of Work Performed
|
|
35
|
+
- Outcomes achieved (Plans "completed")
|
|
36
|
+
- Key Decisions
|
|
37
|
+
- Resource Usage Profile
|
|
38
|
+
4. **Confirm**: Notify the user and provide a link to the report.
|
|
39
|
+
</process>
|
|
@@ -1,100 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# Linting
|
|
37
|
-
npx eslint . --ext .ts,.tsx --max-warnings 0
|
|
38
|
-
|
|
39
|
-
# Tests
|
|
40
|
-
npm test
|
|
41
|
-
|
|
42
|
-
# Security scan (if npm project)
|
|
43
|
-
npm audit --audit-level=high
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
If any gate fails: stop. Report the failures. Do not proceed to PR creation.
|
|
47
|
-
|
|
48
|
-
## Step 3 — Create PR description
|
|
49
|
-
Generate a complete PR description:
|
|
50
|
-
|
|
51
|
-
```markdown
|
|
52
|
-
## MindForge Phase [N] — [Phase description]
|
|
53
|
-
|
|
54
|
-
### Summary
|
|
55
|
-
[2-3 sentences describing what this phase delivered]
|
|
56
|
-
|
|
57
|
-
### Changes
|
|
58
|
-
[Bullet list of major changes from SUMMARY files]
|
|
59
|
-
|
|
60
|
-
### Requirements delivered
|
|
61
|
-
| FR ID | Description | Verified |
|
|
62
|
-
|-------|------------------------------|----------|
|
|
63
|
-
| FR-01 | ... | ✅ |
|
|
64
|
-
|
|
65
|
-
### Testing
|
|
66
|
-
- Unit tests: [pass/fail + coverage %]
|
|
67
|
-
- Integration tests: [pass/fail]
|
|
68
|
-
- UAT: Completed and signed off (see UAT.md)
|
|
69
|
-
|
|
70
|
-
### Security
|
|
71
|
-
- [ ] Security review completed (see SECURITY-REVIEW-N.md)
|
|
72
|
-
- [ ] No hardcoded secrets in diff
|
|
73
|
-
- [ ] All dependencies scanned for CVEs
|
|
74
|
-
|
|
75
|
-
### Checklist
|
|
76
|
-
- [x] CHANGELOG.md updated
|
|
77
|
-
- [x] All tests pass
|
|
78
|
-
- [x] No linter errors
|
|
79
|
-
- [x] UAT signed off
|
|
80
|
-
- [ ] Reviewed by: [assign]
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Step 4 — Commit and tag
|
|
84
|
-
```bash
|
|
85
|
-
git add CHANGELOG.md
|
|
86
|
-
git commit -m "docs(changelog): add Phase [N] release notes"
|
|
87
|
-
git push origin feat/mindforge-core-scaffold
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Tell the user the PR description and instruct them to open the PR manually
|
|
91
|
-
(or provide the `gh pr create` command if GitHub CLI is available).
|
|
92
|
-
|
|
93
|
-
Tell the user:
|
|
94
|
-
"✅ Phase [N] ready to ship.
|
|
95
|
-
PR description generated above.
|
|
96
|
-
Open your PR, assign reviewers, and merge when approved."
|
|
97
|
-
|
|
98
|
-
## Step 5 — Update state
|
|
99
|
-
Update STATE.md to mark Phase [N] as shipped.
|
|
100
|
-
Update HANDOFF.json with next phase number.
|
|
1
|
+
---
|
|
2
|
+
name: mindforge:ship
|
|
3
|
+
description: Create a release PR for a verified phase
|
|
4
|
+
argument-hint: [N]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- run_command
|
|
7
|
+
- list_dir
|
|
8
|
+
- view_file
|
|
9
|
+
- write_to_file
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Coordinate the final transition of a phase from "Verified" to "Released" by generating changelogs, running final quality gates, and prepping the pull request for merge.
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<execution_context>
|
|
17
|
+
.claude/commands/mindforge/ship.md
|
|
18
|
+
</execution_context>
|
|
19
|
+
|
|
20
|
+
<context>
|
|
21
|
+
Prerequisite: `UAT.md` must be marked as "All passed ✅".
|
|
22
|
+
Gates: Type checking, linting, full test suite, security audit.
|
|
23
|
+
Format: Follows "Keep a Changelog" and structured PR templates.
|
|
24
|
+
</context>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
1. **Pre-check**: Abort if the phase N has not completed UAT or has blocking findings.
|
|
28
|
+
2. **Changelog Generation**: Sync SUMMARY files and REQUIREMENTS.md into a new `CHANGELOG.md` entry.
|
|
29
|
+
3. **Execution Oversight**: Run final gates (tsc, eslint, npm test, npm audit) and report results.
|
|
30
|
+
4. **Draft PR**: Generate a comprehensive PR description including delivered requirements and testing stats.
|
|
31
|
+
5. **Commit & Tag**: Commit the changelog changes and push the branch.
|
|
32
|
+
6. **State Transition**: Mark Phase [N] as shipped in `STATE.md` and increment the next target phase in `HANDOFF.json`.
|
|
33
|
+
7. **Audit**: Log `phase_shipped` with delivered requirement IDs.
|
|
34
|
+
</process>
|