Obsolescence-resistant TypeScript agent
context-hub (current, versioned API docs given to the agent before it writes code) plus semgrep rules that flag calls the project has marked as deprecated.
Description
Two checks for the `obsolescence` failure mode in a TypeScript or JavaScript project. A model tends to write the form of an API that it saw most often in training, which may be older than the version the project uses. Stage 1, before generation: context-hub gives the agent curated, versioned API documentation for the libraries in use, so the current form of an API is in its context when it writes code. Stage 2, after generation: semgrep runs rules that match calls the team knows to be deprecated or removed in its pinned versions, and fails the check on a match. Semgrep finds only what the rules list; the project has to write the rules and keep them current.
Stack
Ordered composition. Each stage consumes the output of the one before it.
Targets failure modes
- Obsolescence — Using deprecated APIs, retired packages, or outdated library versions — often because the model's training data pre-dates current releases.
Notes
Text rewritten on 2026-11-21 to describe the tools in `stack`. The earlier text described sourcegraph-cody, cursor, tsc and eslint, none of which is in the stack. Of the two stack tools the KG tags only context-hub for obsolescence; Semgrep is here as a rule engine, and the KG does not claim that it detects deprecated APIs out of the box. `evidence_tier` was lowered from `case_studied` to `anecdotal`, the lowest value the schema has: no write-up of this composition is cited and nobody has tested it. A type checker would be a natural third stage; for Python, SAICA-Bench measures pyright on this mode.