gaia-framework 1.57.0 → 1.57.2
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/README.md +1 -1
- package/bin/gaia-framework.js +27 -19
- package/gaia-install.sh +1 -1
- package/package.json +15 -11
- package/.claude/commands/gaia-a11y-testing.md +0 -17
- package/.claude/commands/gaia-action-items.md +0 -23
- package/.claude/commands/gaia-add-feature.md +0 -17
- package/.claude/commands/gaia-add-stories.md +0 -17
- package/.claude/commands/gaia-advanced-elicitation.md +0 -17
- package/.claude/commands/gaia-adversarial.md +0 -15
- package/.claude/commands/gaia-agent-analyst.md +0 -14
- package/.claude/commands/gaia-agent-architect.md +0 -14
- package/.claude/commands/gaia-agent-brainstorming.md +0 -14
- package/.claude/commands/gaia-agent-data-engineer.md +0 -14
- package/.claude/commands/gaia-agent-design-thinking.md +0 -14
- package/.claude/commands/gaia-agent-dev-angular.md +0 -14
- package/.claude/commands/gaia-agent-dev-flutter.md +0 -14
- package/.claude/commands/gaia-agent-dev-go.md +0 -14
- package/.claude/commands/gaia-agent-dev-java.md +0 -14
- package/.claude/commands/gaia-agent-dev-mobile.md +0 -14
- package/.claude/commands/gaia-agent-dev-python.md +0 -14
- package/.claude/commands/gaia-agent-dev-typescript.md +0 -14
- package/.claude/commands/gaia-agent-devops.md +0 -14
- package/.claude/commands/gaia-agent-innovation.md +0 -14
- package/.claude/commands/gaia-agent-performance.md +0 -14
- package/.claude/commands/gaia-agent-pm.md +0 -14
- package/.claude/commands/gaia-agent-presentation.md +0 -14
- package/.claude/commands/gaia-agent-problem-solver.md +0 -14
- package/.claude/commands/gaia-agent-qa.md +0 -14
- package/.claude/commands/gaia-agent-security.md +0 -14
- package/.claude/commands/gaia-agent-sm.md +0 -14
- package/.claude/commands/gaia-agent-storyteller.md +0 -14
- package/.claude/commands/gaia-agent-tech-writer.md +0 -14
- package/.claude/commands/gaia-agent-test-architect.md +0 -14
- package/.claude/commands/gaia-agent-ux-designer.md +0 -14
- package/.claude/commands/gaia-agent-validator.md +0 -14
- package/.claude/commands/gaia-atdd.md +0 -17
- package/.claude/commands/gaia-brainstorm.md +0 -17
- package/.claude/commands/gaia-brainstorming.md +0 -17
- package/.claude/commands/gaia-brownfield.md +0 -17
- package/.claude/commands/gaia-build-configs.md +0 -22
- package/.claude/commands/gaia-change-request.md +0 -11
- package/.claude/commands/gaia-changelog.md +0 -16
- package/.claude/commands/gaia-check-dod.md +0 -17
- package/.claude/commands/gaia-check-review-gate.md +0 -17
- package/.claude/commands/gaia-ci-setup.md +0 -17
- package/.claude/commands/gaia-code-review.md +0 -17
- package/.claude/commands/gaia-correct-course.md +0 -17
- package/.claude/commands/gaia-create-arch.md +0 -17
- package/.claude/commands/gaia-create-epics.md +0 -17
- package/.claude/commands/gaia-create-prd.md +0 -17
- package/.claude/commands/gaia-create-story.md +0 -23
- package/.claude/commands/gaia-create-ux.md +0 -17
- package/.claude/commands/gaia-creative-sprint.md +0 -17
- package/.claude/commands/gaia-deploy-checklist.md +0 -17
- package/.claude/commands/gaia-design-thinking.md +0 -17
- package/.claude/commands/gaia-dev-story.md +0 -23
- package/.claude/commands/gaia-document-project.md +0 -17
- package/.claude/commands/gaia-domain-research.md +0 -17
- package/.claude/commands/gaia-edge-cases.md +0 -15
- package/.claude/commands/gaia-edit-arch.md +0 -17
- package/.claude/commands/gaia-edit-prd.md +0 -17
- package/.claude/commands/gaia-edit-test-plan.md +0 -17
- package/.claude/commands/gaia-editorial-prose.md +0 -15
- package/.claude/commands/gaia-editorial-structure.md +0 -15
- package/.claude/commands/gaia-epic-status.md +0 -17
- package/.claude/commands/gaia-fix-story.md +0 -17
- package/.claude/commands/gaia-help.md +0 -15
- package/.claude/commands/gaia-index-docs.md +0 -15
- package/.claude/commands/gaia-infra-design.md +0 -17
- package/.claude/commands/gaia-innovation.md +0 -17
- package/.claude/commands/gaia-market-research.md +0 -17
- package/.claude/commands/gaia-memory-hygiene.md +0 -17
- package/.claude/commands/gaia-merge-docs.md +0 -16
- package/.claude/commands/gaia-mobile-testing.md +0 -17
- package/.claude/commands/gaia-nfr.md +0 -17
- package/.claude/commands/gaia-party.md +0 -17
- package/.claude/commands/gaia-perf-testing.md +0 -17
- package/.claude/commands/gaia-performance-review.md +0 -17
- package/.claude/commands/gaia-pitch-deck.md +0 -17
- package/.claude/commands/gaia-post-deploy.md +0 -17
- package/.claude/commands/gaia-problem-solving.md +0 -17
- package/.claude/commands/gaia-product-brief.md +0 -17
- package/.claude/commands/gaia-project-context.md +0 -17
- package/.claude/commands/gaia-qa-tests.md +0 -17
- package/.claude/commands/gaia-quick-dev.md +0 -17
- package/.claude/commands/gaia-quick-spec.md +0 -17
- package/.claude/commands/gaia-readiness-check.md +0 -17
- package/.claude/commands/gaia-refresh-ground-truth.md +0 -17
- package/.claude/commands/gaia-release-plan.md +0 -17
- package/.claude/commands/gaia-resume.md +0 -25
- package/.claude/commands/gaia-retro.md +0 -20
- package/.claude/commands/gaia-review-a11y.md +0 -16
- package/.claude/commands/gaia-review-api.md +0 -16
- package/.claude/commands/gaia-review-deps.md +0 -16
- package/.claude/commands/gaia-review-perf.md +0 -16
- package/.claude/commands/gaia-review-security.md +0 -16
- package/.claude/commands/gaia-rollback-plan.md +0 -17
- package/.claude/commands/gaia-run-all-reviews.md +0 -17
- package/.claude/commands/gaia-security-review.md +0 -17
- package/.claude/commands/gaia-shard-doc.md +0 -15
- package/.claude/commands/gaia-slide-deck.md +0 -17
- package/.claude/commands/gaia-sprint-plan.md +0 -17
- package/.claude/commands/gaia-sprint-status.md +0 -17
- package/.claude/commands/gaia-storytelling.md +0 -17
- package/.claude/commands/gaia-summarize.md +0 -16
- package/.claude/commands/gaia-teach-testing.md +0 -17
- package/.claude/commands/gaia-tech-debt-review.md +0 -20
- package/.claude/commands/gaia-tech-research.md +0 -17
- package/.claude/commands/gaia-test-automate.md +0 -17
- package/.claude/commands/gaia-test-design.md +0 -17
- package/.claude/commands/gaia-test-framework.md +0 -17
- package/.claude/commands/gaia-test-review.md +0 -17
- package/.claude/commands/gaia-threat-model.md +0 -17
- package/.claude/commands/gaia-trace.md +0 -17
- package/.claude/commands/gaia-triage-findings.md +0 -20
- package/.claude/commands/gaia-val-validate-plan.md +0 -17
- package/.claude/commands/gaia-val-validate.md +0 -17
- package/.claude/commands/gaia-validate-framework.md +0 -17
- package/.claude/commands/gaia-validate-prd.md +0 -17
- package/.claude/commands/gaia-validate-story.md +0 -22
- package/.claude/commands/gaia.md +0 -32
- package/CLAUDE.md +0 -165
- package/_gaia/_config/agent-manifest.csv +0 -29
- package/_gaia/_config/agents/CUSTOMIZATION-README.md +0 -117
- package/_gaia/_config/files-manifest.csv +0 -30
- package/_gaia/_config/gaia-help.csv +0 -82
- package/_gaia/_config/global.yaml +0 -45
- package/_gaia/_config/lifecycle-sequence.yaml +0 -593
- package/_gaia/_config/manifest.yaml +0 -24
- package/_gaia/_config/skill-manifest.csv +0 -12
- package/_gaia/_config/task-manifest.csv +0 -17
- package/_gaia/_config/workflow-manifest.csv +0 -73
- package/_gaia/_memory/tier2-results/.gitkeep +0 -0
- package/_gaia/_memory/tier2-results/checkpoint-resume-2026-03-24.yaml +0 -6
- package/_gaia/_memory/tier2-results/engine-scenarios-2026-03-22.yaml +0 -14
- package/_gaia/core/.resolved/.gitkeep +0 -0
- package/_gaia/core/agents/orchestrator.md +0 -303
- package/_gaia/core/config.yaml +0 -8
- package/_gaia/core/engine/error-recovery.xml +0 -28
- package/_gaia/core/engine/protocols/discover-inputs.xml +0 -31
- package/_gaia/core/engine/protocols/handoff.xml +0 -21
- package/_gaia/core/engine/protocols/preflight-check.xml +0 -31
- package/_gaia/core/engine/task-runner.xml +0 -63
- package/_gaia/core/engine/workflow.xml +0 -225
- package/_gaia/core/module-help.csv +0 -21
- package/_gaia/core/protocols/agent-specification-protocol.md +0 -103
- package/_gaia/core/protocols/review-gate-check.xml +0 -29
- package/_gaia/core/protocols/sprint-status-write-safety.xml +0 -35
- package/_gaia/core/protocols/status-sync.xml +0 -49
- package/_gaia/core/tasks/editorial-review-prose.xml +0 -42
- package/_gaia/core/tasks/editorial-review-structure.xml +0 -43
- package/_gaia/core/tasks/generate-changelog.xml +0 -35
- package/_gaia/core/tasks/help.md +0 -45
- package/_gaia/core/tasks/index-docs.xml +0 -46
- package/_gaia/core/tasks/merge-docs.xml +0 -34
- package/_gaia/core/tasks/review-accessibility.xml +0 -47
- package/_gaia/core/tasks/review-adversarial.xml +0 -55
- package/_gaia/core/tasks/review-api-design.xml +0 -38
- package/_gaia/core/tasks/review-dependency-audit.xml +0 -38
- package/_gaia/core/tasks/review-edge-case-hunter.xml +0 -52
- package/_gaia/core/tasks/review-performance.xml +0 -49
- package/_gaia/core/tasks/review-security.xml +0 -37
- package/_gaia/core/tasks/shard-doc.xml +0 -49
- package/_gaia/core/tasks/summarize-doc.xml +0 -33
- package/_gaia/core/tasks/validate-framework.xml +0 -66
- package/_gaia/core/workflows/brainstorming/steps/step-01-session-setup.md +0 -7
- package/_gaia/core/workflows/brainstorming/steps/step-02-technique-selection.md +0 -20
- package/_gaia/core/workflows/brainstorming/steps/step-03-technique-execution.md +0 -11
- package/_gaia/core/workflows/brainstorming/steps/step-04-idea-organization.md +0 -14
- package/_gaia/core/workflows/brainstorming/template.md +0 -38
- package/_gaia/core/workflows/brainstorming/workflow.yaml +0 -26
- package/_gaia/core/workflows/party-mode/steps/step-01-agent-loading.md +0 -11
- package/_gaia/core/workflows/party-mode/steps/step-02-discussion-orchestration.md +0 -16
- package/_gaia/core/workflows/party-mode/steps/step-03-graceful-exit.md +0 -10
- package/_gaia/core/workflows/party-mode/workflow.yaml +0 -23
- package/_gaia/creative/.resolved/.gitkeep +0 -0
- package/_gaia/creative/agents/brainstorming-coach.md +0 -93
- package/_gaia/creative/agents/design-thinking-coach.md +0 -91
- package/_gaia/creative/agents/innovation-strategist.md +0 -89
- package/_gaia/creative/agents/presentation-designer.md +0 -99
- package/_gaia/creative/agents/problem-solver.md +0 -90
- package/_gaia/creative/agents/storyteller.md +0 -90
- package/_gaia/creative/config.yaml +0 -8
- package/_gaia/creative/data/design-methods.csv +0 -28
- package/_gaia/creative/data/innovation-frameworks.csv +0 -15
- package/_gaia/creative/data/solving-methods.csv +0 -14
- package/_gaia/creative/data/story-types.csv +0 -12
- package/_gaia/creative/module-help.csv +0 -8
- package/_gaia/creative/teams/creative-squad.yaml +0 -10
- package/_gaia/creative/workflows/creative-sprint/checklist.md +0 -10
- package/_gaia/creative/workflows/creative-sprint/instructions.xml +0 -40
- package/_gaia/creative/workflows/creative-sprint/workflow.yaml +0 -11
- package/_gaia/creative/workflows/design-thinking/checklist.md +0 -25
- package/_gaia/creative/workflows/design-thinking/instructions.xml +0 -38
- package/_gaia/creative/workflows/design-thinking/workflow.yaml +0 -13
- package/_gaia/creative/workflows/innovation-strategy/checklist.md +0 -26
- package/_gaia/creative/workflows/innovation-strategy/instructions.xml +0 -34
- package/_gaia/creative/workflows/innovation-strategy/workflow.yaml +0 -13
- package/_gaia/creative/workflows/pitch-deck/checklist.md +0 -22
- package/_gaia/creative/workflows/pitch-deck/instructions.xml +0 -49
- package/_gaia/creative/workflows/pitch-deck/workflow.yaml +0 -15
- package/_gaia/creative/workflows/problem-solving/checklist.md +0 -26
- package/_gaia/creative/workflows/problem-solving/instructions.xml +0 -39
- package/_gaia/creative/workflows/problem-solving/workflow.yaml +0 -13
- package/_gaia/creative/workflows/slide-deck/checklist.md +0 -21
- package/_gaia/creative/workflows/slide-deck/instructions.xml +0 -39
- package/_gaia/creative/workflows/slide-deck/workflow.yaml +0 -15
- package/_gaia/creative/workflows/storytelling/checklist.md +0 -26
- package/_gaia/creative/workflows/storytelling/instructions.xml +0 -38
- package/_gaia/creative/workflows/storytelling/workflow.yaml +0 -13
- package/_gaia/dev/agents/_base-dev.md +0 -180
- package/_gaia/dev/agents/angular-dev.md +0 -70
- package/_gaia/dev/agents/flutter-dev.md +0 -70
- package/_gaia/dev/agents/go-dev.md +0 -72
- package/_gaia/dev/agents/java-dev.md +0 -70
- package/_gaia/dev/agents/mobile-dev.md +0 -70
- package/_gaia/dev/agents/python-dev.md +0 -70
- package/_gaia/dev/agents/typescript-dev.md +0 -70
- package/_gaia/dev/config.yaml +0 -11
- package/_gaia/dev/knowledge/_index.csv +0 -25
- package/_gaia/dev/knowledge/angular/angular-conventions.md +0 -119
- package/_gaia/dev/knowledge/angular/angular-patterns.md +0 -126
- package/_gaia/dev/knowledge/angular/ngrx-state.md +0 -124
- package/_gaia/dev/knowledge/angular/rxjs-patterns.md +0 -119
- package/_gaia/dev/knowledge/flutter/dart-conventions.md +0 -143
- package/_gaia/dev/knowledge/flutter/platform-channels.md +0 -144
- package/_gaia/dev/knowledge/flutter/state-management.md +0 -144
- package/_gaia/dev/knowledge/flutter/widget-patterns.md +0 -134
- package/_gaia/dev/knowledge/go/gin-fiber-patterns.md +0 -40
- package/_gaia/dev/knowledge/go/go-conventions.md +0 -54
- package/_gaia/dev/knowledge/go/go-stdlib-patterns.md +0 -39
- package/_gaia/dev/knowledge/go/go-testing-patterns.md +0 -39
- package/_gaia/dev/knowledge/java/jpa-patterns.md +0 -136
- package/_gaia/dev/knowledge/java/maven-gradle.md +0 -189
- package/_gaia/dev/knowledge/java/microservices.md +0 -159
- package/_gaia/dev/knowledge/java/spring-boot-patterns.md +0 -160
- package/_gaia/dev/knowledge/mobile/kotlin-patterns.md +0 -193
- package/_gaia/dev/knowledge/mobile/mobile-testing.md +0 -186
- package/_gaia/dev/knowledge/mobile/react-native-patterns.md +0 -162
- package/_gaia/dev/knowledge/mobile/swift-patterns.md +0 -190
- package/_gaia/dev/knowledge/python/data-pipelines.md +0 -169
- package/_gaia/dev/knowledge/python/django-patterns.md +0 -145
- package/_gaia/dev/knowledge/python/fastapi-patterns.md +0 -164
- package/_gaia/dev/knowledge/python/python-conventions.md +0 -170
- package/_gaia/dev/knowledge/typescript/express-patterns.md +0 -188
- package/_gaia/dev/knowledge/typescript/nextjs-patterns.md +0 -166
- package/_gaia/dev/knowledge/typescript/react-patterns.md +0 -176
- package/_gaia/dev/knowledge/typescript/ts-conventions.md +0 -133
- package/_gaia/dev/module-help.csv +0 -10
- package/_gaia/dev/skills/_skill-index.yaml +0 -55
- package/_gaia/dev/skills/api-design.md +0 -229
- package/_gaia/dev/skills/code-review-standards.md +0 -226
- package/_gaia/dev/skills/database-design.md +0 -172
- package/_gaia/dev/skills/docker-workflow.md +0 -222
- package/_gaia/dev/skills/documentation-standards.md +0 -256
- package/_gaia/dev/skills/git-workflow.md +0 -157
- package/_gaia/dev/skills/security-basics.md +0 -230
- package/_gaia/dev/skills/testing-patterns.md +0 -232
- package/_gaia/lifecycle/.resolved/.gitkeep +0 -0
- package/_gaia/lifecycle/agents/analyst.md +0 -104
- package/_gaia/lifecycle/agents/architect.md +0 -109
- package/_gaia/lifecycle/agents/data-engineer.md +0 -99
- package/_gaia/lifecycle/agents/devops.md +0 -110
- package/_gaia/lifecycle/agents/performance.md +0 -92
- package/_gaia/lifecycle/agents/pm.md +0 -112
- package/_gaia/lifecycle/agents/qa.md +0 -89
- package/_gaia/lifecycle/agents/security.md +0 -108
- package/_gaia/lifecycle/agents/sm.md +0 -119
- package/_gaia/lifecycle/agents/tech-writer.md +0 -94
- package/_gaia/lifecycle/agents/ux-designer.md +0 -94
- package/_gaia/lifecycle/agents/validator.md +0 -189
- package/_gaia/lifecycle/config.yaml +0 -14
- package/_gaia/lifecycle/module-help.csv +0 -39
- package/_gaia/lifecycle/skills/ground-truth-management.md +0 -252
- package/_gaia/lifecycle/skills/memory-management.md +0 -322
- package/_gaia/lifecycle/skills/validation-patterns.md +0 -230
- package/_gaia/lifecycle/teams/team-data-intensive.yaml +0 -12
- package/_gaia/lifecycle/teams/team-enterprise.yaml +0 -16
- package/_gaia/lifecycle/teams/team-full.yaml +0 -13
- package/_gaia/lifecycle/teams/team-implementation.yaml +0 -8
- package/_gaia/lifecycle/teams/team-planning.yaml +0 -9
- package/_gaia/lifecycle/teams/team-quick-ship.yaml +0 -6
- package/_gaia/lifecycle/teams/team-security-focused.yaml +0 -13
- package/_gaia/lifecycle/templates/api-documentation-template.md +0 -112
- package/_gaia/lifecycle/templates/architecture-template.md +0 -65
- package/_gaia/lifecycle/templates/brownfield-architecture-template.md +0 -198
- package/_gaia/lifecycle/templates/brownfield-assessment-template.md +0 -78
- package/_gaia/lifecycle/templates/brownfield-onboarding-template.md +0 -160
- package/_gaia/lifecycle/templates/dependency-map-template.md +0 -73
- package/_gaia/lifecycle/templates/deployment-template.md +0 -52
- package/_gaia/lifecycle/templates/epic-status-template.md +0 -64
- package/_gaia/lifecycle/templates/event-catalog-template.md +0 -78
- package/_gaia/lifecycle/templates/nfr-assessment-template.md +0 -96
- package/_gaia/lifecycle/templates/prd-template.md +0 -83
- package/_gaia/lifecycle/templates/product-brief-template.md +0 -48
- package/_gaia/lifecycle/templates/review-template.md +0 -47
- package/_gaia/lifecycle/templates/sprint-plan-template.md +0 -45
- package/_gaia/lifecycle/templates/story-template.md +0 -118
- package/_gaia/lifecycle/templates/tech-debt-dashboard-template.md +0 -71
- package/_gaia/lifecycle/templates/test-plan-template.md +0 -56
- package/_gaia/lifecycle/templates/ux-design-assessment-template.md +0 -122
- package/_gaia/lifecycle/workflows/1-analysis/advanced-elicitation/instructions.xml +0 -44
- package/_gaia/lifecycle/workflows/1-analysis/advanced-elicitation/methods.csv +0 -9
- package/_gaia/lifecycle/workflows/1-analysis/advanced-elicitation/workflow.yaml +0 -33
- package/_gaia/lifecycle/workflows/1-analysis/brainstorm-project/checklist.md +0 -24
- package/_gaia/lifecycle/workflows/1-analysis/brainstorm-project/instructions.xml +0 -39
- package/_gaia/lifecycle/workflows/1-analysis/brainstorm-project/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/1-analysis/create-product-brief/checklist.md +0 -27
- package/_gaia/lifecycle/workflows/1-analysis/create-product-brief/instructions.xml +0 -57
- package/_gaia/lifecycle/workflows/1-analysis/create-product-brief/workflow.yaml +0 -38
- package/_gaia/lifecycle/workflows/1-analysis/domain-research/checklist.md +0 -22
- package/_gaia/lifecycle/workflows/1-analysis/domain-research/instructions.xml +0 -34
- package/_gaia/lifecycle/workflows/1-analysis/domain-research/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/1-analysis/market-research/checklist.md +0 -28
- package/_gaia/lifecycle/workflows/1-analysis/market-research/instructions.xml +0 -42
- package/_gaia/lifecycle/workflows/1-analysis/market-research/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/1-analysis/technical-research/checklist.md +0 -22
- package/_gaia/lifecycle/workflows/1-analysis/technical-research/instructions.xml +0 -34
- package/_gaia/lifecycle/workflows/1-analysis/technical-research/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/2-planning/create-prd/checklist.md +0 -36
- package/_gaia/lifecycle/workflows/2-planning/create-prd/instructions.xml +0 -80
- package/_gaia/lifecycle/workflows/2-planning/create-prd/workflow.yaml +0 -23
- package/_gaia/lifecycle/workflows/2-planning/create-ux-design/checklist.md +0 -26
- package/_gaia/lifecycle/workflows/2-planning/create-ux-design/instructions.xml +0 -49
- package/_gaia/lifecycle/workflows/2-planning/create-ux-design/workflow.yaml +0 -23
- package/_gaia/lifecycle/workflows/2-planning/edit-prd/checklist.md +0 -17
- package/_gaia/lifecycle/workflows/2-planning/edit-prd/instructions.xml +0 -50
- package/_gaia/lifecycle/workflows/2-planning/edit-prd/workflow.yaml +0 -22
- package/_gaia/lifecycle/workflows/2-planning/validate-prd/checklist.md +0 -12
- package/_gaia/lifecycle/workflows/2-planning/validate-prd/instructions.xml +0 -52
- package/_gaia/lifecycle/workflows/2-planning/validate-prd/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/checklist.md +0 -32
- package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/instructions.xml +0 -100
- package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/workflow.yaml +0 -41
- package/_gaia/lifecycle/workflows/3-solutioning/create-epics-stories/checklist.md +0 -30
- package/_gaia/lifecycle/workflows/3-solutioning/create-epics-stories/instructions.xml +0 -86
- package/_gaia/lifecycle/workflows/3-solutioning/create-epics-stories/workflow.yaml +0 -34
- package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/checklist.md +0 -24
- package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/instructions.xml +0 -91
- package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/workflow.yaml +0 -32
- package/_gaia/lifecycle/workflows/3-solutioning/implementation-readiness/checklist.md +0 -66
- package/_gaia/lifecycle/workflows/3-solutioning/implementation-readiness/instructions.xml +0 -160
- package/_gaia/lifecycle/workflows/3-solutioning/implementation-readiness/workflow.yaml +0 -48
- package/_gaia/lifecycle/workflows/3-solutioning/infrastructure-design/checklist.md +0 -24
- package/_gaia/lifecycle/workflows/3-solutioning/infrastructure-design/instructions.xml +0 -44
- package/_gaia/lifecycle/workflows/3-solutioning/infrastructure-design/workflow.yaml +0 -23
- package/_gaia/lifecycle/workflows/3-solutioning/security-threat-model/checklist.md +0 -24
- package/_gaia/lifecycle/workflows/3-solutioning/security-threat-model/instructions.xml +0 -55
- package/_gaia/lifecycle/workflows/3-solutioning/security-threat-model/workflow.yaml +0 -23
- package/_gaia/lifecycle/workflows/4-implementation/action-items/instructions.xml +0 -131
- package/_gaia/lifecycle/workflows/4-implementation/action-items/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/4-implementation/add-stories/checklist.md +0 -27
- package/_gaia/lifecycle/workflows/4-implementation/add-stories/instructions.xml +0 -100
- package/_gaia/lifecycle/workflows/4-implementation/add-stories/workflow.yaml +0 -35
- package/_gaia/lifecycle/workflows/4-implementation/change-request/checklist.md +0 -25
- package/_gaia/lifecycle/workflows/4-implementation/change-request/instructions.xml +0 -123
- package/_gaia/lifecycle/workflows/4-implementation/change-request/workflow.yaml +0 -38
- package/_gaia/lifecycle/workflows/4-implementation/check-dod/checklist.md +0 -18
- package/_gaia/lifecycle/workflows/4-implementation/check-dod/instructions.xml +0 -54
- package/_gaia/lifecycle/workflows/4-implementation/check-dod/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/4-implementation/check-review-gate/checklist.md +0 -18
- package/_gaia/lifecycle/workflows/4-implementation/check-review-gate/instructions.xml +0 -53
- package/_gaia/lifecycle/workflows/4-implementation/check-review-gate/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/4-implementation/code-review/checklist.md +0 -18
- package/_gaia/lifecycle/workflows/4-implementation/code-review/instructions.xml +0 -50
- package/_gaia/lifecycle/workflows/4-implementation/code-review/workflow.yaml +0 -24
- package/_gaia/lifecycle/workflows/4-implementation/correct-course/checklist.md +0 -21
- package/_gaia/lifecycle/workflows/4-implementation/correct-course/instructions.xml +0 -63
- package/_gaia/lifecycle/workflows/4-implementation/correct-course/workflow.yaml +0 -25
- package/_gaia/lifecycle/workflows/4-implementation/create-story/checklist.md +0 -38
- package/_gaia/lifecycle/workflows/4-implementation/create-story/instructions.xml +0 -194
- package/_gaia/lifecycle/workflows/4-implementation/create-story/workflow.yaml +0 -26
- package/_gaia/lifecycle/workflows/4-implementation/dev-story/checklist.md +0 -26
- package/_gaia/lifecycle/workflows/4-implementation/dev-story/instructions.xml +0 -268
- package/_gaia/lifecycle/workflows/4-implementation/dev-story/workflow.yaml +0 -51
- package/_gaia/lifecycle/workflows/4-implementation/epic-status/checklist.md +0 -25
- package/_gaia/lifecycle/workflows/4-implementation/epic-status/instructions.xml +0 -62
- package/_gaia/lifecycle/workflows/4-implementation/epic-status/workflow.yaml +0 -24
- package/_gaia/lifecycle/workflows/4-implementation/fix-story/checklist.md +0 -12
- package/_gaia/lifecycle/workflows/4-implementation/fix-story/instructions.xml +0 -67
- package/_gaia/lifecycle/workflows/4-implementation/fix-story/workflow.yaml +0 -17
- package/_gaia/lifecycle/workflows/4-implementation/qa-generate-tests/checklist.md +0 -19
- package/_gaia/lifecycle/workflows/4-implementation/qa-generate-tests/instructions.xml +0 -52
- package/_gaia/lifecycle/workflows/4-implementation/qa-generate-tests/workflow.yaml +0 -20
- package/_gaia/lifecycle/workflows/4-implementation/retrospective/checklist.md +0 -15
- package/_gaia/lifecycle/workflows/4-implementation/retrospective/instructions.xml +0 -164
- package/_gaia/lifecycle/workflows/4-implementation/retrospective/workflow.yaml +0 -30
- package/_gaia/lifecycle/workflows/4-implementation/run-all-reviews/checklist.md +0 -14
- package/_gaia/lifecycle/workflows/4-implementation/run-all-reviews/instructions.xml +0 -78
- package/_gaia/lifecycle/workflows/4-implementation/run-all-reviews/workflow.yaml +0 -16
- package/_gaia/lifecycle/workflows/4-implementation/security-review/checklist.md +0 -29
- package/_gaia/lifecycle/workflows/4-implementation/security-review/instructions.xml +0 -80
- package/_gaia/lifecycle/workflows/4-implementation/security-review/workflow.yaml +0 -27
- package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/checklist.md +0 -29
- package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/instructions.xml +0 -140
- package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/workflow.yaml +0 -33
- package/_gaia/lifecycle/workflows/4-implementation/sprint-status/checklist.md +0 -18
- package/_gaia/lifecycle/workflows/4-implementation/sprint-status/instructions.xml +0 -36
- package/_gaia/lifecycle/workflows/4-implementation/sprint-status/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/4-implementation/tech-debt-review/checklist.md +0 -30
- package/_gaia/lifecycle/workflows/4-implementation/tech-debt-review/instructions.xml +0 -147
- package/_gaia/lifecycle/workflows/4-implementation/tech-debt-review/workflow.yaml +0 -24
- package/_gaia/lifecycle/workflows/4-implementation/triage-findings/checklist.md +0 -17
- package/_gaia/lifecycle/workflows/4-implementation/triage-findings/instructions.xml +0 -124
- package/_gaia/lifecycle/workflows/4-implementation/triage-findings/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/checklist.md +0 -48
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/instructions.xml +0 -125
- package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/workflow.yaml +0 -31
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/checklist.md +0 -54
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/instructions.xml +0 -147
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/test-structure.sh +0 -116
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/workflow.yaml +0 -29
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-plan/checklist.md +0 -34
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-plan/instructions.xml +0 -162
- package/_gaia/lifecycle/workflows/4-implementation/val-validate-plan/workflow.yaml +0 -39
- package/_gaia/lifecycle/workflows/4-implementation/validate-story/checklist.md +0 -23
- package/_gaia/lifecycle/workflows/4-implementation/validate-story/instructions.xml +0 -146
- package/_gaia/lifecycle/workflows/4-implementation/validate-story/workflow.yaml +0 -25
- package/_gaia/lifecycle/workflows/5-deployment/deployment-checklist/checklist.md +0 -29
- package/_gaia/lifecycle/workflows/5-deployment/deployment-checklist/instructions.xml +0 -59
- package/_gaia/lifecycle/workflows/5-deployment/deployment-checklist/workflow.yaml +0 -39
- package/_gaia/lifecycle/workflows/5-deployment/post-deploy-verify/checklist.md +0 -19
- package/_gaia/lifecycle/workflows/5-deployment/post-deploy-verify/instructions.xml +0 -33
- package/_gaia/lifecycle/workflows/5-deployment/post-deploy-verify/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/5-deployment/release-plan/checklist.md +0 -20
- package/_gaia/lifecycle/workflows/5-deployment/release-plan/instructions.xml +0 -33
- package/_gaia/lifecycle/workflows/5-deployment/release-plan/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/5-deployment/rollback-plan/checklist.md +0 -20
- package/_gaia/lifecycle/workflows/5-deployment/rollback-plan/instructions.xml +0 -33
- package/_gaia/lifecycle/workflows/5-deployment/rollback-plan/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/checklist.md +0 -52
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/instructions.xml +0 -122
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/test-step7.sh +0 -149
- package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/workflow.yaml +0 -33
- package/_gaia/lifecycle/workflows/anytime/document-project/checklist.md +0 -11
- package/_gaia/lifecycle/workflows/anytime/document-project/instructions.xml +0 -26
- package/_gaia/lifecycle/workflows/anytime/document-project/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/anytime/generate-project-context/checklist.md +0 -11
- package/_gaia/lifecycle/workflows/anytime/generate-project-context/instructions.xml +0 -22
- package/_gaia/lifecycle/workflows/anytime/generate-project-context/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/anytime/memory-hygiene/checklist.md +0 -24
- package/_gaia/lifecycle/workflows/anytime/memory-hygiene/instructions.xml +0 -108
- package/_gaia/lifecycle/workflows/anytime/memory-hygiene/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/anytime/performance-review/checklist.md +0 -25
- package/_gaia/lifecycle/workflows/anytime/performance-review/instructions.xml +0 -62
- package/_gaia/lifecycle/workflows/anytime/performance-review/workflow.yaml +0 -15
- package/_gaia/lifecycle/workflows/cross-phase/add-feature/checklist.md +0 -30
- package/_gaia/lifecycle/workflows/cross-phase/add-feature/instructions.xml +0 -85
- package/_gaia/lifecycle/workflows/cross-phase/add-feature/workflow.yaml +0 -37
- package/_gaia/lifecycle/workflows/quick-flow/quick-dev/checklist.md +0 -11
- package/_gaia/lifecycle/workflows/quick-flow/quick-dev/instructions.xml +0 -26
- package/_gaia/lifecycle/workflows/quick-flow/quick-dev/workflow.yaml +0 -19
- package/_gaia/lifecycle/workflows/quick-flow/quick-spec/checklist.md +0 -13
- package/_gaia/lifecycle/workflows/quick-flow/quick-spec/instructions.xml +0 -27
- package/_gaia/lifecycle/workflows/quick-flow/quick-spec/workflow.yaml +0 -15
- package/_gaia/testing/.resolved/.gitkeep +0 -0
- package/_gaia/testing/agents/test-architect.md +0 -131
- package/_gaia/testing/config.yaml +0 -8
- package/_gaia/testing/knowledge/_index.csv +0 -22
- package/_gaia/testing/knowledge/accessibility/axe-core-patterns.md +0 -177
- package/_gaia/testing/knowledge/accessibility/wcag-checks.md +0 -191
- package/_gaia/testing/knowledge/core/deterministic-testing.md +0 -167
- package/_gaia/testing/knowledge/core/fixture-architecture.md +0 -131
- package/_gaia/testing/knowledge/core/test-isolation.md +0 -142
- package/_gaia/testing/knowledge/core/test-pyramid.md +0 -129
- package/_gaia/testing/knowledge/extended/api-testing-patterns.md +0 -196
- package/_gaia/testing/knowledge/extended/data-factories.md +0 -158
- package/_gaia/testing/knowledge/extended/risk-governance.md +0 -119
- package/_gaia/testing/knowledge/extended/selector-resilience.md +0 -109
- package/_gaia/testing/knowledge/mobile-testing/appium-patterns.md +0 -164
- package/_gaia/testing/knowledge/mobile-testing/react-native-testing.md +0 -193
- package/_gaia/testing/knowledge/mobile-testing/responsive-testing.md +0 -177
- package/_gaia/testing/knowledge/performance/k6-patterns.md +0 -200
- package/_gaia/testing/knowledge/performance/lighthouse-ci.md +0 -158
- package/_gaia/testing/knowledge/specialized/contract-testing.md +0 -173
- package/_gaia/testing/knowledge/specialized/test-healing.md +0 -129
- package/_gaia/testing/knowledge/specialized/visual-testing.md +0 -129
- package/_gaia/testing/knowledge/unit-testing/jest-vitest-patterns.md +0 -193
- package/_gaia/testing/knowledge/unit-testing/junit5-patterns.md +0 -200
- package/_gaia/testing/knowledge/unit-testing/pytest-patterns.md +0 -185
- package/_gaia/testing/module-help.csv +0 -13
- package/_gaia/testing/workflows/accessibility-testing/checklist.md +0 -12
- package/_gaia/testing/workflows/accessibility-testing/instructions.xml +0 -41
- package/_gaia/testing/workflows/accessibility-testing/workflow.yaml +0 -13
- package/_gaia/testing/workflows/atdd/checklist.md +0 -6
- package/_gaia/testing/workflows/atdd/instructions.xml +0 -36
- package/_gaia/testing/workflows/atdd/workflow.yaml +0 -22
- package/_gaia/testing/workflows/ci-setup/checklist.md +0 -9
- package/_gaia/testing/workflows/ci-setup/instructions.xml +0 -43
- package/_gaia/testing/workflows/ci-setup/workflow.yaml +0 -11
- package/_gaia/testing/workflows/edit-test-plan/checklist.md +0 -20
- package/_gaia/testing/workflows/edit-test-plan/instructions.xml +0 -65
- package/_gaia/testing/workflows/edit-test-plan/workflow.yaml +0 -35
- package/_gaia/testing/workflows/mobile-testing/checklist.md +0 -13
- package/_gaia/testing/workflows/mobile-testing/instructions.xml +0 -41
- package/_gaia/testing/workflows/mobile-testing/workflow.yaml +0 -11
- package/_gaia/testing/workflows/nfr-assessment/checklist.md +0 -7
- package/_gaia/testing/workflows/nfr-assessment/instructions.xml +0 -26
- package/_gaia/testing/workflows/nfr-assessment/workflow.yaml +0 -11
- package/_gaia/testing/workflows/performance-testing/checklist.md +0 -11
- package/_gaia/testing/workflows/performance-testing/instructions.xml +0 -41
- package/_gaia/testing/workflows/performance-testing/workflow.yaml +0 -11
- package/_gaia/testing/workflows/teach-me-testing/checklist.md +0 -6
- package/_gaia/testing/workflows/teach-me-testing/instructions.xml +0 -28
- package/_gaia/testing/workflows/teach-me-testing/workflow.yaml +0 -12
- package/_gaia/testing/workflows/test-automation/checklist.md +0 -6
- package/_gaia/testing/workflows/test-automation/instructions.xml +0 -49
- package/_gaia/testing/workflows/test-automation/workflow.yaml +0 -11
- package/_gaia/testing/workflows/test-design/checklist.md +0 -9
- package/_gaia/testing/workflows/test-design/instructions.xml +0 -47
- package/_gaia/testing/workflows/test-design/workflow.yaml +0 -11
- package/_gaia/testing/workflows/test-framework/checklist.md +0 -8
- package/_gaia/testing/workflows/test-framework/instructions.xml +0 -25
- package/_gaia/testing/workflows/test-framework/workflow.yaml +0 -11
- package/_gaia/testing/workflows/test-review/checklist.md +0 -9
- package/_gaia/testing/workflows/test-review/instructions.xml +0 -51
- package/_gaia/testing/workflows/test-review/workflow.yaml +0 -11
- package/_gaia/testing/workflows/traceability/checklist.md +0 -6
- package/_gaia/testing/workflows/traceability/instructions.xml +0 -49
- package/_gaia/testing/workflows/traceability/workflow.yaml +0 -21
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: database-design
|
|
3
|
-
version: '1.0'
|
|
4
|
-
applicable_agents: [java-dev, python-dev]
|
|
5
|
-
test_scenarios:
|
|
6
|
-
- scenario: Table naming convention
|
|
7
|
-
expected: Table names are snake_case, plural
|
|
8
|
-
- scenario: Migration file creation
|
|
9
|
-
expected: Migration includes up and down methods with version timestamp
|
|
10
|
-
- scenario: Index optimization
|
|
11
|
-
expected: Indexes cover frequently queried columns and composite patterns
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<!-- SECTION: schema-design -->
|
|
15
|
-
## Schema Design
|
|
16
|
-
|
|
17
|
-
### Naming Conventions
|
|
18
|
-
- Tables: `snake_case`, plural: `users`, `order_items`, `payment_methods`
|
|
19
|
-
- Columns: `snake_case`, singular: `first_name`, `created_at`, `is_active`
|
|
20
|
-
- Primary keys: `id` (auto-increment or UUID)
|
|
21
|
-
- Foreign keys: `{singular_table}_id`: `user_id`, `order_id`
|
|
22
|
-
- Junction tables: `{table1}_{table2}`: `user_roles`, `product_categories`
|
|
23
|
-
- Indexes: `idx_{table}_{columns}`: `idx_users_email`
|
|
24
|
-
- Constraints: `{type}_{table}_{columns}`: `uq_users_email`, `chk_orders_amount`
|
|
25
|
-
|
|
26
|
-
### Normalization
|
|
27
|
-
- **1NF**: No repeating groups, atomic values
|
|
28
|
-
- **2NF**: No partial dependencies (every non-key depends on whole key)
|
|
29
|
-
- **3NF**: No transitive dependencies (non-key depends only on key)
|
|
30
|
-
- Normalize to 3NF by default; denormalize only with measured justification
|
|
31
|
-
|
|
32
|
-
### Denormalization
|
|
33
|
-
When to denormalize:
|
|
34
|
-
- Read-heavy queries with complex joins (measure first)
|
|
35
|
-
- Reporting tables / materialized views
|
|
36
|
-
- Caching computed values that rarely change
|
|
37
|
-
|
|
38
|
-
Techniques:
|
|
39
|
-
- Materialized views for complex aggregations
|
|
40
|
-
- Computed columns for derived values
|
|
41
|
-
- Denormalized read models (CQRS pattern)
|
|
42
|
-
|
|
43
|
-
### Standard Columns
|
|
44
|
-
Every table should include:
|
|
45
|
-
```sql
|
|
46
|
-
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
|
47
|
-
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
48
|
-
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
49
|
-
```
|
|
50
|
-
Add `deleted_at TIMESTAMP` for soft deletes when needed.
|
|
51
|
-
|
|
52
|
-
<!-- SECTION: migrations -->
|
|
53
|
-
## Migrations
|
|
54
|
-
|
|
55
|
-
### Forward-Only Strategy
|
|
56
|
-
- Prefer forward-only migrations in production environments
|
|
57
|
-
- Rollback via compensating migrations rather than reversing schema changes
|
|
58
|
-
- Keep a `down` script for development/testing but never rely on it in production
|
|
59
|
-
|
|
60
|
-
### Versioned Migrations
|
|
61
|
-
- One migration per change set
|
|
62
|
-
- Timestamp-based ordering: `20260303120000_create_users_table`
|
|
63
|
-
- Each migration has `up` (apply) and `down` (rollback)
|
|
64
|
-
|
|
65
|
-
### Migration Template
|
|
66
|
-
```sql
|
|
67
|
-
-- Migration: 20260303120000_create_users_table
|
|
68
|
-
-- Description: Create users table with authentication fields
|
|
69
|
-
|
|
70
|
-
-- UP
|
|
71
|
-
CREATE TABLE users (
|
|
72
|
-
id BIGINT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
|
73
|
-
email VARCHAR(255) NOT NULL,
|
|
74
|
-
password_hash VARCHAR(255) NOT NULL,
|
|
75
|
-
display_name VARCHAR(100),
|
|
76
|
-
is_active BOOLEAN DEFAULT true,
|
|
77
|
-
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
78
|
-
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
CREATE UNIQUE INDEX idx_users_email ON users (email);
|
|
82
|
-
|
|
83
|
-
-- DOWN
|
|
84
|
-
DROP TABLE IF EXISTS users;
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Migration Safety Rules
|
|
88
|
-
- Every migration MUST have a working rollback for dev/staging
|
|
89
|
-
- Test rollbacks in staging before production
|
|
90
|
-
- Data migrations need special care -- backup before running
|
|
91
|
-
- Never drop columns in the same release they stop being used
|
|
92
|
-
- Use expand-contract pattern: add new column, migrate data, remove old column
|
|
93
|
-
|
|
94
|
-
### Seed Data
|
|
95
|
-
- Keep seed data separate from schema migrations
|
|
96
|
-
- Use seed files for development/testing reference data
|
|
97
|
-
- Never seed production with test data
|
|
98
|
-
- Idempotent seeds: check existence before inserting
|
|
99
|
-
|
|
100
|
-
<!-- SECTION: indexing -->
|
|
101
|
-
## Indexing
|
|
102
|
-
|
|
103
|
-
### Index Types
|
|
104
|
-
| Type | Use Case |
|
|
105
|
-
|------|----------|
|
|
106
|
-
| B-tree (default) | Equality and range queries |
|
|
107
|
-
| Hash | Equality-only lookups |
|
|
108
|
-
| GIN | Full-text search, JSONB, arrays |
|
|
109
|
-
| GiST | Geometric, spatial data |
|
|
110
|
-
| Partial | Subset of rows matching condition |
|
|
111
|
-
|
|
112
|
-
### Query Plan Analysis
|
|
113
|
-
```sql
|
|
114
|
-
EXPLAIN ANALYZE SELECT * FROM users WHERE email = 'test@example.com';
|
|
115
|
-
```
|
|
116
|
-
- Look for `Seq Scan` on large tables -- usually needs an index
|
|
117
|
-
- `Index Scan` or `Index Only Scan` is the goal
|
|
118
|
-
- Check `actual time` vs `estimated time` for accuracy
|
|
119
|
-
|
|
120
|
-
### Composite Indexes
|
|
121
|
-
- Column order matters: most selective column first
|
|
122
|
-
- Follow the "left prefix" rule: `(a, b, c)` covers queries on `a`, `(a, b)`, and `(a, b, c)`
|
|
123
|
-
- Do not create single-column indexes that are prefixes of existing composites
|
|
124
|
-
|
|
125
|
-
### Index Guidelines
|
|
126
|
-
- Index all foreign keys
|
|
127
|
-
- Index columns used in WHERE, ORDER BY, GROUP BY
|
|
128
|
-
- Do not over-index: each index slows writes
|
|
129
|
-
- Monitor unused indexes and remove them
|
|
130
|
-
- Use partial indexes for common filtered queries: `WHERE is_active = true`
|
|
131
|
-
|
|
132
|
-
<!-- SECTION: orm-patterns -->
|
|
133
|
-
## ORM Patterns
|
|
134
|
-
|
|
135
|
-
### Repository Pattern
|
|
136
|
-
```
|
|
137
|
-
Repository (data access) -> Service (business logic) -> Controller (HTTP)
|
|
138
|
-
```
|
|
139
|
-
- Repositories encapsulate query logic
|
|
140
|
-
- Services orchestrate business rules
|
|
141
|
-
- Controllers handle HTTP concerns only
|
|
142
|
-
|
|
143
|
-
### N+1 Prevention
|
|
144
|
-
The N+1 problem: loading a list, then loading related data one-by-one.
|
|
145
|
-
|
|
146
|
-
Prevention strategies:
|
|
147
|
-
- **Eager loading**: Load related data in the initial query
|
|
148
|
-
- **Batch loading**: Collect IDs, load all related in one query
|
|
149
|
-
- **Join queries**: Use SQL joins for single-query loading
|
|
150
|
-
- **DataLoader pattern**: Batch and cache within a request
|
|
151
|
-
|
|
152
|
-
Example of N+1 (bad):
|
|
153
|
-
```python
|
|
154
|
-
users = db.query(User).all() # 1 query
|
|
155
|
-
for user in users:
|
|
156
|
-
orders = user.orders # N queries
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Fixed with eager loading:
|
|
160
|
-
```python
|
|
161
|
-
users = db.query(User).options(
|
|
162
|
-
joinedload(User.orders)
|
|
163
|
-
).all() # 1 query with JOIN
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### ORM Best Practices
|
|
167
|
-
- Use query builders for complex queries instead of raw SQL
|
|
168
|
-
- Map database types to domain types explicitly
|
|
169
|
-
- Use database transactions for multi-table operations
|
|
170
|
-
- Log generated SQL in development to catch inefficiencies
|
|
171
|
-
- Avoid putting business logic in ORM models
|
|
172
|
-
- Prefer explicit loading strategies over global defaults
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docker-workflow
|
|
3
|
-
version: '1.0'
|
|
4
|
-
applicable_agents: [typescript-dev, angular-dev, java-dev, python-dev, mobile-dev]
|
|
5
|
-
test_scenarios:
|
|
6
|
-
- scenario: Multi-stage Dockerfile creation
|
|
7
|
-
expected: Dockerfile uses separate build and runtime stages with minimal final image
|
|
8
|
-
- scenario: Docker Compose for local development
|
|
9
|
-
expected: Compose file includes app, database, and volume mounts for hot reload
|
|
10
|
-
- scenario: Image security scanning
|
|
11
|
-
expected: CI pipeline includes image scan step and fails on critical vulnerabilities
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<!-- SECTION: multi-stage-builds -->
|
|
15
|
-
## Multi-Stage Builds
|
|
16
|
-
|
|
17
|
-
### Why Multi-Stage
|
|
18
|
-
- Separate build dependencies from runtime dependencies
|
|
19
|
-
- Smaller final images (no compilers, build tools, source code)
|
|
20
|
-
- Reduced attack surface in production containers
|
|
21
|
-
- Faster deployments due to smaller image size
|
|
22
|
-
|
|
23
|
-
### Node.js Example
|
|
24
|
-
```dockerfile
|
|
25
|
-
# Stage 1: Build
|
|
26
|
-
FROM node:20-alpine AS builder
|
|
27
|
-
WORKDIR /app
|
|
28
|
-
COPY package*.json ./
|
|
29
|
-
RUN npm ci --ignore-scripts
|
|
30
|
-
COPY . .
|
|
31
|
-
RUN npm run build
|
|
32
|
-
|
|
33
|
-
# Stage 2: Runtime
|
|
34
|
-
FROM node:20-alpine AS runtime
|
|
35
|
-
WORKDIR /app
|
|
36
|
-
RUN addgroup -g 1001 appgroup && adduser -u 1001 -G appgroup -s /bin/sh -D appuser
|
|
37
|
-
COPY --from=builder /app/dist ./dist
|
|
38
|
-
COPY --from=builder /app/node_modules ./node_modules
|
|
39
|
-
COPY --from=builder /app/package.json ./
|
|
40
|
-
USER appuser
|
|
41
|
-
EXPOSE 3000
|
|
42
|
-
CMD ["node", "dist/main.js"]
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Java Example
|
|
46
|
-
```dockerfile
|
|
47
|
-
# Stage 1: Build
|
|
48
|
-
FROM eclipse-temurin:21-jdk-alpine AS builder
|
|
49
|
-
WORKDIR /app
|
|
50
|
-
COPY gradle/ gradle/
|
|
51
|
-
COPY gradlew build.gradle.kts settings.gradle.kts ./
|
|
52
|
-
RUN ./gradlew dependencies --no-daemon
|
|
53
|
-
COPY src/ src/
|
|
54
|
-
RUN ./gradlew bootJar --no-daemon
|
|
55
|
-
|
|
56
|
-
# Stage 2: Runtime
|
|
57
|
-
FROM eclipse-temurin:21-jre-alpine AS runtime
|
|
58
|
-
WORKDIR /app
|
|
59
|
-
RUN addgroup -g 1001 appgroup && adduser -u 1001 -G appgroup -s /bin/sh -D appuser
|
|
60
|
-
COPY --from=builder /app/build/libs/*.jar app.jar
|
|
61
|
-
USER appuser
|
|
62
|
-
EXPOSE 8080
|
|
63
|
-
ENTRYPOINT ["java", "-jar", "app.jar"]
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Python Example
|
|
67
|
-
```dockerfile
|
|
68
|
-
# Stage 1: Build
|
|
69
|
-
FROM python:3.12-slim AS builder
|
|
70
|
-
WORKDIR /app
|
|
71
|
-
RUN pip install --no-cache-dir poetry
|
|
72
|
-
COPY pyproject.toml poetry.lock ./
|
|
73
|
-
RUN poetry export -f requirements.txt -o requirements.txt --without-hashes
|
|
74
|
-
COPY . .
|
|
75
|
-
|
|
76
|
-
# Stage 2: Runtime
|
|
77
|
-
FROM python:3.12-slim AS runtime
|
|
78
|
-
WORKDIR /app
|
|
79
|
-
RUN groupadd -g 1001 appgroup && useradd -u 1001 -g appgroup -s /bin/bash appuser
|
|
80
|
-
COPY --from=builder /app/requirements.txt ./
|
|
81
|
-
RUN pip install --no-cache-dir -r requirements.txt
|
|
82
|
-
COPY --from=builder /app/src ./src
|
|
83
|
-
USER appuser
|
|
84
|
-
EXPOSE 8000
|
|
85
|
-
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Best Practices
|
|
89
|
-
- Use specific base image tags, never `latest`
|
|
90
|
-
- Copy dependency files first for layer caching
|
|
91
|
-
- Run as non-root user in the final stage
|
|
92
|
-
- Use `.dockerignore` to exclude unnecessary files
|
|
93
|
-
|
|
94
|
-
<!-- SECTION: compose -->
|
|
95
|
-
## Docker Compose for Development
|
|
96
|
-
|
|
97
|
-
### Standard Compose File
|
|
98
|
-
```yaml
|
|
99
|
-
services:
|
|
100
|
-
app:
|
|
101
|
-
build:
|
|
102
|
-
context: .
|
|
103
|
-
dockerfile: Dockerfile
|
|
104
|
-
target: builder
|
|
105
|
-
ports:
|
|
106
|
-
- "3000:3000"
|
|
107
|
-
volumes:
|
|
108
|
-
- .:/app
|
|
109
|
-
- /app/node_modules
|
|
110
|
-
environment:
|
|
111
|
-
- NODE_ENV=development
|
|
112
|
-
- DATABASE_URL=postgres://user:pass@db:5432/appdb
|
|
113
|
-
depends_on:
|
|
114
|
-
db:
|
|
115
|
-
condition: service_healthy
|
|
116
|
-
|
|
117
|
-
db:
|
|
118
|
-
image: postgres:16-alpine
|
|
119
|
-
ports:
|
|
120
|
-
- "5432:5432"
|
|
121
|
-
environment:
|
|
122
|
-
POSTGRES_USER: user
|
|
123
|
-
POSTGRES_PASSWORD: pass
|
|
124
|
-
POSTGRES_DB: appdb
|
|
125
|
-
volumes:
|
|
126
|
-
- pgdata:/var/lib/postgresql/data
|
|
127
|
-
healthcheck:
|
|
128
|
-
test: ["CMD-SHELL", "pg_isready -U user -d appdb"]
|
|
129
|
-
interval: 5s
|
|
130
|
-
timeout: 3s
|
|
131
|
-
retries: 5
|
|
132
|
-
|
|
133
|
-
redis:
|
|
134
|
-
image: redis:7-alpine
|
|
135
|
-
ports:
|
|
136
|
-
- "6379:6379"
|
|
137
|
-
|
|
138
|
-
volumes:
|
|
139
|
-
pgdata:
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Development Patterns
|
|
143
|
-
- Mount source code as volume for hot reload
|
|
144
|
-
- Exclude `node_modules` with anonymous volume to avoid host/container conflicts
|
|
145
|
-
- Use `depends_on` with health checks to ensure service ordering
|
|
146
|
-
- Keep environment variables in `.env` file (git-ignored)
|
|
147
|
-
- Use `profiles` to group optional services (e.g., monitoring, mail)
|
|
148
|
-
|
|
149
|
-
### Useful Commands
|
|
150
|
-
```bash
|
|
151
|
-
docker compose up -d # Start all services detached
|
|
152
|
-
docker compose logs -f app # Follow app logs
|
|
153
|
-
docker compose exec app sh # Shell into running container
|
|
154
|
-
docker compose down -v # Stop and remove volumes
|
|
155
|
-
docker compose build --no-cache # Force rebuild
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
<!-- SECTION: security-scanning -->
|
|
159
|
-
## Security Scanning
|
|
160
|
-
|
|
161
|
-
### .dockerignore
|
|
162
|
-
Always include a `.dockerignore` to prevent sensitive files from entering the image:
|
|
163
|
-
```
|
|
164
|
-
.git
|
|
165
|
-
.env
|
|
166
|
-
.env.*
|
|
167
|
-
node_modules
|
|
168
|
-
*.md
|
|
169
|
-
docker-compose*.yml
|
|
170
|
-
.github/
|
|
171
|
-
coverage/
|
|
172
|
-
tests/
|
|
173
|
-
**/*.test.*
|
|
174
|
-
**/*.spec.*
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Image Scanning
|
|
178
|
-
Integrate scanning into your CI pipeline:
|
|
179
|
-
```yaml
|
|
180
|
-
# GitHub Actions example
|
|
181
|
-
- name: Build image
|
|
182
|
-
run: docker build -t myapp:${{ github.sha }} .
|
|
183
|
-
|
|
184
|
-
- name: Scan image
|
|
185
|
-
uses: aquasecurity/trivy-action@master
|
|
186
|
-
with:
|
|
187
|
-
image-ref: myapp:${{ github.sha }}
|
|
188
|
-
severity: CRITICAL,HIGH
|
|
189
|
-
exit-code: 1
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
### Vulnerability Management
|
|
193
|
-
| Severity | Action | Timeline |
|
|
194
|
-
|----------|--------|----------|
|
|
195
|
-
| Critical | Block deployment, fix immediately | 24 hours |
|
|
196
|
-
| High | Fix before next release | 1 week |
|
|
197
|
-
| Medium | Plan fix in next sprint | 2 weeks |
|
|
198
|
-
| Low | Track and batch fix | Next quarter |
|
|
199
|
-
|
|
200
|
-
### Secrets Handling
|
|
201
|
-
- Never use `ENV` for secrets -- they persist in image layers
|
|
202
|
-
- Use Docker BuildKit secrets for build-time secrets:
|
|
203
|
-
```dockerfile
|
|
204
|
-
# syntax=docker/dockerfile:1
|
|
205
|
-
RUN --mount=type=secret,id=npm_token \
|
|
206
|
-
NPM_TOKEN=$(cat /run/secrets/npm_token) npm ci
|
|
207
|
-
```
|
|
208
|
-
- Use runtime secrets via orchestrator (Docker Swarm, Kubernetes)
|
|
209
|
-
- Mount secrets as files, not environment variables when possible
|
|
210
|
-
|
|
211
|
-
### Container Hardening
|
|
212
|
-
- Use `USER` directive to run as non-root
|
|
213
|
-
- Set `read_only: true` in compose for immutable root filesystem
|
|
214
|
-
- Drop all capabilities and add only what is needed:
|
|
215
|
-
```yaml
|
|
216
|
-
security_opt:
|
|
217
|
-
- no-new-privileges:true
|
|
218
|
-
cap_drop:
|
|
219
|
-
- ALL
|
|
220
|
-
```
|
|
221
|
-
- Scan base images regularly for CVEs
|
|
222
|
-
- Pin base image digests for reproducible builds in production
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: documentation-standards
|
|
3
|
-
version: '1.0'
|
|
4
|
-
applicable_agents: [typescript-dev, angular-dev, flutter-dev, java-dev, python-dev, mobile-dev, tech-writer, analyst, pm]
|
|
5
|
-
test_scenarios:
|
|
6
|
-
- scenario: README creation for new project
|
|
7
|
-
expected: README includes all template sections with project-specific content
|
|
8
|
-
- scenario: Architecture Decision Record
|
|
9
|
-
expected: ADR follows status/context/decision/consequences format with unique ID
|
|
10
|
-
- scenario: Inline code documentation
|
|
11
|
-
expected: Public APIs have docstrings with parameter descriptions and return types
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<!-- SECTION: readme-template -->
|
|
15
|
-
## README Template
|
|
16
|
-
|
|
17
|
-
### Standard Structure
|
|
18
|
-
Every project README should include these sections:
|
|
19
|
-
|
|
20
|
-
```markdown
|
|
21
|
-
# Project Name
|
|
22
|
-
|
|
23
|
-
Brief one-line description of what this project does.
|
|
24
|
-
|
|
25
|
-
## Overview
|
|
26
|
-
|
|
27
|
-
2-3 paragraphs explaining the project's purpose, who it's for,
|
|
28
|
-
and the problem it solves.
|
|
29
|
-
|
|
30
|
-
## Getting Started
|
|
31
|
-
|
|
32
|
-
### Prerequisites
|
|
33
|
-
- Node.js >= 20
|
|
34
|
-
- PostgreSQL >= 16
|
|
35
|
-
- Docker (optional)
|
|
36
|
-
|
|
37
|
-
### Installation
|
|
38
|
-
1. Clone the repository
|
|
39
|
-
2. Install dependencies: `npm install`
|
|
40
|
-
3. Copy environment file: `cp .env.example .env`
|
|
41
|
-
4. Run migrations: `npm run db:migrate`
|
|
42
|
-
5. Start development server: `npm run dev`
|
|
43
|
-
|
|
44
|
-
### Environment Variables
|
|
45
|
-
| Variable | Description | Required | Default |
|
|
46
|
-
|----------|-------------|----------|---------|
|
|
47
|
-
| DATABASE_URL | PostgreSQL connection string | Yes | - |
|
|
48
|
-
| PORT | Server port | No | 3000 |
|
|
49
|
-
| LOG_LEVEL | Logging verbosity | No | info |
|
|
50
|
-
|
|
51
|
-
## Usage
|
|
52
|
-
|
|
53
|
-
Show common usage examples with code snippets.
|
|
54
|
-
|
|
55
|
-
## Architecture
|
|
56
|
-
|
|
57
|
-
Brief description of the system architecture, with a link
|
|
58
|
-
to detailed ADRs and diagrams if available.
|
|
59
|
-
|
|
60
|
-
## Testing
|
|
61
|
-
|
|
62
|
-
How to run the test suite:
|
|
63
|
-
- `npm test` -- run all tests
|
|
64
|
-
- `npm run test:unit` -- unit tests only
|
|
65
|
-
- `npm run test:e2e` -- end-to-end tests
|
|
66
|
-
|
|
67
|
-
## Contributing
|
|
68
|
-
|
|
69
|
-
Link to CONTRIBUTING.md or inline contribution guidelines.
|
|
70
|
-
|
|
71
|
-
## License
|
|
72
|
-
|
|
73
|
-
Specify the project license.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### README Guidelines
|
|
77
|
-
- Keep the README under 300 lines; link to detailed docs for depth
|
|
78
|
-
- Update the README when setup steps or prerequisites change
|
|
79
|
-
- Include a "Quick Start" path that gets developers running in under 5 minutes
|
|
80
|
-
- Add badges for CI status, test coverage, and version only if meaningful
|
|
81
|
-
|
|
82
|
-
<!-- SECTION: adr-format -->
|
|
83
|
-
## Architecture Decision Records
|
|
84
|
-
|
|
85
|
-
### What Is an ADR
|
|
86
|
-
An ADR captures a significant architectural decision along with its context and consequences. ADRs form a decision log that helps future team members understand why the system is built the way it is.
|
|
87
|
-
|
|
88
|
-
### ADR Template
|
|
89
|
-
```markdown
|
|
90
|
-
# ADR-{NNN}: {Title of Decision}
|
|
91
|
-
|
|
92
|
-
**Status**: Proposed | Accepted | Deprecated | Superseded by ADR-{NNN}
|
|
93
|
-
**Date**: YYYY-MM-DD
|
|
94
|
-
**Deciders**: List of people involved
|
|
95
|
-
|
|
96
|
-
## Context
|
|
97
|
-
|
|
98
|
-
What is the issue or problem that motivates this decision?
|
|
99
|
-
What constraints or requirements apply?
|
|
100
|
-
|
|
101
|
-
## Decision
|
|
102
|
-
|
|
103
|
-
What is the change that we are proposing or have agreed to?
|
|
104
|
-
State the decision clearly and concisely.
|
|
105
|
-
|
|
106
|
-
## Consequences
|
|
107
|
-
|
|
108
|
-
### Positive
|
|
109
|
-
- Benefit one
|
|
110
|
-
- Benefit two
|
|
111
|
-
|
|
112
|
-
### Negative
|
|
113
|
-
- Trade-off one
|
|
114
|
-
- Trade-off two
|
|
115
|
-
|
|
116
|
-
### Neutral
|
|
117
|
-
- Side-effect that is neither good nor bad
|
|
118
|
-
|
|
119
|
-
## Alternatives Considered
|
|
120
|
-
|
|
121
|
-
### Alternative A: {Name}
|
|
122
|
-
- Description of the alternative
|
|
123
|
-
- Why it was rejected
|
|
124
|
-
|
|
125
|
-
### Alternative B: {Name}
|
|
126
|
-
- Description of the alternative
|
|
127
|
-
- Why it was rejected
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### ADR Conventions
|
|
131
|
-
- Number ADRs sequentially: `ADR-001`, `ADR-002`, etc.
|
|
132
|
-
- Store in `docs/adr/` or `docs/planning-artifacts/adr/`
|
|
133
|
-
- Never delete ADRs; mark as `Deprecated` or `Superseded`
|
|
134
|
-
- Write ADRs before or during implementation, not after
|
|
135
|
-
- One decision per ADR; split compound decisions into separate records
|
|
136
|
-
|
|
137
|
-
### When to Write an ADR
|
|
138
|
-
- Choosing a framework, library, or language
|
|
139
|
-
- Changing the database or data storage approach
|
|
140
|
-
- Defining API communication patterns
|
|
141
|
-
- Establishing authentication/authorization strategy
|
|
142
|
-
- Making infrastructure or deployment decisions
|
|
143
|
-
- Any decision that would surprise a new team member
|
|
144
|
-
|
|
145
|
-
<!-- SECTION: inline-comments -->
|
|
146
|
-
## Inline Code Comments
|
|
147
|
-
|
|
148
|
-
### JSDoc / TSDoc (TypeScript/JavaScript)
|
|
149
|
-
```typescript
|
|
150
|
-
/**
|
|
151
|
-
* Calculates the total price for an order including applicable discounts.
|
|
152
|
-
*
|
|
153
|
-
* @param items - Line items in the order
|
|
154
|
-
* @param discountCode - Optional promotional discount code
|
|
155
|
-
* @returns The final price after discounts, rounded to 2 decimal places
|
|
156
|
-
* @throws {InvalidDiscountError} If the discount code is expired or invalid
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* const total = calculateTotal(items, 'SAVE10');
|
|
160
|
-
* // returns 90.00 for a $100 order with 10% discount
|
|
161
|
-
*/
|
|
162
|
-
function calculateTotal(items: LineItem[], discountCode?: string): number {
|
|
163
|
-
// ...
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Python Docstrings
|
|
168
|
-
```python
|
|
169
|
-
def calculate_total(items: list[LineItem], discount_code: str | None = None) -> Decimal:
|
|
170
|
-
"""Calculate the total price for an order including applicable discounts.
|
|
171
|
-
|
|
172
|
-
Args:
|
|
173
|
-
items: Line items in the order.
|
|
174
|
-
discount_code: Optional promotional discount code.
|
|
175
|
-
|
|
176
|
-
Returns:
|
|
177
|
-
The final price after discounts, rounded to 2 decimal places.
|
|
178
|
-
|
|
179
|
-
Raises:
|
|
180
|
-
InvalidDiscountError: If the discount code is expired or invalid.
|
|
181
|
-
|
|
182
|
-
Example:
|
|
183
|
-
>>> total = calculate_total(items, 'SAVE10')
|
|
184
|
-
>>> total
|
|
185
|
-
Decimal('90.00')
|
|
186
|
-
"""
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Comment Guidelines
|
|
190
|
-
- Document **why**, not **what** (the code shows what)
|
|
191
|
-
- Every public function, class, and module needs a docstring
|
|
192
|
-
- Skip docstrings on trivial getters, setters, and one-line functions
|
|
193
|
-
- Use `TODO(name):` for planned work and `FIXME(name):` for known issues
|
|
194
|
-
- Never leave orphaned TODO comments without an owner
|
|
195
|
-
- Remove commented-out code; use version control for history
|
|
196
|
-
|
|
197
|
-
<!-- SECTION: api-docs -->
|
|
198
|
-
## API Documentation
|
|
199
|
-
|
|
200
|
-
### What to Document
|
|
201
|
-
- Every public endpoint with URL, method, and description
|
|
202
|
-
- Request parameters (path, query, headers, body) with types and constraints
|
|
203
|
-
- Response structure with example payloads for success and error cases
|
|
204
|
-
- Authentication requirements per endpoint
|
|
205
|
-
- Rate limits and quotas
|
|
206
|
-
|
|
207
|
-
### API Documentation Tools
|
|
208
|
-
| Tool | Best For |
|
|
209
|
-
|------|----------|
|
|
210
|
-
| OpenAPI / Swagger | REST APIs with auto-generated docs |
|
|
211
|
-
| GraphQL Playground | GraphQL APIs with schema introspection |
|
|
212
|
-
| Redoc | Beautiful static docs from OpenAPI spec |
|
|
213
|
-
| Postman Collections | Interactive request examples |
|
|
214
|
-
|
|
215
|
-
### Endpoint Documentation Example
|
|
216
|
-
```markdown
|
|
217
|
-
## Create User
|
|
218
|
-
|
|
219
|
-
`POST /api/v1/users`
|
|
220
|
-
|
|
221
|
-
Creates a new user account.
|
|
222
|
-
|
|
223
|
-
**Authentication**: Bearer token (admin role required)
|
|
224
|
-
|
|
225
|
-
**Request Body**:
|
|
226
|
-
| Field | Type | Required | Description |
|
|
227
|
-
|-------|------|----------|-------------|
|
|
228
|
-
| email | string | Yes | Valid email address |
|
|
229
|
-
| name | string | Yes | Display name (2-100 chars) |
|
|
230
|
-
| role | string | No | User role (default: "member") |
|
|
231
|
-
|
|
232
|
-
**Response 201**:
|
|
233
|
-
{
|
|
234
|
-
"data": {
|
|
235
|
-
"id": "usr_abc123",
|
|
236
|
-
"email": "user@example.com",
|
|
237
|
-
"name": "Jane Doe",
|
|
238
|
-
"role": "member",
|
|
239
|
-
"created_at": "2026-03-03T12:00:00Z"
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
**Response 422**:
|
|
244
|
-
{
|
|
245
|
-
"type": "https://api.example.com/errors/validation-error",
|
|
246
|
-
"title": "Validation Error",
|
|
247
|
-
"status": 422,
|
|
248
|
-
"errors": [{ "field": "email", "code": "INVALID_FORMAT" }]
|
|
249
|
-
}
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Documentation Maintenance
|
|
253
|
-
- Generate docs from code annotations when possible (keeps docs in sync)
|
|
254
|
-
- Include a "last updated" date on manually written docs
|
|
255
|
-
- Review API docs as part of the PR review process
|
|
256
|
-
- Test documented examples in CI to prevent drift
|