-
Notifications
You must be signed in to change notification settings - Fork 0
eidetic-memory: refresh wrappers (eidetic 0.10) + memory-discipline convention #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
OriNachum
wants to merge
1
commit into
main
Choose a base branch
from
rollout/eidetic-memory-0.10
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,10 +12,11 @@ | |
| # Upsert is idempotent by id (and dedups by content hash): re-remembering the | ||
| # same record updates it in place, never duplicates. | ||
| # | ||
| # The store is the files backend at ~/.eidetic/memory by default — a home-dir | ||
| # path OUTSIDE any git worktree, so a record Claude remembers is recallable by | ||
| # the colleague backend (which runs in throwaway worktrees), and vice versa. | ||
| # Set EIDETIC_DATA_DIR to opt out of sharing; use --backend mongo|neo4j (with | ||
| # The store is the files backend. Default location resolves per-operation: | ||
| # PUBLIC records inside a git repo → <repo-root>/.eidetic/memory (committed, | ||
| # team-shared); PRIVATE records, or any record outside a git repo → | ||
| # $HOME/.eidetic/memory (never committed). An explicit EIDETIC_DATA_DIR still | ||
| # wins and short-circuits to that single dir. Use --backend mongo|neo4j (with | ||
| # EIDETIC_MONGO_URI / NEO4J_URI) for a server-backed shared store. | ||
|
|
||
| set -euo pipefail | ||
|
|
@@ -40,12 +41,10 @@ resolve_eidetic() { | |
| fi | ||
| dir=$(dirname "$dir") | ||
| done | ||
| cat >&2 <<'EOF' | ||
| error: eidetic CLI not found. | ||
| hint: install it with `uv tool install eidetic-cli` (or `pipx install eidetic-cli`), | ||
| or run from inside the eidetic-cli checkout with `uv` available. | ||
| The console script is `eidetic` (dist name: eidetic-cli). | ||
| EOF | ||
| # In a vendored copy there is no eidetic-cli checkout to fall back to, so the | ||
| # only honest remedy is to install the CLI. One `error:` + one `hint:` line. | ||
| printf 'error: eidetic CLI not found.\n' >&2 | ||
| printf 'hint: install it with: uv tool install eidetic-cli (or pipx install eidetic-cli); the console script is eidetic.\n' >&2 | ||
| return 1 | ||
| } | ||
|
|
||
|
|
@@ -60,7 +59,9 @@ Usage: | |
|
|
||
| A record needs `id`, `text`, and `type`; `hash` and `metadata` are recommended | ||
| (hash is derived from text when omitted). Upsert is idempotent by id. | ||
| Public data only. Every flag is forwarded verbatim to `eidetic remember`. | ||
| Records default to this agent's PRIVATE personal scope (--scope from the | ||
| culture.yaml suffix); pass --visibility public to contribute to the shared | ||
| public pool. Every flag is forwarded verbatim to `eidetic remember`. | ||
| See `eidetic explain remember`. | ||
| EOF | ||
| } | ||
|
|
@@ -72,6 +73,16 @@ case "${1:-}" in | |
| ;; | ||
| esac | ||
|
|
||
| # No record argument AND stdin is an interactive terminal → `eidetic remember` | ||
| # would block forever waiting for NDJSON. Show usage instead of hanging. A piped | ||
| # or redirected stdin (`cat records.ndjson | remember.sh`) is not a TTY and | ||
| # proceeds to the batch path normally. | ||
| if [ "$#" -eq 0 ] && [ -t 0 ]; then | ||
| usage >&2 | ||
| printf 'hint: pass a JSON record as an argument, or pipe NDJSON on stdin.\n' >&2 | ||
| exit 1 | ||
| fi | ||
|
Comment on lines
+76
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Flags-only remember can hang The new interactive-stdin guard only checks for zero arguments, so remember.sh --json (or any flags-only call) still reaches eidetic remember with no record argument and an interactive stdin, causing an indefinite block waiting for NDJSON. This can stall CI/agent runs and defeats the intended hardening. Agent Prompt
|
||
|
|
||
| resolve_eidetic || exit 2 | ||
|
|
||
| # ── default to this agent's PERSONAL, PRIVATE scope (culture.yaml `suffix`) ── | ||
|
|
@@ -100,9 +111,12 @@ resolve_scope() { | |
| # inline `# comment` or trailing space can't bleed into the scope), | ||
| # then strip surrounding quotes only — matching the canonical parser | ||
| # in .claude/skills/cicd/scripts/_resolve-nick.sh. | ||
| # `|| true`: under `set -o pipefail`, `head -n1` closing the pipe | ||
| # early can SIGPIPE `sed`, making the substitution non-zero and | ||
| # aborting the script. An empty parse must yield "" here, not exit. | ||
| suffix=$(sed -n \ | ||
| 's/^[[:space:]]*-\{0,1\}[[:space:]]*suffix:[[:space:]]*\([^[:space:]]*\).*/\1/p' \ | ||
| "$dir/culture.yaml" | head -n1 | tr -d "\"'") | ||
| "$dir/culture.yaml" | head -n1 | tr -d "\"'" || true) | ||
| break | ||
| fi | ||
| dir=$(dirname "$dir") | ||
|
|
@@ -127,7 +141,19 @@ if ! has_flag --scope "$@"; then | |
| EIDETIC_SCOPE=$(resolve_scope) | ||
| if [ -n "$EIDETIC_SCOPE" ]; then | ||
| SCOPE_ARGS+=(--scope "$EIDETIC_SCOPE") | ||
| has_flag --visibility "$@" || SCOPE_ARGS+=(--visibility private) | ||
| # rollout-cli eidetic-memory recipe POLICY OVERRIDE (not eidetic's | ||
| # upstream private default): default to PUBLIC so a plain remember lands | ||
| # in <repo>/.eidetic/memory — committed, team- and mesh-shared. Pass | ||
| # --visibility private to keep a record in $HOME (uncommitted). | ||
| has_flag --visibility "$@" || SCOPE_ARGS+=(--visibility public) | ||
| elif ! has_flag --visibility "$@"; then | ||
| # No suffix AND no explicit --visibility: the record falls back to | ||
| # eidetic's own default (scope=default, visibility=public). Don't let an | ||
| # expected-private record go public silently — warn on stderr (stdout | ||
| # stays clean for --json). Warn ONLY here: an explicit --scope (outer | ||
| # guard) or --visibility (this guard) means the caller chose deliberately | ||
| # and is honored verbatim, so either flag silences this. | ||
| printf 'warning: no culture.yaml suffix resolved; this record falls back to the public default scope. Pass --scope or --visibility to place it deliberately.\n' >&2 | ||
| fi | ||
| fi | ||
|
|
||
|
|
||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. recall.sh modified in vendored skill
📘 Rule violation⚙ MaintainabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools