@thatix.io/context-first-agents-cli 0.1.1 → 0.2.1
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 +25 -12
- package/dist/commands/create-orchestrator.js +4 -1
- package/dist/commands/doctor.js +21 -5
- package/dist/commands/init.js +3 -1
- package/dist/templates/commands/en/engineer/plan.md +301 -0
- package/dist/templates/commands/en/engineer/pr.md +194 -0
- package/dist/templates/commands/en/engineer/pre-pr.md +325 -0
- package/dist/templates/commands/en/engineer/start.md +285 -0
- package/dist/templates/commands/en/engineer/work.md +256 -0
- package/dist/templates/commands/en/products/check.md +237 -0
- package/dist/templates/commands/en/products/collect.md +170 -0
- package/dist/templates/commands/en/products/refine.md +231 -0
- package/dist/templates/commands/en/products/spec.md +273 -0
- package/dist/templates/commands/en/quality/metrics.md +266 -0
- package/dist/templates/commands/en/quality/observe.md +172 -0
- package/dist/templates/commands/en/warm-up.md +83 -0
- package/dist/templates/commands/es/agents/CONTEXT-CONTRACT.md +63 -0
- package/dist/templates/commands/es/agents/implementer.md +27 -0
- package/dist/templates/commands/es/agents/integrator.md +24 -0
- package/dist/templates/commands/es/agents/reviewer.md +31 -0
- package/dist/templates/commands/es/agents/tester.md +22 -0
- package/dist/templates/commands/es/engineer/plan.md +335 -0
- package/dist/templates/commands/es/engineer/pr.md +228 -0
- package/dist/templates/commands/es/engineer/pre-pr.md +359 -0
- package/dist/templates/commands/es/engineer/start.md +318 -0
- package/dist/templates/commands/es/engineer/work.md +290 -0
- package/dist/templates/commands/es/orchestrate.md +125 -0
- package/dist/templates/commands/es/products/check.md +271 -0
- package/dist/templates/commands/es/products/collect.md +218 -0
- package/dist/templates/commands/es/products/refine.md +265 -0
- package/dist/templates/commands/es/products/spec.md +306 -0
- package/dist/templates/commands/es/quality/metrics.md +300 -0
- package/dist/templates/commands/es/quality/observe.md +205 -0
- package/dist/templates/commands/es/warm-up.md +83 -0
- package/dist/templates/commands/pt-BR/engineer/plan.md +335 -0
- package/dist/templates/commands/pt-BR/engineer/pr.md +228 -0
- package/dist/templates/commands/pt-BR/engineer/pre-pr.md +359 -0
- package/dist/templates/commands/pt-BR/engineer/start.md +319 -0
- package/dist/templates/commands/pt-BR/engineer/work.md +290 -0
- package/dist/templates/commands/pt-BR/products/check.md +271 -0
- package/dist/templates/commands/pt-BR/products/collect.md +219 -0
- package/dist/templates/commands/pt-BR/products/refine.md +265 -0
- package/dist/templates/commands/pt-BR/products/spec.md +307 -0
- package/dist/templates/commands/pt-BR/quality/metrics.md +300 -0
- package/dist/templates/commands/pt-BR/quality/observe.md +206 -0
- package/dist/templates/commands/pt-BR/warm-up.md +83 -0
- package/package.json +1 -1
- package/templates/commands/en/engineer/plan.md +301 -0
- package/templates/commands/en/engineer/pr.md +194 -0
- package/templates/commands/en/engineer/pre-pr.md +325 -0
- package/templates/commands/en/engineer/start.md +285 -0
- package/templates/commands/en/engineer/work.md +256 -0
- package/templates/commands/en/products/check.md +237 -0
- package/templates/commands/en/products/collect.md +170 -0
- package/templates/commands/en/products/refine.md +231 -0
- package/templates/commands/en/products/spec.md +273 -0
- package/templates/commands/en/quality/metrics.md +266 -0
- package/templates/commands/en/quality/observe.md +172 -0
- package/templates/commands/en/warm-up.md +83 -0
- package/templates/commands/es/agents/CONTEXT-CONTRACT.md +63 -0
- package/templates/commands/es/agents/implementer.md +27 -0
- package/templates/commands/es/agents/integrator.md +24 -0
- package/templates/commands/es/agents/reviewer.md +31 -0
- package/templates/commands/es/agents/tester.md +22 -0
- package/templates/commands/es/engineer/plan.md +335 -0
- package/templates/commands/es/engineer/pr.md +228 -0
- package/templates/commands/es/engineer/pre-pr.md +359 -0
- package/templates/commands/es/engineer/start.md +318 -0
- package/templates/commands/es/engineer/work.md +290 -0
- package/templates/commands/es/orchestrate.md +125 -0
- package/templates/commands/es/products/check.md +271 -0
- package/templates/commands/es/products/collect.md +218 -0
- package/templates/commands/es/products/refine.md +265 -0
- package/templates/commands/es/products/spec.md +306 -0
- package/templates/commands/es/quality/metrics.md +300 -0
- package/templates/commands/es/quality/observe.md +205 -0
- package/templates/commands/es/warm-up.md +83 -0
- package/templates/commands/pt-BR/engineer/plan.md +335 -0
- package/templates/commands/pt-BR/engineer/pr.md +228 -0
- package/templates/commands/pt-BR/engineer/pre-pr.md +359 -0
- package/templates/commands/pt-BR/engineer/start.md +319 -0
- package/templates/commands/pt-BR/engineer/work.md +290 -0
- package/templates/commands/pt-BR/products/check.md +271 -0
- package/templates/commands/pt-BR/products/collect.md +219 -0
- package/templates/commands/pt-BR/products/refine.md +265 -0
- package/templates/commands/pt-BR/products/spec.md +307 -0
- package/templates/commands/pt-BR/quality/metrics.md +300 -0
- package/templates/commands/pt-BR/quality/observe.md +206 -0
- package/templates/commands/pt-BR/warm-up.md +83 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Requirements Refinement
|
|
2
|
+
|
|
3
|
+
You are a product expert responsible for helping to refine requirements for the project.
|
|
4
|
+
|
|
5
|
+
## ⚠️ IMPORTANT: This Command DOES NOT Implement Code
|
|
6
|
+
|
|
7
|
+
**This command is ONLY for planning and documentation:**
|
|
8
|
+
- ✅ Validate requirements against metaspecs
|
|
9
|
+
- ✅ Create refined specification
|
|
10
|
+
- ✅ Save documentation in `.sessions/`
|
|
11
|
+
- ✅ Update issue in task manager
|
|
12
|
+
- ❌ **DO NOT implement code**
|
|
13
|
+
- ❌ **DO NOT edit code files**
|
|
14
|
+
- ❌ **DO NOT run tests or deploy**
|
|
15
|
+
|
|
16
|
+
**Next step**: `/spec [ISSUE-ID]` to create a complete PRD based on the refined requirements.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
Read `context-manifest.json` and `ai.properties.md` from the orchestrator to get repositories, base_path, and task_management_system.
|
|
23
|
+
|
|
24
|
+
## Objective
|
|
25
|
+
|
|
26
|
+
Transform an initial requirement into a refined and validated specification, ready to become a complete PRD.
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
### 1. Clarification Phase
|
|
31
|
+
|
|
32
|
+
Read the initial requirement and ask questions to achieve full clarity about:
|
|
33
|
+
- **Goal**: Why build this?
|
|
34
|
+
- **Business Value**: Which metric/persona does it impact?
|
|
35
|
+
- **Scope**: What is included and what is NOT included?
|
|
36
|
+
- **Interactions**: Which existing features/components are affected?
|
|
37
|
+
|
|
38
|
+
Keep asking questions until you have complete understanding.
|
|
39
|
+
|
|
40
|
+
### 2. Validation Against Metaspecs
|
|
41
|
+
|
|
42
|
+
**IMPORTANT**: First read `ai.properties.md` to get the `base_path`. The indexes should ALREADY be in context (you ran `/warm-up`). Consult the indexes and read ONLY relevant documents to validate the requirement.
|
|
43
|
+
|
|
44
|
+
**Validation Process**:
|
|
45
|
+
|
|
46
|
+
1. **Consult the loaded indexes** from `/warm-up`:
|
|
47
|
+
- Read `context-manifest.json` to find the repository with `role: "metaspecs"`
|
|
48
|
+
- Obtain the `id` of that repository (e.g., "my-project-metaspecs")
|
|
49
|
+
- Read `ai.properties.md` to get the `base_path`
|
|
50
|
+
- The metaspecs repository is at: `{base_path}/{metaspecs-id}/`
|
|
51
|
+
- Consult `{base_path}/{metaspecs-id}/index.md` - Project overview
|
|
52
|
+
- Consult specific indexes (e.g., `specs/business/index.md`, `specs/technical/index.md`)
|
|
53
|
+
|
|
54
|
+
2. **Identify relevant documents** for this specific requirement:
|
|
55
|
+
- In `specs/business/`: Which business documents are relevant?
|
|
56
|
+
- In `specs/technical/`: Which technical documents are relevant?
|
|
57
|
+
|
|
58
|
+
3. **Read ONLY the identified relevant documents** (do not read everything!)
|
|
59
|
+
|
|
60
|
+
4. **Validate the requirement** against the read metaspecs:
|
|
61
|
+
- ✅ Alignment with product strategy and vision
|
|
62
|
+
- ✅ Meets needs of the correct personas
|
|
63
|
+
- ✅ Compatible with approved technology stack
|
|
64
|
+
- ✅ Respects architectural decisions (ADRs)
|
|
65
|
+
- ✅ Follows existing business rules
|
|
66
|
+
- ⚠️ Identify conflicts or violations
|
|
67
|
+
|
|
68
|
+
**If violations are identified**: 🛑 **STOP** and ask the user for clarification before proceeding (Jidoka Principle).
|
|
69
|
+
|
|
70
|
+
### 3. Summary and Approval Phase
|
|
71
|
+
|
|
72
|
+
Once you have gathered sufficient information and validated against metaspecs, present a structured summary with:
|
|
73
|
+
- **Feature**: Feature name
|
|
74
|
+
- **Goal**: Why build it (1-2 sentences)
|
|
75
|
+
- **Business Value**: Metric, persona, roadmap phase (consult metaspecs)
|
|
76
|
+
- **Scope**: What IS included and what IS NOT included
|
|
77
|
+
- **Affected Components**: List based on current architecture (consult technical metaspecs)
|
|
78
|
+
- **Validation against Metaspecs**: ✅ Approved / ⚠️ Attention needed
|
|
79
|
+
- **Effort Estimate**: Small (< 1 day) / Medium (1-3 days) / Large (3-5 days) / Very Large (> 5 days)
|
|
80
|
+
|
|
81
|
+
**Complexity Assessment and Suggestion to Split**:
|
|
82
|
+
|
|
83
|
+
**If implementation seems large** (> 5 days estimated effort):
|
|
84
|
+
- 🚨 **Suggest splitting into multiple smaller issues**
|
|
85
|
+
- Explain the rationale for splitting (e.g., "This feature involves 3 distinct areas that can be implemented independently")
|
|
86
|
+
- Propose a **logical** split based on:
|
|
87
|
+
- Independent functionalities
|
|
88
|
+
- Different repositories
|
|
89
|
+
- Application layers (backend, frontend, infra)
|
|
90
|
+
- Implementation phases (MVP, improvements, optimizations)
|
|
91
|
+
- Example split:
|
|
92
|
+
```
|
|
93
|
+
Original Issue: "Multi-channel notification system"
|
|
94
|
+
|
|
95
|
+
Suggested Split:
|
|
96
|
+
- FIN-201: Queue and worker infrastructure (backend)
|
|
97
|
+
- FIN-202: Email notifications (backend + templates)
|
|
98
|
+
- FIN-203: Push notifications (backend + mobile)
|
|
99
|
+
- FIN-204: Notification preferences (frontend + backend)
|
|
100
|
+
```
|
|
101
|
+
- **Important**: Final decision is the user's - they may accept the split or keep it as a single issue
|
|
102
|
+
|
|
103
|
+
**If the user accepts the split**:
|
|
104
|
+
- Document each issue separately
|
|
105
|
+
- Add cross-references between related issues
|
|
106
|
+
- Suggest implementation order if dependencies exist
|
|
107
|
+
- Each split issue must go through the same refinement process
|
|
108
|
+
|
|
109
|
+
Request user approval and incorporate feedback if needed.
|
|
110
|
+
|
|
111
|
+
**Tip**: You may search the codebase or internet before finalizing, if necessary.
|
|
112
|
+
|
|
113
|
+
### 4. Saving the Refined Requirements
|
|
114
|
+
|
|
115
|
+
Once the user approves, save the requirements:
|
|
116
|
+
|
|
117
|
+
**IMPORTANT**: Always create a local backup AND update the task manager (if configured).
|
|
118
|
+
|
|
119
|
+
**Saving Process**:
|
|
120
|
+
|
|
121
|
+
1. **ALWAYS create local backup first**:
|
|
122
|
+
- Create a complete file at `./.sessions/<ISSUE-ID>/refined.md` (e.g., `./.sessions/FIN-5/refined.md`)
|
|
123
|
+
- Where `<ISSUE-ID>` is the issue ID (e.g., FIN-5, FIN-123)
|
|
124
|
+
- Include ALL refinement details (full backup)
|
|
125
|
+
|
|
126
|
+
2. **If task manager is configured** (read `ai.properties.md` to identify `task_management_system`):
|
|
127
|
+
- Identify the MCP tool of the task manager
|
|
128
|
+
- **Update the BODY (description) of the issue** with a CONCISE version of the refined requirements
|
|
129
|
+
- For Jira: Use Jira MCP with `description` field
|
|
130
|
+
- For Linear: Use Linear MCP with `description` field
|
|
131
|
+
- For GitHub: Use GitHub MCP with `body` field
|
|
132
|
+
- For Azure Boards: Use Azure Boards MCP with `description` field
|
|
133
|
+
- Include all refined content in the issue description/body field
|
|
134
|
+
- If content is too long and API errors occur, consider creating a summarized version
|
|
135
|
+
- **ALWAYS overwrite** the existing body (do not append)
|
|
136
|
+
|
|
137
|
+
**Note**:
|
|
138
|
+
- Local backup is ALWAYS saved and complete
|
|
139
|
+
- If API error occurs, manually verify if the issue was updated in the task manager
|
|
140
|
+
|
|
141
|
+
**Output Template**:
|
|
142
|
+
|
|
143
|
+
**IMPORTANT**: The standard template for refined requirements may be documented in the metaspecs repository. Consult `{base_path}/{metaspecs-id}/specs/refined/` or similar.
|
|
144
|
+
|
|
145
|
+
**FULL Template** (for local backup `.sessions/<ISSUE-ID>/refined.md`):
|
|
146
|
+
- **Metadata**: Issue, ID, Task Manager, Project, Date, Sprint, Priority
|
|
147
|
+
- **🎯 WHY**: Reasons, business value, metric, persona, strategic alignment
|
|
148
|
+
- **📦 WHAT**: Detailed features, affected components, integrations, full negative scope
|
|
149
|
+
- **🔧 HOW**: Stack, coding patterns, file structure, dependencies, implementation order, failure modes, performance/cost/UX considerations
|
|
150
|
+
- **✅ Validation against Metaspecs**: Consulted documents (business and technical), verified ADRs, validation result
|
|
151
|
+
- **📊 Success Metrics**: Technical, product/UX, acceptance criteria
|
|
152
|
+
- **🔄 Product Impact**: Alignment with objectives, enablers, mitigated risks
|
|
153
|
+
- **⚠️ Known Limitations**: MVP limitations
|
|
154
|
+
- **📝 Implementation Checklist**: Tasks by area (backend, frontend, tests, security, etc.)
|
|
155
|
+
|
|
156
|
+
**Task Manager Template**:
|
|
157
|
+
```markdown
|
|
158
|
+
# [Feature Name] - Refined Requirements
|
|
159
|
+
|
|
160
|
+
**Sprint X** | **Y days** | **Priority**
|
|
161
|
+
|
|
162
|
+
## Goal
|
|
163
|
+
[1-2 paragraphs: what it is and why]
|
|
164
|
+
|
|
165
|
+
## Scope
|
|
166
|
+
|
|
167
|
+
### Main Features
|
|
168
|
+
- Feature 1: [summary]
|
|
169
|
+
- Feature 2: [summary]
|
|
170
|
+
- Validations/Guards: [summary]
|
|
171
|
+
|
|
172
|
+
### Affected Components
|
|
173
|
+
- Component 1: [type of change]
|
|
174
|
+
- Component 2: [type of change]
|
|
175
|
+
|
|
176
|
+
### Security
|
|
177
|
+
✅ [item 1] ✅ [item 2] ✅ [item 3]
|
|
178
|
+
|
|
179
|
+
## Negative Scope
|
|
180
|
+
❌ [item 1] ❌ [item 2] ❌ [item 3]
|
|
181
|
+
|
|
182
|
+
## Stack
|
|
183
|
+
[Tech stack summarized by area]
|
|
184
|
+
|
|
185
|
+
## Structure
|
|
186
|
+
[SUMMARIZED file tree - main modules only]
|
|
187
|
+
|
|
188
|
+
## Failure Modes (Avoid)
|
|
189
|
+
🔴 [critical 1] 🔴 [critical 2]
|
|
190
|
+
🟡 [medium 1] 🟡 [medium 2]
|
|
191
|
+
|
|
192
|
+
## Acceptance Criteria
|
|
193
|
+
- [ ] [item 1]
|
|
194
|
+
- [ ] [item 2]
|
|
195
|
+
- [ ] [item 3]
|
|
196
|
+
|
|
197
|
+
## Validation
|
|
198
|
+
**ADRs**: [list]
|
|
199
|
+
**Specs**: [main]
|
|
200
|
+
**Status**: ✅ Approved
|
|
201
|
+
|
|
202
|
+
**Impact**: [summary]
|
|
203
|
+
**Limitations**: [summary]
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
📄 **Full document**: `.sessions/<ISSUE-ID>/refined.md`
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Audience**: AI Developer with capabilities similar to yours. Be concise but complete.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
**Requirement to Refine**:
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
#$ARGUMENTS
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 🎯 Next Step
|
|
222
|
+
|
|
223
|
+
**After user approval and saving the refined requirements**, the natural flow is:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
/spec [ISSUE-ID]
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Example**: `/spec FIN-3`
|
|
230
|
+
|
|
231
|
+
This command will create a PRD (Product Requirements Document) complete based on the refined requirements, detailing features, user stories, acceptance criteria, and final validations.
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
# Specification Creation (PRD)
|
|
2
|
+
|
|
3
|
+
This command creates the complete specification (Product Requirements Document) for the feature.
|
|
4
|
+
|
|
5
|
+
## ⚠️ IMPORTANT: This Command DOES NOT Implement Code
|
|
6
|
+
|
|
7
|
+
**This command is ONLY for requirements documentation:**
|
|
8
|
+
- ✅ Create PRD (Product Requirements Document)
|
|
9
|
+
- ✅ Update issue in the task manager via MCP
|
|
10
|
+
- ✅ **READ** files from main repositories (read-only)
|
|
11
|
+
- ❌ **DO NOT implement code**
|
|
12
|
+
- ❌ **DO NOT edit code files**
|
|
13
|
+
- ❌ **DO NOT checkout branches in main repositories**
|
|
14
|
+
- ❌ **DO NOT make commits**
|
|
15
|
+
|
|
16
|
+
**Next step**: `/orchestrate <ISSUE-ID>` to derive the agent graph and execute (recommended). `/start` remains a manual escape hatch.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Configuration
|
|
21
|
+
|
|
22
|
+
Read `context-manifest.json` and `ai.properties.md` from the orchestrator to get repositories, base_path, and task_management_system.
|
|
23
|
+
|
|
24
|
+
## 📋 Prerequisites
|
|
25
|
+
|
|
26
|
+
- Issue refined via `/refine`
|
|
27
|
+
- Approval to proceed with the feature
|
|
28
|
+
|
|
29
|
+
## 📚 Load MetaSpecs
|
|
30
|
+
|
|
31
|
+
**Automatically locate MetaSpecs**:
|
|
32
|
+
1. Read `context-manifest.json` from the orchestrator
|
|
33
|
+
2. Find the repository with `"role": "metaspecs"`
|
|
34
|
+
3. Read `ai.properties.md` to get the `base_path`
|
|
35
|
+
4. The metaspecs are located at: `{base_path}/{metaspecs-repo-id}/`
|
|
36
|
+
5. Read relevant `index.md` files to ensure compliance with:
|
|
37
|
+
- System architecture
|
|
38
|
+
- Design patterns
|
|
39
|
+
- Technical constraints
|
|
40
|
+
- Project conventions
|
|
41
|
+
|
|
42
|
+
## 🎯 Objective
|
|
43
|
+
|
|
44
|
+
Create a complete PRD that will serve as the single source of truth for implementation.
|
|
45
|
+
|
|
46
|
+
## 📝 PRD Structure
|
|
47
|
+
|
|
48
|
+
### 1. Overview
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
# [Feature Title]
|
|
52
|
+
|
|
53
|
+
## Context
|
|
54
|
+
[Why are we building this? What problem does it solve?]
|
|
55
|
+
|
|
56
|
+
## Objective
|
|
57
|
+
[What do we want to achieve with this feature?]
|
|
58
|
+
|
|
59
|
+
## Success Metrics
|
|
60
|
+
- [Metric 1]: [How to measure]
|
|
61
|
+
- [Metric 2]: [How to measure]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2. Functional Requirements
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## Functional Requirements
|
|
68
|
+
|
|
69
|
+
### RF-01: [Requirement Name]
|
|
70
|
+
**Description**: [Detailed description]
|
|
71
|
+
**Priority**: Must Have / Should Have / Could Have
|
|
72
|
+
**Repositories**: [affected repos]
|
|
73
|
+
|
|
74
|
+
### RF-02: [Requirement Name]
|
|
75
|
+
**Description**: [Detailed description]
|
|
76
|
+
**Priority**: Must Have / Should Have / Could Have
|
|
77
|
+
**Repositories**: [affected repos]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 3. Non-Functional Requirements
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
## Non-Functional Requirements
|
|
84
|
+
|
|
85
|
+
### Performance
|
|
86
|
+
- [Performance requirement]
|
|
87
|
+
|
|
88
|
+
### Security
|
|
89
|
+
- [Security requirement]
|
|
90
|
+
|
|
91
|
+
### Accessibility
|
|
92
|
+
- [Accessibility requirement]
|
|
93
|
+
|
|
94
|
+
### Scalability
|
|
95
|
+
- [Scalability requirement]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 4. User Flows
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
## User Flows
|
|
102
|
+
|
|
103
|
+
### Main Flow
|
|
104
|
+
1. [Step 1]
|
|
105
|
+
2. [Step 2]
|
|
106
|
+
3. [Step 3]
|
|
107
|
+
|
|
108
|
+
### Alternative Flows
|
|
109
|
+
**Scenario**: [Scenario name]
|
|
110
|
+
1. [Step 1]
|
|
111
|
+
2. [Step 2]
|
|
112
|
+
|
|
113
|
+
### Error Handling
|
|
114
|
+
**Error**: [Error type]
|
|
115
|
+
**Behavior**: [How the system should react]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 5. Technical Specification
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
## Technical Specification
|
|
122
|
+
|
|
123
|
+
### Architecture
|
|
124
|
+
|
|
125
|
+
#### <repo-1>
|
|
126
|
+
- **New components**: [list]
|
|
127
|
+
- **Modified components**: [list]
|
|
128
|
+
- **APIs**: [new/modified endpoints]
|
|
129
|
+
|
|
130
|
+
#### <repo-2>
|
|
131
|
+
- **New components**: [list]
|
|
132
|
+
- **Modified components**: [list]
|
|
133
|
+
- **APIs**: [new/modified endpoints]
|
|
134
|
+
|
|
135
|
+
### Integrations
|
|
136
|
+
- **Between repos**: [how repos communicate]
|
|
137
|
+
- **External**: [external APIs, if any]
|
|
138
|
+
|
|
139
|
+
### Data Model
|
|
140
|
+
[Describe changes to data model, if any]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 6. Acceptance Criteria
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
## Acceptance Criteria
|
|
147
|
+
|
|
148
|
+
### Functional
|
|
149
|
+
- [ ] [Specific and testable criterion]
|
|
150
|
+
- [ ] [Specific and testable criterion]
|
|
151
|
+
|
|
152
|
+
### Technical
|
|
153
|
+
- [ ] Unit tests with coverage >= X%
|
|
154
|
+
- [ ] Integration tests implemented
|
|
155
|
+
- [ ] Performance within requirements
|
|
156
|
+
- [ ] Documentation updated
|
|
157
|
+
|
|
158
|
+
### Quality
|
|
159
|
+
- [ ] Code review approved
|
|
160
|
+
- [ ] No regressions
|
|
161
|
+
- [ ] Accessibility validated
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 7. Out of Scope
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
## Out of Scope
|
|
168
|
+
|
|
169
|
+
Features that will NOT be implemented in this version:
|
|
170
|
+
- [Item 1]
|
|
171
|
+
- [Item 2]
|
|
172
|
+
|
|
173
|
+
Justification: [Why these are deferred]
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### 8. Risks and Mitigations
|
|
177
|
+
|
|
178
|
+
```markdown
|
|
179
|
+
## Risks and Mitigations
|
|
180
|
+
|
|
181
|
+
### Risk 1: [Description]
|
|
182
|
+
- **Probability**: High / Medium / Low
|
|
183
|
+
- **Impact**: High / Medium / Low
|
|
184
|
+
- **Mitigation**: [How to mitigate]
|
|
185
|
+
|
|
186
|
+
### Risk 2: [Description]
|
|
187
|
+
- **Probability**: High / Medium / Low
|
|
188
|
+
- **Impact**: High / Medium / Low
|
|
189
|
+
- **Mitigation**: [How to mitigate]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 9. Dependencies
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
## Dependencies
|
|
196
|
+
|
|
197
|
+
### Technical
|
|
198
|
+
- [Technical dependency 1]
|
|
199
|
+
- [Technical dependency 2]
|
|
200
|
+
|
|
201
|
+
### Business
|
|
202
|
+
- [Business dependency 1]
|
|
203
|
+
- [Business dependency 2]
|
|
204
|
+
|
|
205
|
+
### Blockers
|
|
206
|
+
- [Blocker 1 and plan to resolve]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 10. Test Plan
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
## Test Plan
|
|
213
|
+
|
|
214
|
+
### Unit Tests
|
|
215
|
+
- [Area 1 to be tested]
|
|
216
|
+
- [Area 2 to be tested]
|
|
217
|
+
|
|
218
|
+
### Integration Tests
|
|
219
|
+
- [Scenario 1]
|
|
220
|
+
- [Scenario 2]
|
|
221
|
+
|
|
222
|
+
### Manual Tests
|
|
223
|
+
- [Scenario 1]
|
|
224
|
+
- [Scenario 2]
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## 📄 Saving the PRD
|
|
228
|
+
|
|
229
|
+
**PRIORITY 1: Use MCP (Model Context Protocol)**
|
|
230
|
+
|
|
231
|
+
- Read `ai.properties.md` from the orchestrator to identify the `task_management_system`
|
|
232
|
+
- Use the appropriate MCP to update the issue with the PRD:
|
|
233
|
+
- Add the complete PRD as a comment on the issue
|
|
234
|
+
- Or attach as a file (if the task manager supports it)
|
|
235
|
+
- Update status/labels (e.g., "spec-ready", "ready-for-dev")
|
|
236
|
+
- Inform the user: "✅ PRD added to issue [ID]"
|
|
237
|
+
|
|
238
|
+
**FALLBACK: Create .md file only if MCP fails**
|
|
239
|
+
|
|
240
|
+
If MCP is unavailable or fails:
|
|
241
|
+
- Save to `./.sessions/<ISSUE-ID>/prd.md`
|
|
242
|
+
- Inform the user: "⚠️ PRD saved locally in .sessions/ (task manager not available)"
|
|
243
|
+
|
|
244
|
+
## 🔍 Review and Approval
|
|
245
|
+
|
|
246
|
+
Before finishing:
|
|
247
|
+
1. Review the PRD with stakeholders
|
|
248
|
+
2. Validate against metaspecs (if available)
|
|
249
|
+
3. Obtain approval to start implementation
|
|
250
|
+
4. **Via MCP**: Update the issue in the task manager with status "Ready for Development"
|
|
251
|
+
5. **Fallback**: Document approval in `./.sessions/<ISSUE-ID>/prd.md`
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
**Provided arguments**:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
#$ARGUMENTS
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## 🎯 Next Step
|
|
264
|
+
|
|
265
|
+
After PRD approval, run:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
/orchestrate <ISSUE-ID>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
This derives the minimum agent graph from the spec and executes it. `/start` + `/plan` + `/work` remain available as manual escape hatches.
|
|
272
|
+
|
|
273
|
+
This command will start feature development.
|