Skip to content

feat(cognee): add manual memory lookup helper - #130

Closed
JTInventory wants to merge 9 commits into
kunchenguid:mainfrom
JTInventory:feat/cognee-memory-command
Closed

JTInventory wants to merge 9 commits into
kunchenguid:mainfrom
JTInventory:feat/cognee-memory-command

Conversation

@JTInventory

Copy link
Copy Markdown

Summary

Firstmate can now run an optional manual Cognee memory lookup before dispatch without making Cognee part of the authority chain. The helper prints untrusted memory hints separately from opened local source paths and warnings, and --append-brief writes only opened source paths or a non-blocking unavailable note into a brief.

Safety Boundaries

  • Manual-only command; no dispatch path auto-queries Cognee.
  • Missing or failed FM_COGNEE_LOOKUP_CMD exits 0 with memory unavailable, so dispatch can continue without memory context.
  • Raw Cognee answers are never appended to briefs as proof.
  • No write/admin Cognee capability, config mutation, or Gbrain fallback path is added.

Validation

  • bash -n bin/fm-memory-lookup.sh tests/fm-memory-lookup.test.sh
  • tests/fm-memory-lookup.test.sh
  • set -e; for t in tests/*.test.sh; do "$t"; done
  • git diff --check plus no-index whitespace checks for the two new executable files
  • shellcheck bin/fm-memory-lookup.sh tests/fm-memory-lookup.test.sh was not run because shellcheck is not installed in this environment
  • Manual diff scan completed; ce-code-review was not run because this session's multi-agent tool policy only allows subagent spawning when explicitly requested

Post-Deploy Monitoring & Validation

No additional production monitoring is required because this is an inert manual CLI helper. Validate on first real use by confirming an unavailable backend prints memory unavailable and exits 0, a configured read-only backend keeps memory hint, verified local source path, and warning separate, and any brief attachment contains only opened local source paths plus advisory wording. Treat any raw Cognee answer in a brief, automatic dispatch query, Gbrain invocation, or nonzero unavailable-backend exit as a rollback trigger.


Compound Engineering
GPT--5_Codex

@JTInventory
JTInventory force-pushed the feat/cognee-memory-command branch from ecf0bf7 to b6794df Compare June 29, 2026 01:00
@JTInventory

Copy link
Copy Markdown
Author

Closing because this work is maintained in the JTInventory fork. We are not expecting upstream review or merge for this branch.

@JTInventory JTInventory closed this Jul 1, 2026
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
…nchenguid#130)

* feat(bin): speak a captain-facing outcome out of this machine's speaker

Firstmate could already speak to the captain: the glasses loop owns the spoken
register - outcome first, two or three short sentences, never a URL, path or
id, and never a request for a spoken yes - and enforces it in code before
anything reaches a voice. What it could not do was speak when he is at the desk
without the glasses, because that path's only sink is the phone mailbox.

fm-speak.sh is that missing sink and nothing else. It shapes every line through
the existing register owner by absolute path and hands the result to say. It is
not a second copy of the register: a copy in this repository would drift from
the one the glasses already speak, so an unreachable owner ends in silence
rather than in a fallback that reads a URL aloud. Because that owner refuses
text asking the captain to decide, a merge, a spend or an outward action
structurally cannot be put to him by voice and stays in the reply he reads.

Opt-in is per home and per device through private config/speak, so cloning this
repo, seeding a secondmate home, or adding a device never makes one talk.

Both halves are bounded so a captain-facing turn is never held open. The
register call is waited on under a watchdog because its output is needed; the
speaker call is detached with its standard streams closed, so a caller
capturing this script's output is not blocked until the audio finishes, and a
runaway speaker is killed rather than left holding the audio device.

What it deliberately does not claim: exit 0 means the shaped line was handed to
the speaker, never that audio was produced or that the captain heard it.

* chore(fork-surface): declare the desk voice-out capability

The speak script and its suite are fork-only paths, so the manifest has to
claim them or the surface gate reports them unowned. The commits entry points
at the implementation commit and follows the file's existing convention of
being repaired to the squash-merge commit once the PR lands.

The config path is deliberately not added to the portable set: config/speak
decides whether this machine talks, with a voice installed on this machine, so
porting it to a second home is exactly the self-enrolment the opt-in prevents.

* test(shards): place the speak suite in a serial shard

The coverage guard requires every portable script to sit in exactly one serial
shard. It goes at the end of shard 1, the slot the previously added suite took,
because the shard order is longest-first from CI timing artifacts and a new
script has none yet. Measured locally at 17s against 310s for the pinned first
entry and 135s for the second, so it is nowhere near the head; the authoritative
position follows from the next timing artifact, not from these numbers.

Also names bin/fm-speak.sh as the speak path in the AGENTS.md line rather than
leaving the pronoun to reach back across the sentence.

* no-mistakes(review): split speak bounds, close shaper stdin, name timeouts, reap watchdogs

* no-mistakes(document): docs(speak): point timeout defaults to script header
fritznoff pushed a commit to fritznoff/starship that referenced this pull request Nov 2, 2026
The integration branch carries the merged patch groups, so it can no longer
fast-forward to main. Keeping it current by merging main in preserves every
merged group and the commits their pull requests point at, which a rebase of a
shared branch would rewrite.

This brings in the glasses shift loop (kunchenguid#109) and the desk speaker (kunchenguid#130). Both
touch bin/fm-test-run.sh and fork-surface.conf, the two files every patch group
edits, so carrying them now keeps later groups from rebasing across the drift.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant