feat: Phase 5 — Agent Composition & Subordinate Spawning - #107
Merged
Conversation
Add four new modules for multi-agent composition following Pillars 8 (Identity != Runtime) and 9 (Composition Outlives Topology): - agent_supervisor: subordinate lifecycle management with heartbeat tracking via hive, retry policy (max 2), and kill semantics - agent_goal_assignment: goal communication and progress reporting through semantic facts in cognitive memory bridge - identity_composition: composite identity with depth-limited subordinate nesting (SIMARD_MAX_SUBORDINATE_DEPTH env, default 3) - agent_roles: role catalog (Engineer, Reviewer, GymRunner, Facilitator) with objective-based role selection and manifest generation Integration tests cover spawn/heartbeat lifecycle, goal assignment round-trips, progress polling, composite identity validation, and feral cases (stale heartbeats, dead subordinates, depth limits). Closes #94 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rysweet
pushed a commit
that referenced
this pull request
Jun 24, 2026
…108 fix Resolves the Cargo.toml/Cargo.lock conflict with the reverted main (4e01fbb): - amplihack-memory re-pinned to the squash-merge SHA of amplihack-memory-lib PR #108 (26d49bf — the #107 _deleted read-path fix + empty-read safety gate). - lbug = =0.17.1 (prebuilt crates.io engine; NO [patch.crates-io]). The CSR SIGSEGV defense is the lib's tombstone soft-delete, so the from-source C++ patch is intentionally dropped (faster builds; prebuilt 0.17.1 reads v40 fine). - Single lbug 0.17.1 in the graph; 0 lbug-patched refs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rysweet
added a commit
that referenced
this pull request
Jun 24, 2026
…mory) + safe-update item-count parity gate (#2400) * feat(safe-update): re-pin lbug 0.15.3 -> 0.17.1 (#107-fixed amplihack-memory) + item-count parity gate Re-enables the lbug 0.15.4 -> 0.17.1 engine migration, now that the amplihack-memory-lib #107 "silent empty-read" data-loss bug is fixed. Re-pin (Cargo.toml / Cargo.lock): - Bump the direct `lbug` dep (used by simard-tui's read-only goal-board view) from "=0.15.3" to "=0.17.1", in lockstep with the amplihack-memory pin so the final binary links exactly ONE engine and ONE storage format (v41). Verified with `cargo tree -i lbug` => a single `lbug v0.17.1` (direct + transitive). - Re-pin the `amplihack-memory` git dependency to the commit carrying the 0.15.4->0.17.1 engine migration AND the #107 fix (the `_deleted` tombstone read-path fix + the empty-read safety gate). Repoint to the squash-merge commit on amplihack-memory-lib `main` once PR #108 merges. Safe-update item-count parity gate (defense-in-depth, the doc's "second, independent defense layer"): - The validate phase previously declared an upgrade `validated` after N clean OODA cycles ONLY. A silently-empty store passes clean cycles, so that alone is not evidence of a healthy upgrade. Now `record_cycle_with_parity` compares the incoming binary's cognitive item count against a pre-upgrade baseline recorded in `upgrade-status.json`; on a shortfall (the #107 signature: pre > 0, post read back smaller / empty) it forces `validate_timeout` instead of `validated`, so the watchdog rolls the upgrade back. `record_cycle` delegates with no baseline, preserving existing behaviour. - `UpgradeStatus.pre_upgrade_item_count` (serde default) carries the baseline; `UpdateConfig.pre_upgrade_item_count` threads it through the orchestrator -> `do_swap` -> `exec_handover`. The operator CLI leaves it `None` (it must NOT open the live store); the brain sets it in-process from its already-open store. - Pure `memory_parity_verdict(pre, current) -> ParityVerdict` + unit tests. The hard, always-on guarantee is the amplihack-memory store-open gate (which the re-pinned daemon now links); this Simard gate is the second layer. Brain-loop wiring of the actual counts (record pre-upgrade count at update initiation; pass the current count to `record_cycle_with_parity` at validate) requires the live daemon's open store and is the remaining live-deploy step. Does NOT deploy 0.17.1 to the live daemon. All 55 safe_update + 60 cognitive_memory tests pass; clippy + fmt clean. Refs amplihack-memory-lib#107 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(deps): bump quinn-proto 0.11.14 -> 0.11.15 (RUSTSEC-2026-0185 memory exhaustion) cargo-audit flagged RUSTSEC-2026-0185 (high; remote memory exhaustion in quinn-proto's out-of-order stream reassembly) — a newly-published advisory whose fix is >=0.11.15. A transitive dep; the precise bump resolves it with no other lockfile churn. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(logging): route tracing logs to stderr so --json command stdout stays clean The lbug 0.17.1 / newer amplihack-memory rev emits an INFO log on store-open; with the tracing fmt layer writing to STDOUT, that log interleaved with the JSON emitted by `simard memory stats|dump --json`, breaking the 3 bin_simard_memory_cli integration tests (stdout no longer parseable as JSON). Route the fmt layer to stderr (standard CLI hygiene: logs -> stderr, results -> stdout). Fixes the pollution for every --json command, not just memory stats. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Simard Engineer <engineer@simard.local> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SIMARD_MAX_SUBORDINATE_DEPTH, default 3)lib.rswith public re-exportsArchitecture alignment
agent_namefor memory isolationCloses #94
Test plan
cargo test)cargo clippy --all-targets— zero warningscargo fmt -- --check— cleanagent-composition.mddesign🤖 Generated with Claude Code