@aslomon/effectum 0.1.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 +633 -0
- package/bin/install.js +652 -0
- package/package.json +29 -0
- package/system/README.md +118 -0
- package/system/commands/build-fix.md +89 -0
- package/system/commands/cancel-ralph.md +90 -0
- package/system/commands/checkpoint.md +63 -0
- package/system/commands/code-review.md +120 -0
- package/system/commands/e2e.md +92 -0
- package/system/commands/plan.md +111 -0
- package/system/commands/ralph-loop.md +163 -0
- package/system/commands/refactor-clean.md +104 -0
- package/system/commands/tdd.md +84 -0
- package/system/commands/verify.md +71 -0
- package/system/stacks/generic.md +96 -0
- package/system/stacks/nextjs-supabase.md +114 -0
- package/system/stacks/python-fastapi.md +140 -0
- package/system/stacks/swift-ios.md +136 -0
- package/system/templates/AUTONOMOUS-WORKFLOW.md +1368 -0
- package/system/templates/CLAUDE.md.tmpl +141 -0
- package/system/templates/guardrails.md.tmpl +39 -0
- package/system/templates/settings.json.tmpl +201 -0
- package/workshop/knowledge/01-prd-template.md +275 -0
- package/workshop/knowledge/02-questioning-framework.md +209 -0
- package/workshop/knowledge/03-decomposition-guide.md +234 -0
- package/workshop/knowledge/04-examples.md +435 -0
- package/workshop/knowledge/05-quality-checklist.md +166 -0
- package/workshop/knowledge/06-network-map-guide.md +413 -0
- package/workshop/knowledge/07-prompt-templates.md +315 -0
- package/workshop/knowledge/08-workflow-modes.md +198 -0
- package/workshop/projects/_example-project/PROJECT.md +33 -0
- package/workshop/projects/_example-project/notes/decisions.md +15 -0
- package/workshop/projects/_example-project/notes/discovery-log.md +9 -0
- package/workshop/templates/PROJECT.md +25 -0
- package/workshop/templates/network-map.mmd +13 -0
- package/workshop/templates/prd.md +133 -0
- package/workshop/templates/requirements-map.md +48 -0
- package/workshop/templates/shared-contracts.md +89 -0
- package/workshop/templates/vision.md +66 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# Prompt Templates for Handoff
|
|
2
|
+
|
|
3
|
+
Ready-to-use prompt templates for handing PRDs to Claude Code and other AI agents. Copy the appropriate template, fill in the placeholders, and paste into the agent.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Standard Prompt
|
|
8
|
+
|
|
9
|
+
For normal Claude Code sessions using `/plan` → `/tdd` → `/verify`.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Implement the following feature autonomously from database to frontend.
|
|
13
|
+
|
|
14
|
+
<workflow>
|
|
15
|
+
1. /plan — Create implementation plan, wait for approval
|
|
16
|
+
2. After approval: /tdd (tests first, then code)
|
|
17
|
+
3. /verify after each phase
|
|
18
|
+
4. /e2e for critical user journeys
|
|
19
|
+
5. /code-review at the end
|
|
20
|
+
6. Do NOT commit — show the final git diff
|
|
21
|
+
</workflow>
|
|
22
|
+
|
|
23
|
+
<prd>
|
|
24
|
+
[INSERT COMPLETE PRD HERE]
|
|
25
|
+
</prd>
|
|
26
|
+
|
|
27
|
+
<context>
|
|
28
|
+
- Project: [project name/path]
|
|
29
|
+
- Supabase Project ID: [ID] (if applicable)
|
|
30
|
+
- Follow existing patterns in: [relevant files/directories]
|
|
31
|
+
- DESIGN.md: [path to DESIGN.md]
|
|
32
|
+
</context>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**When to use:** Most features. You review the plan, then the agent executes autonomously with test-driven development. You stay in the loop at key checkpoints.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Full-Auto Prompt
|
|
40
|
+
|
|
41
|
+
Agent makes its own decisions and commits when tests are green.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Implement the following feature fully autonomously. Make your own decisions.
|
|
45
|
+
Commit when all tests are green and the build passes.
|
|
46
|
+
|
|
47
|
+
<workflow>
|
|
48
|
+
1. Read the PRD and existing code
|
|
49
|
+
2. Plan implementation (no approval needed)
|
|
50
|
+
3. Implement with TDD (tests first, then code)
|
|
51
|
+
4. Run quality gates after each phase
|
|
52
|
+
5. When ALL gates pass: commit with a descriptive message
|
|
53
|
+
</workflow>
|
|
54
|
+
|
|
55
|
+
<quality_gates>
|
|
56
|
+
- Build: `pnpm build` — 0 errors
|
|
57
|
+
- Types: `tsc --noEmit` — 0 errors
|
|
58
|
+
- Tests: `pnpm vitest run` — all pass, 80%+ coverage on new code
|
|
59
|
+
- Lint: `pnpm lint` — 0 errors, 0 warnings
|
|
60
|
+
- E2E: `npx playwright test` — all pass (if applicable)
|
|
61
|
+
- Security: `/code-review` — no OWASP vulnerabilities
|
|
62
|
+
- RLS: Supabase security advisor — no warnings (if DB changes)
|
|
63
|
+
- No Debug Logs: 0 `console.log` in production code
|
|
64
|
+
- Type Safety: no `any`, no `as` casts in new code
|
|
65
|
+
- File Size: no file exceeds 300 lines
|
|
66
|
+
[ADD PROJECT-SPECIFIC GATES]
|
|
67
|
+
</quality_gates>
|
|
68
|
+
|
|
69
|
+
<autonomy_rules>
|
|
70
|
+
- Design: Follow DESIGN.md
|
|
71
|
+
- Libraries: Use existing dependencies only
|
|
72
|
+
- Architecture: Follow existing patterns in src/
|
|
73
|
+
- On ambiguity: Decide autonomously and document in code comments
|
|
74
|
+
</autonomy_rules>
|
|
75
|
+
|
|
76
|
+
<prd>
|
|
77
|
+
[INSERT COMPLETE PRD HERE]
|
|
78
|
+
</prd>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**When to use:** Small to medium features where you trust the agent's judgment. Best for well-defined PRDs with clear acceptance criteria.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Ralph Loop Prompt
|
|
86
|
+
|
|
87
|
+
Full autonomy with structured iteration loop, quality gates, and a completion promise.
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
/ralph-loop Implement [feature name] per the PRD below.
|
|
91
|
+
|
|
92
|
+
<workflow>
|
|
93
|
+
Each iteration:
|
|
94
|
+
1. Check current state (git diff, test results)
|
|
95
|
+
2. Implement the next logical step
|
|
96
|
+
3. Run quality gates after every significant change
|
|
97
|
+
4. When ALL criteria pass: output <promise>[COMPLETION PROMISE]</promise>
|
|
98
|
+
</workflow>
|
|
99
|
+
|
|
100
|
+
<quality_gates>
|
|
101
|
+
[INSERT Quality Gates section from PRD]
|
|
102
|
+
|
|
103
|
+
Example:
|
|
104
|
+
- Build: `pnpm build` — 0 errors
|
|
105
|
+
- Types: `tsc --noEmit` — 0 errors
|
|
106
|
+
- Tests: `pnpm vitest run` — all pass, 80%+ coverage on new code
|
|
107
|
+
- Lint: `pnpm lint` — 0 errors, 0 warnings
|
|
108
|
+
- E2E: `npx playwright test` — all pass (if applicable)
|
|
109
|
+
- Security: `/code-review` — no OWASP vulnerabilities
|
|
110
|
+
- RLS: Supabase security advisor — no warnings (if DB changes)
|
|
111
|
+
- No Debug Logs: 0 `console.log` in production code
|
|
112
|
+
- Type Safety: no `any`, no `as` casts in new code
|
|
113
|
+
- File Size: no file exceeds 300 lines
|
|
114
|
+
</quality_gates>
|
|
115
|
+
|
|
116
|
+
<autonomy_rules>
|
|
117
|
+
[INSERT Autonomy Rules section from PRD]
|
|
118
|
+
|
|
119
|
+
Example:
|
|
120
|
+
- Design: Follow DESIGN.md
|
|
121
|
+
- Libraries: Use existing dependencies only
|
|
122
|
+
- Architecture: Follow existing patterns in src/lib/
|
|
123
|
+
- File structure: Follow project conventions
|
|
124
|
+
- On ambiguity: Decide autonomously and document
|
|
125
|
+
</autonomy_rules>
|
|
126
|
+
|
|
127
|
+
<prd>
|
|
128
|
+
[INSERT COMPLETE PRD]
|
|
129
|
+
</prd>
|
|
130
|
+
|
|
131
|
+
--max-iterations [N] --completion-promise '[COMPLETION PROMISE]'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**When to use:** Complex features where you want fully autonomous execution with built-in guardrails. The agent iterates until the completion promise is satisfied or max iterations are reached.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Express Prompt
|
|
139
|
+
|
|
140
|
+
For small features that do not need a full plan phase.
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Quick feature implementation. Skip the plan phase, go straight to TDD.
|
|
144
|
+
|
|
145
|
+
<workflow>
|
|
146
|
+
1. /tdd — Write tests from acceptance criteria, then implement
|
|
147
|
+
2. /verify — Ensure everything passes
|
|
148
|
+
3. Do NOT commit — show the final git diff
|
|
149
|
+
</workflow>
|
|
150
|
+
|
|
151
|
+
<prd>
|
|
152
|
+
[INSERT PRD — can be minimal for small features]
|
|
153
|
+
</prd>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**When to use:** Tiny features (1-3 ACs), bugfixes with clear reproduction steps, or additions to existing patterns.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Bugfix Prompt
|
|
161
|
+
|
|
162
|
+
For fixing a specific bug with a regression test.
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
Fix the following bug. Add a regression test that would have caught it.
|
|
166
|
+
|
|
167
|
+
<bug>
|
|
168
|
+
**What happens:** [Describe the current broken behavior]
|
|
169
|
+
**What should happen:** [Describe the expected correct behavior]
|
|
170
|
+
**Steps to reproduce:**
|
|
171
|
+
1. [Step 1]
|
|
172
|
+
2. [Step 2]
|
|
173
|
+
3. [Step 3]
|
|
174
|
+
**Error message / screenshot:** [If available]
|
|
175
|
+
</bug>
|
|
176
|
+
|
|
177
|
+
<workflow>
|
|
178
|
+
1. Write a failing test that reproduces the bug
|
|
179
|
+
2. Fix the bug (minimal change)
|
|
180
|
+
3. Verify the test passes
|
|
181
|
+
4. /verify — Ensure no regressions
|
|
182
|
+
5. Do NOT commit — show the final git diff
|
|
183
|
+
</workflow>
|
|
184
|
+
|
|
185
|
+
<context>
|
|
186
|
+
- Likely location: [file path or module where the bug probably lives]
|
|
187
|
+
- Related files: [other files that may be affected]
|
|
188
|
+
</context>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**When to use:** Known bugs with clear reproduction steps. The regression test ensures the bug does not return.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Refactoring Prompt
|
|
196
|
+
|
|
197
|
+
For improving code quality without changing behavior.
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Refactor the following code. All existing tests must continue to pass.
|
|
201
|
+
No behavior changes — only structural improvements.
|
|
202
|
+
|
|
203
|
+
<scope>
|
|
204
|
+
**Files to refactor:**
|
|
205
|
+
- [file path 1]
|
|
206
|
+
- [file path 2]
|
|
207
|
+
|
|
208
|
+
**Refactoring goals:**
|
|
209
|
+
- [Goal 1: e.g., Extract service layer from component]
|
|
210
|
+
- [Goal 2: e.g., Split file exceeding 300 lines]
|
|
211
|
+
- [Goal 3: e.g., Replace any types with proper types]
|
|
212
|
+
</scope>
|
|
213
|
+
|
|
214
|
+
<constraints>
|
|
215
|
+
- All existing tests must pass without modification
|
|
216
|
+
- No new dependencies
|
|
217
|
+
- No behavior changes (refactoring only)
|
|
218
|
+
- Follow existing project patterns
|
|
219
|
+
</constraints>
|
|
220
|
+
|
|
221
|
+
<workflow>
|
|
222
|
+
1. Run existing tests to establish baseline
|
|
223
|
+
2. Refactor incrementally (one change at a time)
|
|
224
|
+
3. Run tests after each change
|
|
225
|
+
4. /verify at the end
|
|
226
|
+
5. Do NOT commit — show the final git diff
|
|
227
|
+
</workflow>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**When to use:** Code cleanup, splitting large files, extracting services, improving types. Never combined with feature work.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Max-Iterations Guide
|
|
235
|
+
|
|
236
|
+
How many iterations to allocate based on PRD complexity.
|
|
237
|
+
|
|
238
|
+
| PRD Complexity | Suggested Max-Iterations | Rationale |
|
|
239
|
+
| ----------------- | ------------------------ | ------------------------------- |
|
|
240
|
+
| Bugfix | 10 | Find + Fix + Test |
|
|
241
|
+
| Small (1-3 AC) | 20 | Single endpoint, simple UI |
|
|
242
|
+
| Standard (4-8 AC) | 30 | DB + API + Frontend + Tests |
|
|
243
|
+
| Large (9+ AC) | 50 | Multi-domain, complex UI, E2E |
|
|
244
|
+
| Refactoring | 15 | Scoped changes, little new code |
|
|
245
|
+
|
|
246
|
+
**Rule of thumb:** If the agent has not converged after 70% of max-iterations, something is wrong with the PRD or the approach. Stop and reassess.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Completion Promise Examples
|
|
251
|
+
|
|
252
|
+
The completion promise is the exact phrase that must be 100% true before the agent declares the feature done.
|
|
253
|
+
|
|
254
|
+
| Feature Type | Promise |
|
|
255
|
+
| ------------- | ----------------------------------------------------------------------------------------- |
|
|
256
|
+
| Standard | "All tests pass, build succeeds, 0 lint errors, no console.log in production code" |
|
|
257
|
+
| With E2E | "All unit tests pass, all e2e tests pass, build succeeds, 0 lint errors" |
|
|
258
|
+
| Bugfix | "Bug is fixed, regression test added and passing, build succeeds" |
|
|
259
|
+
| With Supabase | "Migration applied, RLS policies active, all tests pass, build succeeds, types generated" |
|
|
260
|
+
| Refactoring | "All tests pass, no dead code, build succeeds, 0 lint errors" |
|
|
261
|
+
|
|
262
|
+
> **Note:** Any PRD that includes DB changes (new tables, schema modifications) should include "types generated" in the completion promise. This ensures the type-safety chain (DB schema → generated types → Zod schemas → API → frontend) remains intact. See the "With Supabase" row above for an example.
|
|
263
|
+
|
|
264
|
+
**Good promises are:**
|
|
265
|
+
|
|
266
|
+
- Verifiable by running commands (not subjective)
|
|
267
|
+
- Comprehensive (cover all quality gates)
|
|
268
|
+
- Specific (cannot be true if any AC fails)
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Iteration Planning (for features > 20 iterations)
|
|
273
|
+
|
|
274
|
+
For larger features, include an iteration plan in the prompt to guide the agent through phases.
|
|
275
|
+
|
|
276
|
+
```xml
|
|
277
|
+
<iteration_plan>
|
|
278
|
+
<phase name="Database" iterations="1-5">
|
|
279
|
+
- Create migration for new tables
|
|
280
|
+
- Apply migration
|
|
281
|
+
- Generate TypeScript types
|
|
282
|
+
- Verify RLS policies
|
|
283
|
+
</phase>
|
|
284
|
+
|
|
285
|
+
<phase name="Service Layer" iterations="6-12">
|
|
286
|
+
- Write service tests (failing)
|
|
287
|
+
- Implement service functions
|
|
288
|
+
- Validate with Zod schemas
|
|
289
|
+
- Run tests (passing)
|
|
290
|
+
</phase>
|
|
291
|
+
|
|
292
|
+
<phase name="API Routes" iterations="13-18">
|
|
293
|
+
- Write API route tests (failing)
|
|
294
|
+
- Implement route handlers
|
|
295
|
+
- Error handling and validation
|
|
296
|
+
- Run tests (passing)
|
|
297
|
+
</phase>
|
|
298
|
+
|
|
299
|
+
<phase name="Frontend" iterations="19-25">
|
|
300
|
+
- Write component tests (failing)
|
|
301
|
+
- Implement UI components
|
|
302
|
+
- Connect to API
|
|
303
|
+
- Run tests (passing)
|
|
304
|
+
</phase>
|
|
305
|
+
|
|
306
|
+
<phase name="Integration" iterations="26-30">
|
|
307
|
+
- E2E tests for critical paths
|
|
308
|
+
- Final quality gate check
|
|
309
|
+
- Code review pass
|
|
310
|
+
- Output completion promise
|
|
311
|
+
</phase>
|
|
312
|
+
</iteration_plan>
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**When to use:** Features with 4+ acceptance criteria and multiple layers (DB, API, frontend). Helps the agent stay on track and avoid scope creep within a single iteration.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Workflow Modes — Decision Matrix & Guide
|
|
2
|
+
|
|
3
|
+
How to choose the right workflow mode for handing off a PRD to Claude Code or another AI agent.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Workflow Mode Decision Matrix
|
|
8
|
+
|
|
9
|
+
| Criterion | Normal Session | Full-Auto | Ralph Loop |
|
|
10
|
+
| ---------------------- | ----------------------------- | ---------------------------- | -------------------------------- |
|
|
11
|
+
| **Agent stops** | 2-3 times (plan, review, end) | 0-1 times (only on error) | 0 times (until promise or max) |
|
|
12
|
+
| **You review** | Plan + final diff | Final diff only | Only if max-iterations reached |
|
|
13
|
+
| **Best for** | Most features | Small, well-defined features | Complex, multi-layer features |
|
|
14
|
+
| **PRD quality needed** | Good (score >= 2.0) | Very good (score >= 2.5) | Excellent (score >= 2.5) |
|
|
15
|
+
| **Risk tolerance** | Low | Medium | Medium-High |
|
|
16
|
+
| **Time investment** | 15-30 min active | 5 min setup, then wait | 5 min setup, then wait |
|
|
17
|
+
| **Commit control** | You commit manually | Agent commits when green | Agent commits when promise met |
|
|
18
|
+
| **Error recovery** | You intervene | Agent retries, then stops | Agent iterates, then stops |
|
|
19
|
+
| **Command chain** | /plan → /tdd → /verify | Single prompt, agent decides | /ralph-loop with gates + promise |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Quick Recommendation Rules
|
|
24
|
+
|
|
25
|
+
1. **Not sure?** → Use Normal Session. It is the safest default.
|
|
26
|
+
2. **Small feature, clear PRD?** → Full-Auto. Fastest for simple work.
|
|
27
|
+
3. **Complex feature, excellent PRD?** → Ralph Loop. Most autonomous for big work.
|
|
28
|
+
4. **Bugfix with reproduction steps?** → Express (skip plan, straight to TDD).
|
|
29
|
+
5. **Refactoring only?** → Normal Session with refactoring prompt. Behavior must not change.
|
|
30
|
+
6. **Multiple PRDs, large project?** → Normal Session per PRD, sequential execution.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## When to Use Each Mode
|
|
35
|
+
|
|
36
|
+
### Normal Session
|
|
37
|
+
|
|
38
|
+
Best choice when:
|
|
39
|
+
|
|
40
|
+
- You are working on a feature for the first time in a new codebase
|
|
41
|
+
- The PRD has [ASSUMPTION] or [NEEDS CLARIFICATION] tags remaining
|
|
42
|
+
- You want to review the implementation plan before execution
|
|
43
|
+
- The feature touches critical systems (auth, billing, data migration)
|
|
44
|
+
- You want to learn from the agent's approach
|
|
45
|
+
|
|
46
|
+
Avoid when:
|
|
47
|
+
|
|
48
|
+
- You have done similar features before and trust the patterns
|
|
49
|
+
- The feature is straightforward and well-defined
|
|
50
|
+
|
|
51
|
+
### Full-Auto
|
|
52
|
+
|
|
53
|
+
Best choice when:
|
|
54
|
+
|
|
55
|
+
- The PRD scores >= 2.5 on the readiness checklist
|
|
56
|
+
- The feature follows existing patterns in the codebase
|
|
57
|
+
- You have done similar features before
|
|
58
|
+
- The feature is small to medium (1-8 ACs)
|
|
59
|
+
- You want to minimize your time investment
|
|
60
|
+
|
|
61
|
+
Avoid when:
|
|
62
|
+
|
|
63
|
+
- The feature touches auth, billing, or sensitive data for the first time
|
|
64
|
+
- The codebase does not have established patterns to follow
|
|
65
|
+
- The PRD has ambiguities or unresolved questions
|
|
66
|
+
|
|
67
|
+
### Ralph Loop
|
|
68
|
+
|
|
69
|
+
Best choice when:
|
|
70
|
+
|
|
71
|
+
- The PRD is comprehensive and scores >= 2.5
|
|
72
|
+
- The feature is complex (8+ ACs, multiple layers)
|
|
73
|
+
- You want fully autonomous execution with guardrails
|
|
74
|
+
- You have well-defined quality gates
|
|
75
|
+
- You trust the completion promise to be accurate
|
|
76
|
+
|
|
77
|
+
Avoid when:
|
|
78
|
+
|
|
79
|
+
- The PRD is incomplete or has unresolved questions
|
|
80
|
+
- The feature requires design decisions you want to make
|
|
81
|
+
- You are unfamiliar with the codebase
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Autonomy Levels
|
|
86
|
+
|
|
87
|
+
| Level | Agent Stops | Your Time | Best For |
|
|
88
|
+
| --------- | ----------- | --------- | --------------------------------- |
|
|
89
|
+
| Standard | 2-3 times | 15-30 min | Most features, first-time setups |
|
|
90
|
+
| High | 0-1 times | 5-10 min | Well-defined features, patterns |
|
|
91
|
+
| Full Auto | 0 times | 2-5 min | Simple features, trusted codebase |
|
|
92
|
+
|
|
93
|
+
### Standard Autonomy (Normal Session)
|
|
94
|
+
|
|
95
|
+
- Agent creates plan → waits for approval
|
|
96
|
+
- Agent implements → waits for review at phase boundaries
|
|
97
|
+
- Agent runs final quality check → waits for commit approval
|
|
98
|
+
|
|
99
|
+
### High Autonomy (Full-Auto)
|
|
100
|
+
|
|
101
|
+
- Agent reads PRD → implements without plan approval
|
|
102
|
+
- Agent commits when all quality gates pass
|
|
103
|
+
- Agent stops only on unrecoverable errors
|
|
104
|
+
|
|
105
|
+
### Full Autonomy (Ralph Loop)
|
|
106
|
+
|
|
107
|
+
- Agent iterates in a loop until completion promise is met
|
|
108
|
+
- No human intervention unless max-iterations reached
|
|
109
|
+
- Quality gates are checked automatically each iteration
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Command Chains by Feature Type
|
|
114
|
+
|
|
115
|
+
### New Feature (Standard)
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
/plan → approve → /tdd → /verify → /e2e → /code-review → commit
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Bugfix (Express)
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
/tdd (write failing test) → fix → /verify → commit
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Large Feature (Ralph Loop)
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
/ralph-loop --max-iterations 50 --completion-promise '...'
|
|
131
|
+
→ Agent loops: implement → test → check gates → repeat
|
|
132
|
+
→ Outputs <promise>...</promise> when done
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Refactoring (Normal Session)
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Run tests (baseline) → refactor → /verify → /code-review → commit
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Performance Optimization
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
/plan (identify bottlenecks) → benchmark → optimize → benchmark → /verify → commit
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Agent Teams — When to Scale Up
|
|
150
|
+
|
|
151
|
+
### Subagents (Default, Always Available)
|
|
152
|
+
|
|
153
|
+
Use Task tool to spawn focused agents for parallel work.
|
|
154
|
+
|
|
155
|
+
**When to use Subagents:**
|
|
156
|
+
|
|
157
|
+
- Research tasks (explore codebase, read docs)
|
|
158
|
+
- Code reviews of specific files
|
|
159
|
+
- Independent test writing
|
|
160
|
+
- Type checking or linting analysis
|
|
161
|
+
- Any task that does not modify files
|
|
162
|
+
|
|
163
|
+
**Example:**
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
Task: "Analyze the data model in src/lib/billing/ and summarize the schema"
|
|
167
|
+
Task: "Review src/components/auth/ for accessibility issues"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Agent Teams (Opt-In, Experimental)
|
|
171
|
+
|
|
172
|
+
Independent Claude instances working on separate branches.
|
|
173
|
+
|
|
174
|
+
**When to use Agent Teams:**
|
|
175
|
+
|
|
176
|
+
- 3+ independent workstreams in parallel
|
|
177
|
+
- Each workstream has its own PRD or clear scope
|
|
178
|
+
- Work does not overlap (different files/directories)
|
|
179
|
+
- Feature is large enough to justify coordination overhead
|
|
180
|
+
|
|
181
|
+
**When NOT to use Agent Teams:**
|
|
182
|
+
|
|
183
|
+
- Single PRD with sequential steps
|
|
184
|
+
- Work that requires shared state or coordination
|
|
185
|
+
- Small features (overhead > benefit)
|
|
186
|
+
- Tightly coupled code where merge conflicts are likely
|
|
187
|
+
|
|
188
|
+
### Decision Table
|
|
189
|
+
|
|
190
|
+
| Scenario | Approach |
|
|
191
|
+
| ---------------------------- | ------------ |
|
|
192
|
+
| Single feature, any size | Single Agent |
|
|
193
|
+
| Research + implementation | Subagents |
|
|
194
|
+
| 2 independent features | Subagents |
|
|
195
|
+
| 3+ independent PRDs | Agent Teams |
|
|
196
|
+
| Frontend + Backend + DB | Agent Teams |
|
|
197
|
+
| Bugfix | Single Agent |
|
|
198
|
+
| Code review + implementation | Subagents |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "TaskFlow"
|
|
3
|
+
slug: "taskflow"
|
|
4
|
+
status: "ready"
|
|
5
|
+
target_repo: "github.com/example/taskflow"
|
|
6
|
+
tech_stack: "Next.js 16, Supabase, Tailwind CSS v4, Shadcn UI"
|
|
7
|
+
created: "2026-03-15"
|
|
8
|
+
updated: "2026-03-20"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# TaskFlow
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
A lightweight AI-powered project management tool for small teams (3-15 people). Teams can organize work, track progress via Kanban boards, and get AI-generated insights without enterprise complexity.
|
|
16
|
+
|
|
17
|
+
## PRD Index
|
|
18
|
+
|
|
19
|
+
| # | PRD | Status | Readiness Score | Last Updated |
|
|
20
|
+
| --- | ------------------------ | --------- | --------------- | ------------ |
|
|
21
|
+
| 001 | Auth & Org Setup | ready | 2.8 | 2026-03-17 |
|
|
22
|
+
| 002 | Projects & Tasks | ready | 2.6 | 2026-03-18 |
|
|
23
|
+
| 003 | AI Insights | drafting | 1.5 | 2026-03-19 |
|
|
24
|
+
| 004 | Notifications & Activity | discovery | — | 2026-03-20 |
|
|
25
|
+
|
|
26
|
+
## Notes
|
|
27
|
+
|
|
28
|
+
- Created: 2026-03-15
|
|
29
|
+
- Multi-tenant from day one (org_id on every table)
|
|
30
|
+
- MVP target: 8 weeks
|
|
31
|
+
- PRD-001 and PRD-002 are ready for handoff
|
|
32
|
+
- PRD-003 needs data model and API design completion
|
|
33
|
+
- PRD-004 is still in discovery phase
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Decision Log — TaskFlow
|
|
2
|
+
|
|
3
|
+
Record of key decisions made during PRD development.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## [date] — [Decision Title]
|
|
8
|
+
|
|
9
|
+
**Context:** [Why this decision was needed]
|
|
10
|
+
|
|
11
|
+
**Decision:** [What was decided]
|
|
12
|
+
|
|
13
|
+
**Alternatives considered:** [What else was considered]
|
|
14
|
+
|
|
15
|
+
**Rationale:** [Why this option was chosen]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "[Project Name]"
|
|
3
|
+
slug: "[project-slug]"
|
|
4
|
+
status: "discovery"
|
|
5
|
+
target_repo: ""
|
|
6
|
+
tech_stack: ""
|
|
7
|
+
created: "[YYYY-MM-DD]"
|
|
8
|
+
updated: "[YYYY-MM-DD]"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# [Project Name]
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
[1-2 sentence project description]
|
|
16
|
+
|
|
17
|
+
## PRD Index
|
|
18
|
+
|
|
19
|
+
| # | PRD | Status | Readiness Score | Last Updated |
|
|
20
|
+
| --- | --- | ------ | --------------- | ------------ |
|
|
21
|
+
| — | — | — | — | — |
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
|
|
25
|
+
- Created: [date]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
graph TB
|
|
2
|
+
%% Project Network Map
|
|
3
|
+
%% Status: planned (gray), inProgress (blue), done (green)
|
|
4
|
+
|
|
5
|
+
%% === FEATURES ===
|
|
6
|
+
%% Add features as nodes here
|
|
7
|
+
|
|
8
|
+
%% === CONNECTIONS ===
|
|
9
|
+
%% Add dependencies here
|
|
10
|
+
|
|
11
|
+
classDef planned fill:#f3f4f6,stroke:#9ca3af,stroke-width:2px,color:#374151
|
|
12
|
+
classDef inProgress fill:#dbeafe,stroke:#3b82f6,stroke-width:2px,color:#1e40af
|
|
13
|
+
classDef done fill:#dcfce7,stroke:#22c55e,stroke-width:2px,color:#166534
|