Skip to content

docs: agent on-disk anatomy concept#435

Closed
diberry wants to merge 5 commits intobradygaster:devfrom
diberry:squad/agent-on-disk-concept
Closed

docs: agent on-disk anatomy concept#435
diberry wants to merge 5 commits intobradygaster:devfrom
diberry:squad/agent-on-disk-concept

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Mar 16, 2026

Summary

Developer-oriented concept doc explaining what it means on disk to be a Squad agent.

What's Covered

  • Directory structure — .squad/agents/{name}/ layout
  • charter.md — agent DNA, who writes it, who reads it, what it contains
  • history.md — append-only learnings, what goes in, what doesn't
  • Casting system — registry.json, policy.json, history.json, name allocation
  • SDK relationship — how .squad/ runtime state maps to packages/squad-sdk/src/ code
  • Agent lifecycle — how an agent exists (charter + roster + routing)
  • Alumni pattern — what happens when an agent retires
  • Context propagation — how agents share knowledge via team.md, routing.md, decisions.md

Format

  • Developer-focused (not end-user)
  • Real examples from the repo
  • Code blocks for file structures
  • Under 2000 words
  • Follows team conventions (and not ampersands)

Context

Requested by Brady via Dina. Brady wanted a short doc explaining the on-disk anatomy of a Squad agent — this should help developers understand exactly what files exist, what they contain, and how they relate.


Working as: Flight (Lead)
Requested by: Dina (Brady asked for this)

Copilot AI added 3 commits March 16, 2026 10:37
Developer-oriented guide explaining:
- Directory structure (.squad/agents/{name}/)
- charter.md format and parsing
- history.md append-only learnings
- Casting system (registry, policy, history)
- Relationship between .squad/ runtime and SDK source
- How an agent 'exists' (charter + roster + routing)
- Alumni pattern for retired agents
- Cross-agent context propagation

Requested by Brady via Dina. Addresses the question: 'What does it mean
on disk to be a Squad agent?'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds comprehensive extensibility guide at docs/guide/extensibility.md to help Squad users determine WHERE their change idea belongs (Core, Extension, or Team Config).

Key sections:
- Three-layer extensibility model
- Decision tree flowchart (text-based)
- Examples for each layer
- The Claire test (RFC bradygaster#328 as worked example)
- When to escalate to core
- How to build a plugin

Addresses common confusion about what belongs in Squad core vs plugins vs team configuration.

Updates test assertions in docs-build.test.ts for new guide page.

Related: bradygaster#328

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 16, 2026

EECOM Review — ✅ Approve with Notes

Excellent developer-focused concept doc. The distributed identity model is clearly explained (runtime state, SDK infrastructure, config overrides). Charter-as-DNA metaphor works well. Alumni pattern and casting system are well-documented.

Technical accuracy: Solid. Charter compiler flow is correct, history shadow feature properly described, SDK boundaries are accurate.

Scope assessment: 394 lines is substantial for a concept doc. Brady prefers small, strategic docs — this is on the larger end but justified given it's a foundational concept that developers will reference repeatedly. The structure and examples make it scannable.

Minor: Some sections could be tightened (e.g., "Key Takeaways" could be a bulleted summary rather than prose), but overall the length serves the complexity of the topic. Recommend merge.

- Trim verbose explanations, redundant examples, over-explained sections
- Add Human Team Members section (👤 badge, no charter, not spawnable)
- Add @copilot Coding Agent section (🤖 badge, capability profile, copilot-instructions.md)
- Keep essential anatomy: charter, history, casting, SDK relationship
- Target: strategic, small docs per Brady's preference

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 16, 2026

Rewrite complete — agent-on-disk.md compressed and enhanced.

Changes:

  • Trimmed: 298 lines → 152 lines (~49% reduction)
  • Added: Human Team Members (👤) — Short section (~13 lines) covering:
    • No charter/history
    • Not spawnable (coordinator presents work, waits for input)
    • Participate in routing and reviews
  • Added: @copilot Coding Agent (🤖) — Short section (~12 lines) covering:
    • No charter (uses copilot-instructions.md)
    • Not spawnable (works via issue assignment)
    • Creates copilot/* branches, opens draft PRs
    • Capability profile (🟢/🟡/🔴) in team.md

What was cut:

  • Verbose who-writes-it/who-reads-it sections
  • Redundant code examples
  • Over-explained flows (kept the essentials)

Doc now hits Brady's preference for small, strategic docs while covering the full roster spectrum (AI agents, humans, @copilot).

—Flight

@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 16, 2026

✅ APPROVE — Doc rewrite is technically sound and meets Brady's small+strategic preference.

Key findings:

  • 298→152 line compression well-executed
  • Charter, history, casting, SDK relationship all accurate
  • Human members section conceptually sound
  • @copilot section accurate (capability profile, copilot-instructions.md, issue-driven)
  • No ampersands (meets style preference)

Minor: Line 13 typo 'spawnables agents' should be 'spawnable agents'. Consider it optional.

Ship it.

@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 16, 2026

Closing — content pulled to local for reclassification. Agent-on-disk concept doc (with human member and @copilot sections) preserved at ../pr-435-agent-on-disk/ for future use as extension or re-submission.

@diberry diberry closed this Mar 16, 2026
andikrueger pushed a commit to andikrueger/squad that referenced this pull request Mar 16, 2026
* chore(squad): Phase 2 launch — thinking feedback, P0 bugs, dual telemetry

Phase 1 complete: 5 issues closed (bradygaster#325, bradygaster#326, bradygaster#327, bradygaster#328, bradygaster#329), 5 PRs merged.
Phase 2 launched with Cheritto (thinking feedback), Hockney (P0 bugs), Saul (dual telemetry).
Decision inbox merged and archived.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): Phase 2 Wave 1 merged, Wave 2 launched

Session: 2026-02-23T2145-phase2-wave2
Phase 2 Wave 1 complete (PRs bradygaster#351, bradygaster#352, bradygaster#353 merged).
Wave 2 launched: Cheritto on ghost response detection (bradygaster#332), Hockney on error hardening (bradygaster#334).

Changes:
- Session log created: 2026-02-23T2145-phase2-wave2.md
- Merged 3 inbox decisions (Cheritto, Hockney, Saul)
- Deleted inbox files post-merge

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): Epic bradygaster#323 complete — all phases shipped 🎉

All 3 phases delivered:
- Phase 1 (Testing Wave): 6 issues closed
- Phase 2 (Improvement): 6 issues closed
- Phase 3 (Breathtaking): 7 issues closed
- 17 PRs merged, 19 issues closed total

Session log: 2026-02-23T2320-epic-complete.md
Decisions merged from inbox: P2 UX Polish, first-run wow moment

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* hostile QA: end-to-end quality assessment — 10 findings, 4 HIGH severity

Candid assessment requested by Brady. Traced every code path in cli-entry.ts,
shell/index.ts, shell/commands.ts, App.tsx, coordinator.ts, spawn.ts, and the
SDK adapter client.

Key findings:
- Dead sessions never evicted from agentSessions Map after connection drop
- No React ErrorBoundary — any render throw kills the shell
- Nasty-inputs corpus (95 strings) is never imported by any test
- No SIGTERM handler in interactive shell
- MemoryManager exported but never instantiated (dead code)
- Single streaming content slot clobbers multi-agent output
- User input silently dropped during processing (no type-ahead buffer)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): quality review findings — 7 issues filed

Quality audit complete: 5 agents assessed CLI across testing, coverage, stability, accessibility, UX.
Results: 4 P0 blockers (bradygaster#365bradygaster#368), 3 P1 items (bradygaster#369bradygaster#371).
Blocking: Waingro dead sessions, ErrorBoundary, dropped input; Marquez help text consistency.

Changes:
- Logged session summary to .squad/log/2026-02-24T0205-quality-review-complete.md
- Updated .squad/identity/now.md with quality review findings and new issue numbers

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): merge decision — Marquez UX audit findings

Quality assessment merged from inbox (Grade B): 11 improvements (3 P0, 4 P1, 4 P2). help text, stub commands, vocabulary, separators, roster.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): test sprint launch

Session: 2026-02-24T0210-test-sprint
Changes:
- Logged test sprint: 5 agents, 7+ issues
- Branches: P0 fixes, stale tests, E2E, hostile/SDK, A11y

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix bradygaster#427: Add immediate shell launch indicator

Adds 'Loading Squad shell...' message at start of runShell() to eliminate
2-4 second launch dead air. Message clears once Ink mounts.

Users now see feedback within 100ms instead of staring at blank terminal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants