← Projects
Projectv0.2.2
Quartz
Quartz answers an agent's TypeScript questions with the compiler's own answers.
Your agent asks what a type contains, whether a snippet compiles, or whether a converter already exists, before it writes code instead of after tsc fails. The answers come from the TypeScript compiler, as JSON.
npm install -g @skastr0/quartz01
The pain
- It guesses types from text. Your agent greps for a declaration and rebuilds the type in its head, through generics and inference it can't see.
- It finds out from
tsc. Write, runtsc, read the error, try again. Many turns go to flailing on type errors. - It rewrites what already exists. Nothing tells it there's already a
User → UserDTOfunction two files over.
02
See it run
What does this type contain?
quartz info '{"symbol":"TypeAnalyzer"}' --format pretty"name": "TypeAnalyzer", "kind": "interface","location": { "file": "packages/engine/src/contracts.ts", "line": 463 },"properties": [ { "name": "getPackages", "type": "() => Promise<readonly PackageInfo[]>" }, { "name": "getTypeInfo", "type": "(symbolName: string, packageName?: string) => Promise<TypeInfo | null>" }, …Will this compile? Nothing is written to disk.
quartz check-snippet '{"code":"declare const analyzer: TypeAnalyzer;\nconst count: string = (await analyzer.getPackages()).length;"}'"valid": false,"errors": [{ "message": "Type 'number' is not assignable to type 'string'.", "line": 2, "column": 7 }]Is there already a User → UserDTO function?
quartz transform-search '{"root":"test/fixtures","from":"User","to":"UserDTO","verifiedOnly":true}'{ "signature": "toDTO(from: User): UserDTO", "file": "types/transforms.ts", "line": 30, "verification": { "status": "verified" } }{ "signature": "transform(input: User): UserDTO", "file": "types/transforms.ts", "line": 211, "verification": { "status": "verified" } }… 3 more verified: toDTO(user), saveUser, deprecatedToDTOCan toDTO convert a User here? Four checks, one answer.
quartz verify-contract '{"root":"test/fixtures","from":"User","to":"UserDTO","symbol":"toDTO","snippet":"declare const u: User;\nconst dto: UserDTO = toDTO(u);"}'"ok": truecompatibility passed: false "User is not directly assignable to UserDTO; verified transform evidence can still satisfy a conversion contract."snippet passed: true "Snippet compiles under the package TypeScript project."diagnostics passed: true "Package diagnostics are clean."transform passed: true "A compiler-verified transform satisfies the requested contract."03
How it works
Quartz keeps one TypeScript 7 native compiler open per project. Snippets and transform checks compile as temporary virtual files, so your files are never touched. The CLI reuses one compiler across a batch; the OpenCode plugin keeps it warm for the session.
| your agent wants to know | command | it gets back |
|---|---|---|
| what a type contains | info, expand | resolved members and signatures |
| whether code compiles | check-snippet | errors with line and column |
| whether a converter exists | transform-search | matching functions, each test-compiled |
| whether a planned conversion is safe | verify-contract | each check, passed or failed, and one overall answer |
04
Where it fits
Every agent in a TypeScript repo gets the same answers about the code, from the compiler. Pulsar's TypeScript checks run on it.
05
Install
- Version
- 0.2.2
- Runs on
- macOS and Linux, arm64 and x64
- Install
npm install -g @skastr0/quartzRun it in a folder with a tsconfig.json.
Other projects
projectJuntoJunto puts coding agents on one canvas and lets them talk.projectPrismWrite agent workflows as programs. Run them anywhere. Run them again.projectTetherTether keeps each code explanation on the code it explains.projectPulsarPulsar scores a repository and each agent diff under one shared policy.