Plan maker

From KjellKod/quest · View interactive version

Plan maker is an AI agent skill from the GitHub repository KjellKod/quest. Create implementation plans with testable acceptance criteria, validation strategies, integration touchpoints, and risk analysis before coding begins.

How to use this skill

Skill file

Plan Maker

Create implementation plans that pass the plan-reviewer checklist and unblock coding.

When to Use

Use for: Features, refactors, infrastructure, architectural changes, multi-file work

Skip for: Trivial fixes (1-2 lines), typos, pure research


Core Principles

Code Quality First

Testing Philosophy


Plan Sizing

Small (1 doc): 1-3 files, single component, clear requirements

Large (multi-doc): 4+ files, multiple components, multiple phases

→ High-level plan + phase implementation plans


Required Elements

Every plan MUST include:

1. Overview

2. Acceptance Criteria

Good: "Pre-push generates coverage.json in <2 seconds"

Bad: "Coverage works well"

3. Validation Plan

Automated Tests:

**Automated Test**: [Description]
- **File**: tests/unit/test_example.py
- **Test**: test_function_name()
- **Run**: python3 -m pytest tests/unit/test_example.py::test_function_name
- **Covers**: Happy path, edge case, error case
- **Mocking**: None (or: Mock API client)
- **Expected**: Returns dict with file paths

Manual Tests:

**MANUAL TEST**: [Description]
- **Why manual**: End-to-end workflow validation
- **Preconditions**: Feature branch, test data setup
- **Steps**: 1. Action, 2. Action, 3. Action
- **Expected**: Specific observable outcome
- **Observability**: Logs to check, files created, UI state

4. Integration Touchpoints

List all systems (APIs, DBs, files, services, UI)

For each: What could break + How we validate

5. Implementation Approach

6. Risks & Mitigations

Top 3-5 risks with Impact/Likelihood/Mitigation

7. Open Questions

Ambiguities, decisions needed, assumptions (never silently assume)


Optional Sections (When Relevant)


Templates

Small Plan

# [Feature Name]

## Overview
**Problem**: [What we're solving]
**Impact**: [Who benefits, how]
**Scope**: [In/out]

## Acceptance Criteria
1. [Observable outcome]
2. [Observable outcome]

## Implementation
**Files**:
- `/path/file.py` - Modify - [Description]

**Key Functions**:
- `function_name()` - Purpose, inputs, outputs, logic

**Data Flow**: Step 1 → Step 2 → Step 3

## Validation
**Automated Test**: [Description]
- File, test name, run command, covers, mocking, expected

**MANUAL TEST**: [Description]
- Why manual, preconditions, steps, expected, observability

## Integration Touchpoints
**System**: [Name] - Could break: [X] - Validation: [Y]

## Risks
1. **Risk**: [Description] - Impact: H/M/L - Likelihood: H/M/L - Mitigation: [How]

## Open Questions
- [ ] [Question]

Large Plan (High-Level)

# [Feature] - High-Level

## Overview
Problem, impact, scope

## Acceptance Criteria
1-5 end-to-end observable outcomes

## Phases
**Phase 1**: [Name] - Goal, deliverable, plan doc link
**Phase 2**: [Name] - Goal, deliverable, plan doc link

## End-to-End Validation
Manual steps to validate complete feature

## Integration Touchpoints
All systems affected across phases

## Risks
Top 3-5 cross-phase risks

## Dependencies
Phase X blocks Phase Y because [reason]

Phase Plan

Use Small Plan template, add:


Anti-Patterns (Avoid)

Vague criteria: "Works well", "handles gracefully", "fast"

→ Specific: "Returns 400 with error message when field missing"

Unbounded scope: "All formats", "all edge cases"

→ Bounded: "CSV and JSON (PDF deferred)"

Implementation as criteria: "Uses Factory pattern"

→ Observable: "User can't select product twice"

Mocking hell: Testing trivial code with mocks for mocks

→ Test real logic with minimal mocking

Missing touchpoints: "Add endpoint" (no mention of DB, auth, logs)

→ Complete: Database, auth, logging, monitoring specs


Common Pitfalls

| Shortcut | Why It Fails | Red Flag |

|----------|-------------|----------|

| Listing files without specifying change type | Builder guesses wrong about create vs modify | File list with no "Add/Modify/Delete" annotations |

| Writing acceptance criteria after the implementation section | Criteria shaped to match the solution, not the problem | AC section reads like a commit description |


Self-Review Checklist

Before human review:


Workflow

  1. Gather context: Read code, understand problem, identify touchpoints
  2. Draft plan: Use template, fill required sections, be specific
  3. Self-review: Run checklist, fix gaps
  4. Human review: Present with 3-5 key bullets, iterate on feedback
  5. Sign-off: Address feedback, mark ready for implementation

Planning Principles

  1. Testability first (every criterion testable)
  2. Code readability over dogma (KISS wins)
  3. Test real logic (not trivial code)
  4. Avoid mocking hell (boundaries only)
  5. Explicit over implicit (document assumptions)
  6. Bounded scope (constraints, not "all")
  7. Integration awareness (know what breaks)
  8. Actionable (concrete enough to start)
  9. Shippable not perfect (stop conditions)
  10. No hallucination (flag ambiguity)

Vertical Slicing (Prefer Over Horizontal)

Decompose plans into vertical slices that each deliver observable value end-to-end, rather than horizontal layers that only work when all layers are complete.

Good (vertical):

  1. Add "create widget" endpoint + model + one test (proves the slice works)
  2. Add "list widgets" endpoint + query + test
  3. Add validation rules + error test

Bad (horizontal):

  1. Create all database models
  2. Create all API endpoints
  3. Write all tests

Each step in a vertical plan can be validated independently. If step 1 works, you have confidence in the pattern before building steps 2-3.

If a step must be horizontal (e.g., database migration before any feature code), note why.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.