agileflow 2.50.0 → 2.55.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.
- package/README.md +82 -460
- package/package.json +18 -3
- package/scripts/agileflow-configure.js +134 -63
- package/scripts/agileflow-welcome.js +161 -31
- package/scripts/generators/agent-registry.js +2 -2
- package/scripts/generators/command-registry.js +6 -6
- package/scripts/generators/index.js +2 -6
- package/scripts/generators/inject-babysit.js +9 -2
- package/scripts/generators/inject-help.js +3 -1
- package/scripts/generators/inject-readme.js +7 -3
- package/scripts/generators/skill-registry.js +5 -5
- package/scripts/get-env.js +13 -12
- package/scripts/obtain-context.js +396 -185
- package/scripts/session-coordinator.sh +232 -0
- package/scripts/session-manager.js +512 -0
- package/src/core/agents/orchestrator.md +275 -0
- package/src/core/commands/adr.md +38 -16
- package/src/core/commands/agent.md +39 -22
- package/src/core/commands/assign.md +17 -0
- package/src/core/commands/auto.md +60 -46
- package/src/core/commands/babysit.md +302 -637
- package/src/core/commands/baseline.md +20 -0
- package/src/core/commands/blockers.md +33 -48
- package/src/core/commands/board.md +19 -0
- package/src/core/commands/changelog.md +20 -0
- package/src/core/commands/ci.md +17 -0
- package/src/core/commands/context.md +43 -40
- package/src/core/commands/debt.md +76 -45
- package/src/core/commands/deploy.md +20 -0
- package/src/core/commands/deps.md +40 -46
- package/src/core/commands/diagnose.md +24 -18
- package/src/core/commands/docs.md +18 -0
- package/src/core/commands/epic.md +31 -0
- package/src/core/commands/feedback.md +33 -21
- package/src/core/commands/handoff.md +29 -0
- package/src/core/commands/help.md +16 -7
- package/src/core/commands/impact.md +31 -61
- package/src/core/commands/metrics.md +17 -35
- package/src/core/commands/packages.md +21 -0
- package/src/core/commands/pr.md +15 -0
- package/src/core/commands/readme-sync.md +42 -9
- package/src/core/commands/research.md +58 -11
- package/src/core/commands/retro.md +42 -50
- package/src/core/commands/review.md +22 -27
- package/src/core/commands/session/end.md +53 -297
- package/src/core/commands/session/history.md +38 -257
- package/src/core/commands/session/init.md +44 -446
- package/src/core/commands/session/new.md +152 -0
- package/src/core/commands/session/resume.md +51 -447
- package/src/core/commands/session/status.md +32 -244
- package/src/core/commands/sprint.md +33 -0
- package/src/core/commands/status.md +18 -0
- package/src/core/commands/story-validate.md +32 -0
- package/src/core/commands/story.md +21 -6
- package/src/core/commands/template.md +18 -0
- package/src/core/commands/tests.md +22 -0
- package/src/core/commands/update.md +72 -58
- package/src/core/commands/validate-expertise.md +25 -37
- package/src/core/commands/velocity.md +33 -74
- package/src/core/commands/verify.md +16 -0
- package/src/core/experts/documentation/expertise.yaml +16 -2
- package/src/core/skills/agileflow-retro-facilitator/SKILL.md +57 -219
- package/src/core/skills/agileflow-retro-facilitator/cookbook/4ls.md +86 -0
- package/src/core/skills/agileflow-retro-facilitator/cookbook/glad-sad-mad.md +79 -0
- package/src/core/skills/agileflow-retro-facilitator/cookbook/start-stop-continue.md +142 -0
- package/src/core/skills/agileflow-retro-facilitator/prompts/action-items.md +83 -0
- package/src/core/skills/writing-skills/SKILL.md +352 -0
- package/src/core/skills/writing-skills/testing-skills-with-subagents.md +232 -0
- package/tools/cli/agileflow-cli.js +4 -2
- package/tools/cli/commands/config.js +20 -13
- package/tools/cli/commands/doctor.js +25 -9
- package/tools/cli/commands/list.js +10 -6
- package/tools/cli/commands/setup.js +54 -3
- package/tools/cli/commands/status.js +6 -8
- package/tools/cli/commands/uninstall.js +5 -5
- package/tools/cli/commands/update.js +51 -7
- package/tools/cli/installers/core/installer.js +8 -4
- package/tools/cli/installers/ide/_base-ide.js +3 -1
- package/tools/cli/installers/ide/claude-code.js +3 -7
- package/tools/cli/installers/ide/codex.js +440 -0
- package/tools/cli/installers/ide/manager.js +2 -6
- package/tools/cli/lib/content-injector.js +3 -3
- package/tools/cli/lib/docs-setup.js +3 -2
- package/tools/cli/lib/npm-utils.js +3 -3
- package/tools/cli/lib/ui.js +7 -7
- package/tools/cli/lib/version-checker.js +3 -3
- package/tools/postinstall.js +2 -3
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agileflow-orchestrator
|
|
3
|
+
description: Multi-expert orchestrator that coordinates parallel domain experts. Has ONLY Task/TaskOutput tools - MUST delegate all work.
|
|
4
|
+
tools: Task, TaskOutput
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- COMPACT_SUMMARY_START -->
|
|
9
|
+
|
|
10
|
+
## Compact Summary
|
|
11
|
+
|
|
12
|
+
**Role**: Orchestrator that coordinates multiple domain experts in parallel. Has ONLY Task and TaskOutput tools — CANNOT do work itself, MUST delegate.
|
|
13
|
+
|
|
14
|
+
### Critical Rules
|
|
15
|
+
- **NO FILE TOOLS** — Cannot Read, Write, Edit, Bash, Glob, or Grep
|
|
16
|
+
- **MUST DELEGATE** — All work done by spawning domain experts via Task
|
|
17
|
+
- **PARALLEL BY DEFAULT** — Use `run_in_background: true` for independent work
|
|
18
|
+
- **BATCH SPAWNS** — Deploy ALL experts in ONE message
|
|
19
|
+
- **COLLECT ALL** — Use TaskOutput with `block: true` to wait for each expert
|
|
20
|
+
- **SYNTHESIZE** — Combine results into unified response with conflicts noted
|
|
21
|
+
|
|
22
|
+
### Workflow
|
|
23
|
+
1. **Analyze** → Identify domains (API, UI, Database, etc.)
|
|
24
|
+
2. **Plan** → Parallel vs sequential based on dependencies
|
|
25
|
+
3. **Deploy** → Spawn experts via Task
|
|
26
|
+
4. **Collect** → TaskOutput for each expert
|
|
27
|
+
5. **Synthesize** → Unified response with conflicts + next steps
|
|
28
|
+
|
|
29
|
+
### Domain Expert Mapping
|
|
30
|
+
| Keywords | Expert | subagent_type |
|
|
31
|
+
|----------|--------|---------------|
|
|
32
|
+
| database, schema, SQL | Database | agileflow-database |
|
|
33
|
+
| API, endpoint, REST | API | agileflow-api |
|
|
34
|
+
| component, UI, frontend | UI | agileflow-ui |
|
|
35
|
+
| test, spec, coverage | Testing | agileflow-testing |
|
|
36
|
+
| security, auth, JWT | Security | agileflow-security |
|
|
37
|
+
| CI, workflow, pipeline | CI | agileflow-ci |
|
|
38
|
+
| deploy, Docker | DevOps | agileflow-devops |
|
|
39
|
+
| docs, README | Documentation | agileflow-documentation |
|
|
40
|
+
|
|
41
|
+
<!-- COMPACT_SUMMARY_END -->
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# AgileFlow Orchestrator
|
|
46
|
+
|
|
47
|
+
You coordinate parallel domain experts. You CANNOT do work yourself.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## YOUR TOOLS
|
|
52
|
+
|
|
53
|
+
**You have ONLY:**
|
|
54
|
+
- `Task` — Spawn domain experts
|
|
55
|
+
- `TaskOutput` — Collect expert results
|
|
56
|
+
|
|
57
|
+
**You CANNOT:**
|
|
58
|
+
- Read files
|
|
59
|
+
- Write files
|
|
60
|
+
- Edit files
|
|
61
|
+
- Run commands
|
|
62
|
+
- Search code
|
|
63
|
+
|
|
64
|
+
**You MUST delegate ALL work to domain experts.**
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## HOW IT WORKS
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
USER REQUEST (via babysit)
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
┌─────────────────────────────────────┐
|
|
75
|
+
│ ORCHESTRATOR (you) │
|
|
76
|
+
│ 1. Analyze domains needed │
|
|
77
|
+
│ 2. Spawn experts in parallel │
|
|
78
|
+
│ 3. Collect results │
|
|
79
|
+
│ 4. Synthesize unified response │
|
|
80
|
+
└─────────────────────────────────────┘
|
|
81
|
+
│
|
|
82
|
+
┌────┴────┬────────┐
|
|
83
|
+
▼ ▼ ▼
|
|
84
|
+
┌────────┐ ┌────────┐ ┌────────┐
|
|
85
|
+
│API │ │UI │ │Testing │ ← Experts do the work
|
|
86
|
+
│Expert │ │Expert │ │Expert │
|
|
87
|
+
└────────┘ └────────┘ └────────┘
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## WORKFLOW
|
|
93
|
+
|
|
94
|
+
### Step 1: Analyze Request
|
|
95
|
+
|
|
96
|
+
Identify domains:
|
|
97
|
+
|
|
98
|
+
| Request | Domains |
|
|
99
|
+
|---------|---------|
|
|
100
|
+
| "Add user profile with API and UI" | API + UI |
|
|
101
|
+
| "Add login with tests" | API + Security + Testing |
|
|
102
|
+
| "Refactor database and update API" | Database + API |
|
|
103
|
+
| "Full-stack feature with CI" | Database + API + UI + Testing + CI |
|
|
104
|
+
|
|
105
|
+
### Step 2: Plan Parallel vs Sequential
|
|
106
|
+
|
|
107
|
+
**Parallel** (independent work):
|
|
108
|
+
- API + UI
|
|
109
|
+
- Tests + Docs
|
|
110
|
+
- Security + Performance analysis
|
|
111
|
+
|
|
112
|
+
**Sequential** (dependent work):
|
|
113
|
+
- Database schema → then API
|
|
114
|
+
- API endpoint → then UI
|
|
115
|
+
- Implementation → then tests
|
|
116
|
+
|
|
117
|
+
### Step 3: Deploy Experts
|
|
118
|
+
|
|
119
|
+
**Deploy ALL parallel experts in ONE message:**
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Task(
|
|
123
|
+
description: "Implement profile API",
|
|
124
|
+
prompt: "Create /api/profile endpoint with GET/PUT...",
|
|
125
|
+
subagent_type: "agileflow-api",
|
|
126
|
+
run_in_background: true
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
Task(
|
|
130
|
+
description: "Implement profile UI",
|
|
131
|
+
prompt: "Create ProfilePage component...",
|
|
132
|
+
subagent_type: "agileflow-ui",
|
|
133
|
+
run_in_background: true
|
|
134
|
+
)
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Step 4: Collect Results
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
TaskOutput(task_id: "<api_expert_id>", block: true)
|
|
141
|
+
TaskOutput(task_id: "<ui_expert_id>", block: true)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Step 5: Synthesize
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
## Orchestration Complete
|
|
148
|
+
|
|
149
|
+
### API Expert Results
|
|
150
|
+
- Created `/api/profile` endpoint
|
|
151
|
+
- Files: `src/routes/profile.ts`
|
|
152
|
+
|
|
153
|
+
### UI Expert Results
|
|
154
|
+
- Created `ProfilePage` component
|
|
155
|
+
- Files: `src/components/ProfilePage.tsx`
|
|
156
|
+
|
|
157
|
+
### Integration Points
|
|
158
|
+
- UI calls `GET /api/profile` on mount
|
|
159
|
+
|
|
160
|
+
### Conflicts/Issues
|
|
161
|
+
- None detected
|
|
162
|
+
|
|
163
|
+
### Next Steps
|
|
164
|
+
1. Wire ProfilePage to router
|
|
165
|
+
2. Add form validation
|
|
166
|
+
3. Write integration tests
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## DOMAIN EXPERTS
|
|
172
|
+
|
|
173
|
+
| Domain | Expert | When to Use |
|
|
174
|
+
|--------|--------|-------------|
|
|
175
|
+
| **Database** | `agileflow-database` | Schema, migrations, queries |
|
|
176
|
+
| **API** | `agileflow-api` | Endpoints, routes, business logic |
|
|
177
|
+
| **UI** | `agileflow-ui` | Components, styling, frontend |
|
|
178
|
+
| **Testing** | `agileflow-testing` | Unit, integration, e2e tests |
|
|
179
|
+
| **Security** | `agileflow-security` | Auth, vulnerabilities, audits |
|
|
180
|
+
| **CI/CD** | `agileflow-ci` | Pipelines, workflows |
|
|
181
|
+
| **DevOps** | `agileflow-devops` | Deploy, infrastructure |
|
|
182
|
+
| **Documentation** | `agileflow-documentation` | Docs, READMEs |
|
|
183
|
+
| **Performance** | `agileflow-performance` | Optimization, profiling |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## PARALLEL PATTERNS
|
|
188
|
+
|
|
189
|
+
### Full-Stack Feature
|
|
190
|
+
```
|
|
191
|
+
Parallel:
|
|
192
|
+
- agileflow-api (endpoint)
|
|
193
|
+
- agileflow-ui (component)
|
|
194
|
+
Then:
|
|
195
|
+
- agileflow-testing (tests)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Code Review/Analysis
|
|
199
|
+
```
|
|
200
|
+
Parallel (analyze same code):
|
|
201
|
+
- agileflow-security
|
|
202
|
+
- agileflow-performance
|
|
203
|
+
- agileflow-testing
|
|
204
|
+
Then:
|
|
205
|
+
- Synthesize findings
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Best-of-N
|
|
209
|
+
```
|
|
210
|
+
Parallel (same task, different approaches):
|
|
211
|
+
- Expert A (approach 1)
|
|
212
|
+
- Expert B (approach 2)
|
|
213
|
+
- Expert C (approach 3)
|
|
214
|
+
Then:
|
|
215
|
+
- Compare and select best
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## CONFLICT RESOLUTION
|
|
221
|
+
|
|
222
|
+
When experts produce conflicting outputs:
|
|
223
|
+
|
|
224
|
+
1. **Note the conflict** in synthesis
|
|
225
|
+
2. **Present both options** with trade-offs
|
|
226
|
+
3. **Recommend one** based on:
|
|
227
|
+
- Consistency with existing patterns
|
|
228
|
+
- Simplicity
|
|
229
|
+
- Performance
|
|
230
|
+
4. **Ask for decision** if unclear
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## EXAMPLE
|
|
235
|
+
|
|
236
|
+
**Request**: "Add user profile with API and React component"
|
|
237
|
+
|
|
238
|
+
**Response**:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
Coordinating multi-domain request.
|
|
242
|
+
|
|
243
|
+
Domains detected:
|
|
244
|
+
- API (profile endpoint)
|
|
245
|
+
- UI (profile component)
|
|
246
|
+
|
|
247
|
+
These are independent — deploying in parallel.
|
|
248
|
+
|
|
249
|
+
[Spawning API Expert...]
|
|
250
|
+
[Spawning UI Expert...]
|
|
251
|
+
[Collecting results...]
|
|
252
|
+
|
|
253
|
+
## Orchestration Complete
|
|
254
|
+
|
|
255
|
+
### API Expert ✅
|
|
256
|
+
- GET /api/profile - fetch profile
|
|
257
|
+
- PUT /api/profile - update profile
|
|
258
|
+
- Files: src/routes/profile.ts
|
|
259
|
+
|
|
260
|
+
### UI Expert ✅
|
|
261
|
+
- ProfilePage component
|
|
262
|
+
- Form with name, email, bio
|
|
263
|
+
- Files: src/components/ProfilePage.tsx
|
|
264
|
+
|
|
265
|
+
### Integration
|
|
266
|
+
- Wire in App.tsx router
|
|
267
|
+
- UI imports API functions
|
|
268
|
+
|
|
269
|
+
### Next Steps
|
|
270
|
+
1. Add route in App.tsx
|
|
271
|
+
2. Test integration
|
|
272
|
+
3. Add validation
|
|
273
|
+
|
|
274
|
+
Proceed with integration?
|
|
275
|
+
```
|
package/src/core/commands/adr.md
CHANGED
|
@@ -16,30 +16,33 @@ node .agileflow/scripts/obtain-context.js adr
|
|
|
16
16
|
<!-- COMPACT_SUMMARY_START -->
|
|
17
17
|
## Compact Summary
|
|
18
18
|
|
|
19
|
-
**Command**: `adr`
|
|
20
|
-
**Purpose**: Create Architecture Decision Records (ADRs) documenting important architectural choices
|
|
19
|
+
**Command**: `adr` - Create Architecture Decision Records (ADRs) documenting architectural choices
|
|
21
20
|
|
|
22
21
|
**Quick Usage**:
|
|
23
22
|
```
|
|
24
23
|
/agileflow:adr NUMBER=0042 TITLE="Use PostgreSQL for persistence" CONTEXT="Need reliable ACID database" DECISION="PostgreSQL chosen over MongoDB" CONSEQUENCES="Better data integrity, steeper learning curve"
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
**What It Does**:
|
|
28
|
-
1. Parses input parameters (NUMBER, TITLE, CONTEXT, DECISION, CONSEQUENCES, optional LINKS)
|
|
29
|
-
2. Creates ADR file at `docs/03-decisions/adr-<NUMBER>-<slug>.md` using template
|
|
30
|
-
3. Shows preview and waits for YES/NO confirmation
|
|
31
|
-
4. Writes file if approved
|
|
26
|
+
**What It Does**: Parse inputs → Create ADR file → Show preview → Write if approved
|
|
32
27
|
|
|
33
|
-
|
|
34
|
-
- Frontmatter (number, title, date, status, tags)
|
|
35
|
-
- Context section (why decision needed)
|
|
36
|
-
- Decision section (what was chosen)
|
|
37
|
-
- Consequences section (trade-offs and impacts)
|
|
38
|
-
- Optional links to related docs
|
|
28
|
+
### Tool Usage Examples
|
|
39
29
|
|
|
40
|
-
**
|
|
41
|
-
```
|
|
42
|
-
|
|
30
|
+
**TodoWrite** (to track ADR creation):
|
|
31
|
+
```xml
|
|
32
|
+
<invoke name="TodoWrite">
|
|
33
|
+
<parameter name="content">1. Parse inputs (NUMBER, TITLE, CONTEXT, DECISION, CONSEQUENCES, LINKS)
|
|
34
|
+
2. Create docs/03-decisions/adr-<NUMBER>-<slug>.md from template
|
|
35
|
+
3. Show preview and wait for YES/NO confirmation</parameter>
|
|
36
|
+
<parameter name="status">in-progress</parameter>
|
|
37
|
+
<parameter name="activeForm">1</parameter>
|
|
38
|
+
</invoke>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Write** (to create ADR file):
|
|
42
|
+
```xml
|
|
43
|
+
<invoke name="Write">
|
|
44
|
+
<parameter name="file_path">/full/path/to/docs/03-decisions/adr-0042-postgresql.md</parameter>
|
|
45
|
+
<parameter name="content">---
|
|
43
46
|
number: 0042
|
|
44
47
|
title: Use PostgreSQL for persistence
|
|
45
48
|
date: 2025-12-22
|
|
@@ -59,8 +62,27 @@ We will use PostgreSQL as our primary database...
|
|
|
59
62
|
- Better data integrity and reliability
|
|
60
63
|
- Team needs PostgreSQL training
|
|
61
64
|
- Slightly higher operational complexity than NoSQL
|
|
65
|
+
|
|
66
|
+
## Related
|
|
67
|
+
- [ADR-0041: Database selection process](adr-0041-db-selection.md)
|
|
68
|
+
- [US-0055: Database migration](../06-stories/US-0055.md)</parameter>
|
|
69
|
+
</invoke>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**AskUserQuestion** (for confirmation):
|
|
73
|
+
```xml
|
|
74
|
+
<invoke name="AskUserQuestion">
|
|
75
|
+
<parameter name="questions">[{"question": "Create this ADR?", "header": "Preview", "multiSelect": false, "options": [{"label": "Yes, create ADR", "description": "Write ADR-0042 to docs/03-decisions/"}, {"label": "No, abort", "description": "Cancel without creating"}]}]</parameter>
|
|
76
|
+
</invoke>
|
|
62
77
|
```
|
|
63
78
|
|
|
79
|
+
**Template Structure**:
|
|
80
|
+
- Frontmatter (number, title, date, status, tags)
|
|
81
|
+
- Context section (why decision needed)
|
|
82
|
+
- Decision section (what was chosen)
|
|
83
|
+
- Consequences section (trade-offs and impacts)
|
|
84
|
+
- Optional links to related docs
|
|
85
|
+
|
|
64
86
|
**Best Practices**:
|
|
65
87
|
- Number ADRs sequentially (0001, 0002, etc.)
|
|
66
88
|
- Write context before decision (explain the "why")
|
|
@@ -16,35 +16,22 @@ node .agileflow/scripts/obtain-context.js agent
|
|
|
16
16
|
<!-- COMPACT_SUMMARY_START -->
|
|
17
17
|
## Compact Summary
|
|
18
18
|
|
|
19
|
-
**Command**: `agent`
|
|
20
|
-
**Purpose**: Onboard new agents with profiles and system prompts (contracts)
|
|
19
|
+
**Command**: `agent` - Onboard new agents with profiles and system prompts (contracts)
|
|
21
20
|
|
|
22
21
|
**Quick Usage**:
|
|
23
22
|
```
|
|
24
23
|
/agileflow:agent AGENT_ID=AG-UI ROLE="Frontend Developer" TOOLS="Read,Write,Bash" SCOPE="src/components/,US-00*"
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
**What It Does**:
|
|
28
|
-
1. Creates agent profile at `docs/02-practices/prompts/agents/agent-<AGENT_ID>.md`
|
|
29
|
-
2. Updates `docs/09-agents/roster.yaml` with agent mapping
|
|
30
|
-
3. Generates persona snippet to paste as terminal system prompt
|
|
26
|
+
**What It Does**: Create agent profile → Update roster → Generate system prompt snippet
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
- Agent ID (e.g., AG-UI, AG-API, AG-CI)
|
|
34
|
-
- Role and responsibilities
|
|
35
|
-
- Available tools (Read, Write, Edit, Bash, etc.)
|
|
36
|
-
- Scope boundaries (directories, story tags)
|
|
37
|
-
- System prompt (contract with strict rules)
|
|
38
|
-
|
|
39
|
-
**Contract Rules Include**:
|
|
40
|
-
- Scope boundaries (what files/stories agent can touch)
|
|
41
|
-
- Commit/branch rules (naming conventions)
|
|
42
|
-
- Test requirements (when to run tests)
|
|
43
|
-
- Status/bus update protocols
|
|
28
|
+
### Tool Usage Examples
|
|
44
29
|
|
|
45
|
-
**
|
|
46
|
-
```
|
|
47
|
-
|
|
30
|
+
**Write** (to create agent profile):
|
|
31
|
+
```xml
|
|
32
|
+
<invoke name="Write">
|
|
33
|
+
<parameter name="file_path">/full/path/to/docs/02-practices/prompts/agents/agent-AG-UI.md</parameter>
|
|
34
|
+
<parameter name="content">---
|
|
48
35
|
agent_id: AG-UI
|
|
49
36
|
role: Frontend Developer
|
|
50
37
|
tools: [Read, Write, Edit, Bash, Glob]
|
|
@@ -62,9 +49,39 @@ Build and maintain user interface components...
|
|
|
62
49
|
**Scope**: Only modify files in src/components/ and src/pages/
|
|
63
50
|
**Testing**: Run `npm test` before committing
|
|
64
51
|
**Commits**: Prefix with "feat(ui):" or "fix(ui):"
|
|
65
|
-
**Status**: Update status.json after completing stories
|
|
52
|
+
**Status**: Update status.json after completing stories</parameter>
|
|
53
|
+
</invoke>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Edit** (to update roster.yaml):
|
|
57
|
+
```xml
|
|
58
|
+
<invoke name="Edit">
|
|
59
|
+
<parameter name="file_path">/full/path/to/docs/09-agents/roster.yaml</parameter>
|
|
60
|
+
<parameter name="old_string">agents: []</parameter>
|
|
61
|
+
<parameter name="new_string">agents:
|
|
62
|
+
- id: AG-UI
|
|
63
|
+
role: Frontend Developer
|
|
64
|
+
tools: [Read, Write, Edit, Bash, Glob]
|
|
65
|
+
scope:
|
|
66
|
+
directories: [src/components/, src/pages/]
|
|
67
|
+
story_tags: [frontend, ui, ux]</parameter>
|
|
68
|
+
</invoke>
|
|
66
69
|
```
|
|
67
70
|
|
|
71
|
+
**AskUserQuestion** (optional, for confirmation):
|
|
72
|
+
```xml
|
|
73
|
+
<invoke name="AskUserQuestion">
|
|
74
|
+
<parameter name="questions">[{"question": "Create this agent profile?", "header": "Onboarding", "multiSelect": false, "options": [{"label": "Yes, create profile", "description": "Create agent-AG-UI.md and update roster"}, {"label": "No, cancel", "description": "Cancel without creating"}]}]</parameter>
|
|
75
|
+
</invoke>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Profile Components**:
|
|
79
|
+
- Agent ID (e.g., AG-UI, AG-API, AG-CI)
|
|
80
|
+
- Role and responsibilities
|
|
81
|
+
- Available tools (Read, Write, Edit, Bash, etc.)
|
|
82
|
+
- Scope boundaries (directories, story tags)
|
|
83
|
+
- System prompt (contract with strict rules)
|
|
84
|
+
|
|
68
85
|
**Best Practices**:
|
|
69
86
|
- Use descriptive agent IDs (AG-UI, AG-API, not AG-001)
|
|
70
87
|
- Define clear scope boundaries to prevent conflicts
|
|
@@ -64,6 +64,23 @@ node .agileflow/scripts/obtain-context.js assign
|
|
|
64
64
|
- Validate JSON after every update
|
|
65
65
|
- Use appropriate status transitions (ready → in-progress → in-review → done)
|
|
66
66
|
|
|
67
|
+
**Tool Usage Examples**:
|
|
68
|
+
|
|
69
|
+
AskUserQuestion:
|
|
70
|
+
```xml
|
|
71
|
+
<invoke name="AskUserQuestion">
|
|
72
|
+
<parameter name="questions">[{
|
|
73
|
+
"question": "Assign US-0042 to AG-UI as in-progress?",
|
|
74
|
+
"header": "Confirm Assignment",
|
|
75
|
+
"multiSelect": false,
|
|
76
|
+
"options": [
|
|
77
|
+
{"label": "Yes, assign", "description": "Update story and status.json"},
|
|
78
|
+
{"label": "No, cancel", "description": "Don't assign"}
|
|
79
|
+
]
|
|
80
|
+
}]</parameter>
|
|
81
|
+
</invoke>
|
|
82
|
+
```
|
|
83
|
+
|
|
67
84
|
<!-- COMPACT_SUMMARY_END -->
|
|
68
85
|
|
|
69
86
|
## Prompt
|
|
@@ -15,68 +15,82 @@ node .agileflow/scripts/obtain-context.js auto
|
|
|
15
15
|
<!-- COMPACT_SUMMARY_START -->
|
|
16
16
|
## Compact Summary
|
|
17
17
|
|
|
18
|
-
**Command**: `auto-story`
|
|
19
|
-
**Purpose**: Auto-generate user stories from PRDs, mockups, API specs, or design docs
|
|
18
|
+
**Command**: `auto-story` - Auto-generate user stories from PRDs, mockups, API specs, or design docs
|
|
20
19
|
|
|
21
20
|
**Quick Usage**:
|
|
22
21
|
```
|
|
23
22
|
/agileflow:auto-story SOURCE=docs/requirements/auth-prd.md EPIC=EP-0010 OWNER=AG-API AUTO_CREATE=no
|
|
24
23
|
```
|
|
25
24
|
|
|
26
|
-
**What It Does**:
|
|
27
|
-
1. Reads source file/URL and identifies document type
|
|
28
|
-
2. Extracts features, requirements, and user flows
|
|
29
|
-
3. Groups related requirements into logical stories
|
|
30
|
-
4. Generates stories with Given/When/Then acceptance criteria
|
|
31
|
-
5. Shows preview with estimates and suggested owners
|
|
32
|
-
6. Creates epic (if needed), story files, and test stubs
|
|
33
|
-
7. Updates status.json and bus/log.jsonl
|
|
34
|
-
|
|
35
|
-
**Supported Source Types**:
|
|
36
|
-
- **PRDs** (.md, .docx, .pdf) → Parses features, success criteria, personas
|
|
37
|
-
- **UI Mockups** (Figma URL, .png with OCR) → Extracts screens, interactions, forms
|
|
38
|
-
- **API Docs** (OpenAPI/Swagger JSON) → Generates stories per endpoint
|
|
39
|
-
- **User Flows** (Mermaid .mmd, PlantUML) → Extracts journey steps and decision points
|
|
25
|
+
**What It Does**: Read source → Identify type → Extract requirements → Group into stories → Preview → Create files → Update status
|
|
40
26
|
|
|
41
|
-
**
|
|
42
|
-
- **Independent**: No dependencies on other stories
|
|
43
|
-
- **Negotiable**: Details can be adjusted
|
|
44
|
-
- **Valuable**: Delivers user-facing value
|
|
45
|
-
- **Estimable**: Sized 0.5-2 days
|
|
46
|
-
- **Small**: Completable in 1 sprint
|
|
47
|
-
- **Testable**: Clear acceptance criteria
|
|
27
|
+
**Supported Sources**: PRDs (.md/.pdf) | UI Mockups (Figma/PNG) | API Docs (OpenAPI/Swagger) | User Flows (Mermaid)
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
- 0.5d: Simple CRUD, basic UI component
|
|
51
|
-
- 1d: Standard feature with validation and tests
|
|
52
|
-
- 1.5d: Complex logic or integration
|
|
53
|
-
- 2d: Significant refactor or architecture change
|
|
54
|
-
- >2d: Break into smaller stories
|
|
29
|
+
### Tool Usage Examples
|
|
55
30
|
|
|
56
|
-
**
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
31
|
+
**TodoWrite** (to track auto-generation):
|
|
32
|
+
```xml
|
|
33
|
+
<invoke name="TodoWrite">
|
|
34
|
+
<parameter name="content">1. Read source file/URL
|
|
35
|
+
2. Identify document type (PRD, API spec, mockup, etc.)
|
|
36
|
+
3. Extract features and requirements
|
|
37
|
+
4. Group related requirements
|
|
38
|
+
5. Generate stories with Given/When/Then AC
|
|
39
|
+
6. Show preview with estimates and owners
|
|
40
|
+
7. Create epic (if needed)
|
|
41
|
+
8. Create story files
|
|
42
|
+
9. Create test stubs
|
|
43
|
+
10. Update status.json and bus/log.jsonl</parameter>
|
|
44
|
+
<parameter name="status">in-progress</parameter>
|
|
45
|
+
<parameter name="activeForm">1</parameter>
|
|
46
|
+
</invoke>
|
|
65
47
|
```
|
|
66
48
|
|
|
67
|
-
**
|
|
49
|
+
**Read** (to parse source documents):
|
|
50
|
+
```xml
|
|
51
|
+
<invoke name="Read">
|
|
52
|
+
<parameter name="file_path">/full/path/to/docs/requirements/auth-prd.md</parameter>
|
|
53
|
+
</invoke>
|
|
68
54
|
```
|
|
69
|
-
Story Generation Preview
|
|
70
|
-
Source: docs/requirements/auth-prd.md
|
|
71
|
-
Epic: EP-0010 (User Authentication)
|
|
72
|
-
Stories to Create: 5
|
|
73
|
-
Total Estimate: 6 days
|
|
74
55
|
|
|
75
|
-
|
|
56
|
+
**Write** (to create story files):
|
|
57
|
+
```xml
|
|
58
|
+
<invoke name="Write">
|
|
59
|
+
<parameter name="file_path">/full/path/to/docs/06-stories/EP-0010/US-0050-registration.md</parameter>
|
|
60
|
+
<parameter name="content">---
|
|
61
|
+
story_id: US-0050
|
|
62
|
+
epic: EP-0010
|
|
63
|
+
title: User registration with email verification
|
|
64
|
+
owner: AG-API
|
|
65
|
+
status: ready
|
|
66
|
+
estimate: 1.5d
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# US-0050: User registration with email verification
|
|
70
|
+
|
|
71
|
+
## Description
|
|
72
|
+
As a new user, I want to register with my email...
|
|
73
|
+
|
|
74
|
+
## Acceptance Criteria
|
|
75
|
+
- **Given** I am on the registration page
|
|
76
|
+
**When** I enter valid email and password
|
|
77
|
+
**Then** my account is created...</parameter>
|
|
78
|
+
</invoke>
|
|
76
79
|
```
|
|
77
80
|
|
|
81
|
+
**AskUserQuestion** (for confirmation):
|
|
82
|
+
```xml
|
|
83
|
+
<invoke name="AskUserQuestion">
|
|
84
|
+
<parameter name="questions">[{"question": "Create these stories?", "header": "Preview", "multiSelect": false, "options": [{"label": "Yes, create stories", "description": "Generate epic, story files, and test stubs"}, {"label": "No, cancel", "description": "Cancel without creating"}]}]</parameter>
|
|
85
|
+
</invoke>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Story Generation Rules (INVEST)**:
|
|
89
|
+
- Independent | Negotiable | Valuable | Estimable | Small | Testable
|
|
90
|
+
- Estimates: 0.5d (simple), 1d (standard), 1.5d (complex), 2d (refactor), >2d (split)
|
|
91
|
+
|
|
78
92
|
**Best Practices**:
|
|
79
|
-
- Always preview before creating (AUTO_CREATE=no
|
|
93
|
+
- Always preview before creating (AUTO_CREATE=no default)
|
|
80
94
|
- Review AI-generated stories for accuracy
|
|
81
95
|
- Add technical context manually if needed
|
|
82
96
|
- Validate estimates based on team velocity
|