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,29 +1,23 @@
1
1
  ---
2
- name: mindforge:new-runtime
3
- description: Scaffold support for a new AI coding runtime
4
- argument-hint: [name]
5
- allowed-tools:
6
- - run_command
7
- - list_dir
8
- - write_to_file
2
+ description: Scaffold support for a new AI coding runtime.
9
3
  ---
10
4
 
11
- <objective>
12
- Extend MindForge to support additional AI environments (Zed, Cursor, Void, etc.) by scaffolding the necessary instruction files and updating the global installer configuration.
13
- </objective>
14
-
15
- <execution_context>
16
- .claude/commands/mindforge/new-runtime.md
17
- </execution_context>
18
-
19
- <context>
20
- Config: bin/installer-core.js
21
- Targets: Global and Local scopes.
22
- </context>
23
-
24
- <process>
25
- 1. **Identify**: Determine the specific instruction file format for the target runtime.
26
- 2. **Scaffold**: Create the directory structure and placeholder documentation for the new integration.
27
- 3. **Configure**: Update the central `installer-core.js` mapping to include the new runtime identifier.
28
- 4. **Onboard**: Generate customized first-run instructions for the user to enable the runtime immediately.
29
- </process>
5
+ # /mindforge:new-runtime
6
+
7
+ Scaffold support for a new AI coding runtime.
8
+
9
+ ## Usage
10
+
11
+ /mindforge:new-runtime [name]
12
+
13
+ ## Action
14
+
15
+ 1. Identify target runtime's entry file format (e.g. .myrules, instructions.md)
16
+ 2. Scaffold the required directories in both global and local scopes
17
+ 3. Add a new entry to the RUNTIMES configuration in `bin/installer-core.js`
18
+ 4. Generate first-run instructions for the new runtime
19
+
20
+ ## Examples
21
+
22
+ /mindforge:new-runtime void-editor
23
+ /mindforge:new-runtime zed-ai
@@ -1,34 +1,109 @@
1
1
  ---
2
- name: mindforge:next
3
- description: Auto-detect the current state and execute the appropriate next step
4
- argument-hint: none
5
- allowed-tools:
6
- - list_dir
7
- - view_file
2
+ description: Auto-detect the current project state and execute the appropriate next step.
8
3
  ---
9
4
 
10
- <objective>
11
- Simplify the developer workflow by automatically determining the most logical next action based on the current project state, guided by `STATE.md` and `HANDOFF.json`.
12
- </objective>
13
-
14
- <execution_context>
15
- .claude/commands/mindforge/next.md
16
- </execution_context>
17
-
18
- <context>
19
- Priority: `HANDOFF.json` is used for session continuity if updated within 48 hours.
20
- State Awareness: Detects missing initialisation, missing plans, partial execution, or pending verification/shipping.
21
- </context>
22
-
23
- <process>
24
- 1. **Session Check**: Read `HANDOFF.json`. If a fresh `next_task` exists, offer to resume.
25
- 2. **State Analysis**: Run the decision tree against `STATE.md`:
26
- - Not initialised? → `init-project`.
27
- - No phases? → `plan-phase 1`.
28
- - Plan missing? → `plan-phase [N]`.
29
- - Partial execution? → Offer to resume `execute-phase [N]`.
30
- - Pending verification? `verify-phase [N]`.
31
- - Pending shipping? `ship [N]`.
32
- 3. **Handling Partially Executed Phases**: Identify specifically which plans lack SUMMARY files and offer targeted resumption.
33
- 4. **Confirm**: Present the detected next step and command to the user for confirmation before acting.
34
- </process>
5
+ # MindForge — Next Command
6
+ # Usage: /mindforge:next
7
+
8
+ Auto-detect the current project state and execute the appropriate next step.
9
+ The user does not need to know the workflow. MindForge figures it out.
10
+
11
+ ## HANDOFF.json priority rule
12
+ Check HANDOFF.json BEFORE running the decision tree.
13
+
14
+ If HANDOFF.json exists AND `updated_at` is within 48 hours AND `next_task` is not null:
15
+ present the HANDOFF state first. Only run the decision tree if the user declines
16
+ or the HANDOFF.json is stale.
17
+
18
+ ## State detection logic
19
+
20
+ Read STATE.md and HANDOFF.json. Then follow this decision tree:
21
+
22
+ ### Decision tree
23
+
24
+ ```
25
+ Does .planning/PROJECT.md exist AND have content?
26
+ NO Run /mindforge:init-project
27
+ YES Continue
28
+
29
+ Does .planning/ROADMAP.md exist AND have phases defined?
30
+ NO → Tell user: "Project is initialised but no phases are defined yet.
31
+ Describe what Phase 1 should accomplish and I'll plan it."
32
+ Then run /mindforge:plan-phase 1
33
+ YES → Continue
34
+
35
+ Read the phase status from STATE.md.
36
+
37
+ Does the current phase have plans? (check .planning/phases/[N]/PLAN-[N]-*.md)
38
+ NO → Run /mindforge:plan-phase [N]
39
+ YES → Continue
40
+
41
+ Do SUMMARY files exist for all plans in the current phase?
42
+ NO → Run /mindforge:execute-phase [N]
43
+ YES → Continue
44
+
45
+ Does VERIFICATION.md exist for the current phase?
46
+ NO → Run /mindforge:verify-phase [N] (automated part)
47
+ YES → Continue
48
+
49
+ Does UAT.md exist and show all tests passing?
50
+ NO → Run /mindforge:verify-phase [N] (UAT part)
51
+ YES → Continue
52
+
53
+ Is this phase marked as shipped in STATE.md?
54
+ NO → Run /mindforge:ship [N]
55
+ YES → Continue
56
+
57
+ Are there more phases in ROADMAP.md?
58
+ YES → Increment phase number. Run /mindforge:plan-phase [N+1]
59
+ NO → Tell user: "All phases complete! Run /mindforge:ship [N] for the final release."
60
+ ```
61
+
62
+ ## Partial phase execution handling
63
+ In the decision tree step "Do SUMMARY files exist for all plans?":
64
+
65
+ Do not treat this as binary. Check individually:
66
+
67
+ ```
68
+ PLAN-[N]-01.md exists? SUMMARY-[N]-01.md exists?
69
+ PLAN-[N]-02.md exists? SUMMARY-[N]-02.md exists?
70
+ PLAN-[N]-03.md exists? SUMMARY-[N]-03.md exists?
71
+ ```
72
+
73
+ If some SUMMARY files exist and some don't: this is a partially-executed phase.
74
+ Report: "Phase [N] is partially executed: plans [X, Y] are done, [Z] is not."
75
+ Ask: "Resume execution from Plan [Z]? (yes/no)"
76
+ Do not restart the entire phase — resume from the first missing SUMMARY.
77
+
78
+ ## Before auto-executing: always confirm
79
+ Before running any command automatically, tell the user:
80
+
81
+ ```
82
+ MindForge next step detected:
83
+ Current state : [description of current state]
84
+ Next action : [what will be run]
85
+ Command : /mindforge:[command] [args]
86
+
87
+ Run this now? (yes/no/different)
88
+ ```
89
+
90
+ If user says "different": ask what they want to do instead.
91
+ If user says "yes": proceed with the detected command.
92
+
93
+ ## Handling HANDOFF.json (session restart)
94
+ If HANDOFF.json has a `next_task` field from a previous session:
95
+ Present it prominently:
96
+
97
+ ```
98
+ Previous session found:
99
+ Saved at : [updated_at from HANDOFF.json]
100
+ Left off : [last_completed_task]
101
+ Next task : [next_task]
102
+
103
+ Options:
104
+ 1. Continue from where we left off
105
+ 2. Check current state and determine next step fresh
106
+ 3. Tell me what you want to do
107
+
108
+ Choose 1, 2, or 3:
109
+ ```
@@ -1,34 +1,131 @@
1
1
  ---
2
- name: mindforge:plan-phase
3
- description: Plan a project phase by generating atomic task plans
4
- argument-hint: [N]
5
- allowed-tools:
6
- - view_file
7
- - write_to_file
8
- - list_dir
2
+ description: Plan a project phase. Usage: /mindforge:plan-phase [N]
9
3
  ---
10
4
 
11
- <objective>
12
- Generate a series of atomic, verifiable task plans for a specific project phase, incorporating domain research and captured implementation decisions.
13
- </objective>
14
-
15
- <execution_context>
16
- .claude/commands/mindforge/plan-phase.md
17
- </execution_context>
18
-
19
- <context>
20
- Arguments: $ARGUMENTS (Phase N)
21
- Prerequisites: PROJECT.md, REQUIREMENTS.md, ARCHITECTURE.md, STATE.md, and optionally CONTEXT.md.
22
- Output: .planning/phases/phase-[N]/PLAN-[N]-[NN].md
23
- </context>
24
-
25
- <process>
26
- 1. **Pre-read**: Resolve phase number and read all foundational context files. If `CONTEXT.md` exists, respect prior decisions.
27
- 2. **Domain Research**: Investigate best libraries, pitfalls, and patterns. Save to `RESEARCH.md`.
28
- 3. **Task Planning**: Create 3-6 atomic PLAN files using the MindForge XML task format. Each plan must be:
29
- - Completatable in one window.
30
- - Targeted at <6 files.
31
- - Verifiable via a deterministic command.
32
- 4. **Validation**: Cross-reference plans against requirements and architecture. Ensure `<verify>` steps are runnable.
33
- 5. **Finalize**: Update `STATE.md` and display the list of generated plans to the user.
34
- </process>
5
+ Plan a project phase. Usage: /mindforge:plan-phase [N]
6
+
7
+ ## Pre-check
8
+ If N is not given, read STATE.md for the current phase number and increment by 1.
9
+ Read PROJECT.md, REQUIREMENTS.md, ARCHITECTURE.md, and STATE.md before proceeding.
10
+
11
+ ## Pre-read (before any questions or planning)
12
+
13
+ Read these files in order:
14
+ 1. `AGENTS_LEARNING.md` (MUST READ to avoid repeating past mistakes)
15
+ 2. `.planning/PROJECT.md`
16
+ 3. `.planning/REQUIREMENTS.md`
17
+ 4. `.planning/ARCHITECTURE.md`
18
+ 5. `.planning/STATE.md`
19
+ 6. `.planning/phases/phase-[N]/CONTEXT.md` (if it exists)
20
+
21
+ ### If CONTEXT.md exists for phase [N]:
22
+ This means `/mindforge:discuss-phase [N]` was already run.
23
+ The user's implementation decisions are already captured.
24
+ DO NOT re-ask questions that CONTEXT.md already answers.
25
+ Read CONTEXT.md completely before asking any clarifying questions.
26
+ Report: "I've read the phase discussion context. [N] decisions were captured.
27
+ Planning will follow these decisions."
28
+
29
+ ### If CONTEXT.md has open questions:
30
+ Read the "Open questions" section in CONTEXT.md.
31
+ Present unresolved questions to the user NOW, before planning begins.
32
+ Do not create plans that assume answers to open questions without confirming first.
33
+
34
+ ### If CONTEXT.md does NOT exist for phase [N]:
35
+ Proceed normally with the discussion → planning flow.
36
+
37
+ ## Step 1 — Discuss phase scope
38
+ Ask:
39
+ 1. "Describe what Phase [N] should accomplish. 2-3 sentences."
40
+ 2. "Have you already made any implementation decisions for this phase?
41
+ (libraries, patterns, approaches) If yes, list them."
42
+ 3. "Are there any constraints I should know about?
43
+ (deadlines, dependencies on other teams, tech limitations)"
44
+
45
+ Write answers to `.planning/phases/phase-[N]/CONTEXT.md`.
46
+
47
+ If `.planning/phases/phase-[N]/CONTEXT.md` already exists:
48
+ 1. Read it first.
49
+ 2. If it has "Open questions", ask the user to resolve them before planning.
50
+ 3. Update CONTEXT.md with the answers and mark those questions as resolved.
51
+
52
+ ### If CONTEXT.md exists — skip already-answered questions
53
+ Only ask about areas NOT covered in CONTEXT.md.
54
+ Example: if CONTEXT.md captures the layout decision, do not ask "What layout do you want?"
55
+ Respect the prior discussion. Build on it. Do not repeat it.
56
+
57
+ ## Step 2 — Domain research (spawn subagent)
58
+ Spawn a research subagent with this context only:
59
+ - The tech stack from PROJECT.md
60
+ - The phase scope from CONTEXT.md
61
+ - CONVENTIONS.md
62
+
63
+ Instruct it to investigate:
64
+ 1. Best available libraries for this phase's requirements (with version numbers)
65
+ 2. Common pitfalls and anti-patterns for this tech domain
66
+ 3. Project-specific anti-patterns from `AGENTS_LEARNING.md`
67
+ 4. Relevant architectural patterns (with tradeoffs)
68
+ 5. Any known security considerations specific to this domain
69
+
70
+ Write findings to `.planning/phases/phase-[N]/RESEARCH.md`.
71
+
72
+ ## Step 3 — Create atomic task plans
73
+ Based on CONTEXT.md and RESEARCH.md, create 3-6 PLAN files.
74
+ Each plan must be completable in a single fresh context window.
75
+ Each plan targets specific files — no plan should touch more than 6 files.
76
+
77
+ File naming: `.planning/phases/phase-[N]/PLAN-[N]-[NN].md`
78
+ Example: `.planning/phases/1/PLAN-1-01.md`
79
+
80
+ Each plan uses this XML format:
81
+
82
+ ```xml
83
+ <task type="auto">
84
+ <n>Short descriptive task name</n>
85
+ <persona>developer</persona>
86
+ <phase>[N]</phase>
87
+ <plan>[NN]</plan>
88
+ <dependencies>List any PLAN files that must complete before this one, or "none"</dependencies>
89
+ <files>
90
+ src/exact/file/path.ts
91
+ src/another/file.ts
92
+ </files>
93
+ <context>
94
+ Relevant decisions from ARCHITECTURE.md:
95
+ - [decision]
96
+ Skills to load before starting:
97
+ - [skill name if applicable, or "none"]
98
+ </context>
99
+ <action>
100
+ Precise implementation instructions.
101
+ Include exact library names and versions.
102
+ Include the approach, not just the goal.
103
+ Include specific anti-patterns to avoid.
104
+ </action>
105
+ <verify>
106
+ [Exact runnable command or check]
107
+ Example: curl -X POST localhost:3000/api/auth/login -d '{"email":"test@test.com","password":"test"}' | jq .status
108
+ Must produce a deterministic pass/fail result.
109
+ </verify>
110
+ <done>One sentence definition of done.</done>
111
+ </task>
112
+ ```
113
+
114
+ ## Step 4 — Validate plans
115
+ Check every plan against REQUIREMENTS.md:
116
+ - Does this plan implement anything out of scope? If yes: revise.
117
+ - Does this plan contradict ARCHITECTURE.md? If yes: create an ADR first.
118
+ - Is the `<verify>` step actually runnable? If no: rewrite it.
119
+
120
+ ## Step 5 — Update state and confirm
121
+ Update STATE.md: current phase = N, status = "Phase N planned, ready to execute".
122
+
123
+ Tell the user:
124
+ "✅ Phase [N] planned. [X] task plans created.
125
+
126
+ Plans:
127
+ PLAN-[N]-01: [task name]
128
+ PLAN-[N]-02: [task name]
129
+ ...
130
+
131
+ Run /mindforge:execute-phase [N] to begin execution."
@@ -1,34 +1,44 @@
1
1
  ---
2
- name: mindforge:plugins
3
- description: Manage MindForge plugins and their permission scopes
4
- argument-hint: [list|install|uninstall|info|validate|create]
5
- allowed-tools:
6
- - run_command
7
- - list_dir
8
- - view_file
9
- - write_to_file
2
+ description: Read PLUGINS-MANIFEST.md. Display installed plugins with version and permissions.
10
3
  ---
11
4
 
12
- <objective>
13
- Extend MindForge core functionality through a secure plugin architecture, managing the lifecycle and security boundaries of installed extensions.
14
- </objective>
5
+ # MindForge — Plugins Command
6
+ # Usage: /mindforge:plugins [list|install|uninstall|info|validate|create] [name]
15
7
 
16
- <execution_context>
17
- .claude/commands/mindforge/plugins.md
18
- </execution_context>
8
+ ## list
9
+ Read PLUGINS-MANIFEST.md. Display installed plugins with version and permissions.
10
+ If no plugins: "No plugins installed. Find plugins: npm search mindforge-plugin"
19
11
 
20
- <context>
21
- Manifest: PLUGINS-MANIFEST.md
22
- Loader: plugin-loader.md
23
- Security: Level 1+2 skill validation, injection guards, and explicit permission prompts.
24
- </context>
12
+ ## install [plugin-name]
13
+ Full installation protocol per plugin-loader.md:
14
+ 1. Resolve package: `mindforge-plugin-[name]` convention
15
+ 2. Download to chmod 700 temp directory
16
+ 3. Validate plugin.json manifest
17
+ 4. Check plugin_api_version compatibility (1.0.0 required)
18
+ 5. Run injection guard on ALL .md files in the plugin
19
+ 6. Run Level 1 + 2 skill validation on all SKILL.md files
20
+ 7. Display permission list for user approval:
21
+ ```
22
+ Plugin: mindforge-plugin-jira-advanced v1.0.0
23
+ Requests these permissions:
24
+ • read_audit_log: read AUDIT.jsonl ✅ (safe)
25
+ • write_audit_log: append to AUDIT.jsonl ⚠️
26
+ • network_access: make HTTP requests ⚠️
27
+ Install? (yes/no)
28
+ ```
29
+ 8. Install components (commands, skills, personas, hooks)
30
+ 9. Add to PLUGINS-MANIFEST.md
31
+ 10. Write AUDIT entry
25
32
 
26
- <process>
27
- 1. **Route Action**:
28
- - `list`: Show installed plugins and versions.
29
- - `install`: Execute the full installation protocol (download, validate manifest, run security guards, prompt for permissions).
30
- - `uninstall`: Cleanly remove all components and update the manifest.
31
- - `validate`: Audit all installed plugins for injection safety and permission compliance.
32
- 2. **Permission Management**: Display a clear list of requested permissions (network, registry, audit write) and await user approval.
33
- 3. **Audit**: Log all plugin installations and removals.
34
- </process>
33
+ ## uninstall [plugin-name]
34
+ Remove all installed components. Update PLUGINS-MANIFEST.md.
35
+ Confirm: "This will remove [N] commands, [N] skills from this plugin."
36
+
37
+ ## info [plugin-name]
38
+ Display: version, description, author, permissions, commands, skills, personas, hooks.
39
+
40
+ ## validate
41
+ Validate all installed plugins for compatibility, injection safety, permission scope.
42
+
43
+ ## create [plugin-name]
44
+ Generate a plugin scaffold:
@@ -1,32 +1,45 @@
1
1
  ---
2
- name: mindforge:pr-review
3
- description: Run the AI PR review engine on a pull request diff
4
- argument-hint: [--diff path] [--sha base..head] [--output github|json|markdown]
5
- allowed-tools:
6
- - run_command
7
- - view_file
8
- - write_to_file
2
+ description: Run the AI PR review engine on a pull request diff.
9
3
  ---
10
4
 
11
- <objective>
12
- Automate the review of pull request diffs using an AI engine, providing structured feedback in various formats (GitHub, JSON, Markdown) tailored to the type of changes made.
13
- </objective>
14
-
15
- <execution_context>
16
- .claude/commands/mindforge/pr-review.md
17
- </execution_context>
18
-
19
- <context>
20
- Source: Diff file, SHA range, or staged changes.
21
- Knowledge: PROJECT.md, ARCHITECTURE.md, CONVENTIONS.md, SECURITY.md.
22
- Environment: Requires ANTHROPIC_API_KEY for external model calls.
23
- </context>
24
-
25
- <process>
26
- 1. **Determine Source**: Extract the diff from the provided path, SHA range, or git state.
27
- 2. **Load Context**: Gather project-level documentation and relevant ADRs.
28
- 3. **Select Template**: Detect change type (Auth, DB, API) and select the corresponding review template.
29
- 4. **Execute Review**: Invoke the Claude API with the built system/review prompts.
30
- 5. **Format Output**: Generate the report according to the `--output` flag (GitHub-flavoured MD, JSON, or standard MD).
31
- 6. **Finalize**: Write to the specified destination (CI /tmp/ or interactive console) and log the event.
32
- </process>
5
+ # MindForge — PR Review Command
6
+ # Usage: /mindforge:pr-review [--diff path] [--sha base..head] [--output github|json|markdown]
7
+
8
+ Run the AI PR review engine on a pull request diff.
9
+
10
+ Steps:
11
+ 1. Determine diff source:
12
+ - `--diff path`: read diff from file
13
+ - `--sha base..head`: run `git diff base..head`
14
+ - Default: `git diff HEAD~1` (last commit) or `git diff --staged` (staged changes)
15
+
16
+ 2. Load review context (per ai-reviewer.md):
17
+ - PROJECT.md, ARCHITECTURE.md, CONVENTIONS.md, SECURITY.md
18
+ - Current phase's CONTEXT.md (if in an active phase)
19
+ - Any active ADRs relevant to changed files
20
+
21
+ 3. Detect change type and select review template:
22
+ - Auth/security changes Security-focused review template
23
+ - Database migrations Database migration review template
24
+ - API changes API breaking change review template
25
+ - Default Standard review template
26
+
27
+ 4. Check API availability:
28
+ - ANTHROPIC_API_KEY set? If not: warn and skip AI review
29
+ - Check daily review limit (from ai-reviewer.md)
30
+ - Check cache: has this SHA been reviewed in the last 60 minutes?
31
+
32
+ 5. Call Claude API (per ai-reviewer.md buildSystemPrompt + buildReviewPrompt)
33
+ - Handle errors gracefully — API unavailable is NOT a build failure
34
+ - Timeout: 60 seconds
35
+
36
+ 6. Format output per --output flag:
37
+ - github: GitHub-flavoured markdown for PR comment
38
+ - json: structured JSON with findings array
39
+ - markdown: standard markdown
40
+
41
+ 7. Write to output:
42
+ - If in CI: write to /tmp/mindforge-review.md (read by GitHub Actions step)
43
+ - If interactive: display to user
44
+
45
+ 8. Write AUDIT entry
@@ -1,30 +1,27 @@
1
1
  ---
2
- name: mindforge:profile-team
3
- description: Generate and maintain team/developer profiles for response personalization
4
- argument-hint: [--refresh] [--developer email] [--questionnaire]
5
- allowed-tools:
6
- - view_file
7
- - write_to_file
8
- - run_command
2
+ description: Generate and maintain team/developer profiles for response personalization.
9
3
  ---
10
4
 
11
- <objective>
12
- Enhance agent collaboration by building profiles of individual developers and the team as a whole, tailoring guidance and responses based on observed patterns and declared preferences.
13
- </objective>
5
+ # MindForge — Profile Team Command
6
+ # Usage: /mindforge:profile-team [--refresh] [--developer email] [--questionnaire]
14
7
 
15
- <execution_context>
16
- .claude/commands/mindforge/profile-team.md
17
- </execution_context>
8
+ Generate and maintain team/developer profiles for response personalization.
18
9
 
19
- <context>
20
- Sources: AUDIT logs, git history, metrics, and interactive questionnaires.
21
- Storage: .mindforge/team/profiles/
22
- </context>
10
+ ## Data sources
11
+ 1. Declared questionnaire preferences
12
+ 2. Inferred patterns from AUDIT + git history + metrics
13
+ 3. Defaults from org conventions
23
14
 
24
- <process>
25
- 1. **Data Harvest**: Analyze recent commits and audit logs to infer developer style and expertise.
26
- 2. **Preference Intake**: If `--questionnaire` is set, ask preference questions about verbosity, explanation depth, and review style.
27
- 3. **Synthesis**: Update the `.mindforge/team/TEAM-PROFILE.md` and individual developer profile files.
28
- 4. **Refresh**: Run periodic updates to account for shifting team dynamics or new members.
29
- 5. **Audit**: Log `team_profile_updated` with developer counts.
30
- </process>
15
+ ## Outputs
16
+ - `.mindforge/team/TEAM-PROFILE.md`
17
+ - `.mindforge/team/profiles/PROFILE-[dev-id].md`
18
+
19
+ ## Modes
20
+ - `--refresh`: inference-only update
21
+ - `--developer`: target one developer profile
22
+ - `--questionnaire`: prompt preference questions before writing
23
+
24
+ ## AUDIT
25
+ ```json
26
+ { "event": "team_profile_updated", "developers_profiled": 1, "method": "inferred" }
27
+ ```
@@ -1,30 +1,23 @@
1
1
  ---
2
- name: mindforge:publish-skill
3
- description: Validate and publish a skill to a registry
4
- argument-hint: [skill-dir] [--registry URL] [--dry-run]
5
- allowed-tools:
6
- - run_command
7
- - view_file
2
+ description: Publish a skill to the npm registry (or private registry).
8
3
  ---
9
4
 
10
- <objective>
11
- Facilitate code reuse and community contribution by verifying, packaging, and uploading local skills to an npm or private registry after passing rigorous quality checks.
12
- </objective>
5
+ # MindForge — Publish Skill Command
6
+ # Usage: /mindforge:publish-skill [skill-dir] [--registry URL] [--dry-run]
13
7
 
14
- <execution_context>
15
- .claude/commands/mindforge/publish-skill.md
16
- </execution_context>
8
+ Publish a skill to the npm registry (or private registry).
17
9
 
18
- <context>
19
- Auditors: Level 1, 2, and 3 validation from skill-validator.md.
20
- Format: Standard npm package with `mindforge` fields.
21
- </context>
22
-
23
- <process>
24
- 1. **Audit**: Run full multi-level validation. Fail on structural or security issues.
25
- 2. **Metadata Check**: Ensure `package.json`, `SKILL.md`, and `CHANGELOG.md` are in sync and complete.
26
- 3. **Preview**: Run `npm pack --dry-run` and list files for user confirmation.
27
- 4. **Publish**: Upload the package (public by default) to the resolved registry.
28
- 5. **Verify**: Query the registry to confirm the version is live.
29
- 6. **Audit**: Log `skill_published` with package name and version.
30
- </process>
10
+ Pre-publication checklist:
11
+ 1. Run full skill validation (Level 1 + 2 + 3 from skill-validator.md)
12
+ Fail if Level 1 or 2 fails. Warn if Level 3 fails.
13
+ 2. Verify package.json has `mindforge` field with all required sub-fields
14
+ 3. Verify CHANGELOG.md has an entry for the current version
15
+ 4. Check if version already published: `npm info [package-name]@[version]`
16
+ If already published: error "Version already exists. Bump the version."
17
+ 5. Run `npm pack --dry-run` to preview what will be published
18
+ 6. Confirm with user: "These files will be published: [list]. Proceed? (yes/no)"
19
+ 7. If --dry-run: stop here, show preview only
20
+ 8. Publish: `npm publish --access public`
21
+ 9. Verify: `npm info [package-name]@[version]` confirm publication succeeded
22
+ 10. Write AUDIT: `{ "event": "skill_published", "package": "...", "version": "..." }`
23
+ 11. Report: "✅ [package-name]@[version] published to npm registry"
@@ -1,31 +1,20 @@
1
1
  ---
2
- name: mindforge:qa
3
- description: Run systematic visual QA on changed UI surfaces
4
- argument-hint: [--phase N] [--auto]
5
- allowed-tools:
6
- - run_command
7
- - list_dir
8
- - open_browser_url
9
- - view_file
2
+ description: @mindforge qa [--phase N] [--auto]
10
3
  ---
11
4
 
12
- <objective>
13
- Automatically identify UI regressions and visual bugs by scanning phase diffs for frontend changes, navigating to affected pages, and performing automated sanity checks.
14
- </objective>
5
+ # /mindforge:qa
15
6
 
16
- <execution_context>
17
- .claude/commands/mindforge/qa.md
18
- </execution_context>
7
+ ## Usage
8
+ `@mindforge qa [--phase N] [--auto]`
19
9
 
20
- <context>
21
- Scope: Files changed in the target phase.
22
- Output: QA-REPORT report and automated Playwright regression tests.
23
- </context>
10
+ ## Description
11
+ Runs systematic visual QA on UI surfaces changed in the current phase.
12
+ Analyzes git diff to find pages, navigates to them, and looks for errors.
24
13
 
25
- <process>
26
- 1. **Diff Analysis**: Identify changed pages/routes from git history.
27
- 2. **Visual Scan**: Navigate to affected URLs using the browser tool.
28
- 3. **Bug Hunting**: Look for console errors, hydration issues, and visual brokenness.
29
- 4. **Reporting**: Generate a `QA-REPORT-[N].md` with screenshots of findings.
30
- 5. **Sanitization**: Draft regression tests in `tests/regression/` to prevent recurrence.
31
- </process>
14
+ ## Options
15
+ - `--phase N`: Target specific phase for reporting (defaults to current).
16
+ - `--auto`: Automatically run after successful wave execution if configured.
17
+
18
+ ## Output
19
+ - `QA-REPORT-[N].md`: Found bugs with screenshots.
20
+ - `tests/regression/*.test.ts`: Playwright tests to prevent bug recurrence.