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,196 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: api-testing-patterns
|
|
3
|
-
tier: extended
|
|
4
|
-
version: '1.0'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# API Testing Patterns
|
|
8
|
-
|
|
9
|
-
## Principle
|
|
10
|
-
|
|
11
|
-
Test APIs and backend services directly without browser overhead. Use Playwright's
|
|
12
|
-
`request` context for HTTP operations and Zod schemas for runtime validation. API-first
|
|
13
|
-
testing provides faster feedback, better stability, and more focused coverage than
|
|
14
|
-
testing backend logic through UI layers.
|
|
15
|
-
|
|
16
|
-
## Rationale
|
|
17
|
-
|
|
18
|
-
Many teams over-rely on E2E browser tests when API tests would be faster, more stable,
|
|
19
|
-
and more precise. If you are testing what the server returns (not how it looks), use API
|
|
20
|
-
tests. They run in milliseconds, have no browser startup cost, and provide clear
|
|
21
|
-
request/response debugging without DOM noise.
|
|
22
|
-
|
|
23
|
-
## Pattern Examples
|
|
24
|
-
|
|
25
|
-
### Pure API Test (No Browser)
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
// tests/api/users.spec.ts
|
|
29
|
-
import { test, expect } from '@playwright/test';
|
|
30
|
-
|
|
31
|
-
test.describe('Users API', () => {
|
|
32
|
-
test('creates user', async ({ request }) => {
|
|
33
|
-
const response = await request.post('/api/users', {
|
|
34
|
-
data: { name: 'John Doe', email: 'john@example.com', role: 'user' },
|
|
35
|
-
});
|
|
36
|
-
expect(response.status()).toBe(201);
|
|
37
|
-
const user = await response.json();
|
|
38
|
-
expect(user.id).toBeDefined();
|
|
39
|
-
expect(user.email).toBe('john@example.com');
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
test('returns 404 for missing user', async ({ request }) => {
|
|
43
|
-
const response = await request.get('/api/users/nonexistent');
|
|
44
|
-
expect(response.status()).toBe(404);
|
|
45
|
-
const error = await response.json();
|
|
46
|
-
expect(error.code).toBe('USER_NOT_FOUND');
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
test('validates required fields', async ({ request }) => {
|
|
50
|
-
const response = await request.post('/api/users', {
|
|
51
|
-
data: { name: 'Missing Email' },
|
|
52
|
-
});
|
|
53
|
-
expect(response.status()).toBe(400);
|
|
54
|
-
const error = await response.json();
|
|
55
|
-
expect(error.code).toBe('VALIDATION_ERROR');
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Schema Validation with Zod
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
import { z } from 'zod';
|
|
64
|
-
|
|
65
|
-
const OrderSchema = z.object({
|
|
66
|
-
id: z.string().uuid(),
|
|
67
|
-
userId: z.string(),
|
|
68
|
-
items: z.array(z.object({
|
|
69
|
-
productId: z.string(),
|
|
70
|
-
quantity: z.number().positive(),
|
|
71
|
-
price: z.number().positive(),
|
|
72
|
-
})),
|
|
73
|
-
total: z.number().positive(),
|
|
74
|
-
status: z.enum(['pending', 'processing', 'shipped', 'delivered']),
|
|
75
|
-
createdAt: z.string().datetime(),
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
test('creates order with valid schema', async ({ request }) => {
|
|
79
|
-
const response = await request.post('/api/orders', {
|
|
80
|
-
data: {
|
|
81
|
-
userId: 'user-123',
|
|
82
|
-
items: [{ productId: 'prod-1', quantity: 2, price: 29.99 }],
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
expect(response.status()).toBe(201);
|
|
86
|
-
const body = await response.json();
|
|
87
|
-
const parsed = OrderSchema.parse(body); // Throws if schema mismatch
|
|
88
|
-
expect(parsed.status).toBe('pending');
|
|
89
|
-
});
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### Error Response Validation
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
test.describe('Error handling', () => {
|
|
96
|
-
test('handles duplicate email (409)', async ({ request }) => {
|
|
97
|
-
await request.post('/api/users', { data: { email: 'dup@test.com' } });
|
|
98
|
-
const dup = await request.post('/api/users', { data: { email: 'dup@test.com' } });
|
|
99
|
-
expect(dup.status()).toBe(409);
|
|
100
|
-
const error = await dup.json();
|
|
101
|
-
expect(error.message).toContain('already exists');
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
test('handles malformed JSON (400)', async ({ request }) => {
|
|
105
|
-
const response = await request.post('/api/users', {
|
|
106
|
-
headers: { 'Content-Type': 'application/json' },
|
|
107
|
-
data: 'not-json',
|
|
108
|
-
});
|
|
109
|
-
expect(response.status()).toBe(400);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
test('handles rate limiting (429)', async ({ request }) => {
|
|
113
|
-
// Trigger rate limit
|
|
114
|
-
for (let i = 0; i < 100; i++) {
|
|
115
|
-
await request.get('/api/users');
|
|
116
|
-
}
|
|
117
|
-
const response = await request.get('/api/users');
|
|
118
|
-
expect(response.status()).toBe(429);
|
|
119
|
-
expect(response.headers()['retry-after']).toBeDefined();
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Authentication in API Tests
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
test.describe('Authenticated API', () => {
|
|
128
|
-
let authToken: string;
|
|
129
|
-
|
|
130
|
-
test.beforeAll(async ({ request }) => {
|
|
131
|
-
const res = await request.post('/api/auth/login', {
|
|
132
|
-
data: { email: process.env.TEST_USER_EMAIL, password: process.env.TEST_USER_PASSWORD },
|
|
133
|
-
});
|
|
134
|
-
authToken = (await res.json()).token;
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
test('accesses protected endpoint', async ({ request }) => {
|
|
138
|
-
const response = await request.get('/api/me', {
|
|
139
|
-
headers: { Authorization: `Bearer ${authToken}` },
|
|
140
|
-
});
|
|
141
|
-
expect(response.status()).toBe(200);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
test('rejects missing token', async ({ request }) => {
|
|
145
|
-
const response = await request.get('/api/me');
|
|
146
|
-
expect(response.status()).toBe(401);
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
test('rejects insufficient role', async ({ request }) => {
|
|
150
|
-
const response = await request.get('/api/admin/users', {
|
|
151
|
-
headers: { Authorization: `Bearer ${authToken}` },
|
|
152
|
-
});
|
|
153
|
-
expect(response.status()).toBe(403);
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### API-Only Playwright Config
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
export default defineConfig({
|
|
162
|
-
testDir: './tests/api',
|
|
163
|
-
use: {
|
|
164
|
-
baseURL: process.env.API_URL || 'http://localhost:3000',
|
|
165
|
-
extraHTTPHeaders: { Accept: 'application/json' },
|
|
166
|
-
},
|
|
167
|
-
timeout: 30000,
|
|
168
|
-
workers: 4,
|
|
169
|
-
fullyParallel: true,
|
|
170
|
-
});
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## Anti-Patterns
|
|
174
|
-
|
|
175
|
-
1. **Testing APIs through UI** -- Filling a form and clicking submit to test user
|
|
176
|
-
creation validates the UI, not the API. Test the API directly.
|
|
177
|
-
|
|
178
|
-
2. **No dedicated API test suite** -- Assuming E2E tests cover the API. E2E tests one
|
|
179
|
-
happy path; API tests cover edge cases, error codes, and validation.
|
|
180
|
-
|
|
181
|
-
3. **Hardcoded test data** -- Static emails and IDs cause parallel test collisions.
|
|
182
|
-
Use factory functions with unique values.
|
|
183
|
-
|
|
184
|
-
4. **Ignoring error responses** -- Only testing 200 responses. Test 400, 401, 403, 404,
|
|
185
|
-
409, 429, and 500 scenarios explicitly.
|
|
186
|
-
|
|
187
|
-
5. **No schema validation** -- Trusting response shapes without runtime verification.
|
|
188
|
-
Use Zod or AJV to validate response structures.
|
|
189
|
-
|
|
190
|
-
## Integration Points
|
|
191
|
-
|
|
192
|
-
- **Workflows**: `test-design` (API test planning), `test-automation` (API test generation),
|
|
193
|
-
`atdd` (acceptance criteria via API)
|
|
194
|
-
- **Related fragments**: `test-pyramid` (API tests are integration level),
|
|
195
|
-
`data-factories` (test data for API requests), `contract-testing` (Pact for service
|
|
196
|
-
contracts)
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: data-factories
|
|
3
|
-
tier: extended
|
|
4
|
-
version: '1.0'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Data Factories
|
|
8
|
-
|
|
9
|
-
## Principle
|
|
10
|
-
|
|
11
|
-
Prefer factory functions that accept overrides and return complete objects. Seed test
|
|
12
|
-
state through APIs or direct DB helpers before visiting the UI -- never via slow UI
|
|
13
|
-
interactions. The UI is for validation only, not data setup. Factories should generate
|
|
14
|
-
unique, parallel-safe data with explicit overrides that reveal test intent.
|
|
15
|
-
|
|
16
|
-
## Rationale
|
|
17
|
-
|
|
18
|
-
Static fixtures (JSON files, hardcoded objects) create brittle tests that fail when
|
|
19
|
-
schemas evolve, cause collisions in parallel execution, and hide test intent. Dynamic
|
|
20
|
-
factories with overrides provide parallel safety (UUIDs prevent collisions), schema
|
|
21
|
-
evolution (defaults adapt automatically), explicit intent (overrides show what matters),
|
|
22
|
-
and speed (API seeding is 10-50x faster than UI).
|
|
23
|
-
|
|
24
|
-
## Pattern Examples
|
|
25
|
-
|
|
26
|
-
### Factory Function with Overrides
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
// test-utils/factories/user-factory.ts
|
|
30
|
-
import { faker } from '@faker-js/faker';
|
|
31
|
-
|
|
32
|
-
type User = {
|
|
33
|
-
id: string;
|
|
34
|
-
email: string;
|
|
35
|
-
name: string;
|
|
36
|
-
role: 'user' | 'admin' | 'moderator';
|
|
37
|
-
createdAt: Date;
|
|
38
|
-
isActive: boolean;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const createUser = (overrides: Partial<User> = {}): User => ({
|
|
42
|
-
id: faker.string.uuid(),
|
|
43
|
-
email: faker.internet.email(),
|
|
44
|
-
name: faker.person.fullName(),
|
|
45
|
-
role: 'user',
|
|
46
|
-
createdAt: new Date(),
|
|
47
|
-
isActive: true,
|
|
48
|
-
...overrides,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
// Usage -- override shows intent
|
|
52
|
-
const admin = createUser({ role: 'admin' });
|
|
53
|
-
const inactive = createUser({ isActive: false });
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Nested Factory Pattern (Relationships)
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { createUser } from './user-factory';
|
|
60
|
-
import { createProduct } from './product-factory';
|
|
61
|
-
|
|
62
|
-
type OrderItem = { product: Product; quantity: number; price: number };
|
|
63
|
-
type Order = { id: string; user: User; items: OrderItem[]; total: number; status: string };
|
|
64
|
-
|
|
65
|
-
export const createOrderItem = (overrides: Partial<OrderItem> = {}): OrderItem => {
|
|
66
|
-
const product = overrides.product || createProduct();
|
|
67
|
-
const quantity = overrides.quantity || faker.number.int({ min: 1, max: 5 });
|
|
68
|
-
return { product, quantity, price: product.price * quantity, ...overrides };
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const createOrder = (overrides: Partial<Order> = {}): Order => {
|
|
72
|
-
const items = overrides.items || [createOrderItem(), createOrderItem()];
|
|
73
|
-
const total = items.reduce((sum, item) => sum + item.price, 0);
|
|
74
|
-
return {
|
|
75
|
-
id: faker.string.uuid(),
|
|
76
|
-
user: overrides.user || createUser(),
|
|
77
|
-
items,
|
|
78
|
-
total,
|
|
79
|
-
status: 'pending',
|
|
80
|
-
...overrides,
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### Composed Specialized Factories
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
// Compose from base -- do not duplicate
|
|
89
|
-
export const createAdminUser = (overrides: Partial<User> = {}) =>
|
|
90
|
-
createUser({ role: 'admin', ...overrides });
|
|
91
|
-
|
|
92
|
-
export const createProAccount = (overrides: Partial<Account> = {}) =>
|
|
93
|
-
createAccount({
|
|
94
|
-
plan: 'pro',
|
|
95
|
-
features: ['analytics', 'priority-support'],
|
|
96
|
-
maxUsers: 10,
|
|
97
|
-
...overrides,
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
// Test intent is immediately clear
|
|
101
|
-
test('pro accounts access analytics', async ({ page, apiRequest }) => {
|
|
102
|
-
const admin = createAdminUser();
|
|
103
|
-
const account = createProAccount({ owner: admin });
|
|
104
|
-
await apiRequest({ method: 'POST', url: '/api/accounts', data: account });
|
|
105
|
-
await page.goto('/analytics');
|
|
106
|
-
await expect(page.getByText('Advanced Analytics')).toBeVisible();
|
|
107
|
-
});
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### API Seeding Helper
|
|
111
|
-
|
|
112
|
-
```typescript
|
|
113
|
-
// helpers/seed-helpers.ts
|
|
114
|
-
export async function seedUser(
|
|
115
|
-
request: APIRequestContext,
|
|
116
|
-
overrides: Partial<User> = {}
|
|
117
|
-
): Promise<User> {
|
|
118
|
-
const user = createUser(overrides);
|
|
119
|
-
const response = await request.post('/api/users', { data: user });
|
|
120
|
-
if (!response.ok()) throw new Error(`Seed failed: ${response.status()}`);
|
|
121
|
-
return user;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// Cleanup pattern
|
|
125
|
-
const createdIds: string[] = [];
|
|
126
|
-
afterEach(async ({ request }) => {
|
|
127
|
-
for (const id of createdIds) {
|
|
128
|
-
await request.delete(`/api/users/${id}`);
|
|
129
|
-
}
|
|
130
|
-
createdIds.length = 0;
|
|
131
|
-
});
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Anti-Patterns
|
|
135
|
-
|
|
136
|
-
1. **Hardcoded test data** -- `email: 'test@test.com'` causes collisions in parallel
|
|
137
|
-
runs. Use faker with unique values per test.
|
|
138
|
-
|
|
139
|
-
2. **Static JSON fixtures** -- `fixtures/users.json` with fixed IDs breaks when schemas
|
|
140
|
-
change or tests run in parallel. Use factory functions.
|
|
141
|
-
|
|
142
|
-
3. **UI-based data setup** -- Filling forms to create test data is 10-50x slower than
|
|
143
|
-
API calls. Use the UI only for validation.
|
|
144
|
-
|
|
145
|
-
4. **Hidden test intent** -- `createUser()` with no overrides when the test cares about
|
|
146
|
-
a specific role. Always override the fields the test depends on.
|
|
147
|
-
|
|
148
|
-
5. **No schema evolution strategy** -- When a required field is added to the schema, every
|
|
149
|
-
test with static data breaks. Factories centralize defaults -- update once, all tests
|
|
150
|
-
adapt.
|
|
151
|
-
|
|
152
|
-
## Integration Points
|
|
153
|
-
|
|
154
|
-
- **Workflows**: `test-framework` (factory scaffold), `test-automation` (factory usage in
|
|
155
|
-
generated tests)
|
|
156
|
-
- **Related fragments**: `fixture-architecture` (factories used inside fixtures),
|
|
157
|
-
`test-isolation` (per-test data prevents state leaks), `api-testing-patterns` (API
|
|
158
|
-
seeding patterns)
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: risk-governance
|
|
3
|
-
tier: extended
|
|
4
|
-
version: '1.0'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Risk Governance
|
|
8
|
-
|
|
9
|
-
## Principle
|
|
10
|
-
|
|
11
|
-
Risk governance transforms subjective "should we ship?" debates into objective,
|
|
12
|
-
data-driven decisions. Score risk as probability (1-3) times impact (1-3) for a total
|
|
13
|
-
of 1-9. Scores of 6 or above demand documented mitigation. A score of 9 blocks the
|
|
14
|
-
release. Every acceptance criterion maps to a test, and gaps require explicit waivers.
|
|
15
|
-
|
|
16
|
-
## Rationale
|
|
17
|
-
|
|
18
|
-
Without formal risk governance, releases become political -- loud voices win, quiet risks
|
|
19
|
-
hide, and teams discover critical issues in production. Risk scoring creates shared
|
|
20
|
-
language, removes ambiguity, identifies true blockers early, distributes responsibility
|
|
21
|
-
with owners and deadlines, and creates an audit trail for compliance (SOC2, ISO, FDA).
|
|
22
|
-
|
|
23
|
-
## Pattern Examples
|
|
24
|
-
|
|
25
|
-
### Risk Scoring Matrix
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
type RiskScore = {
|
|
29
|
-
id: string;
|
|
30
|
-
category: 'TECH' | 'SEC' | 'PERF' | 'DATA' | 'BUS' | 'OPS';
|
|
31
|
-
title: string;
|
|
32
|
-
probability: 1 | 2 | 3; // 1=Low, 2=Medium, 3=High
|
|
33
|
-
impact: 1 | 2 | 3; // 1=Low, 2=Medium, 3=High
|
|
34
|
-
score: number; // probability * impact (1-9)
|
|
35
|
-
owner: string;
|
|
36
|
-
mitigationPlan?: string;
|
|
37
|
-
status: 'OPEN' | 'MITIGATED' | 'WAIVED' | 'ACCEPTED';
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
function classifyRisk(score: number): 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' {
|
|
41
|
-
if (score === 9) return 'CRITICAL'; // Blocks release
|
|
42
|
-
if (score >= 6) return 'HIGH'; // Requires mitigation plan
|
|
43
|
-
if (score >= 4) return 'MEDIUM'; // Monitor
|
|
44
|
-
return 'LOW'; // Accept
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Gate Decision Framework
|
|
49
|
-
|
|
50
|
-
```typescript
|
|
51
|
-
type GateDecision = 'PASS' | 'CONCERNS' | 'FAIL' | 'WAIVED';
|
|
52
|
-
|
|
53
|
-
function evaluateGate(risks: RiskScore[], coverageGaps: CoverageGap[]): GateDecision {
|
|
54
|
-
const criticalOpen = risks.filter(r => r.score === 9 && r.status === 'OPEN');
|
|
55
|
-
const highOpen = risks.filter(r => r.score >= 6 && r.score < 9 && r.status === 'OPEN');
|
|
56
|
-
const unresolvedGaps = coverageGaps.filter(g => !g.waiverReason);
|
|
57
|
-
|
|
58
|
-
// FAIL: Any critical (9) open risk or unresolved coverage gap
|
|
59
|
-
if (criticalOpen.length > 0 || unresolvedGaps.length > 0) return 'FAIL';
|
|
60
|
-
|
|
61
|
-
// CONCERNS: High risks (6-8) exist but have mitigation plans and owners
|
|
62
|
-
if (highOpen.length > 0 && highOpen.every(r => r.mitigationPlan && r.owner)) {
|
|
63
|
-
return 'CONCERNS';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// PASS: No critical issues, all high risks mitigated
|
|
67
|
-
return 'PASS';
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Coverage Traceability
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
type CoverageGap = {
|
|
75
|
-
acceptanceCriteria: string;
|
|
76
|
-
testMissing: string;
|
|
77
|
-
priority: 'P0' | 'P1' | 'P2' | 'P3';
|
|
78
|
-
waiverReason?: string;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
function validateCoverage(
|
|
82
|
-
criteria: AcceptanceCriterion[],
|
|
83
|
-
tests: TestCase[]
|
|
84
|
-
): { gaps: CoverageGap[]; passRate: number } {
|
|
85
|
-
const gaps = criteria
|
|
86
|
-
.filter(ac => !tests.some(t => t.criteriaIds.includes(ac.id)))
|
|
87
|
-
.map(ac => ({
|
|
88
|
-
acceptanceCriteria: ac.criterion,
|
|
89
|
-
testMissing: `Missing test for: ${ac.criterion}`,
|
|
90
|
-
priority: ac.priority,
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
const passRate = ((criteria.length - gaps.length) / criteria.length) * 100;
|
|
94
|
-
return { gaps, passRate };
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Anti-Patterns
|
|
99
|
-
|
|
100
|
-
1. **No scoring system** -- "I think it's fine" is not risk management. Use the
|
|
101
|
-
probability x impact matrix consistently.
|
|
102
|
-
|
|
103
|
-
2. **Unowned risks** -- Risks without assigned owners never get mitigated. Every risk
|
|
104
|
-
scoring 4 or above needs a named owner and a deadline.
|
|
105
|
-
|
|
106
|
-
3. **Waivers without expiry** -- Permanent waivers accumulate tech debt silently. Every
|
|
107
|
-
waiver needs an approver, a reason, and an expiry date.
|
|
108
|
-
|
|
109
|
-
4. **Coverage gaps without waivers** -- Untested acceptance criteria that nobody has
|
|
110
|
-
explicitly accepted as a risk. Make the decision visible.
|
|
111
|
-
|
|
112
|
-
5. **Gate theater** -- Running gates but always overriding failures. If the gate never
|
|
113
|
-
blocks, it provides no value. Enforce the gate or remove it.
|
|
114
|
-
|
|
115
|
-
## Integration Points
|
|
116
|
-
|
|
117
|
-
- **Workflows**: `test-design` (risk identification), `nfr-assessment` (risk scoring)
|
|
118
|
-
- **Related fragments**: `test-pyramid` (risk-based level selection),
|
|
119
|
-
`api-testing-patterns` (testing high-risk API paths)
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: selector-resilience
|
|
3
|
-
tier: extended
|
|
4
|
-
version: '1.0'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Selector Resilience
|
|
8
|
-
|
|
9
|
-
## Principle
|
|
10
|
-
|
|
11
|
-
Robust selectors follow a strict hierarchy: data-testid (best) > ARIA roles (good) >
|
|
12
|
-
text content (acceptable) > CSS classes/IDs (last resort). Selectors must survive UI
|
|
13
|
-
changes (styling, layout, content updates) and remain human-readable for maintenance.
|
|
14
|
-
|
|
15
|
-
## Rationale
|
|
16
|
-
|
|
17
|
-
Brittle selectors (CSS classes, nth-child, complex XPath) break when UI styling changes,
|
|
18
|
-
elements are reordered, or design updates occur. This causes a test maintenance burden
|
|
19
|
-
and false negatives. Semantic selectors that reflect user intent (ARIA roles, accessible
|
|
20
|
-
names, test IDs) are resilient, improve accessibility, and self-document what the test
|
|
21
|
-
is verifying.
|
|
22
|
-
|
|
23
|
-
## Pattern Examples
|
|
24
|
-
|
|
25
|
-
### Selector Hierarchy
|
|
26
|
-
|
|
27
|
-
```typescript
|
|
28
|
-
// LEVEL 1: data-testid (BEST -- survives all UI changes)
|
|
29
|
-
await page.getByTestId('email-input').fill('user@example.com');
|
|
30
|
-
await page.getByTestId('login-button').click();
|
|
31
|
-
|
|
32
|
-
// LEVEL 2: ARIA roles (GOOD -- enforces accessibility)
|
|
33
|
-
await page.getByRole('textbox', { name: 'Email' }).fill('user@example.com');
|
|
34
|
-
await page.getByRole('button', { name: 'Sign In' }).click();
|
|
35
|
-
|
|
36
|
-
// LEVEL 3: Text content (ACCEPTABLE -- user-centric)
|
|
37
|
-
await page.getByText('Create New Order').click();
|
|
38
|
-
|
|
39
|
-
// LEVEL 4: CSS/ID (LAST RESORT -- brittle)
|
|
40
|
-
// await page.locator('.btn-primary').click(); // Breaks with design updates
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Dynamic Content Patterns
|
|
44
|
-
|
|
45
|
-
```typescript
|
|
46
|
-
// Regex for variable content (IDs, timestamps)
|
|
47
|
-
await expect(page.getByText(/User \d+/)).toBeVisible();
|
|
48
|
-
await expect(page.getByText(/Last login: \d{4}-\d{2}-\d{2}/)).toBeVisible();
|
|
49
|
-
|
|
50
|
-
// Filter instead of nth() -- content-based, not index-based
|
|
51
|
-
await page.locator('[data-testid="product-card"]')
|
|
52
|
-
.filter({ hasText: 'Premium Plan' })
|
|
53
|
-
.click();
|
|
54
|
-
|
|
55
|
-
// Scoped locators for disambiguation
|
|
56
|
-
const shippingSection = page.getByTestId('shipping-section');
|
|
57
|
-
await shippingSection.getByLabel('City').fill('New York');
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Refactoring Guide (Before/After)
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
// CSS class -> data-testid
|
|
64
|
-
// BEFORE: await page.locator('.bg-blue-500.px-4.rounded').click()
|
|
65
|
-
// AFTER:
|
|
66
|
-
await page.getByTestId('add-to-cart-button').click();
|
|
67
|
-
|
|
68
|
-
// nth() index -> filter()
|
|
69
|
-
// BEFORE: await page.locator('.user-row').nth(2).click()
|
|
70
|
-
// AFTER:
|
|
71
|
-
await page.locator('[data-testid="user-row"]')
|
|
72
|
-
.filter({ hasText: 'john@example.com' }).click();
|
|
73
|
-
|
|
74
|
-
// Complex XPath -> ARIA role
|
|
75
|
-
// BEFORE: await page.locator('xpath=//div[@id="payment"]//form//button').click()
|
|
76
|
-
// AFTER:
|
|
77
|
-
await page.getByRole('button', { name: 'Complete Payment' }).click();
|
|
78
|
-
|
|
79
|
-
// Deep nesting -> scoped data-testid
|
|
80
|
-
// BEFORE: await page.locator('.container .sidebar .menu .item:nth-child(3) a').click()
|
|
81
|
-
// AFTER:
|
|
82
|
-
const sidebar = page.getByTestId('sidebar');
|
|
83
|
-
await sidebar.getByRole('link', { name: 'Settings' }).click();
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Anti-Patterns
|
|
87
|
-
|
|
88
|
-
1. **CSS class selectors** -- `.btn-primary`, `.form-input-lg` break with every design
|
|
89
|
-
system update or Tailwind class change.
|
|
90
|
-
|
|
91
|
-
2. **Arbitrary nth() indexes** -- `.product-card:nth(3)` breaks when items are reordered,
|
|
92
|
-
added, or removed. Use `filter({ hasText })` instead.
|
|
93
|
-
|
|
94
|
-
3. **Complex XPath** -- `//div[@class="container"]//section[2]//button` is unreadable
|
|
95
|
-
and breaks with any HTML restructuring.
|
|
96
|
-
|
|
97
|
-
4. **HTML ID selectors** -- `#user-settings-form` seems stable but IDs change during
|
|
98
|
-
accessibility improvements or component refactoring.
|
|
99
|
-
|
|
100
|
-
5. **No scoping** -- Selecting `getByLabel('Name')` without scoping fails when multiple
|
|
101
|
-
forms have a "Name" field. Scope with `getByTestId('shipping-form').getByLabel('Name')`.
|
|
102
|
-
|
|
103
|
-
## Integration Points
|
|
104
|
-
|
|
105
|
-
- **Workflows**: `test-automation` (generate tests with robust selectors), `test-review`
|
|
106
|
-
(selector quality audit)
|
|
107
|
-
- **Related fragments**: `test-healing` (selector fallback strategies),
|
|
108
|
-
`deterministic-testing` (stable selectors prevent flakiness),
|
|
109
|
-
`fixture-architecture` (fixtures as alternative to page objects)
|