Skip to content

Tooling: consolidate durable repository tools in TypeScript on Home #497

Description

@chrisbbreuer

Parent: #462
Related: #464, #494

Goal

Consolidate the repository tooling that is worth keeping into TypeScript executed by the owner-maintained Home engine. This is not a requirement to translate every current script one-for-one: obsolete, redundant, one-shot, or superseded tools should receive an explicit disposition instead of a rewrite.

Current boundary

The fail-closed inventory in docs/.data/tool-migration-inventory-v1.json records every remaining Python, JavaScript/TypeScript, and shell implementation script plus its inputs, outputs, exit/ordering/diagnostic/schema/network contracts, subprocesses, and caller/reference files. #462 enforces the dependency boundary. The small documentation link gate already moved to an in-tree Zig executable before this direction was clarified; no further blanket Python-to-Zig translation is wanted.

Home lives in the owner-maintained home-lang/home repository (~/Code/Home/lang). Its TypeScript frontend is substantial, while the native runtime/home run path is still transitional. The Home execution contract must become real in Home itself before zig-js claims its tools run on it.

Scope

  • Preserve owner-maintained dependencies such as BunPress, STX, ts-syntax-highlighter, and Home; improve them in their source repositories rather than deleting, replacing, vendoring around, or bypassing them.
  • Keep the machine-readable inventory fail-closed as scripts and callers change.
  • Classify each legacy script as a durable Home/TypeScript candidate, owned bootstrap responsibility, retained unavoidable bootstrap glue, obsolete, redundant, or superseded. Do not assume every file deserves a port.
  • Establish and version the required Home tool-runner surface in Home first: TypeScript parsing/emission, module loading, filesystem/process/stream APIs, exit codes, stdout/stderr, environment and argv, deterministic JSON/TSV/Markdown/file replacement, and offline local-package resolution.
  • Implement durable tools in TypeScript against that real Home surface, either in zig-js or an owner-maintained shared tooling package under ~/Code/**.
  • Preserve byte-for-byte output where it is a checked contract; otherwise use a reviewed versioned schema migration with compatibility tests.
  • Replace Python unittest/script tests with tests that run through the same Home/TypeScript path, retaining malformed-input and deliberate failure-path coverage.
  • Remove obsolete runtimes, shebangs, callers, manifests, and cache guidance only after the replacement or retirement is proven.
  • Keep normal build/test/docs/benchmark/audit commands offline. Explicit checksum-pinned standards-data acquisition remains an operator action under Build: enforce owned local dependencies and offline builds #462.

No-workaround rules

  • Do not mechanically translate Python scripts to Zig.
  • Do not require Node or Bun as the permanent runtime for the migrated tools.
  • Do not embed or vendor Python/Node/Bun, add a fake Home shim in zig-js, or claim Home execution while delegating to another runtime.
  • Do not delete a gate, generated artifact, diagnostic contract, or evidence check merely to reduce the script count.
  • Do not check in generated results without a reproducible generator.
  • Do not rewrite a tool until it is shown to be durable and the required Home runtime surface exists.

Acceptance

  • A machine-readable migration inventory classifies every .py, .mjs, .ts, and .sh file and every caller; unclassified additions fail CI. Foundation: 8068f57f.
  • Every legacy tool has a reviewed disposition; only durable tools are selected for migration.
  • Home provides a tested, versioned, native execution surface sufficient for the selected TypeScript tooling without delegating to Node, Bun, or Python.
  • Migrated tools reproduce existing inventories, generated regions, reports, benchmark statistics, ordering, exit codes, and deliberate error diagnostics.
  • Selected CI/build callers use an exact pinned owner-maintained Home checkout and run offline; local resolution is enforced by Build: enforce owned local dependencies and offline builds #462.
  • Obsolete/redundant tools and runtime prerequisites are removed only with caller and contract evidence.
  • Build/test feedback is measured with Build: reduce compile, link, and test feedback time #494 so the Home path does not impose unacceptable latency.

Foundation

Normal command contracts are indexed by build.zig, .github/workflows/, CLAUDE.md, repository skills, and docs/.data/tool-migration-inventory-v1.json. Existing implementations remain authoritative until a selected tool passes its compatibility gate on Home.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesDependency ownership and offline build policyenhancementNew feature or requesttoolingBuild, test, documentation, and developer tooling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions