Hindsight Memory for CoachingAgentFramework
Static-bank Hindsight operations for the Coaching Agent Framework repo. All recall and retain calls target the CoachingAgentFramework bank on the self-hosted instance at https://api.hs.delo.sh, or on a locally-provisioned fallback stack when the shared server is unavailable.
Operating Principles
- One bank only. Every operation uses
CoachingAgentFramework. - Recall before acting. Check Hindsight before starting non-trivial work in this repo.
- Retain high-signal facts. Store conventions, decisions, debugging lessons, and preferences.
- Prefer scripts. Use the helpers in
scripts/so the bank and endpoint never drift. - Local fallback is automatic. The mise enter gate checks reachability; if the shared Hindsight is unreachable, it provisions a local Docker stack and points the repo
.envat it.
Quick Navigation
| Task | Command |
|---|---|
| Recall context | ./skills/hindsight-caf/scripts/recall.sh "<query>" |
| Retain a fact | ./skills/hindsight-caf/scripts/retain.sh "<fact>" <context> |
| Reflect/synthesize | ./skills/hindsight-caf/scripts/reflect.sh "<question>" |
| Check bank stats | hindsight bank stats CoachingAgentFramework |
| Manual local setup | mise run hindsight-local-setup |
| Check current reachability | hindsight health |
Bank & Endpoint
- Bank:
CoachingAgentFramework - Default API URL:
https://api.hs.delo.sh - Local fallback URL:
http://127.0.0.1:18888 - Web UI:
https://hs.delo.sh(shared);http://127.0.0.1:19999(local)
The Hindsight CLI should already point at https://api.hs.delo.sh. If not:
hindsight configure --api-url https://api.hs.delo.sh --api-key <key>
Helpers
Scripts live in ./skills/hindsight-caf/scripts/ and hardcode the bank.
Retain
./skills/hindsight-caf/scripts/retain.sh "Auth middleware requires X-Request-ID header" conventions
Context categories: architecture, conventions, debugging, deployment, dependencies, preferences, session-summary, code-edit.
Upsert a grouped fact with --doc-id:
./skills/hindsight-caf/scripts/retain.sh "Sprint goal shifted to onboarding gates" session-summary --doc-id caf-sprint-2026-06
Recall
./skills/hindsight-caf/scripts/recall.sh "How is auth wired in this repo?"
JSON output for inspection:
./skills/hindsight-caf/scripts/recall.sh "testing patterns" --json | jq '.results[].text'
Reflect
Reflect runs an agentic search-and-synthesis pass with citations.
./skills/hindsight-caf/scripts/reflect.sh "What architectural decisions shaped the auth flow?"
Local / Offline Hindsight
When a developer cannot reach the shared Hindsight server, the repo can fall back to a self-contained local Docker stack. The stack is provisioned under ~/.local/share/hindsight-caf/ and consists of a Hindsight API + Control Plane container plus a pgvector-enabled Postgres container.
How it is triggered
mise enter runs .mise/scripts/hindsight-gate.sh, which:
- Loads the repo
.env. - Runs
hindsight healthagainst the currently configured API URL. - If healthy, exits silently.
- If unhealthy, checks the per-dev opt-out in
.agents/local.json. - If not opted out, runs
mise run hindsight-local-setupto create/start the local stack and rewrite.envto use it.
Run the setup manually at any time:
mise run hindsight-local-setup
Opting out
To disable the automatic local fallback, add this to .agents/local.json (gitignored):
{
"hooks": {
"disabled": ["hindsight-local-setup"]
}
}
Or set the environment variable before entering the repo:
export HINDSIGHT_LOCAL_SETUP=0
What the setup creates
~/.local/share/hindsight-caf/compose.yml~/.local/share/hindsight-caf/.env- A Docker volume
hindsight-caf_postgres-datafor persistence HINDSIGHT_API_URL=http://127.0.0.1:18888andHINDSIGHT_API_KEY=local-devin the repo.env- The
CoachingAgentFrameworkbank if it does not already exist
Requirements
- Docker Engine + Docker Compose v2
hindsightCLI on PATH (install from the Hindsight release page if missing)- For LLM-powered retain/consolidation/reflect: either an OpenRouter API key (
OPENROUTER_API_KEY) or a local OpenAI-compatible endpoint (override viaHINDSIGHT_API_LLM_BASE_URL).
Direct CLI Usage
If you prefer the raw CLI, the bank is always CoachingAgentFramework:
hindsight memory recall CoachingAgentFramework "query"
hindsight memory retain CoachingAgentFramework "fact" --context conventions
hindsight memory reflect CoachingAgentFramework "question" --context "architecture review"
When to Retain
- Discovered a bug fix or workaround specific to CAF
- Learned a project convention, naming rule, or pattern
- User stated a preference that should persist
- Completed a significant task — summarize what was done
- Captured something that did not work (negative knowledge)
When to Recall
- Before starting a non-trivial task in this repo
- When making architectural or tooling decisions
- When the user asks about past CAF work or patterns
- When entering an unfamiliar area of the codebase
Out of Scope
- Multi-bank routing. Use the global
hindsightskill for cross-project or multi-agent bank resolution. - Other repos. This skill targets only
CoachingAgentFramework. - Hindsight plugin/hook setup. Use the global
hindsightskill for OpenClaw, Claude Code, or Codex hook installation. - MCP tool definitions or prompt engineering. This skill covers only CLI memory operations for CAF.