# Autonomous AI Delivery & Executable Boards — Move a Card on GitHub or Linear. Code, Docs, Website, and QA Ship Together. Or the Card Snaps Back in 200ms.

> **Chinwag Delivery-2 & Real-Time Board Sync:** `0` extra credits for board sync & `surface-gate`.

**Surface Drift (“Code-Only Done”) is the #1 hidden tax of AI coding.** Coding agents love declaring victory the moment a compiler stops complaining. A single agent adds a Rust CLI flag or patches an API handler, opens a pull request, and marks the ticket “Done”—while your GitHub `README.md`, public documentation (`docs.chinwag.sh`), marketing pages, telemetry schemas, and `390×844` mobile layouts are left broken or weeks out of date.

Traditional project boards cannot prevent this because Jira, Linear, and GitHub Projects are passive sticky notes. Dragging a card across columns is a manual ritual with zero cryptographic link to your dependency graph, your test runners, or the downstream surfaces your users actually see.

**Chinwag Delivery-2** (`chinwag delivery enable` & `chinwag board sync-loop`) turns **GitHub Projects v2 and Linear** into executable state machines backed by `.codegraph` and our 12-pillar `chinwag-ci` gate.

> **Don’t believe it? Look at our own real-time GitHub project board.**
> *We’re not chinwaggin’ bollocks, mate.*
> Watch our autonomous fleet scope tickets on `emunlabs/chinwag`, fan out parallel sub-issues across code, docs, website, and mobile UI, enforce 12-pillar `chinwag-ci` receipts, and stamp `✓ed25519` speed multipliers alongside GitHub’s read-only, system-set `Created`, `Updated`, and `Closed` timestamps. Running `chinwag board init --github --live` provisions both **`01 · Kanban Execution Board` (`BOARD_LAYOUT` grouped by the 5 canonical `Status` columns)** and **`02 · Velocity & DORA Ledger` (`TABLE_LAYOUT`)** out of the box:
> **[View Live GitHub Project Board (`github.com/orgs/emunlabs/projects/1`) ↗](https://github.com/orgs/emunlabs/projects/1)** · **[Download GitHub Template JSON →](/templates/github-project-v2-schema.json)** · **[Download Linear Template JSON →](/templates/linear-template.json)**

## How Card-Move-Driven Delivery Works Under the Hood

Every card move on GitHub Projects v2 or Linear drives a deterministic 12-step delivery lifecycle:

1. **Moving.** An engineering lead—or `chinwag delivery enable`—moves ticket `#482` into `02 · 📐 SCOPED & BENCHMARKED` on GitHub Projects v2 or Linear.
2. **Scoping.** `Chinwag Delivery-2` queries `.codegraph` to compute the transitive blast radius, locks the DORA complexity baseline (ex: `Tier L · 50h Eng / 6.2d Cal` for `401–1,200 LOC`), and generates a deterministic `SurfaceImpactManifestV1`.
3. **Splitting.** When a CLI or backend change impacts downstream surfaces, Chinwag automatically creates repository-backed sub-issues (`INV-NO-DRAFT-ISSUES-01`): `#482.1` Code/CLI, `#482.2` Docs & `README.md`, `#482.3` Website & Telemetry, and `#482.4` Desktop/Mobile `ui-gate`.
4. **Claiming.** Moving `#482` to `03 · ⚡ IN FLIGHT — CLOCK LIVE` signs a `TaskLeaseV1` (`✓ed25519`), verifies `0` pre-staged dirty LOC on `base_head_sha`, and anchors `t_claim` to GitHub’s read-only, system-set `Created` timestamp (`INV-VELOCITY-TIMESTAMP-INTEGRITY-01`).
5. **Fanning out.** In `<5ms`, Capacity-Constrained Orthogonal Matching Pursuit (`CP-OMP`) assigns orthogonal model families (`Author.models != Reviewer.models`) in isolated copy-on-write Jujutsu (`jj`) sandboxes (`100 Cr` Pair, `150 Cr` Triad, `200 Cr` Quad) while GitHub’s native `Sub-issues progress` (`☑️ 0/4 → 3/4`) tracks live execution.
6. **Gating.** Moving the card to `04 · ⚖️ TRIBUNAL & COPY GATE` triggers the 12-pillar `chinwag-ci` runner—including Pillar 12 (`chinwag-ci surface-gate`) and Pillar 9 (`chinwag-ci ui-gate` across `1440×900` desktop & `390×844` mobile Playwright).
7. **Snapping back (200ms).** If an agent updated the Rust code but forgot `docs.chinwag.sh`, left `README.md` stale, or caused a `390×844` mobile overflow, `chinwag-ci` rejects the move and snaps the card back to `03 · ⚡ IN FLIGHT — CLOCK LIVE` in `200ms` (`INV-NO-FAKE-DONE-01`).
8. **Waking.** Before exiting, the runner seals the exact missing-surface and geometry finding into an HPKE `.cwcard` and wakes only the responsible sub-agent over outbound `:443` (`50 Credits` per failed CI run).
9. **Patching.** The woken sub-agent updates the missing documentation page and mobile CSS inside its isolated `jj` sandbox and signs the candidate commit (`✓ed25519`) while `Sub-issues progress` holds at `☑️ 3/4` (`#482.2` staged and awaiting re-gate).
10. **Re-verifying.** Fresh `chinwag-ci` re-runs all 12 pillars on the exact candidate SHA, confirming `surface-gate` green, `ui-gate` (`1440×900` & `390×844`) green, and cross-model review quorum (`H5`) green.
11. **Merging.** Chinwag auto-merges the verified `jj` worktrees to `main`, attaches the detached `✓ed25519` speed receipt, and closes all four sub-issues (`☑️ 4/4`).
12. **Shipped (Δ Verified).** The card promotes to `05 · ✓ SHIPPED — Δ VERIFIED`, locking GitHub’s system-set `Closed` timestamp (`19m 00s vs. 50h Eng baseline (6.2d Cal)` · `⚡ 157.9x Faster`), stamping `+49.68 Net Hours Saved` for GitHub/Linear Insights, and starting the `168h` 7-day commit survival (`SURV`) clock.

```bash
# Install our exact 5-column GitHub Projects v2 or Linear template (100% private by default)
$ chinwag delivery enable
$ chinwag board init --github --org acme-corp \
    --private-repo acme-corp/platform --live
$ chinwag board init --linear --team ENG --live
$ chinwag board sync-loop
```

```yaml
# .chinwag/tasks/CW-0412/surface-impact.yaml (SurfaceImpactManifestV1)
schema: SurfaceImpactManifestV1
snap_back_on_missing_surface_ms: 200
required_surfaces:
  code_cli:        "crates/chinwag-cli/src/**"         # Sub-Issue #482.1
  readme:          "README.md"                         # Sub-Issue #482.2
  docs_site:       "docs/content/cli/**"               # Sub-Issue #482.2
  marketing_site:  "scripts/site-v1/pages/**"          # Sub-Issue #482.3
  telemetry_proxy: "hosted-relay/src/**"               # Sub-Issue #482.3
  ui_qa:           "1440x900 desktop + 390x844 mobile" # Sub-Issue #482.4
```

## Question 01 — Private-by-Default & Dual-Repo Isolation

*“Wait—aren’t our engineering tickets confidential? How do your GitHub and Linear board templates keep everything private until we choose to make something public?”*

- **Tier 1 — 100% Private by Default (`public: false` & `--private-repo`):**
  For 99% of engineering organizations, every roadmap epic, security fix, and internal file path is strictly confidential. Running `chinwag board init` provisions your GitHub Projects v2 board with `updateProjectV2(public: false)` and binds all issues and sub-issues strictly to your private repository (`--private-repo`). In Linear, all workflow states, labels, and parent/sub-issue trees stay locked inside your private team ACLs. Nothing is ever exposed publicly unless an org admin explicitly opts in.
- **Tier 2 — Why Banning GitHub `DraftIssue` Cards (`INV-NO-DRAFT-ISSUES-01`) Unlocks Safe Hybrid Boards:**
  Why does Chinwag hard-ban GitHub `DraftIssue` items (`exit 78`)? Because GitHub `DraftIssue` cards live at the board layer and bypass repository permissions—meaning a draft card placed on a public board leaks its text to the world. By enforcing that every card and sub-issue is a real repository-backed `Issue`, a single GitHub Project board can safely mix cards from `--private-repo` and `--public-repo`: external visitors see only the public-repo cards you chose to showcase, while GitHub’s own repository ACL engine hides every `--private-repo` card automatically.
- **Tier 3 — The 4-Stage `H_board` Zero-Leak Gate (`INV-BOARD-ZERO-LEAK-01`):**
  When your organization chooses to publish a live velocity board or open-source bounty column (`--public-repo` / `--public-board`), every title, sub-issue, and speed receipt must pass the deterministic 4-stage `H_board` redaction gate outside the LLM: (1) rejecting `DraftIssue` mutations (`exit 78`), (2) hard-locking confidential seats (e.g., `@PATENT`) to private repositories only, (3) scrubbing RFC1918/Tailscale IPs, internal hostnames, `.env` paths, and customer emails, and (4) recording an `Ed25519`-signed `BoardRedactionReceiptV1` in `.chinwag/state.crdb`.

## Question 02 — Unfakeable Timestamps, Workflows & Executive Insights

*“How do GitHub’s native Created / Updated / Closed timestamps and Insights prove your velocity numbers aren’t gamed?”*

- **1. Anchored to GitHub’s Read-Only, System-Set Clock (`Created`, `Updated`, `Closed`):**
  Agents cannot self-report when they started or finished a task. Our GitHub Projects v2 and Linear templates expose the host’s read-only, GitHub-controlled system timestamps—`Created`, `Updated`, `Closed` (with `Created` and `Closed` permanently stamped when the issue opens and closes), `Parent issue`, and `Sub-issues progress` (`☑️ 4/4`)—directly beside `Chinwag Cycle Time`. Every `TaskLeaseV1` (`t_claim`) is cross-signed against the issue’s native `Created` timestamp and verifies `0` dirty working-tree lines on `base_head_sha` so no agent can pre-stage code before starting the clock (`INV-VELOCITY-TIMESTAMP-INTEGRITY-01`).
- **2. Diff-Scope Tier Lock (`INV-TIER-LOCK-01`) — Un-Gameable by Design:**
  An agent or developer cannot label a 15-line config tweak as `Tier L · 50h Eng / 6.2d Cal` to manufacture a fake `300x` speedup. At merge time (`H1` + `H2`), `chinwag-ci` measures the verified AST and LOC diff across all sub-issues and automatically downgrades the DORA baseline tier if the merged diff falls below that tier’s floor (`Tier S <=100 LOC`, `Tier M 101–400 LOC`, `Tier L 401–1,200 LOC`, `Tier XL 1,201+ LOC`)—making every speed multiplier **un-gameable by design**.
- **3. Executive ROI in GitHub Projects Insights & Linear Insights (`SUM(Net Hours Saved)`):**
  Because `Net Hours Saved` (`Baseline_Eng_Hours - Actual_Hours`) is stored as a native `NUMBER` field on GitHub Projects v2 and mapped to numerical estimates in Linear, VPs of Engineering and CTOs get live executive charts out of the box: chart `SUM(Net Hours Saved)` by week or sprint, break down throughput by `Execution Mode` (`Pair` vs. `Triad` vs. `Subagent Swarm`), and audit 7-day commit survival (`SURV`) alongside native board workflows.
