Prompt file imported from diginsight/smartdocs (
.github/prompts/00.09-pe-meta/pe-meta-review.prompt.md). Copyright stays with the author.
Prompt Engineering Artifact Management
Unified orchestrator for PE artifacts under the vision v15.4 default-full invocation contract and eight-parameter canonical option surface. This is the single review/optimization command — it absorbs strategic validation (formerly a separate strategic reviewer) as a conditional Phase 4.5 and holds review to the same guidance-quality bar the design prompts construct toward (design/review parity). Phase 0a resolves free-form input to canonical options, the parser validates the eight canonical parameters, breadth is derived, phases 1–8 execute (with Phase 4.5 inserted when --dim includes strategic dimensions), and the first-line Resolved invocation: log makes the actual execution observable before any side effects. --mode apply always materializes a plan then executes it through one execution engine.
v15.4 alignment. This prompt honors vision v15.4.0 § Plan output contract (a plan file is materialized on every mutating run — both
--mode planand--mode apply;applyadditionally executes it through one execution engine — see pe-meta-plan-file-contract.md), § Plan execution modes (fresh / reconcile / trust off two booleans), § Model-routing seam (Phases 1–4 reasoning model, Phases 5–7 standard model), and § Iteration budget (overflow spillover plan — see pe-meta-iteration-budget.md). The full retired-flag → v14 destination map lives in the vision v15 changelog § Historical: v13 → v14 deprecated flag map and in the parser test inventory below.
v14 alignment (v2.1.0, 2026-05-29). This prompt was rebased from the v13 surface (
--breadth,--since/--between,--area/--artifact/--consumer,--subject/--concern,--mode-review,catch-up, plain--incremental) onto the vision v14 contracts: seven canonical parameters, derived breadth, value-shape--scopeparser, Phase 0a conversational pre-parser, per-artifact prompt invocation matrix, pipeline-phases /--skipmapping with rule #2, default-full invocation contract, and the first-lineResolved invocation:log.
Invocation options (canonical eight-parameter surface, vision v15.4)
The orchestrator accepts exactly eight canonical parameters. Any other --* flag is REJECTED with CF-05 and a deprecation notice pointing to its v14 destination. The full retired-flag → v14 destination map is in the migration table below and in the vision v15 changelog § Historical: v13 → v14 deprecated flag map.
--mode plan|apply (default: apply)
| Value | Behavior |
|---|---|
apply |
Materialize/reconcile plan (Phases 1–4) → execute plan (Phases 5–7) → report (Phase 8) (default). One execution engine shared with plan consumption (apply = plan + execute); low-risk autonomous apply + propose for higher-risk findings. Phases 1–4 run on a reasoning-grade model, Phases 5–7 on a standard/cheaper model (the plan→execute model seam). Materializes the plan on every run; honors vision v15.4 § Iteration budget — emits spillover plan on overflow per pe-meta-iteration-budget.md |
plan |
Materialize/reconcile plan, then stop (plan = apply minus execute) — Phases 5–7 are not executed. Produces health score, findings report, AND an actionable plan file on disk per vision v15.4 § Plan output contract — see pe-meta-plan-file-contract.md; no source-artifact writes |
Execution modes (fresh / reconcile / trust). Whether the plan is regenerated or trusted is governed by two orthogonal booleans — (baseline available?) × (research runs?) — never by file existence. A baseline is a plan named by --plan-file OR a plan generated earlier in the same conversation. --skip research (existing parameter) decides regenerate-vs-trust:
| baseline available? | research runs? | Mode | Behavior | Drift guard |
|---|---|---|---|---|
| no | yes | fresh | Generate plan from research → write → execute. | skipped (back-to-back) |
| yes | yes | reconcile | Load baseline, merge fresh evidence, preserve human decisions, re-verify coverage + actionability, overwrite → execute. | skipped (research re-validates) |
| yes | no | trust | Execute the baseline's human decisions as-is, but re-derive proof: every applicable PU MUST re-emit a fresh per-dimension evidence_ref (an inherited verified/pass-weak counts as never), and a baseline marked shallow-sweep=suspected carries that state forward. See pe-meta-plan-file-contract.md § 4/5. |
REQUIRED (cross-run target-section hashing) |
| no | no | invalid | Rejected at breadth=full (no baseline to substitute for research). |
— |
In reconcile, human-authored rows (park-lot rulings, consent lines, scope tags, rationales) MUST NOT be silently overwritten — contradicting evidence escalates. See pe-meta-plan-file-contract.md § Execution modes / § Reconcile.
Re-running the same command does not raise confidence — it lowers it. A re-run of an identical
--scope+--diminvocation is itself a signal the prior pass may be incomplete, so neither reconcile nor trust inherits the baseline's per-dimension verdict as coverage (the inheritedverified/pass-weakis treated asneverand re-exercised), and a baseline flaggedshallow-sweep=suspectedkeeps that flag until the previously silent body groups are evidenced afresh.
--scope <artifact-type-token>|<path>[,<path>...] (default: all)
Value-shape parser per vision v14 § Option taxonomy. Exactly two unambiguous shapes:
| Shape | Recognition rule | Examples |
|---|---|---|
| Artifact-type token | Single token matching all|context|instructions|agents|prompts|skills|hooks|snippets|templates |
--scope context, --scope all |
| Path set | One or more comma-separated paths — folders end /, files end .md |
--scope .github/prompts/00.09-pe-meta/, --scope path/a.md,path/b.md |
Mixing the two shapes in one invocation is REJECTED with CF-05 (--scope must be EITHER a single artifact-type token OR a path set, not both). When --scope is a single file path, Research narrows to that artifact and its direct dependencies (from the dependency-tracking file — see 00.00-context-structure-index.md → Functional Categories in .copilot/context/00.00-prompt-engineering/).
--source <source-id>|<url>[,...] (default: all monitored sources)
Filters Phase 1 research and Tier-2 screening to the named sources (e.g., --source vscode-release-notes, --source vscode-release-notes,copilot-model-changelog). Each value carries one of two shapes (mirroring the two-shape --scope parser):
- A source-id shape — a token resolving to a configured source in
pe-self-update.config.json→monitored_sources. Unknown source IDs are REJECTED with CF-05. - A URL shape — a raw
https://…release-notes URL for an ad-hoc source not in the monitored set (e.g.--source https://code.visualstudio.com/updates/v1_110). Phase 1 fetches it viafetch_webpageand treats it as a single-source ingestion for this run only; it is NOT persisted to the source ledger (noversion_scheme, so version-shaped--start/--endis rejected against it — use a date window). This is the explicit external-platform reconciliation path that replaces the retired Release-monitor prompt: auto-fetch of the monitored set is the parameter-less default; a specific release URL is supplied via--source <url>.
--dim <group|D#> (default: full)
Dimension selection: full, freshness, quality, adherence, reliability, model, structural, strategic, context-full, context-health, or specific D1-metadata through D35-portability-boundary.
When --dim efficiency is active with --mode apply, the orchestrator delegates Phase 4 apply work to @meta-optimizer instead of per-type builders, and Phase 4 Research adopts an efficiency lens (token budgets, deduplication, structural improvements). When --dim adherence is active, the orchestrator routes Phase 4 via the per-artifact matrix to pe-meta-adherence for sampled consumer verification.
--start <date|version> / --end <date|version> (default: none)
Explicit research window. Either bound MAY be supplied alone (open-ended interval). Any non-empty value triggers derived breadth=bounded-delta per the resolution rules below.
Value-shape (vision v15.3 — § Processing-state model). Each bound carries one of two shapes, resolved deterministically at Phase 0a (mirroring the two-shape --scope parser):
- A date shape — ISO-8601 (
YYYY-MM-DD),now, or a relative offset (-7d,-90d). - A source-version shape — a token matching the scoped source's
version_scheme(e.g.1.099for asemversource), resolved to that version's publish timestamp via the source'sversion_schemebefore phases 1–8 run.
A bounded-delta window overrides recorded coverage inside the window — every processing unit whose source-input falls in [--start, --end] is reprocessed even when its recorded status == pass (the re-baseline / distrust-recovery path). Two guard rails (enforced at Phase 0a): a version-shaped bound REQUIRES a singleton --source (rejected otherwise), and a source whose version_scheme is none rejects a version-shaped bound ("use a date window"). This adds no new parameter — it widens the value space of an existing one, so minimal-canonical-surface is preserved.
--deps none|direct|full|<N> (default: none)
Dependency-chain depth for Phase 4 per-artifact work. direct = first-level only; full = bounded recursive traversal (default depth 5); <N> = explicit numeric depth.
--skip <stage>[,<stage>...] (default: none)
| Stage | Skips | Use when |
|---|---|---|
research |
Phase 1 (source research) | INCOMPATIBLE with derived breadth=full (rejected with CF-05) UNLESS --plan-file references a validated baseline plan — the baseline substitutes for research (trust mode), and the cross-run drift guard becomes REQUIRED. See rule #2 in Pipeline phases and --skip mapping |
external |
Internet/URL fetching in all phases | No internet or local-only check desired |
organizational |
Phase 1.5 (organizational pass) | Cross-artifact organizational concerns already verified |
structure |
Phase 2 (structure audit) | Structure is known-good, focus on content |
consistency |
Phase 3 (consistency audit) | Cross-artifact consistency already verified |
content |
Phase 4 (content audit) | Individual artifacts already reviewed |
--plan-file <path> (default: auto-name)
Plan-artifact location/identity only — the eighth canonical parameter (vision v15.4 § Option taxonomy). It does NOT change what is assessed or applied, and it never decides regenerate-vs-trust (that is governed by --skip research; see the Execution modes table under --mode).
- Omitted (default): the plan lands at the auto-name path
<run-folder>/<NN>-<kebab-name>.plan.md; fallback.copilot/temp/pe-meta-state/plans/YYYYMMDD-HHMMSS-<kebab-name>.plan.mdwhen no run folder applies. - Supplied:
--plan-file <path>overrides the location AND marks that path as a baseline for this run. With research running this resolves to reconcile; with--skip researchit resolves to trust (drift-guarded). A same-conversation just-generated plan is an implicit baseline even without--plan-file.
See pe-meta-plan-file-contract.md for the full path algorithm, execution-ready-precision clause, and drift-guard rule.
Derived breadth (vision v14 § Default-full invocation contract)
breadth is a resolved attribute — never a flag. The orchestrator MUST derive it before any phase runs and MUST emit it in the first-line Resolved invocation: log.
| Caller type | --start / --end present? |
Derived breadth | Phase 1 output contract |
|---|---|---|---|
| Manual (interactive) | No | full |
Current-state snapshot across entire monitored-sources catalog (Phase 1.5 gate opens) |
| Trigger-fired (scheduled/hook/file-watcher) | No | incremental |
Change digest for the stale processing units (PUs) per the § Incremental filter work-set computation |
| Either | Yes (one or both bounds; date or source-version) | bounded-delta |
Bounded-window digest between the explicit endpoints; recorded pass coverage is overridden inside the window |
Rejection. --breadth (any value) is REJECTED with CF-05: --breadth retired in v14; breadth is derived from caller-type and --start/--end — see vision v14 § Default-full invocation contract.
Retired-flag migration table (vision v14 — historical)
Every retired v13 flag is REJECTED with CF-05 using a uniform message template: <flag> retired in v14; use <v14-replacement> — see vision v15 changelog § Historical: v13 → v14 deprecated flag map. The parser MUST table-drive these rejections; do NOT hand-write per-flag prose.
| Retired v13 surface | v14 destination |
|---|---|
--breadth full|incremental|catch-up |
Derived attribute; logged on first line of every run report |
catch-up value (any flag) |
--start <older-than-default> on any caller; resolves to bounded-delta |
--since <date> |
--start <date> |
--between <a>..<b> |
--start <a> --end <b> |
--area <token> |
--scope <artifact-type-token> |
--artifact <path> |
--scope <path>[,<path>...] |
--consumer <path> |
--scope <agent-or-prompt-file> --deps full |
--subject <kw> |
Resolved by Phase 0a → comma-separated --scope enumeration |
--concern <kw> |
Resolved by Phase 0a → --scope (+ --dim when keyword maps to a dimension) |
--mode-review individual|dep-aware|guidance-first |
Auto-derived from --scope artifact-type via per-artifact prompt invocation matrix; guidance-first leg covered by --dim adherence |
--incremental |
Single migration-window alias — accepted ONLY for trigger-fired callers (resolves to derived breadth=incremental); REJECTED for manual callers (would violate default-full-investigation) |
Any other unrecognized --* |
CF-05 rejection with full canonical eight-parameter enumeration |
Phase 0a — conversational pre-parser (vision v14 § Option taxonomy)
When it runs. Phase 0a runs BEFORE strict parsing whenever the raw invocation contains any token that is not one of the eight canonical parameters or a recognized value. It is LLM-mediated, so it is the ONLY place in the pipeline where free-form input is allowed to influence canonical resolution.
What it does.
- Reads the raw invocation (including any natural-language hints like
"recheck anything affected by the April VS Code release"or"focus on consumer-correctness for the adherence prompt"). - Resolves free-form intent into the eight canonical parameters using these rules:
- Subject keywords (e.g.,
"April VS Code release") → enumerate matching artifact paths and emit a comma-separated--scopeenumeration. - Concern keywords (e.g.,
"consumer-correctness","freshness") → set--dimto the matching group; if the keyword names a topic without a dimension, also emit a--scopeenumeration. - Consumer chains (e.g.,
"the adherence prompt and what it depends on") → emit--scope <consumer-file> --deps full. - Temporal hints (e.g.,
"since April","between April and May") → emit--start/--end.
- Subject keywords (e.g.,
- Echoes the resolved canonical invocation back to the caller BEFORE Phase 1 runs (gives caller a chance to abort or correct).
- Hands the canonical eight-parameter set to the strict parser. Phases 1–8 NEVER see free-form input.
Non-determinism risk. Phase 0a is LLM-mediated. Two callers passing the same prompt MAY get the same canonical resolution, but reproducibility is not guaranteed. Mitigation: every resolution is echoed back AND logged on the first line of the Phase 8 report (Resolved invocation: log). Downstream determinism is preserved because phases 1–8 only consume the canonical resolution.
Phase 0a value-shape --start/--end resolution (vision v15.3 § Processing-state model)
After free-form resolution settles and BEFORE the strict parser runs, Phase 0a resolves each supplied --start/--end bound to a timestamp so phases 1–8 only ever consume a resolved time window:
- Detect the shape of each bound deterministically. ISO-8601 (
YYYY-MM-DD),now, or a relative offset (-Nd) → date shape (used directly). A token matching the scoped source'sversion_schemepattern (semver|dated|model-version) → source-version shape. - Resolve a version-shaped bound to a timestamp. Look up the scoped source's
version_schemeinpe-self-update.config.json, find that version's publish timestamp (from the source ledgerlast_seen_*history or by fetching the source), and substitute the resolved timestamp into the window.version_schemethus plays a dual role — ledger version recorder AND parser version-token recognizer. - Enforce the two guard rails (reject with CF-05):
- A version-shaped bound with a non-singleton
--source(or--sourceomitted, which resolves to all monitored sources) →version window requires a single --source. - A version-shaped bound against a source whose
version_schemeisnone→source <id> has no version scheme; use a date window.
- A version-shaped bound with a non-singleton
- Echo the resolved window on the first-line
Resolved invocation:log as resolved timestamps (the version token is preserved in the audit narrative). No--incrementaltoken is accepted at this stage.
This widens an existing parameter's value space exactly as the value-shape --scope parser does; it introduces no new parameter and keeps breadth a derived attribute.
Phase 0a precondition — artifact-type/path consistency check (CF-05)
Spec SoT:
04.05-pe-meta-invocation-gates.md§ Phase 0a CF-05. The table, rejection message format, and applicability rules below MUST stay byte-equivalent (modulo wording) to the context file. Per-artifact prompts pin their single expected root locally and cite the context file for the canonical mapping.
When it runs. At the END of Phase 0a, after free-form resolution has settled but BEFORE Phase 0b. Runs on every invocation of a per-artifact prompt (e.g. /pe-meta-context-review, /pe-meta-prompt-review). Orchestrator-level prompts (/pe-meta-review, /pe-meta-review, /pe-meta-create-update, /pe-meta-design, /pe-meta-adherence, /pe-meta-scheduled-review) are artifact-type-agnostic by design and SKIP this check.
What it does. Compares the artifact-type ROOT implied by the prompt name against the artifact-type ROOT resolved from the positional <file-path> or --scope value. Mismatch is REJECTED with CF-05 before Phase 0b runs.
Prompt-name-prefix → expected-root table.
| Prompt name prefix | Expected root |
|---|---|
pe-meta-context-* |
.copilot/context/ |
pe-meta-instruction-* |
.github/instructions/ |
pe-meta-agent-* |
.github/agents/ |
pe-meta-prompt-* |
.github/prompts/ |
pe-meta-skill-* |
.github/skills/ |
pe-meta-hook-* |
.github/hooks/ |
pe-meta-template-* |
.github/templates/ |
pe-meta-snippet-* |
.github/prompt-snippets/ |
CF-05 rejection message format.
CF-05: artifact-type/path mismatch. Invoked prompt /<invoked-prompt> expects positional paths under <expected-root>; supplied path resolves under <actual-root>. Canonical replacement: /<canonical-prompt> '<supplied-path>' <other-args>.
Operates on ROOT, not domain. This check is deterministic from path. It does NOT read frontmatter and is NOT a domain check. Domain coherence is a separate concern handled by Phase 0b (which reads domain: frontmatter from each in-scope file).
Per-artifact prompt invocation matrix (vision v14 § Per-artifact prompt invocation matrix)
After parsing, the orchestrator routes Phase 4 work via this matrix from (--scope-resolved-artifact-type, --dim) → per-artifact prompt. The orchestrator MUST NOT hand-write per-artifact-type branches.
| Resolved artifact type | --dim family |
Selected prompt |
|---|---|---|
context |
review-family (default, freshness, quality, structural, strategic, model, context-full, context-health) |
pe-meta-context-review |
context |
--dim adherence |
pe-meta-adherence (target = each context file in scope) |
instructions |
review-family | pe-meta-instruction-review |
instructions |
--dim adherence |
pe-meta-adherence |
agents |
review-family | pe-meta-agent-review |
agents |
--dim adherence |
pe-meta-adherence |
prompts |
review-family | pe-meta-prompt-review |
prompts |
--dim adherence |
pe-meta-adherence |
skills |
review-family | pe-meta-skill-review |
hooks |
review-family | pe-meta-hook-review |
snippets |
review-family | pe-meta-snippet-review |
templates |
review-family | pe-meta-template-review |
| any | --dim efficiency --mode apply |
@pe-meta-optimizer (orchestrator delegation for apply work, not a per-artifact prompt) |
| any (creation intent surfaced by Phase 0a) | — | pe-meta-{type}-create-update or pe-meta-{type}-design per intent |
Path-shape --scope. When --scope is a path set, the orchestrator infers the artifact type from the path prefix (e.g., .github/prompts/ → prompts) and applies the matching matrix row.
Per-artifact prompt invocation matrix — Phase 0b inheritance. When a per-artifact prompt is invoked DIRECTLY by the user with a positional <file-path>, it runs its own minimal Phase 0b stub before delegating to the orchestrator. The stub MUST handle the positional-path scope-extraction step per vision v15 § Domain detection § per-invocation-type matrix and MUST read each in-scope file's declared domain: frontmatter to compute the footprint (the seed file's path does NOT constrain consumer domains when --deps full traverses the closure). The algorithm SoT is 04.05-pe-meta-invocation-gates.md — per-artifact prompts cite that file (not this prompt) so sibling-to-sibling coupling is avoided.
Phase 0b — Domain coherence check (vision v15 § Domain-coherent batching)
Algorithm SoT:
04.05-pe-meta-invocation-gates.md. The spec below is this prompt's implementation of the shared contract — algorithm, decision matrix, dispatch table,bundle=…closed set, andbundle=acceptconsent semantics MUST stay byte-equivalent (modulo wording) to the context file. When the contract changes, update the context file FIRST and re-validate this section withpe-meta-adherence.
Goal. Prevent silent heterogeneous batching by computing the semantic-domain footprint of the resolved scope (seed AND --deps-closure) BEFORE Phase 1 runs. When the footprint exceeds one domain, gate --mode apply until the caller either splits the run per-domain or appends explicit bundle=accept consent. Honest per-file metadata is the input; deterministic dispatch is the output.
Inputs.
- The canonical eight-parameter invocation resolved by Phase 0a (and validated against the Phase 0a precondition CF-05 check).
- The metadata-first 3-tier domain resolution algorithm defined in vision v15 § Domain detection:
- Tier 1 (authoritative): Read each in-scope file's
domain:frontmatter value. Tier 1 NEVER loses to a lower tier when present. - Tier 2 (optional heuristic): If
pe-domain-map.yamlexists at repo root, apply path-slug heuristic for files without declareddomain:. Map entries are flagged per-file in the Phase 8 report so authors can migrate to declared metadata. - Tier 3 (fallback): Files unresolved by Tier 1 or Tier 2 receive
domain: unknown.unknownis a reserved domain-id; repos MUST NOT declaredomain: unknownin any file (the orchestrator emits a Phase 8 warning when a declared value collides with the reserved id).
- Tier 1 (authoritative): Read each in-scope file's
Algorithm (deterministic, 5 steps).
-
Resolve scope to file set. Expand
--scope(artifact-type token → all files under root; path → enumerated files; path-set → union). If--deps direct|full|<N>is present, traverse thedependency-trackingclosure to depth N and union into the file set. Tag each file asrole=seed(named by the caller) orrole=dep(added by closure traversal). -
Resolve domain per file. For each file, apply Tier 1 → Tier 2 → Tier 3 and record
domain-source(declared|path-heuristic|unknown).--dimis NEVER consulted here —--dimis a dimension-group selector per v14 (filters which audit dimensions Phase 2–4 exercises); it never affects domain resolution. -
Compute seed footprint and dependency footprint SEPARATELY. Seed footprint =
{distinct domains across files where role=seed}. Dependency footprint ={distinct domains across files where role=dep AND domain ∉ seed footprint}. Recording the two sets separately is what enables thecross-domain-depsdiscrimination in step 4. -
Dispatch from the seed-vs-deps decision matrix.
Seed footprint Additional dep-domains Disposition ( bundle=…)Phase 1 action 1 0 single-domainProceed without prompt 1 ≥ 1 cross-domain-depsProceed as ONE review with per-dep-domain specialized analysis lenses in Phase 2–4 (no split — splitting a single-seed cross-domain-deps invocation produces incomplete reviews because the consumer artifact needs all declared deps present to be evaluated) ≥ 2 n/a multi-domain-gated(--mode apply) ormulti-domain-advisory(--mode plan)apply: emit numbered split proposal and BLOCK Phase 1 until user selects a split or appendsbundle=accept(→bundle=accepted-bundle);plan: include split proposal in Phase 8 report and proceed -
Emit the first-line
Resolved invocation:log marker. Append| bundle=<disposition>to the canonical first-line log so the disposition is observable before any side effects occur.
Outputs.
-
Domain footprint table in the Phase 8 report with one row per in-scope file and columns
path | role (seed/dep) | domain | domain-source (declared/path-heuristic/unknown). Files resolved by Tier 2 or Tier 3 are flagged in the report so authors can backfill declared metadata. -
Numbered split proposal (only when disposition is
multi-domain-gatedormulti-domain-advisory): one numbered line per detected domain plus a final[N]line for "proceed as one atomic bundle (equivalent to appendingbundle=accept)". Example shape:Phase 0b detected 3 distinct domains in the resolved scope: [1] prompt-engineering (12 files) [2] article-writing (4 files) [3] learning-hub (2 files) [4] proceed as one atomic bundle (bundle=accept) Select a split number (1-3) to run that domain only, run all three sequentially (all), or [4] to proceed as one atomic bundle. Note: 2 files were resolved by path-heuristic (Tier 2) and 2 files by unknown fallback (Tier 3). Consider adding `domain:` to those files' YAML frontmatter; see the Phase 8 report for the exact file list.
Gate behavior summary.
--mode |
Seed footprint | Additional dep-domains | bundle=accept present? |
Phase 0b disposition | Phase 1 runs? |
|---|---|---|---|---|---|
apply |
1 | 0 | n/a | single-domain |
Yes |
apply |
1 | ≥ 1 | n/a | cross-domain-deps |
Yes (one run; per-dep-domain lenses in Phase 2–4) |
apply |
≥ 2 | n/a | no | multi-domain-gated |
No — BLOCK on user input |
apply |
≥ 2 | n/a | yes | accepted-bundle |
Yes |
plan |
1 | 0 | n/a | single-domain |
Yes |
plan |
1 | ≥ 1 | n/a | cross-domain-deps |
Yes (one run; per-dep-domain lenses in Phase 2–4) |
plan |
≥ 2 | n/a | n/a | multi-domain-advisory |
Yes (with advisory in report) |
bundle=accept consent token. Single-keystroke bypass for the multi-domain gate. Appended as a trailing positional token (e.g. /pe-meta-review --mode apply --scope context bundle=accept). It is the ONLY accepted consent value — bundle=skip, bundle=yes, bundle=true, etc. are REJECTED with CF-05. Consent is recorded on the first-line Resolved invocation: log as bundle=accepted-bundle (distinct from the un-consented bundle=multi-domain-gated marker so the audit trail preserves the discrimination).
CF-05 rejection — --skip domain-coherence. Phase 0b is NOT in the skippable set. --skip domain-coherence is REJECTED with CF-05:
CF-05: --skip domain-coherence is rejected; Phase 0b is not skippable per vision v15 § Domain-coherent batching. To bypass the gate on a multi-domain scope, append bundle=accept to the invocation.
--dim orthogonality. --dim is a dimension-group selector per v14 (filters which audit dimensions Phase 2–4 exercises). It is NEVER a domain override. The domain footprint is always computed from per-file declared domain: metadata (with Tier 2/3 fallback) regardless of the --dim value. Parser test P0b-13 pins this invariant.
Determinism. The domain map is computed ONCE at Phase 0b entry and frozen for the rest of the run. The 3-tier algorithm runs in < 1 second on the largest current workspace (51 files, 3 domains); each file's YAML frontmatter is read once and cached. No LLM call required.
Pipeline phases and --skip mapping (vision v14 § Pipeline phases and --skip mapping)
| Phase | Title | --skip value that retires it |
Runs when |
|---|---|---|---|
| 0 | Argument parsing & breadth derivation | (cannot be skipped) | Always |
| 0a | Conversational pre-parser | (auto — runs only on non-canonical input) | When free-form input present |
| 0a-precondition | Artifact-type/path consistency check (CF-05) | (cannot be skipped) | Only on per-artifact prompts (orchestrator-level prompts skip) |
| 0b | Domain coherence check | (cannot be skipped; --skip domain-coherence is REJECTED with CF-05) |
Always; emits bundle=… marker on the Resolved invocation: log |
| 1 | Source research | research |
Always unless (--skip research AND derived breadth ≠ full) OR (--skip research AND --plan-file references a validated baseline — trust mode, drift-guarded) |
| 1.5 | Organizational pass | organizational |
When derived breadth=full AND resolved --scope is broader than a single file |
| 2 | Structure audit | structure |
Default; skippable |
| 3 | Consistency audit | consistency |
Default; skippable |
| 4 | Content audit (per-artifact via matrix) | content |
Default; skippable |
| 5 | User approval | (cannot be skipped in --mode apply) |
--mode apply only |
| 6 | Apply changes | (skipped automatically in --mode plan) |
--mode apply only |
| 7 | Regression test | (cannot be skipped when Phase 6 applies changes) | After Phase 6 changes |
| 8 | Report + log | (cannot be skipped) | Always |
Rule #1. --skip external retires internet/URL fetching across ALL phases that would otherwise use fetch_webpage.
Rule #2 (CRITICAL — vision v15.4). --skip research is INCOMPATIBLE with derived breadth=full because a full sweep without source research is structurally meaningless under the default-full invocation contract — EXCEPT when --plan-file references a validated baseline plan, because the plan IS the prior research product (trust mode). Without a baseline the parser MUST REJECT the combination with CF-05: --skip research is incompatible with derived breadth=full unless --plan-file references a validated baseline plan; either drop --skip research, supply --plan-file, or narrow the window with --start/--end (which derives breadth=bounded-delta). In trust mode the cross-run drift guard (target-section hashing) is REQUIRED: a hash mismatch escalates the drifted row rather than applying a stale edit.
Rule #3 (CRITICAL — execution discipline; no batch-marking). The audit phases (1, 1.5, 2, 3, 4) MUST be executed and status-marked one at a time — each phase is marked in-progress when its work begins and completed only after its work is actually performed and its outputs (findings, outcome-log entries, coverage markers) exist. The orchestrator MUST NOT batch-mark multiple audit phases complete in a single step, and MUST NOT mark a phase complete on the basis of a cheap proxy (e.g., a frontmatter grep standing in for the mandated per-artifact body review). Batch-marking is the behavioral root of the 2026-06-06 full-processing collapse, where audit phases were marked done without execution; the Phase 8 full-coverage linter is the runtime backstop, but this rule is the first line of defense.
Examples
/pe-meta-review— Parameter-less manual invocation. Derivesbreadth=full. Runs Phases 0 → 1 → 1.5 → 2 → 3 → 4 → 5 → 6 → 7 → 8 against the entire monitored-sources catalog and the entire PE artifact tree. (default-full-investigation contract.)/pe-meta-review --mode plan— Same as above but stops after Phase 4 and produces an assessment-only report./pe-meta-review --scope context— Manual,--scopeis the artifact-type tokencontext. Derivedbreadth=full, but Phase 1.5 Organizational Pass STILL runs because the resolved scope (all context files) is broader than a single file./pe-meta-review --scope .copilot/context/00.00-prompt-engineering/01.07-critical-rules-priority-matrix.md— Single-file path scope. Derivedbreadth=full, but Phase 1.5 is SKIPPED (single-file gate)./pe-meta-review --start 2026-04-01— Manual + window. Derivesbreadth=bounded-delta. Phase 1 produces a bounded-window digest between2026-04-01and "now"./pe-meta-review --start 2026-04-01 --end 2026-04-30— Same as above with both endpoints./pe-meta-review --source vscode-release-notes— Manual, source-filtered. Derivedbreadth=full, but Phase 1 consults only thevscode-release-notessource./pe-meta-review --mode apply --dim efficiency --skip structure,consistency --scope context— Efficiency-lens review of context files only./pe-meta-review --mode apply --dim adherence --scope .copilot/context/00.00-prompt-engineering/01.07-critical-rules-priority-matrix.md --deps full— Adherence sampling for a specific guidance file across its full dependency chain./pe-meta-review --incremental(trigger-fired only) — Single-window deprecation alias. Resolves to derivedbreadth=incremental. REJECTED if invoked manually./pe-meta-review --mode apply --scope .github/prompts/00.09-pe-meta/pe-meta-update.prompt.md --deps full— Manual + single-seed-file +--deps full. Phase 0b expands the dependency closure (vision contexts, dependency-tracking files, instruction files). Seed footprint ={prompt-engineering}(1 domain); dep closure adds{article-writing, learning-hub}. Disposition =bundle=cross-domain-deps— ONE review runs with per-dep-domain specialized lenses applied in Phase 2–4; the review is NOT split because the consumer artifact needs all declared deps present to be evaluated./pe-meta-review --mode apply --scope context— Manual + artifact-type token. Phase 0b enumerates all.copilot/context/files; seed footprint spans{prompt-engineering, article-writing, learning-hub}(3 domains). Disposition =bundle=multi-domain-gated— Phase 1 is BLOCKED until the user selects a numbered split (1/2/3 per domain) OR appendsbundle=acceptto convert tobundle=accepted-bundle./pe-meta-review --mode apply --scope context bundle=accept— Same scope as above but with explicit consent. Phase 0b recordsbundle=accepted-bundleon the first-line log and proceeds without gating Phase 1. Phase 8 report still emits the domain-footprint table.
Rejected examples (CF-05).
/pe-meta-review --breadth full→--breadth retired in v14; breadth is derived from caller-type and --start/--end — see vision v14 § Default-full invocation contract./pe-meta-review --since 2026-04-01→--since retired in v14; use --start <YYYY-MM-DD> — see vision v15 changelog § Historical: v13 → v14 deprecated flag map./pe-meta-review --area context→--area retired in v14; use --scope <artifact-type-token> — see vision v15 changelog § Historical: v13 → v14 deprecated flag map./pe-meta-review --subject "April VS Code release"→ Phase 0a resolution required; if invoked directly without Phase 0a route, CF-05:--subject retired in v14; free-form intent is resolved by Phase 0a — see vision v14 § Option taxonomy./pe-meta-review --mode-review guidance-first→ CF-05:--mode-review retired in v14; use --dim adherence — see vision v15 changelog § Historical: v13 → v14 deprecated flag map./pe-meta-review --incremental(manual caller) → CF-05:--incremental is accepted only for trigger-fired callers; manual invocations are contracted to derived breadth=full per default-full-investigation./pe-meta-review --skip research(manual, no window) → CF-05:--skip research is incompatible with derived breadth=full; either drop --skip research or narrow the window with --start/--end (which derives breadth=bounded-delta)./pe-meta-review healthcheck→ CF-05:"healthcheck" is no longer a supported preset. Use the eight canonical parameters per vision v15.4 — see § Invocation options./pe-meta-review --skip domain-coherence→ CF-05:--skip domain-coherence is rejected; Phase 0b is not skippable per vision v15 § Domain-coherent batching. To bypass the gate on a multi-domain scope, append bundle=accept to the invocation./pe-meta-review --scope context bundle=skip→ CF-05:bundle=skip is not a valid consent token; the closed set is {accept}. Use bundle=accept to bypass the multi-domain gate./pe-meta-review --scope context bundle=yes→ CF-05:bundle=yes is not a valid consent token; the closed set is {accept}. Use bundle=accept to bypass the multi-domain gate./pe-meta-context-review .github/prompts/00.09-pe-meta/pe-meta-update.prompt.md→ CF-05 (artifact-type/path mismatch from the Phase 0a precondition):Invoked prompt /pe-meta-context-review expects positional paths under .copilot/context/; supplied path resolves under .github/prompts/. Canonical replacement: /pe-meta-prompt-review '.github/prompts/00.09-pe-meta/pe-meta-update.prompt.md'.
CRITICAL BOUNDARIES
Always Do
- Parse mode, scope, flags FIRST
- Run Phase 0a precondition (artifact-type/path consistency check, CF-05) on every per-artifact prompt invocation: compare prompt-name prefix against positional-path root; reject with CF-05 and suggest the canonically-correct prompt name on mismatch. Orchestrator-level prompts skip this check (artifact-type-agnostic by design).
- Run Phase 0b (domain coherence check) on every invocation BEFORE Phase 1: resolve scope, apply the metadata-first 3-tier algorithm, compute seed and dependency footprints separately, dispatch from the decision matrix, emit
bundle=…on the first-lineResolved invocation:log. - Honor
bundle=acceptas the ONLY consent token for the multi-domain gate; record consented runs asbundle=accepted-bundle(distinct from un-consentedbundle=multi-domain-gated) so the audit trail preserves the discrimination. - Load dependency map (the
dependency-trackingfiles — see 00.00-context-structure-index.md → Functional Categories in.copilot/context/00.00-prompt-engineering/) - Use three-tier classification for every proposed change (see Classification Protocol below)
- In each audit phase Research substep: challenge current state, propose 2+ alternative approaches per finding, compare on effectiveness/reliability/efficiency
- Risk-ordered execution: When multiple findings are produced, execute in this order:
- Non-regressive changes first (autonomous-eligible: LOW severity, deterministic classification)
- Potentially-regressive changes next (require human approval: MEDIUM/HIGH severity)
- Optimization-only changes last (separate cycle if budget allows)
- No step is blocked by a higher-risk independent step — execute what you can, escalate what you must
- Propagation-aware priority: Before presenting findings, check the
dependency-trackingfile (see 00.00-context-structure-index.md → Functional Categories in.copilot/context/00.00-prompt-engineering/) for each affected artifact's dependent count. Sort findings by: severity (primary) × dependent count (secondary). A HIGH finding in a Tier 1 file with 15 dependents takes priority over a HIGH finding in a Tier 5 file with 2. - Present consolidated plan to user BEFORE applying changes
- Max 3 files between validation checkpoints
- Produce final report regardless of mode
- After every applied change: bump
version:, updatelast_updated:, verifyscope.coverstopics match content - Autonomous execution for LOW-severity changes (Phase 1 rollout artifacts only: templates, prompt snippets, hooks JSON):
- When ALL of these conditions are met, apply without human approval: (1) severity is LOW, (2) classification is deterministic (Tier 1 or Tier 2), (3) pre-change guard passes, (4) post-change validation passes
- For all other changes: present plan and wait for approval
- Structured change logging (MANDATORY after every applied change):
- Append a structured entry to
05.04-meta-review-log.mdwith: artifact path, classification (breaking/non-breaking), confidence (deterministic/LLM-assisted), autonomy level (autonomous/approved), validations passed, outcome (success/pending)
- Append a structured entry to
Ask First
- High-impact files (6+ dependents)
- Uncertain source reliability
- 5+ CRITICAL findings in any audit phase
- Any change above LOW severity — present plan before applying
Never Do
- NEVER apply MEDIUM/HIGH/CRITICAL changes without user approval
- NEVER skip validation after changes
- NEVER remove capabilities — only extend, refine, or deprecate
- NEVER classify a change without checking N-1 block labels first (when available)
- NEVER skip Phase 0b —
--skip domain-coherenceis REJECTED with CF-05; the only legitimate bypass isbundle=accept(which surfaces the disposition on the audit log rather than hiding it) - NEVER treat
--dimas a domain override —--dimis a dimension-group selector per v14; domain footprint is always computed from per-filedomain:metadata regardless of--dimvalue (parser test P0b-13 pins this invariant) - NEVER override declared
domain:frontmatter with a Tier 2 heuristic match — Tier 1 always wins when present; Tier 2 only applies to files without declareddomain:and emits a Phase 8 report flag suggesting metadata backfill
Classification Protocol (Three-Tier)
For every proposed change, classify using these tiers in order. Stop at the first tier that produces a confident result.
Tier 1: Deterministic Structural (metadata)
Check without LLM judgment:
- Required YAML fields present (
goal:,scope:,version:,last_updated:) -
version:will be bumped after change -
scope.covers:topics not removed from content (compare topic strings against section headings)
If any check fails → CRITICAL finding. No LLM needed.
Tier 2: Deterministic Content (N-1 block labels)
For context files and instruction files with **Rule**:/**Rationale**:/**Example**: labels:
- If the diff touches a
**Rule**:block → BREAKING CANDIDATE → requires full validation - If the diff touches only
**Rationale**:or**Example**:blocks → NON-BREAKING → eligible for streamlined processing - If the section has no N-1 labels → fall through to Tier 3 + flag for N-1 adoption
This is deterministic — parse block labels, classify the diff. No LLM judgment needed.
Tier 3: LLM-Assisted Semantic (metadata as reference)
When Tiers 1-2 don't resolve, use LLM judgment WITH metadata as reference:
- Compare proposed change against
goal:— does it contradict the stated purpose? - Compare against
boundaries:— does it violate any declared constraint? - Compare against
rationales:— does it invalidate a design decision?
This is LLM judgment, but significantly better than judgment without any metadata reference point.
Handoff Data Contracts
📖 Researcher output format: .github/templates/00.00-prompt-engineering/output-researcher-report.template.md
| Transition | Strategy | Include | Exclude | Max tokens |
|---|---|---|---|---|
| Orchestrator → meta-researcher (Phase 1) | send: true | Source URL/description, scope, flags, --skip external status |
N/A (first handoff) | ~2,000 |
| meta-researcher → Orchestrator | Structured report | Prioritized recommendations classified by audit phase, impact matrix, alternative approaches | Raw internet fetches, full article text, source analysis | ≤2,000 |
| Orchestrator → meta-validator (Phase 2R/3R) | send: true | Scope, audit dimension, Phase 1 findings summary (if available) | Full Phase 1 report, raw search results | ≤1,500 |
| Orchestrator → meta-designer (Phase 2B/3B/4B) | send: true | Audit findings summary, scope, execution constraints | Raw audit analysis, prior phase conversation | ≤1,500 |
| meta-designer → type-specific builders | Change specs | Per-file change specification: path, current content ref, proposed change, rationale | Design analysis, alternatives considered | ≤1,000/file |
Orchestrator → meta-optimizer (--dim efficiency --mode apply) |
send: true | Scope, efficiency findings, token budgets | Prior audit conversation | ≤1,000 |
Summarization Protocol
| After Phase | Summarize to | Max tokens | Discard |
|---|---|---|---|
| Phase 1 (Source Research) | Prioritized recommendations by audit phase | ≤2,000 | Raw fetches, full article text |
| Phase 2 (Structure Audit) | Structural findings: severity-scored issues + recommended fixes | ≤1,500 | Raw inventory data, file listings |
| Phase 3 (Consistency Audit) | Consistency findings: contradictions + dedup recommendations | ≤1,500 | Cross-reference analysis details |
| Phase 4 (Content Audit) | Content findings: per-file issues + improvement options | ≤1,500 | Per-file analysis details |
| Phase 5 (Approval) | Approved change list (file + change description) | ≤1,000 | Rejected items, discussion |
| Phase 6 (Apply) | Applied changes: file + status | ≤500 | Builder's reasoning |
| Phase 7 (Regression) | Regression results: pass/fail per capability | ≤1,000 | Full test details |
Trigger: Before EVERY handoff, estimate accumulated context. If >10,000 tokens: MUST summarize all prior phases to their "Summarize to" format. This is CRITICAL for pe-meta-review which has 8 phases — without summarization, accuracy drops to ~30% at 32K tokens.
📖 Full strategies: .copilot/context/00.00-prompt-engineering/02.02-context-window-and-token-optimization.md
Context Checkpoint Protocol
Between EVERY phase, run this deterministic context size check:
- Count: List all files read in the completed phase
- Estimate:
files_read × avg_file_lines × 6.67 = tokens_this_phase(avg context file ~150 lines → ~1,000 tokens; avg agent/prompt ~300 lines → ~2,000 tokens) - Running total:
prior_phases_total + tokens_this_phase - Act on thresholds (📖 see
01.06-system-parameters.md→ Meta-Pipeline Context Thresholds):- ≤10,000 tokens: Continue normally
- >10,000 tokens: MUST summarize all prior phases per the Summarization Protocol table above
- >20,000 tokens: MUST write state to
.copilot/temp/pe-meta-state/and recommend new session
File-based isolation boundary: Phases 5–8 MUST use file-based isolation. At the end of Phase 4 (or at Phase 5 entry), write the consolidated approved change list to .copilot/temp/pe-meta-state/phase-5-changelist.md. Phases 6–8 read from this file — they do NOT depend on conversation history from Phases 1–4.
Processing-state model (vision v15.3 § Processing-state model)
Processing state is recorded on two independent axes — never collapsed to one scalar timestamp.
Source ledger (input axis). One file per monitored source at <state.path>/triggers/<source-id>.json (path from pe-self-update.config.json → state.path). It is a rebuildable cache of what the world last looked like:
{
"source_id": "vscode-release-notes",
"version_scheme": "semver",
"last_seen_version": "1.107",
"last_seen_timestamp": "2026-05-29T00:00:00Z",
"last_digest_hash": "<sha256>"
}
Artifact coverage (processing axis). The durable single source of truth, recorded per artifact in the bottom validation-metadata block — one cell per (artifact × applicable-dimension):
coverage:
<dimension-id>:
source_versions: { "<source-id>": "<version-or-timestamp>", ... }
depth: research | screening | deep
status: pass | fail | partial | never
last_run: "<YYYY-MM-DDTHH:MM:SSZ>"
A processing unit (PU) is one (artifact × applicable-dimension) — applicability follows active-dimensions-follow-evidence. A PU is stale when its status == never, OR status != pass, OR any dependency source's ledger last_seen_version / last_seen_timestamp is newer than the PU's recorded source_versions[dep]. Every writing prompt MUST emit the coverage block in this identical shape (defined here as the canonical block).
Incremental filter (trigger-fired derived breadth=incremental only)
When derived breadth=incremental (trigger-fired caller, no --start/--end), build the PU work set BEFORE Phase 1 from the source ledger and the per-artifact coverage metadata:
- Read the source ledgers — for each source in resolved
--source(or all monitored sources when omitted), read<state.path>/triggers/<source-id>.json(schema above). Version-keyed sources comparelast_seen_version; time-keyed sources comparelast_seen_timestamp. - Compute the PU work set — for each in-scope artifact, for each applicable dimension (per
active-dimensions-follow-evidence), include the PU iff it is stale: its recordedsource_versions[dep]is older than the dependency's ledger watermark, ORstatus != pass, ORstatus == never. Never-covered and non-pass PUs are ALWAYS included (at-least-once guarantee). PUs whose recordedsource_versionsequal the ledger latest ANDstatus == passare skipped (no-redundant). - Build scope — only artifacts owning at least one stale PU are in scope. Phase 1 produces a change digest (not a snapshot) per the researcher output contract.
- Apply filter — all audit phases (2, 3, 4) process ONLY the stale PUs.
- Persist new state — at end of Phase 8, write each processed PU's coverage cell and advance the per-source ledger
last_seen_*.
If a source ledger file is missing on a trigger-fired call, warn No prior ledger for source <id>; treating all its PUs as never-covered (full sweep for this source) and treat that source's PUs as stale while leaving the global derived breadth=incremental intact for unaffected sources.
Manual callers MUST NOT reach this branch. --incremental is rejected for manual callers per CF-05 (default-full-investigation). Manual + window callers reach the bounded-delta branch instead, where the explicit --start bound is the watermark and recorded pass coverage is overridden inside [--start, --end] (every PU in the window is reprocessed — the re-baseline / distrust-recovery path).
Phase 1: Source Research (skip with --skip research — only when derived breadth ≠ full)
External knowledge gathering. Feeds findings into Phases 1.5, 2, 3, 4 to inform audit research substeps.
Research output contract (vision v14). The researcher MUST emit ONE of three template-bound output shapes, selected by derived breadth:
Derived breadth Output shape Template fullCurrent-state snapshot across the entire monitored-sources catalog pe-meta-research-snapshot.template.mdincrementalChange digest for the stale PUs (per § Incremental filter) pe-meta-research-digest.template.mdbounded-deltaBounded-window digest between explicit --start/--end(date or source-version)pe-meta-research-window-digest.template.md(includeswindow.start/window.endfields)
1a: Full Research (default)
Delegate to @meta-researcher with the resolved canonical invocation (the agent reads --source, derived breadth, --start/--end). The agent loads pe-self-update.config.json for the monitored-sources catalog and state location. Produce a self-contained report shaped by the contract above with:
- Evidence from authoritative sources (distilled context files always, 05.02 reference articles always, internet research always unless
--skip external) - User-provided authoritative sources (URLs, files) analyzed when supplied
- Critical validation of internet findings — each external finding must be evaluated for whether integrating it would improve artifact reliability, effectiveness, or efficiency; findings that are unuseful, unverifiable, or potentially misleading are flagged and excluded from recommendations
- Improvement opportunities mapped to affected artifacts and quality dimensions
- PE structure assessment (inventory, symmetry, orphans, context coverage)
- For each opportunity: 2+ alternative approaches compared on effectiveness, reliability, efficiency
- Prioritized recommendations classified by audit phase (structure / consistency / content)
When scope is a specific file path: Research focuses on that artifact and its dependency chain only.
1b: Direct application (--scope <file.md> + --mode apply --skip research, derived breadth ≠ full)
When the caller scopes to a single file path AND --skip research AND derived breadth ≠ full (i.e., bounded-delta):
- Read the target artifact completely
- Load relevant instruction file for the artifact type
- Load the dependency map for consumer impact
- Skip to Phase 5 (user approval) with user's change description as the change spec
This branch is unreachable from manual + no-window callers (rule #2 rejection prevents it).
Phase 1.5: Organizational Pass (skip with --skip organizational)
Gate. Runs ONLY when derived breadth=full AND the resolved --scope is broader than a single file (either an artifact-type token resolving to ≥2 files, or a path set with ≥2 files). Skipped on single-file scopes and on incremental/bounded-delta breadths.
Goal. Before the per-artifact audits (Phases 2–4) drill into individual files, the organizational pass verifies cross-artifact organizational concerns that only surface at the catalog level:
- Inventory completeness — every PE artifact type has at least one researcher/builder/validator pairing where the architecture requires symmetry.
- Orphan detection — every artifact has at least one declared consumer in the dependency map (orphan flag if not).
- Layer cross-cuts — context-layer rules referenced by ≥2 instruction layers are flagged for canonical-source verification.
- Naming and locator parity — file paths, frontmatter
name:fields, andSTRUCTURE-READMEtable rows reconcile. - Series and sequence integrity —
Order in group:markers, sequence labels, and duplicate H1s are detected. - Cross-domain consumer chains — agents/prompts that depend on context files outside their declared category are surfaced.
Findings from this phase scope Phase 2 (structure) — Phase 2 narrows from "everything" to "everything plus the organizational concerns Phase 1.5 surfaced".
Execution. Orchestrator runs this directly (using list_dir, file_search, grep_search, read_file). Do NOT delegate to a per-type validator. Output: organizational findings report consumed by Phase 2's screening step.
Phase 2: Structure Audit (skip with --skip structure)
Goal: Validate the PE artifact ecosystem's structural integrity — what files exist, where they are, what role and rules each contains, whether the layout follows conventions.
When --mode apply (and --skip structure is not set): Runs all three substeps (Research, Build, Validate).
When --mode plan: Runs Research substep only — Build and Validate substeps are skipped because plan mode is assessment-only. Findings feed into Phase 8 report.
2-Research
The orchestrator performs structural inventory directly (using list_dir, file_search, grep_search, read_file). This is orchestrator-owned work — do NOT delegate to meta-validator for this step.
Checks:
- Artifact inventory by type across all PE locations
- Location compliance, role clarity (YAML frontmatter), rules presence (boundaries, tool alignment)
- Builder/validator symmetry, orphan detection (via dependency map)
- STRUCTURE-README alignment, dependency map accuracy
When Phase 1 produced findings, incorporate validated external best practices. When --skip external, compare against internal conventions and 05.02 reference articles.
Challenge step: For each issue, propose 2+ resolution options. Compare on effectiveness, reliability, efficiency. Recommend with rationale.
Output: Structural findings report with severity-scored issues and ranked options.
2-Build (--mode apply only)
Delegate to @meta-designer: Transform structural findings into change specifications. Each spec independently executable by a type-specific builder. Include: rationale, alternatives considered, why recommended option wins, layer-ordered execution sequence.
2-Validate (--mode apply only)
Delegate to @meta-validator (Design Validation mode): Verify structural changes won't break capabilities, respect dependency order, preserve builder/validator symmetry. Verdict: SAFE / FIX / UNSAFE.
Phase 3: Consistency Audit (skip with --skip consistency)
Goal: Validate cross-artifact consistency — goal alignment across related artifacts, non-ambiguity, non-redundancy, non-contradiction between files.
When --mode apply (and --skip consistency is not set): Runs all three substeps (Research, Build, Validate).
When --mode plan: Runs Research substep only — Build and Validate substeps are skipped because plan mode is assessment-only. Findings feed into Phase 8 report.
3-Research
Delegate to @meta-validator (Ecosystem Audit mode, dimensions: coherence+rules+references). The valida
*Truncated - read the full file at https://github.com/diginsight/smartdocs/blob/6675c3ffb9137858a564427b3a5ea28173114f14/.github/prompts/00.09-pe-meta/pe-meta-review.prompt.m