feat(memory): integrate investigation reports and decisions with Hindsight - #10
Open
BohnBawerick wants to merge 5 commits into
Open
feat(memory): integrate investigation reports and decisions with Hindsight#10BohnBawerick wants to merge 5 commits into
BohnBawerick wants to merge 5 commits into
Conversation
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.
Intent
Connect this fleet's finished knowledge to Hindsight so an old investigation can be found by searching for it instead of remembering it exists (last tier of adopted memory architecture in data/fm-memory-design/report.md section 16).
Corpus boundary strictly enforced: exactly data//report.md and data/decisions/.md. Explicitly excluded: data/captain.md, data/captain-shared.md, data/memory/, data/backlog.md, data/done-archive.md, and state/. Never send credentials, tokens, or .env values; files with secrets are skipped.
Scope cut from captain: bank + backfill only. Dropped ongoing capture wiring at report-write/decision-write.
Built:
LIVE PROOF
What Changed
bin/fm-hindsight-retain.shto retain investigation reports (data/*/report.md) and decision records (data/decisions/*.md) into Hindsight, supporting single-file retention and batch--backfillwith credential scanning and corpus boundary enforcement.bin/fm-hindsight-recall.shto search Hindsight memory on demand, returning results in compact greppable text or JSON format.FM_HINDSIGHT_URL,FM_HINDSIGHT_BANK) and script interfaces inAGENTS.mdanddocs/, and added test coverage viatests/fm-hindsight.test.shinbin/fm-test-run.sh.Risk Assessment
✅ Low: The implementation introduces well-bounded, standalone CLI tools for Hindsight retention and recall with strict corpus boundaries, secret filtering, and robust test coverage.
Testing
Exercised the complete Hindsight integration including automated behavioral tests (corpus boundary validation, credential scanner skipping, fire-and-forget execution, idempotent document retention, recall formatting, and resumable backfill) along with end-to-end live queries against the firstmate Hindsight bank proving idempotent retention of all 144 corpus documents and exact query recall.
Evidence: Automated Hindsight behavioral test run
Source: Automated Hindsight behavioral test run
Evidence: Live Hindsight firstmate bank configuration
Source: Live Hindsight firstmate bank configuration
Evidence: Live Hindsight bank document count and stats
Source: Live Hindsight bank document count and stats
Evidence: Live recall search for symlinks to projects
Source: Live recall search for symlinks to projects
Evidence: Live backfill resumability verification over 144 files
Source: Live backfill resumability verification over 144 files
Evidence: Live retention idempotence probe
Source: Live retention idempotence probe
Evidence: Corpus boundary rejection check
Source: Corpus boundary rejection check
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
tests/fm-hindsight.test.sh./bin/fm-test-run.sh tests/fm-hindsight.test.shcurl -s http://hindsight-1:8888/v1/default/banks | jq '.banks[] | select(.bank_id == "firstmate")'curl -s http://hindsight-1:8888/v1/default/banks/firstmate/stats | jq '{bank_id, total_documents, total_nodes}'./bin/fm-hindsight-recall.sh "symlinks to projects"./bin/fm-hindsight-recall.sh "memory architecture" --jsonFM_DATA_OVERRIDE=/home/paiva/labs/axi-sandbox/firstmate/data ./bin/fm-hindsight-retain.sh /home/paiva/labs/axi-sandbox/firstmate/data/fm-projects-symlink/report.mdFM_DATA_OVERRIDE=/home/paiva/labs/axi-sandbox/firstmate/data ./bin/fm-hindsight-retain.sh --backfill./bin/fm-hindsight-retain.sh data/captain.md (and prohibited corpus files)✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.