{
  "schema_version": "0.1",
  "artifact_type": "prd",
  "canonical": true,
  "artifact_id": "PRD-009",
  "agent_summary": {
    "title": "Substrate capability parity and executable integration",
    "status": "approved",
    "summary": "Bring PRD Plugin's adapter, deterministic workflows, configuration, skills, and downstream delivery into explicit parity with the relevant shipped AI-Collab Substrate capabilities while preserving PRD Plugin as canonical project-state authority and retaining a safe local-only fallback.",
    "last_reviewed_at": "2026-07-15",
    "load_notes": "Canonical JSON; generate Markdown only on explicit human request."
  },
  "goals": [
    "Replace the current export-only adapter boundary with an executable, observable, version-negotiated connection to AI-Collab.",
    "Use shipped Substrate knowledge, memory, context, impact, goals, bus, discovery, diagnostics, and optional specialist capabilities from the workflows that benefit from them.",
    "Keep deterministic PRD Plugin mechanics local and canonical while making every external request hash-bound, idempotent, permission-scoped, and receipt-backed.",
    "Make every capability independently configurable so latency-sensitive use cases can enable only the integrations they need.",
    "Ship the same contract, controls, workflows, skills, templates, documentation, and validation downstream."
  ],
  "non_goals": [
    "Move canonical PRD state ownership into AI-Collab.",
    "Require a Substrate runtime, remote repository, network connection, model provider, App Server, or specialist workspace for normal local PRD operation.",
    "Expose every AI-Collab administrative or domain-specific tool through PRD Plugin.",
    "Run predictive or model-backed services when an exact local deterministic answer is already available.",
    "Allow Substrate results to mutate canonical state without PRD Plugin validation and an authorized deterministic workflow step."
  ],
  "requirements": [
    {
      "id": "PRD-REQ-058",
      "priority": "must",
      "summary": "Maintain a versioned, machine-readable capability parity catalog that classifies every shipped AI-Collab capability as executed, consumed, discovery-only, deliberately excluded, or unavailable, and maps it to PRD workflows, configuration, fallback, and tests.",
      "source_ids": ["REQ-099", "BR-REQ-015", "BR-DEC-011"],
      "acceptance_ids": ["PRD-ACC-073"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-059",
      "priority": "must",
      "summary": "Extend the Substrate handshake to negotiate contract/runtime versions, endpoint, repository and workspace identity, authentication mode, health, index freshness, supported tools, and effective capability policy without exposing secrets.",
      "source_ids": ["BR-REQ-016", "BR-RISK-013", "BR-RISK-014"],
      "acceptance_ids": ["PRD-ACC-074"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-060",
      "priority": "must",
      "summary": "Implement an executable runtime bridge that can discover and call allowlisted AI-Collab tools, accept bounded asynchronous results, report typed failures, and operate through CLI, MCP, and deterministic workflow actions.",
      "source_ids": ["REQ-099", "BR-REQ-017", "BR-DEC-012"],
      "acceptance_ids": ["PRD-ACC-075"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-061",
      "priority": "must",
      "summary": "Preserve PRD Plugin as canonical authority for requests, tracking, decisions, evidence, IDs, configuration, and workflow state; bind external operations to source hashes, idempotency keys, runtime links, validated receipts, and single-writer promotion.",
      "source_ids": ["BR-REQ-018", "BR-DEC-013", "BR-RISK-015"],
      "acceptance_ids": ["PRD-ACC-076"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-062",
      "priority": "must",
      "summary": "Expose per-capability enablement, execution intent, bounds, timeouts, cache and freshness policy, model/profile selection, retry, degradation, and local fallback through the unified JSON configuration and prd_config.py operations.",
      "source_ids": ["BR-REQ-019", "BR-DEC-014", "BR-RISK-016"],
      "acceptance_ids": ["PRD-ACC-077"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-063",
      "priority": "must",
      "summary": "Use the shipped Knowledge Hub for federated LLM-wiki, documentation, ingest-manual, and durable-knowledge search and browsing, with provenance, backlinks, freshness, authorization filtering, and a complete local wiki fallback.",
      "source_ids": ["BR-REQ-020", "BR-DEC-015", "BR-RISK-017"],
      "acceptance_ids": ["PRD-ACC-078"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-064",
      "priority": "must",
      "summary": "Let applicable workflows retrieve user/project memory, code recall, documentation recall, context packs, and skillbook guidance before raw file search, while recording provenance and keeping exact local state checks authoritative.",
      "source_ids": ["BR-REQ-020", "BR-REQ-021", "BR-DEC-015"],
      "acceptance_ids": ["PRD-ACC-079"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-065",
      "priority": "must",
      "summary": "Execute impact-based verification end to end: combine exact changed files, structural relationships, Substrate impact results, explicit ownership, and uncertainty rules into a deterministic focused-test plan that widens or falls back safely.",
      "source_ids": ["BR-REQ-022", "BR-DEC-016", "BR-RISK-018"],
      "acceptance_ids": ["PRD-ACC-080"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-066",
      "priority": "must",
      "summary": "Bind PRD goals, workflow runs, tracking branches, verification, and evidence to Substrate goals, execution records, bus capsules, and settlement receipts without creating competing lifecycle or canonical-state authorities.",
      "source_ids": ["BR-REQ-023", "BR-DEC-013", "BR-RISK-015"],
      "acceptance_ids": ["PRD-ACC-081"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-067",
      "priority": "should",
      "summary": "Support consent- and intent-gated use of Substrate agents, teams, routing, specialist workspaces, App Server evidence operations, watches, notices, threads, and polls only where a declared workflow needs them.",
      "source_ids": ["BR-REQ-024", "BR-DEC-017", "BR-RISK-019"],
      "acceptance_ids": ["PRD-ACC-082"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-068",
      "priority": "must",
      "summary": "Integrate runtime doctor, index status/freshness, notices, model/tool availability, execution telemetry, and profile feedback into session, maintenance, verification, closeout, and configuration-advice workflows.",
      "source_ids": ["BR-REQ-016", "BR-REQ-019", "BR-RISK-020"],
      "acceptance_ids": ["PRD-ACC-083"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-069",
      "priority": "must",
      "summary": "Map every shipped PRD workflow to the relevant Substrate capabilities, execution mode, latency profile, fallback, required authority, and explicit exclusions; do not invoke external capabilities merely because they exist.",
      "source_ids": ["BR-REQ-015", "BR-REQ-019", "BR-DEC-011", "BR-DEC-014"],
      "acceptance_ids": ["PRD-ACC-083"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-070",
      "priority": "must",
      "summary": "Deliver adapter/runtime contracts, config, workflow definitions, hooks, tools, host skills, AGENTS/CLAUDE guidance, templates, installer migrations, wiki/manual/docs, package metadata, and version references downstream with automated parity checks.",
      "source_ids": ["BR-REQ-025", "BR-RISK-020"],
      "acceptance_ids": ["PRD-ACC-084"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-071",
      "priority": "must",
      "summary": "Provide automated contract, authentication, authorization, compatibility, idempotency, replay, timeout, unavailable-runtime, stale-index, malformed-result, latency-profile, installer, and cross-version regression coverage.",
      "source_ids": ["BR-REQ-025", "BR-RISK-013", "BR-RISK-014", "BR-RISK-016", "BR-RISK-018", "BR-RISK-020"],
      "acceptance_ids": ["PRD-ACC-084"],
      "status": "approved"
    },
    {
      "id": "PRD-REQ-072",
      "priority": "must",
      "summary": "Install and maintain a canonical .prd_plugin/services.json in every PRD-enabled repository that declares consumed and provided services/capabilities, required or optional intent, provider/consumer identity, supported contract versions, visibility, bounds, and fallback; expose validated CRUD, audit, handshake, workflow, MCP, and read-only UTCP operations without overwriting user-owned declarations.",
      "source_ids": ["REQ-100", "BR-REQ-026", "BR-DEC-018", "BR-RISK-021"],
      "acceptance_ids": ["PRD-ACC-085"],
      "status": "approved"
    }
  ],
  "non_functional_requirements": [
    {
      "id": "PRD-NFR-033",
      "summary": "Authority and security: canonical writes remain local, every external call is allowlisted and least-privilege, authorization filters are preserved, and secrets never enter snapshots, logs, or model bundles.",
      "source_ids": ["BR-DEC-013", "BR-RISK-014", "BR-RISK-015"]
    },
    {
      "id": "PRD-NFR-034",
      "summary": "Reliability: calls are hash-bound, idempotent, timeout-bounded, replay-safe, receipt-backed, and unable to turn dependency failure into false success.",
      "source_ids": ["BR-DEC-012", "BR-RISK-013", "BR-RISK-018"]
    },
    {
      "id": "PRD-NFR-035",
      "summary": "Efficiency: capability profiles minimize external calls, cache fresh results, prefer deterministic local answers, and expose measured latency/cost signals for configuration decisions.",
      "source_ids": ["BR-REQ-019", "BR-DEC-014", "BR-RISK-016"]
    },
    {
      "id": "PRD-NFR-036",
      "summary": "Portability: all local workflows remain usable without a remote, runtime, network, model, specialist, or App Server; Windows and supported non-Windows hosts share the same contracts.",
      "source_ids": ["BR-DEC-012", "BR-RISK-013"]
    },
    {
      "id": "PRD-NFR-037",
      "summary": "Observability and compatibility: negotiated versions, capability decisions, fallbacks, provenance, receipts, freshness, and failures are inspectable, while supported older runtime/plugin combinations degrade explicitly.",
      "source_ids": ["BR-REQ-016", "BR-RISK-020"]
    }
  ],
  "acceptance_criteria": [
    {
      "id": "PRD-ACC-073",
      "summary": "A generated parity report covers every shipped Substrate tool group and every PRD workflow with no unclassified capability, workflow, config control, fallback, or exclusion.",
      "requirement_ids": ["PRD-REQ-058"]
    },
    {
      "id": "PRD-ACC-074",
      "summary": "Handshake tests prove version negotiation, endpoint/repository/workspace identity, authentication mode, health, index freshness, tool discovery, and secret redaction across compatible and incompatible runtimes.",
      "requirement_ids": ["PRD-REQ-059", "PRD-NFR-033", "PRD-NFR-037"]
    },
    {
      "id": "PRD-ACC-075",
      "summary": "CLI, MCP, and workflow integration tests execute allowlisted synchronous and asynchronous Substrate calls, validate typed results, and return explicit unavailable/timeout/error states with local fallback where declared.",
      "requirement_ids": ["PRD-REQ-060", "PRD-NFR-034", "PRD-NFR-036"]
    },
    {
      "id": "PRD-ACC-076",
      "summary": "Authority tests prove external results cannot allocate canonical IDs or write canonical state directly, while duplicate/replayed calls settle once and preserve source/hash/runtime linkage.",
      "requirement_ids": ["PRD-REQ-061", "PRD-NFR-033", "PRD-NFR-034"]
    },
    {
      "id": "PRD-ACC-077",
      "summary": "Unified configuration inventory and behavior tests cover every capability toggle, profile, timeout, bound, cache/freshness rule, executor/model choice, retry, fallback, and effective-state explanation.",
      "requirement_ids": ["PRD-REQ-062", "PRD-NFR-035"]
    },
    {
      "id": "PRD-ACC-078",
      "summary": "Knowledge tests prove authorized cross-repository wiki/docs/manual search, provenance, backlinks, freshness, browser-safe links, and complete local fallback without leaking inaccessible content.",
      "requirement_ids": ["PRD-REQ-063", "PRD-NFR-033", "PRD-NFR-036"]
    },
    {
      "id": "PRD-ACC-079",
      "summary": "Memory/context tests prove applicable workflows retrieve bounded provenance-bearing memory, code, docs, context, and skillbook results before raw search while exact local checks still override predictive context.",
      "requirement_ids": ["PRD-REQ-064", "PRD-NFR-035"]
    },
    {
      "id": "PRD-ACC-080",
      "summary": "Verification tests prove exact changes and structural ownership take precedence, relevant nearby tests are selected, uncertainty widens scope, degraded impact data falls back safely, and release verification can require the full suite.",
      "requirement_ids": ["PRD-REQ-065", "PRD-NFR-034", "PRD-NFR-035"]
    },
    {
      "id": "PRD-ACC-081",
      "summary": "Goal/bus integration tests prove one canonical PRD lifecycle, deterministic link/settlement records, resumable execution, duplicate-safe evidence, and no dual-authority status divergence.",
      "requirement_ids": ["PRD-REQ-066", "PRD-NFR-034"]
    },
    {
      "id": "PRD-ACC-082",
      "summary": "Optional agent/team/specialist/App Server/watch/thread operations remain off unless declared and authorized, enforce bounded ownership and tracking-branch rules, and cannot silently broaden consent.",
      "requirement_ids": ["PRD-REQ-067", "PRD-NFR-033"]
    },
    {
      "id": "PRD-ACC-083",
      "summary": "All shipped workflows have tested capability/fallback mappings and runtime diagnostics, freshness, notices, tool/model availability, and telemetry influence execution only through configured policy.",
      "requirement_ids": ["PRD-REQ-068", "PRD-REQ-069", "PRD-NFR-035", "PRD-NFR-037"]
    },
    {
      "id": "PRD-ACC-084",
      "summary": "Installer, downstream parity, cross-version, authentication, replay, degradation, latency-profile, host-skill, wiki/manual, package, focused-test, full-gate, traceability, and CHML audits all pass with zero findings before release.",
      "requirement_ids": ["PRD-REQ-070", "PRD-REQ-071"]
    },
    {
      "id": "PRD-ACC-085",
      "summary": "Fresh install creates a valid services manifest; safe update preserves repository-owned entries; CRUD and audits reject duplicates, invalid contracts/capabilities, contradictory required/fallback policy, and unknown fields; handshake and workflows use the effective declaration; downstream template, MCP, UTCP, docs, package, and drift checks remain in parity.",
      "requirement_ids": ["PRD-REQ-072", "PRD-NFR-033", "PRD-NFR-034", "PRD-NFR-036", "PRD-NFR-037"]
    }
  ],
  "dependencies": [
    "AI-Collab's shipped Conduit/Tool Hub, Knowledge Hub, memory/context, causal impact, goals, bus, diagnostics, and optional App Server/specialist APIs remain versioned and discoverable.",
    "PRD Plugin's deterministic workflow engine, unified configuration, canonical MCP state tools, tracking branches, verification planner, installer, gate, and host mirrors remain the local authorities.",
    "The integration contract is developed and tested against read-only AI-Collab source and fixtures; implementation in another repository still requires explicit owner authorization."
  ],
  "open_questions": [],
  "traceability": {
    "source_ids": [
      "REQ-099",
      "BR-REQ-015",
      "BR-REQ-016",
      "BR-REQ-017",
      "BR-REQ-018",
      "BR-REQ-019",
      "BR-REQ-020",
      "BR-REQ-021",
      "BR-REQ-022",
      "BR-REQ-023",
      "BR-REQ-024",
      "BR-REQ-025"
      ,"BR-REQ-026"
    ],
    "request_ids": ["REQ-099"],
    "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"
    ],
    "implementation_task_ids": [
      "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",
      "IMP-TASK-087",
      "IMP-TASK-088"
    ],
    "tracking_ids": ["TRK-111"],
    "health_ids": []
  }
}
