ADR: Squad memory and state model (API boundary, history.md, archive policy, Scribe)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 20/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- github, typescript
- Domaine
- developer-experience, tooling
Piste de recherche
Start with the proposed order and the listed validation tests; the issue names templates/after-agent-reference.md, packages/squad-sdk/src/client/adapters/coordinator.ts, templates/spawn-reference.md, and squad.agent.md as surfaces for D5. Read the charter and the existing tests first. Done means the five decisions are implemented in sequence, each validation passes, and bug-fix tests are shown failing against the pre-fix state.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Purpose
One decision record for Squad's memory and state model, replacing five overlapping issues (#1243, #1268, #1269, #1270, #2321) and absorbing the hot/cold requirement from closed #600. Prior consolidation notes on #1268 and #1243 already named #1270 as canonical; this issue makes that explicit and puts the open decisions in one place. Nothing here is committed work.
The decisions that need an owner
D1: API boundary (from #1270). Today squad_state_* (raw file ops) and memory.* (classified, audited, indexed) are parallel, not layered, over the same StorageProvider. Options: (a) layer squad_state_* under memory.* so governance runs by default, with an explicit opt-out; (b) keep both, document when to use which; (c) retire memory.* governance. Proposed: (a), because every downstream gap below follows from governance running only at first write.
D2: history.md authority (from #1243). Options: (a) direct authored state, size-capped; (b) derived from governed memory; (c) class-aware bounded context with a hot (always loaded, recent plus active-issue entries) and cold (archive, on demand) split. Proposed: (c), which also carries #600's measured problem (history files of 34-74KB, 82-96% stale). The GitHub Wiki layer from #600 is cut.
D3: Archive policy (from #1269). Archival today is time-only (decisions.md at 20KB/50KB, history at 15KB) and ignores class and loadGuidance, so a POLICY entry can age out like a throwaway note. Proposed: archival must read class and loadGuidance; entries with loadGuidance: ALWAYS are never archived by age alone.
D4: Scribe lifecycle (from #1268). Scribe runs inbox merge, archival, summarization and cross-agent propagation through squad_state_*, so classification and audit never re-run. Proposed: decided after D1; Scribe operations emit audit records (promote, delete, write) once the boundary is layered.
D5: One Scribe definition (from #2321). Since #2030 the charter says Scribe only merges accepted decisions, but templates/after-agent-reference.md, the host digest in packages/squad-sdk/src/client/adapters/coordinator.ts, the decision-hygiene watch capability, templates/spawn-reference.md, squad.agent.md and five docs pages still describe the older broad job, and the original issue also reports an install problem. Proposed: the charter is the single source; every other surface either links to it or is corrected. This is independent of D1-D4 and can ship first.
Proposed order
- D5 (pure consistency, no design risk).
- D1 (unblocks the rest).
- D3 and D2 (can proceed in parallel once D1 lands).
- D4 last.
Validation (every phase testable)
| Decision | Test that proves it |
|---|---|
| D5 | A test that scans shipped templates, host digest and docs for the retired Scribe duties and fails on any match; it must fail on the pre-fix tree. |
| D1 | Contract test: a squad_state_write to a governed path produces a classification and an audit row; the opt-out path produces neither and is explicit. |
| D3 | Fixture with a 60-day-old POLICY entry and a 60-day-old LOCAL note over the size threshold: only the LOCAL note is archived. Fails on current behavior. |
| D2 | Spawn-context test: hot layer only is loaded by default; token count at spawn compared against the baseline in #600 for the same agents. |
| D4 | Each Scribe lifecycle step yields an audit record with provenance. |
Each bug-fix style test must be shown red against the pre-fix state before merge.
Out of scope
Backend-specific failures (orphan or two-layer backends, #2229, #2231, #2320, #2378) are tracked separately and are bug work, not part of this decision.
Closed in favor of this issue
#1243, #1268, #1269, #1270, #2321, and earlier #600.
- Langage dominant
- TypeScript
- Étoiles
- 3.4k
- Forks
- 516
- Merge moyen
- 1 j 15 h
- PR mergées (30 j)
- 116
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/squad
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de github/squad
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
vercel-labs/ui#809 ·
Les mainteneurs répondent en général sous 1 jour
-
bot:ai-assisted component:platform-js status:untriaged
Difficulté 1/5 Moins d'une heure Accessibilité débutants 74/100
midnightntwrk/platform-js#38 ·
-
[bug] Second false positive on high-cost plugin alert: detection only compares patch entry id, community plugin dsh-auto | [bug] 高成本插件告警第二次误报:检测只比对 patch 条目 id,社区插件 dsh-auto-review 被认成 @deepseek-ai/dsh-experimental-auto-reviewPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ranxianglei/billion-context#7068 ·
Les mainteneurs répondent en général sous 1 jour
-
vendor: bump whisper.cpp past 6a8addd — the current pin aborts the app on a failed Metal initOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
mybigday/whisper.rn#348 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
six-group/six-webcomponents#600 ·