Skip to content

BumpyClock/agent-templates / skills/programming

programming

Unverified

Implement, debug, refactor, or review code with scoped changes and evidence.

Programming

Use project constraints and established context. Scale planning, exploration, and verification to uncertainty and the consequences of being wrong.

Establish the contract

  • Identify the requested outcome, affected consumers, invariants, compatibility requirements, and evidence of completion. Inspect the relevant owners, callers, and checks; reuse facts already established.
  • For defects, reproduce or characterize the failure, test a discriminating hypothesis, and fix the responsible layer. When reproduction is unavailable, distinguish the suspected cause from what the evidence establishes.

Keep the design coherent

  • Make the smallest complete change that leaves the affected design coherent. Prefer existing owners and idioms. Avoid unrelated cleanup, parallel mechanisms, and capabilities built for hypothetical needs.
  • Reduce what maintainers must understand and coordinate. Judge abstractions by the complexity they hide or invariants they enforce, not caller counts or function length. Keep single-use logic inline unless a helper hides a complex boundary or its name makes the caller clearer.
  • Give each business rule one authoritative owner. Share code when consumers represent the same concept and should change together; similar syntax alone is insufficient.
  • Encode recurring, important invariants in types, constraints, lints, or tests when enforcement is more reliable than reminders.
  • Make states, ownership, and dependencies explicit. Use types and data structures to prevent relevant invalid states. Validate untrusted input once at the boundary that owns it and pass typed values inward; do not recheck values that a schema, constructor, or internal type already guarantees. Enforce authorization and mutable-state invariants where they can change.
  • For stateful or asynchronous changes, examine authoritative state, ordering, partial failure, retries, cancellation, cleanup, and resource bounds where relevant. Make failures observable; recover only when the resulting behavior remains valid.
  • Refactor in behavior-preserving steps. Capture uncertain existing behavior before changing it. Migrate controlled callers coherently; preserve external and stored-data contracts unless their migration is authorized. Give necessary compatibility bridges a removal condition.
  • Explain non-obvious intent, constraints, or tradeoffs in comments. Preserve useful contract documentation, safety notes, licenses, and directives; remove comments that merely restate code.
  • Reason from first principles. Open a principle when its trigger matches the decision at hand.
  • Do not chase edge cases that are unlikely or impossible in practice, such as a theoretical race or security scenario. Each guard for one widens the scope and invites the next. Prefer a design that makes the path impossible. Otherwise leave the guard out and note the case in the final report: what could go wrong, how likely it is, and what the guard would cost, in plain words. A case that the affected contract or a reference names as expected is in scope; handle it.

Verify and finish

  • Choose the smallest reliable checks covering the changed contract and material risks. Use integration or end-to-end checks when correctness spans boundaries. Respect required project gates and reuse valid evidence.
  • Test outcomes, failures, and invariants with expectations independent of the implementation. A plausible behavioral defect should fail the relevant check; a behavior-preserving internal rewrite should normally pass.
  • Add durable tests for meaningful regression risk or coverage gaps. Keep temporary probes temporary. Repeat or broaden verification only when changes, failures, unresolved risk, or required gates justify it.
  • For performance work, measure a representative baseline and compare equivalent workloads after the change. Preserve correctness; bound claims to what was measured.
  • Reuse existing diagnostics. Retain only useful, low-noise instrumentation. Update affected contracts and documentation when the change makes them inaccurate.
  • Complete implementation, integration, and necessary verification within the authorized scope. Review-only requests end with findings. Report the result, consequential decisions, verification, and unresolved limits.
  • When options are otherwise equal, choose the one that serves the user experience, developer experience, and agent experience together.

Conditional references

Open references only when their specific guidance is needed. They provide task detail; they do not make every change require a separate workflow, design contest, or principle catalogue.

NeedReference
Defect with an unknown causeFix Root Causes
Coordinated feature workFeature
Requested refactor or structural migrationRefactoring
Unresolved module ownership or interface decisionCodebase design
Code reviewReview rubric
Error handling, fallback, or retry reviewSilent failures
Domain type or state-machine reviewType design
Browser UI or React behaviorWeb development
Performance investigationPerformance; live process; capture analysis, as applicable
Platform-specific workApple, WinUI, GPUI, or TypeScript contracts
Persistent telemetry changesTelemetry
Requested commits, PRs, or release workGit and releases

Principles

Open a principle when its trigger matches. Most changes need none or one.

TriggerPrinciple
Two or more fixes that share one premise failed the same checkAttack the Premise
Validation, error handling, or framework adaptersBoundary Discipline
Repetitive or bulk edits, migrations, analyses, or checksBuild the Lever
Work could use separate contexts or parallel executionDelegate After the Contract
The same instruction or correction recursEncode Lessons in Structure
Novel UI interaction or architecture decision with no precedentExhaust the Design Space
Product, UX, or feature-scope tradeoffExperience First
Measuring, or acting on a measured numberExplain the Number
DebuggingFix Root Causes
Choosing core types, data structures, or scaffold orderFoundational Thinking
Tempted to add an abstraction, layer, or signal threadingLaziness Protocol
Commands or loops that run amid crashes, restarts, or retriesMake Operations Idempotent
New internal API while old callers existMigrate Callers Then Delete Legacy APIs
Code is hard to traceMinimize Reader Load
Stateful logic, heavy branching, or a repeated shape assumptionModel the Domain
Tempted to ask permission for reversible workNever Block on the Human
Planned rewrite or migration with phase boundariesOutcome-Oriented Execution
Before declaring a task doneProve It Works
A new requirement strains an existing designRedesign from First Principles
Concurrent actors may write the same file, branch, key, or stateSeparate Before Serializing Shared State
Multi-step sweeps, migrations, or stacked commits and PRsSequence Verifiable Units
Sequencing an addition, refactor, or rewriteSubtract Before You Add
Writing, changing, or keeping a testTest Behavior, Not Implementation
Designing types or function signaturesType System Discipline
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 318kUpdated Claude CodeCodexUnverifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 318kUpdated Claude CodeCodexUnverifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 318kUpdated Claude CodeCodexUnverifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall