GitHub CI confirms that work is ready; it is not where you find out whether it works. Each push costs a full CI
cycle (often 30 minutes or more), and each merge to the default branch can trigger the CI of every other open PR
again. devkit's method, which the global instructions and the devkit delivery skill teach both agents, is
integrate and verify locally, push once, get one CI run. The dev commands for git and GitHub
(Git and GitHub) apply it at every step: dev push, dev pr create, and dev release refuse
to run without local CI evidence.
Every project has one recorded way to version, test, release, and ship: its delivery policy. devkit detects what the
repository does today, recommends a policy that keeps what works, and records the one you choose in the handoff
repository, where every session sees it and dev release follows it.
dev delivery # detected · recorded or recommended policy · gaps, each with its fix
dev delivery --json # the same, for tools and agentsdevkit reads the repository:
| It looks at | For example |
|---|---|
| Version tags and version files | v26.11.0 tags; package.json, pom.xml, pyproject.toml, composer.json, gradle.properties, build.gradle.kts, Cargo.toml, VERSION |
| Release tools | release-please, semantic-release, goreleaser, git-cliff, changesets, bump-my-version, commitizen, maven-release-plugin |
| Changelog | CHANGELOG.md in Keep a Changelog format, or another changelog file |
| CI and the test gate | GitHub Actions, GitLab CI, Bitbucket Pipelines, Azure Pipelines, Jenkins; the commands CI runs |
| Branch model | Trunk-based, GitFlow (develop), release branches |
| What it publishes and deploys | Maven, npm, PyPI, Packagist, container images; GitHub Pages, Kubernetes, containers, platform configs |
Then it recommends, keeping what works:
| Situation | Versioning |
|---|---|
| The repository already has a consistent scheme | Keep it. PEP 440 versions with pre, post, or dev releases (0.1.0a16, 1.0.0.post1, 2.0.0.dev3, 1.1.0rc1) are their own scheme, pep440, with the tag format vMAJOR.MINOR.MICRO[{a|b|rc}N][.postN][.devN] and PEP 440's bump rule; plain vX.Y.Z and SemVer pre-release tags stay SemVer |
| A library others depend on (it publishes to Maven, npm, PyPI, or Packagist) | SemVer, vMAJOR.MINOR.PATCH, bumped from Conventional Commits |
| An app, service, platform, or internal tool | CalVer, vYY.MM.PATCH (dev calver --next) |
| Projects that release together as one set | A release train on their initiative (-i <slug>) |
The gaps are what stands between the project and a release you can trust, by severity: no recorded policy, no CI,
no test gate (high); no version scheme, no changelog, artifacts published without a release workflow (medium); a
version file out of step with the tags, a long-lived develop branch (low).
dev delivery apply --why "first release policy: service, CalVer, Maven verify gate" --tasks
dev delivery apply --set versioning=semver --set test_gate="./mvnw -B verify" --why "it is a library now"dev delivery apply writes policies/<project id>.json (or policies/initiatives/<slug>.json) in the handoff
repository: the versioning and tag format, the version source, the release flow, the changelog, the test gate, the
CI, the branch model, what it publishes and deploys, the bump rule, and an optional release train. Each change bumps
the policy's version, adds a history line (who, when, what changed, why), and makes one commit. --tasks opens a
work item for each gap. Change policies/ only with dev delivery apply, which keeps that history.
The optional field job_timeout_minutes (default 30, from 5 to 360) is the CI job limit that dev ci audit suggests,
dev ci audit --fix writes, and dev ci init gives every job it generates (see
CI/CD pipelines › Job timeouts). The policy's test gate is also what
the test job of a generated pipeline runs.
dev delivery apply --set job_timeout_minutes=45 --why "integration tests take 35 minutes"- Every session sees it. The session context shows the policy in one line: versioning and tag format, release
flow, and test gate. A project without one gets a reminder to run
dev deliverybefore its first release. dev releaserefuses tags that break it. In a CalVer project,dev release --version 2.0.0is refused with the next version to use (dev calver --next); in a SemVer project, a tag that is notvMAJOR.MINOR.PATCHis refused, and in apep440project, a tag that is not a PEP 440 version. Change the policy to release another way. A rawgit tagis not checked.dev releasenames the tag in the project's format. The tag isv26.11.4when the policy's tag format starts withv(vYY.MM.PATCH) and26.11.4when it does not (YY.MM.PATCH). When no policy is recorded, or the policy names no tag format, the format is the onedev deliverydetects from the repository's CalVer, SemVer, or PEP 440 tags, spelled as the newest version tag is (afterv26.10.0and26.11.0, without thev), andv<version>when there is none.dev releasepushes that tag and names the GitHub release after it, a refused tag is told in that spelling, anddev calverand devkit's CI watch use it too.- The release workflow runs on every release tag of the format. The pipeline that
dev ci initgenerates runs on tags spelled asdev releasespells them:X.Y.Zunder CalVer;X.Y.Zand its pre-releases (X.Y.Z-rc.1) under SemVer; and under PEP 440,X.Y.Zwith anaN,bN, orrcNpre-release, a.postN, and a.devN(0.1.0a17). On GitHub and GitLab no other tag starts a release,v1.2.3junkand SemVer build metadata (1.2.3+build.5) included; the Bitbucket and Azure patterns are wider (v*.*.*,v*).dev releasetakesX.Y.Zonly, so a SemVer pre-release tag comes fromdev push, and under PEP 440 a version without three release numbers or with an epoch (0.2a1,1!1.0.0) starts no release workflow. - Release work requires the
release-policyskill. Tags and releases (git tag,dev release,gh release),releasework, and changes toVERSIONor release-tool configuration require thedeliveryandrelease-policyskills. A push or a PR requiresdelivery, and aCHANGELOG.mdentry requiresdocs(see Skills and plugins › Required skills).
devkit records its own policy this way, with CalVer vYY.MM.PATCH from VERSION, a Keep a Changelog CHANGELOG.md,
and a test gate that compiles the code and runs the suite with Homebrew's Python and with the macOS system Python 3.9.
dev ci # workflows, triggers, jobs, runners, matrices, setup actions, every run: command
dev ci --commands # only the commands, in order
dev ci --runs # plus the recent runs
dev ci --run --dry-run # which of those steps run on your Mac, and why the others do not
dev ci audit # what makes the pipeline slow, unreliable, or unsafe, with the fixesUse the same tool versions as the setup steps (setup-node, setup-java, setup-python). To diagnose, fix, or set up
the pipeline itself, see CI/CD pipelines.
dev branch new feat/x # from an up-to-date origin/main
# … small steps, targeted tests while iterating …
dev commit -a -m "feat(scope): summary" --why "the problem and who it affects" --verified "the command and its result"
dev ci --run # the full local equivalent of CI: lint, types, unit, integration (Testcontainers), build
dev sec scan # secrets, dependencies, code patterns, IaC, workflows
dev push # one push, only with local CI evidence for exactly these files
dev pr create --dry-run | sed '1,/^---$/d' > body.md # the pre-filled body; fill "What and why", then:
dev pr create --body-file body.md
dev ci watch --wait --pr <n> # an agent arms it as a Monitor or background command and names its task idThe commit message follows devkit's commit template: --why writes the reason, --verified the Verified: line
with the command you ran and its result (see Git and GitHub › Commits).
The pull request description follows the template in Templates › Pull request
description: what and why, changes, how to verify (with the local results),
risk and rollback, links. dev pr create fills the changes, the local CI result, and the links, and refuses a PR
whose "What and why" or "How to verify" is still empty. The title follows the repository's own convention: a
Conventional Commit, or a plain imperative sentence where the recent pull request titles are sentences (see
Git and GitHub › Create).
A local run cannot test how long a job may run or which runs cancel each other. When a commit changes only those
settings after a local run, such as a longer timeout-minutes for a slow test job, devkit keeps that run's evidence
instead of asking for a new one. The evidence carries over to HEAD when all of these hold:
- Every file changed since the tree with evidence is a GitHub workflow (
.github/workflows/*.yml) that was edited, not added or deleted. - Each one differs only in
timeout-minutes,concurrency(itsgroupandcancel-in-progress), or comments. Two checks must agree: devkit's reading of the workflow is the same once those settings are left out, and every added or removed line is blank, a comment, or one of those settings. - No changed workflow uses YAML anchors, aliases, merge keys, tags, or directives.
- Nothing under
.github, and nozizmor.ymlorzizmor.yamlat the root, has uncommitted changes, andactionlint(brew install actionlint) anddev ci audit(no high or critical finding) pass on the workflows.
dev push, dev pr create, dev pr ready, dev release, and dev ci --evidence then record a host-only marker for
HEAD that names the run it rests on and what was checked, and say so:
local CI evidence carried over: only CI host settings changed since the local run on c6fedeb (.github/workflows/ci.yml: jobs.test.timeout-minutes), which a local run cannot exercise · actionlint: no findings · dev ci audit: no high or critical finding
✓ local CI evidence for 23899fb: dev ci --mark-passed on c6fedeb, then CI host settings only (.github/workflows/ci.yml: jobs.test.timeout-minutes), just now
Any other change needs a local run: a run command, a step, a trigger, the permissions, the matrix, the runner
(runs-on), or another file. The refusal names the first difference, such as
.github/workflows/ci.yml changed jobs.test.steps[1].run, which a local run exercises. dev ci --run --resume keeps a
passed step after a host-only change, except a scanner that reads every file (such as gitleaks, semgrep, trivy, Vale,
or dev sec scan), which runs again because it reads the workflow too.
"Push once" protects CI time, not your work: a commit that exists only on this Mac is lost with the disk. Back up as you go whenever that costs no CI run, open the PR early as a draft, and mark it ready once:
dev backup # the branch to origin, only when the push starts no CI run (fast-forward, scanned)
dev pr create --draft # visible early; a draft runs no job when ci.yml has the draft gate
dev pr ready # the one CI run: marking it ready starts it, with local CI evidence for HEADdev backup reads the CI configuration of the commit it would send and pushes only when it shows that the push
starts no run: in this repository, ci.yml runs on pull requests and pushes to main, so a branch push is free.
When the push would start CI, or devkit cannot tell, it does not push and says why and what to do
(dev backup --accept-ci, or a branches-ignore entry). It never pushes the default branch, a long-lived branch
(main, master, develop, gh-pages) or a branch a workflow deploys from, never forces, stops at a diverged
remote branch with the commands to resolve it, and runs the secret scan on exactly the commits it sends: those the
remote it pushes to does not have, even when another remote has them.
dev sync does the same every hour and at the end of a session, for commits older than backup.after_minutes
(30 by default; backup.auto: false turns it off). The branch map (dev branch ls, dev status, the handoff note)
shows each branch's last backup, or why it is not backed up.
Each project has a backup policy, kept in its handoff note so that every machine and the team follow it: on
(dev backup and the hourly dev sync push its branches), off (never), or ask. Without a choice, a private
repository is on and a public one is ask (so is one whose visibility devkit cannot read), because a backup of a
public repository publishes the branch at once. With ask, a dev backup run in a terminal asks once and records
on or off. A backup with no terminal to ask in (an agent's call, dev sync) asks nobody: in auto mode a private
or internal repository's branches are backed up, and a public repository's branches wait for dev backup --public
or a policy of on; in guided mode every branch waits and the message says so. Explicit off remains effective. Set the policy through
dev backup policy on --why "open source: the code is public anyway" (or off, or ask); dev backup policy
shows it, and so do dev status, dev branch ls, the handoff note and the messages of dev backup. The policy
records the repository's visibility when it was set. An on set while the repository was private, or before devkit
recorded the visibility, no longer holds once the repository is public or its visibility cannot be read: devkit
treats it as ask again, because a backup would now publish the branch. A policy set while visibility was
unavailable records unknown; a later visibility change triggers that check too. The skipped backup says which
visibility the policy was decided for.
dev backup --public pushes once, whatever the policy. With on, embargoes still hold, and on a public repository a
branch whose new commits read as a security fix, or change a red-team test that still expects a failure (an open gap),
still waits for an embargo or --public. Changing the policy, dev backup --public, and dev branch embargo --lift
run for whoever calls them, you or an agent: in guided mode, the global instructions have the agent ask you first, as for any decision about
risk. A backup does not incidentally lift an embargo.
A branch that must stay off a public remote, such as an unreleased security fix, gets an embargo:
dev branch embargo fix/x --why "discloses an open hole" --until "the security release". No backup pushes it, nor a
branch that holds its commits (also after fix/x is merged into a release branch and deleted: the embargo keeps
the branch's tips), until dev branch embargo --lift fix/x. dev push and dev backup read the embargoes of every
project in one pass and hold any project's embargoed commits, so a copy of the project under another project's
remote, or with none, still keeps them here. A branch's own name counts only for this checkout's project and the
one the push target names. Only the commits the push target already has count as public: a commit on another remote
stays held. When devkit cannot read a project's handoff note, or an audit trail file it reads embargoes from, it
backs up and pushes nothing, and the refusal names what it could not read. On a public repository, devkit suggests
an embargo when a branch's commits read as a security
fix.
An embargo binds devkit's own commands: dev backup, dev sync, and dev push never send an embargoed branch or
the commits its embargo holds. It does not stop a raw git push or gh pr create, which run with your permissions
whoever types them; protect the branch on your Git host when that matters.
The embargo list and the backup policy in the handoff note change through dev branch embargo (--lift to lift
one) and dev backup policy, which record who changed them and why. An embargo that disappears from the note
without its lift record (git.embargo in the audit trail) keeps holding, in backups and the branch map, until
dev branch embargo --lift.
dev ci init writes the draft gate, and dev ci audit --fix adds it to an existing workflow:
types: [opened, synchronize, reopened, ready_for_review] on pull_request and
if: github.event.pull_request.draft == false on the jobs. With delivery.draft_pr on, dev pr create opens
drafts by default (--ready for a PR that is ready now).
dev branch new release/26.11.4
git merge --no-ff origin/feat/a # oldest dependency first
git merge --no-ff feat/b # local branches of other worktrees work too: same repository
# resolve conflicts once; bump the version, CHANGELOG and docs once
dev ci --run # the full local suite on the result
dev push
dev pr create --title "chore(release): 26.11.4" --body-file body.md # "Integrates #12, #17, #22"
dev ci watch --wait --pr <n>Ask the sessions working on those branches to commit locally and stop pushing. Never merge the individual PRs one
after another to see what CI says; the integration PR supersedes them. dev calver prints the next version and the
release branch name when the project uses CalVer.
Branches that run in parallel all edit CHANGELOG.md, so their merges collide on it even when their code does not. A
repository that keeps a changes/ folder takes its CHANGELOG lines from fragments instead:
-
Each branch writes its lines to
changes/<branch>.md, its name with/as-:feat/invoice-exportwriteschanges/feat-invoice-export.md. The lines go under Keep a Changelog headings (### Added,### Changed,### Deprecated,### Removed,### Fixed,### Security); each entry starts with a-bullet, and its next lines are indented by two spaces:### Added - The invoice list exports a month as CSV. ### Fixed - The login page keeps the last user for 30 days, as the settings page says.
-
On the release branch, after the merges,
dev releasewrites every fragment into the version's section ofCHANGELOG.md, in Keep a Changelog's order, and removes the fragment files; both are staged for the release commit. The version is--version, else the one the branch names (release/26.11.4); anintegration/<topic>orhotfix/<topic>branch names none, so it needs--version. The version is checked asdev releasechecks a tag's:X.Y.Z(a plausibleYY.MM.PATCHunder CalVer), or PEP 440 where the repository uses it, and refused when its tag already exists here or onorigin, with or without thev(v26.11.4or26.11.4), so a released section takes no new lines. A section the release already has keeps its lines and takes the fragments' entries after them; a new one goes before the newest release, below an Unreleased section, or, with no release yet, at the end. The link definitions at the end of the file stay there. Nothing is tagged on a release branch. -
Review the section, bump the version files, and commit. A second
dev releasebefore that commit says so. Then go on as for any change:dev ci --run,dev push,dev pr create. After the merge,dev releaseon the default branch tags the release, and refuses while a fragment is left.
dev release --dry-run # on release/26.11.4: the fragments it would write into CHANGELOG.md
dev release # writes them and removes the fragments, staged; tags nothing here
dev commit -m "chore(release): 26.11.4" --why "…" --verified "…"dev ci --run and dev ci --mark-passed fail a branch that changes CHANGELOG.md when it is not a release/,
hotfix/ or integration/ branch. They name the commits that changed it and the fragment to move the lines to, and
a branch cut from an unmerged release branch is judged by its own commits only. They also fail, and dev release
refuses, naming the file and line, on a fragment they cannot read or that is not UTF-8, a symbolic link in
changes/, or a file there that is no .md fragment. dev ci --run --dry-run names the first of these problems it
finds and still plans the steps.
changes/README.md is no fragment: it explains the format and keeps the folder, which turns these checks on, after a
release removed every fragment. A repository without a changes/ folder keeps editing CHANGELOG.md as before.
After every push, PR, merge or release, devkit follows the run in the background (dev ci watch) and tells the
session how it ended at the session's next hook. A hook runs only when the session does something, so that watch
wakes no idle agent. An agent that waits on the run arms a wait that wakes it, in the same turn, and names its
task id in its reply. CI is one source of the one wait for every devkit event, dev watch --wait: the background
watch's result reaches the agent through it, together with its crew's questions and decisions (see
Progress and communication › Waiting and waking). To follow one
run job by job, the agent arms dev ci watch --wait instead: in Claude Code as a Monitor or a background command; in
Codex, which has no background wake-up, in the foreground with a timeout. A wait that ends before its run (exit 3) is
armed again with the command dev watches or dev ci watches prints. The Stop hook sends back a turn that sent work
to origin and left its unfinished run with nothing that wakes the agent.
dev watch --wait # every devkit event, the CI result included (Claude Code: in the background)
dev ci watch --wait --pr <n> # a PR's head, or its merge commit once merged
dev ci watch --wait --tag v26.11.4 # a release tag
dev ci watches # live watches, and expired ones with the command to re-arm each
dev ci status # a look at the runs of the branch: state, jobs, current step, elapsed, ETAdev ci status is for a look; it wakes nobody. It works with GitHub Actions, GitLab CI, Bitbucket Pipelines and
Azure Pipelines; the ETA comes from the last successful runs of the same pipeline. The details and the sign-in each
host needs are in
Commands › dev ci status,
and the watch's exit codes in CI/CD pipelines › Watch every run.
After every push, dev ci watch follows the run and, when it fails, reports the first error, its class, and one next
action (see CI/CD pipelines › Watch every run).
-
Read the real error:
dev run view --failed(ordev pr checks) shows the failing step and the relevant lines of its log. -
Reproduce it locally with the same command and versions, fix it, and run the full local suite (
dev ci --run). -
Push once. One fix per push, never a "try this and see."
-
If the failure truly cannot be reproduced on macOS (Linux-only paths, case-sensitive file system, a CI-only secret, runner limits), say so, make the smallest targeted fix, push once, and explain it in the PR.
-
A flaky failure is re-run only with evidence (passes locally repeatedly, unrelated to the change, known history), recorded in the handoff note, with an explicit acknowledgement:
dev run rerun <run-id> --flaky "PaymentIT times out on the runner; passed 5 times locally, unrelated to this change"
devkit records the reason in the project's session log and re-runs only the failed jobs.
Release by the recorded policy (see The delivery policy); dev delivery shows it.
-
Run
dev sec scanon the integration branch and fix or justify every finding. -
From the verified, green integration branch, merge with the repository's strategy:
dev pr merge(squash or merge commit). A squash message repeats the PR title and says what changed and why in one or two sentences, with no attribution lines;dev pr mergewrites it from the PR, and marks the open work items linked to the merged branch done. -
Tag with the policy's format (signed if the project signs tags), push the tag, and create the release with notes from the CHANGELOG:
dev release(--dry-runfirst) does all three, after it checks the version files, the local CI evidence, and the CI of the commit. It also refuses while work items linked to branches merged since the previous tag are still open: close the shipped ones (dev task reconcile --apply), or give--why "<reason>". In a repository that keeps change fragments, it refuses while a fragment is left: write them into the CHANGELOG on the release branch first.dev calvergives the next CalVer version.Python metadata may omit zero padding in the three numeric version components:
26.11.8inpyproject.tomlmatches a requested26.11.08. The tag retains the requested spelling; other version files still match exactly. The release CI check excludes only authenticated GitHub Dependabot update automation. Repository workflows, including Dependabot pull request CI, and runs whose updater identity cannot be verified still count. See Release checks for the verification rules.A failed run on the commit refuses the release. A run still in progress does not hold it when a pull request run already passed the same tree:
dev releaselooks for a commit with HEAD's tree whose pull request run, from this repository and not a fork, passed every job still running or queued on HEAD (a job with the same name, in the same workflow file, that succeeded, not skipped), first among HEAD's parents (a merge commit's second parent is the PR's head), then among the PR heads GitHub links to HEAD (a squash or rebase merge). It names that commit (and the PR, when GitHub linked it) and releases without waiting. A skipped, still running, or push-only run does not count, and a job the PR run did not pass holds the release until it passes on HEAD, even before HEAD lists it. Whenmainmoved on before the merge,dev releasestill refuses until the run on HEAD ends (dev ci status --watch). -
Download or install the published artifact and smoke-test it.
-
Update the handoff note (version, what shipped, follow-ups), and mark done with
dev task done <id>any task that shipped without a branch of its own.
- Git is the source of truth for code, configuration, infrastructure, and deployment manifests.
- Environments change only through merged PRs and tags that pipelines deploy; no manual changes, no drift. An emergency manual change is captured in git immediately.
- Secrets live in the secret manager or CI secrets, referenced by name, never in the repository.
dev commitrefuses a commit when gitleaks finds a secret in it. - Workflows use least-privilege
permissions:and actions pinned to a full commit SHA;dev sec scanchecks them with zizmor.
These rules belong to devkit's own commands. An agent runs with your permissions, so a raw git or gh command
skips them (see Concepts › Agents act with your permissions).
| Rule | Behavior |
|---|---|
| Blind re-runs | dev run rerun needs --flaky with the reason. |
| Merges and releases | dev pr merge waits for green checks and reviews, and dev gh pr merge refuses --admin; dev release follows the delivery policy and needs CI evidence. |
| Force pushes | dev push refuses a diverged branch without --force-with-lease, a lease that would drop someone else's commits, and any push to the default branch; dev git push refuses plain --force, -f, and +refspec. |
| Branch names | dev branch new, dev branch rename, dev push, and dev pr create refuse a name that breaks <type>/<ticket>-<topic>. |
| Secrets | dev commit refuses a commit that contains a secret found by gitleaks. |
| Tags | dev release refuses a tag that breaks the recorded delivery policy. |
| Change fragments | With a changes/ folder, dev ci --run and dev ci --mark-passed fail a CHANGELOG.md edit outside a release branch and a fragment they cannot read; dev release on a release branch refuses a version that is already tagged, and on the default branch while a fragment is left. |
| Policies | dev delivery apply is the one writer of policies/ in the handoff repository. |
See also Git and GitHub, Security policy, Commands › dev ci and Templates.