mindforge-cc 1.0.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.
- package/.agent/CLAUDE.md +462 -0
- package/.agent/forge/help.md +7 -0
- package/.agent/forge/init-project.md +32 -0
- package/.agent/forge/plan-phase.md +30 -0
- package/.agent/mindforge/approve.md +18 -0
- package/.agent/mindforge/audit.md +30 -0
- package/.agent/mindforge/benchmark.md +33 -0
- package/.agent/mindforge/complete-milestone.md +18 -0
- package/.agent/mindforge/debug.md +126 -0
- package/.agent/mindforge/discuss-phase.md +138 -0
- package/.agent/mindforge/execute-phase.md +165 -0
- package/.agent/mindforge/health.md +21 -0
- package/.agent/mindforge/help.md +23 -0
- package/.agent/mindforge/init-org.md +131 -0
- package/.agent/mindforge/init-project.md +155 -0
- package/.agent/mindforge/install-skill.md +15 -0
- package/.agent/mindforge/map-codebase.md +298 -0
- package/.agent/mindforge/metrics.md +22 -0
- package/.agent/mindforge/migrate.md +40 -0
- package/.agent/mindforge/milestone.md +12 -0
- package/.agent/mindforge/next.md +105 -0
- package/.agent/mindforge/plan-phase.md +125 -0
- package/.agent/mindforge/plugins.md +40 -0
- package/.agent/mindforge/pr-review.md +41 -0
- package/.agent/mindforge/profile-team.md +23 -0
- package/.agent/mindforge/publish-skill.md +19 -0
- package/.agent/mindforge/quick.md +135 -0
- package/.agent/mindforge/release.md +10 -0
- package/.agent/mindforge/retrospective.md +26 -0
- package/.agent/mindforge/review.md +157 -0
- package/.agent/mindforge/security-scan.md +233 -0
- package/.agent/mindforge/ship.md +100 -0
- package/.agent/mindforge/skills.md +141 -0
- package/.agent/mindforge/status.md +104 -0
- package/.agent/mindforge/sync-confluence.md +11 -0
- package/.agent/mindforge/sync-jira.md +12 -0
- package/.agent/mindforge/tokens.md +8 -0
- package/.agent/mindforge/update.md +42 -0
- package/.agent/mindforge/verify-phase.md +62 -0
- package/.agent/mindforge/workspace.md +29 -0
- package/.claude/CLAUDE.md +462 -0
- package/.claude/commands/forge/help.md +7 -0
- package/.claude/commands/forge/init-project.md +32 -0
- package/.claude/commands/forge/plan-phase.md +30 -0
- package/.claude/commands/mindforge/approve.md +18 -0
- package/.claude/commands/mindforge/audit.md +30 -0
- package/.claude/commands/mindforge/benchmark.md +33 -0
- package/.claude/commands/mindforge/complete-milestone.md +18 -0
- package/.claude/commands/mindforge/debug.md +126 -0
- package/.claude/commands/mindforge/discuss-phase.md +138 -0
- package/.claude/commands/mindforge/execute-phase.md +165 -0
- package/.claude/commands/mindforge/health.md +21 -0
- package/.claude/commands/mindforge/help.md +23 -0
- package/.claude/commands/mindforge/init-org.md +131 -0
- package/.claude/commands/mindforge/init-project.md +155 -0
- package/.claude/commands/mindforge/install-skill.md +15 -0
- package/.claude/commands/mindforge/map-codebase.md +298 -0
- package/.claude/commands/mindforge/metrics.md +22 -0
- package/.claude/commands/mindforge/migrate.md +40 -0
- package/.claude/commands/mindforge/milestone.md +12 -0
- package/.claude/commands/mindforge/next.md +105 -0
- package/.claude/commands/mindforge/plan-phase.md +125 -0
- package/.claude/commands/mindforge/plugins.md +40 -0
- package/.claude/commands/mindforge/pr-review.md +41 -0
- package/.claude/commands/mindforge/profile-team.md +23 -0
- package/.claude/commands/mindforge/publish-skill.md +19 -0
- package/.claude/commands/mindforge/quick.md +135 -0
- package/.claude/commands/mindforge/release.md +10 -0
- package/.claude/commands/mindforge/retrospective.md +26 -0
- package/.claude/commands/mindforge/review.md +157 -0
- package/.claude/commands/mindforge/security-scan.md +233 -0
- package/.claude/commands/mindforge/ship.md +100 -0
- package/.claude/commands/mindforge/skills.md +141 -0
- package/.claude/commands/mindforge/status.md +104 -0
- package/.claude/commands/mindforge/sync-confluence.md +11 -0
- package/.claude/commands/mindforge/sync-jira.md +12 -0
- package/.claude/commands/mindforge/tokens.md +8 -0
- package/.claude/commands/mindforge/update.md +42 -0
- package/.claude/commands/mindforge/verify-phase.md +62 -0
- package/.claude/commands/mindforge/workspace.md +29 -0
- package/.forge/org/CONVENTIONS.md +0 -0
- package/.forge/org/ORG.md +0 -0
- package/.forge/org/SECURITY.md +0 -0
- package/.forge/org/TOOLS.md +0 -0
- package/.forge/personas/analyst.md +0 -0
- package/.forge/personas/architect.md +0 -0
- package/.forge/personas/debug-specialist.md +0 -0
- package/.forge/personas/developer.md +26 -0
- package/.forge/personas/qa-engineer.md +0 -0
- package/.forge/personas/release-manager.md +0 -0
- package/.forge/personas/security-reviewer.md +33 -0
- package/.forge/personas/tech-writer.md +0 -0
- package/.forge/skills/api-design/SKILL.md +0 -0
- package/.forge/skills/code-quality/SKILL.md +0 -0
- package/.forge/skills/documentation/SKILL.md +0 -0
- package/.forge/skills/security-review/SKILL.md +23 -0
- package/.forge/skills/testing-standards/SKILL.md +27 -0
- package/.github/workflows/mindforge-ci.yml +224 -0
- package/.gitlab-ci-mindforge.yml +18 -0
- package/.mindforge/MINDFORGE-SCHEMA.json +165 -0
- package/.mindforge/audit/AUDIT-SCHEMA.md +451 -0
- package/.mindforge/ci/ci-config-schema.md +21 -0
- package/.mindforge/ci/ci-mode.md +179 -0
- package/.mindforge/ci/github-actions-adapter.md +224 -0
- package/.mindforge/ci/gitlab-ci-adapter.md +31 -0
- package/.mindforge/ci/jenkins-adapter.md +44 -0
- package/.mindforge/distribution/registry-client.md +166 -0
- package/.mindforge/distribution/registry-schema.md +96 -0
- package/.mindforge/distribution/skill-publisher.md +44 -0
- package/.mindforge/distribution/skill-validator.md +74 -0
- package/.mindforge/engine/compaction-protocol.md +182 -0
- package/.mindforge/engine/context-injector.md +128 -0
- package/.mindforge/engine/dependency-parser.md +113 -0
- package/.mindforge/engine/skills/conflict-resolver.md +69 -0
- package/.mindforge/engine/skills/loader.md +184 -0
- package/.mindforge/engine/skills/registry.md +98 -0
- package/.mindforge/engine/skills/versioning.md +75 -0
- package/.mindforge/engine/verification-pipeline.md +111 -0
- package/.mindforge/engine/wave-executor.md +235 -0
- package/.mindforge/governance/GOVERNANCE-CONFIG.md +17 -0
- package/.mindforge/governance/approval-workflow.md +37 -0
- package/.mindforge/governance/change-classifier.md +63 -0
- package/.mindforge/governance/compliance-gates.md +31 -0
- package/.mindforge/integrations/confluence.md +27 -0
- package/.mindforge/integrations/connection-manager.md +163 -0
- package/.mindforge/integrations/github.md +25 -0
- package/.mindforge/integrations/gitlab.md +13 -0
- package/.mindforge/integrations/jira.md +102 -0
- package/.mindforge/integrations/slack.md +41 -0
- package/.mindforge/intelligence/antipattern-detector.md +75 -0
- package/.mindforge/intelligence/difficulty-scorer.md +55 -0
- package/.mindforge/intelligence/health-engine.md +208 -0
- package/.mindforge/intelligence/skill-gap-analyser.md +40 -0
- package/.mindforge/intelligence/smart-compaction.md +71 -0
- package/.mindforge/metrics/METRICS-SCHEMA.md +42 -0
- package/.mindforge/metrics/quality-tracker.md +32 -0
- package/.mindforge/monorepo/cross-package-planner.md +114 -0
- package/.mindforge/monorepo/dependency-graph-builder.md +32 -0
- package/.mindforge/monorepo/workspace-detector.md +129 -0
- package/.mindforge/org/CONVENTIONS.md +62 -0
- package/.mindforge/org/ORG.md +51 -0
- package/.mindforge/org/SECURITY.md +50 -0
- package/.mindforge/org/TOOLS.md +53 -0
- package/.mindforge/org/integrations/INTEGRATIONS-CONFIG.md +58 -0
- package/.mindforge/org/skills/MANIFEST.md +38 -0
- package/.mindforge/personas/analyst.md +52 -0
- package/.mindforge/personas/architect.md +75 -0
- package/.mindforge/personas/debug-specialist.md +52 -0
- package/.mindforge/personas/developer.md +85 -0
- package/.mindforge/personas/overrides/README.md +85 -0
- package/.mindforge/personas/qa-engineer.md +61 -0
- package/.mindforge/personas/release-manager.md +76 -0
- package/.mindforge/personas/security-reviewer.md +91 -0
- package/.mindforge/personas/tech-writer.md +51 -0
- package/.mindforge/plugins/PLUGINS-MANIFEST.md +23 -0
- package/.mindforge/plugins/plugin-loader.md +93 -0
- package/.mindforge/plugins/plugin-registry.md +44 -0
- package/.mindforge/plugins/plugin-schema.md +68 -0
- package/.mindforge/pr-review/ai-reviewer.md +266 -0
- package/.mindforge/pr-review/finding-formatter.md +46 -0
- package/.mindforge/pr-review/review-prompt-templates.md +44 -0
- package/.mindforge/production/compatibility-layer.md +39 -0
- package/.mindforge/production/migration-engine.md +52 -0
- package/.mindforge/production/production-checklist.md +165 -0
- package/.mindforge/production/token-optimiser.md +68 -0
- package/.mindforge/skills/accessibility/SKILL.md +106 -0
- package/.mindforge/skills/api-design/SKILL.md +98 -0
- package/.mindforge/skills/code-quality/SKILL.md +88 -0
- package/.mindforge/skills/data-privacy/SKILL.md +126 -0
- package/.mindforge/skills/database-patterns/SKILL.md +192 -0
- package/.mindforge/skills/documentation/SKILL.md +91 -0
- package/.mindforge/skills/incident-response/SKILL.md +180 -0
- package/.mindforge/skills/performance/SKILL.md +120 -0
- package/.mindforge/skills/security-review/SKILL.md +83 -0
- package/.mindforge/skills/testing-standards/SKILL.md +97 -0
- package/.mindforge/team/TEAM-PROFILE.md +42 -0
- package/.mindforge/team/multi-handoff.md +23 -0
- package/.mindforge/team/profiles/README.md +13 -0
- package/.mindforge/team/session-merger.md +18 -0
- package/.planning/ARCHITECTURE.md +0 -0
- package/.planning/AUDIT.jsonl +0 -0
- package/.planning/HANDOFF.json +28 -0
- package/.planning/PROJECT.md +33 -0
- package/.planning/RELEASE-CHECKLIST.md +68 -0
- package/.planning/REQUIREMENTS.md +0 -0
- package/.planning/ROADMAP.md +0 -0
- package/.planning/STATE.md +31 -0
- package/.planning/approvals/.gitkeep +1 -0
- package/.planning/archive/.gitkeep +1 -0
- package/.planning/audit-archive/.gitkeep +1 -0
- package/.planning/decisions/.gitkeep +0 -0
- package/.planning/decisions/ADR-001-handoff-tracking.md +41 -0
- package/.planning/decisions/ADR-002-markdown-commands.md +46 -0
- package/.planning/decisions/ADR-003-skills-trigger-model.md +37 -0
- package/.planning/decisions/ADR-004-wave-parallelism-model.md +45 -0
- package/.planning/decisions/ADR-005-append-only-audit-log.md +51 -0
- package/.planning/decisions/ADR-006-tiered-skills-system.md +22 -0
- package/.planning/decisions/ADR-007-trigger-keyword-model.md +22 -0
- package/.planning/decisions/ADR-008-just-in-time-skill-loading.md +29 -0
- package/.planning/decisions/ADR-009-enterprise-integration-retry-policy.md +8 -0
- package/.planning/decisions/ADR-010-governance-tier-escalation.md +8 -0
- package/.planning/decisions/ADR-011-multi-developer-handoff-contract.md +8 -0
- package/.planning/decisions/ADR-012-intelligence-feedback-loops.md +19 -0
- package/.planning/decisions/ADR-013-mindforge-md-constitution.md +16 -0
- package/.planning/decisions/ADR-014-metrics-as-signals-not-evaluation.md +15 -0
- package/.planning/decisions/ADR-015-npm-based-skill-registry.md +26 -0
- package/.planning/decisions/ADR-016-ci-exit-code-0-on-timeout.md +27 -0
- package/.planning/decisions/ADR-017-sdk-localhost-only.md +28 -0
- package/.planning/decisions/ADR-018-installer-self-install-detection.md +15 -0
- package/.planning/decisions/ADR-019-self-update-scope-preservation.md +14 -0
- package/.planning/decisions/ADR-020-v1.0.0-stable-interface-contract.md +23 -0
- package/.planning/jira-sync.json +9 -0
- package/.planning/milestones/.gitkeep +1 -0
- package/.planning/phases/day1/REVIEW-DAY1.md +50 -0
- package/.planning/phases/day1/SECURITY-REVIEW-DAY1.md +15 -0
- package/.planning/phases/day2/REVIEW-DAY2.md +521 -0
- package/.planning/phases/day3/REVIEW-DAY3.md +234 -0
- package/.planning/slack-threads.json +6 -0
- package/CHANGELOG.md +175 -0
- package/LICENSE +21 -0
- package/MINDFORGE.md +76 -0
- package/README.md +182 -0
- package/RELEASENOTES.md +41 -0
- package/SECURITY.md +4 -0
- package/bin/install.js +120 -0
- package/bin/installer-core.js +292 -0
- package/bin/migrations/0.1.0-to-0.5.0.js +37 -0
- package/bin/migrations/0.5.0-to-0.6.0.js +17 -0
- package/bin/migrations/0.6.0-to-1.0.0.js +100 -0
- package/bin/migrations/migrate.js +151 -0
- package/bin/migrations/schema-versions.js +64 -0
- package/bin/updater/changelog-fetcher.js +62 -0
- package/bin/updater/self-update.js +169 -0
- package/bin/updater/version-comparator.js +68 -0
- package/bin/validate-config.js +92 -0
- package/bin/wizard/config-generator.js +112 -0
- package/bin/wizard/environment-detector.js +76 -0
- package/bin/wizard/setup-wizard.js +237 -0
- package/docs/Context/Master-Context.md +701 -0
- package/docs/architecture/README.md +35 -0
- package/docs/architecture/decision-records-index.md +26 -0
- package/docs/ci-cd-integration.md +30 -0
- package/docs/ci-quickstart.md +78 -0
- package/docs/commands-reference.md +11 -0
- package/docs/contributing/CONTRIBUTING.md +38 -0
- package/docs/contributing/plugin-authoring.md +50 -0
- package/docs/contributing/skill-authoring.md +41 -0
- package/docs/enterprise-setup.md +25 -0
- package/docs/faq.md +38 -0
- package/docs/getting-started.md +36 -0
- package/docs/governance-guide.md +23 -0
- package/docs/mindforge-md-reference.md +53 -0
- package/docs/monorepo-guide.md +26 -0
- package/docs/persona-customisation.md +56 -0
- package/docs/quick-verify.md +33 -0
- package/docs/reference/audit-events.md +53 -0
- package/docs/reference/commands.md +82 -0
- package/docs/reference/config-reference.md +64 -0
- package/docs/reference/sdk-api.md +48 -0
- package/docs/reference/skills-api.md +57 -0
- package/docs/release-checklist-guide.md +37 -0
- package/docs/requirements.md +29 -0
- package/docs/sdk-reference.md +27 -0
- package/docs/security/SECURITY.md +42 -0
- package/docs/security/penetration-test-results.md +31 -0
- package/docs/security/threat-model.md +142 -0
- package/docs/skills-authoring-guide.md +119 -0
- package/docs/skills-publishing-guide.md +21 -0
- package/docs/team-setup-guide.md +21 -0
- package/docs/troubleshooting.md +119 -0
- package/docs/tutorial.md +195 -0
- package/docs/upgrade.md +44 -0
- package/docs/user-guide.md +131 -0
- package/docs/usp-features.md +214 -0
- package/eslint.config.mjs +31 -0
- package/examples/starter-project/.planning/AUDIT.jsonl +1 -0
- package/examples/starter-project/.planning/HANDOFF.json +23 -0
- package/examples/starter-project/.planning/PROJECT.md +27 -0
- package/examples/starter-project/.planning/STATE.md +10 -0
- package/examples/starter-project/MINDFORGE.md +40 -0
- package/examples/starter-project/README.md +14 -0
- package/implementation-roadmap/day-1-imp/DAY1-HARDEN.md +823 -0
- package/implementation-roadmap/day-1-imp/DAY1-IMPLEMENT.md +2459 -0
- package/implementation-roadmap/day-1-imp/DAY1-REVIEW.md +288 -0
- package/implementation-roadmap/day-2-imp/DAY2-HARDEN.md +954 -0
- package/implementation-roadmap/day-2-imp/DAY2-IMPLEMENT.md +2347 -0
- package/implementation-roadmap/day-2-imp/DAY2-REVIEW.md +422 -0
- package/implementation-roadmap/day-3-imp/DAY3-HARDEN.md +870 -0
- package/implementation-roadmap/day-3-imp/DAY3-IMPLEMENT.md +2798 -0
- package/implementation-roadmap/day-3-imp/DAY3-REVIEW.md +484 -0
- package/implementation-roadmap/day-4-imp/DAY4-HARDEN.md +1087 -0
- package/implementation-roadmap/day-4-imp/DAY4-IMPLEMENT.md +2874 -0
- package/implementation-roadmap/day-4-imp/DAY4-REVIEW.md +386 -0
- package/implementation-roadmap/day-5-imp/DAY5-HARDEN.md +1078 -0
- package/implementation-roadmap/day-5-imp/DAY5-IMPLEMENT.md +3151 -0
- package/implementation-roadmap/day-5-imp/DAY5-REVIEW.md +345 -0
- package/implementation-roadmap/day-6-imp/DAY6-COMPLETE.md +3919 -0
- package/implementation-roadmap/day-7-imp-prod/DAY7-PRODUCTION-FINAL.md +4513 -0
- package/package.json +31 -0
- package/sdk/README.md +69 -0
- package/sdk/eslint.config.mjs +34 -0
- package/sdk/package-lock.json +1507 -0
- package/sdk/package.json +30 -0
- package/sdk/src/client.ts +133 -0
- package/sdk/src/commands.ts +63 -0
- package/sdk/src/events.ts +166 -0
- package/sdk/src/index.ts +22 -0
- package/sdk/src/types.ts +87 -0
- package/sdk/tsconfig.json +13 -0
- package/tests/audit.test.js +206 -0
- package/tests/ci-mode.test.js +162 -0
- package/tests/compaction.test.js +161 -0
- package/tests/distribution.test.js +205 -0
- package/tests/e2e.test.js +618 -0
- package/tests/governance.test.js +130 -0
- package/tests/install.test.js +209 -0
- package/tests/integrations.test.js +128 -0
- package/tests/intelligence.test.js +117 -0
- package/tests/metrics.test.js +96 -0
- package/tests/migration.test.js +309 -0
- package/tests/production.test.js +416 -0
- package/tests/sdk.test.js +200 -0
- package/tests/skills-platform.test.js +403 -0
- package/tests/wave-engine.test.js +338 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# MindForge — Day 5 Review Prompt
|
|
2
|
+
# Branch: `feat/mindforge-intelligence-layer`
|
|
3
|
+
# Run this AFTER DAY5-IMPLEMENT.md is complete
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## CONTEXT
|
|
8
|
+
|
|
9
|
+
You are performing a **Day 5 Architecture & Intelligence Review** of the
|
|
10
|
+
MindForge intelligence layer: health engine, smart compaction, difficulty scorer,
|
|
11
|
+
anti-pattern detector, skill gap analyser, team profile system, metrics engine,
|
|
12
|
+
MINDFORGE.md, and the interactive setup wizard.
|
|
13
|
+
|
|
14
|
+
Activate **`architect.md` + `qa-engineer.md`** simultaneously.
|
|
15
|
+
|
|
16
|
+
Day 5 risk profile:
|
|
17
|
+
|
|
18
|
+
- **Observability completeness** — does the health engine actually catch the
|
|
19
|
+
failure modes that matter? Missing checks are invisible gaps.
|
|
20
|
+
- **Metric accuracy** — are the scoring formulas producing meaningful signals
|
|
21
|
+
or misleading ones?
|
|
22
|
+
- **Wizard reliability** — environment detection failures produce silent wrong
|
|
23
|
+
installs. Every detection path must handle the fallback gracefully.
|
|
24
|
+
- **Intelligence feedback loops** — do the smart compaction, difficulty scorer,
|
|
25
|
+
and retrospective outputs actually feed into improved future behaviour?
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## REVIEW PASS 1 — Health Engine: Coverage Completeness
|
|
30
|
+
|
|
31
|
+
Read `health-engine.md` completely.
|
|
32
|
+
|
|
33
|
+
### Category 1 — Installation integrity
|
|
34
|
+
- [ ] The required files list has 47+ items — verify it includes Day 5 additions:
|
|
35
|
+
`health.md`, `retrospective.md`, `profile-team.md`, `metrics.md` in commands.
|
|
36
|
+
`health-engine.md`, `difficulty-scorer.md`, `antipattern-detector.md`,
|
|
37
|
+
`skill-gap-analyser.md`, `smart-compaction.md` in intelligence.
|
|
38
|
+
If not updated: these will silently pass the integrity check even when missing.
|
|
39
|
+
|
|
40
|
+
- [ ] MINDFORGE.md is not in the required files list.
|
|
41
|
+
Should it be? MINDFORGE.md is optional (projects may not have one) — so it
|
|
42
|
+
should not be in required files. But its health (when present) should be checked:
|
|
43
|
+
does it have valid syntax? Does it reference non-existent skills or personas?
|
|
44
|
+
Add: "If MINDFORGE.md exists: validate it contains no references to
|
|
45
|
+
unknown skills (check against MANIFEST.md) or invalid model names."
|
|
46
|
+
|
|
47
|
+
### Category 5 — State consistency
|
|
48
|
+
- [ ] The check "does VERIFICATION.md exist if phase is 'complete'?" is correct.
|
|
49
|
+
But what about phases that are "in progress"? Should there be a consistency check:
|
|
50
|
+
"if phase N has SUMMARY files but no VERIFICATION.md, and STATE.md says 'complete':
|
|
51
|
+
this is the most common consistency failure — state was updated before verification ran."
|
|
52
|
+
This is already covered — confirm it is explicit. If not: add it.
|
|
53
|
+
|
|
54
|
+
- [ ] The check "no WIP commits on main branch" uses `git log` to look for WIP commits.
|
|
55
|
+
But how does it detect them? "WIP" in the commit message?
|
|
56
|
+
What about commits prefixed with `chore(day5):` that are technically scaffolding?
|
|
57
|
+
Clarify: only flag commits where the message starts with "wip" (case-insensitive),
|
|
58
|
+
not all chore commits.
|
|
59
|
+
|
|
60
|
+
### Category 7 — Security configuration
|
|
61
|
+
- [ ] The secret scan covers `.planning/` and `.mindforge/` directories.
|
|
62
|
+
But what about the root directory? `MINDFORGE.md` is in root.
|
|
63
|
+
A developer could accidentally put a token in `MINDFORGE.md`.
|
|
64
|
+
Add root-level scan: check MINDFORGE.md, `.env.example`, `*.config.js` in root.
|
|
65
|
+
|
|
66
|
+
### Auto-repair protocol
|
|
67
|
+
- [ ] "Remove invalid lines" from AUDIT.jsonl is listed as auto-repairable.
|
|
68
|
+
This is dangerous — removing audit entries, even invalid ones, changes the
|
|
69
|
+
immutable record. Instead: isolate invalid lines to a separate file
|
|
70
|
+
`.planning/AUDIT.jsonl.corrupt` and write a correction entry documenting
|
|
71
|
+
the isolation. Never delete from AUDIT.jsonl.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## REVIEW PASS 2 — Smart Compaction: Practical Completeness
|
|
76
|
+
|
|
77
|
+
Read `smart-compaction.md` completely.
|
|
78
|
+
|
|
79
|
+
### Compaction level thresholds
|
|
80
|
+
- [ ] Level 1 is triggered at "context at 70-79%." But compaction-protocol.md
|
|
81
|
+
(Day 2) triggers at 70%. Are these the same trigger?
|
|
82
|
+
There is a potential conflict: Day 2 protocol says "trigger at 70%" and
|
|
83
|
+
Day 5 says "Level 1 at 70-79%, Level 2 at 80-89%, Level 3 at 90%+."
|
|
84
|
+
Clarify: the Day 2 trigger at 70% should now invoke the Day 5 Level 1 protocol.
|
|
85
|
+
The levels escalate based on how much work has been done this session —
|
|
86
|
+
not just on context percentage.
|
|
87
|
+
Add: "Level selection is based on BOTH context percentage AND session depth:
|
|
88
|
+
Light session (< 5 tasks completed): Level 1 regardless of context %.
|
|
89
|
+
Moderate session (5-10 tasks): Level 2 at 80%+.
|
|
90
|
+
Deep session (10+ tasks): Level 2 at 75%+."
|
|
91
|
+
|
|
92
|
+
### Block D — Implicit knowledge
|
|
93
|
+
- [ ] The implicit knowledge block captures "library quirks encountered."
|
|
94
|
+
But how does the agent know what counts as a "quirk" vs. standard behaviour?
|
|
95
|
+
Add: "An implicit knowledge item qualifies as a 'quirk' if:
|
|
96
|
+
a) It contradicts what the documentation or TOOLS.md says should happen, OR
|
|
97
|
+
b) It would not be obvious to a new agent reading only the PLAN and persona files."
|
|
98
|
+
|
|
99
|
+
### Session restart conflict check
|
|
100
|
+
- [ ] The restart protocol says "if `in_progress.current_state` indicates an
|
|
101
|
+
inconsistency: ask the user to resolve it BEFORE executing any other steps."
|
|
102
|
+
But what if the user says "show me the file first"?
|
|
103
|
+
The agent needs to read the file and present the relevant sections,
|
|
104
|
+
not just show the file path. Add: "Read and display the first 50 lines of
|
|
105
|
+
the inconsistent file so the user can assess without switching context."
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## REVIEW PASS 3 — Difficulty Scorer: Formula Accuracy
|
|
110
|
+
|
|
111
|
+
Read `difficulty-scorer.md` completely.
|
|
112
|
+
|
|
113
|
+
### Technical complexity signal detection
|
|
114
|
+
- [ ] The signal detection uses `grep`-style keyword matching on the phase description.
|
|
115
|
+
The keyword "migration" appears in both "database migration" (Tier 3 risk)
|
|
116
|
+
and "migrating to a new framework" (different risk profile).
|
|
117
|
+
Context matters. Add: "When a signal keyword is detected, verify the context:
|
|
118
|
+
'migration' near 'database' or 'schema' → technical complexity 4.
|
|
119
|
+
'migration' near 'code' or 'framework' → technical complexity 3."
|
|
120
|
+
|
|
121
|
+
### Risk amplifiers
|
|
122
|
+
- [ ] "Previous incidents in this area — check AUDIT log for past failures."
|
|
123
|
+
How does the scorer check AUDIT.jsonl for relevant past failures?
|
|
124
|
+
The AUDIT log doesn't index by "area" — it has phase numbers.
|
|
125
|
+
Add: "Check AUDIT.jsonl for `task_failed` events with file paths that overlap
|
|
126
|
+
with the current phase's expected files (from REQUIREMENTS.md or CONTEXT.md).
|
|
127
|
+
Also check for `security_finding` events in phases that touched similar
|
|
128
|
+
tech areas (auth, payments, database)."
|
|
129
|
+
|
|
130
|
+
### Composite formula
|
|
131
|
+
- [ ] The formula uses weights: Technical × 0.35, Risk × 0.30, Ambiguity × 0.20,
|
|
132
|
+
Dependencies × 0.15. These sum to 1.00 ✅.
|
|
133
|
+
But: the maximum possible composite score is 5.0 (all dimensions at 5).
|
|
134
|
+
The minimum is 1.0.
|
|
135
|
+
The task count recommendations go up to "Hard: 10-15 tasks."
|
|
136
|
+
What happens for scores > 4.5 consistently? "Consider splitting the phase."
|
|
137
|
+
But how does the agent help the user split it?
|
|
138
|
+
Add: "If composite > 4.5: recommend a phase split. Suggest 2 sub-phases:
|
|
139
|
+
Phase N-A (lowest-risk components), Phase N-B (highest-risk components).
|
|
140
|
+
Offer to help design the split: /mindforge:discuss-phase [N] --split"
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## REVIEW PASS 4 — Anti-Pattern Detector: False Positive Risk
|
|
145
|
+
|
|
146
|
+
Read `antipattern-detector.md` completely.
|
|
147
|
+
|
|
148
|
+
### C01 — Type coercion in auth checks
|
|
149
|
+
- [ ] The detection pattern is `== null|== undefined|== false|== 0`.
|
|
150
|
+
This will produce false positives in test files:
|
|
151
|
+
```javascript
|
|
152
|
+
// This is fine in tests:
|
|
153
|
+
expect(result).toBe(null)
|
|
154
|
+
assert.equal(count, 0)
|
|
155
|
+
```
|
|
156
|
+
The detector should exclude test files from this pattern:
|
|
157
|
+
Add: "For C01: exclude files matching `*.test.ts`, `*.spec.ts`, `tests/**`."
|
|
158
|
+
|
|
159
|
+
### B03 — Unbounded queries
|
|
160
|
+
- [ ] The pattern `grep -rn "findMany\(" | grep -v "take:\|limit:"` will
|
|
161
|
+
produce a false positive for queries that use cursor-based pagination:
|
|
162
|
+
```javascript
|
|
163
|
+
// This is actually paginated — but the grep wouldn't know:
|
|
164
|
+
await db.posts.findMany({ where: { cursor... }, orderBy: ... })
|
|
165
|
+
```
|
|
166
|
+
Cursor pagination does NOT use `take:` on every call.
|
|
167
|
+
Add: "B03 false positive exception: queries using cursor-based pagination
|
|
168
|
+
(contains `cursor:` parameter) are exempt from the unbounded query check."
|
|
169
|
+
|
|
170
|
+
### D01 — God Object detection
|
|
171
|
+
- [ ] "wc -l" counts ALL lines including comments and blank lines.
|
|
172
|
+
A 500-line file with 200 lines of JSDoc comments is not a God Object.
|
|
173
|
+
Better heuristic: count non-comment, non-blank lines.
|
|
174
|
+
Add: "For D01: count executable lines only.
|
|
175
|
+
`grep -v '^\s*\/\/' | grep -v '^\s*\*' | grep -v '^\s*$'`
|
|
176
|
+
Apply 500-line threshold to this filtered count."
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## REVIEW PASS 5 — MINDFORGE.md: Configuration Validation
|
|
181
|
+
|
|
182
|
+
Read `MINDFORGE.md` completely.
|
|
183
|
+
|
|
184
|
+
### Model name references
|
|
185
|
+
- [ ] MINDFORGE.md uses model names: `claude-opus-4-5`, `claude-sonnet-4-5`,
|
|
186
|
+
`claude-haiku-4-5`. These must be validated against actual available models.
|
|
187
|
+
For a framework document created in March 2026, these appear accurate.
|
|
188
|
+
But add a note: "Model names are validated against Claude API model list.
|
|
189
|
+
If a model is unavailable, fall back to `inherit` and warn the user."
|
|
190
|
+
|
|
191
|
+
### ADDITIONAL_AGENT_INSTRUCTIONS format
|
|
192
|
+
- [ ] The heredoc-style `ADDITIONAL_AGENT_INSTRUCTIONS="""..."""` in a Markdown
|
|
193
|
+
file is not a standard format. An agent reading this file needs a clear
|
|
194
|
+
parsing rule.
|
|
195
|
+
Add: "Parsing rule: content between triple-quote delimiters (`"""`) is treated
|
|
196
|
+
as a verbatim multi-line string value. Everything between the first `"""` and
|
|
197
|
+
the next `"""` is the value."
|
|
198
|
+
|
|
199
|
+
### Conflict with CLAUDE.md
|
|
200
|
+
- [ ] MINDFORGE.md overrides defaults from CLAUDE.md. But which defaults can
|
|
201
|
+
be overridden and which are fixed? For example:
|
|
202
|
+
- Can MINDFORGE.md disable all security checks? It should not be able to.
|
|
203
|
+
- Can MINDFORGE.md lower `MIN_TEST_COVERAGE_PCT` to 0%? It should not.
|
|
204
|
+
Add: "Non-overridable CLAUDE.md rules:
|
|
205
|
+
- Security auto-trigger (cannot be disabled via MINDFORGE.md)
|
|
206
|
+
- Plan-first rule (cannot be disabled)
|
|
207
|
+
- Secret detection gate (cannot be disabled)
|
|
208
|
+
- AUDIT writing requirement (cannot be disabled)
|
|
209
|
+
These are governance primitives — not configurable."
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## REVIEW PASS 6 — Setup Wizard: Reliability
|
|
214
|
+
|
|
215
|
+
Read `setup-wizard.js`, `environment-detector.js`, `config-generator.js`.
|
|
216
|
+
|
|
217
|
+
### Error handling
|
|
218
|
+
- [ ] `createReadline()` creates an interface but if stdin is not a TTY
|
|
219
|
+
(running in a script, CI environment), readline may behave unexpectedly.
|
|
220
|
+
The wizard has an `IS_INTERACTIVE` check — but it only checks for flags.
|
|
221
|
+
Add: "Also check `process.stdin.isTTY` — if false, fall back to non-interactive
|
|
222
|
+
mode regardless of flags: `IS_INTERACTIVE = IS_INTERACTIVE && process.stdin.isTTY`."
|
|
223
|
+
|
|
224
|
+
### Environment detector — project type detection
|
|
225
|
+
- [ ] The detector checks `package.json` for `next` or `react` in dependencies.
|
|
226
|
+
But what if dependencies are in `devDependencies`? Next.js is often in
|
|
227
|
+
`dependencies` but React could be in either. Add: "Check both `dependencies`
|
|
228
|
+
and `devDependencies` for framework detection."
|
|
229
|
+
|
|
230
|
+
### Config generator — write safety
|
|
231
|
+
- [ ] `writeIntegrationsConfig` reads the existing file and replaces placeholder
|
|
232
|
+
strings. But what if the file was already partially configured?
|
|
233
|
+
(e.g., JIRA_BASE_URL was set but JIRA_PROJECT_KEY was not)
|
|
234
|
+
The replace might fail silently if the placeholder string was already replaced.
|
|
235
|
+
Add: "Before writing: check if the target placeholder exists.
|
|
236
|
+
If not (already replaced): skip the replacement and log: 'JIRA_BASE_URL
|
|
237
|
+
already configured — not overwriting.'"
|
|
238
|
+
|
|
239
|
+
### Wizard output — credential guidance timing
|
|
240
|
+
- [ ] The wizard prints credential guidance (`ℹ️ Set JIRA_API_TOKEN`) during
|
|
241
|
+
the feature configuration step, interspersed with questions.
|
|
242
|
+
This is easy to miss in a fast-scrolling terminal.
|
|
243
|
+
Better: collect all credential guidance and print it together at the end.
|
|
244
|
+
Add: "Collect all credential guidance items. Print them all together
|
|
245
|
+
in a 'Next steps: configure credentials' section after all questions."
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## REVIEW PASS 7 — Metrics: Signal Quality
|
|
250
|
+
|
|
251
|
+
Read `METRICS-SCHEMA.md` and `quality-tracker.md`.
|
|
252
|
+
|
|
253
|
+
### Session quality score
|
|
254
|
+
- [ ] The formula: `base 100 - 15 per task_failed - 10 per gate_failed`.
|
|
255
|
+
Maximum score when everything fails (10 tasks failed + 5 gates): 100 - 150 - 50 = -100, clamped to 0.
|
|
256
|
+
The clamping is correct. But: "a session with 1 task failed scores 85, same
|
|
257
|
+
as a session with 8/10 tasks completed." This conflates different scenarios.
|
|
258
|
+
The current formula rewards sessions where MOST tasks succeeded, even if
|
|
259
|
+
some failed. That is acceptable behaviour — confirm it is intentional.
|
|
260
|
+
|
|
261
|
+
- [ ] The bonus `+5 if zero quality gate failures` AND `+5 if zero security findings`
|
|
262
|
+
means a perfect session scores `110` before clamping to `100`.
|
|
263
|
+
This means all sessions without failures score exactly `100` — there is no
|
|
264
|
+
differentiation between "zero failures, zero skills loaded" and
|
|
265
|
+
"zero failures, 5 skills loaded, complex phase."
|
|
266
|
+
Consider: tracking the score without clamping as a raw score alongside the
|
|
267
|
+
clamped display score, to allow trend analysis above 100.
|
|
268
|
+
|
|
269
|
+
### Compaction quality metric
|
|
270
|
+
- [ ] `next_session_continuation_success` is described as "manual assessment, defaults null."
|
|
271
|
+
A metric that is never populated is noise in the metrics file.
|
|
272
|
+
Either: make it auto-detectable (if the next session successfully continued
|
|
273
|
+
without re-doing work, it can be inferred from AUDIT: no tasks were re-done),
|
|
274
|
+
or remove it until there is a clear way to populate it.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## REVIEW PASS 8 — Test Suite Quality
|
|
279
|
+
|
|
280
|
+
Read `tests/intelligence.test.js` and `tests/metrics.test.js`.
|
|
281
|
+
|
|
282
|
+
### Missing intelligence tests
|
|
283
|
+
- [ ] No test for the health engine's CLAUDE.md parity check
|
|
284
|
+
(verify that the parity check function detects when files differ)
|
|
285
|
+
- [ ] No test for anti-pattern false positive exclusion (test files)
|
|
286
|
+
- [ ] No test that MINDFORGE.md lists non-overridable rules
|
|
287
|
+
- [ ] No test for wizard's `IS_INTERACTIVE` stdin detection logic
|
|
288
|
+
- [ ] No test for config-generator's "already configured" idempotency
|
|
289
|
+
|
|
290
|
+
### Metrics test gaps
|
|
291
|
+
- [ ] No test that metrics files are valid JSONL format
|
|
292
|
+
- [ ] No test that compaction-quality.jsonl schema matches the spec
|
|
293
|
+
- [ ] No test that skill-usage.jsonl has the `trigger_type` field
|
|
294
|
+
|
|
295
|
+
### Session quality score — edge case
|
|
296
|
+
- [ ] The test "perfect session scores 100 (5 bonus)" has a comment `// Actually let's check clamping: Math.min(100, 110) = 100`.
|
|
297
|
+
The test as written is checking a score of `110` which is clamped to `100`.
|
|
298
|
+
The test should verify the clamped value: `assert.strictEqual(s, 100)`.
|
|
299
|
+
Verify the test implementation is correct in the actual file.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## REVIEW OUTPUT FORMAT
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
## Finding [N] — [Severity]: [Short title]
|
|
307
|
+
|
|
308
|
+
**File:** [path]
|
|
309
|
+
**Category:** [Health / Compaction / Difficulty / AntiPattern / MINDFORGE / Wizard / Metrics / Tests]
|
|
310
|
+
**Severity:** BLOCKING | MAJOR | MINOR | SUGGESTION
|
|
311
|
+
|
|
312
|
+
**Issue:** [Specific]
|
|
313
|
+
**Impact:** [What fails if unfixed]
|
|
314
|
+
**Recommendation:** [Exact change]
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## REVIEW SUMMARY TABLE
|
|
320
|
+
|
|
321
|
+
```
|
|
322
|
+
## Day 5 Review Summary
|
|
323
|
+
|
|
324
|
+
| Category | BLOCKING | MAJOR | MINOR | SUGGESTION |
|
|
325
|
+
|--------------|----------|-------|-------|------------|
|
|
326
|
+
| Health | | | | |
|
|
327
|
+
| Compaction | | | | |
|
|
328
|
+
| Difficulty | | | | |
|
|
329
|
+
| AntiPattern | | | | |
|
|
330
|
+
| MINDFORGE.md | | | | |
|
|
331
|
+
| Wizard | | | | |
|
|
332
|
+
| Metrics | | | | |
|
|
333
|
+
| Tests | | | | |
|
|
334
|
+
| **TOTAL** | | | | |
|
|
335
|
+
|
|
336
|
+
## Verdict
|
|
337
|
+
[ ] ✅ APPROVED — Proceed to DAY5-HARDEN.md
|
|
338
|
+
[ ] ⚠️ APPROVED WITH CONDITIONS — Fix [N] major findings first
|
|
339
|
+
[ ] ❌ NOT APPROVED — [N] blocking findings. Fix and re-review.
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
**Branch:** `feat/mindforge-intelligence-layer`
|
|
345
|
+
**All BLOCKING items resolved → proceed to DAY5-HARDEN.md**
|