Skip to content

Feature: Knowledge library — persistent team-wide storage for research and analysis #413

Closed as not planned

Description

@diberry

Problem statement

Squad has four storage tiers: history.md (personal, compacted), decisions.md (team, choices only), skills/ (team, structured patterns), and wisdom.md (team, manual curation). Each serves a specific purpose and has constraints that preserve its focus.

When agents produce substantial work products — architecture redesigns, research reports, competitive analyses, deep audits — those documents get lost over time. A 10KB architecture analysis gets compacted to 3 sentences in history.md. A multi-session research effort vanishes when the session ends. Product docs get rewritten as the product evolves, erasing the original rationale. The team lacks long-term storage for substantial knowledge artifacts that survive compaction, session endings, and documentation rewrites.

Community member @sturlath identified the same pain in #370: "distributed knowledge that is hard to consolidate and read." That issue requests ADRs (architecture decision records) — a valuable use case, but part of a broader need for persistent team-wide knowledge storage.

Proposed solution

Add a .squad/knowledge/ directory as long-term storage for substantial team documents:

  • Preserves large work products — research reports, architecture proposals, deep audits, and contextual analysis that would otherwise be lost to compaction or session death
  • File naming: {author}-{topic-slug}.md (e.g., pao-docs-architecture.md, flight-deployment-patterns.md)
  • Never compacted — deprecated rather than deleted (prepend [DEPRECATED YYYY-MM-DD] if obsolete)
  • Not a dumping ground — minimum ~2KB threshold; small notes belong in history.md or session artifacts
  • Brownfield-aware — agents discover where the repo already keeps its documentation and operate there for short-term content; .squad/knowledge/ is only for substantial documents that don't fit anywhere existing
  • Cold storage, not active memory — files are not loaded at spawn time; agents access them when needed

Relationship to existing features

Key design decisions

  • Long-term storage, not active documentation — product docs, guides, and references belong in the repo's existing docs location; knowledge library is for preserving substantial research and analysis
  • Framework convention — provides where/how to store knowledge, not what to store
  • Opt-in — empty directory unless team uses it; no forced workflows
  • Trust-based — no quality gates on initial write (add later if needed)
  • Discovery before creation — agents must discover where the repo already keeps documentation and check existing knowledge sources before writing to avoid duplication
  • Substantial work only — research reports, architecture proposals, deep audits, competitive analyses; not small notes or status updates

References

This proposal generalizes the ADR concept requested in #370 into a broader knowledge library that can store ADRs, research findings, analysis, and contextual knowledge. Full proposal: knowledge-library-proposal.md in the project-squad working directory.

Activity

  1. diberry commented on Mar 15, 2026

    @diberry
    ContributorAuthor

    @bradygaster Knowledge Library proposal is ready for your review — covers long-term persistence for analysis, research, and architecture work that agents produce. See the full proposal in the issue description. — squad obo dina

  2. bradygaster commented on Mar 16, 2026

    @bradygaster
    Collaborator

    If we can prove this won't cause context bloat in the day-to-day usage I'm cool with it. Basically a knowledge base the Squad could pull from when they need deeper knowledge. Part of me feels like that's GitHub (or "git provider") issues but files-on-disk is fine as well. No objections if we can have the Squad demonstrate/prove it won't negatively impact usability or accuracy.

  3. diberry commented on Mar 16, 2026

    @diberry
    ContributorAuthor

    Context Bloat Analysis — Knowledge Library

    @bradygaster Your concern is valid. Here's what the team found after analyzing the spawn pipeline:

    Current State

    Squad already loads ~360 KB per agent spawn (charter ~2 KB, history ~24 KB, decisions ~333 KB, skills variable). That's 45-70% of available context budget before any work begins.

    The Risk (if done wrong)

    Naive loading of knowledge files at spawn would hit catastrophic failure at ~25 files (50 KB). By 80 files, agents would fail on large PRs. By 150 files, the system would be unusable. Silent degradation — the nightmare scenario.

    Recommended: Pure On-Demand Loading (Zero Spawn Impact)

    How it works:

    • Knowledge files are NEVER loaded at spawn time
    • Agents explicitly request files when needed via a read_knowledge tool/skill
    • Coordinator hints at relevant topics in the spawn prompt (metadata only, not content)

    Context budget:

    • At spawn: +0 KB (unchanged from today)
    • When requested: +2-10 KB per file (only what agent asks for)
    • Scales to 1000+ files with zero spawn degradation

    One-liner proof: "If no agent ever requests knowledge, the system behaves identically to today."

    On Your GitHub Issues Idea

    Hybrid approach works: files as source of truth (fast, offline, version-controlled), optional squad knowledge publish to sync to Issues for web discoverability. Best of both worlds.

    Proposed Demo (Hard Numbers, Not Promises)

    1. Baseline: measure spawn time and context for 10 spawns
    2. Add 50 knowledge files — re-measure (should be identical)
    3. Add 150 knowledge files — re-measure (still identical)
    4. Show on-demand access works: agent requests file, gets it, applies it

    We're building a PR with the implementation and metrics tests so you can verify yourself. Will link it here when ready.

    — squad obo dina

  4. diberry commented on Mar 16, 2026

    @diberry
    ContributorAuthor

    Related: PR #436 adds the extensibility guide which covers how features like the knowledge library should be built as extensions (Layer 2) rather than Squad core. The building extensions guide in the same PR provides the practical tutorial for authoring extensions.

  5. github-actions commented on Mar 18, 2026

    @github-actions
    Contributor

    📋 Assigned to Flight (Lead)

    Issue: #413 — Feature: Knowledge library — persistent team-wide storage for research and analysis

    Flight 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:
    Flight, work on issue #413

  6. github-actions commented on Mar 18, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #413 — Feature: Knowledge library — persistent team-wide storage for research and analysis
    Assigned to: DSKY (TUI Engineer)
    Reason: Issue relates to frontend/UI work

    @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.

  7. diberry commented on Mar 23, 2026

    @diberry
    ContributorAuthor

    Closing — not a Squad product addition

    This feature (persistent team-wide knowledge storage) isn't an addition to Squad the product. If a user needs knowledge library functionality, it would be built as a user-specific extension — a Squad skill, plugin, or standalone tool tailored to their workflow — not baked into the core framework.

    Squad's philosophy is to keep the core lean and let specific capabilities emerge from user needs via the extensibility surface (skills, plugins, MCP integrations).

    squad obo dina

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions