Repository Delivery
Overview
Deliver an already understood and reviewed change through the shortest safe Git path.
Ordinary delivery is the default: freeze scope and branch once, execute the authorized
Git chain as one bounded transaction, and read back the final refs once.
Consume urn:skills:delivery-request:v1 and produce
urn:skills:delivery-receipt:v1 only after the requested target is read back. A local
commit is local durability, not remote delivery, deployment, or production proof.
Workflow
- Compact preflight: read effective guidance and run one branch-aware status. Freeze
authorization, branch/upstream, exact paths or hunks, accepted validation basis, and
history strategy. Fetch only when a remote action needs fresh divergence. Stop on
unrelated staged content, mixed ownership, or unresolved strategy.
- One transaction: reuse unchanged implementation/review validation. Stage exact
paths or hunks, run cached
diff --check, and inspect only cached stat and
name-status. Do not print or reread the full cached diff unless mixed/unreviewed hunks
make content inspection necessary. Then perform the authorized commit/rebase/push
chain without returning to the model between successful steps. Prefer
scripts/compact-delivery.sh for an ordinary exact-path commit with optional rebase
and push; otherwise use one equivalent bounded command or one execution agent.
- One readback: after the chain, read local branch/SHA/status and, after push, the
actual remote ref in the same execution. Compare the final SHA once. Do not perform
per-file remote comparisons unless a named manifest, generated artifact contract,
or explicit user request requires them. Report unchecked CI, deployment, runtime,
or production state as
Not verified.
Parallel Current-Branch Delivery
When the authorized outcome is to commit current changes, synchronize the same remote
branch, rebase, and push, default to one writer executing these stages sequentially.
Use two preparatory owners only when delegation is authorized, their state can be
isolated safely, and the expected benefit exceeds coordination cost:
- Commit owner: the only Worktree/index/
HEAD writer. It stages the exact accepted
scope, performs cached checks, and creates the local commit.
- Remote owner: owns only remote-ref preparation. It fetches the named remote branch
and returns its exact SHA/divergence without touching the Worktree, index, or
HEAD.
- After both complete, one writer verifies their bases and runs
git rebase against
the fetched exact remote ref; git pull --rebase is acceptable when no reliable
prefetched ref is available. This final phase is single-writer, never parallel.
- On conflict, the same writer resolves only conflicts whose local and remote intent
is established, runs the smallest affected check, continues the rebase, pushes, and
performs one remote-SHA readback. Stop on unrelated or ambiguous conflict ownership.
If the host cannot isolate the commit and remote-ref owners safely, keep one execution
agent and one composite transaction rather than risk concurrent Git state mutation.
For same-process ordinary delivery, current Git evidence is sufficient. Persist a
minimal PackageManifest/receipt record only when Forgeway integration, a cross-session
workflow, or repository policy actually requires resumable typed state.
Conditional Paths
- Branch-owned environment configuration: when integrating between environment
branches, freeze the source and target SHAs and inventory the target-owned manifest,
endpoint, package identity, native plugin, push/vendor-channel, signing, and native
resource paths before mutation. Prefer business-only commits. If a historical commit
mixes business and environment changes, apply it without committing, restore the
target-owned paths from the frozen target SHA, and inspect the final name-status and
configuration diff before committing. Never resolve a configuration conflict by
accepting the whole source file merely because the syntax is valid.
- Shared-branch restoration: verify that the requested version maps to an actual
commit. If it does not, record the selected baseline and explicitly allowed safety
differences, create and read back a recoverable archive ref for displaced history,
then restore with a normal forward commit. Do not force-push or rewrite the shared
branch; after push, compare the actual remote SHA and the final tree against the
declared baseline.
- Large-task durability: use execution durability
only for an authorized semantic milestone, targeted fixup, or exceptional checkpoint
on a non-default task branch. These commits do not imply review or merge readiness.
- History normalization: use history normalization
only with explicit rewrite authority, exclusive branch ownership, a recoverable
before SHA, and before/after tree proof.
- Review publication: publish a fixed non-default GitHub branch only when an
external reviewer explicitly needs its URL and SHA. Never create a pull request or
update
main through this path.
- Skills catalog release: load Skills release, run
the canonical catalog gate once on the final basis, deliver the reviewed scope, then
handle separately authorized runtime installation from the immutable delivered ref.
- Forgeway delivery: bind the reviewed Result Package, authorization, mutation
scope, target, and readback to its Run/Attempt. Deployment and Production still need
separate receipts.
Hard Rules
- Missing action-specific authorization stops as
missing-authorization. Commit does
not imply push; push does not imply integration, cleanup, deployment, or production.
- Preserve unrelated work. Never use broad staging when exact paths or hunks are
available, and stop on unrelated pre-staged content.
- A grounding record may identify evidence gaps, but it never authorizes stage, commit, push,
integration, cleanup, or pull-request actions.
- Do not merge or rebase over unexplained dirty state, force-push after rejection, or
rewrite a default/protected/shared branch.
- Do not rerun unchanged full validation after an accepted final-basis pass. Rerun only
when the basis changed or the repository's final delivery policy requires it.
- Keep successful delivery output to branch, commit SHA, pushed ref/SHA, staged-file
count, remaining-entry count, and any
Not verified boundary. Expand command output
only on failure.
- Verify remote success from the actual remote ref, not a command exit or local
tracking ref.
- Never create or update a pull request, tag, release, deployment, or registry
publication unless a separate owning workflow and explicit authorization cover it.
Output
Return capability repository.git.deliver with mode, authorization, target, branch and
divergence, accepted basis/scope, staged paths, validation reused or run, commit/ref
proof, remaining Worktree content, cleanup, and Not verified gaps. Emit a typed
DeliveryReceipt only when its target readback exists; otherwise state why none exists.
References
- Ordinary delivery: usage, checklist,
report, evals.
- Conditional: durability,
normalization,
conflicts,
Skills release.
- Ordinary exact-path transaction helper: compact-delivery.sh.
1---2name: repo-delivery3description: Use when reviewed repository changes are explicitly authorized for staging, commit, push, branch integration, synchronization, cleanup, or ref proof; owns Git mutation and stops before pull-request creation.4---56# Repository Delivery78## Overview910Deliver an already understood and reviewed change through the shortest safe Git path.11Ordinary delivery is the default: freeze scope and branch once, execute the authorized12Git chain as one bounded transaction, and read back the final refs once.1314Consume `urn:skills:delivery-request:v1` and produce15`urn:skills:delivery-receipt:v1` only after the requested target is read back. A local16commit is local durability, not remote delivery, deployment, or production proof.1718## Workflow19201. **Compact preflight:** read effective guidance and run one branch-aware status. Freeze21 authorization, branch/upstream, exact paths or hunks, accepted validation basis, and22 history strategy. Fetch only when a remote action needs fresh divergence. Stop on23 unrelated staged content, mixed ownership, or unresolved strategy.242. **One transaction:** reuse unchanged implementation/review validation. Stage exact25 paths or hunks, run cached `diff --check`, and inspect only cached stat and26 name-status. Do not print or reread the full cached diff unless mixed/unreviewed hunks27 make content inspection necessary. Then perform the authorized commit/rebase/push28 chain without returning to the model between successful steps. Prefer29 `scripts/compact-delivery.sh` for an ordinary exact-path commit with optional rebase30 and push; otherwise use one equivalent bounded command or one execution agent.313. **One readback:** after the chain, read local branch/SHA/status and, after push, the32 actual remote ref in the same execution. Compare the final SHA once. Do not perform33 per-file remote comparisons unless a named manifest, generated artifact contract,34 or explicit user request requires them. Report unchecked CI, deployment, runtime,35 or production state as `Not verified`.3637## Parallel Current-Branch Delivery3839When the authorized outcome is to commit current changes, synchronize the same remote40branch, rebase, and push, default to one writer executing these stages sequentially.41Use two preparatory owners only when delegation is authorized, their state can be42isolated safely, and the expected benefit exceeds coordination cost:43441. **Commit owner:** the only Worktree/index/`HEAD` writer. It stages the exact accepted45 scope, performs cached checks, and creates the local commit.462. **Remote owner:** owns only remote-ref preparation. It fetches the named remote branch47 and returns its exact SHA/divergence without touching the Worktree, index, or `HEAD`.483. After both complete, one writer verifies their bases and runs `git rebase` against49 the fetched exact remote ref; `git pull --rebase` is acceptable when no reliable50 prefetched ref is available. This final phase is single-writer, never parallel.514. On conflict, the same writer resolves only conflicts whose local and remote intent52 is established, runs the smallest affected check, continues the rebase, pushes, and53 performs one remote-SHA readback. Stop on unrelated or ambiguous conflict ownership.5455If the host cannot isolate the commit and remote-ref owners safely, keep one execution56agent and one composite transaction rather than risk concurrent Git state mutation.5758For same-process ordinary delivery, current Git evidence is sufficient. Persist a59minimal PackageManifest/receipt record only when Forgeway integration, a cross-session60workflow, or repository policy actually requires resumable typed state.6162## Conditional Paths6364- **Branch-owned environment configuration:** when integrating between environment65 branches, freeze the source and target SHAs and inventory the target-owned manifest,66 endpoint, package identity, native plugin, push/vendor-channel, signing, and native67 resource paths before mutation. Prefer business-only commits. If a historical commit68 mixes business and environment changes, apply it without committing, restore the69 target-owned paths from the frozen target SHA, and inspect the final name-status and70 configuration diff before committing. Never resolve a configuration conflict by71 accepting the whole source file merely because the syntax is valid.72- **Shared-branch restoration:** verify that the requested version maps to an actual73 commit. If it does not, record the selected baseline and explicitly allowed safety74 differences, create and read back a recoverable archive ref for displaced history,75 then restore with a normal forward commit. Do not force-push or rewrite the shared76 branch; after push, compare the actual remote SHA and the final tree against the77 declared baseline.78- **Large-task durability:** use [execution durability](references/execution-durability.md)79 only for an authorized semantic milestone, targeted fixup, or exceptional checkpoint80 on a non-default task branch. These commits do not imply review or merge readiness.81- **History normalization:** use [history normalization](references/history-normalization.md)82 only with explicit rewrite authority, exclusive branch ownership, a recoverable83 before SHA, and before/after tree proof.84- **Review publication:** publish a fixed non-default GitHub branch only when an85 external reviewer explicitly needs its URL and SHA. Never create a pull request or86 update `main` through this path.87- **Skills catalog release:** load [Skills release](references/skills-release.md), run88 the canonical catalog gate once on the final basis, deliver the reviewed scope, then89 handle separately authorized runtime installation from the immutable delivered ref.90- **Forgeway delivery:** bind the reviewed Result Package, authorization, mutation91 scope, target, and readback to its Run/Attempt. Deployment and Production still need92 separate receipts.9394## Hard Rules9596- Missing action-specific authorization stops as `missing-authorization`. Commit does97 not imply push; push does not imply integration, cleanup, deployment, or production.98- Preserve unrelated work. Never use broad staging when exact paths or hunks are99 available, and stop on unrelated pre-staged content.100- A grounding record may identify evidence gaps, but it never authorizes stage, commit, push,101 integration, cleanup, or pull-request actions.102- Do not merge or rebase over unexplained dirty state, force-push after rejection, or103 rewrite a default/protected/shared branch.104- Do not rerun unchanged full validation after an accepted final-basis pass. Rerun only105 when the basis changed or the repository's final delivery policy requires it.106- Keep successful delivery output to branch, commit SHA, pushed ref/SHA, staged-file107 count, remaining-entry count, and any `Not verified` boundary. Expand command output108 only on failure.109- Verify remote success from the actual remote ref, not a command exit or local110 tracking ref.111- Never create or update a pull request, tag, release, deployment, or registry112 publication unless a separate owning workflow and explicit authorization cover it.113114## Output115116Return capability `repository.git.deliver` with mode, authorization, target, branch and117divergence, accepted basis/scope, staged paths, validation reused or run, commit/ref118proof, remaining Worktree content, cleanup, and `Not verified` gaps. Emit a typed119DeliveryReceipt only when its target readback exists; otherwise state why none exists.120121## References122123- Ordinary delivery: [usage](references/usage.md), [checklist](references/checklist.md),124 [report](references/delivery-report.md), [evals](references/eval-cases.md).125- Conditional: [durability](references/execution-durability.md),126 [normalization](references/history-normalization.md),127 [conflicts](references/resolving-merge-conflicts.md),128 [Skills release](references/skills-release.md).129- Ordinary exact-path transaction helper: [compact-delivery.sh](scripts/compact-delivery.sh).