Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(setup-agent): fence the docker example so its doctest compiles; run doctests in CI

AkitaOnRailsfbef4b6f9a08
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7d666440..3b138ca7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -71,6 +71,10 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: echo "TAILWIND_BUILD=1" >> "$GITHUB_ENV"
- run: cargo test --workspace --all-targets
+ # `--all-targets` deliberately excludes doctests, so a doc-comment code
+ # block that fails to compile (e.g. an indented shell example rustdoc
+ # reads as Rust) shipped unnoticed. Run them explicitly.
+ - run: cargo test --workspace --doc
- name: Vendored tailwind.css is current
if: matrix.os == 'ubuntu-latest'
run: git diff --exit-code -- crates/ai-memory-web/static/tailwind.css
diff --git a/crates/ai-memory-cli/src/commands/setup_agent.rs b/crates/ai-memory-cli/src/commands/setup_agent.rs
index 8144a4b1..c7675fa4 100644
--- a/crates/ai-memory-cli/src/commands/setup_agent.rs
+++ b/crates/ai-memory-cli/src/commands/setup_agent.rs
@@ -9,14 +9,16 @@
//!
//! `setup-agent` bundles the extract + render into one command:
//!
-//! docker run --rm \
-//! -v "$HOME/.ai-memory:/host" \
-//! akitaonrails/ai-memory:latest \
-//! setup-agent \
-//! --agent claude-code \
-//! --to /host/hooks \
-//! --host-prefix "$HOME/.ai-memory/hooks" \
-//! --auth-token "$TOKEN"
+//! ```text
+//! docker run --rm \
+//! -v "$HOME/.ai-memory:/host" \
+//! akitaonrails/ai-memory:latest \
+//! setup-agent \
+//! --agent claude-code \
+//! --to /host/hooks \
+//! --host-prefix "$HOME/.ai-memory/hooks" \
+//! --auth-token "$TOKEN"
+//! ```
//!
//! 1. Copies `/usr/local/share/ai-memory/hooks/claude-code/*.{sh,ps1}` into
//! `/host/hooks/claude-code/` (which on the host is