Repository navigation
docs: clarify that .squad/casting/* files are identity, not two-layer state - #1230
Conversation
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | 0 active Copilot thread(s) resolved (5 outdated skipped) |
| ❌ | CI passing | 7 check(s) still running |
Files Changed (4 files, +24 −3)
| File | +/− |
|---|---|
.changeset/casting-identity-not-state.md |
+5 −0 |
.gitattributes |
+6 −0 |
.gitignore |
+5 −3 |
packages/squad-sdk/src/config/init.ts |
+8 −0 |
Total: +24 −3
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
bradygaster
left a comment
There was a problem hiding this comment.
I can't approve this as written: the new comments treat all of .squad/casting/* as authoritative identity committed to main, but .github/agents/squad.agent.md classifies .squad/casting/history.json as Derived / append-only mutable state while only policy.json and registry.json are authoritative. Please narrow the wording or call out history.json as the exception.
bradygaster
left a comment
There was a problem hiding this comment.
✅ Flight approves. Minor nit on history.json classification noted in comments but non-blocking for this docs clarification PR. The directional message (casting = identity, not state) is correct and valuable.
… state .squad/casting/* files (policy.json, registry.json, history.json) are AUTHORITATIVE IDENTITY files that should be committed to 'main' alongside team.md and routing.md. They define the agent universe, name registry, and usage history - fundamental team identity, not runtime mutable state. This change adds clarifying documentation to: - .gitignore: explicit NOTE that casting/* MUST NOT be ignored - .gitattributes: explicit NOTE that casting/* is identity, not append-only - init.ts: enhanced comments explaining casting/* classification This resolves confusion where casting files were misclassified as two-layer runtime state. Per squad.agent.md (the source of truth), casting files are 'Authoritative' and belong on main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ef50336 to
9e404fa
Compare
9e404fa to
ef50336
Compare
🟡 Impact Analysis — PR #1230Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (3 files)
squad-sdk (1 file)
This report is generated automatically for every PR. See #733 for details. |
There was a problem hiding this comment.
Pull request overview
This PR updates documentation/comments to clarify how .squad/casting/* files should be treated (identity/config vs runtime mutable state), aiming to reduce confusion about whether these files belong in normal commits or in the squad-state backend.
Changes:
- Add notes in
.gitignoreto discourage ignoring.squad/casting/*. - Add notes in
.gitattributesexplaining why casting files are not included in union-merge rules. - Expand comments in
packages/squad-sdk/src/config/init.tsexplaining casting file classification relative to ignore/merge-driver behavior.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
packages/squad-sdk/src/config/init.ts |
Adds clarifying comments near .gitattributes/.gitignore scaffolding about casting vs runtime state. |
.gitignore |
Adds a repo-level note about not ignoring .squad/casting/*. |
.gitattributes |
Adds a note about casting files and union merge behavior. |
| // Append-only mutable state files use union merge to handle concurrent appends. | ||
| // Note: .squad/casting/* files are identity (not mutable) so they don't need | ||
| // union merge and are NOT listed here. |
| // Note: .squad/casting/* is AUTHORITATIVE IDENTITY (team-defined agent | ||
| // universe, persistent name registry, history). It belongs on 'main', not | ||
| // on the squad-state orphan branch. Do NOT add casting/* to ignoreEntries. |
| if (missingIgnore.length > 0) { | ||
| const block = (existingIgnore && !existingIgnore.endsWith('\n') ? '\n' : '') | ||
| + '# Squad: ignore runtime state (logs, inbox, sessions)\n' | ||
| + '# Note: .squad/casting/* is identity and MUST be committed to main, not ignored\n' |
| # NOTE: .squad/casting/* files are AUTHORITATIVE IDENTITY (team-defined agent | ||
| # universe/roles, persistent name registry, universe assignment history). | ||
| # They are committed to 'main' like team.md and routing.md, not to squad-state. | ||
| # They do NOT need union merge and are intentionally NOT listed above. |
| .squad/log/** merge=union | ||
| .squad/orchestration-log/** merge=union |
…arifications Policy Gates noticed the init.ts touch (pure comment additions clarifying that .squad/casting/* is identity, not mutable state) and asked for a changeset. Adding one — patch bump. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Problem
.squad/casting/* files (policy.json, registry.json, history.json) have been misclassified as two-layer runtime mutable state that should live on the squad-state orphan branch. This causes confusion and blocks the use of these critical team identity files.
Root Cause
The classification was unclear in the codebase. While .squad/casting/* files are correctly created and not ignored, there was no explicit documentation clarifying that they are AUTHORITATIVE IDENTITY files per squad.agent.md (the source-of-truth governance document).
Solution
Added clarifying documentation to three files:
Authority
Per .github/agents/squad.agent.md (the authoritative classification table):
These files define the agent universe, persistent name-to-ID mappings, and usage history - fundamental team identity committed to main alongside team.md and routing.md.
Files Changed