Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions docs/advanced-squad-session/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Advanced Squad Session — 500-Level Engineering Deck

This package is a self-contained Build-style technical presentation for the advanced Squad session. The narrative is problem-first and evidence-led: context pressure, memory governance, two-layer state backend mechanics, prompt/context slimming, presets, cross-squad contracts, and squads spawning squads.

## Scope

The deck focuses on the requested advanced themes:

- Context budget pressure, using issue #1037 and Tamir's agent-memory blog as the opening problem.
- Squad memory layers: decisions, inbox, histories, skills, governed memory, git notes, and orphan state.
- Governed memory model from PR #1145: classes, load guidance, provider boundaries, CLI proof, and audit trail.
- Real two-layer backend proof from a throwaway demo repo: `squad-state`, git notes, promotion, archive, and logs.
- Context-size reductions beyond memory, including split/lazy coordinator references from #1036 and PR #1035.
- Presets as reusable squad-definition patterns.
- Cross-squad communication: manifests, `squad discover`, `squad delegate`, and issue-based handoff.
- Squads spawning squads, based on Tamir's fanout/Holodeck posts and PR #1022's E2E template-testing skill.

## Files

| File | Use |
| --- | --- |
| `advanced-squad-session.pptx` | PowerPoint version generated as full-slide images from `deck.html`. |
| `build_advanced_squad_native_pptx.py` | **Source of truth for the .pptx.** Builds the 64-slide deck via `python-pptx`. Run `python build_advanced_squad_native_pptx.py` to regenerate. |
| `two-layer-walkthrough.md` | Reference walkthrough used by slides 26-28 — a real captured trace showing branch topology, timeline, and what landed where for one task. |
| `deck.html` | Browser-based source deck. Edit this first. |
| `speaker-notes.md` | Technical presenter script, slide-by-slide notes, demo cues, caveats. |
Comment on lines +22 to +26
| `memory-tools-guide.md` | Detailed guide for proving memory tool calls and local governed memory effects. |
| `prompts/` | Copy/paste prompts for live demos, including the 500-level runbook prompt. |
| `outputs/` | Captured evidence, technical source map, runbook, and fallback artifacts. |
| `outputs/effects/` | Portable copies of memory effect files so the deck works even when `.squad/` is ignored. |
| `demo-root/.squad/` | Throwaway local memory state generated by the memory demo when regenerated locally. |

## Presenting

PowerPoint:

```powershell
Start-Process .\docs\advanced-squad-session\advanced-squad-session.pptx
```

Browser deck:

```powershell
Start-Process .\docs\advanced-squad-session\deck.html
```

Navigation:

- Right arrow / Space: next slide
- Left arrow: previous slide
- `P`: print mode

## Demo prompts and fallback evidence

| Section | Prompt | Fallback evidence |
| --- | --- | --- |
| Orchestration/runtime | `prompts/01-team-orchestration.md` | `outputs/orchestration-transcript.txt` |
| Worktree isolation | `prompts/02-worktree-isolation.md` | `outputs/git-worktree-list.txt`, `outputs/worktree-status.txt` |
| Skill-guided review | `prompts/03-skill-guided-review.md` | Skill files under `.copilot/skills/` and `.squad/skills/` |
| Governed memory | `prompts/04-memory-cli-proof.md` | `outputs/01-*` through `outputs/05-*`, plus `outputs/effects/` |
| Copilot memory tool | `prompts/05-copilot-memory-tool.md` | `outputs/21-real-memory-session-extract.md` and deterministic local CLI proof |
| Context budget problem | Source-backed opening | `outputs/15-context-budget-issue-1037.md` |
| Two-layer backend proof | Real throwaway repo demo | `outputs/12-two-layer-real-demo-transcript.txt`, `outputs/13-two-layer-real-demo-branch-proof.txt`, `outputs/14-two-layer-real-demo-commands.md` |
| Context slimming | Split coordinator prompt | `outputs/16-split-agent-issue-1036.md`, `outputs/19-context-slimming-pr-1035.md` |
| Delegate and presets | `prompts/06-delegate-presets.md` | `outputs/06-delegate-presets-evidence.txt` |
| Spawning/mesh | `prompts/07-spawn-more-squads.md` | `outputs/07-spawn-and-mesh-evidence.txt`, `outputs/20-fanout-squads-pr-1022.md` |
| Cross-squad communication | `prompts/08-cross-squad-communication.md` | `outputs/07-spawn-and-mesh-evidence.txt` |
| State backends | `prompts/09-state-backends-memory.md` | `outputs/08-state-backends-evidence.txt` |
| 500-level runbook | `prompts/10-500-level-runbook.md` | `outputs/09-engineering-source-map.txt`, `outputs/10-demo-runbook.txt` |
| Architecture evidence | Source-backed architecture story | `outputs/11-architecture-evidence-map.txt` |

## Regenerating memory evidence

From the repository root, build the local CLI first:

```powershell
$env:SKIP_BUILD_BUMP='1'
npm run build -w packages/squad-sdk
npm run build -w packages/squad-cli
```

Then run the commands in `prompts/04-memory-cli-proof.md` from `docs/advanced-squad-session/demo-root`. Checked-in output files are sanitized to replace local absolute paths with `<demo-root>` and `<repo>`.

## Regenerating PowerPoint

`advanced-squad-session.pptx` is regenerated by rendering each slide in `deck.html` at 1280x720 with Playwright and inserting the images into PowerPoint with `python-pptx`. Run generation from this worktree so `node_modules` and workspace paths resolve.

Validation target:

- `deck.html` script parses.
- Browser DOM reports the expected `.slide` count (`23` for this deck).
- PPTX opens as a valid zip package and contains the same number of slides as `deck.html`.
Comment on lines +86 to +92
Binary file not shown.
Loading
Loading