mindforge-cc 6.2.0-alpha → 6.2.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 (110) hide show
  1. package/.agent/bin/lib/commands.cjs +4 -4
  2. package/.agent/bin/lib/state.cjs +1 -1
  3. package/.agent/bin/lib/verify.cjs +7 -7
  4. package/.agent/bin/mindforge-tools.cjs +1 -1
  5. package/.agent/hooks/mindforge-context-monitor.js +1 -1
  6. package/.agent/hooks/mindforge-session-init_extended.js +4 -4
  7. package/.agent/hooks/mindforge-workflow-guard.js +1 -1
  8. package/.agent/mindforge/debug.md +3 -0
  9. package/.agent/mindforge/execute-phase.md +6 -0
  10. package/.agent/mindforge/learning.md +20 -0
  11. package/.agent/mindforge/plan-phase.md +9 -7
  12. package/.agent/mindforge/record-learning.md +22 -0
  13. package/.agent/mindforge/retrospective.md +1 -0
  14. package/.agent/mindforge/ship.md +7 -0
  15. package/.claude/CLAUDE.md +16 -7
  16. package/.claude/commands/mindforge/approve.md +16 -24
  17. package/.claude/commands/mindforge/audit.md +28 -28
  18. package/.claude/commands/mindforge/auto.md +20 -27
  19. package/.claude/commands/mindforge/benchmark.md +31 -24
  20. package/.claude/commands/mindforge/browse.md +24 -22
  21. package/.claude/commands/mindforge/complete-milestone.md +16 -26
  22. package/.claude/commands/mindforge/costs.md +10 -23
  23. package/.claude/commands/mindforge/cross-review.md +15 -25
  24. package/.claude/commands/mindforge/dashboard.md +99 -32
  25. package/.claude/commands/mindforge/debug.md +130 -31
  26. package/.claude/commands/mindforge/discuss-phase.md +139 -33
  27. package/.claude/commands/mindforge/execute-phase.md +197 -34
  28. package/.claude/commands/mindforge/health.md +25 -25
  29. package/.claude/commands/mindforge/help.md +27 -23
  30. package/.claude/commands/mindforge/init-org.md +132 -34
  31. package/.claude/commands/mindforge/init-project.md +167 -37
  32. package/.claude/commands/mindforge/install-skill.md +24 -28
  33. package/.claude/commands/mindforge/learn.md +144 -33
  34. package/.claude/commands/mindforge/learning.md +20 -0
  35. package/.claude/commands/mindforge/map-codebase.md +299 -33
  36. package/.claude/commands/mindforge/marketplace.md +121 -30
  37. package/.claude/commands/mindforge/metrics.md +20 -27
  38. package/.claude/commands/mindforge/migrate.md +41 -30
  39. package/.claude/commands/mindforge/milestone.md +11 -30
  40. package/.claude/commands/mindforge/new-runtime.md +20 -26
  41. package/.claude/commands/mindforge/next.md +106 -31
  42. package/.claude/commands/mindforge/plan-phase.md +128 -31
  43. package/.claude/commands/mindforge/plugins.md +38 -28
  44. package/.claude/commands/mindforge/pr-review.md +42 -29
  45. package/.claude/commands/mindforge/profile-team.md +21 -24
  46. package/.claude/commands/mindforge/publish-skill.md +18 -25
  47. package/.claude/commands/mindforge/qa.md +14 -25
  48. package/.claude/commands/mindforge/quick.md +136 -32
  49. package/.claude/commands/mindforge/record-learning.md +22 -0
  50. package/.claude/commands/mindforge/release.md +9 -24
  51. package/.claude/commands/mindforge/remember.md +24 -23
  52. package/.claude/commands/mindforge/research.md +11 -24
  53. package/.claude/commands/mindforge/retrospective.md +25 -26
  54. package/.claude/commands/mindforge/review.md +158 -34
  55. package/.claude/commands/mindforge/security-scan.md +239 -31
  56. package/.claude/commands/mindforge/ship.md +108 -31
  57. package/.claude/commands/mindforge/skills.md +142 -33
  58. package/.claude/commands/mindforge/status.md +110 -27
  59. package/.claude/commands/mindforge/steer.md +11 -22
  60. package/.claude/commands/mindforge/sync-confluence.md +10 -25
  61. package/.claude/commands/mindforge/sync-jira.md +11 -27
  62. package/.claude/commands/mindforge/tokens.md +7 -22
  63. package/.claude/commands/mindforge/update.md +43 -30
  64. package/.claude/commands/mindforge/verify-phase.md +63 -27
  65. package/.claude/commands/mindforge/workspace.md +27 -26
  66. package/.mindforge/engine/shard-controller.md +1 -1
  67. package/CHANGELOG.md +34 -15
  68. package/README.md +93 -98
  69. package/RELEASENOTES.md +6 -6
  70. package/bin/autonomous/auto-runner.js +1 -1
  71. package/bin/autonomous/mesh-self-healer.js +2 -2
  72. package/bin/change-classifier.js +1 -1
  73. package/bin/dashboard/server.js +4 -4
  74. package/bin/dashboard/sse-bridge.js +1 -1
  75. package/bin/engine/learning-manager.js +181 -0
  76. package/bin/engine/sre-manager.js +1 -1
  77. package/bin/engine/temporal-cli.js +1 -1
  78. package/bin/engine/temporal-hindsight.js +4 -4
  79. package/bin/governance/approve.js +2 -2
  80. package/bin/governance/policy-engine.js +1 -1
  81. package/bin/governance/ztai-manager.js +1 -1
  82. package/bin/hindsight-injector.js +1 -1
  83. package/bin/installer-core.js +8 -0
  84. package/bin/memory/federated-sync.js +7 -7
  85. package/bin/mindforge-cli.js +9 -0
  86. package/bin/models/cloud-broker.js +1 -1
  87. package/bin/review/ads-engine.js +6 -6
  88. package/bin/skill-registry.js +4 -4
  89. package/bin/skills-builder/marketplace-client.js +2 -2
  90. package/bin/skills-builder/pattern-detector.js +2 -2
  91. package/bin/skills-builder/skill-generator.js +1 -1
  92. package/bin/skills-builder/skill-registrar.js +4 -4
  93. package/bin/skills-builder/skill-scorer.js +1 -1
  94. package/bin/skills-builder/source-loader.js +2 -2
  95. package/bin/wizard/theme.js +1 -1
  96. package/docs/CAPABILITIES-MANIFEST.md +2 -2
  97. package/docs/MIND-FORGE-REFERENCE-V6.md +3 -3
  98. package/docs/Templates/Project/AGENTS_LEARNING.md +88 -0
  99. package/docs/architecture/V4-SWARM-MESH.md +1 -1
  100. package/docs/architecture/V5-ENTERPRISE.md +1 -1
  101. package/docs/ci-cd.md +1 -1
  102. package/docs/commands-reference.md +106 -48
  103. package/docs/registry/COMMANDS.md +1 -1
  104. package/docs/registry/PERSONAS.md +1 -1
  105. package/docs/registry/README.md +1 -1
  106. package/docs/registry/SKILLS.md +1 -1
  107. package/docs/security/ZTAI-OVERVIEW.md +1 -1
  108. package/docs/user-guide.md +2 -2
  109. package/docs/workflow-atlas.md +1 -1
  110. package/package.json +1 -1
@@ -1,34 +1,242 @@
1
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
2
+ description: - Default: OWASP Top 10 review on the changed files or specified path
10
3
  ---
11
4
 
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>
5
+ # MindForge — Security Scan Command
6
+ # Usage: /mindforge:security-scan [path] [--deep] [--deps] [--secrets]
7
+ # Standalone security scan. Can be run independently of the phase lifecycle.
8
+
9
+ ## Scan modes
10
+ - Default: OWASP Top 10 review on the changed files or specified path
11
+ - `--deep`: Extended scan including all files, not just changed
12
+ - `--deps`: Dependency audit (CVE scan of package.json / requirements.txt)
13
+ - `--secrets`: Secret detection scan only (fast, suitable for pre-commit hook)
14
+ - Flags composable: `--deps --secrets` runs both dependency audit and secret detection
15
+
16
+ ## Step 1 — Activate Security Reviewer persona
17
+
18
+ Load `security-reviewer.md` persona immediately and completely.
19
+ This command runs entirely in security mode. Do not switch personas.
20
+
21
+ ## Step 1.5 Sovereign Integrity Check (v6.2.0-alpha)
22
+
23
+ Before scanning user code, verify the integrity of the MindForge Sovereign Engine:
24
+ 1. **Quantum Signature Verification**: Run `node bin/governance/quantum-crypto.js --verify .mindforge/engine/`.
25
+ 2. **Policy Integrity**: Ensure `bin/governance/policy-engine.js` has not been tampered with (check for illegal bypass additions).
26
+ 3. **Result**: If integrity check fails, mark the entire scan as **FAILED (CRITICAL)** and alert the user of a potential framework compromise.
27
+
28
+ ```bash
29
+ # Default: staged + unstaged changes
30
+ git diff HEAD --name-only
31
+
32
+ # With path argument
33
+ find [path] -name "*.ts" -o -name "*.js" -o -name "*.py"
34
+
35
+ # --deep: all source files
36
+ find src/ -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" \)
37
+ ```
38
+
39
+ ## Step 3 — OWASP Top 10 scan (always runs unless --secrets only)
40
+
41
+ For each file in scope, check all 10 OWASP categories:
42
+
43
+ ### A01 — Broken Access Control
44
+ - Scan for: missing auth middleware, direct object references, path traversal
45
+ - Patterns to flag:
46
+ ```
47
+ req.params.userId # Direct user ID from request — verify ownership check
48
+ fs.readFile(userInput) # Path traversal risk
49
+ WHERE id = ${id} # Direct injection without parameterisation
50
+ ```
51
+
52
+ ### A02 — Cryptographic Failures
53
+ - Scan for: weak algorithms, insecure transport, unencrypted sensitive data
54
+ - Patterns to flag:
55
+ ```
56
+ md5(, sha1(, sha256(password # Weak password hashing
57
+ http:// # Non-HTTPS URLs in API calls
58
+ Math.random() # Cryptographically insecure random
59
+ ```
60
+
61
+ ### A03 — Injection
62
+ - Scan for: SQL, NoSQL, OS, LDAP injection
63
+ - Patterns to flag:
64
+ ```
65
+ `SELECT * FROM users WHERE email = '${ # SQL injection
66
+ exec(, execSync(, child_process # OS command injection
67
+ eval(userInput # Code injection
68
+ ```
69
+
70
+ ### A04 — Insecure Design
71
+ - Scan for: missing rate limiting, no input validation, trust boundary issues
72
+ - Patterns to flag: endpoints without validation middleware, no rate limit decorators
73
+
74
+ ### A05 — Security Misconfiguration
75
+ - Scan for: debug mode in production, default credentials, verbose errors
76
+ - Patterns to flag:
77
+ ```
78
+ console.error(err) # Exposes stack traces to clients
79
+ NODE_ENV !== 'production' # Debug code paths
80
+ ALLOW_ALL, *, cors({origin: '*'}) # Overly permissive CORS
81
+ ```
82
+
83
+ ### A06 — Vulnerable Components
84
+ - Run: `npm audit --audit-level=moderate` or `pip-audit`
85
+ - Flag any HIGH or CRITICAL CVEs
86
+
87
+ ### A07 — Authentication Failures
88
+ - Scan for: missing password complexity, no brute force protection, weak sessions
89
+ - Patterns to flag:
90
+ ```
91
+ bcrypt.hashSync(pass, 1) # Cost factor too low
92
+ jwt.verify(token, '', { # Empty secret
93
+ session.destroy( # Verify redirect after destroy
94
+ ```
95
+
96
+ ### A08 — Software and Data Integrity Failures
97
+ - Check: no package-lock.json means no integrity guarantee
98
+ - Check: any `curl | sh` or `wget | bash` patterns
99
+
100
+ ### A09 — Security Logging Failures
101
+ - Scan for: no logging on auth failures, admin actions not logged, PII in logs
102
+ - Patterns to flag:
103
+ ```
104
+ user.email in any log statement
105
+ password in any log statement
106
+ catch(e) {} # Silent failure = no security log
107
+ ```
108
+
109
+ ### A10 — SSRF
110
+ - Scan for: server-side requests to user-controlled URLs
111
+ - Patterns to flag:
112
+ ```
113
+ fetch(req., axios.get(req., axios.post(req., http.get(req.,
114
+ req.body.url, req.params.url, req.query.url, req.headers
115
+ ```
116
+
117
+ ## Step 4 — Secret detection (--secrets or always as part of default scan)
118
+
119
+ Pattern-based scan across all files in scope:
120
+
121
+ ```bash
122
+ # High confidence patterns (always flag as CRITICAL)
123
+ grep -rn -E "(sk-[a-zA-Z0-9]{20,}|AKIA[A-Z0-9]{16}|ghp_[a-zA-Z0-9]{36})" .
124
+
125
+ # Credential assignment patterns (flag as HIGH)
126
+ grep -rn -E "(password|passwd|secret|api_key|apikey|access_token)\s*=\s*['\"][^'\"]{8,}" .
127
+
128
+ # Azure connection strings
129
+ grep -rn -E "DefaultEndpointsProtocol=https;AccountName=" .
130
+
131
+ # GCP service account keys
132
+ grep -rn -E "\"type\"\\s*:\\s*\"service_account\"" .
133
+
134
+ # PEM/Certificate content
135
+ grep -rn "-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----" .
136
+
137
+ # Database URLs with credentials
138
+ grep -rn -E "postgres://[^:]+:[^@]+@|mysql://[^:]+:[^@]+@" .
139
+ ```
140
+
141
+ Report each finding with:
142
+ - File and line number
143
+ - The matched pattern (redact the actual secret value: show first 4 chars + ***)
144
+ - Severity: CRITICAL if a real credential pattern, HIGH if credential-shaped pattern
145
+ Redaction applies to both console output and the report file.
146
+
147
+ ## Step 5 — Dependency audit (--deps flag)
148
+
149
+ ```bash
150
+ # Node.js projects
151
+ npm audit --json 2>/dev/null | node -e "
152
+ const data = JSON.parse(require('fs').readFileSync('/dev/stdin', 'utf8'));
153
+ const vulns = data.vulnerabilities || {};
154
+ Object.entries(vulns).forEach(([name, v]) => {
155
+ if (['high','critical'].includes(v.severity)) {
156
+ console.log(v.severity.toUpperCase() + ': ' + name + ' — ' + v.via[0]?.title);
157
+ }
158
+ });
159
+ "
160
+
161
+ # Python projects
162
+ pip-audit --format json 2>/dev/null
163
+ ```
164
+
165
+ ## Step 6 — Write security scan report
166
+
167
+ `.planning/SECURITY-SCAN-[timestamp].md`:
168
+
169
+ ```markdown
170
+ # Security Scan Report
171
+ **Date:** [ISO-8601]
172
+ **Scope:** [what was scanned]
173
+ **Scanner:** MindForge Security Reviewer
174
+
175
+ ## Executive Summary
176
+ [1-2 sentences: overall security posture, number of findings by severity]
177
+
178
+ ## Critical Findings (fix immediately — block all merges)
179
+ [OWASP category] | [File:Line] | [Description] | [Remediation]
180
+
181
+ ## High Findings (fix before next release)
182
+ ...
183
+
184
+ ## Medium Findings (fix in next sprint)
185
+ ...
186
+
187
+ ## Low Findings (backlog)
188
+ ...
189
+
190
+ ## Dependency Audit
191
+ | Package | Version | Severity | CVE | Fixed in |
192
+ |---|---|---|---|---|
193
+
194
+ ## Secret Detection
195
+ | File | Pattern | Severity | Action |
196
+ |---|---|---|---|
197
+
198
+ ## Verdict
199
+ ✅ CLEAN — No critical or high findings
200
+ ⚠️ ISSUES — [N] critical, [N] high findings require attention
201
+ ```
202
+
203
+ ## Important: scan report visibility
204
+
205
+ Security scan reports are written to `.planning/SECURITY-SCAN-[timestamp].md`.
206
+
207
+ **Private repository:** Keep reports committed — they are valuable for audit
208
+ history and team security review.
209
+
210
+ **Public repository:** Add `.planning/SECURITY-SCAN-*.md` to `.gitignore`
211
+ to avoid exposing vulnerability information to potential attackers.
212
+
213
+ MindForge does not make this decision for you — configure `.gitignore`
214
+ based on your repository's visibility.
215
+
216
+ ## Step 7 — Write AUDIT entry
217
+
218
+ ```json
219
+ {
220
+ "event": "security_scan_completed",
221
+ "scope": "[path or 'staged changes']",
222
+ "flags": ["--deps", "--secrets"],
223
+ "critical_findings": [N],
224
+ "high_findings": [N],
225
+ "secrets_detected": [N],
226
+ "vulnerable_deps": [N],
227
+ "report_path": ".planning/SECURITY-SCAN-[timestamp].md"
228
+ }
229
+ ```
230
+
231
+ ## Automatic blocking behaviour
232
+ If CRITICAL findings are detected: print a prominent warning:
233
+ ```
234
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
235
+ 🔴 CRITICAL SECURITY FINDINGS DETECTED
236
+
237
+ [N] critical issues must be fixed before any code is merged.
238
+ See: .planning/SECURITY-SCAN-[timestamp].md
239
+
240
+ Do NOT commit or deploy until these are resolved.
241
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
242
+ ```
@@ -1,34 +1,111 @@
1
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
2
+ description: Create a release PR for a verified phase. Usage: /mindforge:ship [N]
10
3
  ---
11
4
 
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>
5
+ Create a release PR for a verified phase. Usage: /mindforge:ship [N]
6
+
7
+ ## Pre-check
8
+ Read UAT.md for phase N. If status is not "All passed ✅": stop.
9
+ Tell the user: "Phase [N] has not been fully verified. Run /mindforge:verify-phase [N] first."
10
+
11
+ ## Step 1 — Generate changelog entry
12
+ Read all SUMMARY files for phase N.
13
+ Read REQUIREMENTS.md for phase N items.
14
+ Generate a CHANGELOG.md entry following Keep a Changelog format:
15
+
16
+ ```markdown
17
+ ## [Unreleased] — Phase [N]: [Phase description]
18
+
19
+ ### Added
20
+ - [New feature from this phase]
21
+
22
+ ### Changed
23
+ - [Changed behaviour]
24
+
25
+ ### Fixed
26
+ - [Bug fixes]
27
+
28
+ ### Security
29
+ - [Security improvements]
30
+ ```
31
+
32
+ Prepend this to CHANGELOG.md.
33
+
34
+ ## Step 2 — Run final quality gates
35
+ Run all of the following and report results:
36
+ ```bash
37
+ # Type checking
38
+ npx tsc --noEmit
39
+
40
+ # Linting
41
+ npx eslint . --ext .ts,.tsx --max-warnings 0
42
+
43
+ # Tests
44
+ npm test
45
+
46
+ # Security scan (if npm project)
47
+ npm audit --audit-level=high
48
+ ```
49
+
50
+ If any gate fails: stop. Report the failures. Do not proceed to PR creation.
51
+
52
+ ## Step 2.1 — Final Intelligence Audit
53
+ 1. Read `AGENTS_LEARNING.md` for this project.
54
+ 2. Verify if any new architectural patterns, anti-patterns, or mistakes from this phase were recorded.
55
+ 3. If not: Run `/mindforge:record-learning` now to capture them before shipping.
56
+ 4. Commit `AGENTS_LEARNING.md` if updated.
57
+
58
+ ## Step 3 — Create PR description
59
+ Generate a complete PR description:
60
+
61
+ ```markdown
62
+ ## MindForge Phase [N] — [Phase description]
63
+
64
+ ### Summary
65
+ [2-3 sentences describing what this phase delivered]
66
+
67
+ ### Changes
68
+ [Bullet list of major changes from SUMMARY files]
69
+
70
+ ### Requirements delivered
71
+ | FR ID | Description | Verified |
72
+ |-------|------------------------------|----------|
73
+ | FR-01 | ... | ✅ |
74
+
75
+ ### Testing
76
+ - Unit tests: [pass/fail + coverage %]
77
+ - Integration tests: [pass/fail]
78
+ - UAT: Completed and signed off (see UAT.md)
79
+
80
+ ### Security
81
+ - [ ] Security review completed (see SECURITY-REVIEW-N.md)
82
+ - [ ] No hardcoded secrets in diff
83
+ - [ ] All dependencies scanned for CVEs
84
+
85
+ ### Checklist
86
+ - [x] CHANGELOG.md updated
87
+ - [x] AGENTS_LEARNING.md updated with phase-specific insights
88
+ - [x] All tests pass
89
+ - [x] No linter errors
90
+ - [x] UAT signed off
91
+ - [ ] Reviewed by: [assign]
92
+ ```
93
+
94
+ ## Step 4 — Commit and tag
95
+ ```bash
96
+ git add CHANGELOG.md
97
+ git commit -m "docs(changelog): add Phase [N] release notes"
98
+ git push origin feat/mindforge-core-scaffold
99
+ ```
100
+
101
+ Tell the user the PR description and instruct them to open the PR manually
102
+ (or provide the `gh pr create` command if GitHub CLI is available).
103
+
104
+ Tell the user:
105
+ "✅ Phase [N] ready to ship.
106
+ PR description generated above.
107
+ Open your PR, assign reviewers, and merge when approved."
108
+
109
+ ## Step 5 — Update state
110
+ Update STATE.md to mark Phase [N] as shipped.
111
+ Update HANDOFF.json with next phase number.
@@ -1,36 +1,145 @@
1
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
2
+ description: /mindforge:skills list
10
3
  ---
11
4
 
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>
5
+ # MindForge — Skills Command
6
+ # Usage: /mindforge:skills [subcommand] [args]
7
+ # Subcommands: list | add | update | validate | info | search
8
+
9
+ ## Subcommand: list
10
+ `/mindforge:skills list`
11
+
12
+ Read MANIFEST.md. Display all registered skills in a formatted table
13
+ (include path for each skill):
14
+
15
+ ```
16
+ MindForge Skills Registry
17
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18
+
19
+ Tier 1 — Core Skills (10 installed)
20
+ ────────────────────────────────────────────────────────────
21
+ ✅ security-review v1.0.0 stable .mindforge/skills/security-review/SKILL.md
22
+ ✅ code-quality v1.0.0 stable .mindforge/skills/code-quality/SKILL.md
23
+ ✅ api-design v1.0.0 stable .mindforge/skills/api-design/SKILL.md
24
+ ✅ testing-standards v1.0.0 stable .mindforge/skills/testing-standards/SKILL.md
25
+ ✅ documentation v1.0.0 stable .mindforge/skills/documentation/SKILL.md
26
+ ✅ performance v1.0.0 stable .mindforge/skills/performance/SKILL.md
27
+ ✅ accessibility v1.0.0 stable .mindforge/skills/accessibility/SKILL.md
28
+ ✅ data-privacy v1.0.0 stable .mindforge/skills/data-privacy/SKILL.md
29
+ ✅ incident-response v1.0.0 stable .mindforge/skills/incident-response/SKILL.md
30
+ ✅ database-patterns v1.0.0 stable .mindforge/skills/database-patterns/SKILL.md
31
+
32
+ Tier 2 — Org Skills (0 installed)
33
+ ────────────────────────────────────────────────────────────
34
+ (none — run /mindforge:skills add to add org skills)
35
+
36
+ Tier 3 — Project Skills (0 installed)
37
+ ────────────────────────────────────────────────────────────
38
+ (none)
39
+
40
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41
+ Total: 10 skills | Run /mindforge:skills validate to check health
42
+ ```
43
+
44
+ ## Subcommand: info
45
+ `/mindforge:skills info [skill-name]`
46
+
47
+ Display detailed information about a specific skill:
48
+
49
+ ```
50
+ Skill: security-review
51
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52
+ Version : 1.0.0
53
+ Status : stable
54
+ Tier : 1 (Core)
55
+ Min MindForge: 0.1.0
56
+ Path : .mindforge/skills/security-review/SKILL.md
57
+
58
+ Triggers (25):
59
+ auth, authentication, authorisation, authorization, login,
60
+ logout, password, token, JWT, session, cookie, OAuth,
61
+ payment, billing, stripe, PII, GDPR, personal data,
62
+ upload, file upload, credentials, API key, secret, env,
63
+ environment variable, encryption, hashing, bcrypt, argon2
64
+
65
+ Changelog:
66
+ 1.0.0 — Initial stable release
67
+ ```
68
+
69
+ ## Subcommand: search
70
+ `/mindforge:skills search [keyword]`
71
+
72
+ Find which skills would activate for a given keyword:
73
+
74
+ ```
75
+ /mindforge:skills search "database query"
76
+
77
+ Matching skills for "database query":
78
+ ────────────────────────────────────────────────────────────
79
+ database-patterns v1.0.0 [tier 1] trigger: "database", "query"
80
+ performance v1.0.0 [tier 1] trigger: "query time"
81
+
82
+ These 2 skills would be automatically loaded for a task
83
+ containing "database query" in its description.
84
+ ```
85
+
86
+ ## Subcommand: validate
87
+ `/mindforge:skills validate`
88
+
89
+ Run a health check on all installed skills:
90
+
91
+ ```
92
+ Validating skills...
93
+
94
+ ✅ security-review — frontmatter valid, file readable, triggers: 29
95
+ ✅ code-quality — frontmatter valid, file readable, triggers: 14
96
+ ✅ performance — frontmatter valid, file readable, triggers: 31
97
+ ⚠️ [org-skill-name] — frontmatter valid but missing 'version' field
98
+ ❌ [missing-skill] — listed in MANIFEST.md but file not found
99
+
100
+ Issues found: 2
101
+ Run /mindforge:skills add to fix missing skills.
102
+ Fix frontmatter issues manually in the SKILL.md file.
103
+ ```
104
+
105
+ Validation checks:
106
+ 1. Every manifest entry has a corresponding SKILL.md file
107
+ 2. Every SKILL.md has: `name`, `version`, `status`, `triggers` in frontmatter
108
+ 3. Every SKILL.md has a self-check or checklist section
109
+ 4. All versions are valid semver strings
110
+ 5. No two skills at the same tier share the same trigger keyword (flag as ⚠️)
111
+ 6. Every skill file is readable (not empty, not corrupted)
112
+
113
+ ## Subcommand: add
114
+ `/mindforge:skills add [path-to-skill-dir]`
115
+
116
+ Register a new skill in the manifest:
117
+
118
+ 1. Read the SKILL.md in the provided path
119
+ 2. Validate the frontmatter (all required fields present)
120
+ 3. Check for trigger keyword conflicts with existing skills
121
+ 4. Ask the user: "Which tier should this skill be registered as? (2=Org / 3=Project)"
122
+ 5. Show the exact MANIFEST.md entry that will be written and ask for confirmation
123
+ 6. Add the entry to MANIFEST.md in the correct section
124
+ 7. Run `/mindforge:skills validate` to confirm registration is clean
125
+ 8. Commit: `feat(skills): register [skill-name] v[version] as tier [N] skill`
126
+
127
+ ## Subcommand: update
128
+ `/mindforge:skills update [skill-name]`
129
+
130
+ Update a skill to a newer version:
131
+
132
+ 1. Read current version from MANIFEST.md
133
+ 2. Check the skill's changelog in SKILL.md for available updates
134
+ 3. If MAJOR version change: show breaking changes, require confirmation
135
+ 4. If MINOR or PATCH: update automatically
136
+ 5. Update MANIFEST.md version entry
137
+ 6. Run `/mindforge:skills validate` after update
138
+ 7. Run `node tests/skills-platform.test.js` after update
139
+ 8. Commit: `chore(skills): update [name] v[old] → v[new]`
140
+
141
+ ## Error handling
142
+ - If MANIFEST.md does not exist: offer to create it with current skills
143
+ - If a skill name is not found: suggest similar names (fuzzy match)
144
+ - If validation finds critical errors: block any phase execution until fixed
145
+ (A skills validation failure is a BLOCKING issue)