r/javascript • u/context_g • Mar 27 '26
LogicStamp: AST-based context compiler for TypeScript
https://github.com/LogicStamp/logicstamp-contextI’m building an open-source CLI that compiles TypeScript codebases into deterministic, structured context bundles.
It uses the TypeScript compiler API (via ts-morph) to parse the AST and emit JSON representing components, props, hooks, and dependency relationships.
Key properties:
- Deterministic output (same code → same structure)
- Strict watch mode with breaking change detection
- Diffable architectural contracts
- Compact JSON bundles for tooling
Curious how others deal with structural changes in larger TypeScript codebases.
7
Upvotes
View all comments
Show parent comment
1
u/context_g Mar 27 '26 edited Mar 27 '26
it’s not the same as .d.ts. .d.ts gives type declarations. LogicStamp gives a semantic dependency graph and change hashes (semanticHash / bundleHash) tuned for LLM context.
Edit: For example, .d.ts can tell you prop types, but not that component A depends on B, or that only a specific contract changed between snapshots.