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,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'mobile-dev'
|
|
3
|
-
extends: _base-dev
|
|
4
|
-
description: 'Talia — Mobile Developer. React Native/Swift/Kotlin mobile-first specialist.'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You must fully embody this agent's persona and follow the activation protocol EXACTLY.
|
|
8
|
-
This agent EXTENDS _base-dev — load and follow all shared behavior from _base-dev.md first.
|
|
9
|
-
|
|
10
|
-
<agent id="mobile-dev" name="Talia" title="Mobile Developer" icon="📱"
|
|
11
|
-
extends="_base-dev"
|
|
12
|
-
capabilities="React Native, Swift, Kotlin, mobile-first development">
|
|
13
|
-
|
|
14
|
-
<activation critical="MANDATORY">
|
|
15
|
-
<step n="1">LOAD {project-root}/_gaia/dev/agents/_base-dev.md — internalize shared behavior</step>
|
|
16
|
-
<step n="2">This file adds stack-specific persona and knowledge — merge with base</step>
|
|
17
|
-
<step n="3">Load {project-root}/_gaia/dev/config.yaml</step>
|
|
18
|
-
<step n="4">Load {project-root}/_gaia/lifecycle/config.yaml</step>
|
|
19
|
-
<step n="5">Greet user as Talia, show menu</step>
|
|
20
|
-
<step n="6">WAIT for user input</step>
|
|
21
|
-
<step n="7">Match input to menu item or story key</step>
|
|
22
|
-
<step n="8">Execute handler</step>
|
|
23
|
-
</activation>
|
|
24
|
-
|
|
25
|
-
<memory sidecar="_memory/mobile-dev-sidecar/decision-log.md" />
|
|
26
|
-
|
|
27
|
-
<persona>
|
|
28
|
-
<role>Mobile-first developer specializing in cross-platform and native</role>
|
|
29
|
-
<identity>Mobile-first developer. Expert in React Native cross-platform and native iOS/Android.</identity>
|
|
30
|
-
<communication_style>UX-conscious. Thinks in screens, gestures, and platform conventions. Platform-appropriate.</communication_style>
|
|
31
|
-
<principles>
|
|
32
|
-
- Platform conventions matter
|
|
33
|
-
- Offline-first when possible
|
|
34
|
-
- Performance is UX
|
|
35
|
-
- Accessibility is not optional
|
|
36
|
-
</principles>
|
|
37
|
-
</persona>
|
|
38
|
-
|
|
39
|
-
<stack-config>
|
|
40
|
-
stack: mobile
|
|
41
|
-
stack_focus: [react-native, swift, kotlin]
|
|
42
|
-
knowledge_tier: [core, mobile]
|
|
43
|
-
skills: [git-workflow, testing-patterns, security-basics]
|
|
44
|
-
</stack-config>
|
|
45
|
-
|
|
46
|
-
<knowledge-sources>
|
|
47
|
-
<fragment path="_gaia/dev/knowledge/mobile/react-native-patterns.md" />
|
|
48
|
-
<fragment path="_gaia/dev/knowledge/mobile/swift-patterns.md" />
|
|
49
|
-
<fragment path="_gaia/dev/knowledge/mobile/kotlin-patterns.md" />
|
|
50
|
-
<fragment path="_gaia/dev/knowledge/mobile/mobile-testing.md" />
|
|
51
|
-
</knowledge-sources>
|
|
52
|
-
|
|
53
|
-
<menu>
|
|
54
|
-
<item cmd="1" label="Dev Story" description="Implement a user story" workflow="lifecycle/workflows/4-implementation/dev-story/workflow.yaml" />
|
|
55
|
-
<item cmd="2" label="Code Review" description="Review implemented code" workflow="lifecycle/workflows/4-implementation/code-review/workflow.yaml" />
|
|
56
|
-
<item cmd="3" label="Quick Dev" description="Implement a quick spec" workflow="lifecycle/workflows/quick-flow/quick-dev/workflow.yaml" />
|
|
57
|
-
</menu>
|
|
58
|
-
|
|
59
|
-
<greeting>
|
|
60
|
-
Hey! Talia here — mobile developer.
|
|
61
|
-
|
|
62
|
-
**What are we shipping?**
|
|
63
|
-
1. **Dev Story** — implement a user story (TDD)
|
|
64
|
-
2. **Code Review** — review implemented code
|
|
65
|
-
3. **Quick Dev** — implement a quick spec
|
|
66
|
-
|
|
67
|
-
Drop a story key or pick from the menu.
|
|
68
|
-
</greeting>
|
|
69
|
-
|
|
70
|
-
</agent>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'python-dev'
|
|
3
|
-
extends: _base-dev
|
|
4
|
-
description: 'Ravi — Python Developer. Django/FastAPI/data pipeline specialist.'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You must fully embody this agent's persona and follow the activation protocol EXACTLY.
|
|
8
|
-
This agent EXTENDS _base-dev — load and follow all shared behavior from _base-dev.md first.
|
|
9
|
-
|
|
10
|
-
<agent id="python-dev" name="Ravi" title="Python Developer" icon="💻"
|
|
11
|
-
extends="_base-dev"
|
|
12
|
-
capabilities="Django, FastAPI, SQLAlchemy, data pipelines">
|
|
13
|
-
|
|
14
|
-
<activation critical="MANDATORY">
|
|
15
|
-
<step n="1">LOAD {project-root}/_gaia/dev/agents/_base-dev.md — internalize shared behavior</step>
|
|
16
|
-
<step n="2">This file adds stack-specific persona and knowledge — merge with base</step>
|
|
17
|
-
<step n="3">Load {project-root}/_gaia/dev/config.yaml</step>
|
|
18
|
-
<step n="4">Load {project-root}/_gaia/lifecycle/config.yaml</step>
|
|
19
|
-
<step n="5">Greet user as Ravi, show menu</step>
|
|
20
|
-
<step n="6">WAIT for user input</step>
|
|
21
|
-
<step n="7">Match input to menu item or story key</step>
|
|
22
|
-
<step n="8">Execute handler</step>
|
|
23
|
-
</activation>
|
|
24
|
-
|
|
25
|
-
<memory sidecar="_memory/python-dev-sidecar/decision-log.md" />
|
|
26
|
-
|
|
27
|
-
<persona>
|
|
28
|
-
<role>Python engineer specializing in web backends and data processing</role>
|
|
29
|
-
<identity>Python engineer specializing in web backends and data processing. Expert in Django, FastAPI, SQLAlchemy.</identity>
|
|
30
|
-
<communication_style>Pragmatic and Pythonic. Favors readability. Quotes the Zen of Python.</communication_style>
|
|
31
|
-
<principles>
|
|
32
|
-
- Readability counts
|
|
33
|
-
- Explicit is better than implicit
|
|
34
|
-
- Flat is better than nested
|
|
35
|
-
- Simple is better than complex
|
|
36
|
-
</principles>
|
|
37
|
-
</persona>
|
|
38
|
-
|
|
39
|
-
<stack-config>
|
|
40
|
-
stack: python
|
|
41
|
-
stack_focus: [django, fastapi, data-pipelines]
|
|
42
|
-
knowledge_tier: [core, python]
|
|
43
|
-
skills: [git-workflow, testing-patterns, api-design, docker-workflow, database-design]
|
|
44
|
-
</stack-config>
|
|
45
|
-
|
|
46
|
-
<knowledge-sources>
|
|
47
|
-
<fragment path="_gaia/dev/knowledge/python/django-patterns.md" />
|
|
48
|
-
<fragment path="_gaia/dev/knowledge/python/fastapi-patterns.md" />
|
|
49
|
-
<fragment path="_gaia/dev/knowledge/python/data-pipelines.md" />
|
|
50
|
-
<fragment path="_gaia/dev/knowledge/python/python-conventions.md" />
|
|
51
|
-
</knowledge-sources>
|
|
52
|
-
|
|
53
|
-
<menu>
|
|
54
|
-
<item cmd="1" label="Dev Story" description="Implement a user story" workflow="lifecycle/workflows/4-implementation/dev-story/workflow.yaml" />
|
|
55
|
-
<item cmd="2" label="Code Review" description="Review implemented code" workflow="lifecycle/workflows/4-implementation/code-review/workflow.yaml" />
|
|
56
|
-
<item cmd="3" label="Quick Dev" description="Implement a quick spec" workflow="lifecycle/workflows/quick-flow/quick-dev/workflow.yaml" />
|
|
57
|
-
</menu>
|
|
58
|
-
|
|
59
|
-
<greeting>
|
|
60
|
-
Hello. Ravi here — Python developer.
|
|
61
|
-
|
|
62
|
-
**What shall we work on?**
|
|
63
|
-
1. **Dev Story** — implement a user story (TDD)
|
|
64
|
-
2. **Code Review** — review implemented code
|
|
65
|
-
3. **Quick Dev** — implement a quick spec
|
|
66
|
-
|
|
67
|
-
Share a story key or pick an option. Simple is better than complex.
|
|
68
|
-
</greeting>
|
|
69
|
-
|
|
70
|
-
</agent>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'typescript-dev'
|
|
3
|
-
extends: _base-dev
|
|
4
|
-
description: 'Cleo — TypeScript Developer. Full-stack React/Next.js/Express expert.'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
You must fully embody this agent's persona and follow the activation protocol EXACTLY.
|
|
8
|
-
This agent EXTENDS _base-dev — load and follow all shared behavior from _base-dev.md first.
|
|
9
|
-
|
|
10
|
-
<agent id="typescript-dev" name="Cleo" title="TypeScript Developer" icon="💻"
|
|
11
|
-
extends="_base-dev"
|
|
12
|
-
capabilities="React, Next.js, Express, Node.js, TypeScript">
|
|
13
|
-
|
|
14
|
-
<activation critical="MANDATORY">
|
|
15
|
-
<step n="1">LOAD {project-root}/_gaia/dev/agents/_base-dev.md — internalize shared behavior</step>
|
|
16
|
-
<step n="2">This file adds stack-specific persona and knowledge — merge with base</step>
|
|
17
|
-
<step n="3">Load {project-root}/_gaia/dev/config.yaml</step>
|
|
18
|
-
<step n="4">Load {project-root}/_gaia/lifecycle/config.yaml</step>
|
|
19
|
-
<step n="5">Greet user as Cleo, show menu</step>
|
|
20
|
-
<step n="6">WAIT for user input</step>
|
|
21
|
-
<step n="7">Match input to menu item or story key</step>
|
|
22
|
-
<step n="8">Execute handler</step>
|
|
23
|
-
</activation>
|
|
24
|
-
|
|
25
|
-
<memory sidecar="_memory/typescript-dev-sidecar/decision-log.md" />
|
|
26
|
-
|
|
27
|
-
<persona>
|
|
28
|
-
<role>Full-stack TypeScript engineer specializing in React ecosystem</role>
|
|
29
|
-
<identity>Expert in React, Next.js SSR/SSG, Express APIs, and Node.js backends. Deeply familiar with the TypeScript type system and modern JS tooling.</identity>
|
|
30
|
-
<communication_style>Ultra-succinct. Speaks in file paths and component names. No fluff. Types are documentation.</communication_style>
|
|
31
|
-
<principles>
|
|
32
|
-
- Type safety prevents bugs at compile time
|
|
33
|
-
- Server components by default, client only when interactive
|
|
34
|
-
- Prefer composition over inheritance
|
|
35
|
-
- Small, focused modules over large monoliths
|
|
36
|
-
</principles>
|
|
37
|
-
</persona>
|
|
38
|
-
|
|
39
|
-
<stack-config>
|
|
40
|
-
stack: typescript
|
|
41
|
-
stack_focus: [react, nextjs, express]
|
|
42
|
-
knowledge_tier: [core, typescript]
|
|
43
|
-
skills: [git-workflow, testing-patterns, api-design, docker-workflow]
|
|
44
|
-
</stack-config>
|
|
45
|
-
|
|
46
|
-
<knowledge-sources>
|
|
47
|
-
<fragment path="_gaia/dev/knowledge/typescript/react-patterns.md" />
|
|
48
|
-
<fragment path="_gaia/dev/knowledge/typescript/nextjs-patterns.md" />
|
|
49
|
-
<fragment path="_gaia/dev/knowledge/typescript/express-patterns.md" />
|
|
50
|
-
<fragment path="_gaia/dev/knowledge/typescript/ts-conventions.md" />
|
|
51
|
-
</knowledge-sources>
|
|
52
|
-
|
|
53
|
-
<menu>
|
|
54
|
-
<item cmd="1" label="Dev Story" description="Implement a user story" workflow="lifecycle/workflows/4-implementation/dev-story/workflow.yaml" />
|
|
55
|
-
<item cmd="2" label="Code Review" description="Review implemented code" workflow="lifecycle/workflows/4-implementation/code-review/workflow.yaml" />
|
|
56
|
-
<item cmd="3" label="Quick Dev" description="Implement a quick spec" workflow="lifecycle/workflows/quick-flow/quick-dev/workflow.yaml" />
|
|
57
|
-
</menu>
|
|
58
|
-
|
|
59
|
-
<greeting>
|
|
60
|
-
Hey. Cleo here — TypeScript dev.
|
|
61
|
-
|
|
62
|
-
**What do you need?**
|
|
63
|
-
1. **Dev Story** — implement a user story (TDD)
|
|
64
|
-
2. **Code Review** — review implemented code
|
|
65
|
-
3. **Quick Dev** — implement a quick spec
|
|
66
|
-
|
|
67
|
-
Or paste a story key and I'll pick it up.
|
|
68
|
-
</greeting>
|
|
69
|
-
|
|
70
|
-
</agent>
|
package/_gaia/dev/config.yaml
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Developer module config — inherits global
|
|
2
|
-
inherits: "{project-root}/_gaia/_config/global.yaml"
|
|
3
|
-
|
|
4
|
-
module_name: "dev"
|
|
5
|
-
module_version: "1.2.0"
|
|
6
|
-
|
|
7
|
-
agents_path: "{project-root}/_gaia/dev/agents"
|
|
8
|
-
skills_path: "{project-root}/_gaia/dev/skills"
|
|
9
|
-
custom_skills_path: "{project-root}/custom/skills"
|
|
10
|
-
knowledge_path: "{project-root}/_gaia/dev/knowledge"
|
|
11
|
-
skill_index: "{project-root}/_gaia/dev/skills/_skill-index.yaml"
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
stack,fragment,file,focus,description
|
|
2
|
-
angular,Angular Component Patterns,angular/angular-patterns.md,angular,Component architecture smart/dumb components lifecycle hooks change detection
|
|
3
|
-
angular,RxJS Observable Patterns,angular/rxjs-patterns.md,rxjs,Observable patterns operators subscription management avoiding memory leaks
|
|
4
|
-
angular,NgRx State Management,angular/ngrx-state.md,ngrx,Store patterns effects selectors entity adapter action hygiene
|
|
5
|
-
angular,Angular Style Guide and Conventions,angular/angular-conventions.md,angular,Angular style guide naming conventions project structure barrel exports
|
|
6
|
-
flutter,Flutter Widget Patterns,flutter/widget-patterns.md,flutter,Widget composition custom widgets keys render optimization const constructors
|
|
7
|
-
flutter,Flutter State Management,flutter/state-management.md,flutter,BLoC pattern Riverpod Provider comparison when to use each
|
|
8
|
-
flutter,Flutter Platform Channels,flutter/platform-channels.md,flutter,Method channels event channels native integration platform detection
|
|
9
|
-
flutter,Dart Language Conventions,flutter/dart-conventions.md,dart,Effective Dart null safety async/await patterns extension methods
|
|
10
|
-
java,Spring Boot Patterns,java/spring-boot-patterns.md,spring-boot,Auto-config profiles actuator dependency injection Bean lifecycle
|
|
11
|
-
java,JPA Entity and Repository Patterns,java/jpa-patterns.md,jpa,Entity mapping repositories query optimization N+1 problem fetch strategies
|
|
12
|
-
java,Microservices Patterns,java/microservices.md,microservices,Service decomposition circuit breakers saga pattern service discovery
|
|
13
|
-
java,Maven and Gradle Build Patterns,java/maven-gradle.md,build-tools,Multi-module builds dependency management plugins BOM
|
|
14
|
-
python,Django Application Patterns,python/django-patterns.md,django,Models class-based views serializers middleware signals admin customization
|
|
15
|
-
python,FastAPI Application Patterns,python/fastapi-patterns.md,fastapi,Pydantic models dependency injection async endpoints background tasks
|
|
16
|
-
python,Data Pipeline Patterns,python/data-pipelines.md,data-pipelines,ETL patterns pandas best practices async processing batch vs stream
|
|
17
|
-
python,Python Conventions and Standards,python/python-conventions.md,python,PEP 8 type hints virtual environments project structure pyproject.toml
|
|
18
|
-
typescript,React Component Patterns,typescript/react-patterns.md,react,Hooks context compound components performance optimization
|
|
19
|
-
typescript,Next.js Application Patterns,typescript/nextjs-patterns.md,nextjs,App router server components data fetching caching ISR route handlers
|
|
20
|
-
typescript,Express.js Application Patterns,typescript/express-patterns.md,express,Middleware chain routing error handling authentication request validation
|
|
21
|
-
typescript,TypeScript Conventions and Standards,typescript/ts-conventions.md,typescript,Strict mode utility types generics barrel exports path aliases
|
|
22
|
-
mobile,React Native Application Patterns,mobile/react-native-patterns.md,react-native,Navigation native modules Hermes engine performance FlatList optimization
|
|
23
|
-
mobile,Swift and SwiftUI Patterns,mobile/swift-patterns.md,swift,SwiftUI views Combine framework protocol-oriented programming memory management ARC
|
|
24
|
-
mobile,Kotlin Android Patterns,mobile/kotlin-patterns.md,kotlin,Coroutines Flow StateFlow Jetpack Compose dependency injection Hilt sealed classes
|
|
25
|
-
mobile,Mobile Testing Strategies,mobile/mobile-testing.md,mobile-testing,Device testing screenshot testing platform-specific testing Detox XCTest
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Angular Style Guide and Conventions
|
|
3
|
-
stack: angular
|
|
4
|
-
version: "1.0"
|
|
5
|
-
focus: [angular]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Angular Style Guide and Conventions
|
|
9
|
-
|
|
10
|
-
## Principle
|
|
11
|
-
|
|
12
|
-
Follow the official Angular style guide for consistent naming, file organization, and coding patterns. Use PascalCase for components and directives, camelCase for services and pipes, and organize code by feature module. Barrel exports simplify imports and enforce public API boundaries.
|
|
13
|
-
|
|
14
|
-
## Rationale
|
|
15
|
-
|
|
16
|
-
Consistent conventions reduce cognitive load across teams and projects. Angular's opinionated style guide exists because the framework's DI system, module system, and CLI tooling all assume these conventions. Deviating from them breaks `ng generate`, confuses new team members, and makes automated tooling unreliable.
|
|
17
|
-
|
|
18
|
-
## Pattern Examples
|
|
19
|
-
|
|
20
|
-
### Pattern 1: File and Class Naming
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
src/app/
|
|
24
|
-
features/
|
|
25
|
-
users/
|
|
26
|
-
components/
|
|
27
|
-
user-list/
|
|
28
|
-
user-list.component.ts # UserListComponent
|
|
29
|
-
user-list.component.html
|
|
30
|
-
user-list.component.scss
|
|
31
|
-
user-list.component.spec.ts
|
|
32
|
-
user-detail/
|
|
33
|
-
user-detail.component.ts # UserDetailComponent
|
|
34
|
-
services/
|
|
35
|
-
user.service.ts # UserService
|
|
36
|
-
user-api.service.ts # UserApiService
|
|
37
|
-
models/
|
|
38
|
-
user.model.ts # User (interface)
|
|
39
|
-
pipes/
|
|
40
|
-
user-role.pipe.ts # UserRolePipe
|
|
41
|
-
directives/
|
|
42
|
-
highlight.directive.ts # HighlightDirective
|
|
43
|
-
guards/
|
|
44
|
-
auth.guard.ts # authGuard (functional)
|
|
45
|
-
users.routes.ts # Route definitions
|
|
46
|
-
index.ts # Barrel export
|
|
47
|
-
shared/
|
|
48
|
-
components/
|
|
49
|
-
directives/
|
|
50
|
-
pipes/
|
|
51
|
-
index.ts
|
|
52
|
-
core/
|
|
53
|
-
interceptors/
|
|
54
|
-
auth.interceptor.ts # authInterceptor (functional)
|
|
55
|
-
services/
|
|
56
|
-
logger.service.ts # LoggerService
|
|
57
|
-
index.ts
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Pattern 2: Barrel Exports
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
// features/users/index.ts — public API of the users feature
|
|
64
|
-
export { UserListComponent } from './components/user-list/user-list.component';
|
|
65
|
-
export { UserDetailComponent } from './components/user-detail/user-detail.component';
|
|
66
|
-
export { UserService } from './services/user.service';
|
|
67
|
-
export { User } from './models/user.model';
|
|
68
|
-
|
|
69
|
-
// Do NOT export internal components, helpers, or private services.
|
|
70
|
-
// Consumers import from the barrel:
|
|
71
|
-
// import { UserService, User } from '@app/features/users';
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Pattern 3: Standalone Components with Lazy Loading
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
// users.routes.ts — lazy-loaded feature routes (Angular 15+)
|
|
78
|
-
import { Routes } from '@angular/router';
|
|
79
|
-
|
|
80
|
-
export const USERS_ROUTES: Routes = [
|
|
81
|
-
{
|
|
82
|
-
path: '',
|
|
83
|
-
loadComponent: () =>
|
|
84
|
-
import('./components/user-list/user-list.component')
|
|
85
|
-
.then(m => m.UserListComponent),
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
path: ':id',
|
|
89
|
-
loadComponent: () =>
|
|
90
|
-
import('./components/user-detail/user-detail.component')
|
|
91
|
-
.then(m => m.UserDetailComponent),
|
|
92
|
-
},
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
// app.routes.ts
|
|
96
|
-
export const APP_ROUTES: Routes = [
|
|
97
|
-
{
|
|
98
|
-
path: 'users',
|
|
99
|
-
loadChildren: () =>
|
|
100
|
-
import('./features/users/users.routes')
|
|
101
|
-
.then(m => m.USERS_ROUTES),
|
|
102
|
-
},
|
|
103
|
-
];
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Anti-Patterns
|
|
107
|
-
|
|
108
|
-
- **Flat src/app directory**: Dumping all components, services, and models into the root app directory. Organize by feature, then by type within each feature.
|
|
109
|
-
- **Inconsistent casing**: Mixing `userList.component.ts` with `UserList.component.ts`. Always use kebab-case for file names, PascalCase for classes.
|
|
110
|
-
- **Wildcard barrel exports**: Using `export * from './...'` leaks internal implementation details. Export explicitly.
|
|
111
|
-
- **Circular dependencies**: Feature A importing from Feature B which imports from Feature A. Use a shared module or refactor.
|
|
112
|
-
- **Single shared module**: One giant `SharedModule` that re-exports everything. Break into smaller focused modules or use standalone components.
|
|
113
|
-
|
|
114
|
-
## Integration Points
|
|
115
|
-
|
|
116
|
-
- **Angular CLI**: `ng generate` respects these conventions. Use `--flat=false` for directory-per-component.
|
|
117
|
-
- **Path Aliases**: Configure `tsconfig.json` paths (`@app/*`, `@shared/*`, `@core/*`) to match the directory structure.
|
|
118
|
-
- **ESLint**: Use `@angular-eslint` with naming-convention rules to enforce PascalCase for components and camelCase for services.
|
|
119
|
-
- **NgRx**: Feature state files follow the same feature directory structure: `features/users/store/` (see `ngrx-state.md`).
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Angular Component Patterns
|
|
3
|
-
stack: angular
|
|
4
|
-
version: "1.0"
|
|
5
|
-
focus: [angular]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Angular Component Patterns
|
|
9
|
-
|
|
10
|
-
## Principle
|
|
11
|
-
|
|
12
|
-
Design components using a strict smart/dumb (container/presentational) separation. Smart components manage state and orchestrate logic; dumb components receive data via `@Input()` and emit events via `@Output()`. This maximizes reusability, testability, and change detection efficiency.
|
|
13
|
-
|
|
14
|
-
## Rationale
|
|
15
|
-
|
|
16
|
-
Angular's change detection traverses the component tree on every cycle. By isolating side effects and state management into container components, presentational components can use `OnPush` change detection, dramatically reducing unnecessary re-renders. This architecture also makes unit testing straightforward since presentational components are pure functions of their inputs.
|
|
17
|
-
|
|
18
|
-
## Pattern Examples
|
|
19
|
-
|
|
20
|
-
### Pattern 1: Smart/Dumb Component Separation
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
// Smart (container) component — manages state, injects services
|
|
24
|
-
@Component({
|
|
25
|
-
selector: 'app-user-list-page',
|
|
26
|
-
template: `
|
|
27
|
-
<app-user-list
|
|
28
|
-
[users]="users$ | async"
|
|
29
|
-
[loading]="loading$ | async"
|
|
30
|
-
(userSelected)="onUserSelected($event)"
|
|
31
|
-
/>
|
|
32
|
-
`,
|
|
33
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
-
})
|
|
35
|
-
export class UserListPageComponent {
|
|
36
|
-
users$ = this.store.select(selectAllUsers);
|
|
37
|
-
loading$ = this.store.select(selectUsersLoading);
|
|
38
|
-
|
|
39
|
-
constructor(private store: Store) {
|
|
40
|
-
this.store.dispatch(loadUsers());
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
onUserSelected(user: User): void {
|
|
44
|
-
this.store.dispatch(selectUser({ userId: user.id }));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Dumb (presentational) component — pure inputs/outputs
|
|
49
|
-
@Component({
|
|
50
|
-
selector: 'app-user-list',
|
|
51
|
-
templateUrl: './user-list.component.html',
|
|
52
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
53
|
-
})
|
|
54
|
-
export class UserListComponent {
|
|
55
|
-
@Input() users: User[] = [];
|
|
56
|
-
@Input() loading = false;
|
|
57
|
-
@Output() userSelected = new EventEmitter<User>();
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Pattern 2: Lifecycle Hooks with Cleanup
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
@Component({
|
|
65
|
-
selector: 'app-dashboard',
|
|
66
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
67
|
-
})
|
|
68
|
-
export class DashboardComponent implements OnInit, OnDestroy {
|
|
69
|
-
private destroy$ = new Subject<void>();
|
|
70
|
-
|
|
71
|
-
ngOnInit(): void {
|
|
72
|
-
this.dataService.getMetrics()
|
|
73
|
-
.pipe(takeUntil(this.destroy$))
|
|
74
|
-
.subscribe(metrics => this.updateChart(metrics));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
ngOnDestroy(): void {
|
|
78
|
-
this.destroy$.next();
|
|
79
|
-
this.destroy$.complete();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Pattern 3: Content Projection for Flexible Layout
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
@Component({
|
|
88
|
-
selector: 'app-card',
|
|
89
|
-
template: `
|
|
90
|
-
<div class="card">
|
|
91
|
-
<div class="card-header">
|
|
92
|
-
<ng-content select="[card-title]" />
|
|
93
|
-
</div>
|
|
94
|
-
<div class="card-body">
|
|
95
|
-
<ng-content />
|
|
96
|
-
</div>
|
|
97
|
-
<div class="card-footer">
|
|
98
|
-
<ng-content select="[card-actions]" />
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
`,
|
|
102
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
103
|
-
})
|
|
104
|
-
export class CardComponent {}
|
|
105
|
-
|
|
106
|
-
// Usage
|
|
107
|
-
// <app-card>
|
|
108
|
-
// <h2 card-title>Title</h2>
|
|
109
|
-
// <p>Body content here</p>
|
|
110
|
-
// <button card-actions>Save</button>
|
|
111
|
-
// </app-card>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Anti-Patterns
|
|
115
|
-
|
|
116
|
-
- **God components**: Components that fetch data, transform it, and render complex templates. Split into smart + dumb.
|
|
117
|
-
- **Default change detection everywhere**: Leaving `ChangeDetectionStrategy.Default` on presentational components wastes cycles.
|
|
118
|
-
- **Direct DOM manipulation**: Using `document.querySelector` instead of `@ViewChild` or `Renderer2` breaks SSR and testability.
|
|
119
|
-
- **Subscribing in templates without `async` pipe**: Manual subscriptions in component classes without proper cleanup cause memory leaks.
|
|
120
|
-
|
|
121
|
-
## Integration Points
|
|
122
|
-
|
|
123
|
-
- **NgRx Store**: Smart components dispatch actions and select state via the store (see `ngrx-state.md`).
|
|
124
|
-
- **RxJS**: Observable streams power async data flow; see `rxjs-patterns.md` for operator guidance.
|
|
125
|
-
- **Angular Router**: Smart components often live at route boundaries; dumb components are nested within.
|
|
126
|
-
- **Angular CDK**: Use CDK primitives (overlay, drag-drop, virtual scroll) inside presentational components for complex UI behavior.
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: NgRx State Management
|
|
3
|
-
stack: angular
|
|
4
|
-
version: "1.0"
|
|
5
|
-
focus: [ngrx]
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# NgRx State Management
|
|
9
|
-
|
|
10
|
-
## Principle
|
|
11
|
-
|
|
12
|
-
Use NgRx as the single source of truth for application state. Follow strict action hygiene: actions describe unique events (not commands), reducers are pure functions, effects handle side effects, and selectors compose derived state. Keep the store normalized and flat.
|
|
13
|
-
|
|
14
|
-
## Rationale
|
|
15
|
-
|
|
16
|
-
NgRx enforces a unidirectional data flow that makes state changes predictable and debuggable via Redux DevTools. Action hygiene (naming actions as past-tense events from their source, e.g., `[User List] Load Users`) makes the action log a readable audit trail. Selectors with `createSelector` are memoized, preventing unnecessary recomputation and re-renders when combined with `OnPush` change detection.
|
|
17
|
-
|
|
18
|
-
## Pattern Examples
|
|
19
|
-
|
|
20
|
-
### Pattern 1: Action Hygiene and Reducer
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
// actions — named as "[Source] Event Description"
|
|
24
|
-
export const UsersApiActions = createActionGroup({
|
|
25
|
-
source: 'Users API',
|
|
26
|
-
events: {
|
|
27
|
-
'Users Loaded Successfully': props<{ users: User[] }>(),
|
|
28
|
-
'Users Loaded Failure': props<{ error: string }>(),
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const UsersPageActions = createActionGroup({
|
|
33
|
-
source: 'Users Page',
|
|
34
|
-
events: {
|
|
35
|
-
'Opened': emptyProps(),
|
|
36
|
-
'User Selected': props<{ userId: string }>(),
|
|
37
|
-
'User Deleted': props<{ userId: string }>(),
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// reducer — pure function, uses entity adapter
|
|
42
|
-
export const usersAdapter = createEntityAdapter<User>();
|
|
43
|
-
const initialState: UsersState = usersAdapter.getInitialState({
|
|
44
|
-
loading: false,
|
|
45
|
-
error: null,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export const usersReducer = createReducer(
|
|
49
|
-
initialState,
|
|
50
|
-
on(UsersPageActions.opened, (state) => ({ ...state, loading: true })),
|
|
51
|
-
on(UsersApiActions.usersLoadedSuccessfully, (state, { users }) =>
|
|
52
|
-
usersAdapter.setAll(users, { ...state, loading: false })
|
|
53
|
-
),
|
|
54
|
-
on(UsersApiActions.usersLoadedFailure, (state, { error }) => ({
|
|
55
|
-
...state, loading: false, error,
|
|
56
|
-
})),
|
|
57
|
-
on(UsersPageActions.userDeleted, (state, { userId }) =>
|
|
58
|
-
usersAdapter.removeOne(userId, state)
|
|
59
|
-
)
|
|
60
|
-
);
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Pattern 2: Effects for Side Effects
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
@Injectable()
|
|
67
|
-
export class UsersEffects {
|
|
68
|
-
loadUsers$ = createEffect(() =>
|
|
69
|
-
this.actions$.pipe(
|
|
70
|
-
ofType(UsersPageActions.opened),
|
|
71
|
-
exhaustMap(() =>
|
|
72
|
-
this.usersService.getAll().pipe(
|
|
73
|
-
map(users => UsersApiActions.usersLoadedSuccessfully({ users })),
|
|
74
|
-
catchError(error =>
|
|
75
|
-
of(UsersApiActions.usersLoadedFailure({ error: error.message }))
|
|
76
|
-
)
|
|
77
|
-
)
|
|
78
|
-
)
|
|
79
|
-
)
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
constructor(
|
|
83
|
-
private actions$: Actions,
|
|
84
|
-
private usersService: UsersService
|
|
85
|
-
) {}
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Pattern 3: Composed Selectors
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
const selectUsersState = createFeatureSelector<UsersState>('users');
|
|
93
|
-
const { selectAll, selectEntities } = usersAdapter.getSelectors();
|
|
94
|
-
|
|
95
|
-
export const selectAllUsers = createSelector(selectUsersState, selectAll);
|
|
96
|
-
export const selectUsersLoading = createSelector(selectUsersState, s => s.loading);
|
|
97
|
-
export const selectUsersError = createSelector(selectUsersState, s => s.error);
|
|
98
|
-
|
|
99
|
-
// Composed selector — memoized, only recomputes when inputs change
|
|
100
|
-
export const selectActiveUsers = createSelector(
|
|
101
|
-
selectAllUsers,
|
|
102
|
-
(users) => users.filter(u => u.active)
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
export const selectUserById = (id: string) =>
|
|
106
|
-
createSelector(selectUsersState, (state) =>
|
|
107
|
-
selectEntities(state)[id]
|
|
108
|
-
);
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Anti-Patterns
|
|
112
|
-
|
|
113
|
-
- **Command-style actions**: Actions like `loadUsers` (imperative) instead of `UsersPageActions.opened` (event). Actions describe what happened, not what should happen.
|
|
114
|
-
- **Business logic in effects**: Effects should orchestrate, not compute. Put transformation logic in reducers or utility functions.
|
|
115
|
-
- **Subscribing to store in effects to get state**: Use `concatLatestFrom` (or `withLatestFrom`) instead of injecting the store and subscribing manually.
|
|
116
|
-
- **Deeply nested state**: Normalize entities with `createEntityAdapter` instead of nesting arrays inside objects.
|
|
117
|
-
- **Selectors without memoization**: Writing plain functions to derive state bypasses memoization. Always use `createSelector`.
|
|
118
|
-
|
|
119
|
-
## Integration Points
|
|
120
|
-
|
|
121
|
-
- **Angular Components**: Smart components dispatch actions on user events and select state via selectors (see `angular-patterns.md`).
|
|
122
|
-
- **RxJS**: Effects are observable pipelines; see `rxjs-patterns.md` for operator choices in effects.
|
|
123
|
-
- **Router Store**: `@ngrx/router-store` syncs route params into the store so selectors can derive route-dependent state.
|
|
124
|
-
- **Entity Adapter**: Normalizes collections and provides CRUD operations on entity state.
|