Skip to content

Credits

actdocs-rs is an independent reimplementation, in Rust, of actdocs by tmknom, licensed under Apache-2.0. The reference used was actdocs v0.6.1.

No Go source was copied or mechanically translated. The implementation was written against a behavioural specification derived from reading the upstream source and its golden tests. What was deliberately reproduced is the observable output contract, so that a document generated by either tool can be regenerated by the other without churn: the section headings, the table headers and column order, the n/a / N/A / yes / no placeholders, the distinction between an absent value and an empty one, the folding of multi-line values, the <!-- actdocs start --> markers, the JSON shape of generate --format=json, and the ordering of entries.

Full attribution is in NOTICE.

What this implementation adds

  • sync, which has no upstream equivalent: it scaffolds a document, replaces the marked regions, optionally mirrors into a documentation tree, and optionally rebuilds a repository index.
  • Usage snippets in their own marked region — a step for an action, a job for a reusable workflow — with a configurable pin.
  • Layered configuration: a flag beats an environment variable, which beats a file, which beats a default.
  • --check, and a three-value exit code contract, so the same tool serves a local commit hook and a CI gate.
  • Distribution as a hook repository, built from source on first use.

What it refuses to guess

An unrecognised configuration key is an error. A configuration file that is shadowed by a higher-priority one is named on stderr. A document with no markers is reported rather than overwritten. A document left behind by a changed setting is named rather than deleted.

Each of these could have been a silent no-op. Silence is the failure mode that costs an afternoon.