| name | gds-maintain-agent-context |
| description | Use this skill when verified repository facts changed and generated AGENTS, harness projections, or provenance-bearing Serena memories may be stale. Regenerate only affected context from canonical sources and validate drift. Do not use it for speculative documentation rewrites or estate-wide bundle rollout. |
Contract
Refresh derived agent context from verified canonical sources without creating
a second policy authority.
Use when
- Repository commands, architecture, boundaries, or policy facts changed.
- Generated projections or derived memories report drift.
Do not use when
- Facts are speculative or unverified.
- The requested change belongs in global policy or a new bundle release.
Inputs
- Changed canonical paths and repository identity.
- Current compiled policy and bundle lock.
Preconditions
- Identify the canonical owner of each changed fact.
- Preserve manual diffs instead of silently overwriting them.
Workflow
- Run
gds generate repository --check --json.
- Determine which projections or memories are affected.
- Produce a local generation plan and review its exact output set.
- Apply only after the repository workflow authorizes tracked file changes.
- Run projection, memory provenance, visibility, and reproducibility checks.
Stop conditions
Stop on manual projection drift, missing provenance, private-to-public flow,
stale bundle identity, or unresolved canonical ownership.
Verification
Regenerate twice and require byte-identical output with zero unexplained drift.
Output
Return canonical inputs, generated paths, digests, preserved manual diffs,
tests run, and evidence still not proven.
References
No additional runtime reference is required; projection metadata names its sources.