This document specifies the workflow for contributing code to a the-valley repository. It applies
identically to human developers and autonomous AI agents.
Every contribution submitted for integration satisfies four properties:
All four properties are submitted together in a single atomic git push without requiring custom
git wrappers.
sequenceDiagram
autonumber
actor Contributor as Contributor (Human or Agent)
participant Local as Local Sandbox
participant Remote as Sovereign Git Host
participant Integrator as Integrator Daemon
Contributor->>Contributor: 1. Author commits (signed via SSH)
Contributor->>Local: 2. Execute `nix run .#attest`
Local->>Local: Run hermetic checks & generate tree digest
Local->>Contributor: Sign attestation notes (Ed25519)
Contributor->>Remote: 3. `git push --atomic` (branch, request ref, attestations)
Remote->>Remote: Enforce pre-receive invariant
Remote->>Integrator: 4. Post-receive hook emits ref event
Integrator->>Integrator: 5. Evaluate OCC verdict & fast-forward target branch
Author changes on a local topic branch. Commits are signed natively using standard SSH key signing
(git commit -S).
Run the canonical verification suite using the repository helper:
nix run .#attest
This helper:
valley-tree-v1 digest over the working tree.schema/attestation.cue.refs/the-valley/attestations/<tree-digest>/<signer-key-hash>.If any check fails, no attestations are generated.
Push the topic branch, its attestations, and the integration request reference atomically:
git push --atomic origin \
feature-branch \
refs/the-valley/attestations/* \
HEAD:refs/the-valley/integration-requests/main/feature-branch
Upon receiving the push:
refs/heads/main).refs/the-valley/integration-requests/main/feature-branch.main, verifies closure-digest equality for pure
checks, fast-forwards main, records the transfer statement, and consumes the request reference.The bare repository enforces a minimal pre-receive hook with two rules:
refs/heads/main).refs/the-valley/attestations/*) are
create-only; existing attestations cannot be overwritten or deleted.All other branch creations and request refs are open to authorized contributors. All complex merge policy decisions remain in the integrator daemon.