Skip to content
playbookdevelopmentplanning

Development Lifecycle: Brainstorm, Plan, Execute, Verify, Review, Ship ​

This is the umbrella workflow for non-trivial feature work. Use it when you need a full path from vague problem to shipped change. The other playbooks plug into specific stages of this lifecycle.

Audience: Engineers (primary), tech leads (oversight).


What This Playbook Solves ​

This playbook prevents the common failure mode where work starts in the middle. It creates explicit transitions from problem framing to plan quality to implementation evidence to review quality.

Use This When ​

  • Any feature that will take more than a few hours of implementation
  • Any change that affects multiple files or systems
  • Any change where the "right approach" is not immediately obvious
  • Any work where you want an auditable trail of decisions

For trivial changes (single-file fix, obvious implementation path), skip directly to execution.


Lifecycle at a Glance ​

  ┌──────────────┐
  │  1. BRAINSTORM │
  │  Understand    │──── "Is the problem clear?" ──── No ──► Ask more questions
  │  the problem   │                                           │
  └──────┬─────────┘                                           │
         │ Yes                                                  │
         ▼                                                      │
  ┌──────────────┐                                             │
  │  2. PLAN       │◄──────────────────────────────────────────┘
  │  Write, find   │
  │  gaps, refine  │──── "Plan solid?" ──── No ──► Gap identification loop
  └──────┬─────────┘                                 (see iterative-planning.md)
         │ Yes
         ▼
  ┌──────────────┐
  │  3. EXECUTE    │
  │  Implement     │──── "Stuck or wrong?" ──── Yes ──► Return to Plan
  │  step by step  │
  └──────┬─────────┘
         │ Done
         ▼
  ┌──────────────┐
  │  4. VERIFY     │
  │  Tests pass?   │──── No ──► Fix, re-verify
  │  Evidence?     │
  └──────┬─────────┘
         │ Yes
         ▼
  ┌──────────────┐
  │  5. REVIEW     │
  │  Code review   │──── Findings? ──► Fix, re-review
  │  quality bar   │
  └──────┬─────────┘
         │ Clean
         ▼
  ┌──────────────┐
  │  6. SHIP       │
  │  PR / merge    │
  │  cleanup       │
  └────────────────┘

Key principle: Arrows go backward. If execution reveals a plan gap, go back to planning. If review reveals a design flaw, go back to planning. This is not a waterfall. It is a loop with forward momentum.


Stage 1: Brainstorm ​

Objective: Understand the intent before suggesting solutions.

What to Do ​

  1. Understand the problem, not the solution. Before jumping to "how," make sure you understand "what" and "why." Ask: What user problem does this solve? What does success look like? What constraints exist?

  2. Explore the current state. Read relevant code, documentation, recent commits. Understand what exists before proposing what to change.

  3. Surface alternatives. Do not commit to the first approach that comes to mind. Generate at least 2-3 alternatives and evaluate trade-offs.

  4. Identify risks early. What could go wrong? What are the dependencies? What is the blast radius if this change has a bug?

Example Prompt ​

I need to replace the accreditation system with an entitlement system.
Before we plan anything:

1. Read the current accreditation model, its tests, and the audit document.
2. What are the 3 most viable architectural approaches?
3. For each approach, what are the trade-offs (complexity, migration risk,
   feature coverage)?
4. What constraints from the existing system must we respect?

Anti-Pattern: Solutioning Too Early ​

Bad:

"Build me an entitlements table with these columns..."

Good:

"The accreditation system is too rigid for our needs. We need zone-based
access, consumable items, and automated rule-based assignment. What are
the architectural options?"

Output ​

By the end of brainstorming, you should have:

  • A clear problem statement
  • 2-3 evaluated approaches with trade-offs
  • A chosen approach with rationale
  • A list of known unknowns to investigate during planning

Stage 2: Plan ​

Objective: Produce a comprehensive implementation plan — with gaps explicitly identified and resolved — before writing any code.

This stage follows the Iterative Planning Playbook in full. That playbook covers the complete cycle: context gathering, structured first draft, explicit gap identification, stakeholder clarification, and plan hardening. Follow it end-to-end — the gap identification rounds are where most planning value comes from.

Get Sign-Off Before Coding ​

This is a gate. Do not proceed to execution until:

  • [ ] The plan has survived at least one gap identification round
  • [ ] All critical questions have been answered by the stakeholder
  • [ ] No open items remain in the "Gaps" section of the plan
  • [ ] The stakeholder has explicitly confirmed the plan

Output ​

A plan document in the repository that any developer or agent could implement from without asking clarifying questions.


Stage 3: Execute ​

Objective: Implement the plan step by step, maintaining quality throughout.

Work Through the Plan Sequentially ​

Follow the plan's structure as your implementation order. For a typical backend feature:

  1. Enums (no dependencies)
  2. Migrations (depend on enums for column constraints)
  3. Models (depend on migrations for table structure)
  4. Services (depend on models)
  5. Controllers (depend on services)
  6. Events/Observers (depend on models and services)
  7. Tests (depend on everything above)

Use Worktrees for Isolation ​

When the feature is large enough to span multiple sessions or branches of work, use git worktrees to keep your main working directory clean:

bash
git worktree add ../project-feature feature/entitlements

This lets you:

  • Keep main branch accessible for reference
  • Run the existing test suite in the main worktree while developing in the feature worktree
  • Avoid stashing/unstashing work-in-progress

Dispatch Parallel Agents for Independent Tasks ​

When the plan identifies independent work items, dispatch agents in parallel. See the Parallel Dispatch Playbook for the decision rules.

Common parallelization points:

  • Writing migrations and enum classes simultaneously (they do not depend on each other at the code level)
  • Writing model unit tests while writing controller integration tests
  • Writing separate service classes that do not call each other

Commit Frequently ​

Each commit should be a logical unit of work:

feat: add EntitlementStatus and EntitlementItemType enums
feat: add entitlements migration with full schema
feat: add Entitlement model with relationships and computed properties
feat: add EntitlementService with rule evaluation
feat: add EntitlementController with CRUD endpoints
test: add entitlement rule evaluation test scenarios

Why: Frequent commits make code review easier, git bisect useful, and rollbacks safe.

When to Loop Back to Planning ​

Return to Stage 2 if:

  • You discover the codebase works differently than the plan assumed
  • An approach from the plan turns out to be infeasible
  • New requirements emerge during implementation
  • You find yourself writing significant code that is not in the plan

Do not try to "make it work" when the plan is wrong. Fix the plan first.

Example Prompt (Agent-Assisted Execution) ​

Implement section 2.1-2.7 of the entitlement implementation plan
(database migrations). Follow the exact column definitions, types,
and constraints from the plan. Use `return new class extends Migration`
syntax. Create them in dependency order.

After creating the migrations, run them and verify they apply cleanly.

Stage 4: Verify ​

Objective: Prove the implementation works. Evidence, not assertions.

Evidence Before Assertions ​

"Tests pass" means showing test output. "It works" means showing behavior. Never claim either without evidence.

Bad:

"I've implemented the entitlement system. Tests pass."

Good:

"I've implemented the entitlement system. Here is the test output:

  PASS  Tests\Feature\EntitlementRuleTest
  ✓ rule creates entitlements for matching participants
  ✓ rule revokes entitlements when participant stops matching
  ✓ pending approval entitlements are soft-deleted when participant stops matching
  ✓ time-based rule computes quantity from shift hours

  Tests:  4 passed
  Time:   1.23s"

Verification Checklist ​

  • [ ] All new tests pass
  • [ ] Existing test suite still passes (no regressions)
  • [ ] Manual testing of happy path (if applicable)
  • [ ] Edge cases from the plan are covered by tests
  • [ ] Database migrations apply and rollback cleanly
  • [ ] No N+1 queries (check query log in tests)
  • [ ] Authorization is enforced (test unauthorized access returns 403)
  • [ ] Validation rejects invalid input (test boundary values)

Check Coverage ​

If the plan specified test scenarios, verify coverage against them:

markdown
## Test Scenario Coverage

| #   | Scenario                                                | Status  |
| --- | ------------------------------------------------------- | ------- |
| 1   | Rule creates entitlements for all matching crew members | PASS    |
| 2   | Changing crew section triggers rule re-evaluation       | PASS    |
| 3   | Pending entitlement is soft-deleted when match lost     | PASS    |
| 4   | Revoked entitlement can be re-activated by re-match     | PASS    |
| 5   | Time-based rule with tiered quantities                  | NOT YET |

Output ​

  • Test output proving all tests pass
  • Coverage report (if applicable)
  • Any known limitations or deferred items documented

Stage 5: Review ​

Objective: Systematic quality review before shipping.

Self-Review via Code-Reviewer Agent ​

Before asking for human review, run a code-reviewer agent on your changes:

Review the git diff for the entitlements feature branch.
Focus on:
1. Security: injection, auth/authz bypass, data exposure
2. Correctness: logic errors, null handling, race conditions
3. Performance: N+1 queries, missing indexes, unnecessary allocations
4. Consistency: does the code follow existing codebase patterns?

For each finding, provide: file, line, severity (P1-P4), description,
suggested fix.

Priority Order for Findings ​

PriorityCategoryAction
P1Security (injection, auth bypass, secrets)Must fix before merge
P2Correctness (logic errors, null/undefined, races)Must fix before merge
P3Performance (N+1, missing indexes)Fix if straightforward, else create ticket
P4Style/Maintainability (naming, structure)Fix if quick, else defer

Fix and Re-Review ​

After fixing P1 and P2 findings, re-run the review:

I've fixed the following findings from the code review:
- P1: Added authorization check to bulk update endpoint
- P2: Added null check before accessing participant relationship

Re-review the updated diff. Focus on whether fixes are correct and
whether they introduced new issues.

Output ​

  • Code review findings document (or no findings)
  • All P1/P2 findings resolved
  • Re-review confirmation

Next Step

For detailed guidance on structuring review phases, severity classification, and re-review cycles, see the Code Review Loops Playbook.


Stage 6: Ship ​

Objective: Get the code merged cleanly.

Decide: Merge, PR, or Cleanup ​

SituationAction
Solo project, main branchMerge directly
Team project, feature branchCreate PR
Prototype or spikeCleanup branch, then PR or discard
Large feature with multiple logical chunksSplit into stacked PRs

Write the PR Description ​

A good PR description includes:

markdown
## Summary

- Implements the entitlement system (replaces accreditations for new festivals)
- Adds rule engine with source+filter criteria, membership and time-based modes
- Clean cutover: new festivals use entitlements, old festivals keep accreditations

## Key Design Decisions

- Status is action-driven only (no computed states stored in DB)
- Rule criteria use source+filter model: each criterion selects a population,
  multiple criteria are OR-combined
- Old and new systems coexist — no feature flag gating on backend

## Test Coverage

- 47 test scenarios covering rule evaluation, status transitions, edge cases
- All P1/P2 code review findings resolved

## How to Review

- Start with `EntitlementStatus` enum and the design notes in the migration
- Then read `RuleEvaluationService` for the core logic
- Controllers follow existing `FestivalAccreditationController` patterns

Post-Merge Cleanup ​

After merging:

  • [ ] Delete the feature branch
  • [ ] Close related issues/tickets
  • [ ] Update documentation if the plan document should be archived or marked complete
  • [ ] Notify stakeholders

Real Example: Entitlements Feature ​

Here is how the lifecycle played out for an entitlement management feature. The full story is documented in the Iterative Plan Refinement case study.

Brainstorm (30 minutes) ​

  • Read the existing accreditation system audit
  • Identified 5 limitations of the current system (binary status, no rule engine, no zone hierarchy, no consumables, no time-based logic)
  • Evaluated 3 approaches: extend accreditations, parallel system with migration, clean cutover
  • Chose clean cutover based on complexity analysis

Plan (multiple sessions over 2 days) ​

  • First draft: 7 major sections, full migration schemas, enum definitions
  • Gap identification round 1: found wrong namespace assumptions, missing column names, incomplete observer triggers
  • Clarification round: 6 specific questions with options → stakeholder answered all
  • Gap identification round 2: found 16 additional observer triggers across 5 priority tiers
  • Plan hardening: cross-referenced against prototype UI, verified all namespace references
  • Final plan: comprehensive document covering enums, 10 migrations, 8 models, services, controllers, observers, and 47 test scenarios

Execute (planned) ​

  • Implementation in dependency order following the plan
  • Parallel agents for independent migration files
  • Frequent commits per logical unit

Verify (planned) ​

  • Run all 47 test scenarios
  • Verify migration apply/rollback
  • Check query performance

Review (planned) ​

  • Code-reviewer agent on full diff
  • Fix findings, re-review

Ship (planned) ​

  • PR with comprehensive description
  • Stakeholder review
  • Merge to main

Verification Checklist ​

Before each stage transition:

  • [ ] Current stage's output artifact is complete (problem statement, plan document, working code, test evidence, review findings, or PR)
  • [ ] No open questions block the next stage
  • [ ] Stakeholder has reviewed the output (where applicable)

Before shipping:

  • [ ] All six stages completed — no stages skipped
  • [ ] Plan survived at least one gap identification round
  • [ ] Test evidence shows passing output, not just assertions
  • [ ] All P1/P2 review findings resolved and re-reviewed
  • [ ] PR description includes summary, key decisions, test coverage, and review path

Superpowers Skills Mapping ​

This table maps each stage to the relevant superpowers skill:

StageSkillWhat It Does
1. BrainstormbrainstormingExplores the idea, surfaces approaches, avoids premature solutioning
2. Planwriting-plansWrites structured plans with gap identification loops
3. Executeexecuting-plansFollows the plan step-by-step, knows when to loop back
4. Verifyverification-before-completionInsists on evidence (test output, screenshots), not assertions
5. Reviewrequesting-code-reviewDispatches a code-reviewer agent, processes findings
6. Shipfinishing-a-development-branchHandles merge/PR/cleanup decisions, writes PR descriptions

How the Skills Chain Together ​

The skills are designed to be used in sequence. Each skill's output becomes the next skill's input:

brainstorming
  → produces: problem understanding, chosen approach
  → feeds into: writing-plans

writing-plans
  → produces: comprehensive plan document
  → feeds into: executing-plans

executing-plans
  → produces: working implementation
  → feeds into: verification-before-completion

verification-before-completion
  → produces: evidence of correctness
  → feeds into: requesting-code-review

requesting-code-review
  → produces: reviewed, quality-verified code
  → feeds into: finishing-a-development-branch

finishing-a-development-branch
  → produces: merged or PR-ready code