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,167 +1,37 @@
1
- # MindForge — Execute Phase Command
2
- # Usage: /mindforge:execute-phase [N]
3
-
4
- ## Pre-checks (all must pass before execution starts)
5
-
6
- 1. Read STATE.md — confirm phase [N] is in "planned" status.
7
- If STATE.md shows phase [N] as already "complete": ask user to confirm re-execution.
8
-
9
- 2. Verify plan files exist:
10
- ```
11
- .planning/phases/[N]/PLAN-[N]-01.md (minimum one plan required)
12
- ```
13
- If missing: stop. Tell user: "No plans found for Phase [N]. Run /mindforge:plan-phase [N] first."
14
-
15
- 3. Verify REQUIREMENTS.md exists and has content.
16
- If empty: warn user but allow continuation.
17
-
18
- 4. Run the dependency parser (`.mindforge/engine/dependency-parser.md`).
19
- If validation fails (circular deps, missing deps): stop and report. Do not execute.
20
-
21
- ## Step 1 — Build and display the execution plan
22
-
23
- After dependency parsing succeeds, display the wave plan to the user:
24
-
25
- ```
26
- Phase [N] Execution Plan
27
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
28
-
29
- Wave 1 (parallel) Wave 2 (parallel) Wave 3
30
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
31
- Plan 01 │ │ Plan 03 │ │ Plan 05 │
32
- User model │──┐ │ User API │──┐ │ Checkout UI
33
- └─────────────┘ │ └─────────────┘ │ └─────────────┘
34
- ┌─────────────┐ │ ┌─────────────┐ │
35
- Plan 02 │──┘ │ Plan 04 │──┘
36
- Product │ │ Product API
37
- └─────────────┘ └─────────────┘
38
-
39
- Total tasks: 5 Waves: 3 Est. time: depends on model speed
40
-
41
- Proceed? (yes/no)
42
- ```
43
-
44
- If the user says no: stop. Do not execute anything.
45
-
46
- ## Step 2 — Write pre-execution audit entry
47
-
48
- Append to `.planning/AUDIT.jsonl`:
49
- ```json
50
- {
51
- "id": "[uuid-v4]",
52
- "timestamp": "[ISO-8601]",
53
- "event": "phase_execution_started",
54
- "phase": [N],
55
- "wave_count": [total waves],
56
- "task_count": [total tasks],
57
- "agent": "mindforge-orchestrator",
58
- "session_id": "[session identifier]"
59
- }
60
- ```
61
-
62
- ## Step 3 — Execute waves using the wave executor
63
-
64
- Follow the complete protocol in `.mindforge/engine/wave-executor.md`.
65
-
66
- For each wave:
67
-
68
- ### Wave start
69
- Write to console:
70
- ```
71
- ━━━ Wave [W] of [total] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
72
- Starting [X] tasks in parallel...
73
- ```
74
-
75
- ### Per-task execution (inject context per `context-injector.md`)
76
- For each plan in the wave:
77
- 1. Load context package (per `context-injector.md`)
78
- 2. Execute the plan instructions
79
- - Run `<verify>` — capture exact output
80
- - If verify PASSES:
81
- - Run `<verify-visual>` via `visual-verify-executor.js`
82
- - If visual verify FAILS: stop and report (treat as verify failure)
83
- - Write SUMMARY-[N]-[M].md
84
- - Execute commit: `git add [files] && git commit -m "[type]([scope]): [task name]"`
85
- - Capture git SHA
86
- - Write AUDIT entry for task completion
87
- 5. If verify FAILS:
88
- - Write SUMMARY-[N]-[M].md with failure details
89
- - Write AUDIT entry for task failure
90
- - STOP this wave immediately
91
- - Report: "Task [plan ID] failed: [verify output]. Stopping Phase [N]."
92
- - Do not start next wave
93
- - Ask user: "Spawn debug agent to diagnose? (yes/no)"
94
-
95
- ### Wave completion (before starting next wave)
96
- After all tasks in wave complete:
97
- 1. Run: `[project test command]`
98
- 2. If tests fail:
99
- - Identify failing tests
100
- - Run `git log --oneline -[wave-task-count]` to see wave commits
101
- - Report which commit likely introduced the failure
102
- - Stop. Ask user how to proceed.
103
- 3. If tests pass:
104
- - Report: "Wave [W] complete. All [X] tasks passed. Tests passing. ✅"
105
- - Write WAVE-REPORT update
106
-
107
- ## Step 4 — Phase-level verification
108
-
109
- After all waves complete, run the verification pipeline:
110
-
111
- 1. Read every v1 requirement from REQUIREMENTS.md for this phase
112
- 2. For each requirement, verify it is implemented:
113
- - Search the codebase for the implementation
114
- - Check if a test covers it
115
- - Mark: ✅ implemented + tested | ⚠️ implemented, no test | ❌ not found
116
- 3. Write `.planning/phases/[N]/VERIFICATION.md`
117
- 4. Run the full test suite one final time
118
- 5. If any requirement is ❌: create a fix plan and report to user
119
-
120
- ## Step 5 — Update state and write wave report
121
-
122
- Write `.planning/phases/[N]/WAVE-REPORT-[N].md` (per template in wave-executor.md)
123
-
124
- Update STATE.md:
125
- ```markdown
126
- ## Current phase
127
- [N] — Execution complete ✅
128
-
129
- ## Last completed task
130
- Phase [N]: All [X] tasks completed across [W] waves.
131
-
132
- ## Next action
133
- Run /mindforge:verify-phase [N] for human acceptance testing.
134
- ```
135
-
136
- Update HANDOFF.json with completed phase info.
137
-
138
- Write final AUDIT entry:
139
- ```json
140
- {
141
- "id": "[uuid-v4]",
142
- "timestamp": "[ISO-8601]",
143
- "event": "phase_execution_completed",
144
- "phase": [N],
145
- "tasks_completed": [X],
146
- "waves_executed": [W],
147
- "commits": ["sha1", "sha2", "..."],
148
- "test_result": "passing",
149
- "agent": "mindforge-orchestrator"
150
- }
151
- ```
152
-
153
- ## Step 6 — Report to user
154
-
155
- ```
156
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
157
- ✅ Phase [N] execution complete
158
-
159
- Tasks completed : [X] / [X]
160
- Waves executed : [W]
161
- Commits made : [X]
162
- Tests : All passing
163
- Requirements : [X] / [X] implemented
164
-
165
- Next step: Run /mindforge:verify-phase [N] for UAT sign-off.
166
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
167
- ```
1
+ ---
2
+ name: mindforge:execute-phase
3
+ description: Execute the wave-based execution plan for a specific phase
4
+ argument-hint: [N]
5
+ allowed-tools:
6
+ - view_file
7
+ - write_to_file
8
+ - run_command
9
+ - list_dir
10
+ ---
11
+
12
+ <objective>
13
+ Coordinate the parallel execution of task plans for a phase using a wave-based approach, ensuring dependency integrity, automated verification, and audit logging.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/execute-phase.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Arguments: $ARGUMENTS (Phase N)
22
+ Sources: .planning/phases/[N]/PLAN-*.md, STATE.md, REQUIREMENTS.md
23
+ Engine: wave-executor.md, dependency-parser.md, context-injector.md
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Pre-checks**: Verify phase status, plan existence, and requirement content. Run dependency parser.
28
+ 2. **Display Wave Plan**: Present the wave-based execution graph and wait for user approval.
29
+ 3. **Audit Initiation**: Log `phase_execution_started` in `AUDIT.jsonl`.
30
+ 4. **Wave Execution**:
31
+ - For each wave: Execute tasks in parallel.
32
+ - For each task: Inject context, run implementation, run `<verify>`, and commit with SHA.
33
+ - If any task fails: Stop the wave and offer debugging.
34
+ 5. **Phase Verification**: Check requirement coverage in the implementation and write `VERIFICATION.md`.
35
+ 6. **Update State**: Update `STATE.md`, `HANDOFF.json`, and write `WAVE-REPORT-[N].md`.
36
+ 7. **Auto-capture**: If enabled, detect new patterns/skills from the implemented phase.
37
+ </process>
@@ -1,21 +1,31 @@
1
- # MindForge — Health Command
2
- # Usage: /mindforge:health [--repair] [--category C] [--verbose]
1
+ ---
2
+ name: mindforge:health
3
+ description: Run the MindForge health engine to diagnose and repair issues
4
+ argument-hint: [--repair] [--category C] [--verbose]
5
+ allowed-tools:
6
+ - run_command
7
+ - list_dir
8
+ - view_file
9
+ ---
3
10
 
4
- Run all seven health-engine categories from `.mindforge/intelligence/health-engine.md`.
11
+ <objective>
12
+ Ensure the MindForge environment and project state are valid, secure, and optimally configured by running a suite of diagnostic checks across multiple categories.
13
+ </objective>
5
14
 
6
- ## Output
7
- - category status summary
8
- - errors (must fix)
9
- - warnings (should fix)
10
- - informational signals
15
+ <execution_context>
16
+ .claude/commands/mindforge/health.md
17
+ </execution_context>
11
18
 
12
- ## Flags
13
- - `--repair`: apply safe auto-repair only
14
- - `--category`: one of `installation|context|skills|personas|state|integrations|security`
15
- - `--verbose`: include passing checks and exact inspected values
19
+ <context>
20
+ Engine: .mindforge/intelligence/health-engine.md
21
+ Categories: installation, context, skills, personas, state, integrations, security.
22
+ Flags: --repair (auto-fix), --verbose (full details).
23
+ </context>
16
24
 
17
- ## AUDIT
18
- Append:
19
- ```json
20
- { "event": "health_check_completed", "errors": 0, "warnings": 0, "repaired": 0 }
21
- ```
25
+ <process>
26
+ 1. **Initialize Diagnostics**: Load the health engine and target specifically requested categories (or all by default).
27
+ 2. **Execute Checks**: Scan for configuration errors, missing files, security misconfigurations, and state inconsistencies.
28
+ 3. **Repair (Optional)**: If `--repair` is set, apply safe automated fixes for detected issues.
29
+ 4. **Report Findings**: Categorize results into Errors (must fix), Warnings (should fix), and Info.
30
+ 5. **Audit**: Log `health_check_completed` with counts of errors, warnings, and repairs.
31
+ </process>
@@ -1,23 +1,29 @@
1
- Show all available MindForge commands.
1
+ ---
2
+ name: mindforge:help
3
+ description: Show all available MindForge commands and current project summary
4
+ argument-hint: none
5
+ allowed-tools:
6
+ - list_dir
7
+ - view_file
8
+ ---
2
9
 
3
- ## Pre-check
4
- If `.planning/STATE.md` exists, read it.
5
- If `.planning/PROJECT.md` is missing, treat the project as "Not initialised".
10
+ <objective>
11
+ Provide a searchable, categorized directory of all accessible MindForge commands, along with a quick snapshot of the project's current state.
12
+ </objective>
6
13
 
7
- 1. Scan every .md file in `.claude/commands/mindforge/`
8
- 2. For each file, extract the first non-empty line as the command description
9
- 3. Display as a clean table:
14
+ <execution_context>
15
+ .claude/commands/mindforge/help.md
16
+ </execution_context>
10
17
 
11
- | Command | Description |
12
- |------------------------------|----------------------------------------------|
13
- | /mindforge:help | Show all available commands |
14
- | /mindforge:init-project | ... |
15
- | ... | ... |
18
+ <context>
19
+ Discovery: Scans `.claude/commands/mindforge/*.md`
20
+ State: PROJECT.md and STATE.md
21
+ </context>
16
22
 
17
- 4. After the table, print:
18
- "Current project: [read PROJECT.md first line, or 'Not initialised']"
19
- "Current phase: [read STATE.md current phase, or 'None']"
20
- "Next step: [read STATE.md next action]"
21
-
22
- 5. If CLAUDE.md has not been read this session, remind the user to ensure
23
- it is loaded as the agent's system context.
23
+ <process>
24
+ 1. **Command Scan**: List all markdown definitions in the command directory and extract their first-line descriptions or YAML metadata.
25
+ 2. **Read Project Info**: Summarize the current project name, active phase, and recommended next step.
26
+ 3. **Format Dashboard**: Render a clean table of commands and descriptions.
27
+ 4. **Verify Context**: If `CLAUDE.md` hasn't been read in the current session, remind the user to load it as the agent's context.
28
+ 5. **Display**: Present the help table and project summary.
29
+ </process>
@@ -1,131 +1,37 @@
1
- # MindForge — Init Org Command
2
- # Usage: /mindforge:init-org [--org-name "Name"] [--update]
3
-
4
- ## Purpose
5
- Set up MindForge at the organisation level — create standardised org-level
6
- context files that are shared across ALL projects in the organisation.
7
-
8
- Intended to be run ONCE by a platform engineer or engineering lead.
9
- Output is committed to a shared `mindforge-org-config` repository
10
- and distributed to projects as a git submodule or npm package.
11
-
12
- ## Step 1 — Gather org information
13
-
14
- Ask (one question at a time):
15
- 1. "What is your organisation name?"
16
- 2. "Describe what your organisation builds in 1-2 sentences."
17
- 3. "What is your primary tech stack? (describe in plain English)"
18
- 4. "What is your default deployment target? (AWS / GCP / Azure / self-hosted / hybrid)"
19
- 5. "What regulatory frameworks apply to your organisation?"
20
- Options: GDPR / HIPAA / SOC 2 / PCI-DSS / ISO 27001 / None / Multiple
21
- 6. "What is your source control platform?" (GitHub / GitLab / Bitbucket / Azure DevOps)
22
- 7. "What is your issue tracker?" (Jira / GitHub Issues / Linear / Azure DevOps / None)
23
- 8. "Who are your Tier 3 compliance approvers? (email addresses, comma-separated)"
24
-
25
- ## Step 2 — Generate org-level context files
26
-
27
- Create (or update with `--update`) these files:
28
-
29
- ### `.mindforge/org/ORG.md`
30
- Populated from answers with:
31
- - Organisation identity and mission
32
- - Default tech stack with version recommendations
33
- - Architecture defaults
34
- - Team conventions
35
- - Compliance requirements
36
-
37
- ### `.mindforge/org/CONVENTIONS.md`
38
- Generate sensible defaults based on the tech stack detected.
39
- For TypeScript/Node.js stacks: strict TypeScript, ESLint, Conventional Commits
40
- For Python stacks: ruff, mypy, black formatting
41
- For Go: standard Go toolchain conventions
42
- Mark each section clearly: [DEFAULT] or [CUSTOMISE THIS]
43
-
44
- ### `.mindforge/org/SECURITY.md`
45
- Generate based on declared compliance frameworks:
46
- - GDPR → include GDPR-specific policies
47
- - HIPAA → include PHI handling requirements
48
- - PCI-DSS → include card data handling policies
49
- - SOC 2 → include access control requirements
50
- Mark critical sections: [REVIEW WITH SECURITY TEAM]
51
-
52
- ### `.mindforge/org/TOOLS.md`
53
- Generate approved library list based on tech stack.
54
- Include common forbidden libraries (moment.js, request, etc.)
55
- Mark: [ADD YOUR APPROVED LIBRARIES]
56
-
57
- ### `.mindforge/org/integrations/INTEGRATIONS-CONFIG.md`
58
- Pre-populate based on declared platforms:
59
- - GitHub → fill GitHub config section
60
- - Jira → fill Jira config section
61
- Mark credential fields clearly: [SET VIA ENVIRONMENT VARIABLE]
62
-
63
- ### `.mindforge/governance/GOVERNANCE-CONFIG.md`
64
- Pre-populate based on declared approvers and compliance frameworks.
65
- Higher compliance burden → lower Tier 2/3 thresholds.
66
- Stricter approval SLAs for HIPAA/PCI-DSS organisations.
67
-
68
- ## Step 3 — Generate skills recommendation
69
-
70
- Based on the tech stack and compliance requirements, recommend skills to install:
71
-
72
- ```
73
- Recommended skills for your tech stack:
74
-
75
- Core skills (already included — v0.6.0):
76
- ✅ security-review, code-quality, api-design, testing-standards, documentation,
77
- performance, accessibility, data-privacy, incident-response, database-patterns
78
-
79
- Additional skills recommended for your stack:
80
- [tech-stack-specific recommendations from registry]
81
-
82
- For your compliance requirements:
83
- [compliance-specific skill recommendations]
84
-
85
- Install all recommendations?
86
- yes → npx mindforge-skills install [list]
87
- no → I'll show you the install commands for each
88
- ```
89
-
90
- ## Step 4 — Create distribution package
91
-
92
- Offer to create an org-skills npm package for distributing org-level config:
93
-
94
- ```
95
- Create `@your-org/mindforge-config` npm package?
96
- This package will distribute your org-level MindForge configuration
97
- to all projects in your organisation via: npx @your-org/mindforge-config
98
-
99
- Files included:
100
- .mindforge/org/ORG.md
101
- .mindforge/org/CONVENTIONS.md
102
- .mindforge/org/SECURITY.md
103
- .mindforge/org/TOOLS.md
104
- .mindforge/org/skills/MANIFEST.md
105
- .mindforge/org/integrations/INTEGRATIONS-CONFIG.md (without credentials)
106
- .mindforge/governance/GOVERNANCE-CONFIG.md (without credentials)
107
- ```
108
-
109
- ## Step 5 — Write AUDIT entry and report
110
-
111
- ```json
112
- { "event": "org_initialised", "org_name": "[name]", "compliance_frameworks": [...], "skills_recommended": [...] }
113
- ```
114
-
115
- Report:
116
- ```
117
- ✅ MindForge organisation configuration complete.
118
-
119
- Files created:
120
- .mindforge/org/ORG.md
121
- .mindforge/org/CONVENTIONS.md
122
- .mindforge/org/SECURITY.md
123
- .mindforge/org/TOOLS.md
124
- .mindforge/governance/GOVERNANCE-CONFIG.md
125
-
126
- Next steps:
127
- 1. Review each file — look for [CUSTOMISE THIS] markers
128
- 2. Fill in SECURITY.md with your security team
129
- 3. Commit to your org's mindforge-config repository
130
- 4. Share with all projects: npx @your-org/mindforge-config (if you created the package)
131
- ```
1
+ ---
2
+ name: mindforge:init-org
3
+ description: Set up MindForge at the organization level with standardized context
4
+ argument-hint: [--org-name "Name"] [--update]
5
+ allowed-tools:
6
+ - run_command
7
+ - list_dir
8
+ - write_to_file
9
+ - view_file
10
+ ---
11
+
12
+ <objective>
13
+ Establish a consistent engineering culture and governance framework by generating organization-wide context files, security policies, and tech stack defaults for all projects.
14
+ </objective>
15
+
16
+ <execution_context>
17
+ .claude/commands/mindforge/init-org.md
18
+ </execution_context>
19
+
20
+ <context>
21
+ Scope: Organization-wide (Tier 1/2).
22
+ Output: Shared `.mindforge/org/` repository or npm package.
23
+ Governance: Defines Tier 2/3 approver lists and compliance burdens.
24
+ </context>
25
+
26
+ <process>
27
+ 1. **Interview**: Conduct a structured interview about org identity, tech stack, deployment defaults, and compliance (GDPR, HIPAA, etc.).
28
+ 2. **Generate Defaults**:
29
+ - `ORG.md`: Mission and global architecture defaults.
30
+ - `CONVENTIONS.md`: Tech-stack-specific coding standards.
31
+ - `SECURITY.md`: Compliance-mapped security policies.
32
+ - `TOOLS.md`: Approved library and dependency list.
33
+ 3. **Configuration**: Pre-populate `INTEGRATIONS-CONFIG.md` and `GOVERNANCE-CONFIG.md`.
34
+ 4. **Skill Recommendation**: Suggest core and compliance skills to install org-wide.
35
+ 5. **Distribution**: Offer to package the configuration into an npm package for project-wide inheritance.
36
+ 6. **Audit**: Log `org_initialised` with frameworks and recommended skills.
37
+ </process>
@@ -1,155 +1,40 @@
1
- Initialise a new project under the MindForge framework.
2
-
3
- ## Pre-check
4
- Read `.planning/PROJECT.md`. If it already exists and contains content,
5
- ask: "A project is already initialised. Do you want to reinitialise? (yes/no)"
6
- Stop if the user says no.
7
-
8
- ## Step 1 — Requirements interview
9
- Ask these questions one at a time. Wait for the full answer before asking the next.
10
- Do not batch them. Do not rush.
11
-
12
- 1. "What is this project? Give me a 1-2 sentence description."
13
- 2. "Who is the primary user? Describe them specifically."
14
- 3. "What problem does this solve for them? What is the pain today?"
15
- 4. "What tech stack do you want to use? (Say 'recommend one' if unsure.)"
16
- — If they say recommend: ask 3 clarifying questions about team size,
17
- deployment environment, and performance requirements. Then recommend
18
- a specific stack with brief rationale for each choice.
19
- 5. "What is explicitly NOT in scope for v1? Name at least 3 things."
20
- 6. "What does a successful v1 look like? How will you know it worked?"
21
- 7. "Are there any compliance requirements? (GDPR, HIPAA, SOC2, PCI-DSS, none)"
22
-
23
- ## Step 2 — Create context files
24
-
25
- Write `.planning/PROJECT.md`:
26
- ```markdown
27
- # [Project Name]
28
- [One-line description]
29
-
30
- ## Problem statement
31
- [From answer 3]
32
-
33
- ## Target user
34
- [From answer 2]
35
-
36
- ## Tech stack
37
- | Layer | Choice | Rationale |
38
- |------------|-----------------|--------------------------------|
39
- | [layer] | [technology] | [why] |
40
-
41
- ## v1 scope — IN
42
- [Bullet list of what is included]
43
-
44
- ## v1 scope — OUT (explicitly excluded)
45
- [Bullet list from answer 5]
46
-
47
- ## Success criteria
48
- [From answer 6]
49
-
50
- ## Compliance
51
- [From answer 7]
52
-
53
- ## Initialised
54
- [ISO 8601 timestamp]
55
- ```
56
-
57
- Write `.planning/REQUIREMENTS.md`:
58
- ```markdown
59
- # Requirements — [Project Name]
60
-
61
- ## Functional requirements
62
- | ID | Requirement | Acceptance criterion | Scope |
63
- |-------|--------------------------|--------------------------------|-------|
64
- | FR-01 | | | v1 |
65
-
66
- ## Non-functional requirements
67
- | ID | Category | Requirement | Measure |
68
- |--------|---------------|--------------------------------|----------------|
69
- | NFR-01 | Performance | | |
70
- | NFR-02 | Security | | |
71
- | NFR-03 | Availability | | |
72
-
73
- ## Out of scope
74
- [Items explicitly excluded from v1]
75
- ```
76
-
77
- Write `.planning/STATE.md`:
78
- ```markdown
79
- # MindForge — Project State
80
-
81
- ## Status
82
- Project initialised. No phases started.
83
-
84
- ## Current phase
85
- None
86
-
87
- ## Last completed task
88
- Project initialisation
89
-
90
- ## Next action
91
- Run /mindforge:plan-phase 1 to begin planning Phase 1.
92
-
93
- ## Decisions made
94
- - Project scope defined (see PROJECT.md)
95
- - Tech stack chosen (see PROJECT.md)
96
-
97
- ## Active blockers
98
- None
99
-
100
- ## Last updated
101
- [ISO 8601 timestamp]
102
- ```
103
-
104
- Write `.planning/HANDOFF.json`:
105
- ```json
106
- {
107
- "schema_version": "1.0.0",
108
- "project": "[project name]",
109
- "phase": null,
110
- "plan": null,
111
- "plan_step": null,
112
- "last_completed_task": {
113
- "description": "Project initialisation",
114
- "commit_sha": null,
115
- "verified": true
116
- },
117
- "next_task": "Run /mindforge:plan-phase 1",
118
- "in_progress": {
119
- "file": null,
120
- "intent": null,
121
- "completed_steps": [],
122
- "remaining_steps": []
123
- },
124
- "blockers": [],
125
- "decisions_needed": [],
126
- "context_refs": [
127
- ".planning/PROJECT.md",
128
- ".planning/STATE.md",
129
- ".planning/REQUIREMENTS.md"
130
- ],
131
- "agent_notes": "Fresh project. Read PROJECT.md and REQUIREMENTS.md before planning.",
132
- "session_summary": "Project initialised.",
133
- "recent_files": [
134
- ".planning/PROJECT.md",
135
- ".planning/REQUIREMENTS.md",
136
- ".planning/STATE.md",
137
- ".planning/HANDOFF.json"
138
- ],
139
- "recent_commits": [],
140
- "updated_at": "[ISO 8601 timestamp]",
141
- "_warning": "Never store secrets, tokens, or passwords in this file. It is tracked in git."
142
- }
143
- ```
144
-
145
- ## Step 3 — Confirm and guide
146
- Tell the user:
147
- "✅ MindForge project initialised.
148
-
149
- Files created:
150
- .planning/PROJECT.md
151
- .planning/REQUIREMENTS.md
152
- .planning/STATE.md
153
- .planning/HANDOFF.json
154
-
155
- Next step: Run /mindforge:plan-phase 1 to plan your first phase."
1
+ ---
2
+ name: mindforge:init-project
3
+ description: Initialise a new project under the MindForge framework
4
+ argument-hint: none
5
+ allowed-tools:
6
+ - view_file
7
+ - write_to_file
8
+ - list_dir
9
+ ---
10
+
11
+ <objective>
12
+ Initialise a new project by conducting a structured requirements interview, setting up the `.planning/` directory, and creating the foundational context files (PROJECT.md, REQUIREMENTS.md, STATE.md, HANDOFF.json).
13
+ </objective>
14
+
15
+ <execution_context>
16
+ .claude/commands/mindforge/init-project.md
17
+ </execution_context>
18
+
19
+ <context>
20
+ Target Directory: .planning/
21
+ State: Checks if .planning/PROJECT.md already exists before re-initialising.
22
+ </context>
23
+
24
+ <process>
25
+ 1. **Pre-check**: Read `.planning/PROJECT.md`. If it exists, ask the user if they want to re-initialise.
26
+ 2. **Requirements Interview**: Ask the following 7 questions one by one:
27
+ - Description of the project.
28
+ - Primary user description.
29
+ - Problem statement.
30
+ - Tech stack (recommend one if requested).
31
+ - Scope exclusions (v1).
32
+ - Success criteria.
33
+ - Compliance requirements.
34
+ 3. **Generate Context Files**:
35
+ - Write `.planning/PROJECT.md` with the interview results.
36
+ - Write `.planning/REQUIREMENTS.md` with functional and non-functional tables.
37
+ - Write `.planning/STATE.md` set to "Project initialised".
38
+ - Write `.planning/HANDOFF.json` with initial state and context references.
39
+ 4. **Finalize**: Confirm the creation of files and guide the user to the next step (`/mindforge:plan-phase 1`).
40
+ </process>