typescript-go-sync
Skill359 starsChanged 18 days agoMITView on GitHub
Keeps packages/ttsc/shim synchronized with typescript-go and complete for plugin authors. Use before adding a shim re-export, bumping typescript-go, changing the shim audit, or chasing a missing compiler API.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 13
If the generator derives it, run go run '-modfile=tools/gen_shims/go.mod' ./tools/gen_shims/main.go in packages/ttsc.
- Very specific: line 18
Run the generator with GOWORK=off, then pnpm --filter ttsc shim:audit -fix.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
TypeScript-Go Shim
Each packages/ttsc/shim/<name> is a Go module re-exporting typescript-go's internal/<name>, the only compiler surface plugins can use. A missing re-export of an API in unmodified upstream is a ttsc bug.
Adding An API
- Find the symbol under
$(go env GOMODCACHE)/github.com/microsoft/typescript-go@<version>/internal/<pkg>/. - If the generator derives it, run
go run '-modfile=tools/gen_shims/go.mod' ./tools/gen_shims/main.goinpackages/ttsc; generatedshim.gofiles are never edited. Otherwise list it in the directory'sextra-shim.json, or write it in a file marked// gen_shims:hand-maintained, where an unexported symbol takes a bodiless//go:linknamedeclaration withimport _ "unsafe".
Bumping typescript-go
- Update the identical
require github.com/microsoft/typescript-go v0.0.0-<timestamp>-<hash>in every shim,packages/ttsc/go.mod, and each consumer that pins it, and refresh sums through the real module or workspace resolution. Never add permanent absolute replacements.go work synccan succeed while leaving a module stale; then set its requirements withgo mod edit -requireand rungo mod download. - Run the generator with
GOWORK=off, thenpnpm --filter ttsc shim:audit -fix. - Fix hand-maintained files and
extra-shim.jsonfor upstream renames, signature changes, and export flips, keep previously exported enum families, and document public migrations in the AST and Checker guide.
Audit
CI runs pnpm --filter ttsc shim:audit. Accept a new gap into tools/shim_audit/baseline.json with -write-baseline only on purpose, and give every producer_exemptions entry a rationale. The audit proves only that code compiles, so add a runtime probe in packages/lint/linthost/ that walks a Checker loaded through loadProgram for each new graph-walk operation.
Consumer Validation
A shim change is proven only by a downstream plugin passing against it. Build and pack with your platform package, install the tarballs into ../typia or another consumer, and run a test that uses the API:
pnpm --filter ttsc --filter @ttsc/unplugin --filter ./packages/ttsc-linux-x64 -r --workspace-concurrency=1 build
pnpm --filter ttsc --filter @ttsc/unplugin --filter ./packages/ttsc-linux-x64 exec pnpm pack --out "../../experimental/tarballs/%s.tgz"In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- benchmarkSkill
- contractsSkill
- developmentSkill
- documentationSkill
- issue-campaignSkill
- promptingSkill
- pull-requestSkill
- reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

