Skip to content

Retrieval instinct: make harnesses actually check Tenjin before regenerating #21

Description

@vraspar

The marketplace's bottleneck is the retrieval reflex, not storage: agents rarely think to look up existing knowledge before regenerating it, so even a well-stocked catalog goes unqueried. The bundled tenjin-search skill has a deliberately narrow trigger and fires rarely on its own.

Directions worth researching and prototyping, roughly in order of expected power:

  1. Ambient injection, the way claude-mem builds instinct: hooks that put a short reminder into the session context rather than hoping the model recalls a skill. tenjin install could offer to register a harness hook (Claude Code supports SessionStart and pre-tool hooks; Codex has AGENTS.md) injecting one line like "check Tenjin before regenerating external knowledge; N candidates parked". Since lookups are free and anonymous, a bolder variant runs a lookup on research-shaped prompts and injects only HITs, but query text must stay generalized public text, so a reminder-only hook is the safe first step.
  2. Skill-trigger tuning: the description text is what makes a harness reach for the skill. Measure missed-lookup moments by replaying representative sessions, then widen the trigger without inviting slop invocations.
  3. Feedback that builds the human's instinct: a periodic "Tenjin saved you ~$X" line, since the human's prompting habits transfer to the agent.

Constraint: hits have to exist for any instinct to survive. Until the catalog carries answer cards (see tenjin#445), every lookup returns MISS and reinforces the wrong lesson, so sequence accordingly.

Deliverable: a short design doc plus a prototype PR for whichever mechanism the research supports best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions