{
  "schema_version": "0.1",
  "id": "IMP-008",
  "title": "Unified plugin configuration and latency profiles",
  "status": "complete",
  "source_prd_id": "PRD-007",
  "source_architecture_id": "ARCH-007",
  "source_request_id": "REQ-095",
  "created_at": "2026-07-14",
  "updated_at": "2026-07-14",
  "summary": "Inventory and classify all control planes, build the unified config catalog/tool and profiles, consolidate hooks, fold delivery downstream, then audit and release.",
  "phases": [
    {"id": "IMP-PHASE-020", "name": "Inventory and catalog authority", "order": 1, "tasks": ["IMP-TASK-053"], "exit_criteria": "Every shipped config leaf and non-persistent control plane is classified with zero inventory gaps."},
    {"id": "IMP-PHASE-021", "name": "Unified tool and hook runtime", "order": 2, "tasks": ["IMP-TASK-054", "IMP-TASK-055"], "exit_criteria": "Profiles and generic operations are atomic; each host event uses one correctly gated dispatcher."},
    {"id": "IMP-PHASE-022", "name": "Downstream delivery and release", "order": 3, "tasks": ["IMP-TASK-056", "IMP-TASK-057"], "exit_criteria": "Installer/host/docs parity is green; release verification and CHML audits have zero findings; publication is verified."}
  ],
  "tasks": [
    {"id": "IMP-TASK-053", "phase": "IMP-PHASE-020", "summary": "Write inventory/catalog tests first, then derive catalog entries from shipped defaults with metadata for mutability, managers, latency, dependencies, and control-plane classification.", "files": ["tests/test_unified_config.py", "scripts/prd_config.py", "templates/config.json"], "sources": ["PRD-REQ-043", "PRD-ACC-055", "ARCH-COMP-035", "ARCH-IF-028", "ARCH-IF-031", "ARCH-DEC-026", "ARCH-DEC-027"], "validation": "IMP-VAL-050", "complexity": "medium", "confidence": "high", "risk": "medium", "status": "complete"},
    {"id": "IMP-TASK-054", "phase": "IMP-PHASE-021", "summary": "Write failing CLI/profile tests, then implement describe, audit, effective, enable/disable, built-in profiles, custom profile CRUD, dry-run, and atomic application.", "files": ["tests/test_unified_config.py", "scripts/prd_config.py", ".prd_plugin/config.json", "templates/config.json"], "sources": ["PRD-REQ-044", "PRD-REQ-045", "PRD-NFR-024", "ARCH-COMP-036", "ARCH-IF-029", "ARCH-DEC-028"], "validation": "IMP-VAL-051", "complexity": "large", "confidence": "high", "risk": "medium", "status": "complete"},
    {"id": "IMP-TASK-055", "phase": "IMP-PHASE-021", "summary": "Characterize current hook semantics, write failing dispatcher/wiring tests, then consolidate each host event through the configured dispatcher with master and per-capability controls.", "files": ["tests/test_hook_dispatch.py", "tests/test_cross_host_hook_parity.py", ".prd_plugin/hooks/", ".claude/settings.json", ".codex/hooks.json", ".opencode/plugins/prd-hooks.js"], "sources": ["PRD-REQ-046", "PRD-NFR-025", "ARCH-COMP-037", "ARCH-IF-030", "ARCH-DEC-029", "ARCH-RISK-024"], "validation": "IMP-VAL-052", "complexity": "large", "confidence": "medium", "risk": "high", "status": "complete"},
    {"id": "IMP-TASK-056", "phase": "IMP-PHASE-022", "summary": "Write failing installer/parity tests, then add additive config migration, downstream script scope, host/command mirrors, docs, inventory report, and wiki knowledge.", "files": ["tests/test_prd_install.py", "tests/test_script_install_scope_policy.py", "templates/", "commands/", "README.md", "docs/", "raw/", "wiki/"], "sources": ["PRD-REQ-047", "PRD-ACC-059", "ARCH-COMP-038", "ARCH-RISK-022"], "validation": "IMP-VAL-053", "complexity": "large", "confidence": "high", "risk": "medium", "status": "complete"},
    {"id": "IMP-TASK-057", "phase": "IMP-PHASE-022", "summary": "Review, run focused verification, audit/fix CHML and traceability to zero, run one release-wide suite, version, commit, merge, push, tag, and verify npm publication.", "files": ["tests/", ".prd_plugin/state/", "package.json", "templates/releases.json", "docs/prd-plugin-ingest-manual.html"], "sources": ["PRD-ACC-060", "ARCH-RISK-022", "ARCH-RISK-023", "ARCH-RISK-024"], "validation": "IMP-VAL-054", "complexity": "medium", "confidence": "high", "risk": "medium", "status": "complete"}
  ],
  "validations": [
    {"id": "IMP-VAL-050", "method": "Catalog/inventory tests require every shipped leaf to be classified and every non-config control plane to be explicitly separated.", "evidence": ["EV-082"]},
    {"id": "IMP-VAL-051", "method": "Focused CLI tests prove validation, style preservation, audit, effective state, atomic dry-run/apply, and custom profile CRUD.", "evidence": ["EV-082"]},
    {"id": "IMP-VAL-052", "method": "Hook unit and cross-host parity tests prove one process per event, correct gating/order, and preserved blocking behavior.", "evidence": ["EV-082"]},
    {"id": "IMP-VAL-053", "method": "Installer, script-scope, mirror, command, config parity, and documentation tests prove complete downstream delivery.", "evidence": ["EV-082"]},
    {"id": "IMP-VAL-054", "method": "Selected verification, state consistency, integrated gate, release/gap/package checks, code review, and repeated CHML audits report zero findings before publication.", "evidence": ["EV-082"]}
  ],
  "dependencies": [
    "Existing configuration consumers continue reading .prd_plugin/config.json.",
    "Host hook manifests can invoke the shared downstream dispatcher script.",
    "No external service is required for catalog, profiles, or hook gating."
  ],
  "risks_and_rollback": [
    "The installer adds new keys without replacing existing custom configuration; legacy dedicated commands remain compatibility wrappers.",
    "Hook consolidation can be rolled back by restoring the prior per-script manifest entries while retaining the config catalog/tool.",
    "Built-in profiles never enable external integrations that lack explicit endpoint or capability configuration."
  ],
  "tracking_ids": ["TRK-097", "TRK-098", "TRK-099", "TRK-100"]
}
