mindforge-cc 11.6.0 → 11.7.1

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 (52) hide show
  1. package/.agent/mindforge/wf-catalog.md +37 -0
  2. package/.agent/mindforge/wf-code-audit.md +31 -0
  3. package/.agent/mindforge/wf-competitive-analysis.md +31 -0
  4. package/.agent/mindforge/wf-deep-research.md +32 -0
  5. package/.agent/mindforge/wf-feature-planner.md +31 -0
  6. package/.agent/mindforge/wf-incident-response.md +31 -0
  7. package/.agent/mindforge/wf-onboard-codebase.md +31 -0
  8. package/.agent/mindforge/wf-perf-optimize.md +31 -0
  9. package/.agent/mindforge/wf-pr-review.md +31 -0
  10. package/.agent/mindforge/wf-refactor-plan.md +31 -0
  11. package/.agent/mindforge/wf-release-prep.md +31 -0
  12. package/.agent/mindforge/wf-tdd-sprint.md +31 -0
  13. package/.agent/mindforge/wf-tech-evaluation.md +31 -0
  14. package/.claude/commands/mindforge/wf-catalog.md +37 -0
  15. package/.claude/commands/mindforge/wf-code-audit.md +31 -0
  16. package/.claude/commands/mindforge/wf-competitive-analysis.md +31 -0
  17. package/.claude/commands/mindforge/wf-deep-research.md +32 -0
  18. package/.claude/commands/mindforge/wf-feature-planner.md +31 -0
  19. package/.claude/commands/mindforge/wf-incident-response.md +31 -0
  20. package/.claude/commands/mindforge/wf-onboard-codebase.md +31 -0
  21. package/.claude/commands/mindforge/wf-perf-optimize.md +31 -0
  22. package/.claude/commands/mindforge/wf-pr-review.md +31 -0
  23. package/.claude/commands/mindforge/wf-refactor-plan.md +31 -0
  24. package/.claude/commands/mindforge/wf-release-prep.md +31 -0
  25. package/.claude/commands/mindforge/wf-tdd-sprint.md +31 -0
  26. package/.claude/commands/mindforge/wf-tech-evaluation.md +31 -0
  27. package/.mindforge/config.json +2 -2
  28. package/.mindforge/dynamic-workflows/REGISTRY.md +65 -0
  29. package/.mindforge/dynamic-workflows/index.json +171 -0
  30. package/.mindforge/dynamic-workflows/scripts/code-audit.js +103 -0
  31. package/.mindforge/dynamic-workflows/scripts/competitive-analysis.js +85 -0
  32. package/.mindforge/dynamic-workflows/scripts/deep-research.js +151 -0
  33. package/.mindforge/dynamic-workflows/scripts/feature-planner.js +104 -0
  34. package/.mindforge/dynamic-workflows/scripts/incident-response.js +106 -0
  35. package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +102 -0
  36. package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +128 -0
  37. package/.mindforge/dynamic-workflows/scripts/pr-review.js +87 -0
  38. package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +121 -0
  39. package/.mindforge/dynamic-workflows/scripts/release-prep.js +102 -0
  40. package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +103 -0
  41. package/.mindforge/dynamic-workflows/scripts/tech-evaluation.js +72 -0
  42. package/.mindforge/memory/sync-manifest.json +1 -1
  43. package/CHANGELOG.md +34 -0
  44. package/MINDFORGE.md +2 -2
  45. package/README.md +37 -4
  46. package/RELEASENOTES.md +54 -0
  47. package/bin/installer-core.js +6 -2
  48. package/bin/mindforge-cli.js +7 -0
  49. package/bin/parse-workflow-args.js +47 -0
  50. package/bin/workflows/workflow-runner.js +110 -0
  51. package/docs/commands-reference.md +25 -0
  52. package/package.json +2 -1
@@ -0,0 +1,87 @@
1
+ export const meta = {
2
+ name: 'pr-review',
3
+ description: '4-dimensional parallel PR review: correctness, security, performance, style → consensus verdict',
4
+ whenToUse: 'When you want a thorough multi-perspective review of a pull request or diff',
5
+ phases: [
6
+ { title: 'Scope', detail: 'Read diff and build review context' },
7
+ { title: 'Review', detail: '4 parallel reviewers: correctness / security / performance / style' },
8
+ { title: 'Consensus', detail: 'Merge findings, deduplicate, score severity' },
9
+ { title: 'Verdict', detail: 'Produce APPROVED / CHANGES REQUIRED verdict with findings' },
10
+ ],
11
+ };
12
+
13
+ export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
14
+ const REVIEW_SCHEMA = {
15
+ type: 'object',
16
+ properties: {
17
+ dimension: { type: 'string' },
18
+ findings: {
19
+ type: 'array',
20
+ items: {
21
+ type: 'object',
22
+ properties: {
23
+ severity: { type: 'string', enum: ['blocking', 'major', 'minor', 'suggestion'] },
24
+ location: { type: 'string' },
25
+ issue: { type: 'string' },
26
+ suggestion: { type: 'string' },
27
+ },
28
+ required: ['severity', 'issue', 'suggestion'],
29
+ },
30
+ },
31
+ summary: { type: 'string' },
32
+ },
33
+ required: ['dimension', 'findings', 'summary'],
34
+ };
35
+
36
+ const VERDICT_SCHEMA = {
37
+ type: 'object',
38
+ properties: {
39
+ verdict: { type: 'string', enum: ['APPROVED', 'APPROVED_WITH_SUGGESTIONS', 'CHANGES_REQUIRED', 'BLOCKING'] },
40
+ summary: { type: 'string' },
41
+ blockingIssues: { type: 'array', items: { type: 'string' } },
42
+ majorIssues: { type: 'array', items: { type: 'string' } },
43
+ suggestions: { type: 'array', items: { type: 'string' } },
44
+ },
45
+ required: ['verdict', 'summary', 'blockingIssues', 'majorIssues', 'suggestions'],
46
+ };
47
+
48
+ const target = args || 'current git diff HEAD~1 (run from repo root)';
49
+
50
+ phase('Scope');
51
+ log(`Reviewing: ${target}`);
52
+
53
+ const REVIEWERS = [
54
+ { label: 'correctness', prompt: `Review this code change for CORRECTNESS: "${target}". Check for: logic errors, off-by-one bugs, null/undefined handling, incorrect assumptions, broken edge cases, missing error handling, incorrect API usage, race conditions, and test coverage gaps. Rate each finding as blocking/major/minor/suggestion.` },
55
+ { label: 'security', prompt: `Review this code change for SECURITY: "${target}". Check for: injection vulnerabilities, broken authentication, XSS, CSRF, insecure direct object references, sensitive data exposure, hardcoded credentials, missing authorization checks, and insecure dependencies. Rate each as blocking/major/minor/suggestion.` },
56
+ { label: 'performance', prompt: `Review this code change for PERFORMANCE: "${target}". Check for: N+1 queries, missing indexes, inefficient algorithms, memory leaks, synchronous blocking operations, unnecessary re-renders, large bundle imports, missing caching, and scalability concerns. Rate each as blocking/major/minor/suggestion.` },
57
+ { label: 'style', prompt: `Review this code change for CODE STYLE and MAINTAINABILITY: "${target}". Check for: naming conventions, function length, complexity, magic numbers, dead code, missing comments for non-obvious logic, inconsistent patterns, DRY violations, and adherence to project conventions. Rate each as blocking/major/minor/suggestion.` },
58
+ ];
59
+
60
+ phase('Review');
61
+ const reviews = await parallel(
62
+ REVIEWERS.map(r => () => agent(r.prompt, { schema: REVIEW_SCHEMA, label: `review:${r.label}`, phase: 'Review' }))
63
+ );
64
+
65
+ phase('Consensus');
66
+ const allFindings = reviews.filter(Boolean).flatMap(r => r.findings.map(f => ({ ...f, dimension: r.dimension })));
67
+ const blocking = allFindings.filter(f => f.severity === 'blocking');
68
+ const major = allFindings.filter(f => f.severity === 'major');
69
+ const minor = allFindings.filter(f => f.severity === 'minor');
70
+ const suggestions = allFindings.filter(f => f.severity === 'suggestion');
71
+ log(`${allFindings.length} total findings: ${blocking.length} blocking, ${major.length} major, ${minor.length} minor, ${suggestions.length} suggestions`);
72
+
73
+ const findingsSummary = allFindings.slice(0, 20).map(f => `[${f.severity.toUpperCase()}][${f.dimension}] ${f.issue} → ${f.suggestion}`).join('\n');
74
+
75
+ phase('Verdict');
76
+ const verdict = await agent(
77
+ `Produce a final PR review verdict for: "${target}"\n\nFindings:\n${findingsSummary}\n\nIf there are any blocking issues, verdict is BLOCKING. If major issues exist, CHANGES_REQUIRED. If only minor/suggestions, APPROVED_WITH_SUGGESTIONS. Otherwise APPROVED.`,
78
+ { schema: VERDICT_SCHEMA, label: 'verdict' }
79
+ );
80
+
81
+ return {
82
+ target,
83
+ reviews: reviews.filter(Boolean),
84
+ verdict,
85
+ stats: { total: allFindings.length, blocking: blocking.length, major: major.length, minor: minor.length, suggestions: suggestions.length },
86
+ };
87
+ }
@@ -0,0 +1,121 @@
1
+ export const meta = {
2
+ name: 'refactor-plan',
3
+ description: 'Technical debt scan → risk-sorted sequence → safe refactor implementation plan',
4
+ whenToUse: 'When you need to plan a refactoring safely without breaking existing behavior',
5
+ phases: [
6
+ { title: 'Scan', detail: 'Identify technical debt, complexity hotspots, dead code' },
7
+ { title: 'Prioritize', detail: 'Risk-sort by blast radius and test coverage' },
8
+ { title: 'Sequence', detail: 'Order changes to minimize merge conflicts' },
9
+ { title: 'Plan', detail: 'Produce step-by-step refactor plan with verification gates' },
10
+ ],
11
+ };
12
+
13
+ export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
14
+ const DEBT_SCHEMA = {
15
+ type: 'object',
16
+ properties: {
17
+ area: { type: 'string' },
18
+ debts: {
19
+ type: 'array',
20
+ items: {
21
+ type: 'object',
22
+ properties: {
23
+ type: { type: 'string' },
24
+ location: { type: 'string' },
25
+ description: { type: 'string' },
26
+ blastRadius: { type: 'string', enum: ['wide', 'medium', 'narrow'] },
27
+ testCoverage: { type: 'string', enum: ['good', 'partial', 'none'] },
28
+ },
29
+ required: ['type', 'description', 'blastRadius', 'testCoverage'],
30
+ },
31
+ },
32
+ },
33
+ required: ['area', 'debts'],
34
+ };
35
+
36
+ const PRIORITY_SCHEMA = {
37
+ type: 'object',
38
+ properties: {
39
+ prioritized: {
40
+ type: 'array',
41
+ items: {
42
+ type: 'object',
43
+ properties: {
44
+ rank: { type: 'number' },
45
+ description: { type: 'string' },
46
+ risk: { type: 'string', enum: ['low', 'medium', 'high'] },
47
+ rationale: { type: 'string' },
48
+ prerequisite: { type: 'string' },
49
+ },
50
+ required: ['rank', 'description', 'risk', 'rationale'],
51
+ },
52
+ },
53
+ },
54
+ required: ['prioritized'],
55
+ };
56
+
57
+ const PLAN_SCHEMA = {
58
+ type: 'object',
59
+ properties: {
60
+ summary: { type: 'string' },
61
+ steps: {
62
+ type: 'array',
63
+ items: {
64
+ type: 'object',
65
+ properties: {
66
+ step: { type: 'number' },
67
+ title: { type: 'string' },
68
+ action: { type: 'string' },
69
+ verification: { type: 'string' },
70
+ rollback: { type: 'string' },
71
+ estimatedEffort: { type: 'string' },
72
+ },
73
+ required: ['step', 'title', 'action', 'verification'],
74
+ },
75
+ },
76
+ totalEstimate: { type: 'string' },
77
+ risks: { type: 'array', items: { type: 'string' } },
78
+ },
79
+ required: ['summary', 'steps', 'totalEstimate', 'risks'],
80
+ };
81
+
82
+ const target = args || 'current codebase (run from repo root)';
83
+
84
+ phase('Scan');
85
+ log(`Scanning: ${target}`);
86
+
87
+ const SCAN_AREAS = [
88
+ { label: 'structural', prompt: `Scan for structural technical debt in: "${target}". Look for: God objects/files (>400 lines), circular dependencies, tight coupling, missing abstraction layers, inconsistent patterns across similar features.` },
89
+ { label: 'complexity', prompt: `Scan for complexity debt in: "${target}". Look for: functions >50 lines, nesting >4 levels, cyclomatic complexity, boolean parameter flags, long parameter lists, feature envy, shotgun surgery patterns.` },
90
+ { label: 'maintenance', prompt: `Scan for maintenance debt in: "${target}". Look for: dead code, commented-out code, outdated comments, TODO/FIXME/HACK markers, deprecated API usage, inconsistent naming, magic numbers/strings.` },
91
+ ];
92
+
93
+ const scans = await parallel(
94
+ SCAN_AREAS.map(a => () => agent(a.prompt, { schema: DEBT_SCHEMA, label: `scan:${a.label}`, phase: 'Scan' }))
95
+ );
96
+
97
+ phase('Prioritize');
98
+ const allDebts = scans.filter(Boolean).flatMap(s => s.debts);
99
+ log(`Found ${allDebts.length} debt items across ${scans.filter(Boolean).length} areas`);
100
+ const debtList = allDebts.slice(0, 20).map((d, i) => `${i + 1}. [blast:${d.blastRadius}][coverage:${d.testCoverage}] ${d.description}`).join('\n');
101
+ const prioritized = await agent(
102
+ `Prioritize this refactoring backlog by risk. Items with narrow blast radius + good test coverage = tackle first (low risk). Wide blast radius + no coverage = tackle last or skip.\n\nDebts:\n${debtList}`,
103
+ { schema: PRIORITY_SCHEMA, label: 'prioritize' }
104
+ );
105
+
106
+ phase('Sequence');
107
+ const topItems = prioritized.prioritized.slice(0, 10).map(p => `${p.rank}. [${p.risk}] ${p.description}: ${p.rationale}`).join('\n');
108
+
109
+ phase('Plan');
110
+ const plan = await agent(
111
+ `Create a safe, step-by-step refactoring plan for: "${target}"\n\nPrioritized items:\n${topItems}\n\nFor each step, specify: the action to take, how to verify it didn't break anything, rollback procedure, and estimated effort. Order steps to minimize merge conflicts.`,
112
+ { schema: PLAN_SCHEMA, label: 'plan' }
113
+ );
114
+
115
+ return {
116
+ target,
117
+ debtItems: allDebts.length,
118
+ prioritized: prioritized.prioritized,
119
+ plan,
120
+ };
121
+ }
@@ -0,0 +1,102 @@
1
+ export const meta = {
2
+ name: 'release-prep',
3
+ description: 'Automated release pipeline: tests → changelog → version bump → PR → announcement draft',
4
+ whenToUse: 'When preparing a production release and need all release artifacts generated',
5
+ phases: [
6
+ { title: 'Check', detail: 'Verify tests pass, no uncommitted changes, CI status' },
7
+ { title: 'Changelog', detail: 'Generate changelog from commits since last release' },
8
+ { title: 'Bump', detail: 'Identify next version using semver conventions' },
9
+ { title: 'PR', detail: 'Draft release PR description and announcement' },
10
+ ],
11
+ };
12
+
13
+ export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
14
+ const READINESS_SCHEMA = {
15
+ type: 'object',
16
+ properties: {
17
+ ready: { type: 'boolean' },
18
+ blockers: { type: 'array', items: { type: 'string' } },
19
+ warnings: { type: 'array', items: { type: 'string' } },
20
+ testSummary: { type: 'string' },
21
+ },
22
+ required: ['ready', 'blockers', 'warnings', 'testSummary'],
23
+ };
24
+
25
+ const CHANGELOG_SCHEMA = {
26
+ type: 'object',
27
+ properties: {
28
+ breaking: { type: 'array', items: { type: 'string' } },
29
+ features: { type: 'array', items: { type: 'string' } },
30
+ fixes: { type: 'array', items: { type: 'string' } },
31
+ chores: { type: 'array', items: { type: 'string' } },
32
+ highlights: { type: 'string' },
33
+ },
34
+ required: ['breaking', 'features', 'fixes', 'chores', 'highlights'],
35
+ };
36
+
37
+ const VERSION_SCHEMA = {
38
+ type: 'object',
39
+ properties: {
40
+ current: { type: 'string' },
41
+ next: { type: 'string' },
42
+ bumpType: { type: 'string', enum: ['major', 'minor', 'patch'] },
43
+ rationale: { type: 'string' },
44
+ filesToUpdate: { type: 'array', items: { type: 'string' } },
45
+ },
46
+ required: ['current', 'next', 'bumpType', 'rationale', 'filesToUpdate'],
47
+ };
48
+
49
+ const PR_SCHEMA = {
50
+ type: 'object',
51
+ properties: {
52
+ prTitle: { type: 'string' },
53
+ prBody: { type: 'string' },
54
+ announcementDraft: { type: 'string' },
55
+ releaseNotes: { type: 'string' },
56
+ },
57
+ required: ['prTitle', 'prBody', 'announcementDraft', 'releaseNotes'],
58
+ };
59
+
60
+ const context = args || 'current repository (run from repo root)';
61
+
62
+ phase('Check');
63
+ log(`Preparing release for: ${context}`);
64
+ const readiness = await agent(
65
+ `Check release readiness for: "${context}"\n\nVerify: are there uncommitted changes? Any failing tests? Any security vulnerabilities in dependencies? Any open critical bugs that should block release? List any blockers and warnings.`,
66
+ { schema: READINESS_SCHEMA, label: 'check' }
67
+ );
68
+ if (!readiness.ready && readiness.blockers.length > 0) {
69
+ log(`BLOCKED: ${readiness.blockers.join(', ')}`);
70
+ }
71
+ log(`Readiness: ${readiness.ready ? 'GO' : 'BLOCKED'} — ${readiness.blockers.length} blockers, ${readiness.warnings.length} warnings`);
72
+
73
+ phase('Changelog');
74
+ const changelog = await agent(
75
+ `Generate a changelog for this release of: "${context}"\n\nAnalyze recent commits (look for conventional commit format: feat/fix/chore/refactor/docs/test/perf/ci). Separate into: breaking changes, new features, bug fixes, chores. Write a highlights summary (2-3 sentences).`,
76
+ { schema: CHANGELOG_SCHEMA, label: 'changelog' }
77
+ );
78
+ log(`Changelog: ${changelog.breaking.length} breaking, ${changelog.features.length} features, ${changelog.fixes.length} fixes`);
79
+
80
+ phase('Bump');
81
+ const changelogSummary = `Breaking: ${changelog.breaking.length}, Features: ${changelog.features.length}, Fixes: ${changelog.fixes.length}`;
82
+ const version = await agent(
83
+ `Determine the next semantic version for: "${context}"\nChanges: ${changelogSummary}\nHighlights: ${changelog.highlights}\n\nUse semver rules: breaking change = major bump, new features = minor bump, fixes only = patch bump. List all files that need version updated.`,
84
+ { schema: VERSION_SCHEMA, label: 'bump' }
85
+ );
86
+ log(`Version: ${version.current} → ${version.next} (${version.bumpType})`);
87
+
88
+ phase('PR');
89
+ const releaseContext = `Version: ${version.current} → ${version.next}\nHighlights: ${changelog.highlights}\nFeatures: ${changelog.features.slice(0, 5).join(', ')}\nFixes: ${changelog.fixes.slice(0, 5).join(', ')}`;
90
+ const pr = await agent(
91
+ `Draft the release PR and announcement for: "${context}"\n${releaseContext}\n\nWrite: a PR title and body (markdown), a 280-char social announcement draft, and full release notes (markdown, suitable for GitHub Releases).`,
92
+ { schema: PR_SCHEMA, label: 'pr' }
93
+ );
94
+
95
+ return {
96
+ context,
97
+ readiness,
98
+ changelog,
99
+ version,
100
+ pr,
101
+ };
102
+ }
@@ -0,0 +1,103 @@
1
+ export const meta = {
2
+ name: 'tdd-sprint',
3
+ description: 'Strict Red-Green-Refactor TDD loop with spec-first discipline',
4
+ whenToUse: 'When implementing a feature or fix using test-driven development methodology',
5
+ phases: [
6
+ { title: 'Spec', detail: 'Define behavior requirements and acceptance criteria' },
7
+ { title: 'Red', detail: 'Write failing test that captures the requirement' },
8
+ { title: 'Green', detail: 'Write minimal code to make the test pass' },
9
+ { title: 'Refactor', detail: 'Clean up while keeping tests green, verify all pass' },
10
+ ],
11
+ };
12
+
13
+ export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
14
+ const SPEC_SCHEMA = {
15
+ type: 'object',
16
+ properties: {
17
+ behaviorName: { type: 'string' },
18
+ given: { type: 'string' },
19
+ when: { type: 'string' },
20
+ then: { type: 'string' },
21
+ acceptanceCriteria: { type: 'array', items: { type: 'string' } },
22
+ edgeCases: { type: 'array', items: { type: 'string' } },
23
+ outOfScope: { type: 'array', items: { type: 'string' } },
24
+ },
25
+ required: ['behaviorName', 'given', 'when', 'then', 'acceptanceCriteria', 'edgeCases'],
26
+ };
27
+
28
+ const TEST_SCHEMA = {
29
+ type: 'object',
30
+ properties: {
31
+ testDescription: { type: 'string' },
32
+ testCode: { type: 'string' },
33
+ whyItFails: { type: 'string' },
34
+ fileToCreate: { type: 'string' },
35
+ },
36
+ required: ['testDescription', 'testCode', 'whyItFails', 'fileToCreate'],
37
+ };
38
+
39
+ const IMPL_SCHEMA = {
40
+ type: 'object',
41
+ properties: {
42
+ approachExplanation: { type: 'string' },
43
+ implementationCode: { type: 'string' },
44
+ fileToCreate: { type: 'string' },
45
+ minimalityRationale: { type: 'string' },
46
+ },
47
+ required: ['approachExplanation', 'implementationCode', 'fileToCreate', 'minimalityRationale'],
48
+ };
49
+
50
+ const REFACTOR_SCHEMA = {
51
+ type: 'object',
52
+ properties: {
53
+ improvements: { type: 'array', items: { type: 'string' } },
54
+ refactoredCode: { type: 'string' },
55
+ testsStillPass: { type: 'boolean' },
56
+ explanation: { type: 'string' },
57
+ },
58
+ required: ['improvements', 'refactoredCode', 'testsStillPass', 'explanation'],
59
+ };
60
+
61
+ const requirement = args || 'No requirement specified — pass your feature/behavior description as args.';
62
+
63
+ phase('Spec');
64
+ log(`Requirement: ${requirement.slice(0, 80)}`);
65
+ const spec = await agent(
66
+ `Write a precise behavioral specification for: "${requirement}"\n\nUse Given-When-Then format. Be explicit about inputs, outputs, and edge cases. List what is OUT of scope to keep this focused.`,
67
+ { schema: SPEC_SCHEMA, label: 'spec' }
68
+ );
69
+ log(`Spec: ${spec.behaviorName} | ${spec.acceptanceCriteria.length} acceptance criteria, ${spec.edgeCases.length} edge cases`);
70
+
71
+ phase('Red');
72
+ const specText = `Given: ${spec.given}\nWhen: ${spec.when}\nThen: ${spec.then}\nCriteria: ${spec.acceptanceCriteria.join(', ')}`;
73
+ const test = await agent(
74
+ `Write a FAILING test for this behavior specification:\n${specText}\n\nWrite the minimal test that will fail because the implementation doesn't exist yet. Explain WHY it fails. Use the project's test framework (detect from file extensions or state Jest/Vitest/Node assert).`,
75
+ { schema: TEST_SCHEMA, label: 'red' }
76
+ );
77
+ log(`[RED] Test: "${test.testDescription}" — fails because: ${test.whyItFails}`);
78
+
79
+ phase('Green');
80
+ const testContext = `Test: ${test.testDescription}\n\nTest code:\n${test.testCode}\n\nFails because: ${test.whyItFails}`;
81
+ const impl = await agent(
82
+ `Write the MINIMUM implementation to make this test pass:\n${testContext}\n\nWrite ONLY what is needed to make the test go green. No extra features, no future-proofing. Explain why this is the minimal solution.`,
83
+ { schema: IMPL_SCHEMA, label: 'green' }
84
+ );
85
+ log(`[GREEN] Minimal implementation: ${impl.minimalityRationale}`);
86
+
87
+ phase('Refactor');
88
+ const greenContext = `Test: ${test.testCode}\nImplementation: ${impl.implementationCode}`;
89
+ const refactored = await agent(
90
+ `Refactor this passing implementation for clarity and maintainability, keeping all tests green:\n${greenContext}\n\nList specific improvements made (naming, structure, extraction, simplification). The tests MUST still pass after refactoring.`,
91
+ { schema: REFACTOR_SCHEMA, label: 'refactor' }
92
+ );
93
+ log(`[REFACTOR] ${refactored.improvements.length} improvements, tests still pass: ${refactored.testsStillPass}`);
94
+
95
+ return {
96
+ requirement,
97
+ spec,
98
+ test,
99
+ implementation: impl,
100
+ refactored,
101
+ cycle: { red: test.testDescription, green: impl.approachExplanation, refactor: refactored.explanation },
102
+ };
103
+ }
@@ -0,0 +1,72 @@
1
+ export const meta = {
2
+ name: 'tech-evaluation',
3
+ description: 'Scored technology evaluation across DX, performance, security, ecosystem, and community',
4
+ whenToUse: 'When choosing between technologies, frameworks, or libraries for a project',
5
+ phases: [
6
+ { title: 'Scope', detail: 'Define candidates and evaluation criteria' },
7
+ { title: 'Evaluate', detail: '5 parallel dimension agents per candidate' },
8
+ { title: 'Score', detail: 'Build weighted scoring matrix' },
9
+ { title: 'Recommend', detail: 'Produce ranked recommendation with trade-offs' },
10
+ ],
11
+ };
12
+
13
+ export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
14
+ const EVAL_SCHEMA = {
15
+ type: 'object',
16
+ properties: {
17
+ dimension: { type: 'string' },
18
+ score: { type: 'number', minimum: 1, maximum: 10 },
19
+ rationale: { type: 'string' },
20
+ pros: { type: 'array', items: { type: 'string' } },
21
+ cons: { type: 'array', items: { type: 'string' } },
22
+ },
23
+ required: ['dimension', 'score', 'rationale', 'pros', 'cons'],
24
+ };
25
+
26
+ const RECOMMEND_SCHEMA = {
27
+ type: 'object',
28
+ properties: {
29
+ winner: { type: 'string' },
30
+ summary: { type: 'string' },
31
+ ranking: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, totalScore: { type: 'number' }, verdict: { type: 'string' } }, required: ['name', 'totalScore', 'verdict'] } },
32
+ tradeoffs: { type: 'array', items: { type: 'string' } },
33
+ recommendation: { type: 'string' },
34
+ },
35
+ required: ['winner', 'summary', 'ranking', 'tradeoffs', 'recommendation'],
36
+ };
37
+
38
+ const input = args || 'No candidates specified — pass "TechA vs TechB vs TechC for [use case]" as args.';
39
+
40
+ phase('Scope');
41
+ log(`Evaluating: ${input.slice(0, 80)}`);
42
+
43
+ const DIMENSIONS = [
44
+ { label: 'dx', name: 'Developer Experience', prompt: `Evaluate the developer experience of: ${input}. Consider: API ergonomics, documentation quality, error messages, learning curve, tooling, IDE support, type safety, and community examples. Score 1-10.` },
45
+ { label: 'perf', name: 'Performance', prompt: `Evaluate the runtime performance of: ${input}. Consider: throughput, latency, memory footprint, scalability, benchmarks available, and known bottlenecks. Score 1-10.` },
46
+ { label: 'security', name: 'Security', prompt: `Evaluate the security posture of: ${input}. Consider: CVE history, security audit results, supply chain risk, default-secure configuration, auth/authz support, and maintenance cadence. Score 1-10.` },
47
+ { label: 'ecosystem', name: 'Ecosystem', prompt: `Evaluate the ecosystem of: ${input}. Consider: number of integrations, plugin quality, third-party packages, cloud provider support, and lock-in risk. Score 1-10.` },
48
+ { label: 'community', name: 'Community', prompt: `Evaluate the community health of: ${input}. Consider: GitHub stars, contributor count, issue response time, Discord/Slack activity, recent releases, and long-term viability. Score 1-10.` },
49
+ ];
50
+
51
+ phase('Evaluate');
52
+ const evaluations = await parallel(
53
+ DIMENSIONS.map(d => () => agent(d.prompt, { schema: EVAL_SCHEMA, label: `eval:${d.label}`, phase: 'Evaluate' }))
54
+ );
55
+
56
+ phase('Score');
57
+ const validEvals = evaluations.filter(Boolean);
58
+ const scoreMatrix = validEvals.map(e => `${e.dimension}: ${e.score}/10 — ${e.rationale}`).join('\n');
59
+ log(`Score matrix built from ${validEvals.length} dimensions`);
60
+
61
+ phase('Recommend');
62
+ const recommendation = await agent(
63
+ `Based on this technology evaluation for "${input}", produce a ranked recommendation:\n\nScores:\n${scoreMatrix}\n\nIdentify the winner, explain the trade-offs, and give a clear recommendation for when to choose each option.`,
64
+ { schema: RECOMMEND_SCHEMA, label: 'recommend' }
65
+ );
66
+
67
+ return {
68
+ input,
69
+ evaluations: validEvals,
70
+ recommendation,
71
+ };
72
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pattern-library.jsonl": {
3
- "lastSync": "2026-06-17T12:34:17.920Z",
3
+ "lastSync": "2026-06-23T08:21:37.029Z",
4
4
  "localCount": 1
5
5
  }
6
6
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## [11.7.1] - 2026-06-23 — Workflow Forge (patch)
4
+
5
+ Patch release: adds `bin/parse-workflow-args.js` (slash command argument splitter, produced by the tdd-sprint E2E run) and resolves 2 high-severity npm vulnerabilities in the tmp/inquirer dependency chain. No feature changes; all 94 tests pass.
6
+
7
+ ---
8
+
9
+ ## [11.7.0] - 2026-06-23 — Workflow Forge
10
+
11
+ First Dynamic Workflow Library for MindForge. Adds 12 pre-built multi-agent workflow scripts that users trigger via `/mindforge:wf-*` commands. Each workflow uses Claude Code's `Workflow` tool primitives (`parallel()`, `pipeline()`, `phase()`, `agent()`) for true fan-out concurrent agent execution with structured synthesis. Architecture follows adversarially-verified best practices: three-tier progressive disclosure, one-workflow-per-domain, predefined (not open-ended) patterns.
12
+
13
+ ### Added
14
+
15
+ - **Dynamic Workflow Library (`.mindforge/dynamic-workflows/`)** — 12 self-contained multi-agent workflow scripts:
16
+ - *Research tier:* `deep-research` (5× parallel searches → 3-vote adversarial verify → cited synthesis), `competitive-analysis` (5× parallel angles → SWOT → positioning), `tech-evaluation` (5× dimension agents → scored matrix → recommendation)
17
+ - *Dev tier:* `code-audit` (3× parallel auditors → adversarial verify → risk report), `feature-planner` (brief → PRD → architecture → user stories pipeline), `pr-review` (4× parallel reviewers → consensus verdict), `tdd-sprint` (Spec → Red → Green → Refactor loop), `refactor-plan` (debt scan → risk-sort → safe sequence → plan)
18
+ - *Ops tier:* `incident-response` (4× parallel investigation → mitigation → RCA → postmortem), `release-prep` (tests → changelog → version bump → PR → announcement)
19
+ - *Intelligence tier:* `onboard-codebase` (map → domain → architecture → guided tour), `perf-optimize` (profile → 4× parallel bottleneck hunt → fix plan → benchmarks)
20
+ - **13 new slash commands** — `/mindforge:wf-catalog` (browseable index) + 12 `/mindforge:wf-<name>` workflow commands
21
+ - **CLI workflow subcommand** — `node bin/mindforge-cli.js workflow list|info|run <name>` for discovery and metadata access
22
+ - **Workflow registry** — `index.json` (machine-readable) + `REGISTRY.md` (human-readable catalog) with tier, description, phases, and command for each workflow
23
+ - **`tests/workflow-registry.test.js`** — validates registry consistency, script meta exports, command mirror parity, and frontmatter schema for all workflow commands
24
+
25
+ ### Summary
26
+
27
+ | Tier | Workflows | Commands |
28
+ |------|-----------|----------|
29
+ | Research | 3 | `wf-deep-research`, `wf-competitive-analysis`, `wf-tech-evaluation` |
30
+ | Dev | 4 | `wf-code-audit`, `wf-feature-planner`, `wf-pr-review`, `wf-tdd-sprint`, `wf-refactor-plan` |
31
+ | Ops | 2 | `wf-incident-response`, `wf-release-prep` |
32
+ | Intelligence | 2 | `wf-onboard-codebase`, `wf-perf-optimize` |
33
+ | **Total** | **12** | **13 (including wf-catalog)** |
34
+
35
+ ---
36
+
3
37
  ## [11.6.0] - 2026-06-17 — Skill Forge
4
38
 
5
39
  Largest single skill expansion in MindForge's history. Adds 80 community-sourced skills across 8 engineering domains with zero external attribution in any committed file. 30 skills are promoted to the engine tier for automatic trigger-matching; 50 live in the extended tier for explicit activation. Three new slash commands complete the discovery surface.
package/MINDFORGE.md CHANGED
@@ -3,10 +3,10 @@
3
3
  ## 1. IDENTITY & VERSIONING
4
4
 
5
5
  [NAME] = MindForge
6
- [VERSION] = 11.6.0
6
+ [VERSION] = 11.7.1
7
7
  [STABLE] = true
8
8
  [MODE] = "Platform Sovereign"
9
- [REQUIRED_CORE_VERSION] = 11.6.0
9
+ [REQUIRED_CORE_VERSION] = 11.7.1
10
10
  [SOVEREIGN_IDENTITY] = true
11
11
  [SRE_LAYER_ENABLED] = true
12
12
 
package/README.md CHANGED
@@ -4,11 +4,11 @@
4
4
 
5
5
  ---
6
6
 
7
- ## Latest: v11.6.0
7
+ ## Latest: v11.7.0
8
8
 
9
- - **v11.6.0 — "Skill Forge".** Adds 80 community-sourced skills across 8 domains (software-development, github, devops, research, security, creative, data-science, note-taking) 30 promoted to engine tier for automatic trigger-matching, 50 in the extended tier for explicit activation. Three new slash commands: `/mindforge:systematic-debug`, `/mindforge:skill-tdd`, `/mindforge:skills-index`. Total: 153 skills, 232 engine-tier entries, 177 commands.
9
+ - **v11.7.0 — "Workflow Forge".** Ships the first Dynamic Workflow Library 12 pre-built multi-agent workflow scripts that run via Claude Code's `Workflow` tool with true parallel agent execution. Four tiers: Research (deep-research, competitive-analysis, tech-evaluation), Dev (code-audit, feature-planner, pr-review, tdd-sprint, refactor-plan), Ops (incident-response, release-prep), Intelligence (onboard-codebase, perf-optimize). 13 new `/mindforge:wf-*` commands. Total: 198 commands.
10
+ - **v11.6.0 — "Skill Forge".** Adds 80 community-sourced skills across 8 domains (software-development, github, devops, research, security, creative, data-science, note-taking) — 30 promoted to engine tier for automatic trigger-matching, 50 in the extended tier for explicit activation. Three new slash commands: `/mindforge:systematic-debug`, `/mindforge:skill-tdd`, `/mindforge:skills-index`. Total: 153 skills, 232 engine-tier entries, 185 commands.
10
11
  - **v11.5.1 — Standalone MCP server.** The MindForge MCP server now ships as its own npm package, `mindforge-mcp-server@11.5.1`, listed on the official MCP Registry as `io.github.sairam0424/mindforge`. Add it to Claude Code with one command (see [Use the MCP server](#-use-the-mcp-server-standalone)); it exposes 7 tools over stdio (6 read-only + 1 guarded write).
11
- - **v11.3.1 — Packaging hotfix.** Restores the full published payload: every `npx mindforge-cc` install now delivers all 177 slash commands, 153 skills, 154 subagents, and the complete `.mindforge/` framework.
12
12
  - **v11.3.0 — "Legion".** Imports 154 specialized Claude-Code-native subagents across 10 categories into `.claude/agents/`, fully rebranded and collision-safe. Additive and backward-compatible.
13
13
 
14
14
  See [CHANGELOG.md](./CHANGELOG.md) for full release history.
@@ -24,7 +24,7 @@ MindForge v11.0.0 "Sovereign Stability" is a production-hardening release focuse
24
24
  - **Production observability** — `/api/v1/system` health endpoint, P95 latency tracking, heap health monitoring, and real EIS client with retry logic.
25
25
  - **Graduated intelligence** — Adaptive tier escalation (+1/+2/MAX) with cost-awareness, 3-tier stuck detection, and adaptive context windows.
26
26
 
27
- This release ships 211 personas, 153 skills, 154 specialized subagents, 177 commands, 18 pillars, and 49 swarm templates across 12 engineering domains.
27
+ This release ships 211 personas, 153 skills, 154 specialized subagents, 198 commands, 18 pillars, and 49 swarm templates across 12 engineering domains.
28
28
 
29
29
 
30
30
  ## Installation & Setup
@@ -380,8 +380,41 @@ See `.mindforge/production/token-optimiser.md`.
380
380
  - **Architecture:** `docs/architecture/README.md`
381
381
  - **Contributing:** `docs/contributing/CONTRIBUTING.md`
382
382
 
383
+ ## 🚀 Dynamic Workflow Library
384
+
385
+ 12 pre-built multi-agent workflow scripts that run via Claude Code's `Workflow` tool. Each workflow fans out concurrent agents, synthesizes results, and returns structured output.
386
+
387
+ **Discover:** `/mindforge:wf-catalog` or `node bin/mindforge-cli.js workflow list`
388
+
389
+ | Tier | Command | What it does |
390
+ |------|---------|-------------|
391
+ | Research | `/mindforge:wf-deep-research` | Fan-out web research → adversarial verify → cited report |
392
+ | Research | `/mindforge:wf-competitive-analysis` | 5× parallel angles → SWOT → positioning |
393
+ | Research | `/mindforge:wf-tech-evaluation` | 5× dimensions → scored matrix → recommendation |
394
+ | Dev | `/mindforge:wf-code-audit` | 3× parallel auditors → verified findings → risk report |
395
+ | Dev | `/mindforge:wf-feature-planner` | Brief → PRD → architecture → user stories |
396
+ | Dev | `/mindforge:wf-pr-review` | 4× parallel reviewers → consensus verdict |
397
+ | Dev | `/mindforge:wf-tdd-sprint` | Spec → RED → GREEN → REFACTOR loop |
398
+ | Dev | `/mindforge:wf-refactor-plan` | Debt scan → risk-sort → safe sequence → plan |
399
+ | Ops | `/mindforge:wf-incident-response` | 4× parallel investigation → mitigate → RCA → postmortem |
400
+ | Ops | `/mindforge:wf-release-prep` | Tests → changelog → version bump → PR → announcement |
401
+ | Intelligence | `/mindforge:wf-onboard-codebase` | Map → domain → architecture → guided tour |
402
+ | Intelligence | `/mindforge:wf-perf-optimize` | Profile → 4× bottleneck hunt → prioritized fix plan |
403
+
404
+ ---
405
+
383
406
  ## 📜 Framework Evolution & Version History
384
407
 
408
+ <details>
409
+ <summary><b>v11.7.0 — Workflow Forge (Dynamic Workflow Library)</b></summary>
410
+
411
+ - **12 dynamic workflow scripts** in `.mindforge/dynamic-workflows/scripts/` — each runs via Claude Code's `Workflow` tool with true parallel agent execution, structured JSON schemas, and adversarial verification where appropriate.
412
+ - **4 tiers:** Research (fan-out search + verify + synthesis), Dev (code-audit, feature-planner, pr-review, tdd-sprint, refactor-plan), Ops (incident-response, release-prep), Intelligence (onboard-codebase, perf-optimize).
413
+ - **13 new commands:** `/mindforge:wf-catalog` discovery index + 12 workflow-specific commands.
414
+ - **CLI discovery:** `node bin/mindforge-cli.js workflow list|info|run <name>`.
415
+ - Architecture follows adversarially-verified best practices: one-workflow-per-domain, predefined (not open-ended) pipelines, fan-out + gated synthesis pattern.
416
+ </details>
417
+
385
418
  <details>
386
419
  <summary><b>v11.6.0 — Skill Forge (Core + Dev Skill Pack)</b></summary>
387
420