Skip to content

Dogfood hierarchical README targets in developer tooling #414

Description

@taras

Story

As an executable.md contributor, I want the repository's own README development instructions to be runnable as hierarchical document targets so the project proves that readable documentation can be the composition interface for repeatable tooling.

Dependency

Blocked by #412. This issue consumes the hierarchical target contract and its shared resolver; it does not redefine target selection.

Intended experience

The README should preserve ordinary GitHub-readable development documentation while exposing useful sections as exact targets. For example:

deno task xmd targets README.md
deno task xmd run README.md#Development/Setup
deno task xmd run README.md#Development/Verification

Selecting a leaf runs its ancestor setup plus that leaf. Selecting a parent runs its setup and selected descendants according to #412. An unqualified xmd run README.md still means the whole document, so the executable content and hierarchy must make that behavior deliberate rather than accidentally repeating expensive or destructive work.

The first version should compose the repository's existing low-level commands—such as deno task setup, build, lint, check, test, and verify—instead of reimplementing their behavior in Markdown or JavaScript.

Scope

README dogfood

  • Refactor the current development instructions into a coherent hierarchy of runnable targets.
  • Keep prose, setup requirements, and command examples useful to a reader who never invokes XMD.
  • Use the source CLI through deno task xmd; do not require a released or previously compiled xmd binary.
  • Make whole-document execution intentional and safe.
  • State the actual guarantee: these targets run under xmd run and compose native developer commands; they do not gain workflow durability.

Internal tooling

  • Delegate suitable contributor-facing task or CI entry points to README targets where doing so gives the README a real, continuously exercised role.
  • Preserve low-level scripts and tasks as the leaf implementations for setup, builds, checks, and verification.
  • Keep the invocation graph acyclic. In particular, a README target that invokes deno task verify cannot also become the implementation of deno task verify; introduce a lower-level leaf or retain the README-to-task direction.
  • Preserve the repository's dependency preparation, cache purity, concurrency, release, and verification contracts in AGENTS.md.
  • Reuse or link existing XMD workflows such as review or analysis only where their semantics fit; do not mechanically migrate unrelated tooling.

Acceptance criteria

  • deno task xmd targets README.md lists stable canonical development target paths.
  • At least setup, focused verification, and complete verification have useful exact targets.
  • A focused target runs only its required ancestor flow and selected subtree; skipped sibling targets produce no effects.
  • The actual README is covered by an end-to-end test or CI invocation, in addition to Run document sections as hierarchical workflow targets #412's synthetic conformance fixtures.
  • At least one appropriate repository entry point exercises a README target from the source CLI without creating an invocation cycle.
  • The README remains clear when rendered on GitHub and when read as plain Markdown.
  • Existing low-level setup, build, check, and verification commands retain their behavior and remain directly callable.
  • Unqualified whole-document execution is covered and its effects are intentional.
  • No path depends on dist/xmd, a global install, or a previously built executable.
  • Relevant focused tests, lint, typecheck, JSR dry run, and any integration boundary tests pass.

Non-goals

  • Implementing the target-selection mechanism from Run document sections as hierarchical workflow targets #412.
  • Adding workflow durability to native Deno commands.
  • Replacing low-level TypeScript tooling with Markdown or embedded JavaScript.
  • Converting every README section into an effectful task.
  • Moving arbitrary native execution into xmd workflow.

Related work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions