feat(skills): Add beads-aware workflow skills
New skills for integrated beads + humanlayer workflow:
- beads_research.md: Research with per-bead artifact storage
- beads_plan.md: Planning with bead linking
- beads_implement.md: Implementation with per-plan checkpoints
- beads_iterate.md: Plan iteration with version history
- beads_workflow.md: Comprehensive workflow documentation
Skills output to thoughts/beads-{id}/ for artifact storage
and automatically update bead notes with artifact links.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
218
home/roles/development/skills/beads_implement.md
Normal file
218
home/roles/development/skills/beads_implement.md
Normal file
@@ -0,0 +1,218 @@
|
||||
---
|
||||
description: Implement a plan from thoughts/ for a bead issue
|
||||
---
|
||||
|
||||
# Beads Implement
|
||||
|
||||
You are tasked with implementing an approved plan for a bead issue. Plans are stored in `thoughts/beads-{id}/plan.md`.
|
||||
|
||||
## Initial Setup
|
||||
|
||||
When this command is invoked:
|
||||
|
||||
1. **Parse the input for bead ID**:
|
||||
- If a bead ID is provided, use it
|
||||
- If no bead ID, check for beads with plans:
|
||||
```bash
|
||||
bd list --status=in_progress
|
||||
```
|
||||
Then check which have plans in `thoughts/beads-{id}/plan.md`
|
||||
|
||||
2. **Load bead and plan context**:
|
||||
```bash
|
||||
bd show {bead-id}
|
||||
```
|
||||
- Read `thoughts/beads-{bead-id}/plan.md` FULLY
|
||||
- Check for any existing checkmarks (- [x]) indicating partial progress
|
||||
- Read any research at `thoughts/beads-{bead-id}/research.md`
|
||||
|
||||
3. **Mark bead in progress** (if not already):
|
||||
```bash
|
||||
bd update {bead-id} --status=in_progress
|
||||
```
|
||||
|
||||
4. **Respond with**:
|
||||
```
|
||||
Implementing plan for bead {bead-id}: {bead-title}
|
||||
|
||||
Plan location: thoughts/beads-{bead-id}/plan.md
|
||||
{If partial progress: "Resuming from Phase X - previous phases completed."}
|
||||
|
||||
I'll implement each phase and verify success criteria before proceeding.
|
||||
```
|
||||
|
||||
## Implementation Process
|
||||
|
||||
### Step 1: Understand the Plan
|
||||
|
||||
1. **Read the plan completely**
|
||||
2. **Check for existing progress** (checkmarked items)
|
||||
3. **Read all files mentioned in the plan**
|
||||
4. **Create a TodoWrite list** tracking each phase
|
||||
|
||||
### Step 2: Implement Each Phase
|
||||
|
||||
For each phase in the plan:
|
||||
|
||||
1. **Announce the phase**:
|
||||
```
|
||||
## Starting Phase {N}: {Phase Name}
|
||||
|
||||
This phase will: {overview from plan}
|
||||
```
|
||||
|
||||
2. **Make the changes**:
|
||||
- Follow the plan's specific instructions
|
||||
- Use Edit tool for modifications
|
||||
- Create new files only when specified
|
||||
|
||||
3. **Run automated verification**:
|
||||
- Execute each command in "Automated Verification"
|
||||
- Fix any issues before proceeding
|
||||
|
||||
4. **Update plan checkboxes**:
|
||||
- Use Edit tool to check off completed items in the plan
|
||||
- This enables resume if session is interrupted
|
||||
|
||||
5. **Update bead notes** with progress:
|
||||
```bash
|
||||
bd update {bead-id} --notes="Phase {N} complete. Automated verification passed."
|
||||
```
|
||||
|
||||
### Step 3: Per-Plan Checkpoint
|
||||
|
||||
**CRITICAL**: After completing ALL phases and ALL automated verification:
|
||||
|
||||
```
|
||||
## Implementation Complete - Ready for Manual Verification
|
||||
|
||||
All phases completed and automated verification passed:
|
||||
- [ ] Phase 1: {name} - DONE
|
||||
- [ ] Phase 2: {name} - DONE
|
||||
- [ ] ...
|
||||
|
||||
**Automated checks passed:**
|
||||
- {List of automated checks that passed}
|
||||
|
||||
**Please perform manual verification:**
|
||||
- {List manual verification items from plan}
|
||||
|
||||
Let me know when manual testing is complete so I can close the bead.
|
||||
```
|
||||
|
||||
**STOP HERE and wait for user confirmation.**
|
||||
|
||||
Do NOT:
|
||||
- Close the bead automatically
|
||||
- Proceed to "next steps" without confirmation
|
||||
- Start additional work
|
||||
|
||||
### Step 4: After Manual Verification
|
||||
|
||||
When user confirms manual verification passed:
|
||||
|
||||
1. **Update plan status**:
|
||||
- Edit the plan's frontmatter: `status: complete`
|
||||
|
||||
2. **Close the bead**:
|
||||
```bash
|
||||
bd close {bead-id} --reason="Implementation complete. All verification passed."
|
||||
```
|
||||
|
||||
3. **Final summary**:
|
||||
```
|
||||
Bead {bead-id} closed.
|
||||
|
||||
Summary:
|
||||
- {What was implemented}
|
||||
- {Key changes made}
|
||||
|
||||
Artifacts:
|
||||
- Plan: thoughts/beads-{bead-id}/plan.md
|
||||
- {Any other artifacts created}
|
||||
```
|
||||
|
||||
## Handling Issues
|
||||
|
||||
### When something doesn't match the plan:
|
||||
|
||||
```
|
||||
Issue in Phase {N}:
|
||||
|
||||
Expected: {what the plan says}
|
||||
Found: {actual situation}
|
||||
Why this matters: {explanation}
|
||||
|
||||
Options:
|
||||
1. Adapt the implementation to work with current state
|
||||
2. Update the plan to reflect reality
|
||||
3. Stop and investigate further
|
||||
|
||||
How should I proceed?
|
||||
```
|
||||
|
||||
### When tests fail:
|
||||
|
||||
1. **Analyze the failure**
|
||||
2. **Attempt to fix** if the fix is clear and within scope
|
||||
3. **If fix is unclear**, report:
|
||||
```
|
||||
Test failure in Phase {N}:
|
||||
|
||||
Failing test: {test name}
|
||||
Error: {error message}
|
||||
|
||||
I've attempted: {what you tried}
|
||||
|
||||
This may require: {your assessment}
|
||||
```
|
||||
|
||||
### When blocked:
|
||||
|
||||
```
|
||||
Blocked in Phase {N}:
|
||||
|
||||
Blocker: {description}
|
||||
Impact: {what can't proceed}
|
||||
|
||||
Suggested resolution: {your recommendation}
|
||||
```
|
||||
|
||||
## Resuming Work
|
||||
|
||||
If the plan has existing checkmarks:
|
||||
|
||||
1. **Trust completed work** - don't re-verify unless something seems off
|
||||
2. **Pick up from first unchecked item**
|
||||
3. **Verify previous work only if** current phase depends on it and seems broken
|
||||
|
||||
## Important Guidelines
|
||||
|
||||
1. **Follow the plan's intent** while adapting to reality
|
||||
2. **Implement each phase fully** before moving to next
|
||||
3. **Update checkboxes in real-time** as you complete items
|
||||
4. **One checkpoint per plan** - not per phase
|
||||
5. **Never close bead** without manual verification confirmation
|
||||
6. **Keep bead notes updated** with progress
|
||||
|
||||
## Session Close Protocol
|
||||
|
||||
If you need to end the session before completion:
|
||||
|
||||
1. **Update plan** with current progress (checkboxes)
|
||||
2. **Update bead notes**:
|
||||
```bash
|
||||
bd update {bead-id} --notes="In progress: Phase {N} partially complete. Next: {what's next}"
|
||||
```
|
||||
3. **Inform user** of status and how to resume
|
||||
|
||||
## Example Invocation
|
||||
|
||||
```
|
||||
User: /beads:implement nixos-configs-abc123
|
||||
Assistant: Implementing plan for bead nixos-configs-abc123...
|
||||
|
||||
## Starting Phase 1: Database Schema
|
||||
|
||||
This phase will add the new user_preferences table...
|
||||
```
|
||||
Reference in New Issue
Block a user