camshaft

camshaft

@camshaft

GitHub
2 Skills
10 Total Stars
September 2026 Joined

Public Skills

codemod

by camshaft

How to structurally search and rewrite Cadenza programs with the cdz query / rewrite codemod tool, and how to ask the COMPILER for a semantic fact with cdz type / cdz uses / cdz check (all in the unified cdz binary). Read this whenever the task is finding or transforming code by SHAPE rather than text — structural search-and-replace, a rename/peephole/wrap refactor, a multi-rule simplifier pass, running a codemod across files/directories (apply in place, diff preview, or JSON), structurally diffing two programs (which subtrees changed), finding duplicated subtrees (exact or near-clone / anti-unification), counting occurrences of a form, extracting spans of matching nodes, or building on the query/Tree matcher API — OR when the task is a SEMANTIC query the shape layer can't answer: the type of a definition (cdz type), every source location that references a name (cdz uses, a span-mapped go-to-references), every well-formedness fault (cdz check, "diagnostics as you type"), a name's definition (cdz def, go-to-definition), the bindings visible at a point (cdz scope, variable scope tracking), a module's exported interface (cdz exports), a definition's/built-in's documentation (cdz doc / cdz doc-at), or a definition's compilation DISPOSITION and concrete monomorphizations (cdz instantiations — whether a def was inlined, specialized, emitted as a standalone function, or transformed into an accumulator loop, and at which concrete types / dictionaries a generic was specialized). Covers the ,x/,@xs pattern language, structural guards (is-literal/head-is/matches/not), relational context (inside/has), multi-rule sets + traversal strategy, multi-file/--write/--diff/--json, the diff (structural tree-diff) and clones (content-hash duplicate + --near anti-unification) subcommands, lint mode (anti-pattern checker / CI gate), the semantic type/uses compiler queries, the COMBINED cdz query --where 'type-of(x) = T' (a structural match filtered by a compiler type predicate), the CLI, the library API, and the self-hosted sidecar map.

Comments 5 3mo ago

seed-workspace

by camshaft

How to build, run, test, and gate the Cadenza seed toolchain via cargo xtask. Read this whenever working in the Rust workspace under implementation/seed/crates (cadenza-syntax, rcdzc, cdz-run, cdz-runtime) or in xtask/ — compiling or running a .cdz/.sexp program, running the corpus behavior gate, checking library health, formatting, round-tripping the syntax surfaces, or inspecting a binary AST.

Performance 5 3mo ago