feat(P5): IHF Phase 5 complete — agent-assisted distillation
Some checks failed
Test / test (push) Has been cancelled

Adds bounded AI support to the IHF governance loop. All AI outputs are
attributed (model_ref), reviewable (AgentReviewRecord), and reversible.
No autonomous decisions; no silent requirement promotion.

- T01: Schema — agent_proposals, agent_review_records,
  confidence_annotations (migration 1743379200)
- T02: AgentProposalsController (index/show/accept/reject, idempotent
  review guard), global nav "Agent" link
- T03: SummarizeClusterAction — Claude API cluster summary on widget show
- T04: DraftRequirementAction — AI requirement draft; acceptance creates
  RequirementCandidate (human-gated)
- T05: DetectDuplicatesAction — duplicate_flag proposal on candidate show
- T06: DetectPolicySensitivityAction — policy_flag with
  ConfidenceAnnotations per concern scope
- T07: ProposeImplementationAction — impl_proposal from decision show
- T08: AgentAuditDashboardAction — autoRefresh; KPI row, unreviewed queue,
  recent proposals, attribution log matrix
- T09: integration tests, SCOPE.md updated, phase5-summary.md, flake.nix
  adds http-conduit/aeson/string-conversions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 15:54:33 +00:00
parent 1862bb295a
commit 2605c1c977
23 changed files with 1284 additions and 21 deletions

View File

@@ -62,7 +62,7 @@ Reference: `docs/ihp-overview.md`, `docs/ihp-data-and-queries.md`,
```task
id: IHUB-WP-0005-T01
status: todo
status: done
priority: high
state_hub_task_id: "6e1a9d31-a7e9-4d71-a726-44eaf739371c"
```
@@ -131,7 +131,7 @@ CREATE INDEX confidence_annotations_proposal_id_idx ON confidence_annotations (p
```task
id: IHUB-WP-0005-T02
status: todo
status: done
priority: high
state_hub_task_id: "5a9b9d51-dcdf-4dad-b449-08a7091e4563"
```
@@ -165,7 +165,7 @@ review record created correctly; idempotent guard works.
```task
id: IHUB-WP-0005-T03
status: todo
status: done
priority: high
state_hub_task_id: "630d8d95-a009-4406-82e2-27f62fabcd3c"
```
@@ -199,7 +199,7 @@ API errors produce a user-visible error message (not a 500).
```task
id: IHUB-WP-0005-T04
status: todo
status: done
priority: high
state_hub_task_id: "4c9d23f7-1744-48c8-90b5-71854d9b7daf"
```
@@ -236,7 +236,7 @@ human acceptance.
```task
id: IHUB-WP-0005-T05
status: todo
status: done
priority: medium
state_hub_task_id: "969b7c7f-c3ba-4892-a1d0-faedf536d1c6"
```
@@ -266,7 +266,7 @@ links on candidate show page; empty duplicates array handled gracefully.
```task
id: IHUB-WP-0005-T06
status: todo
status: done
priority: medium
state_hub_task_id: "475290e0-7842-4336-a57c-04fa62652094"
```
@@ -299,7 +299,7 @@ concern severity rendered correctly; clean result (empty concerns) handled.
```task
id: IHUB-WP-0005-T07
status: todo
status: done
priority: medium
state_hub_task_id: "7ee1274e-fa1b-4ae8-a360-4abafc1773f0"
```
@@ -333,7 +333,7 @@ form; multiple proposal paths rendered clearly.
```task
id: IHUB-WP-0005-T08
status: todo
status: done
priority: high
state_hub_task_id: "53b58abb-cb50-4985-a1c0-b05da17dfc3f"
```