Add portable topics and surveys, decision approval history, execution plans, local Codex and Claude adapters, and general agent routing. Consolidate Plan and EPIC results through deterministic completion receipts, reviewed cancellation scope and recoverable reconciliation. Track the completed WRK-0001 and WRK-0002 records, protocol documentation, source manifests and delivery evidence. Validation: 117 tests including Modulith; GraalVM 25 native compilation, standalone smoke and ZIP/TAR verification on macOS ARM64; identical persisted context across JVM and native executions.
50 lines
3.2 KiB
Markdown
50 lines
3.2 KiB
Markdown
# Deterministic Plan consolidation
|
|
|
|
WRK-0002/DEC-0001 defines Step → Plan → Work consolidation. A completed last
|
|
required step completes its Plan; each completed Plan rechecks all Plans owned by
|
|
the Work. Completion checks never invoke an agent. Acceptance criteria remain in
|
|
the Plans/steps, with their existing results, evidence and decision approvals.
|
|
|
|
The required set must contain a real completed delivery. Empty Works/Plans remain
|
|
open. OPEN/ACTIVE steps or Plans, unresolved questions/surveys, empty surveys and
|
|
draft decisions remain pending. Explicit BLOCKED/CANCELLED states require explicit
|
|
resumption. Cancelling an item does not deliver it: `plan exclude WRK PLN [--step
|
|
TSK] --by NAME --reason TEXT` records a scope review of a cancelled item, retains
|
|
it and its history, and excludes only the reviewed content from the required set.
|
|
Changing that content invalidates its exclusion. Dependencies still require actual
|
|
completion; an exclusion does not satisfy a dependency.
|
|
|
|
`work reconcile WRK [--requester NAME] [--request-id KEY]` recovers missed
|
|
coordination. Mutation commands call the same coordination API. `work check`,
|
|
status, next-actions and context are read-only. Context/JSON and mutation reports
|
|
expose consolidation state and pending Plans, plus the existing EPIC report.
|
|
|
|
Planning owns optional versioned `exclusions[]` on a Plan, with target, content
|
|
hash, actor, reason and timestamp. Verification owns coordination and receipts;
|
|
Planning never imports Verification. A new SYSTEM_PLANS Work completion has
|
|
humanApproved=false, by=system:plans and optional `aggregation` provenance naming
|
|
an owned ART receipt, input digest, requester and request ID. The receipt identifies
|
|
the exact Plan revisions/hashes, including reviewed cancellations. Work prose
|
|
criteria may be automatically linked to this aggregate receipt for compatibility;
|
|
this records execution aggregation, not semantic proof of prose or a new human
|
|
approval. No manual Work-level criterion mapping is required.
|
|
|
|
Receipts use origin `ai-engineering:plans:<receipt-sha256>`. Their input hash omits
|
|
framework receipts so a published receipt can be reused after interruption. Final
|
|
completion freezes the full scope including the receipt. Recovery validates
|
|
integrity/history, consolidates Plans, publishes/reuses a receipt, records completion
|
|
and invokes existing EPIC reconciliation. Publication is atomic per file; malformed
|
|
or orphan records require explicit repair rather than silent deletion.
|
|
|
|
Existing completed Works and legacy serialized hashes remain unchanged. New
|
|
optional fields are omitted when absent. Manual completion remains available for
|
|
inspection-only Works without Plans. Adding a Plan to a completed Work requires
|
|
explicit reopening; unchanged old Plans do not immediately reclose a reopened Work.
|
|
Existing EPIC policy/authorization continues to govern EPIC completion.
|
|
|
|
Acceptance tests use disposable fixtures and a configured adapter that fails if
|
|
called. Required cases cover multiple Plans, last-step completion, explicit Plan
|
|
completion, cancellations/scope revisions, unresolved discussion/surveys/DECs,
|
|
empty sets, reopening, interrupted publication/replay, legacy data, corruption,
|
|
EPIC propagation and independent-process/native continuity.
|