schema: intent-driven-strict

context: |
  Repo: pi-codegraphcontext — a Pi coding-agent extension integrating CodeGraphContext (CGC)
  so the agent can query the code graph (nodes, relationships, impact) without
  burning context on raw source. Currently in the planning phase: this tree holds the
  OpenSpec planning home (schema: intent-driven-strict) with ten planned changes (session
  lifecycle gate, proactive context injection, worktree-aware contexts, agent guide +
  routing guidance, CLI gap tools, output token economy, slash commands, status HUD,
  freshness drift sync) and the ADRs they created (adr/0001–0009, all Status: Proposed —
  in force as a set). The `cgc` CLI v0.6.x is installed in this environment and is the
  integration target (binary-only posture, per ADR-0001). Implementation lands here as
  changes are applied. The validation/authoring workflows (openspec-validate-change,
  openspec-plan-change) and the checkpoint-bridge extension live in ~/pi-workflows
  (see that repo's docs/adr/). Validation sweeps must leave .scratch/ (slipstream's
  recovery area) alone — scorecards default to .openspec-reports/.

rules:
  proposal:
    - Must use grill-me skill
  design:
    - Must use c4-architecture skill
  adr:
    - Must use architectural-decision-records skill
  specs:
    - Must use gherkin-authoring skill
  validate:
    - Sub-agents are read-only — they validate against live docs and return verdicts; they never edit files
    - "Access documentation in order: Context7, then jina or exa, then a native web fetch tool (e.g., WebFetch)"
    - If sub-agent deployment fails or is unavailable, run the validation in the main agent (session) instead
    - Every verdict must cite a source URL; flag anything without evidence as UNCERTAIN rather than guessing
    - Do not approve edits yourself — always prompt the user before revising tasks.md or related artifacts
    - After revision, the change must still pass `openspec validate --strict` and all artifacts must remain coherent with one another
