agentleFS
drivestream-labdrivestream-lab/prayog-skills/skills/engg-reviews/prd-codebase-map/SKILL.md

prd-codebase-map

Skill2 starsChanged 4 months agoMITView on GitHub

Phase 1 engg-reviews: map an open meta PRD onto a fleet of app repos using as-built status plus in-depth codegraph evidence (Graphify query/path/explain). Produces PRD-Codebase-Map artifact and PM-facing product questions (scenario, example, recommendation, why). Gate-independent — does not require impact-map-lgtm and never unlocks Gate 1 or /spec-draft. Run after /ensure-repo-graph.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run checks in references/checks.md.

    line 30
  2. Very specific:

    Prefer EXTRACTED edges. INFERRED/AMBIGUOUS alone must not justify exists.

    line 33
  3. Very specific:

    Don't fix the PRD in this skill — flag and question.

    line 45
  4. Distinctive:

    Read PRD fully; list capabilities / features / waves to map.

    line 64
  5. Distinctive:

    Read as-built per candidate repo.

    line 66
  6. Distinctive:

    Only after explicit authorization: post numbered questions linking to the map artifact.

    line 112
  7. Very specific:

    Use contract: engg-reviews/v1 and stage prd-codebase-map.

    line 119
  8. Very specific:

    Always gate_coupled: false.

    line 127

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

PRD codebase map

Ground the incoming PRD on current product reality (as-built) and in-depth codebase structure (codegraph provider) across candidate repos. Emit product questions so PM can strengthen the PRD on the meta PR.

Does not implement. Does not draft app specs. Does not open Gate 1.

NON-NEGOTIABLE

  1. Gate-independent. May run while meta PR is Draft and without impact-map-lgtm. Never set/clear gate labels. Never unlock /spec-draft.
  2. Run checks in references/checks.md. Mark SKIPPED with reason — never silently omit.
  3. In-depth evidence only via codegraph provider. Prefer EXTRACTED edges. INFERRED/AMBIGUOUS alone must not justify exists.
  4. Product questions use product-question-template.md — feature language only. Engineering detail → appendix.
  5. As-built vs graph conflicts → product question (conflict), not silent pick.
  6. Cap open product questions (default 10); prioritize conflict → partial → unknown.
  7. Dual output: chat summary + prd/reports/PRD-Codebase-Map-{INIT}.md.
  8. Handoff contract engg-reviews/v1 only — see handoff-adjunct.md.
  9. Greenfield / missing as-built + empty graph → short-circuit: PRD-ambiguity questions only; set grounding_depth: none; do not claim deep grounding.
  10. Don't fix the PRD in this skill — flag and question. PE posts via /post-product-questions; PM updates PRD with requirements skills.

Inputs

Resolve paths from references/layout-defaults.md.

  1. PRD — (REQUIRED) prd/INIT-*.md + digest + meta PR head SHA if open
  2. Fleet graphs — (REQUIRED for deep PASS) output of /ensure-repo-graph
  3. As-built — per repo docs/specification/as-built/implementation-status.md (or profile equivalent)
  4. Impact map — (OPTIONAL) candidate repos + scope hints
  5. Accepted ADRs — (OPTIONAL) product-behaviour constraints only
  6. Prior map — (OPTIONAL) for revision increment

Process

T0 — Gather

  • Read PRD fully; list capabilities / features / waves to map.
  • Load fleet status (SHAs, digests). Stop if required graphs not CURRENT.
  • Read as-built per candidate repo.

T1 — Understand

  • Build capability inventory with PRD refs.
  • Assign primary repo per capability (impact-map / catalog / evidence).

T2 — Analyze (per capability)

  1. Provider query with product-language terms.
  2. path / explain for critical nodes; record edge confidence.
  3. Compare to as-built row(s).
  4. Classify delta: exists | partial | absent | conflict | unknown.
  5. Queue product question if delta is partial | conflict | high-impact unknown (and optionally confirm-drop for surprising exists).

T3 — Plan questions

  • Apply cap + priority.
  • Fill scenario / example / recommendation / why / alternatives.
  • Move eng paths/communities to appendix.

T4 — Execute (write artifact)

  • Increment map_revision if prior exists.
  • Write references/output-template.md.
  • Compute artifact digest after save.

T5 — Verify

  • Re-read checks.md; every capability row has evidence or explicit unknown.
  • Handoff gate_coupled: false; next_candidates ⊆ engg-reviews only.

Outcomes

OutcomeWhennext_candidates
passMatrix complete; no blocking open questions requiredreview-product-questions and/or post-product-questions
findingsProduct questions open for PE refine / PMreview-product-questions and/or post-product-questions
needs-inputPRD/repos/graphs incompleteensure-repo-graph or []
blockedProvider missing and PE refused degraded modeensure-repo-graph
stalePRD digest or graph SHA mismatch mid-runensure-repo-graph
failedWrite/tool failure[]

Meta PR comments

Only after explicit authorization: post numbered questions linking to the map artifact. Still no gate label changes.

Workflow handoff

Append the envelope from ../references/handoff-adjunct.md. Use contract: engg-reviews/v1 and stage prd-codebase-map.

OutcomeNext
pass / findingsOptional /review-product-questions, then /post-product-questions
needs-input / blocked / stale/ensure-repo-graph then retry
failedHuman fixes tool/write issues; retry

Always gate_coupled: false. Never list prd-impact-acceptance, prd-merge, or spec-draft in next_candidates. SDD Gate navigators must ignore this contract.

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.