Skip to content

feat: proactive enrichment-recall subsystem (the "🧠 Help me remember" loop)#179

Open
jordanrburger wants to merge 2 commits into
mainfrom
feat/enrichment-recall-subsystem
Open

feat: proactive enrichment-recall subsystem (the "🧠 Help me remember" loop)#179
jordanrburger wants to merge 2 commits into
mainfrom
feat/enrichment-recall-subsystem

Conversation

@jordanrburger

Copy link
Copy Markdown
Collaborator

Implements the design spec merged in #150 (docs/superpowers/specs/2026-06-21-enrichment-recall-subsystem-design.md) β€” the pull-capture half of the feedback loop. At the end of a dreaming run the system appends a small ranked set of "🧠 Help me remember …" questions to its wrap DM, asking about facts no connector can see (in-person events, decisions, head-knowledge), and later feeds the answers back into the KB.

What's here (matches the spec's 4-part plan)

  1. Generator β†’ templates/scripts/generate-enrichment-questions.py, wired into _CAT1_FILES_FROM_PLUGIN exactly like recurring-task-status.py (raw .py, copied verbatim, no template rendering). A pure-stdlib, read-only KB scanner that ranks connector-blind candidates (rank 0 explicit [needs:] flags β†’ rank 4 thin stubs), with one-run --exclude rotation and a persistent --reject-file stoplist.
  2. State seeds (install-only, never clobbered on upgrade) β†’ scripts/enrichment-stoplist.txt + knowledge-base/enrichment-qa-log.md, added to _INSTALL_ONLY_TEMPLATES. Shipped as empty headers.
  3. Recall section β†’ phases/modes/feedback-processing.md (dreaming-scoped): generate β†’ quality-gate β†’ compose the "🧠 Help me remember" block β†’ record dismissals to the stoplist and rounds to the Q&A log. New Step 1f; old commit step renumbered to 1g.
  4. Tests β†’ engine/tests/unit/test_enrichment_questions.py.

De-personalization (this is the public engine)

The generator was ported from a running instance and scrubbed: stripped dated user-feedback quotes, real names, employer references, and Pattern #NN citations; genericized the argparse/header string literals.

⚠️ Please scrutinize the regex generalization (the spec called this out as the subtlest change): the connector-answerable guard RESEARCH_ANSWERABLE previously hardcoded the employer name in an alternation (…|<employer> customer|…) plus product-specific jargon. It's now employer-agnostic (customer status, account id, crm record, deal stage, renewal date, attribution phrasing, named-non-user-person phrasing, connector/profile identity facts) β€” aiming to keep the connector-answerable-vs-head-fact discrimination without baking in any org/product vocabulary. A scrub check confirms no leaked identifiers.

Verification

  • 883 passed (full engine unit suite) β€” incl. bootstrap install/upgrade wiring.
  • ruff check clean on the new/changed files.
  • New tests cover: ranking/dedupe, persistent stoplist, --exclude rotation, the guards (research-answerable dropped, projects/ + ontology/entities/ scoped out, resolved gaps skipped), the read-only contract (asserts the KB is byte-identical after a run), bootstrap wiring, and assembly scoping (recall lands in DREAMING, not SKILL/RESEARCH).

Open questions carried from the spec

  • The engine has no dedicated dreaming notification-composition phase; the recall attaches to feedback-processing.md (the closest existing home). A future consolidation would be a cleaner home β€” out of scope here.
  • enrichment-qa-log.md growth is unbounded today; a retention policy is a possible follow-up.

πŸ€– Generated with Claude Code

Jordan Burger and others added 2 commits July 1, 2026 07:23
… loop)

Implements the spec merged in #150
(docs/superpowers/specs/2026-06-21-enrichment-recall-subsystem-design.md):
the pull-capture half of the feedback loop, where a dreaming run proactively
asks the user a small ranked set of questions about facts no connector can see,
and feeds the answers back into the KB.

- Port + de-personalize the generator β†’ templates/scripts/generate-enrichment-questions.py
  (cat-1, copied verbatim like recurring-task-status.py). Read-only KB scanner
  that ranks connector-blind candidate questions (rank 0 [needs:] flags β†’ rank 4
  thin stubs), with one-run --exclude rotation and a persistent --reject-file
  stoplist. De-personalization: stripped dated feedback quotes, real names,
  Pattern #NN citations, and generalized the connector-answerable regex guard off
  the employer-specific alternation to employer-agnostic phrasing (the subtlest
  change β€” flagged for review).
- Seed vault-owned state install-only so upgrades never clobber accumulated
  history: scripts/enrichment-stoplist.txt + knowledge-base/enrichment-qa-log.md.
- Add the recall section to phases/modes/feedback-processing.md (dreaming-scoped):
  generate β†’ quality-gate β†’ compose the "🧠 Help me remember" block β†’ record
  dismissals to the stoplist and rounds to the Q&A log.
- Tests: generator ranking/dedupe/stoplist/rotation, the guards (research-
  answerable dropped, excluded dirs scoped out, resolved gaps skipped), the
  read-only contract, bootstrap wiring, and assembly scoping (recall lands in
  DREAMING, not SKILL/RESEARCH).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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