3. Declarative Workflow Policy

3.1 Declarative Workflow Policy Schema

chinwag workflow verify --policy chinwag.workflow.yaml

Full declarative repository contract reference for chinwag.workflow.yaml covering checkpoints, remote receipts, cross-model pair/triad lanes, visual geometry and copy gates, and zero-knowledge privacy.

3.1 Declarative Workflow Policy Schema

chinwag workflow verify --policy chinwag.workflow.yaml

Outcome Summary & Δ Velocity Proof: Drop chinwag.workflow.yaml into your repository root to turn best-practice engineering habits into cryptographically enforced repository law (WP-01..WP-15), evaluated in 0.51 ms over 32-byte keyed BLAKE3 commitments.


1. Canonical chinwag.workflow.yaml (chinwag.workflow/v1)

# chinwag.workflow.yaml · Pinned via PolicyRevisionPinV1
schema: chinwag.workflow/v1
name: chinwag-way
preset: chinwag-way
org_floor_epoch: 14                    # Monotonically bounded by CISO OrgPolicyFloorV1 (WP-05)

checkpoints:
  vcs: jj                              # Shadow JJ colocated with Git (jj git init --colocate)
  cadence: coherent-change             # Protected by OrgPolicyFloorV1
  max_checkpoint_loc: 150              # INV-SMALL-JJ-DIFF-01 (soft cap 150 LOC, hard ceiling 300 LOC)
  before_handoff: true                 # WP-02 / WP-03
  before_context_reset: true
  require_description: true

publication:
  destination: github-review-branch
  require_remote_receipt: true         # Hook H1: independent git ls-remote readback (WP-03)
  receipt_verifier: git-ls-remote
  on_failure: preserve-local-checkpoint # WP-07: Never silently force-push or guess auth

verification:
  checks: project-required
  require_ci_on_exact_commit: true     # Hook H2: WP-04 Stale-Evidence Guard
  direct_agent_ci_wakeup: true         # Encrypted root-cause wakeup & fix cycle (50 Cr per failed CI run)
  max_auto_repair_attempts: 2          # 2-Strike Loop Breaker -> PAUSED_FOR_HUMAN
  independent_review: required         # Reviewer seat & model != Author (WP-04 / WP-05)
  pair_lane:
    isolated_jj_workspaces: true       # Workspace A <-> Workspace B (<-> Workspace C)
    orthogonal_model_families: true    # e.g. OpenAI <-> Gemini <-> Anthropic
  visual_tribunal:
    enabled: true                      # WP-13: Chinwag Vision-3 + Stage-1 DOM Physics (176/176)
    engine: chinwag-vision-3
    trigger_paths: ["**/*.html", "**/*.css", "**/*.tsx", "crates/**/ui*.rs"]
    viewports: ["1600x900", "1440x900", "1024x768", "768x1024", "390x844"]
    themes: ["midnight", "daylight"]
    geometry_invariants:
      max_topbar_height_px: 56
      enforce_sibling_header_align: true
      min_wcag_contrast_ratio: 4.5
    tribunal_seats:
      - role: ui_ux_layout
        seat: "@ui-seat"
      - role: typography_scannability
        seat: "@typography-seat"
      - role: theme_tokens_contrast
        seat: "@theme-seat"
      - role: hierarchy_copy
        seat: "@copy-gate"
    quorum_required: 3
    separation_of_powers: workflow-only # WP-06: Compliance != Task Acceptance
  copy_gate:
    enabled: true                      # INV-DECLARATION-COPY-GATE-01 (64/64 checks)
    seat: "@copy-gate"
    paths: ["**/*.html", "**/*.md"]

changes:
  activation: authorized-review        # WP-08: acceptor.seat != author.seat
  in_flight_runs: retain-pinned-policy # WP-01: PolicyRevisionPinV1

privacy:
  mode: zero-knowledge-e2ee            # OrgPolicyFloorV1 (WP-09..WP-15)
  kem: x25519-mlkem768                 # Hybrid PQ-HPKE (RFC 9180 + NIST FIPS 203)
  aead: chacha20poly1305
  commitments: blake3-keyed-256
  viewer: local-loopback-only          # Decrypted strictly on your machine

2. Top-Level Schema Sections

Section KeyEnforced RulesPurpose
checkpointsWP-02, INV-SMALL-JJ-DIFF-01Configures colocated Shadow jj checkpoints, mandatory commit descriptions, and the 150 LOC atomic diff cap.
publicationWP-03, WP-07Requires independent git ls-remote verification (RemoteReceiptV1) and forbids destructive force-pushes on auth failure.
verificationWP-04, WP-06, WP-13Enforces exact-commit CI binding, direct-to-agent encrypted CI wakeup (50 Cr per failed CI run), 2-strike loop breaking, cross-model review, Chinwag Vision-3 UI gates, and INV-DECLARATION-COPY-GATE-01.
changesWP-01, WP-08Pins active policy revisions (PolicyRevisionPinV1) for in-flight runs and requires two-person sign-off (acceptor != author) for policy edits.
privacyWP-09..WP-12, WP-14..WP-15Locks client-side X25519MLKEM768 sealing, dual Ed25519 signatures (SignedHpkeBlobV1), and loopback-only decryption.

Verification Command

chinwag openspec validate --json