feat(pre-commit): stamp a standing git-workflow authorization into every AGENTS.md #1157
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1157
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/git-workflow-stamp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1150.
What
Replaces the hand-written one-line
**Git workflow** -stamp under## Agent ruleswith a generated, marker-delimited managed block that states the repo's landing lane as a standing authorization.The old stamp named the lane without ever saying the lane is permission, so agents kept stopping to ask before a commit, a branch, a push, or a pull request. A turn that stops there ends with the work stranded in a dirty worktree, which is the loss vector this issue records.
Lane semantics (corrected in
bdf4817)A slug names what the author agent does. This PR's first two drafts got it backwards, and the correction is the substance of the second commit:
merge-remote-main- the author commits and pushes straight tomain.pull-request-and-merge- the author opens a pull request and merges it itself once green. The fully autonomous lane. The PR is the record and the CI gate, not a wait state.pull-request- the author opens the pull request and stops. The director merge lane picks it up from there. It has no-and-mergefor exactly that reason.remote-branch-only- the author pushes a branch and stops.Draft 1 read
-and-mergeas "a human merges it later". Draft 2 moved it to "the director merges it". Both invert the pair againstpull-request. The block now states the direction outright, and the tests reject the inverted phrasings rather than pinning wording.Ward currently disagrees.
agent_director_merge.gogates director merges onpull-request-and-mergeand says "pull-request still needs a human", the inverse of the above. Filed as ward#1677 - worth an answer before the fleet sweep, since the block asserts these semantics in every repo.Shipped
agentic_os/generators/generate_git_workflow.py- pure renderer pluscheck_drift, mirroringgenerate_agents_pointer. Lane comes fromward.workflowin the file's own frontmatter.agentic_os/pre_commit/check_git_workflow.py- thegit-workflowhook. Regenerates offline, fails on drift, a missing block, a block that no longer matches the declared lane, or a legacy stamp beside it.scripts/apply-git-workflow.py- the applier. Idempotent, needs no per-repo argument..pre-commit-hooks.yamland dogfooded in.pre-commit-config.yaml.coding-core-git-workflowskill, and added a lane check to the lane-blind merge mechanics incoding-core-git/references/merging.md.AGENTS.mdstamped.The block
Details both fleet lanes, names the one this repo is on, and states the pre-authorization in MUST / ALWAYS / NEVER terms, while holding the two genuine walls -
--no-verifyand force-push - closed in the same breath. A repo declaring no lane gets thepull-requestvariant, which neither pushesmainnor merges.Org-agnostic with no base repo exempt: a lane binds in the base as it does in a consumer.
Rollout
DEFAULT_HOOK_IDSinscripts/apply-agentic-os-hooks.pyis deliberately unchanged - the guard intest_apply_agentic_os_hooks.pyrequires a taggedaos-precommitrelease carrying the hook first. Fleet rollout order once that release lands:apply-git-workflowstamps the block, then the rollout enables the hook. Reversed, every commit breaks until the block arrives. A dry run across the workspace resolves 12 repos correctly by declared lane. Tracked at #1158.Verification
pre-commit run --all-filesgreen.just teston the affected files green (83 passed). The 32 unrelated failures on this host (shell, gpg, git-identity, dev-base, statusline) reproduce with the change stashed.🤖 Generated with Claude Code