agentleFS
drivestream-labdrivestream-lab/prayog-skills/skills/engg-reviews/ensure-repo-graph/SKILL.md

ensure-repo-graph

Skill2 starsChanged 4 months agoMITView on GitHub

Phase 1 engg-reviews: ensure local Graphify code graphs are present and fresh for a fleet of candidate app repos at develop. Resolves candidates from an Impact-Map or PE list, syncs sibling clones, builds or updates graphify-out/, and records develop_sha + graph_digest. Gate-independent — never sets impact-map-* or spec-* labels. Run before /prd-codebase-map.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 4 are distinctive, and 7 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.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the codegraph provider interface.

    line 30
  2. Very specific:

    If Graphify (or configured provider) is missing → outcome blocked with install steps.

    line 31
  3. Very specific:

    Prefer --mode deep for first build.

    line 35
  4. Distinctive:

    No product questions. No PRD edits.

    line 38
  5. Very specific:

    Prefer cwd = pe-workspace (or PE states fleet.yaml path).

    line 61
  6. Very specific:

    Stop with handoff outcome blocked.

    line 79
  7. Distinctive:

    If missing: clone (only with explicit PE authorization).

    line 86
  8. Distinctive:

    Prefer pe-workspace helper when present:

    line 93
  9. Very specific:

    Never: prd-impact-acceptance, prd-merge, spec-draft, or any sdd-delivery/v2 node.

    line 124
  10. Very specific:

    Use contract: engg-reviews/v1 and stage ensure-repo-graph.

    line 130
  11. Very specific:

    Always gate_coupled: false.

    line 137

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

Ensure repo graph

Make in-depth code graphs available for the candidate fleet so /prd-codebase-map can ground the PRD. Do not ask product questions. Do not touch SDD gates.

Provider contract: ../references/codegraph-provider.md.
Handoff: ../references/handoff-adjunct.md.

NON-NEGOTIABLE

  1. This skill is gate-independent. Never create/update/delete impact-map-* or spec-* labels. Never claim Gate 1 readiness.
  2. Use the codegraph provider interface. Phase 1 default: local Graphify CLI.
  3. If Graphify (or configured provider) is missing → outcome blocked with install steps. No PASS and no “light skim” substitute.
  4. Each repo must be on integration branch (default develop) at a recorded SHA before build/update.
  5. Prefer --mode deep for first build; --update when graph exists but SHA changed.
  6. Record per-repo develop_sha + graph_digest (sha256 of graph.json).
  7. No product questions. No PRD edits. No app PRs. No GitHub writes unless the user later authorizes unrelated actions outside this skill.
  8. Dual output: chat fleet table + optional saved status snippet under meta prd/reports/ when useful (Graph-Fleet-Status-{INIT}.md).

Inputs

  1. Initiative id — (REQUIRED) e.g. INIT-001
  2. Candidate repos — (REQUIRED) from one of:
    • prd/reports/Impact-Map-{INIT}.md affected (+ optional transitive) list
    • PE-supplied list
    • resolved config/service-catalog*.yaml hint (only if PE confirms; same one-file resolver as /prd-impact-map — never hardcode a tenant org)
  3. Workspace layout — preferred: {fleet}/pe-workspace/ with fleet.yaml + graphs/{repo}/; app code at ../{repo}; meta at ../drivestream-meta (or {client}-meta). Legacy: cwd = meta with sibling ../{repo} graphs (discouraged — pollutes app trees).
  4. Integration branch — default develop

Process

T0 — Gather

  • Prefer cwd = pe-workspace (or PE states fleet.yaml path).
  • Resolve candidate repo list from impact-map / fleet.yaml initiatives / PE list.
  • Cap spike fleets at a reasonable size (document if >5 repos).

T1 — Provider check

command -v graphify || uv tool run --from graphifyy graphify --help

If unavailable:

blocked: install with `uv tool install graphifyy` (PyPI package graphifyy),
then re-run /ensure-repo-graph.

Stop with handoff outcome blocked.

T2 — Sync clones

For each candidate repo:

  1. Resolve code_path from fleet.yaml or ../{repo} relative to fleet root.
  2. If missing: clone (only with explicit PE authorization).
  3. git fetch + checkout integration branch; record develop_sha.
  4. Fail that row as blocked if dirty tree would mislead SHA policy — ask PE to stash/clean or confirm.

T3 — Ensure graph

Prefer pe-workspace helper when present:

./bin/refresh-graph.sh {repo}            # deep → graphs/{repo}/graphify-out/
./bin/refresh-graph.sh {repo} --update   # when graph exists

Otherwise, for each repo:

  1. Build Graphify in code_path, then copy graphify-out/ to graphs/{repo}/graphify-out/ and remove it from the app clone.
  2. Compute graph_digest; write graphs/{repo}/.engg-reviews-meta.json.
  3. Status: CURRENT | BUILT | UPDATED | FAILED

Canonical query path: graphs/{repo}/graphify-out/graph.json
(not {code_path}/graphify-out/).

T4 — Report

Present references/output-template.md.
Append adjunct handoff (stage: ensure-repo-graph).

OutcomeWhennext_candidates
passAll required candidates CURRENT/BUILT/UPDATEDprd-codebase-map
blockedProvider missing or any required repo failed[] or retry ensure
needs-inputCandidate list unclear[]
failedUnexpected tool error[]

Forbidden next_candidates

Never: prd-impact-acceptance, prd-merge, spec-draft, or any sdd-delivery/v2 node.

Workflow handoff

Append the envelope from ../references/handoff-adjunct.md. Use contract: engg-reviews/v1 and stage ensure-repo-graph.

OutcomeNext
pass/prd-codebase-map
blocked / failed / needs-inputFix provider/clones; re-run /ensure-repo-graph

Always gate_coupled: false. This handoff must not be used to navigate sdd-delivery/v2 Gate 1/2.

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.