Apply all remaining P2-level repairs identified by the four-model
cross-review (DeepSeek, MIMO 2.5 Pro, GPT-5.5 Pro, Opus 4.8) and
verify by regression:
- P2-01 Architecture Designer gate sequence: add a dedicated §19.4
sequence diagram covering trigger → impact assessment → result
class (silent_continue/requires_user_confirmation/requires_replan/
reject_or_escalate) → doc update via ToolRegistry → Scheduler
consumption. Renumber Debug knowledge capture to §19.5.
- P2-02 CLI catalog command class ownership: replace the prose
inventory with an explicit class-to-subcommand table covering
RunCommand, InitCommand, DoctorCommand, ProviderCommand,
E2ECommand, ReleaseCommand, ResumeCommand, CompactCommand,
HistoryCommand, SessionListCommand, RestoreCommand.
- P2-03 agent.started projection wording: clarify the two-step
domain update (starting upon spawn intent, running on handshake
ack within the same event commit) and what carries the final
state row at commit time.
- P2-04 WorkspaceManager vs. Scheduler responsibility split: add a
policy/mechanism responsibility matrix to §7.5 making Scheduler
the sole policy owner (strategy choice, conflict resolution) and
WorkspaceManager the sole mechanism owner (materialize, merge,
cleanup, lifecycle events).
- P2-05 EventStore.project boundary wording: split §5.4 into Table A
(pure projection inside events_session.db transaction) and Table B
(projection intent + post-commit outbox/compensation by owning
service), removing the “write external DB via owner” phrasing from
the in-transaction projection table.
- P2-06 memory.promoted two-phase semantics: rewrite §18.4 to
document the intent vs. committed phases with payload markers,
retry behaviour, and parity with debug.record.created.
- P2-07 docs task type closure: add a TaskType → WorkerRole mapping
table in §8.3 and a design decision recording that `docs` is a
formal TaskType handled by ExecutorRole with docs-scoped
TaskScope.write_area; events and verification follow the execute
pipeline with type='docs' as the domain-level differentiator.
- P2-08 AgentType vs. runtime roles: add a top-level table in §2
pinning AgentType to worker child-process roles only and naming
the runtime-resident roles (main, architecture_designer,
scheduler) plus their prompt sources and LLM-use flags.
- P2-09 contracts package file set: replace the IMPL note in §3 with
a frozen file-set decision plus an overview §4 symbol-group →
code-view §3 file mapping; new files require an ADR.
Regression confirms: §19 sequence count is now 5; §17 CLI table
covers every catalog command; §5.4 splits projection vs. outbox;
§18.4 documents memory.promoted phase semantics; §8.3 lists docs
under ExecutorRole; §2 names runtime roles; §3 freezes the contracts
file set.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Apply repairs identified by the four-model cross-review (DeepSeek,
MIMO 2.5 Pro, GPT-5.5 Pro, Opus 4.8) and verify by regression:
- P1-01 Worker exit codes: align overview §11 and detailed-design §8.1
with baselineV1 §8 (0 protocol-level completion / 1 uncaught exception
/ 2 startup or protocol error / 3 permission error / 4 parent cancelled
/ 5 hard timeout killed). Record that task outcomes are reported via
WorkerResult.status, not exit codes.
- P1-02 PromptLayerLevel enum: add "safety" to interface-contracts §16
so the enum fully covers prompt-layering-v1 §2 L0-L9 (plus
system_debug applied within L9).
- P1-03 EventStore.project error handling: document in detailed-design
§5.3 that a project() exception rolls back the full transaction,
suppresses EventBus.publish(), returns AirError{kind:"system_error"},
and triggers referential_check() on FK-off inconsistencies.
- P1-04 PromptLayerLoader completeness: record in detailed-design §10.2
that PromptLayerLoader only owns L0/L1/L3/L5 while ContextAssembler
composes L2/L4/L6/L7/L8/L9 from PermissionEngine, TaskSpec,
SessionStore, and ToolRegistry sources; clarify runtime-role prompts.
Regression confirms baselineV1, overview, and detailed-design now share
identical exit code semantics, the PromptLayerLevel enum covers all ten
layers, EventStore error semantics are explicit, and the PromptLayer
loading responsibility split is fully documented.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>