Skip to content

[Feature] Self-aware context agent — agents consult each other, not the user, for technical context #22

Description

@davesleal

Problem

When the agent lacks technical details (Firestore collection names, table schemas, file structure), it asks the USER instead of going to find the answer itself. This creates a dead-end experience — the user has to hand-feed information that exists in the codebase.

Expected behavior

The agent should:

  1. Check the Token Cart handoff and registry first
  2. If not found, dispatch a quick run: sub-task to read the relevant files
  3. If still unclear, ask the architect consultant for structural guidance
  4. Only ask the USER for decisions (which direction, which priority) — never for facts that exist in code

Example

Bad: "What Firestore collection names are you using?"
Good: Agent reads src/services/socialService.ts via a sub-task, finds the collection names, then presents the migration plan.

Implementation

  • Add a "self-research" capability: when the agent identifies a gap in its context, it auto-dispatches a lightweight run: command to read specific files
  • The Token Cart pre-call should detect when the response is asking the user for technical facts and flag it
  • The system prompt should explicitly say: "Never ask the user for information that exists in the codebase. Find it yourself or suggest a run: command."

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions