Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 48 additions & 35 deletions .agent/skills/superpowers-debug/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
---
name: superpowers-debug
description: Systematic debugging: reproduce, isolate, form hypotheses, instrument, fix, and add regression tests. Use when troubleshooting errors, failing tests, or unexpected behavior.
---

# Debug Skill

## When to use this skill
- runtime errors, flaky tests, wrong outputs
- “it used to work” regressions
- performance or timeout problems (initial triage)

## Debug workflow (do not skip steps)
1. **Reproduce**
- Capture exact error, inputs, environment, command.
2. **Minimize**
- Reduce to smallest repro (one file, one function, smallest dataset).
3. **Hypotheses (2–5)**
- Rank by likelihood.
4. **Instrument**
- Add temporary logging/assertions or use existing diagnostics.
5. **Fix**
- Smallest change that removes root cause.
6. **Prevent**
- Add regression test or permanent guard/validation.
7. **Verify**
- Run the failing case + relevant suites.

## Reporting format
- Symptom
- Repro steps
- Root cause
- Fix
- Regression protection
- Verification
# Superpower Skill: Systematic Debugging

## Essence
A calm, methodical, non-reactive process for isolating the root cause of any failure,
contradiction, or unexpected behavior.

## Purpose
To resolve confusion, errors, or misalignment without frustration or chaos.
To restore clarity and forward motion.

## Activation Conditions
- User reports something “not working.”
- Antigravity detects contradictions or missing context.
- A subagent fails or produces inconsistent output.
- The system encounters ambiguity.

## Behavioral Directives
- Slow down the reasoning tempo.
- Remove assumptions.
- Identify the smallest reproducible unit of the problem.
- Ask clarifying questions only when necessary.
- Produce a clean, minimal fix.

## Methodology
1. Identify the symptom.
2. Identify the expected behavior.
3. Identify the delta between them.
4. Trace the dependency chain.
5. Isolate the root cause.
6. Propose a minimal correction.
7. Validate the correction.
8. Resume normal operation.

## Inputs
- Error messages
- Unexpected behavior
- Conflicting instructions

## Outputs
- A corrected plan
- A clarified understanding
- A stable next step

## Failure Modes
- If debugging reveals deeper structural issues, escalate to Mycelial Synthesis.

## Notes
This is the Miyagi principle of “slow is smooth, smooth is fast.”
151 changes: 103 additions & 48 deletions .agent/skills/superpowers-workflow/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,103 @@
---
name: superpowers-workflow
description: Enforces a disciplined workflow for coding, debugging, refactoring, and automation: brainstorm -> plan -> implement with verification (prefer TDD) -> review -> finish. Use for almost any non-trivial change.
---

# Superpowers Workflow

This skill defines the default operating procedure for software and automation tasks.

## When to use this skill
Use whenever the user asks to:
- build or modify code
- debug an error or failing tests
- refactor or improve quality
- design an automation workflow (e.g., API integrations, ETL, pipelines)
- add tests, reliability, or safety checks

## Activation marker (required)
Immediately after reading this skill (before any other output), run:

python .agent/skills/superpowers-workflow/scripts/record_activation.py --skill superpowers-workflow


## Default workflow (mandatory unless explicitly unnecessary)
1. **Brainstorm (short)**: clarify goal, constraints, risks, and acceptance criteria.
2. **Write a plan**: small steps (2–10 minutes each) with files + verification.
3. **Implement**: make the smallest correct change; prefer tests-first when feasible.
4. **Review pass**: correctness, edge cases, security, style, maintainability.
5. **Finish**: run verification commands, summarize changes + next steps.

## Decision tree: how much process is needed?
- **Tiny change (1 file, obvious)**:
- Do a mini-brainstorm (3 bullets), then mini-plan (3–5 steps), then implement + verify.
- **Non-trivial change**:
- Full brainstorm + plan before editing.
- **High-risk change** (auth, money, prod data, security, migrations):
- Add explicit risk controls: rollback plan, dry-run, extra tests, logging, safe defaults.

## Output rules (how you communicate)
- Always state **assumptions** if anything is ambiguous.
- Always include **verification** (commands, tests, or observable checks).
- If you must ask questions, ask **at most 3**; then proceed with best assumptions.

## Stop conditions
Pause implementation and switch to planning if:
- requirements conflict
- critical unknowns block correctness
- the change could cause data loss or security issues without safeguards
# Superpower Skill: Subagent-Driven Development

## Essence
The ability to decompose any objective into a coordinated network of specialized subagents,
each with a clear role, boundary, and deliverable.

## Purpose
To transform overwhelming or complex tasks into orchestrated multi-agent workflows.
To ensure no single agent carries the entire cognitive load.

## Activation Conditions
- User expresses overwhelm or uncertainty.
- Task involves multiple domains or steps.
- A project requires parallel reasoning or modular execution.
- Antigravity detects recursive or branching problem structures.

## Behavioral Directives
- Automatically identify natural subagent roles.
- Name each subagent according to its function.
- Define boundaries, responsibilities, and handoff rules.
- Maintain a central orchestrator that integrates outputs.
- Never overload the user with unnecessary detail.

## Methodology
1. Parse the user’s objective.
2. Identify 2–7 natural subagents.
3. Assign each subagent:
- a name
- a mission
- a deliverable
- a success condition
4. Run subagents in parallel conceptually.
5. Integrate results into a coherent whole.
6. Present the synthesis to the user.

## Inputs
- Any complex or multi-step request.
- Any ambiguous or open-ended goal.

## Outputs
- A structured multi-agent plan.
- A synthesized final result.

## Failure Modes
- If subagents conflict, escalate to Systematic Debugging.
- If the task is too small, collapse

# Create directory structure
mkdir -p ~/PAI/superpowers/skills/subagent-driven-development
mkdir -p ~/PAI/superpowers/skills/systematic-debugging
mkdir -p ~/PAI/superpowers/skills/mycelial-synthesis

# Write Subagent-Driven Development
cat > ~/PAI/superpowers/skills/subagent-driven-development/SKILL.md << 'EOF'
# Superpower Skill: Subagent-Driven Development

## Essence
The ability to decompose any objective into a coordinated network of specialized subagents,
each with a clear role, boundary, and deliverable.

## Purpose
To transform overwhelming or complex tasks into orchestrated multi-agent workflows.
To ensure no single agent carries the entire cognitive load.

## Activation Conditions
- User expresses overwhelm or uncertainty.
- Task involves multiple domains or steps.
- A project requires parallel reasoning or modular execution.
- Antigravity detects recursive or branching problem structures.

## Behavioral Directives
- Automatically identify natural subagent roles.
- Name each subagent according to its function.
- Define boundaries, responsibilities, and handoff rules.
- Maintain a central orchestrator that integrates outputs.
- Never overload the user with unnecessary detail.

## Methodology
1. Parse the user’s objective.
2. Identify 2–7 natural subagents.
3. Assign each subagent:
- a name
- a mission
- a deliverable
- a success condition
4. Run subagents in parallel conceptually.
5. Integrate results into a coherent whole.
6. Present the synthesis to the user.

## Inputs
- Any complex or multi-step request.
- Any ambiguous or open-ended goal.

## Outputs
- A structured multi-agent plan.
- A synthesized final result.

## Failure Modes
- If subagents conflict, escalate to Systematic Debugging.
- If the task is too small, collapse back to a single-agent mode.

## Notes
This is the Miyagi method of “many hands, one mind.”