@stepdown-dev/ts
v0.1.0
Published
TypeScript implementation of stepdown — a family of structural source analyzers enforcing top-down readability.
Maintainers
Readme
stepdown-ts
TypeScript implementation of stepdown, a structural source analyzer for top-down readability.
stepdown-ts v0.1.0 implements the grammar accepted in
ADR-0001.
Family
- Brand: stepdown.dev -> stepdown.dev/ts
- Principles: stepdown-dev Principles
- Go sibling: stepdown-dev/stepdown-go
- Specification: ADR-0001
- Owner: Stinnett Holdings LLC
What It Checks
Source should read top-down: high-level declarations appear before the supporting declarations they depend on, and public roots are followed by their private callees in depth-first order.
stepdown-ts checks TypeScript and TSX source structure only. It does not check formatting,
style, runtime behavior, security, performance, semantic correctness, or API design.
The analyzer is a positive-grammar walker over the TypeScript compiler API. It has no project configuration, no local suppressions, and no rule toggles. Accepted TypeScript shapes change through ADR review when the grammar needs to expand.
Install
npm install --save-dev @stepdown-dev/ts@<version>Invoke
npx @stepdown-dev/ts@<version> <path> [<path>...]Or, after pinned local install:
npm exec stepdown-ts <path> [<path>...]Help:
stepdown-ts -h
stepdown-ts --help
stepdown-ts -helpOutput
Diagnostics are sorted text lines:
path:line:column: rule-name: descriptionExit codes:
0- clean input or help1- structural findings2- tool, load, parse, or type-check error
Verification gates fail closed on any non-zero exit code.
Rule Set
section-order- module-level section out of orderdeclaration-zone-order- declaration-zone types, interfaces, and enums appear after valuesdfs-public-root- helper appears before the public root that first reaches ithelper-placement- helper appears outside the public root's depth-first helper orderorphan-unexported-helper- helper is not reached from a same-file public rootaccessor-pair- pairedgetandsetaccessors are not adjacentclass-member-order- class members appear outside fields, constructor, behavior, statics order
ADR-0001 is the canonical grammar reference.
Local Verification
Canonical repository gate:
npm run ciThat gate builds TypeScript, runs the test suite, runs stepdown-ts against src, and checks
the positive witness fixtures under fixtures/positive.
Release dry-run:
npm run release:checkThe release check runs the canonical gate and npm pack --dry-run so package contents include
the executable wrapper, built output, README, and license before publication.
Reporting Grammar Gaps
Use the GitHub issue forms for:
- valid TypeScript or TSX structure rejected by the analyzer
- ADR-0001-invalid structure accepted by the analyzer
- future structural rule proposals
Reports should include compileable source, exact diagnostics or missing diagnostics, and the ADR expectation. General style preferences belong outside this tool.
License
Apache-2.0 - 2026 Stinnett Holdings LLC.
