Files
Nilton Constantino bd2c9133da feat: add agent coordination and automatic work completion
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.
2026-11-14 01:12:21 +00:00

122 lines
6.4 KiB
Plaintext

# PLN-0002 — observed implementation evidence
Date: 2026-11-13. Platform actually built/tested: macOS ARM64 (Darwin 27.2.0).
Toolchain: GraalVM CE 25.5.5.0.3 / JDK 25.0.5.0.3, SDKMAN candidate
25.5.5.0+3-graalce; Gradle Wrapper 9.3.1, Java release target 25 without previews.
## Scope and source identity
Work WRK-0001; Plan PLN-0002; accepted DEC-0003. DSC-0041 records the human request
to implement the next plan, and DSC-0042 records the selected approved EPIC scope.
No real model integration was selected, and no Zelda files were modified.
Git HEAD c84bb8d36f88ef249a249cdfe7b476fd148717af, with uncommitted changes.
This is the baseline commit, not a claim that the new implementation was committed.
ART-0016 contains hashes of 86 source/test/resource/build/documentation files,
including previously untracked files, excluding mutable Work bookkeeping.
Manifest SHA-256: 50bc05294adacddef0cb6e63320892003cc4cd10a4853d7b5f53848699d5a34a.
Implementation boundaries: work/Epic and EpicService own versioned policy/forest
links/authority; verification/EpicCoordinator owns deterministic coordination and
receipt checks; ArtifactService owns small integrity-checked receipts; CLI adapts
input and output. The existing ten Modulith modules remain; no framework/module,
server, database, model API or workflow engine was added.
## Commands and observed outcomes
```sh
./gradlew test --tests '*EpicWorkflowTest' --console=plain
./gradlew test --console=plain
./gradlew clean test bootJar nativeCompile --console=plain
./gradlew nativeDistZip nativeDistTar -PtargetPlatform=macos-arm64 --console=plain
```
Initial test-first result: six tests compiled and failed because EPIC commands did
not exist (ART-0009). Those six then passed (ART-0010). The expanded intermediate
suite passed 85 tests (ART-0011). The final clean build passed 86 tests across 15
suites: zero failures, errors or skipped tests (ART-0012/0013). Modulith verified
ten modules; Spring AOT, bootJar and nativeCompile succeeded.
Native Image reported seven upstream deprecation warnings and build-time SLF4J
no-provider notices, with no compilation failures. No other native platform or CI
execution is claimed.
The executable alone was copied outside the build directory and exercised with:
```sh
JAVA_HOME=/nonexistent GRAALVM_HOME=/nonexistent \
PATH=/usr/bin:/bin:/usr/sbin:/sbin AIE_KEEP_FIXTURE=1 \
bash scripts/native-smoke.sh /temporary/path/ai-engineering
```
The complete smoke passed (ART-0014), including the new EPIC flow and all previous
discussion/hex IDs/single- and multiple-repository/operational-cycle scenarios.
EPIC and plain-folder sections additionally removed Git from PATH. No model or
adjacent GraalVM helper library was required.
ZIP and TAR packaging succeeded. Both archives were extracted, retained executable
permission, contained the exact exercised executable bytes and current documentation.
The ZIP-extracted binary validated the retained EPIC project without JVM; TAR ran
--version with JAVA_HOME/GRAALVM_HOME pointing to /nonexistent and a system-only PATH.
The persisted native EPIC project was also loaded by a fresh JVM/JAR: project
validation returned valid=true with no issues (ART-0015), and complete JSON and
Markdown context outputs matched native output byte-for-byte. Onboarding refreshed
the entry guide/manifest and root AGENTS.md remained byte-identical.
## Verified scenarios
- Important by default, optional subsets, nested EPICs and single-parent/cycle checks.
- Important cancelled children remain pending until explicit scope/importance review.
- Empty important sets, BLOCKED/CANCELLED parents and local unresolved questions block
automatic completion; optional children can remain open.
- Human policy delegation binds current parent/important-child scope and links.
Scope/policy changes invalidate it; accepted history remains inspectable.
- Automatic completion is SYSTEM_EPIC with humanApproved=false, the real delegated
authority and an owned receipt mapping parent criteria to child delivery digests.
- Important reopening reopens ancestors and clears archive while keeping history.
Optional reopening does not invalidate parent delivery. Explicit parent reopening
suspends authority so replanning remains possible.
- DECOMPOSITION closes through ordinary human review without waiting for child execution.
- Reconciliation recovers a committed child with missed parent propagation and reuses
a published receipt if completion was interrupted. Repeated notification does not
rewrite or duplicate completion/receipt records.
- Missing/cyclic/multiple-parent references, symlink publication, history tampering,
receipt corruption and unapproved authority are refused/diagnosed.
- Legacy completed Works without the new fields retain valid frozen digests/bytes.
- Fresh JVM and native executions reconstruct state without private memory or LLM.
Retained native fixture:
/var/folders/0t/tfsqc14j5wbgh9h4s4dytwb00000gq/T/ai-engineering-smoke.Sq8p9Z
The epic-coordination child contains policy/receipt/reopening examples. Its project
root contains two independent Git repositories runtime/studio and the prior
completion/archive/reopen continuity experiment. These are synthetic fixtures,
not real game or rendering measurements.
## Native artifact SHA-256
ai-engineering:
2a1c35b7499da23e109efbec492977aa651af95d25e8aaeaa36b79529519a6d8
ai-engineering-0.1.0-macos-arm64.zip:
79f87778d1a91e66dbc05bd1ea5d3f97837881a04c7e1efa49fbf0bf80bc3571
ai-engineering-0.1.0-macos-arm64.tar.gz:
ed4035382b52d822bd0a5ea5d23771d2861accf3d96753f145d35f0996a09d57
## Limits and next experiment
Files publish atomically per file, not as one global transaction. Invalid/orphan
publication may require deliberate repair. Low-level storage callers must reconcile
after lifecycle writes; public CLI/Verification entry points propagate. Request IDs
correlate reports rather than forming a global transaction log. Policy approval is
an audit attestation, not authentication, and aggregate checks do not semantically
prove arbitrary prose criteria. Child repository work remains externally executed.
Real provider transports, automatic agent-generated decomposition and legacy import
remain separate work. WRK-0001 remains ACTIVE for human delivery review; implementation
authorization is not a fabricated Work-completion approval.
Next experiment: pilot one real bounded EPIC with the human reviewing its delegation,
then use a survey to select and specify the first actual agent transport.