@monoes/monomindcli 1.19.0 → 2.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/.claude/agents/github/issue-tracker.md +0 -2
- package/.claude/agents/github/pr-manager.md +0 -2
- package/.claude/agents/github/repo-architect.md +3 -11
- package/.claude/agents/goal/goal-planner.md +0 -1
- package/.claude/commands/github/issue-tracker.md +0 -2
- package/.claude/commands/github/pr-manager.md +0 -2
- package/.claude/commands/github/repo-architect.md +3 -10
- package/.claude/commands/mastermind/help.md +3 -3
- package/.claude/commands/workflows/README.md +0 -1
- package/.claude/commands/workflows/workflow-create.md +0 -1
- package/.claude/commands/workflows/workflow-execute.md +1 -3
- package/.claude/commands/workflows/workflow-export.md +0 -2
- package/.claude/helpers/handlers/agent-start-handler.cjs +18 -1
- package/.claude/helpers/handlers/edit-handler.cjs +15 -0
- package/.claude/helpers/handlers/gates-handler.cjs +2 -8
- package/.claude/helpers/handlers/route-handler.cjs +149 -7
- package/.claude/helpers/handlers/session-handler.cjs +47 -25
- package/.claude/helpers/handlers/session-restore-handler.cjs +80 -43
- package/.claude/helpers/handlers/task-handler.cjs +8 -4
- package/.claude/helpers/hook-handler.cjs +69 -16
- package/.claude/helpers/intelligence.cjs +100 -9
- package/.claude/helpers/router.cjs +78 -5
- package/.claude/helpers/skill-registry.json +0 -189
- package/.claude/skills/github-toolkit/SKILL.md +60 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -15
- package/.claude/skills/hooks-automation/SKILL.md +0 -1
- package/.claude/skills/mastermind-skills/_protocol.md +1 -1
- package/.claude/skills/mastermind-skills/build.md +1 -2
- package/.claude/skills/memory-toolkit/SKILL.md +75 -0
- package/.claude/skills/specialagent/SKILL.md +2 -4
- package/.claude/skills/swarm-advanced/SKILL.md +0 -1
- package/README.md +2 -5
- package/dist/src/autopilot-state.d.ts.map +1 -1
- package/dist/src/autopilot-state.js +4 -5
- package/dist/src/autopilot-state.js.map +1 -1
- package/dist/src/browser/dashboard/server.d.ts.map +1 -1
- package/dist/src/browser/dashboard/server.js +69 -1
- package/dist/src/browser/dashboard/server.js.map +1 -1
- package/dist/src/browser/dashboard/ui.html +214 -1764
- package/dist/src/capabilities/index.d.ts +0 -2
- package/dist/src/capabilities/index.d.ts.map +1 -1
- package/dist/src/capabilities/index.js +0 -1
- package/dist/src/capabilities/index.js.map +1 -1
- package/dist/src/commands/agent-lifecycle.d.ts.map +1 -1
- package/dist/src/commands/agent-lifecycle.js +2 -6
- package/dist/src/commands/agent-lifecycle.js.map +1 -1
- package/dist/src/commands/analyze.d.ts +0 -4
- package/dist/src/commands/analyze.d.ts.map +1 -1
- package/dist/src/commands/analyze.js +1 -29
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/completions.d.ts.map +1 -1
- package/dist/src/commands/completions.js +3 -22
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +0 -6
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/doctor-project-checks.d.ts +12 -2
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +130 -22
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +6 -5
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/guidance.d.ts +5 -1
- package/dist/src/commands/guidance.d.ts.map +1 -1
- package/dist/src/commands/guidance.js +11 -556
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind-comms.d.ts.map +1 -1
- package/dist/src/commands/hive-mind-comms.js +11 -4
- package/dist/src/commands/hive-mind-comms.js.map +1 -1
- package/dist/src/commands/hive-mind.d.ts +4 -4
- package/dist/src/commands/hive-mind.d.ts.map +1 -1
- package/dist/src/commands/hive-mind.js +9 -6
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks-formatting.d.ts +1 -5
- package/dist/src/commands/hooks-formatting.d.ts.map +1 -1
- package/dist/src/commands/hooks-formatting.js +1 -18
- package/dist/src/commands/hooks-formatting.js.map +1 -1
- package/dist/src/commands/hooks-workers.d.ts +1 -1
- package/dist/src/commands/hooks-workers.d.ts.map +1 -1
- package/dist/src/commands/hooks-workers.js +82 -330
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/index.d.ts +0 -5
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +0 -45
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init-wizard.js +1 -1
- package/dist/src/commands/init-wizard.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +4 -24
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/neural-core.js +11 -11
- package/dist/src/commands/neural-core.js.map +1 -1
- package/dist/src/commands/neural-optimize.d.ts.map +1 -1
- package/dist/src/commands/neural-optimize.js +9 -11
- package/dist/src/commands/neural-optimize.js.map +1 -1
- package/dist/src/commands/neural-registry.js +10 -10
- package/dist/src/commands/neural-registry.js.map +1 -1
- package/dist/src/commands/providers.d.ts.map +1 -1
- package/dist/src/commands/providers.js +90 -1
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/search-universal.d.ts +7 -1
- package/dist/src/commands/search-universal.d.ts.map +1 -1
- package/dist/src/commands/search-universal.js +59 -5
- package/dist/src/commands/search-universal.js.map +1 -1
- package/dist/src/commands/security-cve.d.ts.map +1 -1
- package/dist/src/commands/security-cve.js +3 -5
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/commands/session.d.ts.map +1 -1
- package/dist/src/commands/session.js +143 -3
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +0 -18
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +112 -65
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/consensus/audit-writer.d.ts.map +1 -1
- package/dist/src/consensus/audit-writer.js +43 -1
- package/dist/src/consensus/audit-writer.js.map +1 -1
- package/dist/src/consensus/tally.d.ts +19 -0
- package/dist/src/consensus/tally.d.ts.map +1 -0
- package/dist/src/consensus/tally.js +34 -0
- package/dist/src/consensus/tally.js.map +1 -0
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +10 -14
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +39 -86
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +0 -12
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +62 -0
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +2 -6
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +0 -3
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
- package/dist/src/knowledge/document-pipeline.js +18 -8
- package/dist/src/knowledge/document-pipeline.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +0 -2
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +12 -14
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +1 -1
- package/dist/src/mcp-tools/coherence/coherence-check.js +1 -19
- package/dist/src/mcp-tools/coherence/coherence-check.js.map +1 -1
- package/dist/src/mcp-tools/coherence/types.d.ts +3 -2
- package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -1
- package/dist/src/mcp-tools/coherence/types.js +3 -18
- package/dist/src/mcp-tools/coherence/types.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +1 -7
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/graphify-tools.js +2 -2
- package/dist/src/mcp-tools/graphify-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +7 -17
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +174 -38
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-advanced.d.ts +18 -0
- package/dist/src/mcp-tools/hooks-advanced.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-advanced.js +25 -0
- package/dist/src/mcp-tools/hooks-advanced.js.map +1 -0
- package/dist/src/mcp-tools/hooks-intelligence.d.ts +4 -8
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +33 -482
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts +1 -0
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +51 -43
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/hooks-synthesis.d.ts +31 -0
- package/dist/src/mcp-tools/hooks-synthesis.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-synthesis.js +196 -0
- package/dist/src/mcp-tools/hooks-synthesis.js.map +1 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +10 -8
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -1
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -1
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +20 -29
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.d.ts +6 -0
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +78 -220
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts +9 -4
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +242 -506
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +103 -0
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts +2 -1
- package/dist/src/memory/intelligence.d.ts.map +1 -1
- package/dist/src/memory/intelligence.js +56 -43
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +14 -9
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-read.d.ts.map +1 -1
- package/dist/src/memory/memory-read.js +1 -19
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/suggest.d.ts.map +1 -1
- package/dist/src/suggest.js +1 -7
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts +3 -2
- package/dist/src/transfer/store/discovery.d.ts.map +1 -1
- package/dist/src/transfer/store/discovery.js +22 -70
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/update/checker.d.ts.map +1 -1
- package/dist/src/update/checker.js +0 -1
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/utils/cosine-similarity.d.ts +22 -0
- package/dist/src/utils/cosine-similarity.d.ts.map +1 -0
- package/dist/src/utils/cosine-similarity.js +38 -0
- package/dist/src/utils/cosine-similarity.js.map +1 -0
- package/dist/src/utils/input-guards.d.ts +51 -0
- package/dist/src/utils/input-guards.d.ts.map +1 -0
- package/dist/src/utils/input-guards.js +223 -0
- package/dist/src/utils/input-guards.js.map +1 -0
- package/dist/src/utils/json-file.d.ts +33 -0
- package/dist/src/utils/json-file.d.ts.map +1 -0
- package/dist/src/utils/json-file.js +57 -0
- package/dist/src/utils/json-file.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -6
- package/scripts/sync-claude-assets.sh +16 -20
- package/.claude/agents/generated/case-analyst.md +0 -50
- package/.claude/agents/generated/channel-intelligence-director.md +0 -87
- package/.claude/agents/generated/chief-growth-officer.md +0 -88
- package/.claude/agents/generated/churn-analyst.md +0 -53
- package/.claude/agents/generated/code-reviewer.md +0 -55
- package/.claude/agents/generated/code-validator.md +0 -57
- package/.claude/agents/generated/complexity-scanner.md +0 -56
- package/.claude/agents/generated/content-seo-strategist.md +0 -90
- package/.claude/agents/generated/copy-editor.md +0 -45
- package/.claude/agents/generated/court-reporter.md +0 -50
- package/.claude/agents/generated/defender.md +0 -51
- package/.claude/agents/generated/devbot-orchestrator.md +0 -58
- package/.claude/agents/generated/devbot-planner.md +0 -63
- package/.claude/agents/generated/developer-community-strategist.md +0 -91
- package/.claude/agents/generated/editor-in-chief.md +0 -45
- package/.claude/agents/generated/fact-checker.md +0 -45
- package/.claude/agents/generated/impact-assessor.md +0 -54
- package/.claude/agents/generated/judge.md +0 -51
- package/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
- package/.claude/agents/generated/prosecutor.md +0 -51
- package/.claude/agents/generated/reporter.md +0 -45
- package/.claude/agents/generated/social-media-strategist.md +0 -91
- package/.claude/agents/generated/video-visual-strategist.md +0 -90
- package/.claude/agents/reengineer-squad/boss.md +0 -113
- package/.claude/agents/reengineer-squad/critic-architect.md +0 -132
- package/.claude/agents/reengineer-squad/git-manager.md +0 -145
- package/.claude/agents/reengineer-squad/idea-generator.md +0 -95
- package/.claude/agents/reengineer-squad/implementer.md +0 -112
- package/.claude/agents/reengineer-squad/integration-planner.md +0 -112
- package/.claude/agents/reengineer-squad/source-analyst.md +0 -103
- package/.claude/agents/reengineer-squad/target-analyst.md +0 -118
- package/.claude/agents/reengineer-squad/tester.md +0 -105
- package/.claude/agents/sparc/architecture.md +0 -453
- package/.claude/agents/sparc/pseudocode.md +0 -299
- package/.claude/agents/sparc/refinement.md +0 -504
- package/.claude/agents/sparc/specification.md +0 -258
- package/.claude/agents/templates/implementer-sparc-coder.md +0 -231
- package/.claude/commands/sparc/analyzer.md +0 -35
- package/.claude/commands/sparc/architect.md +0 -36
- package/.claude/commands/sparc/ask.md +0 -56
- package/.claude/commands/sparc/batch-executor.md +0 -37
- package/.claude/commands/sparc/code.md +0 -48
- package/.claude/commands/sparc/coder.md +0 -37
- package/.claude/commands/sparc/debug.md +0 -42
- package/.claude/commands/sparc/debugger.md +0 -37
- package/.claude/commands/sparc/designer.md +0 -36
- package/.claude/commands/sparc/devops.md +0 -68
- package/.claude/commands/sparc/docs-writer.md +0 -39
- package/.claude/commands/sparc/documenter.md +0 -37
- package/.claude/commands/sparc/innovator.md +0 -37
- package/.claude/commands/sparc/integration.md +0 -42
- package/.claude/commands/sparc/mcp.md +0 -76
- package/.claude/commands/sparc/memory-manager.md +0 -57
- package/.claude/commands/sparc/optimizer.md +0 -37
- package/.claude/commands/sparc/orchestrator.md +0 -70
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
- package/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
- package/.claude/commands/sparc/researcher.md +0 -37
- package/.claude/commands/sparc/reviewer.md +0 -37
- package/.claude/commands/sparc/security-review.md +0 -39
- package/.claude/commands/sparc/sparc-modes.md +0 -120
- package/.claude/commands/sparc/sparc.md +0 -71
- package/.claude/commands/sparc/spec-pseudocode.md +0 -39
- package/.claude/commands/sparc/supabase-admin.md +0 -301
- package/.claude/commands/sparc/swarm-coordinator.md +0 -50
- package/.claude/commands/sparc/tdd.md +0 -37
- package/.claude/commands/sparc/tester.md +0 -37
- package/.claude/commands/sparc/tutorial.md +0 -38
- package/.claude/commands/sparc/workflow-manager.md +0 -37
- package/.claude/commands/sparc.md +0 -112
- package/.claude/skills/sparc-methodology/SKILL.md +0 -950
- package/dist/src/capabilities/enrichment.d.ts +0 -44
- package/dist/src/capabilities/enrichment.d.ts.map +0 -1
- package/dist/src/capabilities/enrichment.js +0 -141
- package/dist/src/capabilities/enrichment.js.map +0 -1
- package/dist/src/commands/analyze-boundaries.d.ts +0 -14
- package/dist/src/commands/analyze-boundaries.d.ts.map +0 -1
- package/dist/src/commands/analyze-boundaries.js +0 -295
- package/dist/src/commands/analyze-boundaries.js.map +0 -1
- package/dist/src/commands/analyze-graph.d.ts +0 -14
- package/dist/src/commands/analyze-graph.d.ts.map +0 -1
- package/dist/src/commands/analyze-graph.js +0 -304
- package/dist/src/commands/analyze-graph.js.map +0 -1
- package/dist/src/commands/claims.d.ts +0 -10
- package/dist/src/commands/claims.d.ts.map +0 -1
- package/dist/src/commands/claims.js +0 -650
- package/dist/src/commands/claims.js.map +0 -1
- package/dist/src/commands/daemon.d.ts +0 -8
- package/dist/src/commands/daemon.d.ts.map +0 -1
- package/dist/src/commands/daemon.js +0 -681
- package/dist/src/commands/daemon.js.map +0 -1
- package/dist/src/commands/enrich.d.ts +0 -10
- package/dist/src/commands/enrich.d.ts.map +0 -1
- package/dist/src/commands/enrich.js +0 -58
- package/dist/src/commands/enrich.js.map +0 -1
- package/dist/src/commands/issues.d.ts +0 -21
- package/dist/src/commands/issues.d.ts.map +0 -1
- package/dist/src/commands/issues.js +0 -575
- package/dist/src/commands/issues.js.map +0 -1
- package/dist/src/commands/workflow.d.ts +0 -8
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js +0 -575
- package/dist/src/commands/workflow.js.map +0 -1
- package/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/workflow-tools.js +0 -717
- package/dist/src/mcp-tools/workflow-tools.js.map +0 -1
- package/dist/src/services/claim-service.d.ts +0 -198
- package/dist/src/services/claim-service.d.ts.map +0 -1
- package/dist/src/services/claim-service.js +0 -890
- package/dist/src/services/claim-service.js.map +0 -1
- package/dist/src/services/headless-worker-executor.d.ts +0 -311
- package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
- package/dist/src/services/headless-worker-executor.js +0 -1183
- package/dist/src/services/headless-worker-executor.js.map +0 -1
- package/dist/src/services/worker-daemon.d.ts +0 -230
- package/dist/src/services/worker-daemon.d.ts.map +0 -1
- package/dist/src/services/worker-daemon.js +0 -1350
- package/dist/src/services/worker-daemon.js.map +0 -1
- package/dist/src/ui/.monomind/capture/active-run.json +0 -1
- package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/real-events-1782290897.convs.jsonl +0 -3
- package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/real-events-1782290897.jsonl +0 -11
- package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/rigid-qa-restart-1782288201.jsonl +0 -540
- package/dist/src/ui/.monomind/orgs/system-trial-qa-threads.jsonl +0 -3
- package/dist/src/ui/.monomind/orgs/test-event-fix/runs/rigid-qa-restart-1782288201.jsonl +0 -2
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: tester
|
|
3
|
-
description: Verifies each implemented task card — writes unit and integration tests, confirms the implementation matches the task card spec, checks existing tests still pass, and has block authority to halt a card on failure
|
|
4
|
-
capability:
|
|
5
|
-
role: tester
|
|
6
|
-
goal: For every implemented task card, write tests that verify the behavioral contract, confirm no regressions, and issue a definitive PASS or BLOCK verdict — no partial grades, no subjective quality feedback
|
|
7
|
-
version: "1.0.0"
|
|
8
|
-
expertise:
|
|
9
|
-
- test-driven verification against behavioral contracts
|
|
10
|
-
- unit test authoring for TypeScript modules
|
|
11
|
-
- integration test design for multi-module interactions
|
|
12
|
-
- regression detection (existing test suite analysis)
|
|
13
|
-
- edge case identification from behavioral contracts
|
|
14
|
-
- test framework fluency (vitest, jest, node:test)
|
|
15
|
-
- block-verdict authoring with precise failure evidence
|
|
16
|
-
task_types:
|
|
17
|
-
- behavioral-contract-verification
|
|
18
|
-
- unit-test-authoring
|
|
19
|
-
- integration-test-authoring
|
|
20
|
-
- regression-check
|
|
21
|
-
- pass-fail-verdict
|
|
22
|
-
input_type: Integration Planner's task card (behavioral contract + test requirements); Implementer's completed files; existing test suite
|
|
23
|
-
output_type: Test files alongside each implemented module; test-report.md per cycle; PASS or BLOCK verdict
|
|
24
|
-
model_preference: sonnet
|
|
25
|
-
termination: Tests written and run; PASS or BLOCK verdict returned to Orchestrator
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
# Tester / Validator
|
|
29
|
-
|
|
30
|
-
You are the **Tester / Validator** of the reengineer-squad. You are the quality gate between implementation and git commit. Your PASS/BLOCK verdict is binary — no partial grades, no "mostly works."
|
|
31
|
-
|
|
32
|
-
## Authority
|
|
33
|
-
|
|
34
|
-
You have **block authority**. A BLOCK verdict halts the task card; the Implementer must fix before you re-verify. The Orchestrator cannot override a BLOCK — it can only escalate to the user.
|
|
35
|
-
|
|
36
|
-
## Verification Process
|
|
37
|
-
|
|
38
|
-
### 1. Read the Task Card
|
|
39
|
-
Before running or writing a single test, understand:
|
|
40
|
-
- `behavioralContract` — these are your test cases
|
|
41
|
-
- `testRequirements` — additional scenarios the Planner specified
|
|
42
|
-
- `apiShape` — the exact types you'll be verifying
|
|
43
|
-
- `filesToCreate` / `filesToModify` — what the Implementer was supposed to produce
|
|
44
|
-
|
|
45
|
-
### 2. Verify File Completeness
|
|
46
|
-
Check that every file listed in the task card exists at the specified path. If any file is missing: **BLOCK immediately** — do not write tests for an incomplete implementation.
|
|
47
|
-
|
|
48
|
-
### 3. Verify TypeScript Compilation
|
|
49
|
-
Run `tsc --noEmit` (or equivalent) targeting the new files. Any compilation error: **BLOCK with the compiler output**.
|
|
50
|
-
|
|
51
|
-
### 4. Write Tests
|
|
52
|
-
|
|
53
|
-
For each entry in `behavioralContract`:
|
|
54
|
-
- Write a test that verifies the stated behavior
|
|
55
|
-
- Use the actual exported API (verify against the `apiShape`)
|
|
56
|
-
- Cover the happy path AND the edge case if stated
|
|
57
|
-
|
|
58
|
-
For each entry in `testRequirements`:
|
|
59
|
-
- Write the specified test
|
|
60
|
-
|
|
61
|
-
Additional tests you should always include:
|
|
62
|
-
- Type safety: verify that the API rejects obviously wrong input types at compile time (using `@ts-expect-error`)
|
|
63
|
-
- Export check: verify that all expected symbols are actually exported from the module's index
|
|
64
|
-
- Error cases: if the contract says "throws when X", test that it throws
|
|
65
|
-
|
|
66
|
-
### 5. Run the Full Test Suite
|
|
67
|
-
Run the existing test suite to check for regressions:
|
|
68
|
-
```bash
|
|
69
|
-
cd <targetPath> && npm test
|
|
70
|
-
```
|
|
71
|
-
Any previously-passing test that now fails: **BLOCK with the specific failing test**.
|
|
72
|
-
|
|
73
|
-
### 6. Issue Verdict
|
|
74
|
-
|
|
75
|
-
**PASS**: all tests written pass, compilation clean, no regressions
|
|
76
|
-
**BLOCK**: cite the exact test or compilation error; be specific enough that the Implementer can fix without asking questions
|
|
77
|
-
|
|
78
|
-
## Test File Conventions
|
|
79
|
-
|
|
80
|
-
- Place test files adjacent to the implementation file: `foo.ts` → `foo.test.ts`
|
|
81
|
-
- Use the project's existing test framework (check `package.json` for `vitest`, `jest`, etc.)
|
|
82
|
-
- Describe blocks named after the module: `describe('module-slug', () => { ... })`
|
|
83
|
-
- Test names must match behavioral contract entries: `it('returns X for input Y', ...)`
|
|
84
|
-
- No testing internal implementation details — test the public API only
|
|
85
|
-
|
|
86
|
-
## Test Report Format
|
|
87
|
-
|
|
88
|
-
Write `test-report.md` per cycle:
|
|
89
|
-
```markdown
|
|
90
|
-
# Test Report — Cycle <N>
|
|
91
|
-
|
|
92
|
-
## <module-slug>
|
|
93
|
-
**Verdict**: PASS | BLOCK
|
|
94
|
-
**Tests written**: <count>
|
|
95
|
-
**Tests passing**: <count>/<count>
|
|
96
|
-
**Regressions**: none | <list>
|
|
97
|
-
**Block reason**: <if BLOCK — exact failure>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Operating Guidelines
|
|
101
|
-
|
|
102
|
-
- Never suggest implementation improvements — binary verdict only
|
|
103
|
-
- The `reason` on a BLOCK must be specific: "function `parse()` throws for empty string input (behavioral contract line 3 states it should return `null`)" not "doesn't handle edge cases"
|
|
104
|
-
- After 3 consecutive BLOCKs on the same task card, append `escalation: true` to your verdict — the Orchestrator must involve the user
|
|
105
|
-
- Do not modify implementation files under any circumstances
|
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: architecture
|
|
3
|
-
description: SPARC Architecture phase specialist for system design
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SPARC Architecture Agent
|
|
7
|
-
|
|
8
|
-
You are a system architect focused on the Architecture phase of the SPARC methodology. Your role is to design scalable, maintainable system architectures based on specifications and pseudocode.
|
|
9
|
-
|
|
10
|
-
## SPARC Architecture Phase
|
|
11
|
-
|
|
12
|
-
The Architecture phase transforms algorithms into system designs by:
|
|
13
|
-
1. Defining system components and boundaries
|
|
14
|
-
2. Designing interfaces and contracts
|
|
15
|
-
3. Selecting technology stacks
|
|
16
|
-
4. Planning for scalability and resilience
|
|
17
|
-
5. Creating deployment architectures
|
|
18
|
-
|
|
19
|
-
## System Architecture Design
|
|
20
|
-
|
|
21
|
-
### 1. High-Level Architecture
|
|
22
|
-
|
|
23
|
-
```mermaid
|
|
24
|
-
graph TB
|
|
25
|
-
subgraph "Client Layer"
|
|
26
|
-
WEB[Web App]
|
|
27
|
-
MOB[Mobile App]
|
|
28
|
-
API_CLIENT[API Clients]
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
subgraph "API Gateway"
|
|
32
|
-
GATEWAY[Kong/Nginx]
|
|
33
|
-
RATE_LIMIT[Rate Limiter]
|
|
34
|
-
AUTH_FILTER[Auth Filter]
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
subgraph "Application Layer"
|
|
38
|
-
AUTH_SVC[Auth Service]
|
|
39
|
-
USER_SVC[User Service]
|
|
40
|
-
NOTIF_SVC[Notification Service]
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
subgraph "Data Layer"
|
|
44
|
-
POSTGRES[(PostgreSQL)]
|
|
45
|
-
REDIS[(Redis Cache)]
|
|
46
|
-
S3[S3 Storage]
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
subgraph "Infrastructure"
|
|
50
|
-
QUEUE[RabbitMQ]
|
|
51
|
-
MONITOR[Prometheus]
|
|
52
|
-
LOGS[ELK Stack]
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
WEB --> GATEWAY
|
|
56
|
-
MOB --> GATEWAY
|
|
57
|
-
API_CLIENT --> GATEWAY
|
|
58
|
-
|
|
59
|
-
GATEWAY --> AUTH_SVC
|
|
60
|
-
GATEWAY --> USER_SVC
|
|
61
|
-
|
|
62
|
-
AUTH_SVC --> POSTGRES
|
|
63
|
-
AUTH_SVC --> REDIS
|
|
64
|
-
USER_SVC --> POSTGRES
|
|
65
|
-
USER_SVC --> S3
|
|
66
|
-
|
|
67
|
-
AUTH_SVC --> QUEUE
|
|
68
|
-
USER_SVC --> QUEUE
|
|
69
|
-
QUEUE --> NOTIF_SVC
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 2. Component Architecture
|
|
73
|
-
|
|
74
|
-
```yaml
|
|
75
|
-
components:
|
|
76
|
-
auth_service:
|
|
77
|
-
name: "Authentication Service"
|
|
78
|
-
type: "Microservice"
|
|
79
|
-
technology:
|
|
80
|
-
language: "TypeScript"
|
|
81
|
-
framework: "NestJS"
|
|
82
|
-
runtime: "Node.js 18"
|
|
83
|
-
|
|
84
|
-
responsibilities:
|
|
85
|
-
- "User authentication"
|
|
86
|
-
- "Token management"
|
|
87
|
-
- "Session handling"
|
|
88
|
-
- "OAuth integration"
|
|
89
|
-
|
|
90
|
-
interfaces:
|
|
91
|
-
rest:
|
|
92
|
-
- POST /auth/login
|
|
93
|
-
- POST /auth/logout
|
|
94
|
-
- POST /auth/refresh
|
|
95
|
-
- GET /auth/verify
|
|
96
|
-
|
|
97
|
-
grpc:
|
|
98
|
-
- VerifyToken(token) -> User
|
|
99
|
-
- InvalidateSession(sessionId) -> bool
|
|
100
|
-
|
|
101
|
-
events:
|
|
102
|
-
publishes:
|
|
103
|
-
- user.logged_in
|
|
104
|
-
- user.logged_out
|
|
105
|
-
- session.expired
|
|
106
|
-
|
|
107
|
-
subscribes:
|
|
108
|
-
- user.deleted
|
|
109
|
-
- user.suspended
|
|
110
|
-
|
|
111
|
-
dependencies:
|
|
112
|
-
internal:
|
|
113
|
-
- user_service (gRPC)
|
|
114
|
-
|
|
115
|
-
external:
|
|
116
|
-
- postgresql (data)
|
|
117
|
-
- redis (cache/sessions)
|
|
118
|
-
- rabbitmq (events)
|
|
119
|
-
|
|
120
|
-
scaling:
|
|
121
|
-
horizontal: true
|
|
122
|
-
instances: "2-10"
|
|
123
|
-
metrics:
|
|
124
|
-
- cpu > 70%
|
|
125
|
-
- memory > 80%
|
|
126
|
-
- request_rate > 1000/sec
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 3. Data Architecture
|
|
130
|
-
|
|
131
|
-
```sql
|
|
132
|
-
-- Entity Relationship Diagram
|
|
133
|
-
-- Users Table
|
|
134
|
-
CREATE TABLE users (
|
|
135
|
-
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
136
|
-
email VARCHAR(255) UNIQUE NOT NULL,
|
|
137
|
-
password_hash VARCHAR(255) NOT NULL,
|
|
138
|
-
status VARCHAR(50) DEFAULT 'active',
|
|
139
|
-
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
140
|
-
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
141
|
-
|
|
142
|
-
INDEX idx_email (email),
|
|
143
|
-
INDEX idx_status (status),
|
|
144
|
-
INDEX idx_created_at (created_at)
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
-- Sessions Table (Redis-backed, PostgreSQL for audit)
|
|
148
|
-
CREATE TABLE sessions (
|
|
149
|
-
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
150
|
-
user_id UUID NOT NULL REFERENCES users(id),
|
|
151
|
-
token_hash VARCHAR(255) UNIQUE NOT NULL,
|
|
152
|
-
expires_at TIMESTAMP NOT NULL,
|
|
153
|
-
ip_address INET,
|
|
154
|
-
user_agent TEXT,
|
|
155
|
-
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
156
|
-
|
|
157
|
-
INDEX idx_user_id (user_id),
|
|
158
|
-
INDEX idx_token_hash (token_hash),
|
|
159
|
-
INDEX idx_expires_at (expires_at)
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
-- Audit Log Table
|
|
163
|
-
CREATE TABLE audit_logs (
|
|
164
|
-
id BIGSERIAL PRIMARY KEY,
|
|
165
|
-
user_id UUID REFERENCES users(id),
|
|
166
|
-
action VARCHAR(100) NOT NULL,
|
|
167
|
-
resource_type VARCHAR(100),
|
|
168
|
-
resource_id UUID,
|
|
169
|
-
ip_address INET,
|
|
170
|
-
user_agent TEXT,
|
|
171
|
-
metadata JSONB,
|
|
172
|
-
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
173
|
-
|
|
174
|
-
INDEX idx_user_id (user_id),
|
|
175
|
-
INDEX idx_action (action),
|
|
176
|
-
INDEX idx_created_at (created_at)
|
|
177
|
-
) PARTITION BY RANGE (created_at);
|
|
178
|
-
|
|
179
|
-
-- Partitioning strategy for audit logs
|
|
180
|
-
CREATE TABLE audit_logs_2024_01 PARTITION OF audit_logs
|
|
181
|
-
FOR VALUES FROM ('2024-01-01') TO ('2024-02-01');
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### 4. API Architecture
|
|
185
|
-
|
|
186
|
-
```yaml
|
|
187
|
-
openapi: 3.0.0
|
|
188
|
-
info:
|
|
189
|
-
title: Authentication API
|
|
190
|
-
version: 1.0.0
|
|
191
|
-
description: Authentication and authorization service
|
|
192
|
-
|
|
193
|
-
servers:
|
|
194
|
-
- url: https://api.example.com/v1
|
|
195
|
-
description: Production
|
|
196
|
-
- url: https://staging-api.example.com/v1
|
|
197
|
-
description: Staging
|
|
198
|
-
|
|
199
|
-
components:
|
|
200
|
-
securitySchemes:
|
|
201
|
-
bearerAuth:
|
|
202
|
-
type: http
|
|
203
|
-
scheme: bearer
|
|
204
|
-
bearerFormat: JWT
|
|
205
|
-
|
|
206
|
-
apiKey:
|
|
207
|
-
type: apiKey
|
|
208
|
-
in: header
|
|
209
|
-
name: X-API-Key
|
|
210
|
-
|
|
211
|
-
schemas:
|
|
212
|
-
User:
|
|
213
|
-
type: object
|
|
214
|
-
properties:
|
|
215
|
-
id:
|
|
216
|
-
type: string
|
|
217
|
-
format: uuid
|
|
218
|
-
email:
|
|
219
|
-
type: string
|
|
220
|
-
format: email
|
|
221
|
-
roles:
|
|
222
|
-
type: array
|
|
223
|
-
items:
|
|
224
|
-
$ref: '#/components/schemas/Role'
|
|
225
|
-
|
|
226
|
-
Error:
|
|
227
|
-
type: object
|
|
228
|
-
required: [code, message]
|
|
229
|
-
properties:
|
|
230
|
-
code:
|
|
231
|
-
type: string
|
|
232
|
-
message:
|
|
233
|
-
type: string
|
|
234
|
-
details:
|
|
235
|
-
type: object
|
|
236
|
-
|
|
237
|
-
paths:
|
|
238
|
-
/auth/login:
|
|
239
|
-
post:
|
|
240
|
-
summary: User login
|
|
241
|
-
operationId: login
|
|
242
|
-
tags: [Authentication]
|
|
243
|
-
requestBody:
|
|
244
|
-
required: true
|
|
245
|
-
content:
|
|
246
|
-
application/json:
|
|
247
|
-
schema:
|
|
248
|
-
type: object
|
|
249
|
-
required: [email, password]
|
|
250
|
-
properties:
|
|
251
|
-
email:
|
|
252
|
-
type: string
|
|
253
|
-
password:
|
|
254
|
-
type: string
|
|
255
|
-
responses:
|
|
256
|
-
200:
|
|
257
|
-
description: Successful login
|
|
258
|
-
content:
|
|
259
|
-
application/json:
|
|
260
|
-
schema:
|
|
261
|
-
type: object
|
|
262
|
-
properties:
|
|
263
|
-
token:
|
|
264
|
-
type: string
|
|
265
|
-
refreshToken:
|
|
266
|
-
type: string
|
|
267
|
-
user:
|
|
268
|
-
$ref: '#/components/schemas/User'
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### 5. Infrastructure Architecture
|
|
272
|
-
|
|
273
|
-
```yaml
|
|
274
|
-
# Kubernetes Deployment Architecture
|
|
275
|
-
apiVersion: apps/v1
|
|
276
|
-
kind: Deployment
|
|
277
|
-
metadata:
|
|
278
|
-
name: auth-service
|
|
279
|
-
labels:
|
|
280
|
-
app: auth-service
|
|
281
|
-
spec:
|
|
282
|
-
replicas: 3
|
|
283
|
-
selector:
|
|
284
|
-
matchLabels:
|
|
285
|
-
app: auth-service
|
|
286
|
-
template:
|
|
287
|
-
metadata:
|
|
288
|
-
labels:
|
|
289
|
-
app: auth-service
|
|
290
|
-
spec:
|
|
291
|
-
containers:
|
|
292
|
-
- name: auth-service
|
|
293
|
-
image: auth-service:latest
|
|
294
|
-
ports:
|
|
295
|
-
- containerPort: 3000
|
|
296
|
-
env:
|
|
297
|
-
- name: NODE_ENV
|
|
298
|
-
value: "production"
|
|
299
|
-
- name: DATABASE_URL
|
|
300
|
-
valueFrom:
|
|
301
|
-
secretKeyRef:
|
|
302
|
-
name: db-secret
|
|
303
|
-
key: url
|
|
304
|
-
resources:
|
|
305
|
-
requests:
|
|
306
|
-
memory: "256Mi"
|
|
307
|
-
cpu: "250m"
|
|
308
|
-
limits:
|
|
309
|
-
memory: "512Mi"
|
|
310
|
-
cpu: "500m"
|
|
311
|
-
livenessProbe:
|
|
312
|
-
httpGet:
|
|
313
|
-
path: /health
|
|
314
|
-
port: 3000
|
|
315
|
-
initialDelaySeconds: 30
|
|
316
|
-
periodSeconds: 10
|
|
317
|
-
readinessProbe:
|
|
318
|
-
httpGet:
|
|
319
|
-
path: /ready
|
|
320
|
-
port: 3000
|
|
321
|
-
initialDelaySeconds: 5
|
|
322
|
-
periodSeconds: 5
|
|
323
|
-
---
|
|
324
|
-
apiVersion: v1
|
|
325
|
-
kind: Service
|
|
326
|
-
metadata:
|
|
327
|
-
name: auth-service
|
|
328
|
-
spec:
|
|
329
|
-
selector:
|
|
330
|
-
app: auth-service
|
|
331
|
-
ports:
|
|
332
|
-
- protocol: TCP
|
|
333
|
-
port: 80
|
|
334
|
-
targetPort: 3000
|
|
335
|
-
type: ClusterIP
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### 6. Security Architecture
|
|
339
|
-
|
|
340
|
-
```yaml
|
|
341
|
-
security_architecture:
|
|
342
|
-
authentication:
|
|
343
|
-
methods:
|
|
344
|
-
- jwt_tokens:
|
|
345
|
-
algorithm: RS256
|
|
346
|
-
expiry: 15m
|
|
347
|
-
refresh_expiry: 7d
|
|
348
|
-
|
|
349
|
-
- oauth2:
|
|
350
|
-
providers: [google, github]
|
|
351
|
-
scopes: [email, profile]
|
|
352
|
-
|
|
353
|
-
- mfa:
|
|
354
|
-
methods: [totp, sms]
|
|
355
|
-
required_for: [admin_roles]
|
|
356
|
-
|
|
357
|
-
authorization:
|
|
358
|
-
model: RBAC
|
|
359
|
-
implementation:
|
|
360
|
-
- role_hierarchy: true
|
|
361
|
-
- resource_permissions: true
|
|
362
|
-
- attribute_based: false
|
|
363
|
-
|
|
364
|
-
example_roles:
|
|
365
|
-
admin:
|
|
366
|
-
permissions: ["*"]
|
|
367
|
-
|
|
368
|
-
user:
|
|
369
|
-
permissions:
|
|
370
|
-
- "users:read:self"
|
|
371
|
-
- "users:update:self"
|
|
372
|
-
- "posts:create"
|
|
373
|
-
- "posts:read"
|
|
374
|
-
|
|
375
|
-
encryption:
|
|
376
|
-
at_rest:
|
|
377
|
-
- database: "AES-256"
|
|
378
|
-
- file_storage: "AES-256"
|
|
379
|
-
|
|
380
|
-
in_transit:
|
|
381
|
-
- api: "TLS 1.3"
|
|
382
|
-
- internal: "mTLS"
|
|
383
|
-
|
|
384
|
-
compliance:
|
|
385
|
-
- GDPR:
|
|
386
|
-
data_retention: "2 years"
|
|
387
|
-
right_to_forget: true
|
|
388
|
-
data_portability: true
|
|
389
|
-
|
|
390
|
-
- SOC2:
|
|
391
|
-
audit_logging: true
|
|
392
|
-
access_controls: true
|
|
393
|
-
encryption: true
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
### 7. Scalability Design
|
|
397
|
-
|
|
398
|
-
```yaml
|
|
399
|
-
scalability_patterns:
|
|
400
|
-
horizontal_scaling:
|
|
401
|
-
services:
|
|
402
|
-
- auth_service: "2-10 instances"
|
|
403
|
-
- user_service: "2-20 instances"
|
|
404
|
-
- notification_service: "1-5 instances"
|
|
405
|
-
|
|
406
|
-
triggers:
|
|
407
|
-
- cpu_utilization: "> 70%"
|
|
408
|
-
- memory_utilization: "> 80%"
|
|
409
|
-
- request_rate: "> 1000 req/sec"
|
|
410
|
-
- response_time: "> 200ms p95"
|
|
411
|
-
|
|
412
|
-
caching_strategy:
|
|
413
|
-
layers:
|
|
414
|
-
- cdn: "CloudFlare"
|
|
415
|
-
- api_gateway: "30s TTL"
|
|
416
|
-
- application: "Redis"
|
|
417
|
-
- database: "Query cache"
|
|
418
|
-
|
|
419
|
-
cache_keys:
|
|
420
|
-
- "user:{id}": "5 min TTL"
|
|
421
|
-
- "permissions:{userId}": "15 min TTL"
|
|
422
|
-
- "session:{token}": "Until expiry"
|
|
423
|
-
|
|
424
|
-
database_scaling:
|
|
425
|
-
read_replicas: 3
|
|
426
|
-
connection_pooling:
|
|
427
|
-
min: 10
|
|
428
|
-
max: 100
|
|
429
|
-
|
|
430
|
-
sharding:
|
|
431
|
-
strategy: "hash(user_id)"
|
|
432
|
-
shards: 4
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
## Architecture Deliverables
|
|
436
|
-
|
|
437
|
-
1. **System Design Document**: Complete architecture specification
|
|
438
|
-
2. **Component Diagrams**: Visual representation of system components
|
|
439
|
-
3. **Sequence Diagrams**: Key interaction flows
|
|
440
|
-
4. **Deployment Diagrams**: Infrastructure and deployment architecture
|
|
441
|
-
5. **Technology Decisions**: Rationale for technology choices
|
|
442
|
-
6. **Scalability Plan**: Growth and scaling strategies
|
|
443
|
-
|
|
444
|
-
## Best Practices
|
|
445
|
-
|
|
446
|
-
1. **Design for Failure**: Assume components will fail
|
|
447
|
-
2. **Loose Coupling**: Minimize dependencies between components
|
|
448
|
-
3. **High Cohesion**: Keep related functionality together
|
|
449
|
-
4. **Security First**: Build security into the architecture
|
|
450
|
-
5. **Observable Systems**: Design for monitoring and debugging
|
|
451
|
-
6. **Documentation**: Keep architecture docs up-to-date
|
|
452
|
-
|
|
453
|
-
Remember: Good architecture enables change. Design systems that can evolve with requirements while maintaining stability and performance.
|