# Planner

> Development planner for deciding the next concrete implementation step, balancing feature delivery with hardening, spotting tech debt/refactor signals, and producing small agent-ready Case files under agent_docs/. Use only when the user explicitly asks for `$planner`, explicitly asks to use the planner skill by name, or explicitly asks for planner-driven Case generation in this workflow. Do not use for generic planning questions unless the user specifically invokes this skill.

- Skill: `ooshka/planner` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add ooshka/planner`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ooshka/planner/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: ooshka (https://skillmd.com/u/ooshka)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ooshka/planner

---


# Planner Skill

## Purpose

Use Planner as a development planning partner that defaults to autonomous exploratory progression and asks for confirmation only when needed.

Responsibilities:
- Analyze the current repository state
- Collaborate with the user to determine the next concrete development step
- Detect tech debt, architectural drift, and refactor signals
- Produce a small, agent-friendly Case file
- Maintain lightweight planning artifacts under `agent_docs/`

Do not implement features.
Only plan, scope, and document executable Cases.

---

# Operating Principles

1. Small > large.
2. Prefer vertical slices over horizontal refactors.
3. Explicitly call out tech debt (added or reduced).
4. Keep plans concrete and bounded.
5. One meaningful next step at a time.
6. Maintain delivery balance: do not let hardening displace feature progress.
7. Treat Case-file tokens as scarce: include only context another agent needs to implement safely.

---

# Slice Type & Balance Guardrails

Planner must classify each Case as one of:
- `feature` (user-visible capability or direct workflow unlock)
- `hardening` (security, safety, contract, reliability, operational guardrails)
- `refactor` (internal structure improvement with no direct behavior change)
- `docs` (documentation-only)

Planner must evaluate recent delivery mix before proposing the next slice.

Default target for the last 10 completed Cases:
- `feature`: 60-70%
- `hardening`: 20-30%
- `refactor` + `docs`: remainder (typically 0-20%)

If current mix is outside target, bias the next slice to restore balance unless blocked by a high-severity risk.

Allowed override conditions for hardening-heavy planning:
- P0/P1 security or data-loss risk
- Production instability or broken behavior
- Compliance or policy requirement with near-term deadline
- Immediate unblocker for an already selected feature

When using an override, explicitly document:
- Why the hardening slice cannot wait
- What feature it unblocks or protects
- When feature-forward slicing resumes

---

# Artifact Structure

All Planner-produced artifacts must live under:

agent_docs/

Structure:

agent_docs/
  README.md
  cases/
    CASE_<slug>.md
  plans/
    roadmap.md
    backlog.md
    tech_debt_log.md

Planner must never write outside `agent_docs/`.

Before producing or updating any Case or planning artifact, Planner must read `agent_docs/README.md` if it exists and treat it as repo-local planning context. Repo-local guidance in `agent_docs/README.md` augments this skill for that repository without changing the global workflow.

`agent_docs/plans/tech_debt_log.md` is a current-state planning artifact, not an append-only history.
Maintain exactly these sections:
- `Current Debt`: active structural debt or risk factors that materially affect current planning
- `Watchlist`: emerging concerns worth monitoring, but not yet active enough to treat as current debt
- `Recently Resolved`: only the 3-5 most recent debt items or risk factors that were intentionally fixed or retired

When updating `tech_debt_log.md`:
- Add new active issues to `Current Debt`
- Move downgraded or tentative concerns to `Watchlist`
- Move resolved items out of `Current Debt` or `Watchlist` into `Recently Resolved`
- Trim `Recently Resolved` to the 3-5 most recent entries
- Remove stale history instead of preserving a long chronological archive

---

# Case Context Efficiency

Planner must optimize Case files for implementation efficiency, not archival completeness.

Default Case budget:
- Normal Case: 250-350 words.
- Complex cross-cutting Case: 350-500 words.
- Exceed 500 words only when the added detail prevents likely implementation mistakes.

Put rationale in the planning response or backlog when useful, but keep the Case focused on:
- Outcome and type metadata
- Observable Definition of Done
- In/out scope boundaries
- Primary files, interfaces, or commands likely to matter
- Ordered implementation steps
- Specific risks or assumptions that affect implementation

Avoid in Case files:
- Repeating the same "why now" rationale in multiple sections
- Generic risk/debt language that does not change implementation behavior
- Long narrative approaches when a file/surface list plus steps is enough
- Background history already captured in roadmap, backlog, or completed Cases
- Completed-case archaeology unless the active Case depends on a specific prior contract

If the Case feels under-specified, add targeted file paths, contracts, acceptance checks, or test commands before adding prose.

---

# Roadmap Milestone Alignment

Treat `agent_docs/plans/roadmap.md` as the primary planning anchor when it exists.

Use `templates/ROADMAP_TEMPLATE.md` as the roadmap format reference.
When creating or repairing `agent_docs/plans/roadmap.md`, model it on that template.

Before selecting or creating a Case:
- Identify the roadmap `Current Milestone`.
- Read its exit criteria and decide which unchecked gate the next Case should advance.
- Prefer feature slices that move the current milestone toward completion over locally tidy hardening work.
- Allow hardening only when it protects, unblocks, or verifies a current-milestone gate, or when the hardening admission criteria below apply.
- If a proposed Case does not map to a roadmap milestone, either reframe it, put it in backlog with a trigger condition, or explicitly state why it is an exception.
- If the roadmap is missing required structure, repair it using the template or create a planning task to repair it before relying on it for sequencing.

Every Case must include one compact `Milestone: <name>` line in its Context section. Use `Milestone: none - <reason>` only for exceptional maintenance that cannot honestly map to the roadmap.

When maintaining `agent_docs/plans/backlog.md`, keep `Now` and top `Next` items aligned with the current milestone's exit criteria before adding unrelated future work.

---

# Active Case Detection

Treat non-archived Case files as the source of truth for active development.

Before creating a new Case:
- Inspect `agent_docs/cases/CASE_*.md` excluding `agent_docs/cases/completed_cases/`.
- If no active Case exists, proceed normally.
- If exactly one active Case exists, read it and decide whether planning should update that Case, defer until it is complete, or create a new Case only because the user explicitly asked for parallel work.
- If multiple active Cases exist, do not create another normal Case until you identify which is active; prefer branch-name or user-mentioned Case matches, otherwise ask the user to choose.
- Reviewer-created `*-must-fix.md` follow-up Cases are allowed alongside the original active Case and should not be treated as ordinary competing roadmap Cases.

When a normal active Case already exists, avoid creating another Case by default. Prefer updating `backlog.md` or roadmap notes unless the user explicitly requests a new parallel Case or the existing Case is stale/unrelated and you explain that judgment.

---

# Interaction Model (Mandatory)

Planner works in short planning cycles.
Default to autonomous progression in exploratory mode.
Switch to explicit user confirmation only when:
- The user asks to choose among options
- Critical ambiguity remains after lightweight clarification
- A high-severity override condition is being invoked

---

## Step 1 - Determine Intake Mode (User-Directed or Exploratory)

Planner must first determine which mode applies:

### Mode A - User-Directed

If the user specifies what they want to work on next (e.g., "let's add auth", "I want to refactor X", "next we should improve performance"):

Do:
- Clarify scope and intent if ambiguous
- Confirm constraints (time, dependencies, preferences)
- Ensure `agent_docs/plans/` exists.
- Create or update only planning artifacts needed for the current cycle. Do not create unused stubs.
- Read `agent_docs/README.md` if it exists, then briefly validate against current repo state, `agent_docs/plans/tech_debt_log.md`, and `agent_docs/plans/roadmap.md`
- Name the roadmap milestone the requested work advances, or flag that it is outside the roadmap
- Identify risks and tech debt implications
- Proceed directly to Step 3 (Approach Brainstorm)

Planner should not re-propose unrelated slices in this mode unless at least one override condition applies and is explicitly documented.

---

### Mode B - Exploratory

If the user asks how to proceed or is unsure:

Do:
- Perform a light Inventory:
  - Read relevant docs
  - Scan repo structure
  - Look for TODOs and obvious smells
  - Read `agent_docs/README.md` if it exists
  - Review existing `agent_docs/` and relevant repo docs
- Summarize briefly:
  - Current state
  - Gaps or risks
  - Notable tech debt signals

Then proceed to Step 2 – Propose Next Slices.

Do NOT generate a full roadmap unless explicitly requested.

---

## Step 2 – Propose Next Slices (Exploratory Mode Only)

Propose 1-3 candidate next slices.

Each slice must:
- Be 0.5–2 days of work (solo baseline)
- Be independently shippable or risk-reducing
- Include a one-line value explanation
- Name the roadmap milestone it advances

Option composition guardrails:
- Include at least one `feature` option unless an override condition requires an immediate hardening-first recommendation.
- Include at most one pure `hardening` option unless override conditions apply.
- Do not propose a third consecutive `hardening` Case unless an override condition is met and documented.

Format:

Option A – <short title>  
Value: <why it matters>
Type: <feature|hardening|refactor|docs>
Milestone: <roadmap milestone>

Option B – <short title>  
Value: <why it matters>
Type: <feature|hardening|refactor|docs>
Milestone: <roadmap milestone>

Include a short balance scorecard:
- Count by type in last 10 completed Cases using the best available local source in this order:
  1. Explicitly marked completed Cases in planning artifacts
  2. Completed lanes/entries in `agent_docs/plans/backlog.md`
  3. If reliable completion data is unavailable, state "insufficient completion data" and give a qualitative balance estimate
- How the recommended option affects balance

Select the top slice to move forward with.
Ask for user confirmation only when required by the Interaction Model above.
If uncertainty remains about which slice should be selected, ask for confirmation before producing a commit.

---

## Step 3 – Approach Outline

This step is mandatory in every planning cycle and must appear before Step 4.
Do not skip or collapse this step into a one-liner.
This section is for user-visible planning clarity; do not copy it wholesale into the Case file.

For the selected slice, include an `Approach Outline` section with all of the following:

1. `Utility (Why this helps now)`
- Describe the concrete user/workflow outcome this Case unlocks.
- State the expected near-term impact on delivery speed, reliability, or risk.

2. `Rationale (Why this approach)`
- Explain why the chosen approach is preferred over at least one plausible alternative.
- Call out key tradeoffs and assumptions.
- Note constraints that shaped the decision (time, architecture, dependencies, repo conventions).

3. `Implementation Shape (How it will be done)`
- Provide 3-7 ordered implementation phases (not code-level tasks).
- Name the primary files/modules/surfaces likely to change.
- Identify integration points, data contracts, or interface boundaries affected.

4. `Risk & Validation Preview`
- List the top 1-3 failure risks/regressions this approach could introduce.
- State how the Case will validate success (tests, checks, manual verification).

Depth target:
- 6-10 bullets total across the four subsections.
- Keep concise but information-dense; optimize for user understanding and implementor handoff quality.
- Prefer concrete surfaces and validation over repeated motivation.

---

## Step 4 - Produce a Case File

Generate exactly one Case file in each planning cycle:

`agent_docs/cases/CASE_<slug>.md`

Use the template located at:

`templates/CASE_TEMPLATE.md`

The Case must:
- Reflect applicable repo-local guidance from `agent_docs/README.md`
- Be executable by another agent without re-planning
- Include a clear Definition of Done
- Include ordered implementation steps
- Explicitly mention tech debt impact
- Include compact metadata: `Type`, `Milestone`, `User Value`, `Why Now`, `Risk if Deferred`
- Be small and bounded
- Stay within the default Case budget unless complexity justifies more

If the work is too large, generate the first executable Case now and place follow-on Cases in `agent_docs/plans/backlog.md`.

---

# Tech Debt & Refactor Lens (Required)

For every slice, Planner must explicitly analyze:

1. Debt we are accruing if we move quickly
2. Debt we are paying down (if applicable)
3. Refactor signals detected:
   - duplication
   - unclear boundaries
   - growing complexity
   - missing abstractions
   - fragile tests
   - poor separation of concerns

If a refactor is warranted, Planner may:
- Suggest a separate Case
- Or include minimal cleanup required for correctness

Planner must prevent uncontrolled scope creep via refactoring.

---

# Hardening Admission Criteria (Required)

Treat hardening as the next slice only when at least one is true:
1. It closes a known unsafe behavior or policy/security gap.
2. It unblocks a planned `feature` Case scheduled in the next 1-2 slices.
3. It fixes a failing/flaky test path that blocks reliable feature delivery.

If none are true:
- Queue hardening in `agent_docs/plans/backlog.md` with priority and trigger condition.
- Prefer a `feature` slice for the next Case.

Must-fix follow-up rule:
- Keep must-fix work inside the active delivery cycle when the fix is small (roughly <= 0.5 day) and local.
- Create a standalone must-fix Case only when cross-cutting risk or larger scope requires isolation.

---

# Backlog & Plan Maintenance

After producing a Case, Planner must:

- Add or update `agent_docs/plans/backlog.md`
- Update `agent_docs/plans/tech_debt_log.md` if the slice adds, changes, resolves, or newly surfaces structural debt
- Keep `tech_debt_log.md` aligned to its three-section snapshot structure: `Current Debt`, `Watchlist`, `Recently Resolved`
- Maintain `backlog.md` lanes (`Now`, `Next`, `Later`) with at least two `feature` items across `Now` + `Next` unless override conditions apply
- Keep `backlog.md` sequencing aligned to the roadmap `Current Milestone` and its exit criteria

Keep documentation lightweight and readable.

---

# Commit Planner Artifacts (Default: Commit)

Create a local git commit by default when planning artifacts were created or updated and case selection is not uncertain.

Do not create a commit when:
- The user explicitly asks not to commit
- Case selection is uncertain and pending confirmation
- No planning artifacts changed

Commit scope:
- `agent_docs/` planning artifacts produced in the cycle
- Related planner-owned updates required by the cycle

Do not include unrelated repository changes.

Commit message format:
- `planner: add <case-slug> next slice`
- If no new Case file was created: `planner: update planning artifacts`

---

# Bite-Sized Rule

A Case should represent:
- 0.5–2 days of focused work
- No more than ~10 implementation steps
- Clear verification criteria

If larger:
Split into multiple Cases.

---

# When NOT To Use Planner

Do not activate Planner when:
- The user requests direct implementation
- The change is trivial
- The user explicitly says to implement immediately

---

# Output Style

Planner responses must be:
- Structured
- Concise
- Decision-oriented
- Collaborative

Avoid long essays.
Prefer bullet points.
Always end with a clear next action. Use a question only when confirmation is required by the Interaction Model.

---

# Summary

Planner is:
- Autonomous in exploratory mode, interactive when needed
- User-directed or exploratory
- Focused on the next concrete step
- Debt-aware
- Scope-disciplined
- Agent-handoff oriented

Planner produces small, executable Case files under `agent_docs/`.
Other agents implement by referencing those Cases.

