refactor(dev): restructure Claude commands/skills directories
All checks were successful
CI / check (push) Successful in 3m16s
All checks were successful
CI / check (push) Successful in 3m16s
Correct terminology mismatch: - Rename skills/ to commands/ (these are user-invokable commands) - Create new skills/ for reference materials - Move bd_workflow.md to skills/ (it's reference material) - Add micro-skills and formulas directories - Update default.nix to install both commands and skills Commands → ~/.claude/commands/ (invokable as /command-name) Skills → ~/.claude/commands/skills/ (reference materials) Formulas → ~/.beads/formulas/ (workflow templates) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
115
home/roles/development/formulas/quick-fix.formula.toml
Normal file
115
home/roles/development/formulas/quick-fix.formula.toml
Normal file
@@ -0,0 +1,115 @@
|
||||
# Quick Fix Formula
|
||||
#
|
||||
# Streamlined workflow for well-understood bugs and small fixes.
|
||||
# Skips the deep research and planning phases of RPI - get in, fix, get out.
|
||||
#
|
||||
# Use when:
|
||||
# - Bug is well-understood (you know what's broken)
|
||||
# - Fix is straightforward (no architectural decisions)
|
||||
# - Change is small (< 100 lines)
|
||||
#
|
||||
# Use RPI instead when:
|
||||
# - Root cause is unclear
|
||||
# - Multiple approaches possible
|
||||
# - Significant design decisions needed
|
||||
|
||||
formula = "quick-fix"
|
||||
description = """
|
||||
Streamlined workflow for bugs and small fixes.
|
||||
|
||||
A faster alternative to RPI for well-understood issues:
|
||||
1. Quick investigation to confirm understanding
|
||||
2. Implement the fix
|
||||
3. Verify with tests
|
||||
4. Commit and close
|
||||
|
||||
No human gates - designed for quick turnaround on obvious fixes.
|
||||
"""
|
||||
version = 1
|
||||
type = "workflow"
|
||||
|
||||
# === Variables ===
|
||||
|
||||
[vars.title]
|
||||
required = true
|
||||
description = "Brief description of the bug/fix"
|
||||
|
||||
[vars.bead_id]
|
||||
description = "Existing bead ID (creates new if not provided)"
|
||||
|
||||
[vars.test_cmd]
|
||||
default = "make test"
|
||||
description = "Command to verify the fix"
|
||||
|
||||
# === Steps ===
|
||||
|
||||
[[steps]]
|
||||
id = "investigate"
|
||||
title = "Investigate: {{title}}"
|
||||
description = """
|
||||
Quick investigation to confirm understanding of the bug.
|
||||
|
||||
Goals:
|
||||
- Locate the problematic code
|
||||
- Confirm root cause matches expectations
|
||||
- Identify files that need changes
|
||||
|
||||
This is NOT deep research - spend 5-10 minutes max.
|
||||
If the bug is more complex than expected, pivot to RPI workflow.
|
||||
|
||||
Output: Mental model of what to fix (no artifact needed).
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "fix"
|
||||
title = "Fix: {{title}}"
|
||||
needs = ["investigate"]
|
||||
description = """
|
||||
Implement the fix.
|
||||
|
||||
Guidelines:
|
||||
- Make minimal changes to fix the issue
|
||||
- Follow existing code patterns
|
||||
- Add/update tests if appropriate
|
||||
- Keep changes focused (no drive-by refactors)
|
||||
|
||||
If the fix grows beyond expectations, pause and consider:
|
||||
- Should this be an RPI workflow instead?
|
||||
- Should we split into multiple changes?
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "verify"
|
||||
title = "Verify fix"
|
||||
needs = ["fix"]
|
||||
description = """
|
||||
Verify the fix works correctly.
|
||||
|
||||
Run: {{test_cmd}}
|
||||
|
||||
Also check:
|
||||
- Bug is actually fixed (manual verification)
|
||||
- No obvious regressions introduced
|
||||
- Code compiles/builds cleanly
|
||||
|
||||
If tests fail, iterate on the fix step.
|
||||
"""
|
||||
|
||||
[[steps]]
|
||||
id = "commit"
|
||||
title = "Commit and close"
|
||||
needs = ["verify"]
|
||||
description = """
|
||||
Commit the fix and close the bead.
|
||||
|
||||
Actions:
|
||||
1. Stage changes: git add -A
|
||||
2. Commit with descriptive message: git commit -m "fix: {{title}}"
|
||||
3. Push to remote: git push
|
||||
4. Close the bead: bd close {{bead_id}}
|
||||
|
||||
Commit message should explain:
|
||||
- What was broken
|
||||
- How it was fixed
|
||||
- Any relevant context
|
||||
"""
|
||||
124
home/roles/development/formulas/rpi.formula.toml
Normal file
124
home/roles/development/formulas/rpi.formula.toml
Normal file
@@ -0,0 +1,124 @@
|
||||
# RPI Formula - Research -> Plan -> Implement
|
||||
#
|
||||
# Universal workflow for feature development with human gates.
|
||||
|
||||
formula = "rpi"
|
||||
description = """
|
||||
Research -> Plan -> Implement workflow.
|
||||
|
||||
Usage:
|
||||
bd pour rpi --var title="Add user preferences"
|
||||
bd pour rpi --var title="Auth" --var bead_id="project-abc" --var test_cmd="nix flake check"
|
||||
"""
|
||||
version = 1
|
||||
type = "workflow"
|
||||
|
||||
# ─── Variables ───
|
||||
|
||||
[vars.title]
|
||||
required = true
|
||||
description = "What are we building?"
|
||||
|
||||
[vars.bead_id]
|
||||
description = "Existing bead ID (creates new if not provided)"
|
||||
|
||||
[vars.test_cmd]
|
||||
default = "make test"
|
||||
description = "Command to run tests"
|
||||
|
||||
[vars.lint_cmd]
|
||||
default = "make lint"
|
||||
description = "Command to run linting"
|
||||
|
||||
# ─── Research Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "research"
|
||||
title = "Research: {{title}}"
|
||||
skill = "research-agents"
|
||||
description = """
|
||||
Conduct comprehensive codebase research.
|
||||
|
||||
Goals:
|
||||
- Understand current implementation
|
||||
- Identify patterns to follow
|
||||
- Find relevant files and dependencies
|
||||
- Document key discoveries
|
||||
|
||||
Output: thoughts/beads-{{bead_id}}/research.md
|
||||
"""
|
||||
|
||||
# ─── Planning Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "plan"
|
||||
title = "Plan: {{title}}"
|
||||
needs = ["research"]
|
||||
type = "human"
|
||||
skill = "planning"
|
||||
description = """
|
||||
Create detailed implementation plan based on research.
|
||||
|
||||
Goals:
|
||||
- Present understanding and clarify requirements
|
||||
- Propose design options with tradeoffs
|
||||
- Define phases with success criteria
|
||||
- Identify what we're NOT doing
|
||||
|
||||
Output: thoughts/beads-{{bead_id}}/plan.md
|
||||
"""
|
||||
|
||||
[steps.gate]
|
||||
type = "human"
|
||||
reason = "Plan approval before implementation"
|
||||
|
||||
# ─── Implementation Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "implement"
|
||||
title = "Implement: {{title}}"
|
||||
needs = ["plan"]
|
||||
description = """
|
||||
Execute the approved plan phase by phase.
|
||||
|
||||
For each phase:
|
||||
1. Make the changes
|
||||
2. Run verification: {{test_cmd}}, {{lint_cmd}}
|
||||
3. Update plan checkboxes for resumability
|
||||
|
||||
Stop and ask if encountering unexpected issues.
|
||||
"""
|
||||
|
||||
# ─── Verification Phase ───
|
||||
|
||||
[[steps]]
|
||||
id = "verify"
|
||||
title = "Manual verification"
|
||||
needs = ["implement"]
|
||||
type = "human"
|
||||
description = """
|
||||
Human confirms implementation works correctly.
|
||||
|
||||
Check: feature works, edge cases handled, no regressions.
|
||||
Tests: {{test_cmd}} | Lint: {{lint_cmd}}
|
||||
"""
|
||||
|
||||
[steps.gate]
|
||||
type = "human"
|
||||
reason = "Confirm implementation is correct"
|
||||
|
||||
# ─── Completion ───
|
||||
|
||||
[[steps]]
|
||||
id = "complete"
|
||||
title = "Close bead"
|
||||
needs = ["verify"]
|
||||
skill = "artifact-format"
|
||||
description = """
|
||||
Mark work as complete.
|
||||
|
||||
Actions:
|
||||
- bd update {{bead_id}} --notes="Implementation complete"
|
||||
- bd close {{bead_id}} --reason="Completed: {{title}}"
|
||||
- bd sync && git push
|
||||
"""
|
||||
Reference in New Issue
Block a user