Skip to content

feat(token-ledger): ? learns your project and feedback, plus /brief (0.6.0) - #13

Open
bully911210 wants to merge 3 commits into
mainfrom
feat/token-ledger-memory
Open

bully911210 wants to merge 3 commits into
mainfrom
feat/token-ledger-memory

Conversation

@bully911210

@bully911210 bully911210 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

What

? no longer starts cold. After each prompt a person types, a background Haiku call folds the exchange into:

  • a short project brief (per project folder),
  • a profile of the user (shared across projects),
  • a feedback log: corrections, frustration, and which ? suggestions were inserted or skipped.

? now leads with that memory plus only the latest messages (full recent chat until a brief exists), and its prompt no longer assumes the user is a developer.

New /brief command shows what the mod believes and lets the user fix it: /brief brief <text>, /brief profile <text>, /brief forget, /brief reset.

Safeguards (from an independent review)

  • All read-modify-write of stored notes runs through one queue, so a slow fold cannot overwrite a newer edit or dismissal; a turn that ends mid-fold is queued, not dropped.
  • South African IDs and phones, emails, cards, bank accounts and passports are redacted before anything is stored or sent to Haiku (signals, /brief text, current notes, and fold results). Names and non-South-African formats are not detected; the docs say so.
  • Only prompts typed in the composer or bridge are learned from, never task notifications, schedules or peers; a continuation turn does not re-fold an old prompt.
  • Per-kind quotas so skipped suggestions never crowd out the user's own words; the correction classifier is word-bounded and ignores long pasted text.
  • Chat history is kept until a real brief exists; echoed placeholders in a fold reply never count as content.

Verification

  • claude plugin validate token-ledger passes; claude plugin test token-ledger: 167 pass, 0 fail (was 62).
  • Engine-level tests cover the whole loop: fold, ? reading memory, /brief, races with a fold in flight, redaction, origin filtering.

Known limits

  • A manual /brief brief edit can be rewritten by a later fold.
  • Not type-checked with tsc (not installed locally); the engine validator passes.

Version bumped to 0.6.0; README, CHANGELOG and marketplace blurb updated.

🤖 Generated with Claude Code

A small Haiku call after each prompt a person types folds the exchange into
a per-project brief and a profile of the user. Corrections, frustration and
which suggestions were inserted or skipped are logged as feedback. The ?
prompt now leads with that memory and only the latest messages, and no
longer assumes the user is a developer.

/brief shows what the mod believes and lets the user fix it.

Safeguards: all writes go through one queue so a slow fold cannot undo a
newer edit; names, IDs, phones, emails and cards are redacted before
storing or sending; only composer and bridge prompts are learned from;
skipped suggestions have a small quota so they never crowd out the user's
own words; chat history is kept until a real brief exists.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T04:39:07.660172Z d8522e3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…validates

2.1.295 follows $ only inside the file that receives it, never across an
import. memoryEngine.ts now takes a small set of ports (store, clock,
session root, model, pane) that register.tsx builds, each spelling its
engine call out. Behaviour is unchanged; 167 tests pass and validate
passes on both 2.1.295 and 2.1.299.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8522e3dcf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread token-ledger/hooks/lib/memory.ts
Comment thread token-ledger/hooks/lib/memory.ts Outdated
Comment thread token-ledger/hooks/memoryEngine.ts
…, no dropped folds, honest privacy scope)

- projectKey lowercases only Windows-style paths, so /work/Acme and
  /work/acme no longer share a brief on case-sensitive filesystems.
- A turn that ends while the fold queue is full is merged into the newest
  waiting exchange (keeping the newest words) instead of being dropped.
- The privacy claim now says exactly what is redacted: South African IDs
  and phones, emails, cards, bank accounts and passports. Names and
  non-South-African formats are not detected; README and CHANGELOG say so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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