Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 47 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,53 @@ rustyclawd-tools = { git = "https://github.com/rysweet/RustyClawd.git", rev = "d
# wiring (`src/gym_runner_client.rs`) and Simard-specific scoring/history stay
# in this crate. The crate is a light workspace member (serde/serde_json/
# thiserror/tracing/chrono only — no heavy workspace deps are transitive).
# Bumped (issue #2626) to the current HEAD of amplihack-rs `main` (verified via
# `git ls-remote`); the delta is workflow/recipe/CI-tooling fixes only, with the
# `amplihack-agent-eval` crate surface (GymRunner/GymConfig/GymScenarioResult)
# and the reverted workspace version 0.11.1 unchanged.
amplihack-agent-eval = { git = "https://github.com/rysweet/amplihack-rs.git", rev = "14dc30b10e87764120c6f2bae7f3630522c29e5d" }
# Pin lineage (each rev is an immutable amplihack-rs commit SHA):
# 59548a96… (initial de-fork, #2323)
# -> 2a93441d… landed by issue #2626 — bump both amplihack pins to the
# then-current upstream `main` HEAD;
# -> 14dc30b1… landed by issue #2767 — pick up amplihack-rs PR #856, the
# clean agent-result channel off the noisy stdout (a 2026-07-07 UTC
# commit: 2026-07-07 01:47:01 UTC / 2026-07-06 18:47:01 -0700);
# -> 9ee05a06… (this pin, below).
# Across 2a93441d…/14dc30b1… the delta was workflow/recipe/CI-tooling only, with
# the `amplihack-agent-eval` crate surface (GymRunner/GymConfig/
# GymScenarioResult) unchanged.
#
# This pin is the amplihack-rs **v0.18.25** release source commit
# `9ee05a06eab98e9ab504a031bffaa4190700c2af` (release published 2026-09-02;
# pin verified 2026-09-03). Provenance, all verified with `git ls-remote` /
# `git cat-file` against https://github.com/rysweet/amplihack-rs.git:
# * the **annotated** tag `refs/tags/v0.18.25` is object `e947170a…`, and it
# dereferences (`refs/tags/v0.18.25^{}`) to commit `9ee05a06…`;
# * `refs/heads/main` *was* `9ee05a06…` **at verification on 2026-09-03** —
# i.e. the release tag and `main` pointed at the same commit at that
# instant, which establishes that `9ee05a06…` is a mainline release commit
# rather than a side/topic branch. This is a point-in-time observation, not
# a standing claim: upstream `main` advances, and once it does this comment
# stays true (it records what was observed then) while the pin deliberately
# does not move.
# * `9ee05a06…` was 200 commits ahead of the previous pin `14dc30b1…` at that
# same verification.
# The pin stays the immutable commit SHA (never the tag) so the build cannot be
# re-pointed by an upstream tag move.
#
# API impact: NONE. The `crates/amplihack-agent-eval` subtree is **byte
# identical** across those 200 commits — both `14dc30b1…:crates/amplihack-agent-eval`
# and `9ee05a06…:crates/amplihack-agent-eval` resolve to git tree
# `1a635333f15fa2964e6d0ecae35b5a9625d59ee7`, and the crate's own dependency set
# (serde/serde_json/thiserror/tracing/chrono) is unchanged. So
# `src/gym_runner_client.rs` needs no adaptation and the wire JSON stays
# byte-stable.
#
# Lockfile impact: the crate inherits `version.workspace`, which upstream moved
# 0.11.1 -> 0.18.0 in the workspace manifest, so Cargo.lock records
# `amplihack-agent-eval 0.18.0` at the new rev. NOTE the deliberate mismatch:
# the upstream *release* is tagged v0.18.25 while the upstream *workspace crate
# version* at `9ee05a06…` is 0.18.0 — the tag tracks the release train, not the
# crate version. Both readings are pinned to that immutable commit, so neither
# changes as upstream advances. Simard consumes the crate by rev, so only the
# rev is authoritative.
amplihack-agent-eval = { git = "https://github.com/rysweet/amplihack-rs.git", rev = "9ee05a06eab98e9ab504a031bffaa4190700c2af" }
# De-fork phase 2b (issue #2307): the native cognitive-memory fork is gone, but
# `lbug` is still a direct dependency of the standalone `simard-tui` binary
# (`src/bin/simard_tui/goals.rs`), which opens a LadybugDB read-only to render
Expand Down
26 changes: 19 additions & 7 deletions docs/architecture/gym-eval-library-adapter.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Library-backed Gym Evaluation Engine (the sole engine)
description: How Simard's gym client is backed by the amplihack-agent-eval crate's native Rust GymRunner through the thin gym_runner_client adapter. As of the de-fork the private native_gym reimplementation has been deleted and the library is the only evaluation engine.
last_updated: 2026-06-20
last_updated: 2026-09-03
owner: simard
doc_type: reference
related:
Expand Down Expand Up @@ -64,11 +64,15 @@ three handlers moved into the library.
## The dependency

The engine is a pinned-revision git dependency in `Cargo.toml`, matching the
immutable-rev style already used for `amplihack-memory` and `rustyclawd-core`:
immutable-rev style already used for `amplihack-memory` and `rustyclawd-core`.
The authoritative pin is always the live line in the root `Cargo.toml`; the
snippet below records the rev current as of **2026-09-03** — the amplihack-rs
`v0.18.25` release source commit (the annotated tag `v0.18.25` dereferences to
it, and it was `main` HEAD at verification):

```toml
[dependencies]
amplihack-agent-eval = { git = "https://github.com/rysweet/amplihack-rs.git", rev = "59548a96049ab8d558110bcaf9c82a4316f1bbf0" }
amplihack-agent-eval = { git = "https://github.com/rysweet/amplihack-rs.git", rev = "9ee05a06eab98e9ab504a031bffaa4190700c2af" }
```

### Consumability
Expand Down Expand Up @@ -195,11 +199,19 @@ scenario list. The wire `scenario_id` is therefore always one of the ids
`gym.list_scenarios` advertises — never the bare `"L{n}"` form.

**2. Suite `success`.** The library's `run_suite` computes its top-level
`success` with inverted logic —
`success` as
`!result.failed_levels.is_empty() || result.level_results.iter().all(|lr| lr.success)`
(`amplihack_agent_eval::gym::GymRunner::run_suite`, gym.rs:300-301) — which
evaluates to `true` precisely when there *are* failed levels. The adapter does
**not** trust that flag; it recomputes
(`amplihack_agent_eval::gym::GymRunner::run_suite`). This is a **tautology: it
always evaluates to `true`.** `ProgressiveResult::add_result` records a level id
in `failed_levels` exactly when that level's result is *not* successful, so an
empty `failed_levels` implies every entry of `level_results` succeeded — meaning
whenever the first disjunct is `false`, the second is `true`. The flag is
therefore `true` on an all-pass suite, on a partially-failing suite, and on an
empty suite (`all()` over an empty iterator is `true`).

The consequence is stronger than "the flag is inverted": it carries **no
information at all**, so there is nothing to invert or correct. The adapter
ignores it outright and recomputes
`success = scenarios_passed == scenarios_total` from the per-scenario results it
already maps. (This upstream quirk should be filed as an issue against
`amplihack-rs`; until it is fixed, the adapter's recomputation is the contract
Expand Down
42 changes: 36 additions & 6 deletions docs/atlas/compile-deps/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
title: Compile Dependencies Atlas
description: "Code-derived atlas layer mapping Simard's direct Cargo dependencies (including the exact git-rev pins) and a one-hop view of the largest internal Rust module dependencies."
last_updated: 2026-09-03
review_schedule: as-needed
owner: simard
doc_type: reference
status: living document — regenerate from code when stale
---

# Compile Dependencies Atlas

This layer maps Simard's direct Cargo dependencies and a one-hop view of the largest internal Rust module dependencies. The overview diagrams stay small by grouping the external crates, dev/build dependencies, and internal module graph; the split diagrams below expand those groups without exceeding the atlas density target.
Expand All @@ -22,20 +32,40 @@ This layer maps Simard's direct Cargo dependencies and a one-hop view of the lar

## Evidence anchors

- Direct dependencies are declared in `Cargo.toml:135` through `Cargo.toml:209`; Unix target dependency is at `Cargo.toml:212`; build and dev dependencies are at `Cargo.toml:218` and `Cargo.toml:245` through `Cargo.toml:254`.
- `amplihack-memory` is pinned to `amplihack-memory-lib` with the `persistent` feature at `Cargo.toml:135`; the direct `lbug` fork pin is at `Cargo.toml:158`.
- The default feature set enables `signal` and `dashboard-audit` at `Cargo.toml:227`, and `dashboard-audit` pulls `headless_chrome`, `regex`, and `url` at `Cargo.toml:236`.
- The large internal module declarations are visible in `src/lib.rs:24`, `src/lib.rs:60`, `src/lib.rs:78`, `src/lib.rs:89`, `src/lib.rs:90`, `src/lib.rs:103`, `src/lib.rs:106`, `src/lib.rs:114`, `src/lib.rs:117`, `src/lib.rs:122`, `src/lib.rs:123`, `src/lib.rs:124`, `src/lib.rs:126`, `src/lib.rs:128`, `src/lib.rs:138`, `src/lib.rs:163`, and `src/lib.rs:164`.
Anchors are **section- and symbol-based**, not line numbers: `Cargo.toml` and
`src/lib.rs` both carry long provenance comment blocks, so raw line numbers rot
on every pin bump (they were already stale before this page was last touched).
Each anchor below is a stable, greppable construct.

- Direct dependencies are declared under the `[dependencies]` table in
`Cargo.toml`; the Unix-only dependency (`libc`) is under
`[target.'cfg(unix)'.dependencies]`; build and dev dependencies are under
`[build-dependencies]` (`chrono`) and `[dev-dependencies]` (`assert_cmd`,
`proptest`, `serial_test`, `syn`, `proc-macro2`).
- `amplihack-memory` is pinned to `amplihack-memory-lib` with the `persistent`
feature on the `amplihack-memory = { git = …, features = ["persistent"] }`
key; the direct `lbug` fork pin is the `lbug = { git = …, rev = … }` key. Both
are in `[dependencies]` — grep the key names.
- The `[features]` table sets `default = ["signal", "dashboard-audit"]`, and
`dashboard-audit = ["dep:headless_chrome", "dep:regex", "dep:url"]`.
- The large internal modules the module-graph diagram draws are the `pub mod` /
`mod` declarations in `src/lib.rs` — e.g. `cognitive_memory`, `goal_curation`,
`ooda_loop`, `ooda_actions`, `ooda_brain`, `journal`, `overseer`,
`meeting_backend`, `memory_consolidation`, `memory_ipc`, `engineer_loop`,
`self_deploy`, `self_improve`, and `runtime`. Every node name in
`compile-deps-internal-modules.dot` matches a `mod <name>;` declaration in
`src/lib.rs`, so the diagram can be re-checked with
`grep -E '^(pub )?mod <name>;' src/lib.rs`.

## Dependency inventory

| Crate or section | Version or pin | Purpose |
| --- | --- | --- |
| `amplihack-memory` | git `c266e15d1399967c04324370e77cf281990b8be1`, feature `persistent` | Sole cognitive-memory backend adapter; persistent graph storage via upstream memory library. |
| `amplihack-memory` | git `0031505b911151bf47409694a6c45f8b778d91b9`, feature `persistent` | Sole cognitive-memory backend adapter; persistent graph storage via upstream memory library. |
| `lbug` | git `5a2c107881879f4d1bb594b14967948870e65cdc` | Embedded LadybugDB graph store used directly by TUI and unified with `amplihack-memory`. |
| `rustyclawd-core` | git `dcccad80ed381c66a7728565be5cb84120aacbed` | RustyClawd core agent SDK integration. |
| `rustyclawd-tools` | git `dcccad80ed381c66a7728565be5cb84120aacbed` | RustyClawd tool integration. |
| `amplihack-agent-eval` | git `14dc30b10e87764120c6f2bae7f3630522c29e5d` | Native Rust gym and evaluation runner types. |
| `amplihack-agent-eval` | git `9ee05a06eab98e9ab504a031bffaa4190700c2af` (amplihack-rs release `v0.18.25`) | Native Rust gym and evaluation runner types. |
| `rusqlite` | `=0.31.0`, features `backup`, `bundled` | SQLite storage and backup support. |
| `serde` | `=1.0.228`, feature `derive` | Serialization derives for config, state, and message types. |
| `serde_json` | `=1.0.149` | JSON IO for CLI, recipes, telemetry payloads, and stored records. |
Expand Down
4 changes: 2 additions & 2 deletions docs/atlas/compile-deps/compile-deps-external-runtime-dot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/atlas/compile-deps/compile-deps-external-runtime.dot
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ digraph compile_deps_external_runtime {

simard [label="simard"];

amplihack_memory [label="amplihack-memory\ngit c266e15 persistent"];
amplihack_memory [label="amplihack-memory\ngit 0031505 persistent"];
rustyclawd_core [label="rustyclawd-core\ngit dcccad8"];
rustyclawd_tools [label="rustyclawd-tools\ngit dcccad8"];
amplihack_agent_eval [label="amplihack-agent-eval\ngit 14dc30b"];
amplihack_agent_eval [label="amplihack-agent-eval\ngit 9ee05a0"];
lbug [label="lbug\ngit 5a2c107"];

rusqlite [label="rusqlite =0.31.0\nbackup bundled"];
Expand Down
4 changes: 2 additions & 2 deletions docs/atlas/compile-deps/compile-deps-external-runtime.mmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
flowchart LR
simard["simard"] --> amplihack_memory["amplihack-memory git c266e15 persistent"]
simard["simard"] --> amplihack_memory["amplihack-memory git 0031505 persistent"]
simard --> rustyclawd_core["rustyclawd-core git dcccad8"]
simard --> rustyclawd_tools["rustyclawd-tools git dcccad8"]
simard --> amplihack_agent_eval["amplihack-agent-eval git 14dc30b"]
simard --> amplihack_agent_eval["amplihack-agent-eval git 9ee05a0"]
simard --> lbug["lbug git 5a2c107"]
simard --> rusqlite["rusqlite =0.31.0 backup bundled"]
simard --> serde["serde =1.0.228 derive"]
Expand Down
Loading
Loading