{
  "schema_version": "0.1",
  "artifact_type": "prd",
  "canonical": true,
  "artifact_id": "PRD-007",
  "agent_summary": {
    "title": "Unified plugin configuration and latency profiles",
    "status": "approved",
    "summary": "PRD Plugin exposes one complete, validated configuration surface for persistent settings, profiles, effective runtime state, host hooks, environment overrides, and install-time controls so operators can choose the smallest sufficient feature set per use case.",
    "last_reviewed_at": "2026-07-14",
    "load_notes": "Canonical JSON; generate Markdown only on explicit human request."
  },
  "goals": [
    "Make every shipped persistent setting discoverable and classify whether it is operator-mutable, system-managed, or managed by a specialized CRUD tool.",
    "Provide one configuration CLI for inspection, validation, toggling, profiles, and effective-state explanations.",
    "Reduce hook latency by allowing per-event/per-capability control and consolidating each host event into at most one Python dispatcher process.",
    "Preserve safe defaults, downstream compatibility, formatting, and host-specific delivery behavior."
  ],
  "non_goals": [
    "Turn one-shot command arguments into persistent project policy when they are invocation inputs.",
    "Expose system-owned version markers, schema identifiers, or ID allocation internals as ordinary mutable settings.",
    "Enable external services or authority-bearing integrations merely because a comprehensive local profile is selected.",
    "Create a second runtime configuration file or duplicate the AI-Collab execution plane."
  ],
  "requirements": [
    {"id": "PRD-REQ-043", "priority": "must", "summary": "Build a complete catalog from the shipped config defaults so every leaf is discoverable with type, default, current value, category, mutability, manager, latency impact, dependencies, and activation scope.", "source_ids": ["REQ-095"], "acceptance_ids": ["PRD-ACC-055"], "status": "approved"},
    {"id": "PRD-REQ-044", "priority": "must", "summary": "Extend prd_config.py into the unified tool for list, get, describe, set, enable, disable, audit, and effective-state operations while preserving validated writes.", "source_ids": ["REQ-095"], "acceptance_ids": ["PRD-ACC-056"], "status": "approved"},
    {"id": "PRD-REQ-045", "priority": "must", "summary": "Provide atomic, dry-runnable built-in and custom profiles for common use cases, with manual edits marking the effective profile custom rather than silently claiming a preset still applies.", "source_ids": ["REQ-095"], "acceptance_ids": ["PRD-ACC-057"], "status": "approved"},
    {"id": "PRD-REQ-046", "priority": "must", "summary": "Add master and per-capability hook controls and consolidate host hook execution so disabled work is not performed and each event starts at most one Python dispatcher.", "source_ids": ["REQ-095"], "acceptance_ids": ["PRD-ACC-058"], "status": "approved"},
    {"id": "PRD-REQ-047", "priority": "must", "summary": "Ship the unified authority, profiles, hook wiring, inventory, commands, installer migration, templates, docs, and host mirrors consistently downstream without overwriting user-owned configuration.", "source_ids": ["REQ-095"], "acceptance_ids": ["PRD-ACC-059", "PRD-ACC-060"], "status": "approved"}
  ],
  "non_functional_requirements": [
    {"id": "PRD-NFR-024", "summary": "All multi-setting writes are validated before an atomic save, preserve BOM/newline/indent style, and fail without partial mutation.", "source_ids": ["REQ-095"]},
    {"id": "PRD-NFR-025", "summary": "Latency controls are explicit and measurable: prompt-time network work is opt-in by profile, disabled capabilities do no expensive work, and Stop uses one dispatcher process rather than a process per capability.", "source_ids": ["REQ-095"]},
    {"id": "PRD-NFR-026", "summary": "The feature is backward-compatible, stdlib-only, local-first, safe without a remote, and retains .prd_plugin/config.json as the sole persistent runtime authority.", "source_ids": ["REQ-095"]}
  ],
  "acceptance_criteria": [
    {"id": "PRD-ACC-055", "summary": "The inventory reports all shipped config leaves with zero unclassified keys and separately reports environment, install-time, specialized CRUD, host wiring, and invocation-only control planes.", "requirement_ids": ["PRD-REQ-043"]},
    {"id": "PRD-ACC-056", "summary": "Unified CLI tests prove safe discovery, filtering, description, reads, validated writes, boolean enable/disable, effective dependency reporting, and a zero-finding config audit.", "requirement_ids": ["PRD-REQ-044", "PRD-NFR-024"]},
    {"id": "PRD-ACC-057", "summary": "Profile list/show/diff/apply/save/delete behavior is deterministic and atomic; dry-run does not write; unsafe/read-only keys cannot enter a profile.", "requirement_ids": ["PRD-REQ-045", "PRD-NFR-024"]},
    {"id": "PRD-ACC-058", "summary": "Cross-host tests prove one dispatcher command per event, correct per-capability gating, prompt nudge control, and one Stop process while preserving blocking semantics for stop guard and precommit gate.", "requirement_ids": ["PRD-REQ-046", "PRD-NFR-025"]},
    {"id": "PRD-ACC-059", "summary": "All config templates, host manifests, commands, install-scope policy, and additive installer migration carry equivalent defaults without clobbering custom values.", "requirement_ids": ["PRD-REQ-047"]},
    {"id": "PRD-ACC-060", "summary": "Focused tests, downstream install checks, release checks, state validation, package validation, and CHML audits are green before publication.", "requirement_ids": ["PRD-REQ-043", "PRD-REQ-044", "PRD-REQ-045", "PRD-REQ-046", "PRD-REQ-047"]}
  ],
  "dependencies": [
    "Existing .prd_plugin/config.json consumers and prd_config.py formatting-preserving writes.",
    "Existing shared Python hook implementations and host-specific hook manifests/plugins.",
    "Installer additive config migration and script/skill install-scope manifests."
  ],
  "open_questions": [],
  "traceability": {
    "source_ids": ["REQ-095"],
    "request_ids": ["REQ-095"],
    "architecture_ids": ["ARCH-COMP-035", "ARCH-COMP-036", "ARCH-COMP-037", "ARCH-COMP-038"],
    "implementation_task_ids": ["IMP-TASK-053", "IMP-TASK-054", "IMP-TASK-055", "IMP-TASK-056", "IMP-TASK-057"],
    "tracking_ids": ["TRK-097", "TRK-098", "TRK-099", "TRK-100"],
    "health_ids": []
  }
}
