Skip to content

Post-edit gates ​

For pack contributors, a gate's optional edit block selects tools for post-edit checks. The hook unions installed gates by id, without profile detection or trusted project overlays; packless and nested-package projects keep their tools.

ESLint has no edit block: its cold start exceeds the inline budget. Run it through devkit lint-prep or the project's quality script instead.

edit: {bin?, config?, extensions?, check?, fix?, clean?, skip?, heading, unavailable?}:

  • bin: "node_modules" finds the nearest ancestor executable; omitted means the gate's PATH program.
  • config checks its predicate on ancestors through the project root. json_key: {file, key} reads structural JSON membership, not a text mention.
  • extensions overrides the gate's suffixes, allowing lint-prep to include Vue while edit lint excludes it.
  • skip globs match the canonical project-relative path before changing cwd.
  • check, fix, and stdin clean arguments substitute {file} and {pack}. fix requires clean and a clean HEAD baseline; absent check skips dirty HEAD. A present check must name {file}.
  • heading substitutes the displayed file label. Gate findings_exit distinguishes findings from unavailable tools; lowercase unavailable substrings identify bootstrap failures. Failures are non-blocking and unavailable notes deduplicate per session.

Referenced {pack}/gates/*.cjs formatters are validated assets, loaded inside the linter without another process. Core retains scheduling, generated-path skips, queue/drain recovery, HEAD safety, JSON/shell checks, the optional secret scan and the shared 3 s per-file budget.

Internal docs — onedot-devkit · devkit

devkitdevkit syncdevkit statusdevkit doctordevkit helpInternal docs · ONEDOT digital crew