feat(consistency): implement ADR-001 consistency checking engine (CUST-WP-0008)

Adds state-hub/scripts/consistency_check.py with C-01 through C-12 checks:
bidirectional file↔DB validation, --fix for auto-fixable issues, --all for all
repos, --json output, exit codes 0/1/2.

MCP tool: check_repo_consistency(repo_slug, fix=False)
Makefile: check-consistency, fix-consistency, check-consistency-all, fix-consistency-all

Auto-fixes applied across all repos:
- C-09: activity-core-foundation + activity-core-triggers-ops repo_id → activity-core
- C-04: railiance phase-0-operational-baseline status → completed
- C-05: railiance phase-0 title synced from file
- C-10/C-11: task status drifts resolved; state_hub_task_id injected into
  CUST-WP-0006 and CUST-WP-0007 task blocks

Remaining orphans reported for human review: repo-integration-activity-core,
infospace-s3-closeout, testdrive-jsui-publication, staged-promotion-lifecycle,
three-phoenix-ha-cluster, current-env-safety-net.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 08:16:00 +01:00
parent 8ab6e6c9c5
commit 44c19c422f
6 changed files with 1043 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ id: T01
status: done
priority: high
assignee: custodian
state_hub_task_id: "b771f327-128e-4923-a7ad-2080b4e49eb9"
```
**Deliverable:** `wiki/GEMS-StateHub-TypeRegistry.md`
@@ -71,6 +72,7 @@ id: T02
status: done
priority: high
assignee: custodian
state_hub_task_id: "2be639ea-a19e-4c80-bcde-c3da06ec5a49"
```
**Identified inconsistencies:**
@@ -130,6 +132,7 @@ id: T03
status: done
priority: critical
assignee: custodian
state_hub_task_id: "da639706-3b14-42b8-92de-b9de84dbb2be"
```
Six decisions were escalated (see state-hub records):
@@ -151,6 +154,7 @@ id: T04
status: done
priority: high
assignee: custodian
state_hub_task_id: "96dd379a-02b4-4629-8db7-3bef15b9639d"
```
**Deliverable:** `wiki/GEMS-StateHub-SWOT.md`
@@ -178,6 +182,7 @@ status: blocked
priority: high
assignee: custodian
blocking_reason: "Blocked on decisions DEC-GEMS-001 through DEC-GEMS-006"
state_hub_task_id: "032649fb-2d21-44b7-9735-346405168d8e"
```
Once the six decisions are resolved, produce `workplans/CUST-WP-0007-gems-migration.md`