mindforge-cc 2.0.0-alpha.4 → 2.0.0-alpha.7

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 (39) hide show
  1. package/.agent/CLAUDE.md +37 -7
  2. package/.agent/mindforge/dashboard.md +98 -0
  3. package/.agent/mindforge/init-project.md +12 -0
  4. package/.claude/CLAUDE.md +37 -7
  5. package/.claude/commands/mindforge/dashboard.md +98 -0
  6. package/.mindforge/dashboard/api-reference.md +122 -0
  7. package/.mindforge/dashboard/dashboard-spec.md +96 -0
  8. package/.planning/approvals/v2-architecture-approval.json +15 -0
  9. package/CHANGELOG.md +12 -2
  10. package/README.md +18 -2
  11. package/RELEASENOTES.md +1 -1
  12. package/bin/change-classifier.js +86 -0
  13. package/bin/dashboard/api-router.js +198 -0
  14. package/bin/dashboard/approval-handler.js +134 -0
  15. package/bin/dashboard/frontend/index.html +511 -0
  16. package/bin/dashboard/metrics-aggregator.js +296 -0
  17. package/bin/dashboard/server.js +135 -0
  18. package/bin/dashboard/sse-bridge.js +178 -0
  19. package/bin/dashboard/team-tracker.js +0 -0
  20. package/bin/governance/approve.js +60 -0
  21. package/bin/installer-core.js +68 -12
  22. package/bin/mindforge-cli.js +87 -0
  23. package/bin/wizard/setup-wizard.js +5 -1
  24. package/docs/Context/Master-Context.md +11 -11
  25. package/docs/architecture/README.md +2 -0
  26. package/docs/architecture/decision-records-index.md +20 -20
  27. package/docs/ci-cd.md +92 -0
  28. package/docs/commands-reference.md +1 -0
  29. package/docs/enterprise-setup.md +1 -1
  30. package/docs/feature-dashboard.md +52 -0
  31. package/docs/publishing-guide.md +16 -51
  32. package/docs/reference/commands.md +42 -42
  33. package/docs/reference/config-reference.md +2 -2
  34. package/docs/reference/sdk-api.md +1 -1
  35. package/docs/testing-current-version.md +130 -0
  36. package/docs/user-guide.md +24 -2
  37. package/docs/usp-features.md +15 -1
  38. package/docs/workflow-atlas.md +57 -0
  39. package/package.json +5 -2
@@ -21,7 +21,7 @@ const RUNTIMES = {
21
21
  antigravity: {
22
22
  globalDir: path.join(os.homedir(), '.gemini', 'antigravity'),
23
23
  localDir: 'agents',
24
- commandsSubdir: 'mindforge',
24
+ commandsSubdir: 'workflows',
25
25
  entryFile: 'CLAUDE.md',
26
26
  },
27
27
  };
@@ -51,6 +51,31 @@ const fsu = {
51
51
  },
52
52
  };
53
53
 
54
+ // ── Registry Management ────────────────────────────────────────────────────────
55
+ const RegistryManager = {
56
+ getRegistryPath: () => path.join(os.homedir(), '.mindforge', 'registry.json'),
57
+
58
+ registerProject(projectPath) {
59
+ const regPath = this.getRegistryPath();
60
+ fsu.ensureDir(path.dirname(regPath));
61
+
62
+ let registry = { projects: [] };
63
+ if (fsu.exists(regPath)) {
64
+ try {
65
+ registry = JSON.parse(fsu.read(regPath));
66
+ } catch (e) {
67
+ console.error(' ⚠️ Registry file corrupted, recreating...');
68
+ }
69
+ }
70
+
71
+ if (!registry.projects.includes(projectPath)) {
72
+ registry.projects.push(projectPath);
73
+ fsu.write(regPath, JSON.stringify(registry, null, 2));
74
+ console.log(` ✅ Registered project in ${regPath}`);
75
+ }
76
+ }
77
+ };
78
+
54
79
  // ── Self-install detection ────────────────────────────────────────────────────
55
80
  function isSelfInstall() {
56
81
  const pkgPath = path.join(process.cwd(), 'package.json');
@@ -125,14 +150,14 @@ function safeCopyClaude(src, dst, options = {}) {
125
150
 
126
151
  // ── Install verification ──────────────────────────────────────────────────────
127
152
  function verifyInstall(baseDir, cmdsDir, runtime, scope) {
128
- // Minimum required files for a functional installation
153
+ const pfx = runtime === 'antigravity' ? 'mindforge:' : '';
129
154
  const required = [
130
- path.join(baseDir, 'CLAUDE.md'),
131
- path.join(cmdsDir, 'help.md'),
132
- path.join(cmdsDir, 'init-project.md'),
133
- path.join(cmdsDir, 'health.md'),
134
- path.join(cmdsDir, 'execute-phase.md'),
135
- path.join(cmdsDir, 'security-scan.md'),
155
+ scope === 'local' ? path.join(process.cwd(), 'CLAUDE.md') : path.join(baseDir, 'CLAUDE.md'),
156
+ path.join(cmdsDir, `${pfx}help.md`),
157
+ path.join(cmdsDir, `${pfx}init-project.md`),
158
+ path.join(cmdsDir, `${pfx}health.md`),
159
+ path.join(cmdsDir, `${pfx}execute-phase.md`),
160
+ path.join(cmdsDir, `${pfx}security-scan.md`),
136
161
  ];
137
162
 
138
163
  const missing = required.filter(f => !fsu.exists(f));
@@ -171,14 +196,28 @@ async function install(runtime, scope, options = {}) {
171
196
  return;
172
197
  }
173
198
 
174
- // ── 1. Install CLAUDE.md ────────────────────────────────────────────────────
199
+ // ── 1. Install CLAUDE.md (Root standardization for IDEs) ────────────────────
175
200
  const claudeSrc = runtime === 'claude'
176
201
  ? src('.claude', 'CLAUDE.md')
177
202
  : src('.agent', 'CLAUDE.md');
178
203
 
179
204
  if (fsu.exists(claudeSrc)) {
205
+ // Keep legacy location based on runtime config
180
206
  safeCopyClaude(claudeSrc, path.join(baseDir, 'CLAUDE.md'), { force, verbose });
181
- console.log(' ✅ CLAUDE.md');
207
+
208
+ // ✨ STANDARD: Inject into project root and IDE-specific rules files
209
+ if (scope === 'local' && !selfInstall) {
210
+ const rootClaude = path.join(process.cwd(), 'CLAUDE.md');
211
+ const rootCursor = path.join(process.cwd(), '.cursorrules');
212
+ const rootWindsurf = path.join(process.cwd(), '.windsurfrules');
213
+
214
+ safeCopyClaude(claudeSrc, rootClaude, { force, verbose });
215
+ safeCopyClaude(claudeSrc, rootCursor, { force, verbose });
216
+ safeCopyClaude(claudeSrc, rootWindsurf, { force, verbose });
217
+ console.log(' ✅ CLAUDE.md (Mirrored to project root & .cursorrules)');
218
+ } else {
219
+ console.log(' ✅ CLAUDE.md');
220
+ }
182
221
  }
183
222
 
184
223
  // ── 2. Install commands ─────────────────────────────────────────────────────
@@ -189,8 +228,24 @@ async function install(runtime, scope, options = {}) {
189
228
  if (fsu.exists(cmdSrc)) {
190
229
  fsu.ensureDir(cmdsDir);
191
230
  const files = fsu.listFiles(cmdSrc).filter(f => f.endsWith('.md'));
192
- files.forEach(f => fsu.copy(path.join(cmdSrc, f), path.join(cmdsDir, f)));
193
- console.log(` ✅ ${files.length} commands`);
231
+
232
+ // Install for specific runtime
233
+ files.forEach(f => {
234
+ const targetName = runtime === 'antigravity' ? `mindforge:${f}` : f;
235
+ fsu.copy(path.join(cmdSrc, f), path.join(cmdsDir, targetName));
236
+ });
237
+
238
+ // ✨ STANDARD: Mirror to .claude/commands for cross-IDE compatibility (Cursor/Windsurf/Claude Code)
239
+ if (scope === 'local' && runtime !== 'claude' && !selfInstall) {
240
+ const standardCmdDir = path.join(process.cwd(), '.claude', 'commands', 'mindforge');
241
+ fsu.ensureDir(standardCmdDir);
242
+ files.forEach(f => {
243
+ fsu.copy(path.join(cmdSrc, f), path.join(standardCmdDir, f));
244
+ });
245
+ console.log(` ✅ ${files.length} commands (Mirrored to .claude/commands/mindforge/)`);
246
+ } else {
247
+ console.log(` ✅ ${files.length} commands`);
248
+ }
194
249
  }
195
250
 
196
251
  // ── 3. Framework files (local scope only, non-self-install) ─────────────────
@@ -266,6 +321,7 @@ async function install(runtime, scope, options = {}) {
266
321
  }
267
322
  }
268
323
 
324
+ RegistryManager.registerProject(process.cwd());
269
325
  }
270
326
 
271
327
  // ── 4. Verify installation ──────────────────────────────────────────────────
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MindForge CLI Router — v2.0.0
4
+ * Standardizes command invocation for GitHub Actions and local development.
5
+ */
6
+
7
+ 'use strict';
8
+
9
+ const { spawnSync } = require('child_process');
10
+ const path = require('path');
11
+
12
+ const ARGS = process.argv.slice(2);
13
+ const COMMAND = ARGS[0];
14
+ const COMMAND_ARGS = ARGS.slice(1);
15
+
16
+ const ROOT = path.resolve(__dirname, '..');
17
+
18
+ const COMMANDS = {
19
+ 'security-scan': {
20
+ script: 'bin/validate-config.js',
21
+ description: 'Validate configuration and run security checks',
22
+ defaultArgs: ['MINDFORGE.md']
23
+ },
24
+ 'health': {
25
+ script: 'bin/installer-core.js',
26
+ description: 'Verify project health and installation integrity',
27
+ defaultArgs: ['--check']
28
+ },
29
+ 'headless': {
30
+ script: 'bin/autonomous/headless.js',
31
+ description: 'Run MindForge agent in headless mode'
32
+ },
33
+ 'pr-review': {
34
+ script: 'bin/review/cross-review-engine.js',
35
+ description: 'Run standard PR review logic'
36
+ },
37
+ 'cross-review': {
38
+ script: 'bin/review/cross-review-engine.js',
39
+ description: 'Run advanced cross-model review'
40
+ },
41
+ 'classify': {
42
+ script: 'bin/change-classifier.js',
43
+ description: 'Classify changes into governance tiers'
44
+ },
45
+ 'approve': {
46
+ script: 'bin/governance/approve.js',
47
+ description: 'Generate a governance approval signature to unblock Tier 3 gates'
48
+ }
49
+ };
50
+
51
+ if (!COMMAND || ARGS.includes('--help') || ARGS.includes('-h')) {
52
+ printUsage();
53
+ process.exit(0);
54
+ }
55
+
56
+ const target = COMMANDS[COMMAND];
57
+ if (!target) {
58
+ console.error(`❌ Unknown command: ${COMMAND}`);
59
+ console.error('Available commands: ' + Object.keys(COMMANDS).join(', '));
60
+ process.exit(1);
61
+ }
62
+
63
+ const scriptPath = path.join(ROOT, target.script);
64
+ const finalArgs = COMMAND_ARGS.length > 0 ? COMMAND_ARGS : (target.defaultArgs || []);
65
+
66
+ console.log(`🚀 Executing: ${COMMAND} (${target.description})`);
67
+
68
+ const result = spawnSync('node', [scriptPath, ...finalArgs], {
69
+ cwd: ROOT,
70
+ stdio: 'inherit',
71
+ env: { ...process.env, MINDFORGE_CLI: 'true' }
72
+ });
73
+
74
+ process.exit(result.status || 0);
75
+
76
+ function printUsage() {
77
+ console.log('\n⚡ MindForge Enterprise CLI\n');
78
+ console.log('Usage: node bin/mindforge-cli.js <command> [options]\n');
79
+ console.log('Commands:');
80
+ for (const [name, cfg] of Object.entries(COMMANDS)) {
81
+ console.log(` ${name.padEnd(15)} ${cfg.description}`);
82
+ }
83
+ console.log('\nExamples:');
84
+ console.log(' node bin/mindforge-cli.js security-scan');
85
+ console.log(' node bin/mindforge-cli.js headless --phase 1');
86
+ console.log('\n');
87
+ }
@@ -246,4 +246,8 @@ async function main() {
246
246
  }
247
247
  }
248
248
 
249
- main();
249
+ module.exports = { main };
250
+
251
+ if (require.main === module) {
252
+ main();
253
+ }
@@ -1,5 +1,5 @@
1
1
  # MindForge — Continuation State File
2
- # Generated: Day 7 Complete
2
+ # Generated: Complete
3
3
  # Purpose: Provide full context for resuming in a new chat session
4
4
 
5
5
  ---
@@ -10,7 +10,7 @@
10
10
  **Tagline:** Enterprise Agentic Framework — the best agentic framework
11
11
  **Repository:** `github.com/mindforge-dev/mindforge` (conceptual)
12
12
  **npm package:** `npx mindforge-cc@latest`
13
- **Current version:** v1.0.0 (first stable public release, tagged at Day 7 completion)
13
+ **Current version:** v1.0.0 (first stable public release, tagged at completion)
14
14
  **Runtimes supported:** Claude Code (`.claude/`) and Antigravity (`.agent/`)
15
15
  **License:** MIT
16
16
 
@@ -26,7 +26,7 @@ anti-pattern detector, quality metrics, team profiling).
26
26
 
27
27
  ## WHAT WAS BUILT — DAY BY DAY
28
28
 
29
- ### Day 1 — Foundation (`feat/mindforge-core-scaffold` → v0.1.0)
29
+ ### — Foundation (`feat/mindforge-core-scaffold` → v0.1.0)
30
30
 
31
31
  **Branch:** `feat/mindforge-core-scaffold`
32
32
  **Output files:** `DAY1-IMPLEMENT.md`, `DAY1-REVIEW.md`, `DAY1-HARDEN.md`
@@ -66,7 +66,7 @@ Built the entire structural foundation:
66
66
 
67
67
  ---
68
68
 
69
- ### Day 2 — Wave Execution Engine (`feat/mindforge-wave-engine` → v0.2.0)
69
+ ### — Wave Execution Engine (`feat/mindforge-wave-engine` → v0.2.0)
70
70
 
71
71
  **Branch:** `feat/mindforge-wave-engine`
72
72
  **Output files:** `DAY2-IMPLEMENT.md`, `DAY2-REVIEW.md`, `DAY2-HARDEN.md`
@@ -92,7 +92,7 @@ Built the execution engine that makes plans actually run:
92
92
 
93
93
  ---
94
94
 
95
- ### Day 3 — Skills Platform (`feat/mindforge-skills-platform` → v0.3.0)
95
+ ### — Skills Platform (`feat/mindforge-skills-platform` → v0.3.0)
96
96
 
97
97
  **Branch:** `feat/mindforge-skills-platform`
98
98
  **Output files:** `DAY3-IMPLEMENT.md`, `DAY3-REVIEW.md`, `DAY3-HARDEN.md`
@@ -130,7 +130,7 @@ Built the skills distribution and intelligence engine:
130
130
 
131
131
  ---
132
132
 
133
- ### Day 4 — Enterprise Integrations + Governance (`feat/mindforge-enterprise-integrations` → v0.4.0)
133
+ ### — Enterprise Integrations + Governance (`feat/mindforge-enterprise-integrations` → v0.4.0)
134
134
 
135
135
  **Branch:** `feat/mindforge-enterprise-integrations`
136
136
  **Output files:** `DAY4-IMPLEMENT.md`, `DAY4-REVIEW.md`, `DAY4-HARDEN.md`
@@ -167,7 +167,7 @@ Built the enterprise integration and governance layer:
167
167
 
168
168
  ---
169
169
 
170
- ### Day 5 — Intelligence Layer (`feat/mindforge-intelligence-layer` → v0.5.0)
170
+ ### — Intelligence Layer (`feat/mindforge-intelligence-layer` → v0.5.0)
171
171
 
172
172
  **Branch:** `feat/mindforge-intelligence-layer`
173
173
  **Output files:** `DAY5-IMPLEMENT.md`, `DAY5-REVIEW.md`, `DAY5-HARDEN.md`
@@ -205,7 +205,7 @@ Built the framework's self-awareness and self-improvement systems:
205
205
 
206
206
  ---
207
207
 
208
- ### Day 6 — Distribution Platform (`feat/mindforge-distribution-platform` → v0.6.0)
208
+ ### — Distribution Platform (`feat/mindforge-distribution-platform` → v0.6.0)
209
209
 
210
210
  **Branch:** `feat/mindforge-distribution-platform`
211
211
  **Output files:** `DAY6-COMPLETE.md` (all three prompts in one file)
@@ -250,7 +250,7 @@ Built the public distribution, CI/CD, SDK, and monorepo layers:
250
250
 
251
251
  ---
252
252
 
253
- ### Day 7 — Production Hardening & v1.0.0 Release (`feat/mindforge-production-release` → v1.0.0)
253
+ ### — Production Hardening & v1.0.0 Release (`feat/mindforge-production-release` → v1.0.0)
254
254
 
255
255
  **Branch:** `feat/mindforge-production-release`
256
256
  **Output files:** `DAY7-PRODUCTION-FINAL.md` (all three prompts in one file, 174KB)
@@ -621,7 +621,7 @@ Test all installer code paths on Windows. Fix path separator issues where found.
621
621
  - Community Discord/Slack setup
622
622
  - `mindforge.dev` landing page content
623
623
 
624
- ### Day 8 branch and version
624
+ ### branch and version
625
625
 
626
626
  **Branch:** `feat/mindforge-multi-runtime-dashboard`
627
627
  **Target version:** v1.1.0 (stable minor — no breaking changes)
@@ -698,4 +698,4 @@ All prompt files are in `/mnt/user-data/outputs/`:
698
698
 
699
699
  ---
700
700
 
701
- *State file generated at Day 7 completion. MindForge v1.0.0 — 36 commands · 10 skills · 8 personas · 20 ADRs · 15 test suites.*
701
+ *State file generated at completion. MindForge v1.0.0 — 36 commands · 10 skills · 8 personas · 20 ADRs · 15 test suites.*
@@ -11,6 +11,7 @@ Markdown protocols and JSON schemas, with a small Node.js CLI runtime.
11
11
  4. **Intelligence Layer** — Health, difficulty, anti-patterns in `.mindforge/intelligence/`
12
12
  5. **Knowledge Layer** — Long-term memory, capture, and sync in `.mindforge/memory/`
13
13
  6. **Distribution Layer** — Installer, registry, CI, SDK, plugins
14
+ 7. **Observability Layer (v2)** — Real-time dashboard, SSE bridge, metrics aggregator
14
15
 
15
16
  ## Key data artifacts
16
17
  - `.planning/PROJECT.md` — project brief
@@ -24,6 +25,7 @@ Markdown protocols and JSON schemas, with a small Node.js CLI runtime.
24
25
  2. `/mindforge:execute-phase` runs plans in waves
25
26
  3. `/mindforge:verify-phase` runs automated + human gates
26
27
  4. `/mindforge:ship` generates release artifacts and PR metadata
28
+ 5. `/mindforge:dashboard` provides real-time observability and governance
27
29
 
28
30
  ## Installation targets
29
31
  - Claude Code: `~/.claude/` or `.claude/`
@@ -4,23 +4,23 @@ All 20 ADRs in chronological order.
4
4
 
5
5
  | ADR | Title | Status | Day | Key decision |
6
6
  |---|---|---|---|---|
7
- | ADR-001 | HANDOFF.json for cross-session state | Accepted | Day 2 | HANDOFF.json as the primary cross-session state artifact |
8
- | ADR-002 | Markdown-based commands | Accepted | Day 1 | Slash commands as Markdown files (not code) |
9
- | ADR-003 | Keyword-trigger model for skill loading | Accepted | Day 1 | Deterministic keyword matching over AI-decided selection |
10
- | ADR-004 | Wave parallelism over full parallelism | Accepted | Day 2 | Wave-based (dependency-ordered) over unconstrained parallel |
11
- | ADR-005 | Append-only JSONL for audit log | Accepted | Day 2 | AUDIT.jsonl append-only (never update, never delete) |
12
- | ADR-006 | Three-tier skills architecture | Accepted | Day 3 | Core → Org → Project tier hierarchy |
13
- | ADR-007 | Keyword-trigger model (reaffirmed at Day 3 scale) | Accepted | Day 3 | Confirmed at 10+ skill scale |
14
- | ADR-008 | Just-in-time skill loading | Accepted | Day 3 | Load at task time, not session start |
15
- | ADR-009 | Environment-variable-only credential storage | Accepted | Day 4 | Credentials only in env vars, never in config files |
16
- | ADR-010 | Compliance gates non-bypassable; approvals allow emergency | Accepted | Day 4 | Gates: never bypass. Approvals: emergency override with audit |
17
- | ADR-011 | Integration failures are non-blocking | Accepted | Day 4 | Jira/Slack/GitHub down ≠ phase blocked |
18
- | ADR-012 | Intelligence outputs feed back into system behaviour | Accepted | Day 5 | Difficulty → granularity, retro → MINDFORGE.md, quality → behaviour |
19
- | ADR-013 | MINDFORGE.md as constitution with non-overridable primitives | Accepted | Day 5 | Non-overridable governance primitives cannot be disabled |
20
- | ADR-014 | Metrics are system signals, not developer performance | Accepted | Day 5 | Quality scores improve the system, not evaluate individuals |
21
- | ADR-015 | npm as the public skills registry | Accepted | Day 6 | npm ecosystem for skill distribution |
22
- | ADR-016 | CI timeout exits with code 0 (soft stop) | Accepted | Day 6 | Timeout = save and resume, not failure |
23
- | ADR-017 | SDK event stream is localhost-only | Accepted | Day 6 | SSE binds to 127.0.0.1 only |
24
- | ADR-018 | Installer detects and handles self-install | Accepted | Day 7 | Installer running inside its own repo = no-op for framework files |
25
- | ADR-019 | Self-update preserves original install scope | Accepted | Day 7 | Update local→local, global→global |
26
- | ADR-020 | v1.0.0 stable interface contract | Accepted | Day 7 | Defines what "stable" means for plugins and SDK consumers |
7
+ | ADR-001 | HANDOFF.json for cross-session state | Accepted | HANDOFF.json as the primary cross-session state artifact |
8
+ | ADR-002 | Markdown-based commands | Accepted | Slash commands as Markdown files (not code) |
9
+ | ADR-003 | Keyword-trigger model for skill loading | Accepted | Deterministic keyword matching over AI-decided selection |
10
+ | ADR-004 | Wave parallelism over full parallelism | Accepted | Wave-based (dependency-ordered) over unconstrained parallel |
11
+ | ADR-005 | Append-only JSONL for audit log | Accepted | AUDIT.jsonl append-only (never update, never delete) |
12
+ | ADR-006 | Three-tier skills architecture | Accepted | Core → Org → Project tier hierarchy |
13
+ | ADR-007 | Keyword-trigger model (reaffirmed at scale) | Accepted | Confirmed at 10+ skill scale |
14
+ | ADR-008 | Just-in-time skill loading | Accepted | Load at task time, not session start |
15
+ | ADR-009 | Environment-variable-only credential storage | Accepted | Credentials only in env vars, never in config files |
16
+ | ADR-010 | Compliance gates non-bypassable; approvals allow emergency | Accepted | Gates: never bypass. Approvals: emergency override with audit |
17
+ | ADR-011 | Integration failures are non-blocking | Accepted | Jira/Slack/GitHub down ≠ phase blocked |
18
+ | ADR-012 | Intelligence outputs feed back into system behaviour | Accepted | Difficulty → granularity, retro → MINDFORGE.md, quality → behaviour |
19
+ | ADR-013 | MINDFORGE.md as constitution with non-overridable primitives | Accepted | Non-overridable governance primitives cannot be disabled |
20
+ | ADR-014 | Metrics are system signals, not developer performance | Accepted | Quality scores improve the system, not evaluate individuals |
21
+ | ADR-015 | npm as the public skills registry | Accepted | npm ecosystem for skill distribution |
22
+ | ADR-016 | CI timeout exits with code 0 (soft stop) | Accepted | Timeout = save and resume, not failure |
23
+ | ADR-017 | SDK event stream is localhost-only | Accepted | SSE binds to 127.0.0.1 only |
24
+ | ADR-018 | Installer detects and handles self-install | Accepted | Installer running inside its own repo = no-op for framework files |
25
+ | ADR-019 | Self-update preserves original install scope | Accepted | Update local→local, global→global |
26
+ | ADR-020 | v1.0.0 stable interface contract | Accepted | Defines what "stable" means for plugins and SDK consumers |
package/docs/ci-cd.md ADDED
@@ -0,0 +1,92 @@
1
+ # 🚀 MindForge 5-Layer Plane Architecture (CI/CD)
2
+
3
+ MindForge v2.0.0 uses a sophisticated Control + Execution Plane architecture for its GitHub Actions, ensuring enterprise-grade governance and autonomous execution capabilities.
4
+
5
+ ## 🏗️ The 5 Planes
6
+
7
+ | Plane | Purpose | Trigger |
8
+ | --- | --- | --- |
9
+ | **Control Plane** | Change classification & Routing | `push`, `pull_request` |
10
+ | **Execution Plane** | Headless agent runtime | `workflow_call` |
11
+ | **AI Intelligence** | Multi-model code validation | PRs (reusable) |
12
+ | **Release Plane** | Packaging & Deployment | Tags (`v*`) |
13
+ | **Observability** | Run metrics & Analytics | Post-run |
14
+
15
+ ---
16
+
17
+ ## 🔄 PR Workflow Lifecycle
18
+
19
+ When you open or update a Pull Request, MindForge triggers the following "Beast" sequence:
20
+
21
+ 1. **🔍 Classify**: Analyzes diffs to assign a **Governance Tier (1, 2, or 3)**.
22
+ 2. **⚖️ Govern**:
23
+ - **Tier 3 Enforcement**: Blocks the PR if sensitive changes are detected without an approval file.
24
+ - **Security Scan**: Automatically validates `MINDFORGE.md` and project configurations.
25
+ 3. **⚡ Execute**:
26
+ - Runs **Headless Agent** to verify autonomous logic.
27
+ - Executes full **Test Suite** and **Linter**.
28
+ 4. **🤖 Review**:
29
+ - Triggers **AI Intelligence Layer** (Claude + GPT-4o).
30
+ - Posts architectural/security findings as a **PR Comment**.
31
+ 5. **📊 Observe**: Generates a performance and audit trace report.
32
+
33
+ ---
34
+
35
+ ## 🔍 Control Plane & Tiers
36
+
37
+ Every change is automatically classified into a governance tier:
38
+
39
+ - **Tier 1 (Trivial)**: Auto-approves and executes basic verification.
40
+ - **Tier 2 (Logic)**: Executes full test suites and AI review.
41
+ - **Tier 3 (Sensitive)**: Blocks the pipeline unless a manual approval is found in `.planning/approvals/`.
42
+
43
+ ---
44
+
45
+ ## 🛠️ MindForge CLI (`bin/mindforge-cli.js`)
46
+
47
+ All planes interact with MindForge via a centralized CLI router:
48
+
49
+ - `health`: Validates project integrity.
50
+ - `security-scan`: Scans for secrets and PII.
51
+ - `headless`: Executes agents in non-interactive mode.
52
+ - `pr-review`: Standard code review.
53
+ - `cross-review`: Multi-model architecture validation.
54
+
55
+ ---
56
+
57
+ ## 🛡️ Governance Enforcement
58
+
59
+ If a PR touches sensitive components (Auth, Payments, Security):
60
+ 1. The **Control Plane** identifies it as **Tier 3**.
61
+ 2. The **Governance Gate** fails unless a valid `.planning/approvals/*.json` file exists.
62
+ 3. Once approved, the **Execution Plane** resumes the workflow.
63
+
64
+
65
+
66
+ ---
67
+
68
+ ## 📦 Automated Releases
69
+
70
+ Releases are triggered by pushing a semver tag:
71
+
72
+ ```bash
73
+ git tag v2.0.0
74
+ git push origin v2.0.0
75
+ ```
76
+
77
+ This will automatically:
78
+
79
+ - Run the full test suite.
80
+ - Generate a CHANGELOG.
81
+ - Publish to npm.
82
+ - Create a GitHub Release with build artifacts.
83
+
84
+ ---
85
+
86
+ ## 📊 Observability
87
+
88
+ MindForge tracks every CI execution:
89
+
90
+ - **Success Rate**: Phase completion status.
91
+ - **Token Usage**: AI cost monitoring.
92
+ - **Audit Trace**: Full execution history in `AUDIT.jsonl`.
@@ -8,4 +8,5 @@
8
8
  | `/mindforge:execute-phase [N]` | Execute plans with wave-based parallelism |
9
9
  | `/mindforge:verify-phase [N]` | Human acceptance testing + automated checks |
10
10
  | `/mindforge:ship [N]` | Generate changelog, run quality gates, create PR |
11
+ | `/mindforge:dashboard` | Manage the real-time web observability dashboard |
11
12
 
@@ -18,7 +18,7 @@ Configure Jira, Confluence, Slack, and SCM governance safely without storing
18
18
  - never use `curl -v` with Authorization headers
19
19
  - rotate credentials by updating the environment, not config files
20
20
 
21
- ## Supported Day 4 outputs
21
+ ## Supported outputs
22
22
  - Jira epics and stories for phases/plans
23
23
  - Confluence architecture and ADR publishing
24
24
  - Slack notifications and thread tracking
@@ -0,0 +1,52 @@
1
+ # Feature: Real-time Dashboard (v2)
2
+
3
+ The MindForge Real-time Dashboard provides a high-fidelity, web-based control center for your agentic workflows. It leverages **Server-Sent Events (SSE)** to push live updates from your codebase directly to your browser with zero performance overhead.
4
+
5
+ ## 🚀 Getting Started
6
+
7
+ To launch the dashboard:
8
+ ```bash
9
+ /mindforge:dashboard --start --open
10
+ ```
11
+
12
+ Default access: `http://localhost:7339` (Strictly bound to `127.0.0.1` for security).
13
+
14
+ ## 🛠 Key Features
15
+
16
+ ### 1. Live Audit Stream
17
+ - Real-time rolling feed of all `AUDIT.jsonl` events.
18
+ - Color-coded status indicators (Success, Failure, Security Warning).
19
+ - Detailed JSON inspection for every action.
20
+
21
+ ### 2. Performance Metrics
22
+ - **Token Costs**: Cumulative and session-based cost tracking across all providers.
23
+ - **Quality Score**: Real-time graphing of verify-pass-rates.
24
+ - **Compaction Health**: Monitoring of context management efficiency.
25
+
26
+ ### 3. Web-based Governance
27
+ - **Tier 2/3 Approvals**: Review pending architectural or security changes.
28
+ - **Tier 3 Confirmation**: Mandatory plan ID typing for high-risk approvals is enforced in the UI.
29
+ - **Decision History**: Interactive timeline of past approvals and rejections.
30
+
31
+ ### 4. Team & Agent Activity
32
+ - **Wave Progress**: Track multiple agents executing parallel waves.
33
+ - **Persona Context**: See which agent personas are currently active.
34
+ - **Steerage Feed**: View steering instructions as they are applied.
35
+
36
+ ## 🛡 Hardened Security
37
+ - **Localhost Binding**: The server refuses connections from external IPs.
38
+ - **CORS Lock-down**: Only allows requests from the local control plane.
39
+ - **Integrity First**: Audit logs are written by the backend *before* changes are committed, ensuring a bulletproof trail.
40
+
41
+ ## 📟 Command Reference
42
+
43
+ | Flag | Action |
44
+ | :--- | :--- |
45
+ | `--start` | Launch the dashboard server process. |
46
+ | `--stop` | Gracefully shut down the server. |
47
+ | `--status` | Check if the dashboard is running and get PID. |
48
+ | `--open` | Open the UI in your default browser. |
49
+ | `--port [N]` | Change the default port (7339). |
50
+
51
+ ---
52
+ *For technical implementation details, see `.mindforge/dashboard/dashboard-spec.md`.*
@@ -10,69 +10,34 @@ This guide outlines the standard procedure for publishing a new version of `mind
10
10
 
11
11
  ## Step-by-Step Workflow
12
12
 
13
- ### 1. Versioning Strategy
13
+ ### 1. Pre-Flight Verification & Adversarial Review
14
+ Before any release, ensure the following is completed:
14
15
 
15
- MindForge follows [Semantic Versioning (SemVer)](https://semver.org/).
16
+ - **Structural Integrity**: Run `npm test` to verify layout and command mirroring.
17
+ - **Security Check**: Run `/mindforge:security-scan` to ensure no keys or CVEs are present.
18
+ - **Mult-Model Review**: Run `/mindforge:cross-review` to have multiple models (Claude, GPT, Gemini) audit the new features for edge cases.
16
19
 
17
- - **Major (X.0.0)**: Breaking changes or significant architecture shifts.
18
- - **Minor (0.X.0)**: New features, non-breaking.
19
- - **Patch (0.0.X)**: Bug fixes, performance improvements.
20
- - **Prereleases**: Append `-alpha.N`, `-beta.N`, or `-rc.N` (e.g., `2.0.0-alpha.4`).
20
+ ### 2. Versioning Strategy
21
+ MindForge follows SemVer. Update `package.json` and `CHANGELOG.md` first.
21
22
 
22
- ### 2. Pre-Publish Verification
23
+ ### 3. Automated Release Workflow
24
+ MindForge provides a built-in workflow to handle the heavy lifting:
23
25
 
24
- Always run the integrity suite before publishing:
26
+ 1. Run the slash command: `/publish-release`
27
+ 2. Follow the interactive prompts to execute tests and dry runs.
25
28
 
26
- ```bash
27
- npm test
28
- ```
29
-
30
- This verifies that:
31
- - All required directories and files exist.
32
- - Commands are mirrored between `.claude/` and `.agent/`.
33
- - `package.json` metadata is valid.
34
- - No secrets are leaked.
35
-
36
- ### 3. Dry Run
37
-
38
- Validate the package contents:
29
+ ### 4. Manual Publishing (Fallback)
30
+ If the workflow is unavailable:
39
31
 
40
32
  ```bash
41
- npm pack --dry-run
33
+ npm publish --tag alpha --access public
42
34
  ```
43
35
 
44
- Review the file list in the output to ensure no internal config or temporary files are included.
45
-
46
- ### 4. Publishing
47
-
48
- #### Stable Releases
49
- For stable versions (e.g., `2.0.0`), use a standard publish:
50
-
51
- ```bash
52
- npm publish --access public
53
- ```
54
-
55
- #### Prereleases (Alpha/Beta/RC)
56
- For prerelease versions, you **MUST** specify a tag to avoid them being installed as `@latest`:
57
-
58
- ```bash
59
- npm publish --tag [alpha|beta|rc] --access public
60
- ```
61
-
62
- ### 5. Git Tagging
63
-
64
- After a successful publish, tag the commit in Git:
65
-
36
+ ### 5. Git Tagging & Origin Sync
66
37
  ```bash
67
38
  git tag v[version]
68
- git push origin v[version]
39
+ git push origin --tags
69
40
  ```
70
41
 
71
- ## Troubleshooting
72
-
73
- - **403 Forbidden**: Usually means the version already exists on npm or you don't have permissions.
74
- - **Tag Required**: If you get an error about specifying a tag, it's because you are publishing a version with a hyphen (prerelease) without the `--tag` flag.
75
- - **Integrity Failure**: Fix the structural issues reported by `npm test` before retrying.
76
-
77
42
  ---
78
43
  *Last Updated: 2026-03-22*