archival-integrity
Skill3.4k starsChanged 2 months agoMITView on GitHub
Preserve content when moving entries between tracked Squad state files
In this repository247 other files it gives its agents.
- .github/agents.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- packages/squad-cli/templates/copilot-instructions.mdCopilot instructions
- packages/squad-sdk/templates/copilot-instructions.mdCopilot instructions
- .squad-templates/copilot-instructions.mdCopilot instructions
- .squad/templates/copilot-instructions.mdCopilot instructions
- templates/copilot-instructions.mdCopilot instructions
- action-skill-contractsSkill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- architectural-reviewSkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- content-scopeSkill
- distributed-meshSkill
- documentation-maintenanceSkill
- github-multi-accountSkill
- git-workflowSkill
- history-hygieneSkill
- init-modeSkill
- model-selectionSkill
- pr-lifecycleSkill
- protected-filesSkill
- release-processSkill
- reskillSkill
- reviewer-protocolSkill
- secret-handlingSkill
- security-reviewSkill
- squad-conventionsSkill
- test-disciplineSkill
- windows-compatibilitySkill
- agentic-workflow-designerSkill
- gh-aw-reliabilitySkill
- iterative-retrievalSkill
- reflectSkill
- {skill-name}Skill
- agent-collaborationSkill
- agent-conductSkill
- architectural-proposalsSkill
- ci-validation-gatesSkill
- client-compatibilitySkill
- cli-wiringSkill
- coordinator-init-modeSkill
- coordinator-response-modeSkill
- coordinator-source-of-truthSkill
- cross-machine-coordinationSkill
- cross-squad-communicationSkill
- cross-squadSkill
- distributed-meshSkill
- docs-standardsSkill
- e2e-template-testingSkill
- economy-modeSkill
- error-recoverySkill
- external-commsSkill
- fact-checkingSkill
- gh-auth-isolationSkill
- gh-aw-enlistmentSkill
- github-multi-accountSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Use this skill for decision archival, history summarization, or any operation that moves entries between repository state files.
- Very specific: line 33
When inserting an inbox body beneath a ### entry, demote its shallowest heading to #### while preserving relative levels and fenced-code …
- Very specific: line 35
Prefer archiveEntries(), prepareInboxBodyForMerge(), and formatArchivalReport() from packages/squad-sdk/src/state/io/archival.ts over …
- Distinctive: line 40
Stop if the destination is not already tracked.
- Distinctive: line 41
Stop if the appended headings cannot be re-read from the destination.
- Distinctive: line 42
Stop if the entry-count increase does not exactly match the selected move set.
- Distinctive: line 43
Stop if the active backend is non-local and does not provide governed archival operations.
- Distinctive: line 44
Stop if state appears orphaned, split across runtime and checkout layers, or owned by another process without an explicit handoff.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context
Use this skill for decision archival, history summarization, or any operation that moves entries between repository state files. A move has two halves: append to the destination, then trim the source. Treat it as data loss prevention, not text cleanup.
Scope
- Activate when moving entries between tracked Squad state files such as decision logs, histories, or inbox merges.
- Allowed targets: tracked repository state files and their designated tracked archives.
- Exclusions: untracked destinations, byte-delta-only validation, and trimming source content before the destination is verified.
- This procedure is scoped to the local state backend unless the active backend exposes governed append, read-back, and trim operations. Runtime-owned orphan or two-layer state is not a valid archival destination; use the backend's state operation instead of editing a checkout copy.
Patterns
- Resolve a destination that is already tracked before writing. If the requested destination is untracked, redirect to a tracked archive or stop.
- Append first, re-read the destination, and prove every moved heading is present.
- Compare entry counts before and after the append. Trim only when the count increased by exactly the selected number of entries.
- Report measured
removed from source / added to destinationcounts. Do not use byte deltas as an integrity signal. - When inserting an inbox body beneath a
###entry, demote its shallowest heading to####while preserving relative levels and fenced-code content. - Prefer
archiveEntries(),prepareInboxBodyForMerge(), andformatArchivalReport()frompackages/squad-sdk/src/state/io/archival.tsover hand-rolled archival logic.
Stop conditions
- Stop if the destination is not already tracked.
- Stop if the appended headings cannot be re-read from the destination.
- Stop if the entry-count increase does not exactly match the selected move set.
- Stop if the active backend is non-local and does not provide governed archival operations.
- Stop if state appears orphaned, split across runtime and checkout layers, or owned by another process without an explicit handoff.
Examples
The archival tests in test/state/archival.test.ts cover append failures, swallowed writes,
untracked destinations, CRLF inputs, count verification, and fence-aware heading demotion.
Anti-Patterns
- Creating a timestamped archive under a git-excluded directory and assuming it will persist
- Deleting source content before the destination has been verified
- Reporting “no archival required” without measuring eligible entries
- Treating a matching file-size delta as proof that the content survived
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

