agentleFS
roerohanroerohan/skills/spec-planner/SKILL.md

spec-planner

Skill29 starsChanged 7 months agoMITView on GitHub

Dialogue-driven spec development through skeptical questioning and iterative refinement. Triggers: "spec this out", feature planning, architecture decisions, "is this worth it?" questions, RFC/design doc creation, work scoping. Invoke Librarian for unfamiliar tech/frameworks/APIs.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Hard rule: No spec until user has responded to at least one round of questions.

    line 34
  2. Distinctive:

    STOP: Do not proceed to planning.

    line 36
  3. Distinctive:

    Ask 3-5 pointed questions that would change the approach.

    line 38
  4. Distinctive:

    Use appropriate template from templates.md:

    line 122
  5. Distinctive:

    Transition: All criteria pass + user approval → DONE

    line 149
  6. Very specific:

    Write spec to specs/<filename>.md

    line 186
  7. Distinctive:

    Hard rule: If scope changes, re-estimate and flag explicitly.

    line 207

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec Planner

Produce implementation-ready specs through rigorous dialogue and honest trade-off analysis.

Core Philosophy

  • Dialogue over deliverables — Plans emerge from discussion, not assumption
  • Skeptical by default — Requirements are incomplete until proven otherwise
  • Second-order thinking — Consider downstream effects and maintenance burden

Workflow Phases

CLARIFY ──[user responds]──► DISCOVER ──[done]──► DRAFT ──[complete]──► REFINE ──[approved]──► DONE
   │                            │                   │                      │
   └──[still ambiguous]──◄──────┴───────────────────┴────[gaps found]──────┘

State phase at end of every response:

---
Phase: CLARIFY | Waiting for: answers to questions 1-4

Phase 1: CLARIFY (Mandatory)

Hard rule: No spec until user has responded to at least one round of questions.

  1. STOP. Do not proceed to planning.
  2. Identify gaps in: scope, motivation, constraints, edge cases, success criteria
  3. Ask 3-5 pointed questions that would change the approach. USE YOUR QUESTION TOOL.
  4. Wait for responses

IMPORTANT: Always use the question tool to ask clarifying questions. Do NOT output questions as freeform text. The question tool provides structured options and better UX. Example:

question({
  questions: [{
    header: "Scope",
    question: "Which subsystems need detailed specs?",
    options: [
      { label: "VCS layer", description: "jj-lib + gix unified interface" },
      { label: "Review workflow", description: "GitHub PR-style local review" },
      { label: "Event system", description: "pub/sub + persistence" }
    ],
    multiple: true
  }]
})
CategoryExample
Scope"Share where? Social media? Direct link? Embed?"
Motivation"What user problem are we actually solving?"
Constraints"Does this need to work with existing privacy settings?"
Success"How will we know this worked?"

Escape prevention: Even if request seems complete, ask 2+ clarifying questions. Skip only for mechanical requests (e.g., "rename X to Y").

Anti-patterns to resist:

  • "Just give me a rough plan" → Still needs scope questions
  • "I'll figure out the details" → Those details ARE the spec
  • Very long initial request → Longer ≠ clearer; probe assumptions

Transition: User answered AND no new ambiguities → DISCOVER


Phase 2: DISCOVER

After clarification, before planning: Understand existing system.

Launch explore subagents in parallel:

Task(
  subagent_type="explore",
  description="Explore [area name]",
  prompt="Explore [area]. Return: key files, abstractions, patterns, integration points."
)
TargetWhat to Find
Affected areaFiles, modules that will change
Existing patternsHow similar features are implemented
Integration pointsAPIs, events, data flows touched

If unfamiliar tech involved, invoke Librarian:

Task(
  subagent_type="librarian",
  description="Research [tech name]",
  prompt="Research [tech] for [use case]. Return: recommended approach, gotchas, production patterns."
)

Output: Brief architecture summary before proposing solutions.

Transition: System context understood → DRAFT


Phase 3: DRAFT

Apply planning framework from decision-frameworks.md:

  1. Problem Definition — What are we solving? For whom? Cost of not solving?
  2. Constraints Inventory — Time, system, knowledge, scope ceiling
  3. Solution Space — Simplest → Balanced → Full engineering solution
  4. Trade-off Analysis — See table format in references
  5. Recommendation — One clear choice with reasoning

Use appropriate template from templates.md:

  • Quick Decision — Scoped technical choices
  • Feature Plan — New feature development
  • ADR — Architecture decisions
  • RFC — Larger proposals

Transition: Spec produced → REFINE


Phase 4: REFINE

Run completeness check:

CriterionCheck
Scope boundedEvery deliverable listed; non-goals explicit
Ambiguity resolvedNo "TBD" or "to be determined"
Acceptance testableEach criterion pass/fail verifiable
Dependencies orderedClear what blocks what
Types definedData shapes specified (not "some object")
Effort estimatedEach deliverable has S/M/L/XL
Risks identifiedAt least 2 risks with mitigations
Open questionsResolved OR assigned owner

If any criterion fails: Return to dialogue. "To finalize, I need clarity on: [failing criteria]."

Transition: All criteria pass + user approval → DONE


Phase 5: DONE

Final Output

=== Spec Complete ===

Phase: DONE
Type: <feature plan | architecture decision | refactoring | strategy>
Effort: <S/M/L/XL>
Status: Ready for task breakdown

Discovery:
- Explored: <areas investigated>
- Key findings: <relevant architecture/patterns>

Recommendation:
<brief summary>

Key Trade-offs:
- <what we're choosing vs alternatives>

Deliverables (Ordered):
1. [D1] (effort) — depends on: -
2. [D2] (effort) — depends on: D1

Open Questions:
- [ ] <if any remain> → Owner: [who]

Write Spec to File (MANDATORY)

  1. Derive filename from feature/decision name (kebab-case)
  2. Write spec to specs/<filename>.md
  3. Confirm: Spec written to: specs/<filename>.md

Effort Estimates

SizeTimeScope
S<1 hourSingle file, isolated change
M1-3 hoursFew files, contained feature
L1-2 daysCross-cutting, multiple components
XL>2 daysMajor refactor, new system

Scope Control

When scope creeps:

  1. Name it: "That's scope expansion. Let's finish X first."
  2. Park it: "Added to Open Questions. Revisit after core spec stable."
  3. Cost it: "Adding Y changes effort from M to XL. Worth it?"

Hard rule: If scope changes, re-estimate and flag explicitly.

References

FileWhen to Read
templates.mdOutput formats for plans, ADRs, RFCs
decision-frameworks.mdComplex multi-factor decisions
estimation.mdBreaking down work, avoiding underestimation
technical-debt.mdEvaluating refactoring ROI

Integration

AgentWhen to Invoke
LibrarianResearch unfamiliar tech, APIs, frameworks
OracleDeep architectural analysis, complex debugging

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.