Skip to content

feat: Coordinator pre-spawn decision filtering #27

@diberry

Description

@diberry

Problem

Every agent reads the ENTIRE decisions.md at spawn time (~86K tokens for this repo at 345KB). The lifecycle spawn API already accepts decisions?: string but nobody populates it. This is the single highest-ROI fix for the decisions bloat problem.

From

Flight, EECOM, Procedures reviews of #20. Identified as highest-value architectural change.

Proposed

  1. Add filterDecisionsForAgent(decisions, agentDomain) function in SDK
  2. Coordinator reads decisions.md once at session start
  3. Before each spawn, coordinator filters to only relevant decisions (by domain tag or recency)
  4. Passes filtered string via existing decisions param on lifecycle API
  5. Token consumption drops from ~86K to ~2K per spawn

Dependencies

Impact

Reduces per-agent spawn context by ~95% without deleting any data.

Owner

EECOM (Core Dev) + Procedures (Prompt Engineer)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgo:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:fidoAssigned to FIDO (Quality Owner)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions