Loading...
Loading...
Generate Ralph-compatible prompts for multiple related tasks. Creates phased prompts with sequential milestones, cumulative progress tracking, and phase-based completion promises. Use when creating prompts for CRUD implementations, multi-step features, staged migrations, or any work requiring multiple distinct but related tasks.
npx skill4agent add adaptationio/skrillz ralph-prompt-multi-taskGenerate a Ralph multi-task prompt for:
Tasks:
1. [Task 1]
2. [Task 2]
3. [Task 3]
Dependencies: [Task 2 depends on Task 1, etc.]
Final promise: [COMPLETION_PHRASE]| Task # | Task Name | Dependencies | Verification | Est. Complexity |
|---|---|---|---|---|
| 1 | [Name] | None | [How to verify] | Low/Med/High |
| 2 | [Name] | Task 1 | [How to verify] | Low/Med/High |
| 3 | [Name] | Task 1 | [How to verify] | Low/Med/High |
| 4 | [Name] | Tasks 2, 3 | [How to verify] | Low/Med/High |
# Multi-Task: [Overall Objective]
## Overview
[1-2 sentences describing the overall goal and scope]
## Task Inventory
| # | Task | Phase | Dependencies | Verification |
|---|------|-------|--------------|--------------|
| 1 | [Task 1] | 1 | None | [Verification] |
| 2 | [Task 2] | 2 | Task 1 | [Verification] |
| 3 | [Task 3] | 2 | Task 1 | [Verification] |
| 4 | [Task 4] | 3 | Tasks 2, 3 | [Verification] |
## Phase 1: [Phase Name] (Foundation)
### Objective
[What this phase accomplishes]
### Tasks
1. **[Task 1 Name]**
- Requirements: [Specific requirements]
- Files: [Files to create/modify]
- Verification: [How to verify]
### Phase 1 Success Criteria
- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] Tests pass: `[test command]`
### Phase 1 Checkpoint
When Phase 1 criteria met, document:Continue to Phase 2.
---
## Phase 2: [Phase Name] (Core)
### Objective
[What this phase accomplishes]
### Prerequisites
- Phase 1 complete
- [Any specific requirements]
### Tasks
2. **[Task 2 Name]**
- Requirements: [Specific requirements]
- Files: [Files to create/modify]
- Verification: [How to verify]
3. **[Task 3 Name]**
- Requirements: [Specific requirements]
- Files: [Files to create/modify]
- Verification: [How to verify]
### Phase 2 Success Criteria
- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] [Criterion 3]
- [ ] Tests pass: `[test command]`
### Phase 2 Checkpoint
When Phase 2 criteria met, document:Continue to Phase 3.
---
## Phase 3: [Phase Name] (Enhancement/Validation)
### Objective
[What this phase accomplishes]
### Prerequisites
- Phases 1-2 complete
- [Any specific requirements]
### Tasks
4. **[Task 4 Name]**
- Requirements: [Specific requirements]
- Files: [Files to create/modify]
- Verification: [How to verify]
### Phase 3 Success Criteria
- [ ] [Criterion 1]
- [ ] [Criterion 2]
- [ ] All tests pass: `[test command]`
---
## Final Verification
Run complete verification:
```bash
# All tests
[full test command]
# Integration check
[integration verification]
# Lint/Type check
[lint command]PROGRESS:
Phase 1: [COMPLETE/IN PROGRESS] - [X/Y tasks]
Phase 2: [COMPLETE/IN PROGRESS/NOT STARTED] - [X/Y tasks]
Phase 3: [COMPLETE/IN PROGRESS/NOT STARTED] - [X/Y tasks]
Overall: [X/Y tasks complete]
## Example Prompts
### Example 1: CRUD API Implementation
**Input:**
- Tasks: Create, Read (single), Read (list), Update, Delete for Products
- Dependencies: Create first, then others can be parallel
- Promise: CRUD_API_COMPLETE
**Generated Prompt:**
```markdown
# Multi-Task: Product CRUD API Implementation
## Overview
Implement complete CRUD operations for Products resource with RESTful endpoints, validation, and comprehensive tests.
## Task Inventory
| # | Task | Phase | Dependencies | Verification |
|---|------|-------|--------------|--------------|
| 1 | Product model/schema | 1 | None | Model exists, validates |
| 2 | POST /products (Create) | 2 | Task 1 | Returns 201, creates record |
| 3 | GET /products/:id (Read) | 2 | Task 1 | Returns 200, correct data |
| 4 | GET /products (List) | 2 | Task 1 | Returns array, pagination |
| 5 | PUT /products/:id (Update) | 3 | Tasks 2,3 | Returns 200, updates record |
| 6 | DELETE /products/:id | 3 | Tasks 2,3 | Returns 204, removes record |
| 7 | Integration tests | 4 | Tasks 2-6 | All scenarios pass |
## Phase 1: Foundation
### Objective
Create Product model with validation and database schema.
### Tasks
1. **Product Model**
- Requirements:
- Fields: id, name, description, price, category, createdAt, updatedAt
- Validation: name required, price > 0, category from enum
- Files: `src/models/product.ts`, `src/schemas/product.ts`
- Verification: Model compiles, validation tests pass
### Phase 1 Success Criteria
- [ ] Product model created with all fields
- [ ] Validation rules implemented
- [ ] Database migration/schema created
- [ ] Model tests pass: `npm test -- --grep "Product model"`
### Phase 1 Checkpoint
---
## Phase 2: Core CRUD Operations
### Objective
Implement Create, Read (single), and Read (list) endpoints.
### Prerequisites
- Phase 1 complete (Product model exists)
### Tasks
2. **POST /products (Create)**
- Requirements:
- Accept JSON body with product data
- Validate input using schema
- Return 201 with created product
- Return 400 for validation errors
- Files: `src/routes/products.ts`, `src/controllers/products.ts`
- Verification: `curl -X POST -H "Content-Type: application/json" -d '{"name":"Test","price":9.99,"category":"electronics"}' localhost:3000/products`
3. **GET /products/:id (Read Single)**
- Requirements:
- Return 200 with product data
- Return 404 if not found
- Files: `src/routes/products.ts`, `src/controllers/products.ts`
- Verification: `curl localhost:3000/products/1`
4. **GET /products (List)**
- Requirements:
- Return array of products
- Support pagination: page, limit query params
- Return metadata: total, page, limit, totalPages
- Files: `src/routes/products.ts`, `src/controllers/products.ts`
- Verification: `curl "localhost:3000/products?page=1&limit=10"`
### Phase 2 Success Criteria
- [ ] POST /products creates product, returns 201
- [ ] POST /products returns 400 for invalid data
- [ ] GET /products/:id returns product
- [ ] GET /products/:id returns 404 for missing
- [ ] GET /products returns paginated list
- [ ] All endpoint tests pass: `npm test -- --grep "products"`
### Phase 2 Checkpoint
---
## Phase 3: Update and Delete Operations
### Objective
Complete CRUD with Update and Delete endpoints.
### Prerequisites
- Phase 2 complete (Create and Read working)
### Tasks
5. **PUT /products/:id (Update)**
- Requirements:
- Accept JSON body with update data
- Partial updates allowed
- Return 200 with updated product
- Return 404 if not found
- Return 400 for validation errors
- Verification: `curl -X PUT -H "Content-Type: application/json" -d '{"price":19.99}' localhost:3000/products/1`
6. **DELETE /products/:id**
- Requirements:
- Return 204 on success (no content)
- Return 404 if not found
- Actually remove record from database
- Verification: `curl -X DELETE localhost:3000/products/1`
### Phase 3 Success Criteria
- [ ] PUT /products/:id updates product
- [ ] PUT returns 404 for missing, 400 for invalid
- [ ] DELETE /products/:id removes product
- [ ] DELETE returns 404 for missing
- [ ] All endpoint tests pass
### Phase 3 Checkpoint
---
## Phase 4: Integration & Validation
### Objective
Complete test coverage and integration verification.
### Tasks
7. **Integration Tests**
- Requirements:
- Full CRUD flow test (create, read, update, delete)
- Error handling tests (400, 404 scenarios)
- Pagination tests
- Edge cases (empty database, special characters)
- Files: `tests/integration/products.test.ts`
### Phase 4 Success Criteria
- [ ] Integration tests cover full CRUD flow
- [ ] Error scenarios tested
- [ ] All tests passing: `npm test`
- [ ] No TypeScript errors: `npm run typecheck`
---
## Final Verification
```bash
# All tests
npm test
# Type check
npm run typecheck
# Manual CRUD flow test
curl -X POST -H "Content-Type: application/json" -d '{"name":"Test Product","price":29.99,"category":"electronics"}' localhost:3000/products
curl localhost:3000/products
curl localhost:3000/products/1
curl -X PUT -H "Content-Type: application/json" -d '{"price":39.99}' localhost:3000/products/1
curl -X DELETE localhost:3000/products/1PROGRESS:
Phase 1: [status] - 1/1 tasks
Phase 2: [status] - 3/3 tasks
Phase 3: [status] - 2/2 tasks
Phase 4: [status] - 1/1 tasks
Overall: X/7 tasks complete
### Example 2: CI/CD Pipeline Setup
**Input:**
- Tasks: Lint, Test, Build, Deploy staging, Deploy prod
- Dependencies: Sequential progression
- Promise: PIPELINE_COMPLETE
**Generated Prompt:**
```markdown
# Multi-Task: CI/CD Pipeline Implementation
## Overview
Set up complete CI/CD pipeline with linting, testing, building, and staged deployments using GitHub Actions.
## Task Inventory
| # | Task | Phase | Dependencies | Verification |
|---|------|-------|--------------|--------------|
| 1 | Workflow file structure | 1 | None | File exists |
| 2 | Lint job | 2 | Task 1 | Workflow runs lint |
| 3 | Test job | 2 | Task 2 | Tests run in CI |
| 4 | Build job | 3 | Task 3 | Build artifacts created |
| 5 | Deploy staging | 4 | Task 4 | Staging deployment works |
| 6 | Deploy production | 4 | Task 5 | Prod deployment works |
## Phase 1: Workflow Foundation
### Tasks
1. **Workflow File Structure**
- Create `.github/workflows/ci.yml`
- Define triggers (push to main, PRs)
- Set up job structure
### Phase 1 Success Criteria
- [ ] Workflow file exists and is valid YAML
- [ ] Triggers defined for push and PR
---
## Phase 2: Quality Gates
### Tasks
2. **Lint Job**
- Run linter on all source files
- Fail pipeline if lint errors
3. **Test Job**
- Depends on lint passing
- Run full test suite
- Upload coverage report
### Phase 2 Success Criteria
- [ ] Lint job runs and catches errors
- [ ] Test job runs full suite
- [ ] Pipeline fails if tests fail
---
## Phase 3: Build
### Tasks
4. **Build Job**
- Depends on tests passing
- Create production build
- Upload build artifacts
### Phase 3 Success Criteria
- [ ] Build creates production artifacts
- [ ] Artifacts uploaded and accessible
---
## Phase 4: Deployments
### Tasks
5. **Deploy Staging**
- Automatic on main branch
- Deploy to staging environment
6. **Deploy Production**
- Manual approval required
- Deploy to production
### Phase 4 Success Criteria
- [ ] Staging auto-deploys on main
- [ ] Production requires manual trigger
- [ ] Both environments update correctly
---
## Completion
When all phases verified:
Output: <promise>PIPELINE_COMPLETE</promise>/ralph-wiggum:ralph-loop "[paste generated prompt]" --completion-promise "YOUR_PROMISE" --max-iterations 50--max-iterations 35-45--max-iterations 50-70--max-iterations 80-100ralph-prompt-single-taskralph-prompt-projectralph-prompt-research