/** * After `husky init`, husky writes a default `.husky/pre-commit` containing * `bun test` (or `npm test`). In a project freshly scaffolded by `diablo init` * there are no tests yet, so that hook FAILS the very first commit (bun test * exits 1 on "no tests found"), which aborts the worker's worktree commit and * STALLS diablo's autonomous loop. Worse, the loop runs TDD: a deliberately-RED * commit would be blocked by a test-running pre-commit hook even when correct. * * So diablo owns its hook artifacts, overwriting husky's defaults: * - pre-commit runs NO tests. Correctness is the verifier's job in the * pipeline; the git hook must never deadlock the AFK loop. A human who * wants a local test gate can add it back themselves. * - commit-msg runs commitlint, which is what husky init never wired up. * commitlint validates the commit MESSAGE, which only exists in the * commit-msg hook (pre-commit runs before the message is written). * - commitlint.config.js is scaffolded because commitlint requires a config. * * Pure (manager in, artifacts out) so the content is unit-tested directly; the * caller writes each artifact to disk after `husky init` has created .husky/. */ import type { PackageManager } from "./package-manager.ts"; /** A file diablo writes verbatim, relative to the project root. */ export interface HuskyArtifact { /** Path relative to the repo root (e.g. ".husky/commit-msg"). */ path: string; /** Full file content. */ content: string; } /** * The hook + config artifacts diablo writes after `husky init`, overwriting * husky's test-running default pre-commit and adding the commit-msg hook and * commitlint config that init never creates. */ export declare function huskyArtifacts(pm: PackageManager): HuskyArtifact[];