gaia-framework 1.65.0 → 1.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.claude/commands/gaia-add-feature.md +2 -2
  2. package/.claude/commands/gaia-change-request.md +16 -4
  3. package/.claude/commands/gaia-edit-ux.md +17 -0
  4. package/.claude/commands/gaia-resume.md +1 -1
  5. package/.claude/commands/gaia-validate-prd.md +9 -3
  6. package/CLAUDE.md +16 -1
  7. package/README.md +3 -3
  8. package/_gaia/_config/adversarial-triggers.yaml +91 -0
  9. package/_gaia/_config/files-manifest.csv +1 -0
  10. package/_gaia/_config/gaia-help.csv +10 -6
  11. package/_gaia/_config/global.yaml +2 -1
  12. package/_gaia/_config/lifecycle-sequence.yaml +26 -4
  13. package/_gaia/_config/manifest.yaml +3 -3
  14. package/_gaia/_config/skill-manifest.csv +3 -1
  15. package/_gaia/_config/workflow-manifest.csv +5 -3
  16. package/_gaia/core/config.yaml +1 -1
  17. package/_gaia/core/engine/workflow.xml +31 -5
  18. package/_gaia/core/protocols/review-gate-check.xml +29 -1
  19. package/_gaia/core/workflows/brainstorming/template.md +6 -0
  20. package/_gaia/lifecycle/agents/pm.md +9 -10
  21. package/_gaia/lifecycle/agents/ux-designer.md +1 -0
  22. package/_gaia/lifecycle/agents/validator.md +2 -1
  23. package/_gaia/lifecycle/config.yaml +1 -1
  24. package/_gaia/lifecycle/knowledge/brownfield/config-contradiction-scan.md +137 -0
  25. package/_gaia/lifecycle/knowledge/brownfield/dead-code-scan.md +179 -0
  26. package/_gaia/lifecycle/knowledge/brownfield/test-execution-scan.md +209 -0
  27. package/_gaia/lifecycle/module-help.csv +1 -1
  28. package/_gaia/lifecycle/skills/document-rulesets.md +251 -0
  29. package/_gaia/lifecycle/skills/memory-management-cross-agent.md +218 -0
  30. package/_gaia/lifecycle/skills/memory-management.md +32 -122
  31. package/_gaia/lifecycle/templates/brownfield-scan-doc-code-prompt.md +219 -0
  32. package/_gaia/lifecycle/templates/brownfield-scan-hardcoded-prompt.md +169 -0
  33. package/_gaia/lifecycle/templates/brownfield-scan-integration-seam-prompt.md +127 -0
  34. package/_gaia/lifecycle/templates/brownfield-scan-runtime-behavior-prompt.md +141 -0
  35. package/_gaia/lifecycle/templates/brownfield-scan-security-prompt.md +212 -0
  36. package/_gaia/lifecycle/templates/gap-entry-schema.md +247 -0
  37. package/_gaia/lifecycle/templates/infra-prd-template.md +356 -0
  38. package/_gaia/lifecycle/templates/platform-prd-template.md +431 -0
  39. package/_gaia/lifecycle/templates/prd-template.md +70 -0
  40. package/_gaia/lifecycle/templates/story-template.md +1 -0
  41. package/_gaia/lifecycle/workflows/1-analysis/create-product-brief/workflow.yaml +1 -0
  42. package/_gaia/lifecycle/workflows/2-planning/create-prd/instructions.xml +4 -2
  43. package/_gaia/lifecycle/workflows/2-planning/create-prd/workflow.yaml +1 -0
  44. package/_gaia/lifecycle/workflows/2-planning/create-ux-design/workflow.yaml +1 -0
  45. package/_gaia/lifecycle/workflows/2-planning/edit-prd/instructions.xml +4 -4
  46. package/_gaia/lifecycle/workflows/2-planning/edit-prd/workflow.yaml +1 -0
  47. package/_gaia/lifecycle/workflows/2-planning/edit-ux-design/checklist.md +18 -0
  48. package/_gaia/lifecycle/workflows/2-planning/edit-ux-design/instructions.xml +66 -0
  49. package/_gaia/lifecycle/workflows/2-planning/edit-ux-design/workflow.yaml +27 -0
  50. package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/instructions.xml +3 -1
  51. package/_gaia/lifecycle/workflows/3-solutioning/create-architecture/workflow.yaml +1 -0
  52. package/_gaia/lifecycle/workflows/3-solutioning/create-epics-stories/workflow.yaml +1 -0
  53. package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/instructions.xml +4 -7
  54. package/_gaia/lifecycle/workflows/3-solutioning/edit-architecture/workflow.yaml +1 -0
  55. package/_gaia/lifecycle/workflows/3-solutioning/security-threat-model/workflow.yaml +1 -0
  56. package/_gaia/lifecycle/workflows/4-implementation/add-feature/checklist.md +42 -0
  57. package/_gaia/lifecycle/workflows/4-implementation/add-feature/instructions.xml +196 -0
  58. package/_gaia/lifecycle/workflows/{cross-phase → 4-implementation}/add-feature/workflow.yaml +20 -9
  59. package/_gaia/lifecycle/workflows/4-implementation/add-stories/checklist.md +5 -0
  60. package/_gaia/lifecycle/workflows/4-implementation/add-stories/instructions.xml +73 -1
  61. package/_gaia/lifecycle/workflows/4-implementation/add-stories/workflow.yaml +1 -0
  62. package/_gaia/lifecycle/workflows/4-implementation/code-review/workflow.yaml +1 -0
  63. package/_gaia/lifecycle/workflows/4-implementation/correct-course/workflow.yaml +1 -0
  64. package/_gaia/lifecycle/workflows/4-implementation/create-story/checklist.md +1 -1
  65. package/_gaia/lifecycle/workflows/4-implementation/create-story/instructions.xml +5 -4
  66. package/_gaia/lifecycle/workflows/4-implementation/dev-story/workflow.yaml +1 -1
  67. package/_gaia/lifecycle/workflows/4-implementation/retrospective/instructions.xml +21 -1
  68. package/_gaia/lifecycle/workflows/4-implementation/retrospective/workflow.yaml +2 -1
  69. package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/instructions.xml +3 -0
  70. package/_gaia/lifecycle/workflows/4-implementation/sprint-planning/workflow.yaml +2 -0
  71. package/_gaia/lifecycle/workflows/4-implementation/triage-findings/workflow.yaml +1 -0
  72. package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/checklist.md +15 -0
  73. package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/instructions.xml +153 -57
  74. package/_gaia/lifecycle/workflows/4-implementation/val-refresh-ground-truth/workflow.yaml +5 -0
  75. package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/instructions.xml +23 -12
  76. package/_gaia/lifecycle/workflows/4-implementation/val-validate-artifact/workflow.yaml +11 -0
  77. package/_gaia/lifecycle/workflows/4-implementation/val-validate-plan/instructions.xml +0 -2
  78. package/_gaia/lifecycle/workflows/5-deployment/deployment-checklist/workflow.yaml +1 -0
  79. package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/checklist.md +12 -0
  80. package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/instructions.xml +313 -5
  81. package/_gaia/lifecycle/workflows/anytime/brownfield-onboarding/workflow.yaml +1 -0
  82. package/_gaia/lifecycle/workflows/anytime/memory-hygiene/instructions.xml +8 -18
  83. package/_gaia/testing/config.yaml +1 -1
  84. package/_gaia/testing/workflows/edit-test-plan/workflow.yaml +1 -0
  85. package/_gaia/testing/workflows/test-design/workflow.yaml +2 -0
  86. package/_gaia/testing/workflows/traceability/workflow.yaml +1 -0
  87. package/bin/gaia-framework.js +25 -9
  88. package/bin/generate-checksums.js +124 -0
  89. package/gaia-install.sh +74 -28
  90. package/package.json +5 -2
  91. package/_gaia/lifecycle/workflows/cross-phase/add-feature/checklist.md +0 -30
  92. package/_gaia/lifecycle/workflows/cross-phase/add-feature/instructions.xml +0 -85
@@ -0,0 +1,356 @@
1
+ ---
2
+ template: 'infra-prd'
3
+ version: 1.0.0
4
+ used_by: ['create-prd']
5
+ domain: '{domain}'
6
+ ---
7
+
8
+ # Infrastructure PRD: {product_name}
9
+
10
+ > **Project:** {project_name}
11
+ > **Domain:** {domain}
12
+ > **Date:** {date}
13
+ > **Author:** {agent_name}
14
+ > **Status:** Draft | In Review | Approved
15
+
16
+ ## 1. Overview & Scope
17
+
18
+ {Platform purpose, target environments, and team ownership.}
19
+
20
+ ### Platform Purpose
21
+
22
+ {What this infrastructure provides and why it exists.}
23
+
24
+ ### Target Environments
25
+
26
+ | Environment | Purpose | Region(s) | Owner |
27
+ |-------------|---------|-----------|-------|
28
+ | {env_name} | {purpose} | {regions} | {team} |
29
+
30
+ ### Team Ownership
31
+
32
+ | Component | Owning Team | Escalation |
33
+ |-----------|-------------|------------|
34
+ | {component} | {team} | {contact} |
35
+
36
+ ## 2. Goals and Non-Goals
37
+
38
+ ### Goals
39
+ - {Goal 1}
40
+ - {Goal 2}
41
+
42
+ ### Non-Goals
43
+ - {Explicitly out of scope item 1}
44
+
45
+ ## 3. Platform Capabilities
46
+
47
+ {What the infrastructure enables. Each capability follows the format below.}
48
+
49
+ | ID | Capability | SLO |
50
+ |----|-----------|-----|
51
+ | PC-01 | Enable {team/service} to {capability} with {SLO} | {target} |
52
+ | PC-02 | Enable {team/service} to {capability} with {SLO} | {target} |
53
+
54
+ ## 4. Resource Specifications
55
+
56
+ {Compute, storage, networking, IAM provisioning. Per-environment breakdown.}
57
+
58
+ ### Compute
59
+
60
+ | Resource | Environment | Spec | Scaling |
61
+ |----------|-------------|------|---------|
62
+ | {resource} | {env} | {cpu/memory} | {auto/manual, min-max} |
63
+
64
+ ### Storage
65
+
66
+ | Store | Type | Size | IOPS | Backup |
67
+ |-------|------|------|------|--------|
68
+ | {store} | {block/object/file} | {size} | {iops} | {policy} |
69
+
70
+ ### Networking
71
+
72
+ | Component | CIDR/Range | Protocol | Purpose |
73
+ |-----------|-----------|----------|---------|
74
+ | {component} | {cidr} | {protocol} | {purpose} |
75
+
76
+ ### IAM Provisioning
77
+
78
+ | Role/Policy | Scope | Permissions | Lifecycle |
79
+ |-------------|-------|-------------|-----------|
80
+ | {role} | {scope} | {permissions} | {create/rotate/revoke} |
81
+
82
+ ### State Management
83
+
84
+ {State backend strategy — e.g., Terraform remote state, locking, encryption.}
85
+
86
+ | Backend | Lock Provider | Encryption | Workspace Strategy |
87
+ |---------|--------------|------------|-------------------|
88
+ | {backend} | {lock} | {encryption} | {workspace} |
89
+
90
+ ### Data Persistence Requirements
91
+
92
+ | Data Store | Durability | Replication | Retention |
93
+ |------------|-----------|-------------|-----------|
94
+ | {store} | {durability} | {replication} | {retention} |
95
+
96
+ ## 5. Operational SLOs
97
+
98
+ {Availability targets, MTTR, RTO/RPO, error budgets, resource utilization targets.}
99
+
100
+ ### Availability & Recovery
101
+
102
+ | Metric | Target | Measurement |
103
+ |--------|--------|-------------|
104
+ | Availability | {99.x%} | {how measured} |
105
+ | MTTR | {minutes} | {how measured} |
106
+ | RTO | {minutes} | {recovery time objective} |
107
+ | RPO | {minutes} | {recovery point objective} |
108
+ | Error Budget | {x% per month} | {how calculated} |
109
+
110
+ ### Resource Utilization Targets
111
+
112
+ | Resource | Target Utilization | Alert Threshold |
113
+ |----------|-------------------|-----------------|
114
+ | CPU | {target%} | {alert%} |
115
+ | Memory | {target%} | {alert%} |
116
+ | Storage IOPS | {target} | {threshold} |
117
+ | Network Bandwidth | {target Gbps} | {threshold} |
118
+ | Network Latency | {target ms} | {threshold} |
119
+
120
+ ## 6. Security Posture
121
+
122
+ {Security requirements tailored for infrastructure projects.}
123
+
124
+ ### IAM/RBAC
125
+
126
+ {Identity and access management, role-based access control policies.}
127
+
128
+ | Principal | Role | Scope | MFA Required | Review Cadence |
129
+ |-----------|------|-------|-------------|----------------|
130
+ | {principal} | {role} | {scope} | {yes/no} | {quarterly/annually} |
131
+
132
+ ### Network Segmentation
133
+
134
+ {Network isolation, security groups, firewall rules, zero-trust boundaries.}
135
+
136
+ | Zone | CIDR | Ingress Rules | Egress Rules | Purpose |
137
+ |------|------|---------------|-------------|---------|
138
+ | {zone} | {cidr} | {rules} | {rules} | {purpose} |
139
+
140
+ ### Secrets Management
141
+
142
+ {Secrets storage, rotation, injection, and audit strategy.}
143
+
144
+ | Secret Type | Store | Rotation | Injection Method |
145
+ |-------------|-------|----------|-----------------|
146
+ | {type} | {vault/kms/ssm} | {cadence} | {env var/sidecar/init container} |
147
+
148
+ ### Image Provenance
149
+
150
+ {Container image signing, scanning, and supply chain verification.}
151
+
152
+ | Registry | Signing | Scanning | Admission Policy |
153
+ |----------|---------|----------|-----------------|
154
+ | {registry} | {cosign/notary} | {trivy/grype} | {policy} |
155
+
156
+ ### Compliance Mapping
157
+
158
+ {Regulatory and compliance framework alignment.}
159
+
160
+ | Framework | Controls | Evidence | Audit Frequency |
161
+ |-----------|----------|----------|----------------|
162
+ | {SOC2/HIPAA/PCI/ISO} | {control IDs} | {how demonstrated} | {cadence} |
163
+
164
+ ## 7. Environment Strategy & Developer Experience
165
+
166
+ {Environment parity, promotion pipeline, drift detection, self-service provisioning.}
167
+
168
+ ### Environment Parity
169
+
170
+ | Dimension | Dev | Staging | Production |
171
+ |-----------|-----|---------|-----------|
172
+ | {dimension} | {dev config} | {staging config} | {prod config} |
173
+
174
+ ### Promotion Pipeline
175
+
176
+ {How changes flow from dev to production.}
177
+
178
+ ```
179
+ {dev} → {staging} → {production}
180
+ ```
181
+
182
+ ### Drift Detection
183
+
184
+ {How configuration drift is detected and remediated.}
185
+
186
+ | Tool | Schedule | Remediation | Notification |
187
+ |------|----------|-------------|-------------|
188
+ | {tool} | {cron} | {auto/manual} | {channel} |
189
+
190
+ ### Self-Service Provisioning
191
+
192
+ {Developer self-service capabilities and guardrails.}
193
+
194
+ | Capability | Interface | Guardrails | Approval |
195
+ |------------|-----------|-----------|----------|
196
+ | {capability} | {CLI/portal/API} | {policy} | {auto/manual} |
197
+
198
+ ### Onboarding
199
+
200
+ {New team member and new service onboarding procedures.}
201
+
202
+ ### Observability
203
+
204
+ {Monitoring, logging, tracing, and alerting strategy.}
205
+
206
+ | Signal | Tool | Retention | Alerting |
207
+ |--------|------|-----------|---------|
208
+ | Metrics | {prometheus/cloudwatch} | {retention} | {pagerduty/slack} |
209
+ | Logs | {elk/cloudwatch} | {retention} | {rules} |
210
+ | Traces | {jaeger/xray} | {retention} | {rules} |
211
+
212
+ ## 8. Dependencies & Provider Constraints
213
+
214
+ {Cloud provider limits, Terraform provider versions, upstream service contracts.}
215
+
216
+ ### Cloud Provider Limits
217
+
218
+ | Provider | Service | Limit | Current Usage | Headroom |
219
+ |----------|---------|-------|--------------|----------|
220
+ | {provider} | {service} | {limit} | {current} | {remaining} |
221
+
222
+ ### Terraform Provider Versions
223
+
224
+ | Provider | Version | Constraint | Notes |
225
+ |----------|---------|-----------|-------|
226
+ | {provider} | {version} | {~> x.y} | {notes} |
227
+
228
+ ### Upstream Service Contracts
229
+
230
+ | Service | SLA | API Version | Deprecation |
231
+ |---------|-----|------------|-------------|
232
+ | {service} | {sla} | {version} | {date or N/A} |
233
+
234
+ ## 9. Cost Model
235
+
236
+ {Per-environment resource cost estimates, scaling cost projections, and cost-per-unit efficiency metrics.}
237
+
238
+ ### Per-Environment Resource Cost Estimates
239
+
240
+ | Resource | Dev (monthly) | Staging (monthly) | Production (monthly) |
241
+ |----------|--------------|-------------------|---------------------|
242
+ | Compute | ${cost} | ${cost} | ${cost} |
243
+ | Storage | ${cost} | ${cost} | ${cost} |
244
+ | Networking | ${cost} | ${cost} | ${cost} |
245
+ | Monitoring | ${cost} | ${cost} | ${cost} |
246
+ | **Total** | **${total}** | **${total}** | **${total}** |
247
+
248
+ ### Scaling Cost Projections
249
+
250
+ | Scenario | Trigger | Additional Cost | Timeline |
251
+ |----------|---------|----------------|----------|
252
+ | {scenario} | {trigger condition} | ${projection} | {timeframe} |
253
+
254
+ ### Cost-Per-Unit Efficiency Metrics
255
+
256
+ | Metric | Current | Target | Optimization |
257
+ |--------|---------|--------|-------------|
258
+ | Cost per request | ${cost} | ${target} | {strategy} |
259
+ | Cost per GB stored | ${cost} | ${target} | {strategy} |
260
+ | Cost per environment | ${cost} | ${target} | {strategy} |
261
+
262
+ ## 10. Verification Strategy
263
+
264
+ {Policy-as-code (OPA/Rego, Checkov, tfsec), plan validation, smoke tests, drift detection, chaos testing.}
265
+
266
+ ### Policy-as-Code
267
+
268
+ | Tool | Scope | Rules | Enforcement |
269
+ |------|-------|-------|-------------|
270
+ | OPA/Rego | {scope} | {rule count} | {warn/deny} |
271
+ | Checkov | {scope} | {rule count} | {warn/deny} |
272
+ | tfsec | {scope} | {rule count} | {warn/deny} |
273
+
274
+ ### Plan Validation
275
+
276
+ {Terraform plan review, cost estimation, blast radius analysis.}
277
+
278
+ | Check | Tool | Gate | Threshold |
279
+ |-------|------|------|-----------|
280
+ | {check} | {tool} | {CI/manual} | {threshold} |
281
+
282
+ ### Smoke Tests
283
+
284
+ {Post-deployment verification tests.}
285
+
286
+ | Test | Target | Expected | Timeout |
287
+ |------|--------|----------|---------|
288
+ | {test} | {endpoint/resource} | {result} | {timeout} |
289
+
290
+ ### Drift Detection
291
+
292
+ {Scheduled plan diffs, state file monitoring, compliance scanning.}
293
+
294
+ ### Chaos Testing
295
+
296
+ {Failure injection, resilience validation.}
297
+
298
+ | Experiment | Target | Hypothesis | Blast Radius |
299
+ |-----------|--------|-----------|-------------|
300
+ | {experiment} | {target} | {hypothesis} | {scope} |
301
+
302
+ ## 11. Operational Runbooks
303
+
304
+ {Scaling, failover, incident response, rollback procedures.}
305
+
306
+ ### Scaling Procedures
307
+
308
+ | Trigger | Action | Rollback | Owner |
309
+ |---------|--------|----------|-------|
310
+ | {trigger} | {action} | {rollback} | {team} |
311
+
312
+ ### Failover Procedures
313
+
314
+ | Scenario | Detection | Response | RTO |
315
+ |----------|-----------|----------|-----|
316
+ | {scenario} | {detection} | {response steps} | {rto} |
317
+
318
+ ### Incident Response
319
+
320
+ | Severity | Notification | Escalation | Runbook |
321
+ |----------|-------------|------------|---------|
322
+ | P1 | {channel} | {escalation path} | {link} |
323
+ | P2 | {channel} | {escalation path} | {link} |
324
+
325
+ ### Rollback Procedures
326
+
327
+ | Change Type | Rollback Method | Verification | Duration |
328
+ |-------------|----------------|-------------|----------|
329
+ | {type} | {method} | {verification} | {estimate} |
330
+
331
+ ## 12. Requirements Summary
332
+
333
+ ### Infrastructure Requirements
334
+
335
+ | ID | Description | Priority | Status |
336
+ |----|------------|----------|--------|
337
+ | IR-001 | {description} | {Must-Have/Should-Have/Nice-to-Have} | {Draft/Approved} |
338
+ | IR-002 | {description} | {Must-Have/Should-Have/Nice-to-Have} | {Draft/Approved} |
339
+
340
+ ### Operational Requirements
341
+
342
+ | ID | Description | Priority | Status |
343
+ |----|------------|----------|--------|
344
+ | OR-001 | {description} | {Must-Have/Should-Have/Nice-to-Have} | {Draft/Approved} |
345
+ | OR-002 | {description} | {Must-Have/Should-Have/Nice-to-Have} | {Draft/Approved} |
346
+
347
+ ### Security Requirements
348
+
349
+ | ID | Description | Priority | Status |
350
+ |----|------------|----------|--------|
351
+ | SR-001 | {description} | {Must-Have/Should-Have/Nice-to-Have} | {Draft/Approved} |
352
+ | SR-002 | {description} | {Must-Have/Should-Have/Nice-to-Have} | {Draft/Approved} |
353
+
354
+ ## 13. Open Questions
355
+
356
+ - [ ] {Unresolved question}