{
  "schema_version": "0.1",
  "artifact_type": "implementation_plan",
  "canonical": true,
  "artifact_id": "IMP-003",
  "agent_summary": {
    "title": "Implement configurable delegated reporting",
    "status": "complete",
    "summary": "Deliver the PRD-side policy and AI-Collab execution contract in three independently verifiable phases with TDD, cross-host parity, and release integration.",
    "last_reviewed_at": "2026-07-12",
    "load_notes": "This JSON artifact is canonical. Generate Markdown only on explicit human request."
  },
  "scope": "Configuration and CLI toggles, deterministic bundle/result contracts, UTCP discovery, reporting instructions, downstream delivery, documentation, tests, and release metadata in prd-plugin.",
  "assumptions": [
    "AI-Collab will read the config and implement the optional executor capability outside this repository.",
    "Existing deterministic readers remain authoritative fact sources.",
    "The current primary-model behavior remains the default fallback."
  ],
  "phases": [
    {"id": "IMP-PHASE-008", "summary": "Policy and contracts", "goal": "Create tested config, bundle, validation, and fallback primitives."},
    {"id": "IMP-PHASE-009", "summary": "Host and downstream integration", "goal": "Expose contracts through UTCP and reporting instructions across every host/template surface."},
    {"id": "IMP-PHASE-010", "summary": "Release and verification", "goal": "Synchronize docs/version/state, review the implementation, and prove all gates green."}
  ],
  "tasks": [
    {
      "id": "IMP-TASK-025",
      "phase_id": "IMP-PHASE-008",
      "summary": "Add failing tests for reporting.delegation defaults, typed CLI fields, string_list coercion, invalid values, and direct-JSON parity; then implement the config registry and templates.",
      "files": ["tests/test_config_toggles.py", "scripts/prd_config.py", ".prd_plugin/config.json", "templates/config.json"],
      "requirement_ids": ["PRD-REQ-016", "PRD-NFR-010"],
      "architecture_ids": ["ARCH-COMP-013", "ARCH-IF-007", "ARCH-DEC-009"],
      "validation_ids": ["IMP-VAL-022"],
      "complexity": "medium",
      "confidence": "high",
      "risk": "low",
      "status": "complete"
    },
    {
      "id": "IMP-TASK-026",
      "phase_id": "IMP-PHASE-008",
      "summary": "Add failing tests and implement stdlib-only prd_reporting.py for effective policy, deterministic bundle generation, delegation decision/fallback, and delegated-result validation.",
      "files": ["tests/test_prd_reporting.py", "scripts/prd_reporting.py"],
      "requirement_ids": ["PRD-REQ-017", "PRD-REQ-018", "PRD-NFR-008", "PRD-NFR-009"],
      "architecture_ids": ["ARCH-COMP-014", "ARCH-COMP-015", "ARCH-IF-008", "ARCH-IF-009", "ARCH-DEC-010", "ARCH-RISK-007"],
      "validation_ids": ["IMP-VAL-023"],
      "complexity": "large",
      "confidence": "high",
      "risk": "medium",
      "status": "complete"
    },
    {
      "id": "IMP-TASK-027",
      "phase_id": "IMP-PHASE-009",
      "summary": "Add reporting bundle/config discovery to prd_tools.py and its generated UTCP manual, with tests and downstream script registration.",
      "files": ["scripts/prd_tools.py", "tests/test_prd_tools.py", "utcp.json", "templates/script-install-scope.json"],
      "requirement_ids": ["PRD-REQ-017", "PRD-REQ-020"],
      "architecture_ids": ["ARCH-COMP-016", "ARCH-IF-008", "ARCH-IF-010"],
      "validation_ids": ["IMP-VAL-024"],
      "complexity": "medium",
      "confidence": "high",
      "risk": "low",
      "status": "complete"
    },
    {
      "id": "IMP-TASK-028",
      "phase_id": "IMP-PHASE-009",
      "summary": "Update /prd-report command and session/reporting skills across canonical and host/skeleton mirrors to use delegation only when policy and capability allow, with exact fallback behavior.",
      "files": ["commands/prd-report.md", "skills/project-session-close/SKILL.md", ".agents/skills/", ".opencode/skill/", ".claude/skills/", "templates/repo-skeleton/"],
      "requirement_ids": ["PRD-REQ-019", "PRD-REQ-020", "PRD-NFR-010"],
      "architecture_ids": ["ARCH-COMP-016", "ARCH-IF-010", "ARCH-RISK-006"],
      "validation_ids": ["IMP-VAL-025"],
      "complexity": "large",
      "confidence": "medium",
      "risk": "medium",
      "status": "complete"
    },
    {
      "id": "IMP-TASK-029",
      "phase_id": "IMP-PHASE-010",
      "summary": "Update README, method/wiki/ingest documentation, config contract docs, and synchronized release/version markers after a clean pre-bump gap audit.",
      "files": ["README.md", "docs/METHOD.md", "wiki/", "docs/prd-plugin-ingest-manual.html", "package.json", "templates/releases.json"],
      "requirement_ids": ["PRD-REQ-020"],
      "architecture_ids": ["ARCH-DEC-008", "ARCH-DEC-009", "ARCH-DEC-010"],
      "validation_ids": ["IMP-VAL-026"],
      "complexity": "large",
      "confidence": "high",
      "risk": "medium",
      "status": "complete"
    },
    {
      "id": "IMP-TASK-030",
      "phase_id": "IMP-PHASE-010",
      "summary": "Run traceability review, self-review, full tests/local workflow/gates/drift audit, record EV/CHG, graduate REQ-084, close tracking, commit, and ship according to autonomous policy.",
      "files": [".prd_plugin/state/", ".prd_plugin/ids/registry.json"],
      "requirement_ids": ["PRD-REQ-016", "PRD-REQ-017", "PRD-REQ-018", "PRD-REQ-019", "PRD-REQ-020"],
      "architecture_ids": ["ARCH-COMP-013", "ARCH-COMP-014", "ARCH-COMP-015", "ARCH-COMP-016"],
      "validation_ids": ["IMP-VAL-027"],
      "complexity": "large",
      "confidence": "high",
      "risk": "medium",
      "status": "complete"
    }
  ],
  "dependencies": [
    {"from": "IMP-TASK-025", "to": "IMP-TASK-026"},
    {"from": "IMP-TASK-026", "to": "IMP-TASK-027"},
    {"from": "IMP-TASK-027", "to": "IMP-TASK-028"},
    {"from": "IMP-TASK-028", "to": "IMP-TASK-029"},
    {"from": "IMP-TASK-029", "to": "IMP-TASK-030"}
  ],
  "validations": [
    {"id": "IMP-VAL-022", "summary": "Config-toggle focused tests prove defaults, CLI/JSON parity, string-list validation, and downstream config parity.", "applies_to": ["IMP-TASK-025"]},
    {"id": "IMP-VAL-023", "summary": "Reporting-contract tests prove deterministic bundles, task policy/fallback, privacy exclusions, and strict source-backed result validation.", "applies_to": ["IMP-TASK-026"]},
    {"id": "IMP-VAL-024", "summary": "UTCP/manual and install-scope tests prove AI-Collab can discover the reporting bundle contract downstream.", "applies_to": ["IMP-TASK-027"]},
    {"id": "IMP-VAL-025", "summary": "Command/skill parity tests prove every host receives identical delegation and fallback instructions.", "applies_to": ["IMP-TASK-028"]},
    {"id": "IMP-VAL-026", "summary": "Gap and release checks prove documentation, version markers, ledgers, and templates are synchronized.", "applies_to": ["IMP-TASK-029"]},
    {"id": "IMP-VAL-027", "summary": "Full unit/local workflow/state/gate/drift suite and code review return clean with fresh EV evidence.", "applies_to": ["IMP-TASK-030"]}
  ],
  "evidence_expectations": [
    {"summary": "Create the next allocated EV-* record with focused and full verification evidence for delegated reporting.", "closes": ["IMP-TASK-025", "IMP-TASK-026", "IMP-TASK-027", "IMP-TASK-028", "IMP-TASK-029", "IMP-TASK-030"]}
  ],
  "risks_and_rollback": [
    "Default-off and fallback-main preserve existing behavior; rollback is removal of the new config block/script/tool and restoration of command text.",
    "AI-Collab runtime support is an external consumer capability and is not claimed as implemented here."
  ],
  "traceability": {
    "requirement_ids": ["PRD-REQ-016", "PRD-REQ-017", "PRD-REQ-018", "PRD-REQ-019", "PRD-REQ-020"],
    "architecture_ids": ["ARCH-COMP-013", "ARCH-COMP-014", "ARCH-COMP-015", "ARCH-COMP-016", "ARCH-IF-007", "ARCH-IF-008", "ARCH-IF-009", "ARCH-IF-010"],
    "tracking_ids": ["TRK-070", "TRK-071", "TRK-072", "TRK-073"],
    "health_ids": []
  }
}
