{
  "schema_version": "0.1",
  "artifact_type": "prd",
  "canonical": true,
  "artifact_id": "PRD-005",
  "agent_summary": {
    "title": "Config-toggleable PRD Plugin Substrate adapter",
    "status": "implemented",
    "summary": "PRD Plugin publishes stable configuration and data contracts that AI-Collab projects into its Substrate for live observation, coordination, and delegated execution without moving canonical project truth out of the repository.",
    "last_reviewed_at": "2026-07-14",
    "load_notes": "This JSON artifact is canonical. Generate Markdown only on explicit human request."
  },
  "goals": [
    "Replace fragmented and duplicated PRD integration code with one versioned adapter contract.",
    "Make PRD state, traceability, drift, gates, and configured delegated work available to AI-Collab workspaces.",
    "Allow operators to disable the integration completely or select observation versus coordination behavior through ordinary PRD configuration."
  ],
  "non_goals": [
    "Move canonical PRD Plugin state, ID allocation, or validation into the Substrate.",
    "Introduce a new network daemon, provider SDK, authentication store, or competing tool protocol in PRD Plugin.",
    "Expose secrets, raw local sessions, private reasoning, or reflection answers to the Substrate.",
    "Make AI-Collab availability a prerequisite for normal PRD Plugin operation."
  ],
  "requirements": [
    {"id": "PRD-REQ-030", "priority": "must", "summary": "Provide an integrations.substrate configuration with a disabled-by-default master switch, off/observe/coordinate modes, and an explicit capability allowlist, editable directly and through prd_config.py.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-037", "PRD-ACC-038"], "status": "approved"},
    {"id": "PRD-REQ-031", "priority": "must", "summary": "Publish a versioned capability handshake that reports the installed plugin, adapter contract, effective mode, allowed capabilities, and official UTCP/MCP/graph/reporting surfaces.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-039"], "status": "approved"},
    {"id": "PRD-REQ-032", "priority": "must", "summary": "Project a complete repo-scoped snapshot of coordination-relevant PRD records and reconcile updates and removals idempotently without making the projection authoritative.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-040", "PRD-ACC-041"], "status": "approved"},
    {"id": "PRD-REQ-033", "priority": "must", "summary": "Project the PRD traceability graph into the Substrate with repo-qualified node identities and source relation labels.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-042"], "status": "approved"},
    {"id": "PRD-REQ-034", "priority": "must", "summary": "Translate projected record changes into bounded, replay-safe Substrate change notifications suitable for subscriptions and watches.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-043"], "status": "approved"},
    {"id": "PRD-REQ-035", "priority": "must", "summary": "Route every permitted write through the existing validated PRD MCP state tools, with coordination disabled unless coordinate mode and the relevant capability are both enabled.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-044"], "status": "approved"},
    {"id": "PRD-REQ-036", "priority": "must", "summary": "Let AI-Collab execute eligible delegated-reporting bundles using the configured profile and return results that PRD Plugin validates against the original source set.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-045"], "status": "approved"},
    {"id": "PRD-REQ-037", "priority": "must", "summary": "Correlate Substrate work identities with PRD tracking and implementation IDs, and use PRD tracking branches for parallel workers with serialized canonical promotion.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-046"], "status": "approved"},
    {"id": "PRD-REQ-038", "priority": "must", "summary": "Ship the config contract, adapter discovery assets, downstream templates, host workflow guidance, diagnostics, and compatibility tests as one versioned plugin capability.", "source_ids": ["REQ-091"], "acceptance_ids": ["PRD-ACC-047", "PRD-ACC-048"], "status": "approved"}
  ],
  "non_functional_requirements": [
    {"id": "PRD-NFR-016", "summary": "PRD Plugin remains the sole authority for canonical records, IDs, validation, evidence, and completion state.", "source_ids": ["REQ-091"]},
    {"id": "PRD-NFR-017", "summary": "All adapter operations are repo-scoped, idempotent, versioned, bounded, and safe to retry after interruption.", "source_ids": ["REQ-091"]},
    {"id": "PRD-NFR-018", "summary": "The disabled path performs no projection, event, delegation, or mutation work and preserves subordinate settings for later re-enablement.", "source_ids": ["REQ-091"]},
    {"id": "PRD-NFR-019", "summary": "Committed configuration contains policy only; endpoints, workspace bindings, credentials, and machine-specific runtime identity remain AI-Collab-local.", "source_ids": ["REQ-091"]},
    {"id": "PRD-NFR-020", "summary": "Bundles and projections exclude .prd_plugin/local, secret-pattern files, raw transcripts, and reflection answers, and mutations retain existing consent and access controls.", "source_ids": ["REQ-091"]}
  ],
  "acceptance_criteria": [
    {"id": "PRD-ACC-037", "summary": "Direct JSON and prd_config.py can enable, disable, inspect, and select the Substrate adapter mode with strict validation.", "requirement_ids": ["PRD-REQ-030"]},
    {"id": "PRD-ACC-038", "summary": "The master switch overrides every subordinate option; disabled means no adapter side effects.", "requirement_ids": ["PRD-REQ-030", "PRD-NFR-018"]},
    {"id": "PRD-ACC-039", "summary": "A deterministic JSON handshake reports contract versions and effective capabilities without contacting the Substrate.", "requirement_ids": ["PRD-REQ-031"]},
    {"id": "PRD-ACC-040", "summary": "Snapshots include requests, tracking, health, changes, evidence, decisions, validations, and tracking branches with repo-qualified identities.", "requirement_ids": ["PRD-REQ-032"]},
    {"id": "PRD-ACC-041", "summary": "Two reconciliations of unchanged state are silent, while changed and removed records produce exactly one corresponding projection change.", "requirement_ids": ["PRD-REQ-032", "PRD-REQ-034"]},
    {"id": "PRD-ACC-042", "summary": "Graph export preserves cause/effect/label and prevents same-numbered IDs in different repositories from colliding.", "requirement_ids": ["PRD-REQ-033"]},
    {"id": "PRD-ACC-043", "summary": "Subscriptions receive bounded create/update/delete notifications with stable repo and record references and no inline secret or local-session content.", "requirement_ids": ["PRD-REQ-034"]},
    {"id": "PRD-ACC-044", "summary": "Observe mode rejects mutations; coordinate mode invokes only allowlisted MCP tools and never edits canonical JSON directly.", "requirement_ids": ["PRD-REQ-035"]},
    {"id": "PRD-ACC-045", "summary": "Delegated reporting uses the configured AI-Collab profile, validates source references, and applies the configured fallback when execution is unavailable or invalid.", "requirement_ids": ["PRD-REQ-036"]},
    {"id": "PRD-ACC-046", "summary": "Parallel dispatched workers receive one assigned DBR tracking branch and cannot write canonical state; promotion remains serialized.", "requirement_ids": ["PRD-REQ-037"]},
    {"id": "PRD-ACC-047", "summary": "Installer, template, package, documentation, config registry, and parity checks prove the capability reaches supported downstream hosts.", "requirement_ids": ["PRD-REQ-038"]},
    {"id": "PRD-ACC-048", "summary": "Focused and full tests plus repeated CHML audits finish with zero critical, high, medium, or low findings.", "requirement_ids": ["PRD-REQ-030", "PRD-REQ-031", "PRD-REQ-032", "PRD-REQ-033", "PRD-REQ-034", "PRD-REQ-035", "PRD-REQ-036", "PRD-REQ-037", "PRD-REQ-038"]}
  ],
  "dependencies": [
    "AI-Collab provides the Substrate client, workspace/repo access model, live subscriptions, model profiles, and process runtime.",
    "PRD Plugin's existing UTCP manual, MCP state server, graph exporter, reporting validator, and tracking-branch tools remain stable integration surfaces."
  ],
  "open_questions": [],
  "traceability": {
    "source_ids": ["REQ-091"],
    "request_ids": ["REQ-091"],
    "architecture_ids": ["ARCH-COMP-024", "ARCH-COMP-025", "ARCH-COMP-026", "ARCH-COMP-027", "ARCH-COMP-028", "ARCH-COMP-029", "ARCH-COMP-030", "ARCH-COMP-031"],
    "implementation_task_ids": ["IMP-TASK-042", "IMP-TASK-043", "IMP-TASK-044", "IMP-TASK-045", "IMP-TASK-046", "IMP-TASK-047", "IMP-TASK-048", "IMP-TASK-049"],
    "tracking_ids": ["TRK-091"],
    "health_ids": []
  }
}
