Repository navigation
Description
Description
A .vig-os manifest key DEVKIT_BRANCH_TYPES that steers the issue-numbered alternation of the no-commit-to-branch branch guard — (feature|bugfix|hotfix|release|docs|test|refactor)/<issue>-<slug> — on both enforcement surfaces: the scaffolded .pre-commit-config.yaml (docker-mode consumers) and the flake-generated consumer config (direnv consumers, via a new mkProjectShell branchTypes argument). Twin of #1431; the branch-side half of exo-pet/vault#54 option B.
Problem Statement
ADR-0002 in exo-pet/vault prescribes record/<issue>-<summary> branches, which the guard's fixed alternation rejects. The only routes today are hand-writing the full pattern regex into the consumer's flake.nix (hooks."no-commit-to-branch".settings.pattern) — which duplicates the whole regex and silently drifts from upstream pattern changes (e.g. the #1224 workflow-model clause) — or editing the preserved YAML (permanent drift nag).
Proposed Solution
- New
.vig-oskeyDEVKIT_BRANCH_TYPES: comma-separated full replacement of the issue-numbered type set; empty (default) =feature,bugfix,hotfix,release,docs,test,refactor— byte-identical default renders. Thechore/<slug>andworktree/<n>clauses are untouched. nix/hooks.nix:branchNamePatternForgains a branch-types parameter (alternation built from the list); default preserved exactly.flake.nixmkProjectShell: newbranchTypes ? nullargument (null = default set), validated at eval time with a loud throw on bad charset (mirrors theworkflowguard), threaded intohooksModule.consumer.- Template
flake.nix: extend the existing.vig-osreader (Flake-generated pre-commit branch guard is not workflow-model-aware #1224 pattern) to readDEVKIT_BRANCH_TYPESand forward it under afunctionArgsguard.flake.nixis scaffold-once, so existing direnv consumers hand-port the reader block — documented indocs/MIGRATION.mdlike the workflow-model port. init-workspace.sh: read + charset guard + anchored render + conditional write-back; a notice (not abort) whenreleaseis dropped (the release train forksrelease/X.Y.Zbranches).- Docs:
docs/MIGRATION.mdmanifest table;branch-namingskill (both copies). - No CI branch-name gate exists — the two local surfaces are the whole story.
Spike evidence (2026-08-11, dev @4822b706): extended-alternation regex semantics proven (record/54-x allowed, record/no-issue still blocked, main/dev/chore/worktree clauses intact); anchored BRE sed with # delimiter proven against the template YAML (alternation occurs exactly once; composes with the trunk + refs-policy seds); the consumer-fragment settings.pattern override was built end-to-end and wins over the base (mkOverride 999), confirming the plumbing the new argument automates.
Acceptance criteria
- Default (absent/empty key) keeps both rendered patterns byte-identical (parity incl.
hooksPortabledrift gate) -
branchTypescomposes withworkflow = "trunk"(Flake-generated pre-commit branch guard is not workflow-model-aware #1224) — both clauses render together - Invalid charset refused loudly at scaffold time (bash) and eval time (nix)
- Round-trip across
--forceproven in bats; consumer-surface coverage in test_flake_hooks.py mirroring TestWorkflowModelBranchGuard
Alternatives Considered
- Consumer overrides
settings.patternwith the full regex — works today (spike-proven, usable as vault's interim unblock) but copies the whole pattern out of the SSoT. - Add
recordto the default alternation — option A of exo-pet/vault#54, rejected for per-consumer flexibility.
Additional Context
exo-pet/vault#54 (origin), #1431 (commit-types twin), #1224 (workflow-aware guard — the threading model), #1282 (knob blueprint).
Impact
Backward compatible (semver:minor labeled; 1.7.1 train inclusion). Benefits any consumer with a domain-specific branching vocabulary.
Activity
feat(hooks): allow renovate branches in the no-commit-to-branch guard (…
c-vigo commentedon Aug 12, 2026
Scope extension (maintainer decision, from #1430 triage): this issue additionally ships the CI branch-name gate — a commit-checks step validating the PR head ref against the same resolved branch-types set, via a new
branch-typesresolve-toolchain output. Superset allowances for automation branches that never run local hooks (release/X.Y.Z,renovate/*per #1433,worktree/<n>, plus the scaffold-automation inventory), env-routed head ref, and the same step mirrored into devkit's own bespokeci.yml. Rationale and acceptance mapping: #1430 (comment)Refs: #1430
feat(workspace): add scaffold-time commit-types knob (DEVKIT_COMMIT_T…
chore(ci): make the deploy branch name dot-free (#354)
feat(workspace): add branch-types knob (DEVKIT_BRANCH_TYPES) and CI b…
c-vigo commentedon Aug 12, 2026
Merged to dev via #1437 (dev-targeted PRs do not auto-close), including the #1430 CI branch-name gate. Ships with 1.7.1. Pre-train prerequisite: devkit-smoke-test#354 (dot-free deploy branch) must be on smoke main before the candidate dispatch.
feat(doctor): report whether core.hooksPath wires the tracked git hoo…
fix(workspace): ship the commit-msg hooks to flake-generated consumers (
fix(smoke-test): make the template deploy branch name dot-free (#1446)
chore: release 1.8.0 (#1441)
fix(workspace): render knobs unconditionally and refuse symlinks (#1641)
fix(workspace): render the branch guard from the workflow model both …
feat(workspace): reconcile a preserved pre-commit config on upgrade (#…