agentleFS
drivestream-labdrivestream-lab/prayog-skills/skills/requirements/prd-impact-map/SKILL.md

prd-impact-map

Skill2 starsChanged 4 months agoMITView on GitHub

Map a PRD to affected repos using the service catalog. Reads the PRD and the resolved config/service-catalog*.yaml from <client>-meta, matches PRD capabilities to service descriptions, generates a versioned impact-map artifact locally, and produces a PR-readiness handoff (handoff.forge for open_draft_pr). Publish via /open-draft-pr or orchestrator ForgeClient after authorization — not inside this skill. Run in <client>-meta after PRD validation and before app spec PRs.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Treat impact-map-* labels as projections.

    line 55
  2. Very specific:

    No forge mutations in this skill: Do not create a branch, commit, push, PR, comment, review request, or label here.

    line 59
  3. Very specific:

    Before mapping, search local files/branches and, when gh is configured, open PRs for:

    line 83
  4. Distinctive:

    Never propose a second PR while identity is unresolved.

    line 118
  5. Distinctive:

    Stop without GitHub side effects.

    line 152
  6. Very specific:

    After T5, present readiness and ask whether to publish.

    line 156
  7. Very specific:

    Before /open-draft-pr (or orchestrator forge), meta_pr and approval fields are pending.

    line 172
  8. Distinctive:

    Never infer approval from labels alone.

    line 213
  9. Very specific:

    When the invocation binds handoff_path (orchestrator / AgentRunner baton), also overwrite that path with the same handoff: envelope before …

    line 254

≈ “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 impact map

Identify which repos are affected by a PRD and produce an impact map for tech lead confirmation. Do not open spec PRs in app repos — engineering opens those after tech lead confirms the map.

NON-NEGOTIABLE

  1. Resolve one service catalog under <client>-meta/config/ before reading the PRD. Prefer service-catalog-<org>.yaml when org is known (unique governance-<org>.yaml suffix). Otherwise accept exactly one of service-catalog.yaml or service-catalog-*.yaml. Fail closed on zero or multiple matches. Do not merge catalogs. Never hardcode a tenant org. Understand what each service owns before matching.
  2. Match PRD capabilities to service description and owns fields semantically — do not rely on keyword matching alone.
  3. Include transitively affected repos via depends_on chains. If repo B depends on repo A and the PRD touches A, flag B as potentially affected.
  4. Explicitly list repos that are not affected and why — this is as important as the affected list.
  5. Save the canonical map at reports_dir/Impact-Map-{INIT-id}.md. A PR comment or label is never the source of truth. Never write Impact-Map-*-revN.md / *-v2 siblings — overwrite the canonical path and bump map_revision (see prayog-skills/references/artifact-write-contract.md).
  6. Increment map_revision for every changed map and record the prior revision plus change reason. Do not edit history to make a revision appear unchanged. If a legacy *-revN sibling exists, migrate into the canonical path and stop writing the sibling (purge siblings only via /purge-initiative-artifacts-meta allowlist — Impact-Map is KEEP).
  7. Mint durable identities H1–H3 per prayog-skills/references/artifact-write-contract.md: H1 source_prd_digest (PRD bytes), H2 one scope_digest per affected repo (canonical payload recipe), H3 map_revision. Prefer CAP-* / REQ-* in capability lists (legacy free-text or FR-* acceptable until next PRD edit — see prayog-skills/references/id-conventions.md). A tech-lead approval (G1) is valid only for the exact meta PR head SHA carrying those values. Impact-Map is KEEP through initiative-closure purge; do not treat mid-lane app report digests as map identity.
  8. Treat impact-map-* labels as projections. If artifact, review, and label disagree, the gate is closed.
  9. A material PRD/map change or tech-lead revocation invalidates approval. Produce a downstream ripple action for every repo already in flight.
  10. No forge mutations in this skill. Do not create a branch, commit, push, PR, comment, review request, or label here. Fill handoff.forge for open_draft_pr and recommend /open-draft-pr (or orchestrator ForgeClient on prd-pr-action). See prayog-skills/references/forge-side-effects.md#content-producers.
  11. Gate labels are a visible workflow projection, not authority. Exactly one PE gate label may be active: impact-map-pending, impact-map-lgtm, or impact-map-blocked. impact-map-revised and impact-map-stale are additional invalidation labels and always close the gate.

Inputs

  1. PRD — (REQUIRED) prd/INIT-{id}.md in <client>-meta
  2. Service catalog — (REQUIRED) resolved file under <client>-meta/config/ (service-catalog-<org>.yaml preferred; else exactly one service-catalog.yaml or service-catalog-*.yaml)
  3. Git state — (REQUIRED) current branch/base, changed files, and whether a meta PR already exists; an existing PR is not required for the initial map
  4. Meta PR state — (OPTIONAL) URL/head/reviews/labels when revising an open PR
  5. Prior impact map — (OPTIONAL) required when revising an existing map
  6. In-flight app artifacts — (OPTIONAL) spec/TDD/plan status for ripple actions
  7. Layout — reports_dir from .harness/profile.yaml; default prd/reports

Initiative identity and PR collision gate

Before mapping, search local files/branches and, when gh is configured, open PRs for:

  • the canonical initiative id,
  • legacy/short initiative ids referenced by the PRD or filenames,
  • PRD titles/slugs that may represent the same business initiative,
  • prior Impact-Map-* artifacts.

Classify detection separately from the human decision:

DetectionMeaningT0 result
no-collisionNo competing initiative/PR foundContinue
same-initiativeExisting PR/branch represents this product initiativeneeds-input
unrelatedSimilar id/title is demonstrably a different initiativeContinue with evidence
ambiguousIdentity cannot be determinedneeds-input

For same-initiative or ambiguous, the agent may recommend—but never select— one human resolution:

  • reconcile-existing
  • supersede-existing
  • unrelated-confirmed

Persist the distinction in the response:

identity_collision:
  detection: same-initiative
  evidence: [...]
  recommended_resolution: supersede-existing
  human_decision: pending
  external_action_authorized: false

Never propose a second PR while identity is unresolved. Closing, commenting on, or updating an existing PR is an external action requiring explicit user authorization.

HARD STOP: while human_decision: pending, do not execute T1–T5, assign impact-map question ids, compute repo scope digests, write/update an impact-map artifact, or produce PR readiness. Emit only the collision report and a needs-input workflow handoff.

Choosing a resolution does not by itself authorize GitHub action. Present the exact comment/close/update operations and obtain separate explicit authorization. After reconciliation/supersession is complete, restart at T0; do not resume a partial mapping run.

Process

  1. T0 Gather and identity gate — PRD, service catalog, local git state, optional meta PR state, prior map, in-flight app artifacts; run detection above and continue only for no-collision, evidenced unrelated, or a fully completed human resolution. Otherwise emit needs-input and stop.
  2. T1 Understand — list PRD capability areas (data flows, user actions, integrations, storage, auth, notifications, etc.)
  3. T2 Match — for each capability, match to service description + owns; include transitive via depends_on
  4. T3 Diff and order — compare prior revision; derive build/merge order; classify each repo as added, removed, unchanged, narrowed, widened, or reordered
  5. T4 Output — write the canonical artifact using references/output-template.md; compute the PRD digest and per-repo scope digests from normalized content
  6. T5 Verify and hand off — verify artifact completeness; present:
    • generated/changed files,
    • impact summary and blockers,
    • proposed branch, base, Draft PR title/body, reviewers, and initial labels,
    • PR READY or PR BLOCKED verdict. Stop without GitHub side effects.

PR readiness (fill handoff.forge — do not open the PR here)

After T5, present readiness and ask whether to publish. On outcome: pass, next is prd-pr-action (open_draft_pr). Fill handoff.forge with pin requires at minimum (title, body_path, action: open_draft_pr, draft: true, apply_labels: [impact-map-pending]). Recommend /open-draft-pr. Do not run forge mutations inside /prd-impact-map.

See prayog-skills/references/forge-side-effects.md.

Output and approval contract

Generated canonical file:

{reports_dir}/Impact-Map-{INIT-id}.md

Use references/output-template.md.

Before /open-draft-pr (or orchestrator forge), meta_pr and approval fields are pending. After the authorized forge skill / ForgeClient run, the PR body contains the impact summary, artifact path, map revision, PRD digest, Gate 1 checklist, and PE review request. Clarification comments may discuss the map, but decisions must be committed to the PRD/map artifact.

Effective state is derived:

StateConditionEngineering gate
draftArtifact is being generated or revisedclosed
pending_reviewLocal artifact is PR-ready or Draft PR awaits matching approvalclosed
approvedLatest tech-lead APPROVED review matches current head SHA and artifact/PRD digestsopen for affected repo scopes only
stalePRD or map content changed after approvalclosed for changed scope
blockedTech lead explicitly revoked or pausedclosed
supersededA newer map revision existspermanently closed for old revision

Labels mirror the effective state. PE controls the Gate 1 label:

  • impact-map-pending — Draft PR awaits PE decision
  • impact-map-lgtm — matching approval exists
  • impact-map-blocked — PE requests changes or explicitly holds the handoff

Agent/PM invalidation labels:

  • impact-map-revised — new map revision awaiting review
  • impact-map-stale — source PRD changed after approval

Exactly one of impact-map-pending, impact-map-lgtm, or impact-map-blocked may be active. impact-map-revised or impact-map-stale always closes the gate even if impact-map-lgtm was not removed. Any contradiction fails closed.

PE transitions:

PE actionRemoveAddGate
Review starts / new revisionimpact-map-lgtm, impact-map-blockedimpact-map-pendingclosed
Request changes / holdimpact-map-pending, impact-map-lgtmimpact-map-blockedclosed
Approve exact current headimpact-map-pending, impact-map-blocked, impact-map-revised, impact-map-staleimpact-map-lgtmopen

Never infer approval from labels alone; a matching GitHub APPROVED review and current artifact/head values are also required.

Material change and ripple policy

Any scope, capability, contract, dependency-order, affected/deferred status, or acceptance-meaning change is material. A typo-only edit may retain the map only when the artifact records material_change: false with a reason; the current head still requires a matching review under the conservative pilot policy.

For each prior affected repo, emit one action:

ChangeRequired action
removed / deferredhold or close; never run feasibility/TDD/plan
addedopen after latest approval
unchanged scope digestcontinue after recording revision check
narrowed / widenedre-draft then re-feasibility
dependency order changedre-plan for affected dependents
removed scope already mergedhuman decision: revert, corrective PR, or follow-up initiative

Approval attestation

The requested GitHub review body is:

Impact map approved
initiative: {INIT-id}
map_revision: {N}
meta_pr_head_sha: {SHA}
prd_digest: {DIGEST}
artifact: {reports_dir}/Impact-Map-{INIT-id}.md

Approval is stale when the latest approved review's commit SHA differs from the current meta PR head SHA or any attested value differs from the artifact.

Workflow handoff

  1. Append/emit the envelope from prayog-skills/references/handoff-envelope.md to the impact-map artifact. Use stage prd-impact-map.
  2. When the invocation binds handoff_path (orchestrator / AgentRunner baton), also overwrite that path with the same handoff: envelope before exit. Leaving the baton empty is a failed stage for automated consumers. artifact.path remains the workspace skill output, not the baton path. See prayog-skills/references/handoff-envelope.md (Orchestrator baton).
  3. Derive next_candidates, human_checkpoint, and external_action from pinned root workflow.yaml for (stage: prd-impact-map, outcome) per prayog-skills/references/handoff-envelope.md (Derive from pinned workflow). Set human_checkpoint: true only when the resolved next node's type is human-checkpoint. Set external_action: true when next is external-action (e.g. prd-pr-action on pass).
  4. On pass, fill complete handoff.forge for open_draft_pr per pin requires. Recommend /open-draft-pr. Follow prayog-skills/references/forge-side-effects.md#content-producers.

Transitions: pinned root workflow.yaml for this stage (SSOT). Human or agent may run this skill; legality and auto-dispatch follow dispatch + delivery contract + latest handoff. On pass with signals.pr_ready: true, the next node is typically prd-pr-action (external-action — explicit auth).

The handoff never authorizes forge mutation. next_candidates never authorize invoke.

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.