mindforge-cc 9.0.0 → 10.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/.mindforge/config.json +1 -1
- package/CHANGELOG.md +15 -0
- package/LICENSE +1 -1
- package/MINDFORGE.md +13 -0
- package/README.md +7 -1
- package/bin/autonomous/audit-writer.js +90 -0
- package/bin/autonomous/auto-runner.js +209 -431
- package/bin/autonomous/state-manager.js +116 -0
- package/bin/autonomous/task-dispatcher.js +114 -0
- package/bin/autonomous/wave-executor.js +169 -0
- package/bin/browser/browser-daemon.js +31 -1
- package/bin/change-classifier.js +3 -3
- package/bin/dashboard/api-router.js +21 -22
- package/bin/dashboard/metrics-aggregator.js +44 -3
- package/bin/dashboard/server.js +54 -10
- package/bin/dashboard/sse-bridge.js +51 -5
- package/bin/engine/learning-manager.js +1 -1
- package/bin/engine/mesh-syncer.js +26 -22
- package/bin/engine/nexus-tracer.js +6 -5
- package/bin/engine/orbital-guardian.js +13 -10
- package/bin/engine/skill-evolver.js +12 -14
- package/bin/engine/temporal-hub.js +25 -1
- package/bin/governance/policy-engine.js +5 -5
- package/bin/governance/policy-gate-hardened.js +2 -2
- package/bin/governance/quantum-crypto.js +10 -2
- package/bin/memory/identity-synthesizer.js +9 -11
- package/bin/memory/knowledge-store.js +62 -6
- package/bin/memory/semantic-hub.js +26 -30
- package/bin/memory/vector-hub.js +377 -193
- package/bin/migrations/v8-sqlite-migration.js +22 -21
- package/bin/migrations/v9-unified-memory.js +1 -1
- package/bin/mindforge-cli.js +47 -11
- package/bin/models/model-broker.js +2 -0
- package/bin/revops/remediation-queue.js +16 -55
- package/bin/utils/errors.js +40 -0
- package/bin/utils/file-io.js +102 -0
- package/bin/utils/index.js +6 -0
- package/bin/utils/paths.js +33 -0
- package/docs/sdk-reference.md +374 -24
- package/docs/troubleshooting.md +4 -4
- package/examples/sdk-integration/README.md +24 -0
- package/examples/sdk-integration/index.js +24 -0
- package/examples/starter-project/MINDFORGE.md +8 -8
- package/package.json +25 -14
- package/.agent/bin/lib/commands.cjs +0 -959
- package/.agent/bin/lib/config.cjs +0 -421
- package/.agent/bin/lib/core.cjs +0 -1166
- package/.agent/bin/lib/frontmatter.cjs +0 -307
- package/.agent/bin/lib/init.cjs +0 -1336
- package/.agent/bin/lib/milestone.cjs +0 -252
- package/.agent/bin/lib/model-profiles.cjs +0 -68
- package/.agent/bin/lib/phase.cjs +0 -888
- package/.agent/bin/lib/profile-output.cjs +0 -952
- package/.agent/bin/lib/profile-pipeline.cjs +0 -539
- package/.agent/bin/lib/roadmap.cjs +0 -329
- package/.agent/bin/lib/security.cjs +0 -356
- package/.agent/bin/lib/state.cjs +0 -969
- package/.agent/bin/lib/template.cjs +0 -222
- package/.agent/bin/lib/uat.cjs +0 -189
- package/.agent/bin/lib/verify.cjs +0 -851
- package/.agent/bin/lib/workstream.cjs +0 -491
- package/.agent/bin/mindforge-tools.cjs +0 -897
- package/.agent/file-manifest.json +0 -219
- package/.agent/forge/help.md +0 -11
- package/.agent/forge/init-project.md +0 -36
- package/.agent/forge/plan-phase.md +0 -34
- package/.agent/mindforge/add-backlog.md +0 -32
- package/.agent/mindforge/agent.md +0 -31
- package/.agent/mindforge/approve.md +0 -22
- package/.agent/mindforge/audit.md +0 -34
- package/.agent/mindforge/auto.md +0 -26
- package/.agent/mindforge/benchmark.md +0 -37
- package/.agent/mindforge/browse.md +0 -30
- package/.agent/mindforge/complete-milestone.md +0 -22
- package/.agent/mindforge/costs.md +0 -15
- package/.agent/mindforge/cross-review.md +0 -21
- package/.agent/mindforge/dashboard.md +0 -102
- package/.agent/mindforge/debug.md +0 -133
- package/.agent/mindforge/discuss-phase.md +0 -142
- package/.agent/mindforge/do.md +0 -31
- package/.agent/mindforge/execute-phase.md +0 -200
- package/.agent/mindforge/health.md +0 -31
- package/.agent/mindforge/help.md +0 -33
- package/.agent/mindforge/init-org.md +0 -135
- package/.agent/mindforge/init-project.md +0 -170
- package/.agent/mindforge/install-skill.md +0 -28
- package/.agent/mindforge/learn.md +0 -147
- package/.agent/mindforge/learning.md +0 -20
- package/.agent/mindforge/map-codebase.md +0 -302
- package/.agent/mindforge/marketplace.md +0 -124
- package/.agent/mindforge/metrics.md +0 -26
- package/.agent/mindforge/migrate.md +0 -44
- package/.agent/mindforge/milestone.md +0 -16
- package/.agent/mindforge/new-runtime.md +0 -23
- package/.agent/mindforge/next.md +0 -109
- package/.agent/mindforge/note.md +0 -35
- package/.agent/mindforge/plan-phase.md +0 -131
- package/.agent/mindforge/plant-seed.md +0 -31
- package/.agent/mindforge/plugins.md +0 -44
- package/.agent/mindforge/pr-review.md +0 -45
- package/.agent/mindforge/profile-team.md +0 -27
- package/.agent/mindforge/publish-skill.md +0 -23
- package/.agent/mindforge/qa.md +0 -20
- package/.agent/mindforge/quick.md +0 -139
- package/.agent/mindforge/record-learning.md +0 -22
- package/.agent/mindforge/release.md +0 -14
- package/.agent/mindforge/remember.md +0 -30
- package/.agent/mindforge/research.md +0 -16
- package/.agent/mindforge/retrospective.md +0 -31
- package/.agent/mindforge/review-backlog.md +0 -34
- package/.agent/mindforge/review.md +0 -161
- package/.agent/mindforge/security-scan.md +0 -242
- package/.agent/mindforge/session-report.md +0 -39
- package/.agent/mindforge/ship.md +0 -111
- package/.agent/mindforge/skills.md +0 -145
- package/.agent/mindforge/status.md +0 -113
- package/.agent/mindforge/steer.md +0 -17
- package/.agent/mindforge/sync-confluence.md +0 -15
- package/.agent/mindforge/sync-jira.md +0 -16
- package/.agent/mindforge/tokens.md +0 -12
- package/.agent/mindforge/ui-phase.md +0 -34
- package/.agent/mindforge/ui-review.md +0 -36
- package/.agent/mindforge/update.md +0 -46
- package/.agent/mindforge/validate-phase.md +0 -31
- package/.agent/mindforge/verify-phase.md +0 -66
- package/.agent/mindforge/workspace.md +0 -33
- package/.agent/mindforge/workstreams.md +0 -35
- package/.agent/settings.json +0 -42
- package/.agent/skills/mindforge-add-backlog/SKILL.md +0 -72
- package/.agent/skills/mindforge-add-phase/SKILL.md +0 -39
- package/.agent/skills/mindforge-add-tests/SKILL.md +0 -28
- package/.agent/skills/mindforge-add-todo/SKILL.md +0 -42
- package/.agent/skills/mindforge-audit-milestone/SKILL.md +0 -29
- package/.agent/skills/mindforge-audit-uat/SKILL.md +0 -20
- package/.agent/skills/mindforge-autonomous/SKILL.md +0 -33
- package/.agent/skills/mindforge-brainstorming/SKILL.md +0 -164
- package/.agent/skills/mindforge-brainstorming/scripts/frame-template.html +0 -214
- package/.agent/skills/mindforge-brainstorming/scripts/helper.js +0 -88
- package/.agent/skills/mindforge-brainstorming/scripts/server.cjs +0 -354
- package/.agent/skills/mindforge-brainstorming/scripts/start-server.sh +0 -148
- package/.agent/skills/mindforge-brainstorming/scripts/stop-server.sh +0 -56
- package/.agent/skills/mindforge-brainstorming/spec-document-reviewer-prompt.md +0 -49
- package/.agent/skills/mindforge-brainstorming/visual-companion.md +0 -287
- package/.agent/skills/mindforge-check-todos/SKILL.md +0 -40
- package/.agent/skills/mindforge-cleanup/SKILL.md +0 -19
- package/.agent/skills/mindforge-complete-milestone/SKILL.md +0 -131
- package/.agent/skills/mindforge-debug/SKILL.md +0 -163
- package/.agent/skills/mindforge-debug_extended/CREATION-LOG.md +0 -119
- package/.agent/skills/mindforge-debug_extended/SKILL.md +0 -296
- package/.agent/skills/mindforge-debug_extended/condition-based-waiting-example.ts +0 -158
- package/.agent/skills/mindforge-debug_extended/condition-based-waiting.md +0 -115
- package/.agent/skills/mindforge-debug_extended/defense-in-depth.md +0 -122
- package/.agent/skills/mindforge-debug_extended/find-polluter.sh +0 -63
- package/.agent/skills/mindforge-debug_extended/root-cause-tracing.md +0 -169
- package/.agent/skills/mindforge-debug_extended/test-academic.md +0 -14
- package/.agent/skills/mindforge-debug_extended/test-pressure-1.md +0 -58
- package/.agent/skills/mindforge-debug_extended/test-pressure-2.md +0 -68
- package/.agent/skills/mindforge-debug_extended/test-pressure-3.md +0 -69
- package/.agent/skills/mindforge-discuss-phase/SKILL.md +0 -54
- package/.agent/skills/mindforge-do/SKILL.md +0 -26
- package/.agent/skills/mindforge-execute-phase/SKILL.md +0 -49
- package/.agent/skills/mindforge-execute-phase_extended/SKILL.md +0 -70
- package/.agent/skills/mindforge-fast/SKILL.md +0 -23
- package/.agent/skills/mindforge-forensics/SKILL.md +0 -49
- package/.agent/skills/mindforge-health/SKILL.md +0 -17
- package/.agent/skills/mindforge-help/SKILL.md +0 -23
- package/.agent/skills/mindforge-insert-phase/SKILL.md +0 -28
- package/.agent/skills/mindforge-join-discord/SKILL.md +0 -19
- package/.agent/skills/mindforge-list-phase-assumptions/SKILL.md +0 -41
- package/.agent/skills/mindforge-list-workspaces/SKILL.md +0 -17
- package/.agent/skills/mindforge-manager/SKILL.md +0 -32
- package/.agent/skills/mindforge-map-codebase/SKILL.md +0 -64
- package/.agent/skills/mindforge-milestone-summary/SKILL.md +0 -44
- package/.agent/skills/mindforge-neural-orchestrator/SKILL.md +0 -115
- package/.agent/skills/mindforge-neural-orchestrator/references/codex-tools.md +0 -100
- package/.agent/skills/mindforge-neural-orchestrator/references/gemini-tools.md +0 -33
- package/.agent/skills/mindforge-new-milestone/SKILL.md +0 -38
- package/.agent/skills/mindforge-new-project/SKILL.md +0 -36
- package/.agent/skills/mindforge-new-workspace/SKILL.md +0 -39
- package/.agent/skills/mindforge-next/SKILL.md +0 -19
- package/.agent/skills/mindforge-note/SKILL.md +0 -29
- package/.agent/skills/mindforge-parallel-mesh_extended/SKILL.md +0 -182
- package/.agent/skills/mindforge-pause-work/SKILL.md +0 -35
- package/.agent/skills/mindforge-plan-milestone-gaps/SKILL.md +0 -28
- package/.agent/skills/mindforge-plan-phase/SKILL.md +0 -38
- package/.agent/skills/mindforge-plan-phase_extended/SKILL.md +0 -152
- package/.agent/skills/mindforge-plan-phase_extended/plan-document-reviewer-prompt.md +0 -49
- package/.agent/skills/mindforge-plant-seed/SKILL.md +0 -22
- package/.agent/skills/mindforge-pr-branch/SKILL.md +0 -21
- package/.agent/skills/mindforge-profile-user/SKILL.md +0 -38
- package/.agent/skills/mindforge-progress/SKILL.md +0 -19
- package/.agent/skills/mindforge-quick/SKILL.md +0 -38
- package/.agent/skills/mindforge-reapply-patches/SKILL.md +0 -124
- package/.agent/skills/mindforge-remove-phase/SKILL.md +0 -26
- package/.agent/skills/mindforge-remove-workspace/SKILL.md +0 -22
- package/.agent/skills/mindforge-research-phase/SKILL.md +0 -186
- package/.agent/skills/mindforge-resume-work/SKILL.md +0 -35
- package/.agent/skills/mindforge-review/SKILL.md +0 -31
- package/.agent/skills/mindforge-review-backlog/SKILL.md +0 -58
- package/.agent/skills/mindforge-review-inbound/SKILL.md +0 -213
- package/.agent/skills/mindforge-review-request/SKILL.md +0 -105
- package/.agent/skills/mindforge-review-request/code-reviewer.md +0 -146
- package/.agent/skills/mindforge-session-report/SKILL.md +0 -16
- package/.agent/skills/mindforge-set-profile/SKILL.md +0 -9
- package/.agent/skills/mindforge-settings/SKILL.md +0 -32
- package/.agent/skills/mindforge-ship/SKILL.md +0 -16
- package/.agent/skills/mindforge-ship_extended/SKILL.md +0 -200
- package/.agent/skills/mindforge-skill-creation/SKILL.md +0 -655
- package/.agent/skills/mindforge-skill-creation/anthropic-best-practices.md +0 -1150
- package/.agent/skills/mindforge-skill-creation/examples/CLAUDE_MD_TESTING.md +0 -189
- package/.agent/skills/mindforge-skill-creation/graphviz-conventions.dot +0 -172
- package/.agent/skills/mindforge-skill-creation/persuasion-principles.md +0 -187
- package/.agent/skills/mindforge-skill-creation/render-graphs.js +0 -168
- package/.agent/skills/mindforge-skill-creation/testing-skills-with-subagents.md +0 -384
- package/.agent/skills/mindforge-stats/SKILL.md +0 -16
- package/.agent/skills/mindforge-swarm-execution/SKILL.md +0 -277
- package/.agent/skills/mindforge-swarm-execution/code-quality-reviewer-prompt.md +0 -26
- package/.agent/skills/mindforge-swarm-execution/implementer-prompt.md +0 -113
- package/.agent/skills/mindforge-swarm-execution/spec-reviewer-prompt.md +0 -61
- package/.agent/skills/mindforge-system-architecture/SKILL.md +0 -136
- package/.agent/skills/mindforge-system-architecture/examples.md +0 -120
- package/.agent/skills/mindforge-system-architecture/scaling-checklist.md +0 -76
- package/.agent/skills/mindforge-tdd/SKILL.md +0 -112
- package/.agent/skills/mindforge-tdd/deep-modules.md +0 -21
- package/.agent/skills/mindforge-tdd/interface-design.md +0 -22
- package/.agent/skills/mindforge-tdd/mocking.md +0 -24
- package/.agent/skills/mindforge-tdd/refactoring.md +0 -21
- package/.agent/skills/mindforge-tdd/tests.md +0 -28
- package/.agent/skills/mindforge-tdd_extended/SKILL.md +0 -371
- package/.agent/skills/mindforge-tdd_extended/testing-anti-patterns.md +0 -299
- package/.agent/skills/mindforge-thread/SKILL.md +0 -123
- package/.agent/skills/mindforge-ui-phase/SKILL.md +0 -24
- package/.agent/skills/mindforge-ui-review/SKILL.md +0 -24
- package/.agent/skills/mindforge-update/SKILL.md +0 -35
- package/.agent/skills/mindforge-validate-phase/SKILL.md +0 -26
- package/.agent/skills/mindforge-verify-work/SKILL.md +0 -30
- package/.agent/skills/mindforge-verify-work_extended/SKILL.md +0 -139
- package/.agent/skills/mindforge-workspace-isolated/SKILL.md +0 -218
- package/.agent/skills/mindforge-workstreams/SKILL.md +0 -65
- package/.agent/workflows/forge:help.md +0 -10
- package/.agent/workflows/forge:init-project.md +0 -35
- package/.agent/workflows/forge:plan-phase.md +0 -33
- package/.agent/workflows/mindforge-add-phase.md +0 -112
- package/.agent/workflows/mindforge-add-tests.md +0 -351
- package/.agent/workflows/mindforge-add-todo.md +0 -158
- package/.agent/workflows/mindforge-audit-milestone.md +0 -332
- package/.agent/workflows/mindforge-audit-uat.md +0 -109
- package/.agent/workflows/mindforge-autonomous.md +0 -815
- package/.agent/workflows/mindforge-check-todos.md +0 -177
- package/.agent/workflows/mindforge-cleanup.md +0 -152
- package/.agent/workflows/mindforge-complete-milestone.md +0 -766
- package/.agent/workflows/mindforge-diagnose-issues.md +0 -220
- package/.agent/workflows/mindforge-discovery-phase.md +0 -289
- package/.agent/workflows/mindforge-discuss-phase-assumptions.md +0 -645
- package/.agent/workflows/mindforge-discuss-phase.md +0 -1047
- package/.agent/workflows/mindforge-do.md +0 -104
- package/.agent/workflows/mindforge-execute-phase.md +0 -838
- package/.agent/workflows/mindforge-execute-plan.md +0 -509
- package/.agent/workflows/mindforge-fast.md +0 -105
- package/.agent/workflows/mindforge-forensics.md +0 -265
- package/.agent/workflows/mindforge-health.md +0 -181
- package/.agent/workflows/mindforge-help.md +0 -606
- package/.agent/workflows/mindforge-insert-phase.md +0 -130
- package/.agent/workflows/mindforge-list-phase-assumptions.md +0 -178
- package/.agent/workflows/mindforge-list-workspaces.md +0 -56
- package/.agent/workflows/mindforge-manager.md +0 -360
- package/.agent/workflows/mindforge-map-codebase.md +0 -370
- package/.agent/workflows/mindforge-milestone-summary.md +0 -223
- package/.agent/workflows/mindforge-new-milestone.md +0 -469
- package/.agent/workflows/mindforge-new-project.md +0 -1226
- package/.agent/workflows/mindforge-new-workspace.md +0 -237
- package/.agent/workflows/mindforge-next.md +0 -97
- package/.agent/workflows/mindforge-node-repair.md +0 -92
- package/.agent/workflows/mindforge-note.md +0 -156
- package/.agent/workflows/mindforge-pause-work.md +0 -176
- package/.agent/workflows/mindforge-plan-milestone-gaps.md +0 -273
- package/.agent/workflows/mindforge-plan-phase.md +0 -877
- package/.agent/workflows/mindforge-plant-seed.md +0 -169
- package/.agent/workflows/mindforge-pr-branch.md +0 -129
- package/.agent/workflows/mindforge-profile-user.md +0 -450
- package/.agent/workflows/mindforge-progress.md +0 -507
- package/.agent/workflows/mindforge-quick.md +0 -732
- package/.agent/workflows/mindforge-remove-phase.md +0 -155
- package/.agent/workflows/mindforge-remove-workspace.md +0 -90
- package/.agent/workflows/mindforge-research-phase.md +0 -74
- package/.agent/workflows/mindforge-resume-project.md +0 -325
- package/.agent/workflows/mindforge-review.md +0 -228
- package/.agent/workflows/mindforge-session-report.md +0 -146
- package/.agent/workflows/mindforge-settings.md +0 -283
- package/.agent/workflows/mindforge-ship.md +0 -228
- package/.agent/workflows/mindforge-stats.md +0 -60
- package/.agent/workflows/mindforge-transition.md +0 -671
- package/.agent/workflows/mindforge-ui-phase.md +0 -290
- package/.agent/workflows/mindforge-ui-review.md +0 -157
- package/.agent/workflows/mindforge-update.md +0 -323
- package/.agent/workflows/mindforge-validate-phase.md +0 -167
- package/.agent/workflows/mindforge-verify-phase.md +0 -254
- package/.agent/workflows/mindforge-verify-work.md +0 -628
- package/.agent/workflows/mindforge:add-backlog.md +0 -24
- package/.agent/workflows/mindforge:agent.md +0 -25
- package/.agent/workflows/mindforge:approve.md +0 -21
- package/.agent/workflows/mindforge:architecture.md +0 -40
- package/.agent/workflows/mindforge:audit.md +0 -33
- package/.agent/workflows/mindforge:auto.md +0 -25
- package/.agent/workflows/mindforge:benchmark.md +0 -36
- package/.agent/workflows/mindforge:brainstorming.md +0 -16
- package/.agent/workflows/mindforge:browse.md +0 -29
- package/.agent/workflows/mindforge:complete-milestone.md +0 -21
- package/.agent/workflows/mindforge:costs.md +0 -14
- package/.agent/workflows/mindforge:cross-review.md +0 -20
- package/.agent/workflows/mindforge:dashboard.md +0 -101
- package/.agent/workflows/mindforge:debug.md +0 -131
- package/.agent/workflows/mindforge:discuss-phase.md +0 -141
- package/.agent/workflows/mindforge:do.md +0 -25
- package/.agent/workflows/mindforge:execute-phase.md +0 -205
- package/.agent/workflows/mindforge:executor.md +0 -18
- package/.agent/workflows/mindforge:health.md +0 -24
- package/.agent/workflows/mindforge:help.md +0 -26
- package/.agent/workflows/mindforge:identity.md +0 -18
- package/.agent/workflows/mindforge:init-org.md +0 -134
- package/.agent/workflows/mindforge:init-project.md +0 -185
- package/.agent/workflows/mindforge:install-skill.md +0 -27
- package/.agent/workflows/mindforge:learn.md +0 -146
- package/.agent/workflows/mindforge:map-codebase.md +0 -301
- package/.agent/workflows/mindforge:marketplace.md +0 -123
- package/.agent/workflows/mindforge:memory.md +0 -18
- package/.agent/workflows/mindforge:metrics.md +0 -25
- package/.agent/workflows/mindforge:migrate.md +0 -43
- package/.agent/workflows/mindforge:milestone.md +0 -15
- package/.agent/workflows/mindforge:new-runtime.md +0 -22
- package/.agent/workflows/mindforge:next.md +0 -108
- package/.agent/workflows/mindforge:note.md +0 -27
- package/.agent/workflows/mindforge:plan-phase.md +0 -139
- package/.agent/workflows/mindforge:planner.md +0 -18
- package/.agent/workflows/mindforge:plant-seed.md +0 -24
- package/.agent/workflows/mindforge:plugins.md +0 -43
- package/.agent/workflows/mindforge:pr-review.md +0 -44
- package/.agent/workflows/mindforge:profile-team.md +0 -26
- package/.agent/workflows/mindforge:publish-skill.md +0 -22
- package/.agent/workflows/mindforge:qa.md +0 -19
- package/.agent/workflows/mindforge:quick.md +0 -138
- package/.agent/workflows/mindforge:release.md +0 -13
- package/.agent/workflows/mindforge:remember.md +0 -29
- package/.agent/workflows/mindforge:research.md +0 -15
- package/.agent/workflows/mindforge:researcher.md +0 -18
- package/.agent/workflows/mindforge:retrospective.md +0 -29
- package/.agent/workflows/mindforge:review-backlog.md +0 -26
- package/.agent/workflows/mindforge:review.md +0 -160
- package/.agent/workflows/mindforge:reviewer.md +0 -18
- package/.agent/workflows/mindforge:security-scan.md +0 -236
- package/.agent/workflows/mindforge:session-report.md +0 -31
- package/.agent/workflows/mindforge:ship.md +0 -108
- package/.agent/workflows/mindforge:skills.md +0 -144
- package/.agent/workflows/mindforge:soul.md +0 -54
- package/.agent/workflows/mindforge:status.md +0 -107
- package/.agent/workflows/mindforge:steer.md +0 -16
- package/.agent/workflows/mindforge:sync-confluence.md +0 -14
- package/.agent/workflows/mindforge:sync-jira.md +0 -15
- package/.agent/workflows/mindforge:tdd.md +0 -46
- package/.agent/workflows/mindforge:tokens.md +0 -11
- package/.agent/workflows/mindforge:tool.md +0 -18
- package/.agent/workflows/mindforge:ui-phase.md +0 -27
- package/.agent/workflows/mindforge:ui-review.md +0 -28
- package/.agent/workflows/mindforge:update.md +0 -45
- package/.agent/workflows/mindforge:validate-phase.md +0 -25
- package/.agent/workflows/mindforge:verify-phase.md +0 -65
- package/.agent/workflows/mindforge:workspace.md +0 -32
- package/.agent/workflows/mindforge:workstreams.md +0 -27
- package/.agent/workflows/publish-release.md +0 -36
- package/.claude/CLAUDE.md +0 -102
- package/.claude/commands/forge/help.md +0 -7
- package/.claude/commands/forge/init-project.md +0 -32
- package/.claude/commands/forge/plan-phase.md +0 -30
- package/.claude/commands/mindforge/add-backlog.md +0 -32
- package/.claude/commands/mindforge/agent.md +0 -31
- package/.claude/commands/mindforge/approve.md +0 -22
- package/.claude/commands/mindforge/audit.md +0 -34
- package/.claude/commands/mindforge/auto.md +0 -26
- package/.claude/commands/mindforge/benchmark.md +0 -37
- package/.claude/commands/mindforge/browse.md +0 -30
- package/.claude/commands/mindforge/complete-milestone.md +0 -22
- package/.claude/commands/mindforge/costs.md +0 -15
- package/.claude/commands/mindforge/cross-review.md +0 -21
- package/.claude/commands/mindforge/dashboard.md +0 -102
- package/.claude/commands/mindforge/debug.md +0 -133
- package/.claude/commands/mindforge/discuss-phase.md +0 -142
- package/.claude/commands/mindforge/do.md +0 -31
- package/.claude/commands/mindforge/execute-phase.md +0 -200
- package/.claude/commands/mindforge/health.md +0 -31
- package/.claude/commands/mindforge/help.md +0 -33
- package/.claude/commands/mindforge/init-org.md +0 -135
- package/.claude/commands/mindforge/init-project.md +0 -170
- package/.claude/commands/mindforge/install-skill.md +0 -28
- package/.claude/commands/mindforge/learn.md +0 -147
- package/.claude/commands/mindforge/learning.md +0 -20
- package/.claude/commands/mindforge/map-codebase.md +0 -302
- package/.claude/commands/mindforge/marketplace.md +0 -124
- package/.claude/commands/mindforge/metrics.md +0 -26
- package/.claude/commands/mindforge/migrate.md +0 -44
- package/.claude/commands/mindforge/milestone.md +0 -16
- package/.claude/commands/mindforge/new-runtime.md +0 -23
- package/.claude/commands/mindforge/next.md +0 -109
- package/.claude/commands/mindforge/note.md +0 -35
- package/.claude/commands/mindforge/plan-phase.md +0 -131
- package/.claude/commands/mindforge/plant-seed.md +0 -31
- package/.claude/commands/mindforge/plugins.md +0 -44
- package/.claude/commands/mindforge/pr-review.md +0 -45
- package/.claude/commands/mindforge/profile-team.md +0 -27
- package/.claude/commands/mindforge/publish-skill.md +0 -23
- package/.claude/commands/mindforge/qa.md +0 -20
- package/.claude/commands/mindforge/quick.md +0 -139
- package/.claude/commands/mindforge/record-learning.md +0 -22
- package/.claude/commands/mindforge/release.md +0 -14
- package/.claude/commands/mindforge/remember.md +0 -30
- package/.claude/commands/mindforge/research.md +0 -16
- package/.claude/commands/mindforge/retrospective.md +0 -31
- package/.claude/commands/mindforge/review-backlog.md +0 -34
- package/.claude/commands/mindforge/review.md +0 -161
- package/.claude/commands/mindforge/security-scan.md +0 -242
- package/.claude/commands/mindforge/session-report.md +0 -39
- package/.claude/commands/mindforge/ship.md +0 -111
- package/.claude/commands/mindforge/skills.md +0 -145
- package/.claude/commands/mindforge/status.md +0 -113
- package/.claude/commands/mindforge/steer.md +0 -17
- package/.claude/commands/mindforge/sync-confluence.md +0 -15
- package/.claude/commands/mindforge/sync-jira.md +0 -16
- package/.claude/commands/mindforge/tokens.md +0 -12
- package/.claude/commands/mindforge/ui-phase.md +0 -34
- package/.claude/commands/mindforge/ui-review.md +0 -36
- package/.claude/commands/mindforge/update.md +0 -46
- package/.claude/commands/mindforge/validate-phase.md +0 -31
- package/.claude/commands/mindforge/verify-phase.md +0 -66
- package/.claude/commands/mindforge/workspace.md +0 -33
- package/.claude/commands/mindforge/workstreams.md +0 -35
- package/.claude/settings.local.json +0 -16
- package/.mindforge/audit/AUDIT-SCHEMA.md +0 -470
- package/.mindforge/browser/daemon-protocol.md +0 -24
- package/.mindforge/browser/qa-engine.md +0 -16
- package/.mindforge/browser/session-manager.md +0 -18
- package/.mindforge/browser/visual-verify-spec.md +0 -31
- package/.mindforge/celestial.db +0 -0
- package/.mindforge/ci/ci-config-schema.md +0 -21
- package/.mindforge/ci/ci-mode.md +0 -179
- package/.mindforge/ci/github-actions-adapter.md +0 -224
- package/.mindforge/ci/gitlab-ci-adapter.md +0 -31
- package/.mindforge/ci/jenkins-adapter.md +0 -44
- package/.mindforge/dashboard/api-reference.md +0 -122
- package/.mindforge/dashboard/dashboard-spec.md +0 -96
- package/.mindforge/distribution/marketplace.md +0 -53
- package/.mindforge/distribution/registry-client.md +0 -166
- package/.mindforge/distribution/registry-schema.md +0 -96
- package/.mindforge/distribution/skill-publisher.md +0 -44
- package/.mindforge/distribution/skill-validator.md +0 -74
- package/.mindforge/governance/GOVERNANCE-CONFIG.md +0 -17
- package/.mindforge/governance/approval-workflow.md +0 -37
- package/.mindforge/governance/change-classifier.md +0 -63
- package/.mindforge/governance/compliance-gates.md +0 -31
- package/.mindforge/governance/policies/sovereign-default.json +0 -16
- package/.mindforge/integrations/confluence.md +0 -27
- package/.mindforge/integrations/connection-manager.md +0 -163
- package/.mindforge/integrations/github.md +0 -25
- package/.mindforge/integrations/gitlab.md +0 -13
- package/.mindforge/integrations/jira.md +0 -102
- package/.mindforge/integrations/slack.md +0 -41
- package/.mindforge/intelligence/antipattern-detector.md +0 -75
- package/.mindforge/intelligence/difficulty-scorer.md +0 -55
- package/.mindforge/intelligence/health-engine.md +0 -208
- package/.mindforge/intelligence/skill-gap-analyser.md +0 -40
- package/.mindforge/intelligence/smart-compaction.md +0 -71
- package/.mindforge/memory/MEMORY-SCHEMA.md +0 -155
- package/.mindforge/memory/engine/capture-protocol.md +0 -36
- package/.mindforge/memory/engine/global-sync-spec.md +0 -42
- package/.mindforge/memory/engine/retrieval-spec.md +0 -44
- package/.mindforge/memory/sync-manifest.json +0 -6
- package/.mindforge/metrics/METRICS-SCHEMA.md +0 -42
- package/.mindforge/metrics/quality-tracker.md +0 -32
- package/.mindforge/models/model-registry.md +0 -48
- package/.mindforge/models/model-router.md +0 -30
- package/.mindforge/monorepo/cross-package-planner.md +0 -114
- package/.mindforge/monorepo/dependency-graph-builder.md +0 -32
- package/.mindforge/monorepo/workspace-detector.md +0 -129
- package/.mindforge/org/CONVENTIONS.md +0 -62
- package/.mindforge/org/ORG.md +0 -51
- package/.mindforge/org/SECURITY.md +0 -50
- package/.mindforge/org/TOOLS.md +0 -53
- package/.mindforge/org/integrations/INTEGRATIONS-CONFIG.md +0 -58
- package/.mindforge/org/skills/MANIFEST.md +0 -15
- package/.mindforge/plugins/PLUGINS-MANIFEST.md +0 -23
- package/.mindforge/plugins/plugin-loader.md +0 -93
- package/.mindforge/plugins/plugin-registry.md +0 -44
- package/.mindforge/plugins/plugin-schema.md +0 -68
- package/.mindforge/pr-review/ai-reviewer.md +0 -266
- package/.mindforge/pr-review/finding-formatter.md +0 -46
- package/.mindforge/pr-review/review-prompt-templates.md +0 -44
- package/.mindforge/production/compatibility-layer.md +0 -39
- package/.mindforge/production/migration-engine.md +0 -52
- package/.mindforge/production/production-checklist.md +0 -76
- package/.mindforge/production/token-optimiser.md +0 -68
- package/.mindforge/skills-builder/auto-capture-protocol.md +0 -88
- package/.mindforge/skills-builder/learn-protocol.md +0 -161
- package/.mindforge/skills-builder/quality-scoring.md +0 -120
- package/.mindforge/team/TEAM-PROFILE.md +0 -42
- package/.mindforge/team/multi-handoff.md +0 -23
- package/.mindforge/team/profiles/README.md +0 -13
- package/.mindforge/team/session-merger.md +0 -18
- package/.planning/ARCHITECTURE.md +0 -0
- package/.planning/HANDOFF.json +0 -8
- package/.planning/PROJECT.md +0 -33
- package/.planning/RELEASE-CHECKLIST.md +0 -68
- package/.planning/REQUIREMENTS.md +0 -35
- package/.planning/ROADMAP.md +0 -12
- package/.planning/STATE.md +0 -36
- package/.planning/approvals/.gitkeep +0 -1
- package/.planning/archive/.gitkeep +0 -1
- package/.planning/audit-archive/.gitkeep +0 -1
- package/.planning/decisions/.gitkeep +0 -0
- package/.planning/jira-sync.json +0 -1
- package/.planning/milestones/.gitkeep +0 -1
- package/.planning/phases/.gitkeep +0 -0
- package/.planning/research/.gitkeep +0 -0
- package/.planning/screenshots/.gitkeep +0 -0
- package/.planning/slack-threads.json +0 -1
- package/docs/CAPABILITIES-MANIFEST.md +0 -64
- package/docs/Context/Master-Context.md +0 -731
- package/docs/INTELLIGENCE-MESH.md +0 -37
- package/docs/MIND-FORGE-REFERENCE-V6.md +0 -96
- package/docs/PERSONAS.md +0 -960
- package/docs/References/audit-events.md +0 -59
- package/docs/References/checkpoints.md +0 -778
- package/docs/References/commands.md +0 -107
- package/docs/References/config-reference.md +0 -81
- package/docs/References/continuation-format.md +0 -249
- package/docs/References/decimal-phase-calculation.md +0 -64
- package/docs/References/git-integration.md +0 -295
- package/docs/References/git-planning-commit.md +0 -38
- package/docs/References/model-profile-resolution.md +0 -36
- package/docs/References/model-profiles.md +0 -139
- package/docs/References/phase-argument-parsing.md +0 -61
- package/docs/References/planning-config.md +0 -202
- package/docs/References/questioning.md +0 -162
- package/docs/References/sdk-api.md +0 -53
- package/docs/References/skills-api.md +0 -57
- package/docs/References/tdd.md +0 -263
- package/docs/References/ui-brand.md +0 -160
- package/docs/References/user-profiling.md +0 -681
- package/docs/References/verification-patterns.md +0 -612
- package/docs/References/workstream-flag.md +0 -58
- package/docs/Templates/Agents/CLAUDE-MD.md +0 -122
- package/docs/Templates/Agents/COPILOT-INSTRUCTIONS.md +0 -7
- package/docs/Templates/Agents/DEBUGGER-PROMPT.md +0 -91
- package/docs/Templates/Agents/PLANNER-PROMPT.md +0 -117
- package/docs/Templates/Codebase/architecture.md +0 -255
- package/docs/Templates/Codebase/concerns.md +0 -310
- package/docs/Templates/Codebase/conventions.md +0 -307
- package/docs/Templates/Codebase/integrations.md +0 -280
- package/docs/Templates/Codebase/stack.md +0 -186
- package/docs/Templates/Codebase/structure.md +0 -285
- package/docs/Templates/Codebase/testing.md +0 -480
- package/docs/Templates/Execution/CONTINUE-HERE.md +0 -78
- package/docs/Templates/Execution/DISCUSSION-LOG.md +0 -63
- package/docs/Templates/Execution/PHASE-PROMPT.md +0 -610
- package/docs/Templates/Execution/STATE.md +0 -176
- package/docs/Templates/Execution/SUMMARY-COMPLEX.md +0 -59
- package/docs/Templates/Execution/SUMMARY-MINIMAL.md +0 -41
- package/docs/Templates/Execution/SUMMARY-STANDARD.md +0 -48
- package/docs/Templates/Execution/SUMMARY.md +0 -248
- package/docs/Templates/Profile/DEV-PREFERENCES.md +0 -21
- package/docs/Templates/Profile/USER-PROFILE.md +0 -146
- package/docs/Templates/Profile/USER-SETUP.md +0 -311
- package/docs/Templates/Project/AGENTS_LEARNING.md +0 -88
- package/docs/Templates/Project/DISCOVERY.md +0 -146
- package/docs/Templates/Project/MILESTONE-ARCHIVE.md +0 -123
- package/docs/Templates/Project/MILESTONE.md +0 -115
- package/docs/Templates/Project/PROJECT.md +0 -206
- package/docs/Templates/Project/REQUIREMENTS.md +0 -231
- package/docs/Templates/Project/RETROSPECTIVE.md +0 -54
- package/docs/Templates/Project/ROADMAP.md +0 -202
- package/docs/Templates/Quality/DEBUG.md +0 -164
- package/docs/Templates/Quality/UAT.md +0 -280
- package/docs/Templates/Quality/UI-SPEC.md +0 -100
- package/docs/Templates/Quality/VALIDATION.md +0 -76
- package/docs/Templates/Quality/VERIFICATION-REPORT.md +0 -322
- package/docs/Templates/Research/ARCHITECTURE.md +0 -204
- package/docs/Templates/Research/FEATURES.md +0 -147
- package/docs/Templates/Research/PITFALLS.md +0 -200
- package/docs/Templates/Research/STACK.md +0 -120
- package/docs/Templates/Research/SUMMARY.md +0 -170
- package/docs/Templates/System/CONFIG.json +0 -43
- package/docs/Templates/System/CONTEXT.md +0 -352
- package/docs/adr/ADR-024-browser-localhost-only.md +0 -17
- package/docs/adr/ADR-025-visual-verify-failure-treatment.md +0 -19
- package/docs/adr/ADR-026-session-persistence-security.md +0 -20
- package/docs/adr/ADR-042-ads-protocol.md +0 -30
- package/docs/architecture/NEXUS-DASHBOARD.md +0 -35
- package/docs/architecture/PAR-ZTS-SURVEY.md +0 -43
- package/docs/architecture/README.md +0 -78
- package/docs/architecture/V3-CORE.md +0 -52
- package/docs/architecture/V4-SWARM-MESH.md +0 -77
- package/docs/architecture/V5-ENTERPRISE.md +0 -131
- package/docs/architecture/V6-SOVEREIGN.md +0 -43
- package/docs/architecture/V8-SRE.md +0 -88
- package/docs/architecture/V9-BEDROCK.md +0 -162
- package/docs/architecture/adr-039-multi-runtime-support.md +0 -20
- package/docs/architecture/adr-040-additive-schema-migration.md +0 -21
- package/docs/architecture/adr-041-stable-runtime-interface-contract.md +0 -20
- package/docs/architecture/decision-records-index.md +0 -29
- package/docs/ci-cd-integration.md +0 -30
- package/docs/ci-cd.md +0 -92
- package/docs/ci-quickstart.md +0 -78
- package/docs/commands-skills/DISCOVERED_SKILLS.md +0 -21
- package/docs/contributing/CONTRIBUTING.md +0 -38
- package/docs/contributing/plugin-authoring.md +0 -50
- package/docs/contributing/skill-authoring.md +0 -41
- package/docs/enterprise-setup.md +0 -25
- package/docs/feature-dashboard.md +0 -63
- package/docs/governance-guide.md +0 -134
- package/docs/monorepo-guide.md +0 -26
- package/docs/persona-customisation.md +0 -56
- package/docs/publishing-guide.md +0 -43
- package/docs/quick-verify.md +0 -33
- package/docs/registry/AGENTS.md +0 -37
- package/docs/registry/COMMANDS.md +0 -87
- package/docs/registry/HOOKS.md +0 -38
- package/docs/registry/PERSONAS.md +0 -64
- package/docs/registry/README.md +0 -27
- package/docs/registry/SKILLS.md +0 -142
- package/docs/registry/WORKFLOWS.md +0 -72
- package/docs/release-checklist-guide.md +0 -37
- package/docs/requirements.md +0 -29
- package/docs/security/SECURITY.md +0 -55
- package/docs/security/ZTAI-OVERVIEW.md +0 -37
- package/docs/security/penetration-test-results.md +0 -31
- package/docs/security/threat-model.md +0 -142
- package/docs/skills-authoring-guide.md +0 -176
- package/docs/skills-publishing-guide.md +0 -22
- package/docs/team-setup-guide.md +0 -21
- package/docs/testing-current-version.md +0 -130
- package/docs/tutorial.md +0 -162
- package/docs/upgrade.md +0 -58
- package/docs/usp-features.md +0 -102
- package/docs/workflow-atlas.md +0 -57
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# Architecture Examples
|
|
2
|
-
|
|
3
|
-
Concrete good/bad examples for each core principle in SKILL.md.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Boundaries at Real Differences
|
|
8
|
-
|
|
9
|
-
**Good** - Meaningful boundary:
|
|
10
|
-
```
|
|
11
|
-
# Users and Billing are separate bounded contexts
|
|
12
|
-
# - Different teams own them
|
|
13
|
-
# - Different change cadences (users: weekly, billing: quarterly)
|
|
14
|
-
# - Different compliance requirements
|
|
15
|
-
|
|
16
|
-
src/
|
|
17
|
-
users/ # User management domain
|
|
18
|
-
models.py
|
|
19
|
-
services.py
|
|
20
|
-
api.py
|
|
21
|
-
billing/ # Billing domain
|
|
22
|
-
models.py
|
|
23
|
-
services.py
|
|
24
|
-
api.py
|
|
25
|
-
shared/ # Truly shared utilities
|
|
26
|
-
auth.py
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Bad** - Ceremony without purpose:
|
|
30
|
-
```
|
|
31
|
-
# UserService → UserRepository → UserRepositoryImpl
|
|
32
|
-
# ...when you'll never swap the database
|
|
33
|
-
|
|
34
|
-
src/
|
|
35
|
-
interfaces/
|
|
36
|
-
IUserRepository.py # One implementation exists
|
|
37
|
-
repositories/
|
|
38
|
-
UserRepositoryImpl.py # Wraps SQLAlchemy, which is already a repository
|
|
39
|
-
services/
|
|
40
|
-
UserService.py # Just calls the repository
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Dependencies Flow Inward
|
|
46
|
-
|
|
47
|
-
**Good** - Clear dependency direction:
|
|
48
|
-
```
|
|
49
|
-
# Dependency flows inward: infrastructure → application → domain
|
|
50
|
-
|
|
51
|
-
domain/ # Pure business logic, no imports from outer layers
|
|
52
|
-
order.py # Order entity with business rules
|
|
53
|
-
|
|
54
|
-
application/ # Use cases, orchestrates domain
|
|
55
|
-
place_order.py # Imports from domain/, not infrastructure/
|
|
56
|
-
|
|
57
|
-
infrastructure/ # External concerns
|
|
58
|
-
postgres.py # Implements persistence, imports from application/
|
|
59
|
-
stripe.py # Implements payments
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Follow the Data
|
|
65
|
-
|
|
66
|
-
**Good** - Obvious data flow:
|
|
67
|
-
```
|
|
68
|
-
Request → Validate → Transform → Store → Respond
|
|
69
|
-
|
|
70
|
-
# Each step is a clear function/module:
|
|
71
|
-
api/routes.py # Request enters
|
|
72
|
-
validators.py # Validation
|
|
73
|
-
transformers.py # Business logic transformation
|
|
74
|
-
repositories.py # Storage
|
|
75
|
-
serializers.py # Response shaping
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Design for Failure
|
|
81
|
-
|
|
82
|
-
**Good** - Failure-aware design with compensation:
|
|
83
|
-
```python
|
|
84
|
-
class OrderService:
|
|
85
|
-
def place_order(self, order: Order) -> Result:
|
|
86
|
-
inventory = self.inventory.reserve(order.items)
|
|
87
|
-
if inventory.failed:
|
|
88
|
-
return Result.failure("Items unavailable", retry=False)
|
|
89
|
-
|
|
90
|
-
payment = self.payments.charge(order.total)
|
|
91
|
-
if payment.failed:
|
|
92
|
-
self.inventory.release(inventory.reservation_id) # Compensate
|
|
93
|
-
return Result.failure("Payment failed", retry=True)
|
|
94
|
-
|
|
95
|
-
return Result.success(order)
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Design for Operations
|
|
101
|
-
|
|
102
|
-
**Good** - Observable architecture:
|
|
103
|
-
```python
|
|
104
|
-
@trace
|
|
105
|
-
def handle_request(request):
|
|
106
|
-
log.info("Processing", request_id=request.id, user=request.user_id)
|
|
107
|
-
try:
|
|
108
|
-
result = process(request)
|
|
109
|
-
log.info("Completed", request_id=request.id, result=result.status)
|
|
110
|
-
return result
|
|
111
|
-
except Exception as e:
|
|
112
|
-
log.error("Failed", request_id=request.id, error=str(e),
|
|
113
|
-
context=request.to_dict()) # Full context for replay
|
|
114
|
-
raise
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Key elements:
|
|
118
|
-
- Every request gets a correlation ID
|
|
119
|
-
- Every service logs with that ID
|
|
120
|
-
- Every error includes full context for reproduction
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Scaling Checklist
|
|
2
|
-
|
|
3
|
-
Concrete techniques for when the complexity checklist in SKILL.md confirms scale is a real problem. Apply in order - each level solves the previous level's bottleneck.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Level 0: Optimize First
|
|
8
|
-
|
|
9
|
-
Before adding infrastructure, exhaust these:
|
|
10
|
-
|
|
11
|
-
- [ ] Database queries have proper indexes
|
|
12
|
-
- [ ] N+1 queries eliminated
|
|
13
|
-
- [ ] Connection pooling configured
|
|
14
|
-
- [ ] Slow endpoints profiled and optimized
|
|
15
|
-
- [ ] Static assets served via CDN
|
|
16
|
-
|
|
17
|
-
## Level 1: Read-Heavy
|
|
18
|
-
|
|
19
|
-
**Symptom**: Database reads are the bottleneck.
|
|
20
|
-
|
|
21
|
-
| Technique | When | Trade-off |
|
|
22
|
-
|-----------|------|-----------|
|
|
23
|
-
| Application cache (in-memory) | Small, frequently accessed data | Stale data, memory pressure |
|
|
24
|
-
| Redis/Memcached | Shared cache across instances | Network hop, cache invalidation complexity |
|
|
25
|
-
| Read replicas | High read volume, slight staleness OK | Replication lag, eventual consistency |
|
|
26
|
-
| CDN | Static or semi-static content | Cache invalidation delay |
|
|
27
|
-
|
|
28
|
-
## Level 2: Write-Heavy
|
|
29
|
-
|
|
30
|
-
**Symptom**: Database writes or processing are the bottleneck.
|
|
31
|
-
|
|
32
|
-
| Technique | When | Trade-off |
|
|
33
|
-
|-----------|------|-----------|
|
|
34
|
-
| Async task queue (Celery, SQS) | Work can be deferred | Eventual consistency, failure handling |
|
|
35
|
-
| Write-behind cache | Batch frequent writes | Data loss risk on crash |
|
|
36
|
-
| Event streaming (Kafka) | Multiple consumers of same data | Operational complexity, ordering guarantees |
|
|
37
|
-
| CQRS | Reads and writes have diverged significantly | Two models to maintain |
|
|
38
|
-
|
|
39
|
-
## Level 3: Traffic Spikes
|
|
40
|
-
|
|
41
|
-
**Symptom**: Individual instances can't handle peak load.
|
|
42
|
-
|
|
43
|
-
| Technique | When | Trade-off |
|
|
44
|
-
|-----------|------|-----------|
|
|
45
|
-
| Horizontal scaling + load balancer | Stateless services | Session management, deploy complexity |
|
|
46
|
-
| Auto-scaling | Unpredictable traffic patterns | Cold start latency, cost spikes |
|
|
47
|
-
| Rate limiting | Protect against abuse/spikes | Legitimate users may be throttled |
|
|
48
|
-
| Circuit breakers | Downstream services degrade | Partial functionality during failures |
|
|
49
|
-
|
|
50
|
-
## Level 4: Data Growth
|
|
51
|
-
|
|
52
|
-
**Symptom**: Single database can't hold or query all the data efficiently.
|
|
53
|
-
|
|
54
|
-
| Technique | When | Trade-off |
|
|
55
|
-
|-----------|------|-----------|
|
|
56
|
-
| Table partitioning | Time-series or naturally partitioned data | Query complexity, partition management |
|
|
57
|
-
| Archival / cold storage | Old data rarely accessed | Access latency for archived data |
|
|
58
|
-
| Database sharding | Partitioning insufficient, clear shard key exists | Cross-shard queries, operational burden |
|
|
59
|
-
| Search index (Elasticsearch) | Full-text or complex queries on large datasets | Index lag, another system to operate |
|
|
60
|
-
|
|
61
|
-
## Level 5: Multi-Region
|
|
62
|
-
|
|
63
|
-
**Symptom**: Users are geographically distributed, latency matters.
|
|
64
|
-
|
|
65
|
-
| Technique | When | Trade-off |
|
|
66
|
-
|-----------|------|-----------|
|
|
67
|
-
| CDN + edge caching | Static/semi-static content | Cache invalidation |
|
|
68
|
-
| Read replicas per region | Read-heavy, slight staleness OK | Replication lag |
|
|
69
|
-
| Active-passive failover | Disaster recovery | Failover time, cost of standby |
|
|
70
|
-
| Active-active multi-region | True global low-latency required | Conflict resolution, extreme complexity |
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Decision Rule
|
|
75
|
-
|
|
76
|
-
Always start at Level 0. Move to the next level only when you have **measured evidence** that the current level is insufficient. Skipping levels is how you end up with Kafka for a TODO app.
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tdd
|
|
3
|
-
description: Strict TDD workflow (Red-Green-Refactor).
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
name: tdd
|
|
8
|
-
description: Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Test-Driven Development
|
|
12
|
-
|
|
13
|
-
## Philosophy
|
|
14
|
-
|
|
15
|
-
**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.
|
|
16
|
-
|
|
17
|
-
**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.
|
|
18
|
-
|
|
19
|
-
**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.
|
|
20
|
-
|
|
21
|
-
See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
|
|
22
|
-
|
|
23
|
-
## Anti-Pattern: Horizontal Slices
|
|
24
|
-
|
|
25
|
-
**DO NOT write all tests first, then all implementation.** This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all code."
|
|
26
|
-
|
|
27
|
-
This produces **crap tests**:
|
|
28
|
-
|
|
29
|
-
- Tests written in bulk test _imagined_ behavior, not _actual_ behavior
|
|
30
|
-
- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior
|
|
31
|
-
- Tests become insensitive to real changes - they pass when behavior breaks, fail when behavior is fine
|
|
32
|
-
- You outrun your headlights, committing to test structure before understanding the implementation
|
|
33
|
-
|
|
34
|
-
**Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
WRONG (horizontal):
|
|
38
|
-
RED: test1, test2, test3, test4, test5
|
|
39
|
-
GREEN: impl1, impl2, impl3, impl4, impl5
|
|
40
|
-
|
|
41
|
-
RIGHT (vertical):
|
|
42
|
-
RED→GREEN: test1→impl1
|
|
43
|
-
RED→GREEN: test2→impl2
|
|
44
|
-
RED→GREEN: test3→impl3
|
|
45
|
-
...
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Workflow
|
|
49
|
-
|
|
50
|
-
### 1. Planning
|
|
51
|
-
|
|
52
|
-
Before writing any code:
|
|
53
|
-
|
|
54
|
-
- [ ] Confirm with user what interface changes are needed
|
|
55
|
-
- [ ] Confirm with user which behaviors to test (prioritize)
|
|
56
|
-
- [ ] Identify opportunities for [deep modules](deep-modules.md) (small interface, deep implementation)
|
|
57
|
-
- [ ] Design interfaces for [testability](interface-design.md)
|
|
58
|
-
- [ ] List the behaviors to test (not implementation steps)
|
|
59
|
-
- [ ] Get user approval on the plan
|
|
60
|
-
|
|
61
|
-
Ask: "What should the public interface look like? Which behaviors are most important to test?"
|
|
62
|
-
|
|
63
|
-
**You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.
|
|
64
|
-
|
|
65
|
-
### 2. Tracer Bullet
|
|
66
|
-
|
|
67
|
-
Write ONE test that confirms ONE thing about the system:
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
RED: Write test for first behavior → test fails
|
|
71
|
-
GREEN: Write minimal code to pass → test passes
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
This is your tracer bullet - proves the path works end-to-end.
|
|
75
|
-
|
|
76
|
-
### 3. Incremental Loop
|
|
77
|
-
|
|
78
|
-
For each remaining behavior:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
RED: Write next test → fails
|
|
82
|
-
GREEN: Minimal code to pass → passes
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Rules:
|
|
86
|
-
|
|
87
|
-
- One test at a time
|
|
88
|
-
- Only enough code to pass current test
|
|
89
|
-
- Don't anticipate future tests
|
|
90
|
-
- Keep tests focused on observable behavior
|
|
91
|
-
|
|
92
|
-
### 4. Refactor
|
|
93
|
-
|
|
94
|
-
After all tests pass, look for [refactor candidates](refactoring.md):
|
|
95
|
-
|
|
96
|
-
- [ ] Extract duplication
|
|
97
|
-
- [ ] Deepen modules (move complexity behind simple interfaces)
|
|
98
|
-
- [ ] Apply SOLID principles where natural
|
|
99
|
-
- [ ] Consider what new code reveals about existing code
|
|
100
|
-
- [ ] Run tests after each refactor step
|
|
101
|
-
|
|
102
|
-
**Never refactor while RED.** Get to GREEN first.
|
|
103
|
-
|
|
104
|
-
## Checklist Per Cycle
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
[ ] Test describes behavior, not implementation
|
|
108
|
-
[ ] Test uses public interface only
|
|
109
|
-
[ ] Test would survive internal refactor
|
|
110
|
-
[ ] Code is minimal for this test
|
|
111
|
-
[ ] No speculative features added
|
|
112
|
-
```
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Deep Modules in TDD
|
|
2
|
-
|
|
3
|
-
Deep modules are those with complex internal logic but a simple, stable interface. In TDD, our goal is to test the **depth** of the logic through the **surface** of the interface.
|
|
4
|
-
|
|
5
|
-
## Principles
|
|
6
|
-
|
|
7
|
-
### 1. Test behavior, not implementation
|
|
8
|
-
- Write tests against the public API of the module.
|
|
9
|
-
- Avoid testing private methods or internal state directly.
|
|
10
|
-
- If the internal logic is too complex to test through the public API, the module might be **too deep** or the interface **too narrow**.
|
|
11
|
-
|
|
12
|
-
### 2. Isolate complexity
|
|
13
|
-
- Use "Socialable Tests" for internal helper classes that are tightly coupled.
|
|
14
|
-
- Use "Solitary Tests" (with mocks) for external dependencies (DB, API, etc.).
|
|
15
|
-
|
|
16
|
-
### 3. Handle state transitions
|
|
17
|
-
- Deep modules often manage complex state machines.
|
|
18
|
-
- Use TDD to map out every valid (and invalid) state transition.
|
|
19
|
-
|
|
20
|
-
## Strategy: The "Opaque Box" Approach
|
|
21
|
-
Treat the module as an opaque box. Feed it inputs and verify outputs/side-effects. If the logic inside changes but the behavior remains the same, your tests should **not** break.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Interface Design through TDD
|
|
2
|
-
|
|
3
|
-
TDD is your best tool for designing clean, usable interfaces. By writing the test first, you are the **first consumer** of your own API.
|
|
4
|
-
|
|
5
|
-
## Design Signals from Tests
|
|
6
|
-
|
|
7
|
-
### "This test is too hard to setup"
|
|
8
|
-
- **Signal**: Your class has too many dependencies or is doing too much (violating SRP).
|
|
9
|
-
- **Fix**: Break the class into smaller, more focused components.
|
|
10
|
-
|
|
11
|
-
### "I have to mock 5 things just to test one method"
|
|
12
|
-
- **Signal**: Excessive coupling.
|
|
13
|
-
- **Fix**: Use Dependency Injection and define clearer boundaries.
|
|
14
|
-
|
|
15
|
-
### "I don't know what to name this test"
|
|
16
|
-
- **Signal**: The behavior is ill-defined or the module has "Identity Crisis".
|
|
17
|
-
- **Fix**: Re-evaluate the purpose of the component.
|
|
18
|
-
|
|
19
|
-
## Best Practices
|
|
20
|
-
- **Prefer Composition over Inheritance**: Tests are much easier to write for composed objects.
|
|
21
|
-
- **Keep Interfaces Narrow**: Only expose what is absolutely necessary for the consumer (and the test).
|
|
22
|
-
- **Return Meaningful Values**: Avoid `void` where possible; returning results makes assertion-based testing natural.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Mocking Strategies
|
|
2
|
-
|
|
3
|
-
Mocking is a double-edged sword. Used correctly, it isolates your code. Used poorly, it creates brittle tests that break with every refactor.
|
|
4
|
-
|
|
5
|
-
## When to Mock
|
|
6
|
-
- **External Systems**: Databases, File Systems, Network APIs, 3rd-party libraries.
|
|
7
|
-
- **Non-Deterministic Logic**: Time (`Date.now()`), Random numbers, GUID generation.
|
|
8
|
-
- **Expensive Operations**: Heavy computations or long-running tasks that would slow down the TDD loop.
|
|
9
|
-
|
|
10
|
-
## What NOT to Mock
|
|
11
|
-
- **Value Objects**: Objects that only hold data.
|
|
12
|
-
- **Internal Helpers**: If a helper is part of the module's logic, let the test exercise it ("Socialable Testing").
|
|
13
|
-
- **Language Features**: Don't mock standard library functions unless necessary for environment isolation.
|
|
14
|
-
|
|
15
|
-
## The Mocking Traps
|
|
16
|
-
|
|
17
|
-
### 1. The "Mirror" Trap
|
|
18
|
-
- **Problem**: Mocking internal calls so closely that the test just mirrors the implementation code.
|
|
19
|
-
- **Result**: You can't refactor without breaking the test.
|
|
20
|
-
- **Fix**: Assert on final outcomes or side-effects, not inner method calls.
|
|
21
|
-
|
|
22
|
-
### 2. The "Over-Mocking" Trap
|
|
23
|
-
- **Problem**: Mocking so many things that you aren't actually testing your code.
|
|
24
|
-
- **Fix**: Use **Fakes** (real implementations of interfaces, e.g., `InMemoryDatabase`) over Mocks where possible.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Refactoring with Confidence
|
|
2
|
-
|
|
3
|
-
Step 3 of the TDD loop is **Refactor**. This is where we move from "working code" to "clean code".
|
|
4
|
-
|
|
5
|
-
## The Refactoring Workflow
|
|
6
|
-
1. **Ensure tests are Green**: Never refactor while tests are failing.
|
|
7
|
-
2. **Make small changes**: One variable rename, one function extraction, or one pattern application.
|
|
8
|
-
3. **Run tests after EVERY change**: If they turn red, undo immediately.
|
|
9
|
-
4. **Repeat** until the code is clean.
|
|
10
|
-
|
|
11
|
-
## Refactoring-Safe Tests
|
|
12
|
-
Tests that facilitate refactoring have the following traits:
|
|
13
|
-
- **Implementation Agnostic**: They don't care *how* the result is calculated.
|
|
14
|
-
- **Explicit**: They clearly state the business rule being protected.
|
|
15
|
-
- **Fast**: They run in milliseconds, allowing for frequent execution.
|
|
16
|
-
|
|
17
|
-
## Signs You Need to Refactor
|
|
18
|
-
- Duplicated code logic.
|
|
19
|
-
- Long methods (> 20 lines).
|
|
20
|
-
- Large classes with multiple responsibilities.
|
|
21
|
-
- Hard-coded values that should be configuration.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Writing Effective TDD Tests
|
|
2
|
-
|
|
3
|
-
Your tests are the specification for your system. Treat them as first-class citizens.
|
|
4
|
-
|
|
5
|
-
## The Test Anatomy: AAA
|
|
6
|
-
|
|
7
|
-
- **Arrange**: Set up the environment, dependencies, and inputs.
|
|
8
|
-
- **Act**: Call the method/function being tested.
|
|
9
|
-
- **Assert**: Verify the result or state change.
|
|
10
|
-
|
|
11
|
-
## High-Quality TDD Tests
|
|
12
|
-
|
|
13
|
-
### 1. Single Responsibility
|
|
14
|
-
Each test should verify exactly **one** requirement. If a test has "and" in its name, it's likely two tests.
|
|
15
|
-
|
|
16
|
-
### 2. Descriptive Naming
|
|
17
|
-
Use the `should ... when ...` pattern.
|
|
18
|
-
- ✅ `should_calculate_discount_when_user_is_premium`
|
|
19
|
-
- ❌ `test_discount_logic_1`
|
|
20
|
-
|
|
21
|
-
### 3. Avoid Logic in Tests
|
|
22
|
-
If your test has `if` statements or `for` loops, it's too complex. Tests should be straightforward declarations of expected behavior.
|
|
23
|
-
|
|
24
|
-
### 4. Zero Watermarks
|
|
25
|
-
Ensure your tests clean up after themselves (e.g., deleting temporary files or resetting mocks) to avoid "leaky state" affecting other tests.
|
|
26
|
-
|
|
27
|
-
## Running Tests
|
|
28
|
-
Always keep your test runner in "watch mode" during TDD. The feedback loop must be near-instant.
|