stepdown is a family of structural source analyzers. Each language has its own implementation and its own ADR-0001, but every member inherits this constitution. A member that violates it is a different tool wearing the name.
Source reads top-down: high-level declarations appear before the supporting declarations they depend on, and within a scope a public entry point is immediately followed by its private callees in depth-first call order. stepdown enforces structure — never semantics, style, security, performance, or API design.
- One opinion, structural only.
- Positive grammar only — walk valid structure, emit a named diagnostic on mismatch; no forbidden-pattern lists, deny-lists, or violation-type switches.
- No configuration — no config file, rule toggles, or per-project flavors.
- No waivers — no inline opt-outs or exemptions. If valid code consistently fails, the grammar is wrong and changes; source never gets a waiver. (Out-of-scope file categories — generated, test — are not waivers.)
- Positive witnesses only — fixtures are conforming source asserting zero diagnostics; no rejected-form corpus; sparse, mechanical tests.
- Self-policing — the tool passes its own check in its own CI; a release that fails its own grammar does not ship.
- Reviewable walker — small enough that a reviewer verifies mismatch paths by reading the source. Outgrowing that changes the test strategy only by ADR.
- ADR-driven evolution — every rule traces to the one opinion; new rules need a new ADR with explicit justification.
Shared: this document. Per-language: the concrete grammar, classification, rule names, fixtures, and ADR-0001 — in that language's own concepts, with no foreign-language or steward identity in the rule vocabulary.
- Diagnostics:
path:line:column: rule-name: description, one per line, deterministic, sorted, text only. JSON only if added to every member in lockstep by coordinated ADR. - Exit codes:
0clean,1findings,2tool/load error; gates fail closed on any non-zero. - Pinning: each language uses its ecosystem's pinned-version invocation.
Repository, module path, license, and steward identity are locator metadata, not tool semantics, and change by ADR amendment without affecting the rule. Owner: Stinnett Holdings LLC.