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,233 +1,34 @@
1
- # MindForge — Security Scan Command
2
- # Usage: /mindforge:security-scan [path] [--deep] [--deps] [--secrets]
3
- # Standalone security scan. Can be run independently of the phase lifecycle.
4
-
5
- ## Scan modes
6
- - Default: OWASP Top 10 review on the changed files or specified path
7
- - `--deep`: Extended scan including all files, not just changed
8
- - `--deps`: Dependency audit (CVE scan of package.json / requirements.txt)
9
- - `--secrets`: Secret detection scan only (fast, suitable for pre-commit hook)
10
- - Flags composable: `--deps --secrets` runs both dependency audit and secret detection
11
-
12
- ## Step 1 — Activate Security Reviewer persona
13
-
14
- Load `security-reviewer.md` persona immediately and completely.
15
- This command runs entirely in security mode. Do not switch personas.
16
-
17
- ## Step 2 — Build scan scope
18
-
19
- ```bash
20
- # Default: staged + unstaged changes
21
- git diff HEAD --name-only
22
-
23
- # With path argument
24
- find [path] -name "*.ts" -o -name "*.js" -o -name "*.py"
25
-
26
- # --deep: all source files
27
- find src/ -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" \)
28
- ```
29
-
30
- ## Step 3 OWASP Top 10 scan (always runs unless --secrets only)
31
-
32
- For each file in scope, check all 10 OWASP categories:
33
-
34
- ### A01 — Broken Access Control
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
- Create a release PR for a verified phase. Usage: /mindforge:ship [N]
2
-
3
- ## Pre-check
4
- Read UAT.md for phase N. If status is not "All passed ✅": stop.
5
- Tell the user: "Phase [N] has not been fully verified. Run /mindforge:verify-phase [N] first."
6
-
7
- ## Step 1 — Generate changelog entry
8
- Read all SUMMARY files for phase N.
9
- Read REQUIREMENTS.md for phase N items.
10
- Generate a CHANGELOG.md entry following Keep a Changelog format:
11
-
12
- ```markdown
13
- ## [Unreleased] Phase [N]: [Phase description]
14
-
15
- ### Added
16
- - [New feature from this phase]
17
-
18
- ### Changed
19
- - [Changed behaviour]
20
-
21
- ### Fixed
22
- - [Bug fixes]
23
-
24
- ### Security
25
- - [Security improvements]
26
- ```
27
-
28
- Prepend this to CHANGELOG.md.
29
-
30
- ## Step 2 Run final quality gates
31
- Run all of the following and report results:
32
- ```bash
33
- # Type checking
34
- npx tsc --noEmit
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>
@@ -1,141 +1,36 @@
1
- # MindForge — Skills Command
2
- # Usage: /mindforge:skills [subcommand] [args]
3
- # Subcommands: list | add | update | validate | info | search
4
-
5
- ## Subcommand: list
6
- `/mindforge:skills list`
7
-
8
- Read MANIFEST.md. Display all registered skills in a formatted table
9
- (include path for each skill):
10
-
11
- ```
12
- MindForge Skills Registry
13
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14
-
15
- Tier 1 — Core Skills (10 installed)
16
- ────────────────────────────────────────────────────────────
17
- ✅ security-review v1.0.0 stable .mindforge/skills/security-review/SKILL.md
18
- ✅ code-quality v1.0.0 stable .mindforge/skills/code-quality/SKILL.md
19
- ✅ api-design v1.0.0 stable .mindforge/skills/api-design/SKILL.md
20
- ✅ testing-standards v1.0.0 stable .mindforge/skills/testing-standards/SKILL.md
21
- ✅ documentation v1.0.0 stable .mindforge/skills/documentation/SKILL.md
22
- ✅ performance v1.0.0 stable .mindforge/skills/performance/SKILL.md
23
- accessibility v1.0.0 stable .mindforge/skills/accessibility/SKILL.md
24
- ✅ data-privacy v1.0.0 stable .mindforge/skills/data-privacy/SKILL.md
25
- ✅ incident-response v1.0.0 stable .mindforge/skills/incident-response/SKILL.md
26
- ✅ database-patterns v1.0.0 stable .mindforge/skills/database-patterns/SKILL.md
27
-
28
- Tier 2 Org Skills (0 installed)
29
- ────────────────────────────────────────────────────────────
30
- (none run /mindforge:skills add to add org skills)
31
-
32
- Tier 3 Project Skills (0 installed)
33
- ────────────────────────────────────────────────────────────
34
- (none)
35
-
36
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
37
- Total: 10 skills | Run /mindforge:skills validate to check health
38
- ```
39
-
40
- ## Subcommand: info
41
- `/mindforge:skills info [skill-name]`
42
-
43
- Display detailed information about a specific skill:
44
-
45
- ```
46
- Skill: security-review
47
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
48
- Version : 1.0.0
49
- Status : stable
50
- Tier : 1 (Core)
51
- Min MindForge: 0.1.0
52
- Path : .mindforge/skills/security-review/SKILL.md
53
-
54
- Triggers (25):
55
- auth, authentication, authorisation, authorization, login,
56
- logout, password, token, JWT, session, cookie, OAuth,
57
- payment, billing, stripe, PII, GDPR, personal data,
58
- upload, file upload, credentials, API key, secret, env,
59
- environment variable, encryption, hashing, bcrypt, argon2
60
-
61
- Changelog:
62
- 1.0.0 — Initial stable release
63
- ```
64
-
65
- ## Subcommand: search
66
- `/mindforge:skills search [keyword]`
67
-
68
- Find which skills would activate for a given keyword:
69
-
70
- ```
71
- /mindforge:skills search "database query"
72
-
73
- Matching skills for "database query":
74
- ────────────────────────────────────────────────────────────
75
- database-patterns v1.0.0 [tier 1] trigger: "database", "query"
76
- performance v1.0.0 [tier 1] trigger: "query time"
77
-
78
- These 2 skills would be automatically loaded for a task
79
- containing "database query" in its description.
80
- ```
81
-
82
- ## Subcommand: validate
83
- `/mindforge:skills validate`
84
-
85
- Run a health check on all installed skills:
86
-
87
- ```
88
- Validating skills...
89
-
90
- ✅ security-review — frontmatter valid, file readable, triggers: 29
91
- ✅ code-quality — frontmatter valid, file readable, triggers: 14
92
- ✅ performance — frontmatter valid, file readable, triggers: 31
93
- ⚠️ [org-skill-name] — frontmatter valid but missing 'version' field
94
- ❌ [missing-skill] — listed in MANIFEST.md but file not found
95
-
96
- Issues found: 2
97
- Run /mindforge:skills add to fix missing skills.
98
- Fix frontmatter issues manually in the SKILL.md file.
99
- ```
100
-
101
- Validation checks:
102
- 1. Every manifest entry has a corresponding SKILL.md file
103
- 2. Every SKILL.md has: `name`, `version`, `status`, `triggers` in frontmatter
104
- 3. Every SKILL.md has a self-check or checklist section
105
- 4. All versions are valid semver strings
106
- 5. No two skills at the same tier share the same trigger keyword (flag as ⚠️)
107
- 6. Every skill file is readable (not empty, not corrupted)
108
-
109
- ## Subcommand: add
110
- `/mindforge:skills add [path-to-skill-dir]`
111
-
112
- Register a new skill in the manifest:
113
-
114
- 1. Read the SKILL.md in the provided path
115
- 2. Validate the frontmatter (all required fields present)
116
- 3. Check for trigger keyword conflicts with existing skills
117
- 4. Ask the user: "Which tier should this skill be registered as? (2=Org / 3=Project)"
118
- 5. Show the exact MANIFEST.md entry that will be written and ask for confirmation
119
- 6. Add the entry to MANIFEST.md in the correct section
120
- 7. Run `/mindforge:skills validate` to confirm registration is clean
121
- 8. Commit: `feat(skills): register [skill-name] v[version] as tier [N] skill`
122
-
123
- ## Subcommand: update
124
- `/mindforge:skills update [skill-name]`
125
-
126
- Update a skill to a newer version:
127
-
128
- 1. Read current version from MANIFEST.md
129
- 2. Check the skill's changelog in SKILL.md for available updates
130
- 3. If MAJOR version change: show breaking changes, require confirmation
131
- 4. If MINOR or PATCH: update automatically
132
- 5. Update MANIFEST.md version entry
133
- 6. Run `/mindforge:skills validate` after update
134
- 7. Run `node tests/skills-platform.test.js` after update
135
- 8. Commit: `chore(skills): update [name] v[old] → v[new]`
136
-
137
- ## Error handling
138
- - If MANIFEST.md does not exist: offer to create it with current skills
139
- - If a skill name is not found: suggest similar names (fuzzy match)
140
- - If validation finds critical errors: block any phase execution until fixed
141
- (A skills validation failure is a BLOCKING issue)
1
+ ---
2
+ name: mindforge:skills
3
+ description: Manage the MindForge skills registry and validation status
4
+ argument-hint: [list|info|search|validate|add|update] [skill-name]
5
+ allowed-tools:
6
+ - list_dir
7
+ - view_file
8
+ - write_to_file
9
+ - run_command
10
+ ---
11
+
12
+ <objective>
13
+ Provide a centralized interface for managing, searching, and validating the project's skill registry, ensuring all automated knowledge is current, conflict-free, and healthy.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/skills.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Manifest: MANIFEST.md
22
+ Structure: Organized by Tier 1 (Core), Tier 2 (Org), and Tier 3 (Project).
23
+ Validation: Checks semver, required fields, trigger conflicts, and file accessibility.
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Route Subcommand**:
28
+ - `list`: Render a formatted table of all registered skills and their active versions.
29
+ - `info`: Display detail for a specific skill (triggers, changelog, status).
30
+ - `search`: Show which skills would activate for a specific query.
31
+ - `validate`: Audit the full registry for broken paths, invalid frontmatter, or trigger overlaps.
32
+ - `add`: Register a new skill directory, prompting for tier and confirming the manifest entry.
33
+ - `update`: Handle version bumps, showing breaking changes for major updates.
34
+ 2. **Enforce Health**: If validation finds critical errors, block phase execution.
35
+ 3. **Commit**: Automatically commit manifest changes with structured messages.
36
+ </process>