plugins/coordinator/skills/enrich-and-review/SKILL.md
Run enrichment pipeline on chunk directories
npx skillsauth add oduffy-delphi/coordinator-claude enrich-and-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run the enrichment-review pipeline on a chunk directory, dispatching Sonnet enricher agents and Opus reviewers sequentially.
<!-- BEGIN project-rag-preamble (synced from snippets/project-rag-preamble.md) -->Project-rag is project-scoped. It indexes ONE specific codebase, configured at install time. Before reaching for mcp__*project-rag* tools, confirm they index the codebase you're investigating — not a different project on the same machine. If your target codebase doesn't have a project-rag index (no Saved/ProjectRag/ marker at its root, no --project-root argument pointing at it in the MCP config), skip this preamble entirely and use grep/Explore.
If MCP tools matching mcp__*project-rag* are available AND they index the codebase you're investigating, prefer them over grep/Explore for any code-shaped lookup. Symbol-shaped questions ("where is X defined", "find the function that does Y") → project_cpp_symbol / project_semantic_search. Subsystem-shaped questions ("how does X work") → project_subsystem_profile. Impact questions ("what breaks if I change X") → project_referencers with depth=2. Stale RAG still beats grep on structure. Fall through to grep/Explore only if RAG returns nothing AND staleness is plausible.
When invoked, run the full enrichment pipeline on a chunk directory containing plan stubs.
If $ARGUMENTS is provided, use it to scope the work:
--reviewers "name1,name2" → explicit reviewer override (e.g., --reviewers "sid,patrik"). When provided, this replaces routing table auto-detection in Phase 5. Reviewers are dispatched in the order listed — first is domain pass, second is architectural/generalist pass. This is the mechanism for PM-directed dual-review setups.Before enriching anything, verify the source plan has been reviewed:
**Review:** line/staff-session --mode plan)/review first, or confirm PM override to skip."This prevents wasting enrichment cycles on a plan with structural problems.
Before parallel dispatch, check whether stubs share files:
Before dispatching any enrichers, mark every stub that is about to be enriched:
This ensures that if the session crashes mid-enrichment, the tracker shows "in progress" rather than misleading "pending." The enricher agents will also mark their individual stub documents (per the enricher's write-ahead protocol), creating two layers of breadcrumbs.
Optional: Task-scoped repo map. Before dispatching enrichers, consider whether the stub's file scope is clear enough to benefit from a focused map. If so, gate via check-rag-state.sh and generate via generate-repomap.sh. Full gating doctrine: docs/wiki/repomap-rag-gating.md.
RAG_STATE=$(bash "${CLAUDE_PLUGIN_ROOT}/bin/check-rag-state.sh" 2>/dev/null || echo "unknown")
if [ "$RAG_STATE" != "fresh" ]; then
bash "${CLAUDE_PLUGIN_ROOT}/bin/generate-repomap.sh" \
--project-root <project> --task "<stub summary>" --focus-files "<key files from stub>"
fi
Pass the task-scoped map path to the enricher in its dispatch prompt. This is awareness-based — use judgment, not every dispatch needs it.
Enricher pre-pass discovery. Scan all enabled plugins for root-level enricher-pre-pass.md files. These are instructions that run in the EM's context (with full tool access — MCP, Agent dispatch, etc.) to gather information the enricher cannot access with its own tools. For example, a UE plugin might inspect live Blueprint property surfaces via MCP, since the enricher can only read source files.
If pre-pass fragments are found:
If no pre-pass fragments are found, skip this step — it's an optional extension point.
Enricher-survey fragment discovery. Before dispatching, scan all enabled plugins for root-level enricher-survey.md files (analogous to routing fragment discovery in /review and /review-code). If a matching fragment exists for the project's project_type:
This is how domain-specific survey knowledge (e.g., UE project structure scanning) reaches the enricher without polluting the coordinator-core agent spec.
For independent stubs — dispatch Sonnet enricher agents in parallel:
Task tool with subagent_type: "enricher", model: "sonnet", and run_in_background: trueFor dependent stubs — dispatch sequentially, waiting for each to complete before starting the next.
For manual stubs — report them to the PM/Coordinator as requiring human action.
After all enrichers complete:
NEEDS_COORDINATOR: flagsBefore dispatching reviewers, update status to reflect the transition:
Determine which reviewers to summon and dispatch them sequentially.
Reviewer selection — two modes:
--reviewers provided): Use the specified reviewers in order. First name is Reviewer 1 (domain), second is Reviewer 2 (generalist/architectural). Look up each reviewer's agent type and model from the composite routing table.routing.md, scan all enabled plugins for root-level routing.md fragments, merge, and match.Sequential dispatch with fix-application gate:
Single-reviewer case: If only one reviewer is selected (by routing or by --reviewers "name"), skip steps 4-5. The fix-application rule (step 3) still applies — all feedback is incorporated before marking review complete.
Decision protocol for conflicting feedback:
Report the final state:
docs/wiki/delegate-execution.md)tools
Orient session — preflight, load context, choose work
documentation
Wrap up finished work — capture lessons, update docs
development
Triangulate plan-claim / code-reality / review oracles to classify each plan into DELIVERED+REVIEWED / DELIVERED-UNREVIEWED / PARTIAL / IN-FLIGHT / ABANDONED. Run after any crash or 'did we actually finish what we think we finished?' moment.
testing
Check for a published coordinator update and advise a preserve-by-default migration path — never a blind overwrite.