{
  "schema_version": "0.1",
  "artifact_type": "implementation_plan",
  "canonical": true,
  "artifact_id": "IMP-010",
  "agent_summary": {
    "title": "Synchronize PRD Plugin with shipped Substrate capabilities",
    "status": "approved",
    "summary": "Implement capability truth, the executable bridge, high-value workflow integrations, optional consent-gated services, downstream parity, and cross-version verification as independently testable phases.",
    "last_reviewed_at": "2026-07-15",
    "load_notes": "Canonical JSON; generate Markdown only on explicit human request."
  },
  "human_exports": {
    "markdown": {
      "on_request_only": true,
      "last_exported_at": null,
      "last_exported_path": null,
      "export_is_canonical": false
    }
  },
  "phases": [
    {
      "id": "IMP-PHASE-028",
      "summary": "Contract truth and bridge foundations",
      "goal": "Create a generated parity authority, negotiated contract, executable transport, and reconciled PRD state/event boundary before any workflow depends on the runtime.",
      "task_ids": ["IMP-TASK-068", "IMP-TASK-069", "IMP-TASK-070", "IMP-TASK-071", "IMP-TASK-088"],
      "exit_criteria": "Capability catalog, handshake, executable bridge, event projection, and canonical-state boundary pass focused contract tests with local fallback."
    },
    {
      "id": "IMP-PHASE-029",
      "summary": "Knowledge, memory, context, and discovery",
      "goal": "Make the shipped retrieval and discovery systems the preferred bounded context sources while retaining exact local authority and fallback.",
      "task_ids": ["IMP-TASK-072", "IMP-TASK-073", "IMP-TASK-074", "IMP-TASK-075"],
      "exit_criteria": "Federated wiki/docs, memory, code/docs/context, Tool Hub, and skillbook workflows operate with provenance, authorization, freshness, and local fallback."
    },
    {
      "id": "IMP-PHASE-030",
      "summary": "Judgment, reporting, verification, and model execution",
      "goal": "Close the current request-file dead ends and use configured runtime execution for nondeterministic work and impact-scoped verification.",
      "task_ids": ["IMP-TASK-076", "IMP-TASK-077", "IMP-TASK-078", "IMP-TASK-079"],
      "exit_criteria": "Judgment, reporting, impact verification, model routing, telemetry, and deterministic resume work end to end and degrade safely."
    },
    {
      "id": "IMP-PHASE-031",
      "summary": "Goals, bus, workers, and optional runtime services",
      "goal": "Bind lifecycle execution without creating dual authority and expose optional collaboration/evidence services only through declared consent-gated workflows.",
      "task_ids": ["IMP-TASK-080", "IMP-TASK-081", "IMP-TASK-082", "IMP-TASK-083"],
      "exit_criteria": "Goal/execution/capsule links reconcile idempotently, worker boundaries are enforced, and optional services remain default-off and scoped."
    },
    {
      "id": "IMP-PHASE-032",
      "summary": "Workflow, configuration, and downstream synchronization",
      "goal": "Map all workflows, expose practical latency profiles, and ship every contract and instruction consistently to every supported host and downstream repository.",
      "task_ids": ["IMP-TASK-084", "IMP-TASK-085", "IMP-TASK-086"],
      "exit_criteria": "Workflow/capability mappings, unified config, profiles, installer migrations, tools, skills, hooks, templates, docs, and host mirrors are parity-green."
    },
    {
      "id": "IMP-PHASE-033",
      "summary": "Compatibility, audit, and release readiness",
      "goal": "Prove the complete integration across versions, failures, hosts, installation paths, security boundaries, and release gates, fixing and re-auditing until CHML is zero.",
      "task_ids": ["IMP-TASK-087"],
      "exit_criteria": "Focused and release-wide verification, traceability, state consistency, package checks, and repeated CHML audits report zero findings."
    }
  ],
  "tasks": [
    {
      "id": "IMP-TASK-068",
      "phase_id": "IMP-PHASE-028",
      "summary": "Create the generated capability manifest and parity auditor covering all shipped AI-Collab tool groups, every PRD workflow, execution intent, config, authority, fallback, exclusions, and validation coverage.",
      "requirement_ids": ["PRD-REQ-058", "PRD-REQ-069"],
      "architecture_ids": ["ARCH-COMP-047", "ARCH-IF-040", "ARCH-DEC-038"],
      "validation_ids": ["IMP-VAL-065"],
      "files": ["templates/substrate-capabilities.json", "scripts/prd_substrate.py", "scripts/prd_gap_audit.py", "tests/test_prd_substrate.py", "tests/test_workflow_substrate_parity.py"],
      "red_test": "Add catalog/parity tests that fail for an unclassified AI-Collab tool group, workflow, config control, fallback, exclusion, or unsupported advertised action.",
      "implementation": "Generate one normalized manifest from the reviewed contract inventory, expose bounded inventory/audit operations, and make release parity consume it.",
      "green_test": "Run focused substrate and workflow-parity tests plus the parity auditor; require zero unclassified entries.",
      "complexity": "large",
      "confidence": "high",
      "risk": "medium",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-069",
      "phase_id": "IMP-PHASE-028",
      "summary": "Implement contract v2 handshake, endpoint/transport resolution, whoami/repository/workspace identity, authentication-mode discovery, doctor/index/freshness/tool/model availability, compatibility negotiation, and secret-safe diagnostics.",
      "requirement_ids": ["PRD-REQ-059", "PRD-REQ-068", "PRD-NFR-033", "PRD-NFR-037"],
      "architecture_ids": ["ARCH-COMP-048", "ARCH-COMP-055", "ARCH-IF-041", "ARCH-DEC-039"],
      "validation_ids": ["IMP-VAL-066"],
      "files": ["scripts/prd_substrate.py", "scripts/prd_config.py", "templates/config.json", "tests/test_prd_substrate.py", "tests/fixtures/substrate/"],
      "red_test": "Add negotiation tests for compatible, older, newer, unauthenticated, unhealthy, stale-index, missing-tool, malformed, and secret-bearing responses.",
      "implementation": "Extend handshake schema and effective capability resolution without persisting credentials or making runtime availability a local workflow prerequisite.",
      "green_test": "Run handshake/config fixture tests and assert explicit compatibility/degradation reasons with redacted output.",
      "complexity": "large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-070",
      "phase_id": "IMP-PHASE-028",
      "summary": "Build the executable runtime bridge with discover, call, submit, status, result, and cancel operations; typed request/receipt envelopes; idempotency; timeouts; asynchronous correlation; CLI/MCP exposure; and registered workflow actions.",
      "requirement_ids": ["PRD-REQ-060", "PRD-REQ-061", "PRD-NFR-034", "PRD-NFR-036"],
      "architecture_ids": ["ARCH-COMP-049", "ARCH-COMP-050", "ARCH-IF-042", "ARCH-IF-043", "ARCH-DEC-039"],
      "validation_ids": ["IMP-VAL-067"],
      "files": ["scripts/prd_substrate.py", "scripts/prd_workflows.py", "scripts/prd_tools.py", "mcp/server.cjs", "utcp.json", "tests/test_prd_substrate.py", "tests/test_workflow_actions.py", "tests/node/server.test.cjs"],
      "red_test": "Add fake-runtime contract tests proving the current adapter cannot execute or resume an operation and rejecting unknown tools, schemas, duplicate receipts, and mismatched hashes.",
      "implementation": "Add a transport interface and allowlisted operation registry; keep transport implementation replaceable and large/transient payloads outside canonical state.",
      "green_test": "Run CLI/MCP/workflow bridge tests for synchronous/asynchronous success, retry, timeout, cancel, duplicate replay, malformed result, unavailable runtime, and local fallback.",
      "complexity": "x-large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-071",
      "phase_id": "IMP-PHASE-028",
      "summary": "Implement the advertised event projection and reconcile AI-Collab's direct PRD JSON reads with the versioned adapter records/snapshot contract, source hashes, lifecycle links, and single-writer canonical mutation rules.",
      "requirement_ids": ["PRD-REQ-061", "PRD-REQ-066", "PRD-NFR-033"],
      "architecture_ids": ["ARCH-COMP-049", "ARCH-COMP-053", "ARCH-IF-043", "ARCH-IF-048", "ARCH-DEC-040"],
      "validation_ids": ["IMP-VAL-068"],
      "files": ["scripts/prd_substrate.py", "templates/substrate-contract.json", ".prd_plugin/state/substrate-links.json", "tests/test_prd_substrate.py", "docs/"],
      "red_test": "Add tests that fail when events are configured but unavailable, when a receipt lacks the exported source hash, or when an external result attempts direct ID allocation/state mutation.",
      "implementation": "Define bounded event and record projections, link-state schema, deprecation path for undocumented direct reads, and validated canonical promotion actions.",
      "green_test": "Run event/record/authority tests proving consistent snapshots, hash linkage, duplicate-safe links, and rejection of external canonical writes.",
      "complexity": "large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-072",
      "phase_id": "IMP-PHASE-029",
      "summary": "Connect project-llm-wiki and relevant planning/debugging workflows to Knowledge Hub search, freshness, activity, source retrieval, backlinks, and browser-safe cross-repository links with authorization-preserving local fallback.",
      "requirement_ids": ["PRD-REQ-063", "PRD-NFR-033", "PRD-NFR-036"],
      "architecture_ids": ["ARCH-COMP-051", "ARCH-IF-045", "ARCH-DEC-042"],
      "validation_ids": ["IMP-VAL-069"],
      "files": ["scripts/prd_wiki.py", "scripts/prd_workflows.py", "templates/workflows.json", "skills/project-llm-wiki/SKILL.md", "tests/test_prd_wiki.py", "tests/test_workflow_lifecycle.py"],
      "red_test": "Add tests for cross-repository wiki/docs/manual discovery, inaccessible sources, stale indexes, missing backlinks, unavailable runtime, and local-only browsing.",
      "implementation": "Add knowledge query/get/browse actions with provenance and inline-link output; preserve local exact wiki validation and search.",
      "green_test": "Run wiki/workflow tests against fixtures and a focused compatible Knowledge Hub contract, proving authorization, freshness, links, and fallback.",
      "complexity": "large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-073",
      "phase_id": "IMP-PHASE-029",
      "summary": "Add bounded project/user memory recall and promotion operations to session start, decision, planning, reporting, reflection, and closeout workflows with provenance, duplicate control, configurable retention, and local user-notes fallback.",
      "requirement_ids": ["PRD-REQ-064", "PRD-NFR-033", "PRD-NFR-035"],
      "architecture_ids": ["ARCH-COMP-051", "ARCH-IF-045", "ARCH-DEC-042"],
      "validation_ids": ["IMP-VAL-070"],
      "files": ["scripts/prd_workflows.py", "templates/workflows.json", "scripts/prd_config.py", "skills/project-memory/SKILL.md", "tests/test_workflow_lifecycle.py", "tests/test_unified_config.py"],
      "red_test": "Add tests proving applicable workflows currently neither recall nor promote memory and that inaccessible, duplicate, stale, or unproven memories are rejected or downgraded.",
      "implementation": "Register recall/promote actions and config bounds; separate durable facts/preferences from session observations and require source/evidence metadata.",
      "green_test": "Run focused lifecycle/config tests for recall ordering, provenance, retention, deduplication, opt-out, unavailable-runtime fallback, and no secret capture.",
      "complexity": "large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-074",
      "phase_id": "IMP-PHASE-029",
      "summary": "Use code recall, docs recall, and context packs in planning, architecture, debugging, review, verification, and local-integration workflows before broad raw search while preserving exact file/state checks as authoritative.",
      "requirement_ids": ["PRD-REQ-064", "PRD-NFR-035"],
      "architecture_ids": ["ARCH-COMP-051", "ARCH-IF-045"],
      "validation_ids": ["IMP-VAL-070"],
      "files": ["scripts/prd_workflows.py", "templates/workflows.json", "skills/", "tests/test_workflow_lifecycle.py", "tests/test_skill_contracts.py"],
      "red_test": "Add workflow/skill contract tests requiring a configured retrieval stage and explicit exact-local verification before conclusions or canonical mutations.",
      "implementation": "Add bounded retrieval actions and update skills to prefer Substrate retrieval when available, then targeted local reads, then broader search only when needed.",
      "green_test": "Run lifecycle/skill tests proving ordering, source provenance, result bounds, cache/freshness behavior, opt-out, and deterministic local override.",
      "complexity": "large",
      "confidence": "high",
      "risk": "medium",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-075",
      "phase_id": "IMP-PHASE-029",
      "summary": "Integrate Conduit setup/whoami, Tool Hub list/search/probe/call, and skillbook list/resolve/expand/quality into preflight and decision policy so workflows inspect available substrate capabilities instead of assuming or hardcoding them.",
      "requirement_ids": ["PRD-REQ-059", "PRD-REQ-064", "PRD-REQ-068"],
      "architecture_ids": ["ARCH-COMP-048", "ARCH-COMP-051", "ARCH-COMP-055", "ARCH-IF-041", "ARCH-IF-045"],
      "validation_ids": ["IMP-VAL-071"],
      "files": ["scripts/prd_substrate.py", "scripts/prd_workflows.py", "templates/workflows.json", "skills/project-decision-policy/SKILL.md", "AGENTS.md", "templates/repo-skeleton/AGENTS.md", "tests/test_workflow_lifecycle.py", "tests/test_skill_contracts.py"],
      "red_test": "Add tests that fail when instructions hardcode raw search ahead of configured retrieval/discovery or call a capability not reported by the negotiated catalog.",
      "implementation": "Add discovery/skillbook actions and concise method guidance linking detailed rules rather than expanding host context.",
      "green_test": "Run preflight, workflow, skill, and host-template parity tests for discovery, missing capabilities, quality thresholds, and local fallback.",
      "complexity": "medium",
      "confidence": "high",
      "risk": "medium",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-076",
      "phase_id": "IMP-PHASE-030",
      "summary": "Implement the AI-Collab consumer for hash-bound workflow judgment requests, configured router/model/profile execution, strict result validation, exact WFR-step resume, and deterministic refusal/fallback handling.",
      "requirement_ids": ["PRD-REQ-060", "PRD-REQ-061", "PRD-REQ-068", "PRD-NFR-034"],
      "architecture_ids": ["ARCH-COMP-052", "ARCH-IF-046", "ARCH-DEC-039"],
      "validation_ids": ["IMP-VAL-072"],
      "files": ["scripts/prd_workflows.py", "scripts/prd_substrate.py", "templates/workflows.json", "tests/test_prd_workflows.py", "tests/test_workflow_substrate_execution.py"],
      "red_test": "Add end-to-end tests proving current judgment requests strand at needs_judgment and rejecting mismatched run/step/source hashes, invalid schema, fabricated sources, and direct-write payloads.",
      "implementation": "Submit judgment through the bridge, correlate/validate the result, and invoke the existing deterministic resume path without granting model mutation authority.",
      "green_test": "Run workflow execution tests for success, refusal, timeout, model unavailable, invalid output, retry, duplicate result, configured fallback, and exact resume.",
      "complexity": "x-large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-077",
      "phase_id": "IMP-PHASE-030",
      "summary": "Execute delegated nondeterministic reporting through a configurable cheap/fast capable model while deterministic collectors, schemas, source allowlists, redaction, validation, and local deterministic reporting remain PRD-owned.",
      "requirement_ids": ["PRD-REQ-060", "PRD-REQ-062", "PRD-REQ-068", "PRD-NFR-035"],
      "architecture_ids": ["ARCH-COMP-052", "ARCH-IF-046"],
      "validation_ids": ["IMP-VAL-073"],
      "files": ["scripts/prd_reporting.py", "scripts/prd_workflows.py", "scripts/prd_config.py", "templates/config.json", "templates/workflows.json", "tests/test_prd_reporting.py", "tests/test_workflow_substrate_execution.py"],
      "red_test": "Add tests showing delegated reporting currently only emits a package and requiring independent model/profile configuration, strict sources/schema, bounded output, and deterministic fallback.",
      "implementation": "Connect report requests to the bridge and validate returned narrative/analysis separately from deterministic facts and canonical mutations.",
      "green_test": "Run reporting/config/workflow tests for fast-profile routing, opt-out, fallback, secret/source controls, malformed output, telemetry, and no interference with the host chat model.",
      "complexity": "large",
      "confidence": "high",
      "risk": "medium",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-078",
      "phase_id": "IMP-PHASE-030",
      "summary": "Complete impact-based verification execution by combining git changes, structural callers/references, explicit test ownership, Substrate impact neighbours, uncertainty thresholds, test mapping, fingerprints, focused execution, widening, and full-suite fallback.",
      "requirement_ids": ["PRD-REQ-065", "PRD-NFR-034", "PRD-NFR-035"],
      "architecture_ids": ["ARCH-COMP-052", "ARCH-IF-047", "ARCH-DEC-043"],
      "validation_ids": ["IMP-VAL-074"],
      "files": ["scripts/prd_test_scope.py", "scripts/prd_workflows.py", "templates/workflows.json", "templates/config.json", "tests/test_prd_test_scope.py", "tests/test_workflow_substrate_execution.py"],
      "red_test": "Add fixtures for direct tests, callers, predictive neighbours, unmapped core files, stale/missing impact data, changed test infrastructure, no remote, and release verification.",
      "implementation": "Execute impact/structure requests through the bridge, map candidates deterministically, record selection reasons/fingerprints, and widen on uncertainty or configured policy.",
      "green_test": "Run focused test-scope/workflow tests proving safe selection, close-neighbour coverage, deterministic precedence, degraded fallback, no-remote operation, and mandatory release/full-suite escalation.",
      "complexity": "x-large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-079",
      "phase_id": "IMP-PHASE-030",
      "summary": "Add model/tool route policy, profile selection, cache/freshness, token/latency telemetry, bounded retries, circuit breaking, and effective-state feedback for all runtime-backed workflow actions.",
      "requirement_ids": ["PRD-REQ-062", "PRD-REQ-068", "PRD-NFR-035", "PRD-NFR-037"],
      "architecture_ids": ["ARCH-COMP-052", "ARCH-COMP-055", "ARCH-IF-044", "ARCH-IF-046"],
      "validation_ids": ["IMP-VAL-075"],
      "files": ["scripts/prd_substrate.py", "scripts/prd_config.py", "scripts/prd_workflows.py", "templates/config.json", "tests/test_prd_substrate.py", "tests/test_unified_config.py"],
      "red_test": "Add tests for latency profiles, unavailable models/tools, stale cache, retry exhaustion, circuit open/recover, unbounded output, and misleading effective-state reporting.",
      "implementation": "Centralize runtime execution policy and receipts so each workflow action does not invent routing, retries, or telemetry independently.",
      "green_test": "Run config/bridge tests proving exact profile behavior, bounded retries/results, cache rules, circuit state, fallback, and human-readable effective explanations.",
      "complexity": "large",
      "confidence": "medium",
      "risk": "medium",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-080",
      "phase_id": "IMP-PHASE-031",
      "summary": "Bind PRD TRK goals and WFR runs to Substrate goals and execution records with one-way canonical status projection, acceptance links, pause/resume/stop reconciliation, duplicate-safe identities, and doctor-visible divergence.",
      "requirement_ids": ["PRD-REQ-061", "PRD-REQ-066", "PRD-NFR-034"],
      "architecture_ids": ["ARCH-COMP-053", "ARCH-IF-048", "ARCH-DEC-040"],
      "validation_ids": ["IMP-VAL-076"],
      "files": ["scripts/prd_tools.py", "scripts/prd_workflows.py", "scripts/prd_substrate.py", ".prd_plugin/state/substrate-links.json", "tests/test_prd_tracking.py", "tests/test_workflow_substrate_execution.py"],
      "red_test": "Add tests for create/resume/complete, repeated link creation, external-only status changes, conflicting stop/pause, missing runtime goal, and local-only operation.",
      "implementation": "Store identity links and project canonical state outward; consume runtime status only as execution evidence requiring deterministic reconciliation.",
      "green_test": "Run goal/WFR integration tests proving no duplicate goals, no dual authority, explicit divergence, safe reconciliation, and local fallback.",
      "complexity": "x-large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-081",
      "phase_id": "IMP-PHASE-031",
      "summary": "Use Payload Fabric capsules for bounded external work and result settlement, linking source hashes, tracking/evidence identities, idempotency, acceptance, and error receipts without copying canonical state or auto-promoting results.",
      "requirement_ids": ["PRD-REQ-061", "PRD-REQ-066", "PRD-NFR-034"],
      "architecture_ids": ["ARCH-COMP-053", "ARCH-IF-043", "ARCH-IF-048", "ARCH-DEC-040"],
      "validation_ids": ["IMP-VAL-076"],
      "files": ["scripts/prd_substrate.py", "scripts/prd_workflows.py", "scripts/prd_evidence.py", "tests/test_workflow_substrate_execution.py", "tests/test_prd_evidence.py"],
      "red_test": "Add capsule tests for submit/claim/settle, duplicate settlement, stale source, invalid evidence, rejection, timeout, replay, and unavailable bus.",
      "implementation": "Map external work to typed operation envelopes and require existing PRD validation/promotion actions before canonical evidence or tracking changes.",
      "green_test": "Run bus/evidence tests proving once-only settlement, source binding, rejection safety, typed failure, and no direct canonical mutation.",
      "complexity": "large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-082",
      "phase_id": "IMP-PHASE-031",
      "summary": "Add explicit consent-gated agent/team/routing workflow actions that enforce bounded assignments, maximum worker policy, one-level delegation, worktree isolation, PRD tracking branches, worker environment guards, budgets, and serial promotion.",
      "requirement_ids": ["PRD-REQ-067", "PRD-NFR-033"],
      "architecture_ids": ["ARCH-COMP-054", "ARCH-IF-049", "ARCH-DEC-044"],
      "validation_ids": ["IMP-VAL-077"],
      "files": ["scripts/prd_workflows.py", "scripts/prd_tracking_branches.py", "templates/workflows.json", "templates/config.json", ".prd_plugin/method/subagents.md", "tests/test_tracking_branches.py", "tests/test_workflow_substrate_execution.py"],
      "red_test": "Add tests rejecting implicit fan-out, missing consent, nested workers, excess workers, overlapping ownership, canonical worker writes, missing environment guards, and unsafely parallel promotion.",
      "implementation": "Expose optional worker operations only through declared workflow policy and existing tracking-branch/single-writer constraints.",
      "green_test": "Run worker/team/tracking tests proving default-off behavior, consent source, bounded ownership, one-level execution, budget/stop handling, and serial validated promotion.",
      "complexity": "large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-083",
      "phase_id": "IMP-PHASE-031",
      "summary": "Add optional specialist-case, App Server evidence, watch/notice, thread/message/scratchpad, and poll operations for declared research, healing, improvement, visual evidence, monitoring, and decision workflows.",
      "requirement_ids": ["PRD-REQ-067", "PRD-REQ-068", "PRD-NFR-033"],
      "architecture_ids": ["ARCH-COMP-054", "ARCH-COMP-055", "ARCH-IF-049", "ARCH-DEC-044"],
      "validation_ids": ["IMP-VAL-078"],
      "files": ["scripts/prd_substrate.py", "scripts/prd_workflows.py", "templates/workflows.json", "templates/config.json", "tests/test_workflow_substrate_execution.py"],
      "red_test": "Add tests for default-off operations, undeclared purpose, missing consent, inaccessible workspace/app, unbounded evidence, notice/watch cleanup, and poll/thread results attempting canonical writes.",
      "implementation": "Create separate narrow action families with explicit intent, authority, bounds, evidence/result schemas, and no automatic activation.",
      "green_test": "Run optional-capability fixture tests proving scoping, availability checks, bounded artifacts, cleanup, typed settlement, and complete omission under normal/local profiles.",
      "complexity": "x-large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-084",
      "phase_id": "IMP-PHASE-032",
      "summary": "Map all twelve shipped PRD workflows to capability actions, execution intent, authority, latency profile, preflight, fallback, diagnostics, and exclusions; add missing actions without changing deterministic local postconditions.",
      "requirement_ids": ["PRD-REQ-068", "PRD-REQ-069"],
      "architecture_ids": ["ARCH-COMP-047", "ARCH-COMP-050", "ARCH-COMP-055", "ARCH-IF-040", "ARCH-IF-044"],
      "validation_ids": ["IMP-VAL-079"],
      "files": ["templates/workflows.json", "scripts/prd_workflows.py", "templates/substrate-capabilities.json", "tests/test_workflow_lifecycle.py", "tests/test_workflow_substrate_parity.py"],
      "red_test": "Add matrix tests requiring each workflow to declare relevant capability actions or explicit exclusion, authority, profile, fallback, diagnostic inputs, and unchanged postconditions.",
      "implementation": "Update session.start/stop, request.intake, planning.requirements, engineering.debug, code-review, verify, evidence.record, closeout, maintenance, install.update-check, and hub.release definitions.",
      "green_test": "Run catalog/lifecycle/parity tests across local, balanced, knowledge-first, verification-focused, and fully connected profiles with zero workflow mapping gaps.",
      "complexity": "x-large",
      "confidence": "medium",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-085",
      "phase_id": "IMP-PHASE-032",
      "summary": "Extend unified configuration and prd_config.py CRUD with per-capability controls and named use-case profiles; migrate additively; explain effective settings, latency/cost tradeoffs, runtime availability, and fallback without overwriting user choices.",
      "requirement_ids": ["PRD-REQ-062", "PRD-REQ-068", "PRD-REQ-070", "PRD-NFR-035"],
      "architecture_ids": ["ARCH-COMP-055", "ARCH-COMP-056", "ARCH-IF-044", "ARCH-DEC-041"],
      "validation_ids": ["IMP-VAL-079"],
      "files": ["scripts/prd_config.py", "templates/config.json", "templates/repo-skeleton/.prd_plugin/templates/config.json", "scripts/prd_install.py", "tests/test_unified_config.py", "tests/test_prd_install.py"],
      "red_test": "Add inventory/migration tests for missing controls, invalid combinations, unknown/stale settings, partial old configs, protected user values, profile overlays, and unavailable-runtime explanations.",
      "implementation": "Add cataloged controls plus local/minimal/balanced/knowledge/verification/full profiles as non-destructive overlays and expose CRUD/effective/audit operations.",
      "green_test": "Run config/install tests proving complete inventory, toggle/CRUD behavior, additive migration, protected choices, profile determinism, effective-state explanations, and template parity.",
      "complexity": "x-large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-086",
      "phase_id": "IMP-PHASE-032",
      "summary": "Synchronize CLI/MCP/UTCP, hooks, commands, skills, AGENTS.md, CLAUDE.md, subagent rules, method docs, wiki, ingest manual, README, examples, templates, installer scope, package/version metadata, and downstream audits with the real bridge and capability profiles.",
      "requirement_ids": ["PRD-REQ-070", "PRD-NFR-036", "PRD-NFR-037"],
      "architecture_ids": ["ARCH-COMP-056", "ARCH-IF-040", "ARCH-IF-041", "ARCH-IF-042"],
      "validation_ids": ["IMP-VAL-079"],
      "files": ["AGENTS.md", "CLAUDE.md", "README.md", "commands/", "docs/", "raw/", "wiki/", "skills/", "templates/", "mcp/server.cjs", "utcp.json", "package.json", ".codex-plugin/plugin.json"],
      "red_test": "Add parity/lint tests detecting nonexistent commands, stale versions/contracts, missing inline wiki links, missing host mirrors, instructions that bypass Substrate retrieval, and advertised capabilities without execution or explicit discovery-only classification.",
      "implementation": "Update generated and source guidance together, link detailed rules instead of bloating host context, and ensure installer/package scope includes every managed file.",
      "green_test": "Run skill/tool/functionality, docs/wiki/manual, host instruction, command, UTCP/MCP, installer, version, and package parity checks with zero gaps.",
      "complexity": "x-large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-087",
      "phase_id": "IMP-PHASE-033",
      "summary": "Run contract, security, compatibility, authentication, authorization, idempotency, replay, fallback, latency, cross-version, downstream, traceability, code-review, and CRAFTE/CHML audit-fix-re-audit loops; then complete release-wide verification and publication readiness.",
      "requirement_ids": ["PRD-REQ-058", "PRD-REQ-070", "PRD-REQ-071"],
      "architecture_ids": ["ARCH-COMP-047", "ARCH-COMP-056", "ARCH-DEC-045", "ARCH-RISK-033", "ARCH-RISK-034", "ARCH-RISK-035", "ARCH-RISK-036", "ARCH-RISK-037", "ARCH-RISK-038", "ARCH-RISK-039", "ARCH-RISK-040"],
      "validation_ids": ["IMP-VAL-065", "IMP-VAL-066", "IMP-VAL-067", "IMP-VAL-068", "IMP-VAL-069", "IMP-VAL-070", "IMP-VAL-071", "IMP-VAL-072", "IMP-VAL-073", "IMP-VAL-074", "IMP-VAL-075", "IMP-VAL-076", "IMP-VAL-077", "IMP-VAL-078", "IMP-VAL-079"],
      "files": ["tests/", "scripts/", ".prd_plugin/state/", "docs/", "wiki/", "skills/", "templates/", "package.json"],
      "red_test": "Freeze the complete acceptance matrix and confirm each prior parity finding fails before its implementation track; add cross-version fixtures for supported and unsupported combinations.",
      "implementation": "Review each track against CRAFTE, fix every critical/high/medium/low finding, repeat focused audits, then run the risk-proportionate release suite, package checks, state/traceability gates, and release checklist.",
      "green_test": "Require every focused validation, one release-wide suite, state consistency, PRD gate, config/workflow/capability/skill/tool/wiki/manual/installer/package/version audits, git diff checks, and final CHML audit to report zero findings.",
      "complexity": "x-large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    },
    {
      "id": "IMP-TASK-088",
      "phase_id": "IMP-PHASE-028",
      "summary": "Ship canonical per-repository services.json declarations with schema/semantic validation, duplicate-safe CRUD/audit tooling, additive installation, capability reconciliation, manifest hashing, handshake/workflow consumption, MCP and read-only UTCP surfaces, downstream templates, and documentation.",
      "requirement_ids": ["PRD-REQ-072", "PRD-NFR-033", "PRD-NFR-034", "PRD-NFR-036", "PRD-NFR-037"],
      "architecture_ids": ["ARCH-COMP-047", "ARCH-COMP-048", "ARCH-COMP-050", "ARCH-COMP-056", "ARCH-COMP-057", "ARCH-IF-040", "ARCH-IF-041", "ARCH-IF-044", "ARCH-IF-050", "ARCH-DEC-038", "ARCH-DEC-041", "ARCH-DEC-045", "ARCH-DEC-046", "ARCH-RISK-041"],
      "validation_ids": ["IMP-VAL-080"],
      "files": [".prd_plugin/services.json", "templates/services.json", "templates/repo-skeleton/.prd_plugin/services.json", "scripts/prd_services.py", "scripts/prd_substrate.py", "scripts/prd_workflows.py", "scripts/prd_install.py", "mcp/server.cjs", "utcp.json", "templates/script-install-scope.json", "tests/test_prd_services.py", "tests/test_prd_install.py", "tests/test_substrate_adapter.py", "tests/node/server.test.cjs", "README.md", "docs/", "skills/"],
      "red_test": "Add tests proving the manifest is absent and no validated CRUD/audit/handshake/install contract exists; cover duplicate keys, invalid service/capability/contract names, contradictory required/fallback policy, unknown fields, unsafe replacement, and declared-versus-effective drift.",
      "implementation": "Define a minimal repository-owned schema with keyed consumes/provides arrays, implement atomic guarded CRUD and audit, add additive installer defaults, project a hash-bound view through bridge/workflows/tools, and document service declaration ownership and examples.",
      "green_test": "Run focused service, installer, adapter, workflow, MCP/UTCP, config/parity, docs, and package tests; require safe update preservation and zero manifest findings.",
      "complexity": "large",
      "confidence": "high",
      "risk": "high",
      "status": "planned"
    }
  ],
  "validations": [
    {
      "id": "IMP-VAL-065",
      "summary": "Capability catalog generation and parity audit cover every AI-Collab tool group and PRD workflow with zero unclassified, falsely advertised, unmapped, or untested entries.",
      "applies_to": ["IMP-TASK-068", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-066",
      "summary": "Handshake fixtures and focused compatibility checks prove version/identity/auth/health/index/tool/model negotiation, redaction, and explicit degradation.",
      "applies_to": ["IMP-TASK-069", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-067",
      "summary": "Bridge tests prove allowlisted discover/call/submit/status/result/cancel execution, typed receipts, timeouts, idempotency, asynchronous correlation, CLI/MCP/workflow parity, and local fallback.",
      "applies_to": ["IMP-TASK-070", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-068",
      "summary": "Event, record, snapshot, link, and canonical-authority tests prove consistent source hashes, duplicate safety, direct-read reconciliation, and rejection of external canonical writes.",
      "applies_to": ["IMP-TASK-071", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-069",
      "summary": "Knowledge integration tests prove authorized cross-repository wiki/docs/manual search, freshness, provenance, backlinks, navigable links, and complete local fallback.",
      "applies_to": ["IMP-TASK-072", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-070",
      "summary": "Memory/code/docs/context tests prove bounded provenance-bearing retrieval and promotion, correct workflow ordering, exact-local override, retention/deduplication, opt-out, and secret exclusion.",
      "applies_to": ["IMP-TASK-073", "IMP-TASK-074", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-071",
      "summary": "Discovery and skillbook tests prove workflows inspect negotiated Tool Hub/Conduit capabilities and quality-scoped guidance before assuming tools or falling back to broad raw search.",
      "applies_to": ["IMP-TASK-075", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-072",
      "summary": "Judgment execution tests prove source/hash/schema binding, configured routing, exact deterministic resume, no direct writes, refusal/error/fallback handling, and replay safety.",
      "applies_to": ["IMP-TASK-076", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-073",
      "summary": "Delegated reporting tests prove independent cheap/fast model configuration, deterministic fact separation, source/schema validation, bounded output, telemetry, and local fallback.",
      "applies_to": ["IMP-TASK-077", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-074",
      "summary": "Verification tests prove exact/structural/predictive/ownership precedence, safe test mapping, fingerprints, widening, degraded fallback, no-remote operation, and release full-suite policy.",
      "applies_to": ["IMP-TASK-078", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-075",
      "summary": "Execution-policy tests prove capability/profile selection, bounded latency/results/retries, cache freshness, circuit behavior, tool/model fallback, telemetry, and accurate effective-state explanations.",
      "applies_to": ["IMP-TASK-079", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-076",
      "summary": "Goal, execution, bus, and evidence tests prove one canonical PRD lifecycle, duplicate-safe identity/settlement, source binding, divergence diagnostics, and no direct promotion.",
      "applies_to": ["IMP-TASK-080", "IMP-TASK-081", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-077",
      "summary": "Worker/team tests prove explicit consent, default-off behavior, bounded one-level assignments, worktree/tracking-branch isolation, budgets/guards, and serial validated promotion.",
      "applies_to": ["IMP-TASK-082", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-078",
      "summary": "Specialist/App Server/watch/thread/poll tests prove declared purpose, scoped availability, bounded artifacts/results, cleanup, typed settlement, and no implicit execution or canonical writes.",
      "applies_to": ["IMP-TASK-083", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-079",
      "summary": "Workflow/config/downstream/release audits prove all workflows and controls mapped, additive migration, host/tool/skill/hook/template/docs/wiki/manual/version/package parity, cross-version behavior, full gates, traceability, and final CHML zero.",
      "applies_to": ["IMP-TASK-084", "IMP-TASK-085", "IMP-TASK-086", "IMP-TASK-087"]
    },
    {
      "id": "IMP-VAL-080",
      "summary": "Repository service-manifest tests prove schema/semantic validity, duplicate-safe CRUD, atomic failure, required/optional and contract/fallback rules, additive install/update preservation, capability reconciliation, hash-bound handshake/workflow use, MCP/UTCP parity, downstream delivery, and zero drift findings.",
      "applies_to": ["IMP-TASK-088", "IMP-TASK-087"]
    }
  ],
  "evidence_expectations": [
    {
      "id": "EV-TODO-001",
      "summary": "Focused phase evidence records the failing test, implementation commit, green focused verification, capability/contract receipts, and updated parity result for each independently committed task.",
      "closes": ["IMP-TASK-068", "IMP-TASK-069", "IMP-TASK-070", "IMP-TASK-071", "IMP-TASK-072", "IMP-TASK-073", "IMP-TASK-074", "IMP-TASK-075", "IMP-TASK-076", "IMP-TASK-077", "IMP-TASK-078", "IMP-TASK-079", "IMP-TASK-080", "IMP-TASK-081", "IMP-TASK-082", "IMP-TASK-083", "IMP-TASK-084", "IMP-TASK-085", "IMP-TASK-086"]
    },
    {
      "id": "EV-TODO-002",
      "summary": "Final evidence records the release-wide suite, contract/live compatibility, state/gate/traceability/config/workflow/capability/skill/tool/wiki/manual/installer/package/version checks, and zero-CHML re-audit.",
      "closes": ["IMP-TASK-087"]
    }
  ],
  "dependencies": [
    "The current deterministic workflow engine and canonical state tools remain the only PRD mutation authority.",
    "AI-Collab exposes a stable discoverable Conduit/Tool Hub contract or provides a compatible contract fixture for bridge development.",
    "Knowledge Hub, memory/context, impact, goals, bus, diagnostics, and optional services retain their shipped authorization and identity behavior.",
    "Any required change inside AI-Collab is handled as an explicit cross-repository request or separately authorized implementation, not silently edited from this repository."
  ],
  "risks_and_rollback": [
    "Each capability family has an independent config gate and declared local fallback; disabling integration restores the current local workflow path.",
    "Contract v1 snapshot/graph behavior remains readable during migration while v2 executable operations negotiate support explicitly.",
    "Optional high-authority services remain default-off and can be removed from a profile without disabling core knowledge or verification capabilities.",
    "Canonical state stores only bounded links/receipts; transient external payloads and credentials remain ignored local or Substrate-owned data."
  ],
  "traceability": {
    "requirement_ids": [
      "PRD-REQ-058",
      "PRD-REQ-059",
      "PRD-REQ-060",
      "PRD-REQ-061",
      "PRD-REQ-062",
      "PRD-REQ-063",
      "PRD-REQ-064",
      "PRD-REQ-065",
      "PRD-REQ-066",
      "PRD-REQ-067",
      "PRD-REQ-068",
      "PRD-REQ-069",
      "PRD-REQ-070",
      "PRD-REQ-071",
      "PRD-REQ-072"
    ],
    "architecture_ids": [
      "ARCH-COMP-047",
      "ARCH-COMP-048",
      "ARCH-COMP-049",
      "ARCH-COMP-050",
      "ARCH-COMP-051",
      "ARCH-COMP-052",
      "ARCH-COMP-053",
      "ARCH-COMP-054",
      "ARCH-COMP-055",
      "ARCH-COMP-056",
      "ARCH-COMP-057"
    ],
    "tracking_ids": ["TRK-111"],
    "health_ids": []
  }
}
