agentleFS
elfrostelfrost/ai-patchlab/.agents/skills/generate-prp/SKILL.md

generate-prp

Skill1 starsChanged 31 days agoMITView on GitHub

Generate a self-contained PRP from INITIAL.md or another feature spec. Use when the user asks to generate a PRP, create an implementation plan, turn a feature request into a one-pass blueprint, or prepare work for later execution.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 11 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a complete Product Requirements Prompt that another agent can execute without the current conversation history.

    line 8
  2. Distinctive:

    Before research, assess the feature file.

    line 12
  3. Distinctive:

    After at most 5 questions, write a 5-7 bullet Understanding Summary with assumptions and open questions

    line 23
  4. Distinctive:

    Wait for explicit user confirmation before continuing

    line 24
  5. Very specific:

    Read the feature file the user points to.

    line 32
  6. Distinctive:

    Before writing anything into the PRP's must-read or files-to-modify sections:

    line 55
  7. Very specific:

    Use PRPs/templates/prp_base.md when available.

    line 61
  8. Very specific:

    If this is the template repo, fall back to template/PRPs/templates/prp_base.md.

    line 62
  9. Distinctive:

    must-read files and docs

    line 66
  10. Distinctive:

    Verify the PRP before finishing:

    line 75
  11. Distinctive:

    Every task has validation

    line 77
  12. Distinctive:

    If confidence is below 7, do NOT save — either ask the user clarifying questions or expand research on the specific gaps

    line 80
  13. Distinctive:

    Prefer exact file paths over vague descriptions.

    line 84
  14. Distinctive:

    Do not start implementation in this skill.

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Generate PRP

Create a complete Product Requirements Prompt that another agent can execute without the current conversation history.

Phase 0: Discovery Triage (Understanding Lock)

Before research, assess the feature file. If it is clear, scoped, and unambiguous, skip directly to step 1.

Enter Understanding Lock mode if at least 2 of these are true:

  • The feature file is short or vague
  • Critical aspects are missing (target users, success criteria, non-goals, constraints)
  • Multiple plausible interpretations would lead to very different implementations
  • Feature touches data, auth, money, or external integrations without specs

Rules in Understanding Lock:

  • One question at a time, prefer multiple-choice
  • Cover purpose -> users -> success criteria -> non-goals -> constraints
  • After at most 5 questions, write a 5-7 bullet Understanding Summary with assumptions and open questions
  • Wait for explicit user confirmation before continuing
  • Fold the answers back into the feature file or a [feature]-clarified.md sibling

Hard gate: do NOT generate the PRP until the Understanding Summary is confirmed.

Workflow

Step 1: Read the feature file

Read the feature file the user points to. If none is given, default to INITIAL.md.

Step 2: Multi-source research (filter -> rank -> synthesize)

Codex does not have a subagent delegation primitive like Claude, so the executing model does the research itself — but applies the same discipline:

Filter — only read what is plausibly relevant to this feature, not every file in every directory:

  • AGENTS.md
  • CLAUDE.md if present
  • DECISIONS.md (skim ADR titles, read in full only the ones touching the feature area)
  • ROADMAP.md (current state only)
  • PRPs/ (only PRPs marked as dependencies or recently completed in the same area)
  • examples/ or template/examples/ (only the patterns matching the feature's stack)
  • Relevant codebase files (grep first, read second)

Rank — prioritize sources by signal-to-noise:

  1. Files the feature explicitly references
  2. Examples matching the same pattern (api, data, ai-agent, web)
  3. Recent git history in affected directories
  4. ADRs touching the same architectural area

Synthesize — keep an internal compact brief (5-10 bullets) before writing the PRP. Do not paste raw file content into the PRP — extract the load-bearing fact and cite the path.

Step 3: Verify before citing

Before writing anything into the PRP's must-read or files-to-modify sections:

  • Confirm each cited file exists at the path used
  • Confirm the pattern claim still matches by reopening the file briefly
  • Drop any reference that fails verification

Step 4: Build the PRP

Use PRPs/templates/prp_base.md when available. If this is the template repo, fall back to template/PRPs/templates/prp_base.md.

Produce PRPs/<feature-name>.md with:

  • overview and dependencies
  • must-read files and docs
  • critical gotchas
  • files to create and modify
  • database changes if any
  • ordered tasks with validation commands
  • final validation loop
  • success criteria

Step 5: Quality gate

Verify the PRP before finishing:

  • Referenced files exist
  • Every task has validation
  • Dependencies are explicit
  • Confidence is at least 7/10
  • If confidence is below 7, do NOT save — either ask the user clarifying questions or expand research on the specific gaps

Rules

  • Make the PRP self-contained.
  • Prefer exact file paths over vague descriptions.
  • Include shared-document sync in success criteria:
    • ROADMAP.md
    • DECISIONS.md if applicable
    • AGENTS.md
    • CLAUDE.md if present
  • Do not start implementation in this skill.

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.