@jaguilar87/gaia-ops 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +315 -0
  2. package/CLAUDE.md +154 -0
  3. package/LICENSE +21 -0
  4. package/README.md +221 -0
  5. package/agents/aws-troubleshooter.md +50 -0
  6. package/agents/claude-architect.md +821 -0
  7. package/agents/devops-developer.md +92 -0
  8. package/agents/gcp-troubleshooter.md +50 -0
  9. package/agents/gitops-operator.md +360 -0
  10. package/agents/terraform-architect.md +289 -0
  11. package/bin/gaia-init.js +620 -0
  12. package/commands/architect.md +97 -0
  13. package/commands/restore-session.md +87 -0
  14. package/commands/save-session.md +88 -0
  15. package/commands/session-status.md +61 -0
  16. package/commands/speckit.add-task.md +144 -0
  17. package/commands/speckit.analyze-task.md +65 -0
  18. package/commands/speckit.implement.md +96 -0
  19. package/commands/speckit.init.md +237 -0
  20. package/commands/speckit.plan.md +88 -0
  21. package/commands/speckit.specify.md +161 -0
  22. package/commands/speckit.tasks.md +188 -0
  23. package/config/AGENTS.md +162 -0
  24. package/config/agent-catalog.md +604 -0
  25. package/config/context-contracts.md +682 -0
  26. package/config/git-standards.md +674 -0
  27. package/config/git_standards.json +69 -0
  28. package/config/orchestration-workflow.md +735 -0
  29. package/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
  30. package/hooks/__pycache__/pre_kubectl_security.cpython-312.pyc +0 -0
  31. package/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
  32. package/hooks/__pycache__/session_start.cpython-312.pyc +0 -0
  33. package/hooks/__pycache__/subagent_stop.cpython-312.pyc +0 -0
  34. package/hooks/post_tool_use.py +463 -0
  35. package/hooks/pre_kubectl_security.py +205 -0
  36. package/hooks/pre_tool_use.py +530 -0
  37. package/hooks/session_start.py +315 -0
  38. package/hooks/subagent_stop.py +549 -0
  39. package/index.js +92 -0
  40. package/package.json +59 -0
  41. package/speckit/README.en.md +648 -0
  42. package/speckit/README.md +353 -0
  43. package/speckit/governance.md +169 -0
  44. package/speckit/scripts/check-prerequisites.sh +194 -0
  45. package/speckit/scripts/common.sh +126 -0
  46. package/speckit/scripts/create-new-feature.sh +131 -0
  47. package/speckit/scripts/init.sh +42 -0
  48. package/speckit/scripts/setup-plan.sh +95 -0
  49. package/speckit/scripts/update-agent-context.sh +718 -0
  50. package/speckit/templates/adr-template.md +118 -0
  51. package/speckit/templates/agent-file-template.md +23 -0
  52. package/speckit/templates/plan-template.md +233 -0
  53. package/speckit/templates/spec-template.md +116 -0
  54. package/speckit/templates/tasks-template-bkp.md +136 -0
  55. package/speckit/templates/tasks-template.md +345 -0
  56. package/templates/CLAUDE.template.md +170 -0
  57. package/templates/code-examples/approval_gate_workflow.py +141 -0
  58. package/templates/code-examples/clarification_workflow.py +94 -0
  59. package/templates/code-examples/commit_validation.py +86 -0
  60. package/templates/project-context.template.json +126 -0
  61. package/templates/settings.template.json +307 -0
  62. package/tools/__pycache__/agent_router.cpython-312.pyc +0 -0
  63. package/tools/__pycache__/approval_gate.cpython-312.pyc +0 -0
  64. package/tools/__pycache__/clarify_engine.cpython-312.pyc +0 -0
  65. package/tools/__pycache__/clarify_patterns.cpython-312.pyc +0 -0
  66. package/tools/__pycache__/commit_validator.cpython-312.pyc +0 -0
  67. package/tools/__pycache__/context_section_reader.cpython-312.pyc +0 -0
  68. package/tools/__pycache__/routing_dashboard.cpython-312.pyc +0 -0
  69. package/tools/__pycache__/routing_feedback.cpython-312.pyc +0 -0
  70. package/tools/__pycache__/semantic_matcher.cpython-312.pyc +0 -0
  71. package/tools/__pycache__/task_manager.cpython-312.pyc +0 -0
  72. package/tools/agent_capabilities.json +231 -0
  73. package/tools/agent_invoker_helper.py +239 -0
  74. package/tools/agent_router.py +730 -0
  75. package/tools/approval_gate.py +318 -0
  76. package/tools/clarify_engine.py +511 -0
  77. package/tools/clarify_patterns.py +356 -0
  78. package/tools/commit_validator.py +338 -0
  79. package/tools/context_provider.py +181 -0
  80. package/tools/context_section_reader.py +301 -0
  81. package/tools/demo_clarify.py +104 -0
  82. package/tools/generate_embeddings.py +168 -0
  83. package/tools/quicktriage_aws_troubleshooter.sh +45 -0
  84. package/tools/quicktriage_devops_developer.sh +38 -0
  85. package/tools/quicktriage_gcp_troubleshooter.sh +51 -0
  86. package/tools/quicktriage_gitops_operator.sh +47 -0
  87. package/tools/quicktriage_terraform_architect.sh +40 -0
  88. package/tools/semantic_matcher.py +222 -0
  89. package/tools/task_manager.py +547 -0
  90. package/tools/task_manager_README.md +395 -0
  91. package/tools/task_manager_example.py +215 -0
@@ -0,0 +1,118 @@
1
+ # ADR-XXX: [Decision Title]
2
+
3
+ **Status**: Proposed | Accepted | Rejected | Superseded
4
+
5
+ **Date**: YYYY-MM-DD
6
+
7
+ **Tags**: #infrastructure #kubernetes #security
8
+
9
+ ---
10
+
11
+ ## Context
12
+
13
+ What problem or situation requires a decision?
14
+
15
+ Include:
16
+ - Current state and problems
17
+ - Constraints (time, budget, technical)
18
+ - Requirements driving the decision
19
+ - Stakeholders affected
20
+
21
+ ---
22
+
23
+ ## Decision Drivers
24
+
25
+ Key factors influencing this decision:
26
+
27
+ - **Security**: [Requirements or concerns]
28
+ - **Cost**: [Budget implications]
29
+ - **Performance**: [Latency, throughput needs]
30
+ - **Team Skills**: [Expertise or learning curve]
31
+ - **Integration**: [Compatibility with existing stack]
32
+ - **Maintainability**: [Operational complexity]
33
+
34
+ ---
35
+
36
+ ## Options Considered
37
+
38
+ ### Option 1: [Name]
39
+
40
+ **Pros**:
41
+ - ✅ Advantage 1
42
+ - ✅ Advantage 2
43
+
44
+ **Cons**:
45
+ - ❌ Disadvantage 1
46
+ - ❌ Disadvantage 2
47
+
48
+ **Effort**: Low | Medium | High
49
+
50
+ ### Option 2: [Name]
51
+
52
+ **Pros**:
53
+ - ✅ Advantage 1
54
+
55
+ **Cons**:
56
+ - ❌ Disadvantage 1
57
+
58
+ **Effort**: Low | Medium | High
59
+
60
+ ---
61
+
62
+ ## Decision
63
+
64
+ **We chose: [Selected Option]**
65
+
66
+ **Rationale**:
67
+
68
+ Explain why this option was selected:
69
+ 1. Primary deciding factor
70
+ 2. Trade-offs we accept
71
+ 3. How we'll mitigate the cons
72
+
73
+ ---
74
+
75
+ ## Consequences
76
+
77
+ ### Positive
78
+ - ✅ Improvement 1
79
+ - ✅ Improvement 2
80
+
81
+ ### Negative
82
+ - ❌ Challenge 1
83
+ - ❌ Challenge 2
84
+
85
+ ### Mitigations
86
+ - How we'll address challenge 1
87
+ - How we'll address challenge 2
88
+
89
+ ---
90
+
91
+ ## Implementation
92
+
93
+ **Action Items**:
94
+ - [ ] Task 1 (Owner, Deadline)
95
+ - [ ] Task 2 (Owner, Deadline)
96
+
97
+ **Success Criteria**:
98
+ - How we'll validate this decision worked
99
+
100
+ ---
101
+
102
+ ## Compliance
103
+
104
+ **Aligns with governance.md principles**: [Which ones?]
105
+
106
+ **Review Date**: [Optional - When to reconsider]
107
+
108
+ ---
109
+
110
+ ## Related Decisions
111
+
112
+ **Supersedes**: ADR-XXX (if any)
113
+
114
+ **Related**: ADR-XXX, ADR-XXX
115
+
116
+ **References**:
117
+ - [External docs]
118
+ - [Implementation PRs]
@@ -0,0 +1,23 @@
1
+ # [PROJECT NAME] Development Guidelines
2
+
3
+ Auto-generated from all feature plans. Last updated: [DATE]
4
+
5
+ ## Active Technologies
6
+ [EXTRACTED FROM ALL PLAN.MD FILES]
7
+
8
+ ## Project Structure
9
+ ```
10
+ [ACTUAL STRUCTURE FROM PLANS]
11
+ ```
12
+
13
+ ## Commands
14
+ [ONLY COMMANDS FOR ACTIVE TECHNOLOGIES]
15
+
16
+ ## Code Style
17
+ [LANGUAGE-SPECIFIC, ONLY FOR LANGUAGES IN USE]
18
+
19
+ ## Recent Changes
20
+ [LAST 3 FEATURES AND WHAT THEY ADDED]
21
+
22
+ <!-- MANUAL ADDITIONS START -->
23
+ <!-- MANUAL ADDITIONS END -->
@@ -0,0 +1,233 @@
1
+
2
+ # Implementation Plan: [FEATURE]
3
+
4
+ **Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link]
5
+ **Input**: Feature specification from `/specs/[###-feature-name]/spec.md`
6
+
7
+ ## Execution Flow (/plan command scope)
8
+ ```
9
+ 1. Load feature spec from Input path
10
+ → If not found: ERROR "No feature spec at {path}"
11
+ 2. Fill Technical Context (scan for NEEDS CLARIFICATION)
12
+ → Detect Project Type from file system structure or context (web=frontend+backend, mobile=app+api)
13
+ → Set Structure Decision based on project type
14
+ 3. Fill the Constitution Check section based on the content of the constitution document.
15
+ 4. Evaluate Constitution Check section below
16
+ → If violations exist: Document in Complexity Tracking
17
+ → If no justification possible: ERROR "Simplify approach first"
18
+ → Update Progress Tracking: Initial Constitution Check
19
+ 5. Execute Phase 0 → research.md
20
+ → If NEEDS CLARIFICATION remain: ERROR "Resolve unknowns"
21
+ 6. Execute Phase 1 → contracts, data-model.md, quickstart.md, agent-specific template file (e.g., `CLAUDE.md` for Claude Code, `.github/copilot-instructions.md` for GitHub Copilot, `GEMINI.md` for Gemini CLI, `QWEN.md` for Qwen Code or `AGENTS.md` for opencode).
22
+ 7. Re-evaluate Constitution Check section
23
+ → If new violations: Refactor design, return to Phase 1
24
+ → Update Progress Tracking: Post-Design Constitution Check
25
+ 8. Plan Phase 2 → Describe task generation approach (DO NOT create tasks.md)
26
+ 9. STOP - Ready for /tasks command
27
+ ```
28
+
29
+ **IMPORTANT**: The /plan command STOPS at step 7. Phases 2-4 are executed by other commands:
30
+ - Phase 2: /tasks command creates tasks.md
31
+ - Phase 3-4: Implementation execution (manual or via tools)
32
+
33
+ ## Summary
34
+ [Extract from feature spec: primary requirement + technical approach from research]
35
+
36
+ ## Technical Context
37
+ **Language/Version**: [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION]
38
+ **Primary Dependencies**: [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION]
39
+ **Storage**: [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
40
+ **Testing**: [e.g., pytest, XCTest, cargo test or NEEDS CLARIFICATION]
41
+ **Target Platform**: [e.g., Linux server, iOS 15+, WASM or NEEDS CLARIFICATION]
42
+ **Project Type**: [single/web/mobile - determines source structure]
43
+ **Performance Goals**: [domain-specific, e.g., 1000 req/s, 10k lines/sec, 60 fps or NEEDS CLARIFICATION]
44
+ **Constraints**: [domain-specific, e.g., <200ms p95, <100MB memory, offline-capable or NEEDS CLARIFICATION]
45
+ **Scale/Scope**: [domain-specific, e.g., 10k users, 1M LOC, 50 screens or NEEDS CLARIFICATION]
46
+
47
+ ## Constitution Check
48
+ *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
49
+
50
+ **GitOps Compliance**:
51
+ - [ ] All infrastructure changes use declarative GitOps patterns (no manual kubectl apply)
52
+ - [ ] Changes follow Flux → HelmRelease → charts/tcm-service/ pattern
53
+ - [ ] Container images use concrete Artifact Registry tags (no :latest)
54
+
55
+ **Security & Operations**:
56
+ - [ ] HTTPS mandatory for all external endpoints
57
+ - [ ] Certificate strategy defined (ManagedCertificate or cert-manager wildcard)
58
+ - [ ] DNS prerequisites identified for SSL provisioning
59
+ - [ ] Health checks and readiness probes included
60
+
61
+ **Scope Boundaries**:
62
+ - [ ] No new cluster or foundational infrastructure creation
63
+ - [ ] Focus on runtime stabilization and HTTP(S) exposure only
64
+ - [ ] Existing secrets referenced (no recreation)
65
+
66
+ ## Project Structure
67
+
68
+ ### Documentation (this feature)
69
+ ```
70
+ specs/[###-feature]/
71
+ ├── plan.md # This file (/plan command output)
72
+ ├── research.md # Phase 0 output (/plan command)
73
+ ├── data-model.md # Phase 1 output (/plan command)
74
+ ├── quickstart.md # Phase 1 output (/plan command)
75
+ ├── contracts/ # Phase 1 output (/plan command)
76
+ └── tasks.md # Phase 2 output (/tasks command - NOT created by /plan)
77
+ ```
78
+
79
+ ### Source Code (repository root)
80
+ <!--
81
+ ACTION REQUIRED: Replace the placeholder tree below with the concrete layout
82
+ for this feature. Delete unused options and expand the chosen structure with
83
+ real paths (e.g., apps/admin, packages/something). The delivered plan must
84
+ not include Option labels.
85
+ -->
86
+ ```
87
+ # [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
88
+ src/
89
+ ├── models/
90
+ ├── services/
91
+ ├── cli/
92
+ └── lib/
93
+
94
+ tests/
95
+ ├── contract/
96
+ ├── integration/
97
+ └── unit/
98
+
99
+ # [REMOVE IF UNUSED] Option 2: Web application (when "frontend" + "backend" detected)
100
+ backend/
101
+ ├── src/
102
+ │ ├── models/
103
+ │ ├── services/
104
+ │ └── api/
105
+ └── tests/
106
+
107
+ frontend/
108
+ ├── src/
109
+ │ ├── components/
110
+ │ ├── pages/
111
+ │ └── services/
112
+ └── tests/
113
+
114
+ # [REMOVE IF UNUSED] Option 3: Mobile + API (when "iOS/Android" detected)
115
+ api/
116
+ └── [same as backend above]
117
+
118
+ ios/ or android/
119
+ └── [platform-specific structure: feature modules, UI flows, platform tests]
120
+ ```
121
+
122
+ **Structure Decision**: [Document the selected structure and reference the real
123
+ directories captured above]
124
+
125
+ ## Phase 0: Outline & Research
126
+ 1. **Extract unknowns from Technical Context** above:
127
+ - For each NEEDS CLARIFICATION → research task
128
+ - For each dependency → best practices task
129
+ - For each integration → patterns task
130
+
131
+ 2. **Generate and dispatch research agents**:
132
+ ```
133
+ For each unknown in Technical Context:
134
+ Task: "Research {unknown} for {feature context}"
135
+ For each technology choice:
136
+ Task: "Find best practices for {tech} in {domain}"
137
+ ```
138
+
139
+ 3. **Consolidate findings** in `research.md` using format:
140
+ - Decision: [what was chosen]
141
+ - Rationale: [why chosen]
142
+ - Alternatives considered: [what else evaluated]
143
+
144
+ **Output**: research.md with all NEEDS CLARIFICATION resolved
145
+
146
+ ## Phase 1: Design & Contracts
147
+ *Prerequisites: research.md complete*
148
+
149
+ 1. **Extract entities from feature spec** → `data-model.md`:
150
+ - Entity name, fields, relationships
151
+ - Validation rules from requirements
152
+ - State transitions if applicable
153
+
154
+ 2. **Generate API contracts** from functional requirements:
155
+ - For each user action → endpoint
156
+ - Use standard REST/GraphQL patterns
157
+ - Output OpenAPI/GraphQL schema to `/contracts/`
158
+
159
+ 3. **Generate contract tests** from contracts:
160
+ - One test file per endpoint
161
+ - Assert request/response schemas
162
+ - Tests must fail (no implementation yet)
163
+
164
+ 4. **Extract test scenarios** from user stories:
165
+ - Each story → integration test scenario
166
+ - Quickstart test = story validation steps
167
+
168
+ 5. **Update agent file incrementally** (O(1) operation):
169
+ - Run `.specify/scripts/bash/update-agent-context.sh claude`
170
+ **IMPORTANT**: Execute it exactly as specified above. Do not add or remove any arguments.
171
+ - If exists: Add only NEW tech from current plan
172
+ - Preserve manual additions between markers
173
+ - Update recent changes (keep last 3)
174
+ - Keep under 150 lines for token efficiency
175
+ - Output to repository root
176
+
177
+ **Output**: data-model.md, /contracts/*, failing tests, quickstart.md, agent-specific file
178
+
179
+ ## Phase 2: Task Planning Approach
180
+ *This section describes what the /tasks command will do - DO NOT execute during /plan*
181
+
182
+ **Task Generation Strategy**:
183
+ - Load `.specify/templates/tasks-template.md` as base
184
+ - Generate tasks from Phase 1 design docs (contracts, data model, quickstart)
185
+ - Each contract → contract test task [P]
186
+ - Each entity → model creation task [P]
187
+ - Each user story → integration test task
188
+ - Implementation tasks to make tests pass
189
+
190
+ **Ordering Strategy**:
191
+ - TDD order: Tests before implementation
192
+ - Dependency order: Models before services before UI
193
+ - Mark [P] for parallel execution (independent files)
194
+
195
+ **Estimated Output**: 25-30 numbered, ordered tasks in tasks.md
196
+
197
+ **IMPORTANT**: This phase is executed by the /tasks command, NOT by /plan
198
+
199
+ ## Phase 3+: Future Implementation
200
+ *These phases are beyond the scope of the /plan command*
201
+
202
+ **Phase 3**: Task execution (/tasks command creates tasks.md)
203
+ **Phase 4**: Implementation (execute tasks.md following constitutional principles)
204
+ **Phase 5**: Validation (run tests, execute quickstart.md, performance validation)
205
+
206
+ ## Complexity Tracking
207
+ *Fill ONLY if Constitution Check has violations that must be justified*
208
+
209
+ | Violation | Why Needed | Simpler Alternative Rejected Because |
210
+ |-----------|------------|-------------------------------------|
211
+ | [e.g., 4th project] | [current need] | [why 3 projects insufficient] |
212
+ | [e.g., Repository pattern] | [specific problem] | [why direct DB access insufficient] |
213
+
214
+
215
+ ## Progress Tracking
216
+ *This checklist is updated during execution flow*
217
+
218
+ **Phase Status**:
219
+ - [ ] Phase 0: Research complete (/plan command)
220
+ - [ ] Phase 1: Design complete (/plan command)
221
+ - [ ] Phase 2: Task planning complete (/plan command - describe approach only)
222
+ - [ ] Phase 3: Tasks generated (/tasks command)
223
+ - [ ] Phase 4: Implementation complete
224
+ - [ ] Phase 5: Validation passed
225
+
226
+ **Gate Status**:
227
+ - [ ] Initial Constitution Check: PASS
228
+ - [ ] Post-Design Constitution Check: PASS
229
+ - [ ] All NEEDS CLARIFICATION resolved
230
+ - [ ] Complexity deviations documented
231
+
232
+ ---
233
+ *Based on Constitution v1.0.0 - See `.specify/memory/constitution.md`*
@@ -0,0 +1,116 @@
1
+ # Feature Specification: [FEATURE NAME]
2
+
3
+ **Feature Branch**: `[###-feature-name]`
4
+ **Created**: [DATE]
5
+ **Status**: Draft
6
+ **Input**: User description: "$ARGUMENTS"
7
+
8
+ ## Execution Flow (main)
9
+ ```
10
+ 1. Parse user description from Input
11
+ → If empty: ERROR "No feature description provided"
12
+ 2. Extract key concepts from description
13
+ → Identify: actors, actions, data, constraints
14
+ 3. For each unclear aspect:
15
+ → Mark with [NEEDS CLARIFICATION: specific question]
16
+ 4. Fill User Scenarios & Testing section
17
+ → If no clear user flow: ERROR "Cannot determine user scenarios"
18
+ 5. Generate Functional Requirements
19
+ → Each requirement must be testable
20
+ → Mark ambiguous requirements
21
+ 6. Identify Key Entities (if data involved)
22
+ 7. Run Review Checklist
23
+ → If any [NEEDS CLARIFICATION]: WARN "Spec has uncertainties"
24
+ → If implementation details found: ERROR "Remove tech details"
25
+ 8. Return: SUCCESS (spec ready for planning)
26
+ ```
27
+
28
+ ---
29
+
30
+ ## ⚡ Quick Guidelines
31
+ - ✅ Focus on WHAT users need and WHY
32
+ - ❌ Avoid HOW to implement (no tech stack, APIs, code structure)
33
+ - 👥 Written for business stakeholders, not developers
34
+
35
+ ### Section Requirements
36
+ - **Mandatory sections**: Must be completed for every feature
37
+ - **Optional sections**: Include only when relevant to the feature
38
+ - When a section doesn't apply, remove it entirely (don't leave as "N/A")
39
+
40
+ ### For AI Generation
41
+ When creating this spec from a user prompt:
42
+ 1. **Mark all ambiguities**: Use [NEEDS CLARIFICATION: specific question] for any assumption you'd need to make
43
+ 2. **Don't guess**: If the prompt doesn't specify something (e.g., "login system" without auth method), mark it
44
+ 3. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
45
+ 4. **Common underspecified areas**:
46
+ - User types and permissions
47
+ - Data retention/deletion policies
48
+ - Performance targets and scale
49
+ - Error handling behaviors
50
+ - Integration requirements
51
+ - Security/compliance needs
52
+
53
+ ---
54
+
55
+ ## User Scenarios & Testing *(mandatory)*
56
+
57
+ ### Primary User Story
58
+ [Describe the main user journey in plain language]
59
+
60
+ ### Acceptance Scenarios
61
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
62
+ 2. **Given** [initial state], **When** [action], **Then** [expected outcome]
63
+
64
+ ### Edge Cases
65
+ - What happens when [boundary condition]?
66
+ - How does system handle [error scenario]?
67
+
68
+ ## Requirements *(mandatory)*
69
+
70
+ ### Functional Requirements
71
+ - **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]
72
+ - **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
73
+ - **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
74
+ - **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
75
+ - **FR-005**: System MUST [behavior, e.g., "log all security events"]
76
+
77
+ *Example of marking unclear requirements:*
78
+ - **FR-006**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
79
+ - **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
80
+
81
+ ### Key Entities *(include if feature involves data)*
82
+ - **[Entity 1]**: [What it represents, key attributes without implementation]
83
+ - **[Entity 2]**: [What it represents, relationships to other entities]
84
+
85
+ ---
86
+
87
+ ## Review & Acceptance Checklist
88
+ *GATE: Automated checks run during main() execution*
89
+
90
+ ### Content Quality
91
+ - [ ] No implementation details (languages, frameworks, APIs)
92
+ - [ ] Focused on user value and business needs
93
+ - [ ] Written for non-technical stakeholders
94
+ - [ ] All mandatory sections completed
95
+
96
+ ### Requirement Completeness
97
+ - [ ] No [NEEDS CLARIFICATION] markers remain
98
+ - [ ] Requirements are testable and unambiguous
99
+ - [ ] Success criteria are measurable
100
+ - [ ] Scope is clearly bounded
101
+ - [ ] Dependencies and assumptions identified
102
+
103
+ ---
104
+
105
+ ## Execution Status
106
+ *Updated by main() during processing*
107
+
108
+ - [ ] User description parsed
109
+ - [ ] Key concepts extracted
110
+ - [ ] Ambiguities marked
111
+ - [ ] User scenarios defined
112
+ - [ ] Requirements generated
113
+ - [ ] Entities identified
114
+ - [ ] Review checklist passed
115
+
116
+ ---
@@ -0,0 +1,136 @@
1
+ # Tasks: [FEATURE NAME]
2
+
3
+ **Input**: Design documents from `/specs/[###-feature-name]/`
4
+ **Prerequisites**: plan.md (required), research.md, data-model.md, contracts/
5
+
6
+ ## Execution Flow (main)
7
+ ```
8
+ 1. Load plan.md from feature directory
9
+ → If not found: ERROR "No implementation plan found"
10
+ → Extract: tech stack, libraries, structure
11
+ 2. Load optional design documents:
12
+ → data-model.md: Extract entities → model tasks
13
+ → contracts/: Each file → contract test task
14
+ → research.md: Extract decisions → setup tasks
15
+ 3. Generate tasks by category:
16
+ → Setup: GitOps setup, HelmRelease validation, image tag verification
17
+ → Tests: contract tests, integration tests, health checks
18
+ → Core: models, services, CLI commands
19
+ → Infrastructure: Ingress-GCE, certificate management, DNS setup
20
+ → Integration: DB, middleware, logging, observability
21
+ → Polish: unit tests, performance, documentation, rollback procedures
22
+ 4. Apply task rules:
23
+ → Different files = mark [P] for parallel
24
+ → Same file = sequential (no [P])
25
+ → Tests before implementation (TDD)
26
+ 5. Number tasks sequentially (T001, T002...)
27
+ 6. Generate dependency graph
28
+ 7. Create parallel execution examples
29
+ 8. Validate task completeness:
30
+ → All contracts have tests?
31
+ → All entities have models?
32
+ → All endpoints implemented?
33
+ 9. Return: SUCCESS (tasks ready for execution)
34
+ ```
35
+
36
+ ## Format: `[ID] [P?] Description`
37
+ - **[P]**: Can run in parallel (different files, no dependencies)
38
+ - Include exact file paths in descriptions
39
+
40
+ ## Path Conventions
41
+ - **Single project**: `src/`, `tests/` at repository root
42
+ - **Web app**: `backend/src/`, `frontend/src/`
43
+ - **Mobile**: `api/src/`, `ios/src/` or `android/src/`
44
+ - Paths shown below assume single project - adjust based on plan.md structure
45
+
46
+ ## Phase 3.1: Setup
47
+ - [ ] T001 Create project structure per implementation plan
48
+ - [ ] T002 Initialize [language] project with [framework] dependencies
49
+ - [ ] T003 [P] Configure linting and formatting tools
50
+
51
+ ## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
52
+ **CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
53
+ - [ ] T004 [P] Contract test POST /api/users in tests/contract/test_users_post.py
54
+ - [ ] T005 [P] Contract test GET /api/users/{id} in tests/contract/test_users_get.py
55
+ - [ ] T006 [P] Integration test user registration in tests/integration/test_registration.py
56
+ - [ ] T007 [P] Integration test auth flow in tests/integration/test_auth.py
57
+
58
+ ## Phase 3.3: Core Implementation (ONLY after tests are failing)
59
+ - [ ] T008 [P] User model in src/models/user.py
60
+ - [ ] T009 [P] UserService CRUD in src/services/user_service.py
61
+ - [ ] T010 [P] CLI --create-user in src/cli/user_commands.py
62
+ - [ ] T011 POST /api/users endpoint
63
+ - [ ] T012 GET /api/users/{id} endpoint
64
+ - [ ] T013 Input validation
65
+ - [ ] T014 Error handling and logging
66
+
67
+ ## Phase 3.4: Integration
68
+ - [ ] T015 Connect UserService to DB
69
+ - [ ] T016 Auth middleware
70
+ - [ ] T017 Request/response logging
71
+ - [ ] T018 CORS and security headers
72
+
73
+ ## Phase 3.5: Polish
74
+ - [ ] T019 [P] Unit tests for validation in tests/unit/test_validation.py
75
+ - [ ] T020 Performance tests (<200ms)
76
+ - [ ] T021 [P] Update docs/api.md
77
+ - [ ] T022 Remove duplication
78
+ - [ ] T023 Run manual-testing.md
79
+
80
+ ## Dependencies
81
+ - Tests (T004-T007) before implementation (T008-T014)
82
+ - T008 blocks T009, T015
83
+ - T016 blocks T018
84
+ - Implementation before polish (T019-T023)
85
+
86
+ ## Parallel Example
87
+ ```
88
+ # Launch T004-T007 together:
89
+ Task: "Contract test POST /api/users in tests/contract/test_users_post.py"
90
+ Task: "Contract test GET /api/users/{id} in tests/contract/test_users_get.py"
91
+ Task: "Integration test registration in tests/integration/test_registration.py"
92
+ Task: "Integration test auth in tests/integration/test_auth.py"
93
+ ```
94
+
95
+ ## Notes
96
+ - [P] tasks = different files, no dependencies
97
+ - Verify tests fail before implementing
98
+ - Commit after each task
99
+ - Avoid: vague tasks, same file conflicts
100
+
101
+ ## Task Generation Rules
102
+ *Applied during main() execution*
103
+
104
+ 1. **From Contracts**:
105
+ - Each contract file → contract test task [P]
106
+ - Each endpoint → implementation task
107
+
108
+ 2. **From Data Model**:
109
+ - Each entity → model creation task [P]
110
+ - Relationships → service layer tasks
111
+
112
+ 3. **From User Stories**:
113
+ - Each story → integration test [P]
114
+ - Quickstart scenarios → validation tasks
115
+
116
+ 4. **Ordering**:
117
+ - Setup → Tests → Models → Services → Endpoints → Polish
118
+ - Dependencies block parallel execution
119
+
120
+ ## Validation Checklist
121
+ *GATE: Checked by main() before returning*
122
+
123
+ - [ ] All contracts have corresponding tests
124
+ - [ ] All entities have model tasks
125
+ - [ ] All tests come before implementation
126
+ - [ ] Parallel tasks truly independent
127
+ - [ ] Each task specifies exact file path
128
+ - [ ] No task modifies same file as another [P] task
129
+
130
+ **TCM Constitution Compliance**:
131
+ - [ ] GitOps patterns enforced (no manual kubectl apply tasks)
132
+ - [ ] Concrete image tags specified (no :latest references)
133
+ - [ ] HTTPS endpoints required for external exposure
134
+ - [ ] Health checks included before DNS exposure
135
+ - [ ] Certificate management strategy documented
136
+ - [ ] Rollback procedures defined for deployments