Skip to content

Research: Tiered memory implementation plan (#595 #600) #686

Closed

Description

@tamirdresher

Research for #595 and #600. Audited existing codebase patterns.

Existing patterns found:

  • tiered-memory skill template at packages/squad-sdk/templates/skills/tiered-memory/SKILL.md (hot/cold/wiki tiers defined)
  • history-shadow.ts: append-only markdown history with sections + timestamps
  • nap.ts: 15KB compaction threshold, archives to history-archive.md, keeps last 5 entries
  • agent-source.ts: reads history.md at agent load time
  • history-split.ts: portable vs private history splitting
  • squad_memory tool: write-only (no read tool exists)

Minimal implementation plan:

  1. Add readRecentHistory(teamRoot, agentName, limit=5) to history-shadow.ts
  2. Spawn prompts include only hot content (last 5 entries + core context)
  3. Cold tier = history-archive.md (already exists via nap.ts compaction)
  4. Add squad_history_read tool for on-demand cold/full access
  5. Wiki tier deferred (needs StorageProvider from feat(sdk): StorageProvider abstraction — complete migration + example providers #640)

Key finding: The tiered-memory SKILL.md already defines the 3-tier model. nap.ts already does hot/cold splitting. The gap is: spawn prompts load ALL history instead of just recent, and there is no read tool for agents to pull archive on demand.

Refs #595 #600

Activity

  1. added
    squadSquad triage inbox — Lead will assign to a member
    type:spikeResearch/investigation — produces a plan, not code
    on Mar 29, 2026
  2. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    📋 Assigned to Procedures (Prompt Engineer)

    Issue: #686 — Research: Tiered memory implementation plan (#595 #600)

    Procedures will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    Procedures, work on issue #686

  3. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #686 — Research: Tiered memory implementation plan (#595 #600)
    Assigned to: Flight (Lead)
    Reason: No specific domain match — assigned to Lead for further analysis

    @copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  4. diberry commented on Mar 31, 2026

    @diberry
    Contributor

    🔄 Ralph status: Research complete — implementation plan documented for #595 and #600. Minimal plan: readRecentHistory + spawn prompt change + cold tier already exists. Wiki deferred. No implementation PR yet.

  5. bradygaster commented on Aug 3, 2026

    @bradygaster
    Collaborator

    Research spike complete. The investigation documented in this issue has been captured in the implementation plan for runtime integration. Ongoing runtime implementation work is tracked by #595 and #600. Closing this spike as completed — no runtime code shipped as part of this spike.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membertriagedIssue has been triagedtype:spikeResearch/investigation — produces a plan, not codewave:3-laterWave 3 — backlog, future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions