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,36 +1,302 @@
1
1
  ---
2
- name: mindforge:map-codebase
3
- description: Onboard MindForge to an existing project by mapping architecture and conventions
4
- argument-hint: [area]
5
- allowed-tools:
6
- - run_command
7
- - list_dir
8
- - view_file
9
- - write_to_file
2
+ description: - Joining an existing project that has no MindForge context files
10
3
  ---
11
4
 
12
- <objective>
13
- Rapidly bootstrap MindForge context for brownfield repositories by scanning files to infer architecture, technology stack, and actual coding conventions used by the existing team.
14
- </objective>
15
-
16
- <execution_context>
17
- .claude/commands/mindforge/map-codebase.md
18
- </execution_context>
19
-
20
- <context>
21
- Target: Existing repositories without MindForge initialization.
22
- Security: Enforces strict exclusion list (secrets, keys, pems, ignores).
23
- Strategy: Sampling for large codebases (>200 files).
24
- </context>
25
-
26
- <process>
27
- 1. **Inventory**: Count source files and decide on a reading strategy (Sampling vs. Full).
28
- 2. **Parallel Analysis**:
29
- - **Stack Agent**: Identify runtimes, frameworks, and databases.
30
- - **Architect Agent**: Discover architectural patterns and domain models.
31
- - **Convention Agent**: Document actual naming and error handling patterns found in code.
32
- - **Quality Agent**: Assess testing and linting status.
33
- 3. **Synthesis**: Write `ARCHITECTURE.md`, `PROJECT.md`, and a draft `CONVENTIONS.md`.
34
- 4. **Review**: Present findings to the user for correction and confirmation.
35
- 5. **Initialize**: Finalize `STATE.md` and transition the project to "Ready to plan".
36
- </process>
5
+ # MindForge — Map Codebase Command
6
+ # Usage: /mindforge:map-codebase [area]
7
+ # Onboards MindForge to an existing (brownfield) codebase.
8
+ # Run this INSTEAD of /mindforge:init-project when joining an existing project.
9
+
10
+ ## When to use this command
11
+ - Joining an existing project that has no MindForge context files
12
+ - Adding MindForge to a team that already has a codebase
13
+ - Onboarding to a new-to-you repository
14
+ - Re-mapping after major architectural changes
15
+
16
+ ## What it produces
17
+ - `.planning/ARCHITECTURE.md` — system architecture discovered from code
18
+ - `.planning/PROJECT.md` — project identity inferred from codebase + user confirmation
19
+ - `.mindforge/org/CONVENTIONS.md` — actual conventions found in the code
20
+ - `.planning/STATE.md` current position (MindForge onboarded, ready to plan)
21
+ - `.planning/decisions/ADR-NNN-[title].md` key architectural decisions found
22
+
23
+ ## Pre-execution security check
24
+
25
+ Before reading ANY files, build an exclusion list.
26
+ NEVER read these file patterns during codebase mapping:
27
+
28
+ ```bash
29
+ # Build the exclusion list
30
+ EXCLUDED_PATTERNS=(
31
+ "*.env" ".env.*" "*.env.local"
32
+ "*.key" "*.pem" "*.p12" "*.pfx"
33
+ "secrets/*" "**/secrets/*" "**/.secrets/*"
34
+ "*.secret" "*credentials*"
35
+ ".npmrc" # may contain npm tokens
36
+ ".pypirc" # may contain PyPI tokens
37
+ "~/.aws/*" "~/.ssh/*"
38
+ )
39
+ ```
40
+
41
+ For any file the agent is about to read, check:
42
+ 1. Does the file name match any excluded pattern?
43
+ 2. Is the file in a directory named `secrets/`, `.secrets/`, or `credentials/`?
44
+ 3. Is the file listed in `.gitignore`? (`.gitignore` files are intentionally excluded from git for a reason)
45
+
46
+ If yes to any: SKIP the file. Log that it was skipped.
47
+ Do not include any content from excluded files in ARCHITECTURE.md or CONVENTIONS.md.
48
+
49
+ ## Step 0 — Clean up any previous mapping artifacts
50
+
51
+ ```bash
52
+ # Remove any stale temp files from a previous mapping attempt
53
+ if [ -d ".planning/map-temp" ]; then
54
+ echo "Cleaning up previous mapping session..."
55
+ rm -rf .planning/map-temp
56
+ fi
57
+ mkdir -p .planning/map-temp
58
+ ```
59
+
60
+ ## Step 1 — Codebase inventory
61
+
62
+ Spawn FOUR parallel subagents. Each focuses on one analysis area.
63
+ Each subagent writes its findings to a temporary file.
64
+
65
+ ### Subagent A — Technology Stack Analyst
66
+ Context: minimal (CONVENTIONS.md template + task description)
67
+ Persona: architect.md
68
+ Task:
69
+ ```
70
+ Analyse this repository's technology stack. Read:
71
+ - package.json / requirements.txt / Cargo.toml / go.mod (root and workspaces)
72
+ - Dockerfile, docker-compose.yml (if present)
73
+ - CI/CD configuration: .github/workflows/, .gitlab-ci.yml, .circleci/
74
+ - Infrastructure files: terraform/, pulumi/, k8s/, helm/
75
+
76
+ Write to: .planning/map-temp/STACK.md
77
+ Include:
78
+ - Runtime/language and version
79
+ - Framework(s) and versions
80
+ - Database(s) used
81
+ - Cache and queue systems
82
+ - Testing framework(s)
83
+ - Build and bundling tools
84
+ - Deployment target (AWS/GCP/Azure/bare metal/etc.)
85
+ - External services integrated (payment, email, auth, etc.)
86
+ ```
87
+
88
+ ### Subagent B — Architecture Analyst
89
+ Context: minimal
90
+ Persona: architect.md
91
+ Task:
92
+ ```
93
+ Analyse this repository's architecture. Read:
94
+ - All files in src/ (or equivalent) — structure, not content
95
+ - README.md and any docs/ directory
96
+ - Any architecture diagrams (look for .png, .svg, .drawio in docs/)
97
+ - Entry points: index.ts, main.py, app.go, server.ts (root-level)
98
+
99
+ Write to: .planning/map-temp/ARCHITECTURE-RAW.md
100
+ Include:
101
+ - Architectural pattern: MVC / Clean Architecture / Hexagonal / Modular Monolith / Microservices
102
+ - Domain model: what are the core entities? (infer from models/, entities/, types/)
103
+ - API surface: public endpoints found in routes/, controllers/, handlers/
104
+ - Module structure: how is the code organised? Feature-based / Layer-based?
105
+ - Key design patterns in use: Repository, Service, Factory, Observer, etc.
106
+ ```
107
+
108
+ ### Scale handling for large codebases
109
+
110
+ Before reading source files, count them:
111
+ ```bash
112
+ find src/ -type f \( -name "*.ts" -o -name "*.py" -o -name "*.go" \) | wc -l
113
+ ```
114
+
115
+ If count > 200 files: use sampling strategy instead of full read:
116
+ - Read 3 files from each top-level subdirectory
117
+ - Prioritise: largest files (by size), entry points (index.*, main.*, app.*)
118
+ - Read the full Prisma schema / SQLAlchemy models / Django models file (always)
119
+ - Read all route/controller index files (always)
120
+ - Sample 2-3 files per feature directory
121
+ - Do NOT read test files during mapping (they follow source patterns, not add to them)
122
+
123
+ If count > 1000 files: read only entry points, schema files, and top-level indices.
124
+ Report to the user: "Large codebase detected ([N] source files).
125
+ Using sampling strategy — some conventions may require manual confirmation."
126
+
127
+ ### Subagent C — Conventions Analyst
128
+ Context: minimal
129
+ Persona: developer.md
130
+ Task:
131
+ ```
132
+ Analyse the actual coding conventions used in this repository.
133
+ Read 5-10 representative source files from different areas of the codebase.
134
+
135
+ Write to: .planning/map-temp/CONVENTIONS-RAW.md
136
+ Infer and document:
137
+ - Naming conventions: variables, functions, classes, files, database columns
138
+ - Import order and grouping style
139
+ - Error handling patterns: how are errors thrown and caught?
140
+ - TypeScript patterns: preferred type patterns, generic usage
141
+ - Comment style: JSDoc, inline, etc.
142
+ - Test file naming and location pattern
143
+ - Async patterns: callbacks / promises / async-await
144
+ - State management (frontend): if applicable
145
+ - Any recurring patterns that appear across multiple files
146
+
147
+ Important: document what IS there, not what should be there.
148
+ This is a description of reality, not a prescription.
149
+ ```
150
+
151
+ ### Subagent D — Quality Baseline Analyst
152
+ Context: minimal
153
+ Persona: qa-engineer.md
154
+ Task:
155
+ ```
156
+ Assess the current quality baseline of this repository.
157
+
158
+ Write to: .planning/map-temp/QUALITY-BASELINE.md
159
+ Check:
160
+ - Test coverage: does a test suite exist? What framework? Run: [test command] --coverage
161
+ - Linting: is a linter configured? (.eslintrc, .pylintrc, ruff.toml, etc.)
162
+ - Type checking: TypeScript config? Strict mode enabled?
163
+ - CI/CD: does it run tests on PRs?
164
+ - Security: any security scanning in CI?
165
+ - Known issues: open GitHub/GitLab issues, TODO count in source
166
+
167
+ Note: do not fix anything. Only document what exists.
168
+ ```
169
+
170
+ ## Step 2 — Synthesise findings
171
+
172
+ Read all four temp files. Synthesise into the permanent context files.
173
+
174
+ ### Write `.planning/ARCHITECTURE.md`
175
+
176
+ Use ARCHITECTURE-RAW.md as input. Write a clean, structured architecture document:
177
+
178
+ ```markdown
179
+ # [Project Name] — Architecture
180
+
181
+ ## System overview
182
+ [2-3 sentences from the subagent's findings]
183
+
184
+ ## Technology stack
185
+ [From STACK.md — organised by layer]
186
+
187
+ ## Architectural pattern
188
+ [From ARCHITECTURE-RAW.md]
189
+
190
+ ## Domain model
191
+ [Core entities and their relationships]
192
+
193
+ ## API surface
194
+ [Key endpoints / GraphQL operations / gRPC services found]
195
+
196
+ ## Module structure
197
+ [How the codebase is organised]
198
+
199
+ ## External integrations
200
+ [Third-party services found]
201
+
202
+ ## Known architectural decisions
203
+ [Any ADRs, architecture docs, or README decisions found]
204
+
205
+ ## Quality baseline
206
+ [From QUALITY-BASELINE.md — honest assessment]
207
+
208
+ ## MindForge onboarding notes
209
+ [What was inferred vs. confirmed, what needs human review]
210
+ ```
211
+
212
+ ### Write `.mindforge/org/CONVENTIONS.md`
213
+
214
+ Use CONVENTIONS-RAW.md as input. Write the conventions file in the standard format,
215
+ but clearly mark inferred conventions:
216
+
217
+ ```markdown
218
+ # Coding Conventions — [Project Name]
219
+ # Source: Inferred from codebase analysis by MindForge
220
+ # Status: DRAFT — confirm with team before treating as authoritative
221
+
222
+ ## IMPORTANT
223
+ These conventions were inferred from code analysis. Review each section
224
+ and mark as [CONFIRMED] or [NEEDS REVIEW] before running /mindforge:plan-phase.
225
+
226
+ ## Naming conventions [NEEDS REVIEW]
227
+ [What was found]
228
+ ```
229
+
230
+ ## Step 3 — Present findings for confirmation
231
+
232
+ Present a summary to the user. Ask for confirmation and corrections:
233
+
234
+ ```
235
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
236
+ MindForge Codebase Analysis Complete
237
+
238
+ Stack:
239
+ Runtime : Node.js 20 (inferred from .nvmrc)
240
+ Framework : Next.js 14 (inferred from package.json)
241
+ Database : PostgreSQL via Prisma (inferred from prisma/schema.prisma)
242
+ Auth : NextAuth.js (inferred from package.json)
243
+
244
+ Architecture:
245
+ Pattern : Feature-based modular (inferred from src/ structure)
246
+ Entities : User, Organization, Project, Task (inferred from Prisma schema)
247
+ API : REST API in src/app/api/ (24 route files found)
248
+
249
+ Quality baseline:
250
+ Tests : Vitest, ~340 test files, ~67% coverage (inferred from coverage report)
251
+ Linting : ESLint configured, strict TypeScript
252
+ CI/CD : GitHub Actions (4 workflows)
253
+
254
+ Conventions: see .mindforge/org/CONVENTIONS.md (DRAFT — needs review)
255
+
256
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
257
+
258
+ Does this look correct? (yes / correct [field]: [value] / no)
259
+ ```
260
+
261
+ Wait for user confirmation. Apply any corrections the user provides.
262
+
263
+ ## Step 4 — Write PROJECT.md and STATE.md
264
+
265
+ After confirmation, write:
266
+
267
+ `.planning/PROJECT.md` — populated with confirmed findings
268
+ `.planning/STATE.md` — status: "Codebase mapped. Ready to plan first phase."
269
+ Add a warning in STATE.md if CONVENTIONS.md is still DRAFT and requires review.
270
+ `.planning/HANDOFF.json` — updated with onboarding completion
271
+
272
+ ## Step 5 — Clean up and report
273
+
274
+ After analysis completes, delete `.planning/map-temp/` to avoid stale data.
275
+
276
+ ```bash
277
+ rm -rf .planning/map-temp/
278
+ ```
279
+
280
+ Report to user:
281
+ "✅ Codebase mapped.
282
+
283
+ Files created:
284
+ .planning/ARCHITECTURE.md
285
+ .planning/PROJECT.md
286
+ .mindforge/org/CONVENTIONS.md (DRAFT — please review)
287
+ .planning/STATE.md
288
+
289
+ Review .mindforge/org/CONVENTIONS.md and mark each section as [CONFIRMED].
290
+ Then run /mindforge:plan-phase 1 to begin your first phase."
291
+
292
+ Write AUDIT entry:
293
+ ```json
294
+ {
295
+ "event": "codebase_mapped",
296
+ "files_analysed": [N],
297
+ "entities_found": [N],
298
+ "api_routes_found": [N],
299
+ "conventions_confidence": "medium",
300
+ "requires_human_review": [".mindforge/org/CONVENTIONS.md"]
301
+ }
302
+ ```
@@ -1,33 +1,124 @@
1
1
  ---
2
- name: mindforge:marketplace
3
- description: Discover, evaluate, and install community-published skills
4
- argument-hint: [search|featured|trending|install|publish]
5
- allowed-tools:
6
- - run_command
7
- - list_dir
8
- - view_file
2
+ description: Discover, evaluate, and install community-published MindForge skills from the
9
3
  ---
10
4
 
11
- <objective>
12
- Provide a central hub for sharing and consuming battle-tested MindForge skills, allowing developers to extend their agent's capabilities without manual documentation research.
13
- </objective>
14
-
15
- <execution_context>
16
- .claude/commands/mindforge/marketplace.md
17
- </execution_context>
18
-
19
- <context>
20
- Platform: Curated layer over npm.
21
- Subcommands: search, featured, trending, install, publish.
22
- Quality: Enforces quality scores and session quality lift metrics.
23
- </context>
24
-
25
- <process>
26
- 1. **Query Subcommand**:
27
- - `search`: Find relevant skills based on tech stack or domain keywords.
28
- - `featured/trending`: Display curated or popular skill lists.
29
- 2. **Install Flow**: Delegate to `/mindforge:install-skill` while surfacing quality scores and expected quality lift.
30
- 3. **Publish Flow**: Validate skill directory for quality (score >= 80), injection safety, and complete history before pushing.
31
- 4. **Render Format**: Display skills with detailed metrics (installs, lifters, triggers).
32
- 5. **Audit**: Log `marketplace_action` including query/skill name and quality scores.
33
- </process>
5
+ # MindForge v2 — Marketplace Command
6
+ # Usage: /mindforge:marketplace [search|featured|trending|install|publish]
7
+ # Version: v2.0.0-alpha.6
8
+
9
+ ## Purpose
10
+ Discover, evaluate, and install community-published MindForge skills from the
11
+ marketplace — a curated layer on top of the npm registry.
12
+
13
+ The marketplace is the shortcut: instead of learning from documentation yourself,
14
+ install skills that the community has already created, validated, and battle-tested.
15
+
16
+ ## Sub-commands
17
+
18
+ ### search [query]
19
+ Find skills relevant to your tech stack or domain.
20
+ ```
21
+ /mindforge:marketplace search "prisma"
22
+ /mindforge:marketplace search "stripe payment processing"
23
+ /mindforge:marketplace search "HIPAA compliance"
24
+ /mindforge:marketplace search "graphql api"
25
+ ```
26
+
27
+ Output:
28
+ ```
29
+ 🔍 Marketplace search: "prisma" (6 results)
30
+
31
+ 1. prisma-advanced (v1.2.3)
32
+ Advanced Prisma patterns: relations, migrations, performance, cursor pagination
33
+ 847 installs this week
34
+
35
+ 2. prisma-schema (v1.0.1)
36
+ Prisma schema design: models, relations, enums, cascade rules
37
+ 234 installs this week
38
+
39
+ 3. prisma-testing (v1.0.0)
40
+ Testing Prisma with Jest: database seeding, teardown, transaction rollback
41
+ 156 installs this week
42
+
43
+ Install: /mindforge:marketplace install prisma-advanced
44
+ ```
45
+
46
+ ### featured
47
+ Show curated featured skills by category.
48
+ ```
49
+ /mindforge:marketplace featured
50
+ ```
51
+
52
+ Output:
53
+ ```
54
+ 🏪 MindForge Community Skills — Featured
55
+
56
+ Database:
57
+ db-postgres-advanced v2.1.0 — Advanced PostgreSQL patterns, indexes, partitioning
58
+ db-prisma-advanced v1.2.0 — Prisma relations, migrations, query optimisation
59
+ db-drizzle v1.0.0 — Drizzle ORM type-safe patterns
60
+
61
+ API:
62
+ api-graphql v1.4.0 — GraphQL schema, resolvers, N+1 prevention
63
+ api-rest v2.0.0 — REST API design, versioning, error schemas
64
+
65
+ Compliance:
66
+ fintech-pci-compliance v1.1.0 — PCI DSS Level 1 safeguards
67
+ healthtech-hipaa v1.0.1 — HIPAA Security Rule for PHI
68
+ [more...]
69
+ ```
70
+
71
+ ### trending
72
+ Show most-installed skills this month.
73
+ ```
74
+ /mindforge:marketplace trending
75
+ ```
76
+
77
+ ### install [name] [--tier project|org]
78
+ Install a marketplace skill.
79
+ ```
80
+ /mindforge:marketplace install prisma-advanced
81
+ /mindforge:marketplace install mindforge-skill-api-graphql --tier org
82
+ /mindforge:marketplace install fintech-pci-compliance --tier project
83
+ ```
84
+
85
+ Short names work (without `mindforge-skill-` prefix).
86
+ Delegates to `/mindforge:install-skill` for actual installation.
87
+ Shows quality score and session_quality_lift before installing.
88
+
89
+ ### publish [skill-dir]
90
+ Publish a skill to the community marketplace.
91
+ ```
92
+ /mindforge:marketplace publish .mindforge/skills/my-skill/
93
+ ```
94
+
95
+ Requirements:
96
+ - Quality score ≥ 80/100
97
+ - No injection patterns
98
+ - Has complete version history
99
+ - Has author contact (GitHub issues URL)
100
+
101
+ ## Skill quality display format
102
+
103
+ ```
104
+ 📊 Skill: prisma-advanced v1.2.3
105
+ Quality score: 94/100 (Excellent)
106
+ ★★★★★ Session quality lift: +8.2 points (over 1,247 sessions)
107
+ 847 installs/week | Published by: @prisma-community
108
+
109
+ Top trigger keywords: "prisma schema", "@relation", "prisma migrate",
110
+ "prisma generate", "onDelete", "cursor pagination"
111
+
112
+ [Install] [Preview SKILL.md] [View on npm]
113
+ ```
114
+
115
+ ## AUDIT entry
116
+ ```json
117
+ {
118
+ "event": "marketplace_action",
119
+ "action": "search|install|publish",
120
+ "query": "[search query if search]",
121
+ "skill_name": "[name if install/publish]",
122
+ "quality_score": 94
123
+ }
124
+ ```
@@ -1,33 +1,26 @@
1
1
  ---
2
- name: mindforge:metrics
3
- description: Display session and phase quality trends with early warning signals
4
- argument-hint: [--phase N] [--window short|medium|long] [--export path]
5
- allowed-tools:
6
- - list_dir
7
- - view_file
8
- - write_to_file
2
+ description: Display session and phase quality trends with early warning signals.
9
3
  ---
10
4
 
11
- <objective>
12
- Provide a dashboard of software delivery metrics, identifying quality trends and providing early warning signals for architectural or process decay.
13
- </objective>
5
+ # MindForge — Metrics Command
6
+ # Usage: /mindforge:metrics [--phase N] [--window short|medium|long] [--export path]
14
7
 
15
- <execution_context>
16
- .claude/commands/mindforge/metrics.md
17
- </execution_context>
8
+ Display session and phase quality trends with early warning signals.
18
9
 
19
- <context>
20
- Sources: .mindforge/metrics/*.jsonl, .planning/AUDIT.jsonl
21
- Sub-metrics: Session quality, phase metrics, skill usage, compaction quality.
22
- </context>
10
+ ## Data sources
11
+ - `.mindforge/metrics/session-quality.jsonl`
12
+ - `.mindforge/metrics/phase-metrics.jsonl`
13
+ - `.mindforge/metrics/skill-usage.jsonl`
14
+ - `.mindforge/metrics/compaction-quality.jsonl`
15
+ - `.planning/AUDIT.jsonl` for correlation
23
16
 
24
- <process>
25
- 1. **Fetch Metrics**: Read the relevant JSONL logs based on the requested window.
26
- 2. **Analyze Trends**: Correlate session quality with verify pass rates and security findings.
27
- 3. **Build Dashboard**:
28
- - Quality trends graph (text-based).
29
- - Failure/Compaction summary.
30
- - Early warnings (e.g., "Rising complexity in Wave 2").
31
- 4. **Export (Optional)**: If requested, write the aggregated metrics to the target path.
32
- 5. **Log**: Record `metrics_viewed` in the audit log.
33
- </process>
17
+ ## Dashboard sections
18
+ - session quality trend
19
+ - verify pass/security/failure/compaction summary
20
+ - skill usage distribution
21
+ - early warnings + recommendations
22
+
23
+ ## AUDIT
24
+ ```json
25
+ { "event": "metrics_viewed", "window": "short", "early_warnings": 0 }
26
+ ```
@@ -1,33 +1,44 @@
1
1
  ---
2
- name: mindforge:migrate
3
- description: Run explicit schema migrations for planning artifacts
4
- argument-hint: [--from X.Y.Z] [--to X.Y.Z] [--dry-run] [--force]
5
- allowed-tools:
6
- - run_command
7
- - list_dir
8
- - view_file
9
- - write_to_file
2
+ description: Run explicit schema migrations for .planning/ files.
10
3
  ---
11
4
 
12
- <objective>
13
- Ensures consistency and compatibility of planning files (.planning/*.md, handoff.json) across different versions of MindForge by executing structured schema migrations.
14
- </objective>
15
-
16
- <execution_context>
17
- .claude/commands/mindforge/migrate.md
18
- </execution_context>
19
-
20
- <context>
21
- Detection: Compares `schema_version` in HANDOFF.json with current framework version.
22
- Safety: Mandatory backup before mutation.
23
- Engine: bin/migrations/migrate.js
24
- </context>
25
-
26
- <process>
27
- 1. **Detect Path**: Determine the migration range based on HANDOFF.json vs package.json.
28
- 2. **Backup**: Create a timestamped backup of the `.planning/` directory.
29
- 3. **Dry-run**: Show the user which files will be modified and describe any breaking schema changes.
30
- 4. **Execute**: Run the migration scripts sequentially across the target files.
31
- 5. **Verify**: Run `/mindforge:health` to ensure the post-migration state is valid.
32
- 6. **Audit**: Log success or failure of the migration process.
33
- </process>
5
+ # MindForge — Migrate Command
6
+ # Usage: /mindforge:migrate [--from X.Y.Z] [--to X.Y.Z] [--dry-run] [--force]
7
+
8
+ ## Purpose
9
+ Run explicit schema migrations for .planning/ files.
10
+ Normally triggered automatically by /mindforge:update.
11
+ Use this command manually when: auto-migration failed, manual version jump, recovery.
12
+
13
+ ## Flow
14
+
15
+ ### Auto-detect migration need
16
+ Read `schema_version` from HANDOFF.json.
17
+ Compare against current `package.json` version.
18
+ Determine migration path.
19
+
20
+ ### Dry-run mode (--dry-run)
21
+ Show: which migrations would run, what each changes.
22
+ Show: breaking changes for the migration path.
23
+ Make NO changes to any file.
24
+
25
+ ### Backup first
26
+ Before any changes: create `.planning/migration-backup-[timestamp]/`
27
+ Verify backup integrity (file count, non-empty).
28
+ If backup fails: ABORT. Explain disk space issue.
29
+
30
+ ### Execute migrations
31
+ Run `node bin/migrations/migrate.js`.
32
+ Show progress for each migration.
33
+ If any migration fails: auto-restore from backup.
34
+
35
+ ### Verify
36
+ Run /mindforge:health after migration.
37
+ If health errors: report with specific fix instructions.
38
+ Preserve backup until user is satisfied — they must delete it manually.
39
+
40
+ ## Manual version override
41
+ `/mindforge:migrate --from 0.1.0 --to 1.0.0` — forces migration between specified versions.
42
+ Use with care: intended for recovery scenarios where HANDOFF.json schema_version is wrong.
43
+
44
+ ## AUDIT entry
@@ -1,35 +1,16 @@
1
1
  ---
2
- name: mindforge:milestone
3
- description: Create or update a milestone definition and track grouped phase health
4
- argument-hint: <name> [phase list]
5
- allowed-tools:
6
- - list_dir
7
- - write_to_file
8
- - view_file
2
+ description: Create or update a milestone definition in .planning/milestones/ and track the
9
3
  ---
10
4
 
11
- <objective>
12
- Define and track major project milestones by grouping phases, monitoring their health, and linking approvals and verification status.
13
- </objective>
5
+ Create or update a milestone definition in `.planning/milestones/` and track the
6
+ health of grouped phases. Usage: `/mindforge:milestone <name> [phase list]`
14
7
 
15
- <execution_context>
16
- .claude/commands/mindforge/milestone.md
17
- </execution_context>
8
+ ## Outputs
9
+ - milestone document with included phases
10
+ - health summary (on track, at risk, blocked)
11
+ - linked approvals, blockers, and verification status
18
12
 
19
- <context>
20
- Arguments: $ARGUMENTS (Name of milestone and optional list of phase numbers)
21
- Storage: .planning/milestones/
22
- Health Rules: Any blocked phase makes the milestone "at risk".
23
- </context>
24
-
25
- <process>
26
- 1. **Parse Arguments**: Extract milestone name and phase list.
27
- 2. **Read State**: Check existing phases in `.planning/phases/`.
28
- 3. **Generate/Update Milestone**:
29
- - Create/update `.planning/milestones/[name].md`.
30
- - Include phase list, health summary (on track, at risk, blocked), and verification status.
31
- 4. **Evaluate Health**:
32
- - Mark as "at risk" if any linked phase is blocked.
33
- - Monitor for completed vs. verified phases for release readiness.
34
- 5. **Report**: Summarize milestone health and next actions to the user.
35
- </process>
13
+ ## Health rules
14
+ - any blocked phase makes the milestone at risk
15
+ - missing verification keeps milestone status yellow
16
+ - completed verified phases count toward release readiness