anomalyco / anomalyco/opencode
[FEATURE]: guard against stale agent/skill definitions (doctor drift check + EOL-aware lint + dated claims)
@kitlangton is already working on this.
Since Aug 9, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
- I have verified this feature I'm about to request hasn't been suggested before.
Summary
Add a mechanical guardrail so agent and skill definitions don't silently decay: when a file pins a runtime/toolchain version (Node.js, Next.js, Prisma, Stripe API versions, LTS statements, CI matrix OS images, etc.), nothing in the project currently catches it when that pin goes EOL or is superseded. The pin just sits there until a user trips over it.
Concretely, three small features (any subset is welcome):
-
opencode doctordrift check for agents — detect when the installed agent copy differs from its source (there are multiple trees today: source vs generated flat copy vs aOPENCODE_AGENTS_DIR-pointed copy), and report the divergence so a fix in one tree doesn't silently fail to propagate. -
EOL-aware lint for agent/skill files — a lint/CI step that greps agent markdown for known-EOL pins (e.g. Node <20, Next <15, React <18, Prisma <6, Python <3.11, deprecated Stripe API versions) and fails with the list of offending files plus the current recommended version. The point is to make a bare unfalsifiable "Node 18+" impossible — either it's current, or it fails the check.
-
Dated-claims convention — recommend/normalize a "verified YYYY-MM" date next to any version, LTS, or regulatory claim in agent/skill docs, so a quarterly re-scan has something concrete to diff against.
Benefits
- Agent knowledge files are written once and rarely re-validated; version pins, LTS statements, and regulatory timelines decay silently with no alert. A mechanical check removes the need for discipline.
- Catches real drift: during a recent audit of a large local agent set, 8 of 254 agent files carried stale toolchain claims (Next.js 14 instead of 16, Node 18+ instead of 20+, PHP 8.1 / WordPress 6.7 instead of 8.3 / 7.0, Stripe API
2024-06-20instead of2026-07-29, a withdrawn SEC climate rule still marked as pending). The fixes were all hand-found; none of the decay was detected by tooling. - Low implementation cost: items 1-2 are grep-level checks; item 3 is a documentation convention.
Proposed location
- Drift check: extend the existing
opencode doctorcommand. - Lint: a small script under
packages/opencode/scripts/(or a lint rule) invoked in CI.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.