---
Status: Active
Owner Role: Orchestrator
Created: 2026-05-13
Completed:
Depends On:
---

# Runtime Governance Architecture Migration

## Goal

Evolve Blueprint from prompt-governed orchestration into a deterministic AI
engineering runtime.

The target architecture is:

- AI handles reasoning, repair, architecture judgment, and exception analysis.
- Registries, schemas, validators, generators, state machines, and trusted
  runtime services own operational truth and enforcement.
- Required runtime policy does not depend on chat memory, one-off prompt text,
  role-file-only guidance, handwritten help text, or manual QA recall.

## Research Inputs

The migration borrows only patterns that fit Blueprint's local/dev trusted
runtime model:

- Claude Code hooks: lifecycle events can trigger deterministic commands instead
  of relying on an LLM to remember repeated actions.
- OpenHands: typed append-only events make agent/runtime activity replayable,
  attributable, and observable.
- SWE-agent: trajectory artifacts capture action/observation loops and make
  validation runs repeatable.
- Cline/Roo-style plan/act separation: planning and execution should remain
  explicitly separated when risk or uncertainty rises.
- Policy-as-code and generated CLI help patterns: policy and operator surfaces
  should be generated or validated from structured data.

Blueprint intentionally keeps its own architecture: tmux-managed local/dev
runtime, trusted dispatcher/daemon execution, Telegram as compact operator
surface, and no arbitrary shell execution.

## Chunk Plan

### Chunk A: Registries + Schemas Foundation

- Filename: `ai/chunks/active/chunk-000088-governance-registries-schemas-foundation.md`
- Goal: Create the machine-readable registry and schema foundation.
- Scope:
  - `ai/governance/registries/*.yaml`
  - `ai/governance/schemas/*.json`
  - governance README and concise standard references
- Out Of Scope:
  - full validators
  - generated Telegram help migration
  - lifecycle transition enforcement
  - skills
  - bounded autonomy execution
- Depends On: chunks 000085-000087 completed
- Stop Condition: registry/schema design ambiguity or first phase Ready for Human Review

### Chunk B: Governance Validators + Doctor Integration

- Filename: `ai/chunks/backlog/chunk-000089-governance-validators-doctor-integration.md`
- Goal: Implement validators for registries and expose governance checks through doctor.
- Scope:
  - `ai/governance/validators/*.sh`
  - Runtime CLI/API governance flags
  - tests for command registry, approval policy, validation matrix, lifecycle,
    runtime surfaces, and summary schema
- Depends On: Chunk A

### Chunk C: Generated Help + Command Docs

- Filename: `ai/chunks/backlog/chunk-000090-governance-generators-command-docs.md`
- Goal: Generate operator help/docs from the command registry.
- Scope:
  - `ai/governance/generators/generate-telegram-help.sh`
  - `generate-command-docs.sh`
  - Telegram help include or generated fixture
  - docs table generation
- Depends On: Chunks A-B

### Chunk D: Chunk Lifecycle Transition Tooling

- Filename: `ai/chunks/backlog/chunk-000091-chunk-lifecycle-transition-tooling.md`
- Goal: Add lifecycle transition checks and advisory/enforced Ready gates.
- Scope:
  - `ai/chunks/lifecycle-lib.sh`
  - `ai/chunks/validate-transition.sh`
  - `ai/chunks/transition.sh`
  - transition tests and timeline event wiring where practical
- Depends On: Chunks A-B

### Chunk E: Runtime Governance Skills

- Filename: `ai/chunks/backlog/chunk-000092-runtime-governance-skills.md`
- Goal: Add repo-native skills that call validators instead of replacing them.
- Scope:
  - `ai/skills/runtime-governance-review/SKILL.md`
  - `ai/skills/chunk-close-commit/SKILL.md`
  - `ai/skills/drift-root-cause-analysis/SKILL.md`
  - `ai/skills/approval-flow-review/SKILL.md`
  - `ai/skills/operator-surface-review/SKILL.md`
  - `ai/skills/qa-contract-review/SKILL.md`
- Depends On: Chunks A-D as relevant

### Chunk F: Bounded Autonomy Rules + Enforcement

- Filename: `ai/chunks/backlog/chunk-000093-bounded-autonomy-policy-enforcement.md`
- Goal: Make bounded autonomous reiteration rules explicit and validator-aware.
- Scope:
  - runtime SOP bounded autonomy section
  - lifecycle registry updates
  - QA gates
  - validator support for stop/reiterate conditions where practical
- Depends On: Chunks A-D

## Automation Policy

Chunk Autopilot may continue inside each focused phase until a stop condition is
met. It must stop at phase Ready for Human Review, approval boundary, runtime
uncertainty, validator architecture decision, or repeated repair failure.

## Commit Policy

Close/commit is handled only through the deterministic `close_commit` approval
and approved-action dispatcher path.

## Handoff

- Canonical State: work_package_active
- Gate Checked: current active chunks and latest completed chunk inspected
- Result: chunks_planned
- Blockers: None
- Recommended Next Action: implement Chunk A
- Immediate Next Step: continue `chunk-000088-governance-registries-schemas-foundation`
- Human Approval Needed: no for implementation, yes for close/commit
