2.3 Cryptographic File-Scope Leases & Small-Diff Gates
chinwag claim --file-scope "crates/**" --ttl 120sEd25519-signed 120s path leases (SignedClaimReceipt), mutually exclusive --file-scope globs in .chinwag/state.crdb, and mandatory <=150 LOC atomic checkpoints.
2.3 Cryptographic File-Scope Leases & Small-Diff Gates
chinwag claim --file-scope "crates/**" --ttl 120s
Outcome Summary & Δ Velocity Proof: Prevent parallel coding agents from silently overwriting each other's files or dumping unreviewable 1,500-line commits. Chinwag enforces
Ed25519-signed file-scope leases (MAX_TTL_SECONDS = 120) and mandatory small, atomicjjcheckpoints (<= 150 LOC).
1. Pre-Claim Architectural & File-Scope Lease Gate (chinwag-claim)
Before any agent writes a single byte to disk, it must acquire a signed claim lease (SignedClaimReceipt::verify_binding) in .chinwag/state.crdb:
- Disjoint
--file-scopeGlobs: Whenchinwag pair startorchinwag triad startis invoked, Chinwag intersects the requested path globs (--seat-a "backend-seat:crates/api/**",--seat-b "ui-seat:web/**"). If two seats request overlapping write globs without an explicit interface contract,chinwagfails closed (exit 78) before execution begins. - Pre-Claim Invariant & Tombstone Check (
inv-pre-claim-architectural-gate-v1): Acquiring a lease automatically queries.chinwag/state.crdband.chinwag/memory.crdb.leannfor activeverified_invariantsandDO_NOT_REPEATnegative tombstones matching the targetfile_scope. - 120-Second Bounded TTL & Quiescence (
MAX_TTL_SECONDS = 120): Leases automatically expire after 120 seconds unless renewed by an active, healthy agent process group (GroupState::Quiescentcheck).
2. Mandatory Small-Diff Checkpoint Gate (INV-SMALL-JJ-DIFF-01)
Large diffs destroy review quality and inflate LLM context costs. Every chinwag task checkpoint, chinwag pair checkpoint, and chinwag triad checkpoint enforces:
- Soft Cap (
150 LOC): Target atomic checkpoint size (~50–150net changed lines of code,< 4,000review tokens). - Hard Ceiling (
300 LOC): Ifjj diff --statexceeds300 LOC,chinwagprompts the agent (or invokes Chinwag Delivery-2) to runjj splitinto smaller coherent revisions before handoff. - Repository Persistence (
INV-REPO-PERSIST-01): Verifies the workspace has a valid remote (origin) and zero untracked scratch binaries outside the repository.
Verification Command
chinwag memory recall --bank default --query "lease invariant" --file-scope "src/**" --limit 5
- Ready to ship verified code at autonomous speed? Reserve Your Organization Credit Pack →
2.2 Isolated Shadow Workspaces
How chinwag pair and chinwag triad provision isolated colocated Shadow Jujutsu (jj) workspaces under standard Git with 0 index.lock collisions and 0ms automatic rebase.
2.4 Sub-Issue to Subagent Fan-Out & Delta Velocity
1:1 mapping of GitHub Projects v2 subIssues and Linear children to parallel subagent leases across 4 execution tiers, plus DORA dual-denominator speedup math.