Skip to content

Complete the governance tooling and smooth first-time adoption - #12

Merged
welsbach merged 15 commits into
mainfrom
governance-completeness-and-getting-started
Jul 25, 2026
Merged

Complete the governance tooling and smooth first-time adoption#12
welsbach merged 15 commits into
mainfrom
governance-completeness-and-getting-started

Conversation

@asdd-agent

@asdd-agent asdd-agent Bot commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Five related improvements that make a governed setup complete out of the box and easier to adopt. Each is independently self-tested; the deterministic validation suite passes 33 of 33.

  • The audit trail is complete. Every agent that records to the ledger now also exports to the adopter's private sink, not only the reviewer. doctor enumerates every record-writing path, including the CI workflow surface, and warns on any with no export route, so a new recorder cannot silently drop its trail.
  • A capture-layer spec. An OpenSpec change defining the optional agent-trajectory capture (separate from the append-only ledger) for training data, off by default.
  • A deterministic preflight gate. The adopter's own test command runs on every pull request through a dedicated workflow; its exit status is the gate. It holds no secrets and is a no-op until set.
  • Setup guardrails. doctor warns on an unset git identity and on a heavy reasoning-model reviewer; connect-check gains --json for CI; intake warns when a chore change authors a spec.
  • Getting started for a bring-your-own developer. init writes a pointer for the common assistants (CLAUDE.md, .cursor/rules/asdd.mdc; Codex reads AGENTS.md) so a contributor's tool loads the constitution automatically, plus a guide covering the path from a plain-language idea to a merged change.

Disclosure (required - ASDD)

  • Entirely human-authored
  • Authored or co-authored by an AI agent under human direction

Agent identity (if any): Claude
Instructed by (human handle): welsbach

Spec

Adds docs/specs/agent-trajectory-capture.md and openspec/changes/agent-trajectory-capture/. The remaining changes are governance tooling and documentation.

Checklist

  • Exactly one lane label (feature)
  • Signed off on every non-merge commit
  • A test for new behaviour (doctor, connect-check, intake, init, preflight, runner-trail self-tests; base suite 33/33)

Christoph added 14 commits July 25, 2026 12:52
…t only the reviewer

Before, only the review exported, so a deployment with audit.sink on captured the
reviewer's decisions but lost the produce side (developer/council), the test and
documentation agents, and the operator agents. Now every path records through one
route and exports from a credential-safe point: operate-run (the produce wrapper)
exports if a sink credential is present; run-agent, dev-council.sh, and test/docsync
export at their end; the untrusted PR review keeps its record/publish split.

test/docsync record and export on any exit (dry-run, guard refusal, real run) via a
trap, and the export is inert without a sink credential. audit-export.sh derives the
governed repo from the git remote when GITHUB_REPOSITORY is unset, so the same-repo
refusal holds on host runs, not only CI. A dynamic doctor completeness check
enumerates every record-writing path and warns on any with no export route, so a new
agent cannot silently drop its trail.

Tests for all of it, and audit-export.test.sh + the runner-trail test wired into the
base suite (audit-export was untested before).

Signed-off-by: Christoph <awchristoph@gmail.com>
An OpenSpec change (spec only, no implementation): an opt-in capture store,
separate from the thin ledger, holding the full input+output of each agent
call, deployment-owned and never public. Per-record schema with model_class
(frontier|open); outcome labelling from governance signals (pending ->
positive on clean merge -> negative on an escaped-defect link); knowledge and
corpus views derived from the one store. The content-safe companion to the
audit-trail completeness work: that ships the digest to the sink, this
captures the full trajectory so the org can own its coding data and, later,
train its own open models. Off by default; builtin mirror included.

Signed-off-by: Christoph <awchristoph@gmail.com>
…st suite

conventions.preflight (the adopter's own ruff/pytest/mypy command) was declared
and shown to the agents but never run. asdd-preflight.yml now runs it on every
PR via .github/asdd/preflight.sh, so a regression the model review missed is
caught by the real suite; the command's exit status is the gate. Distinct from
the model test-runner agent, holds no secrets (safe for a fork PR behind the
fork-workflow approval), and an opt-in no-op until the command is set. Copied by
init; a self-test (pass, a broken test fails, unconfigured is a no-op) is wired
into the base suite.

Signed-off-by: Christoph <awchristoph@gmail.com>
… as JSON

Add three preflight and intake guards that catch a misconfiguration up front
instead of after the work is done:

- doctor warns when user.name / user.email are unset, so a contributor learns
  their commits cannot be signed off before the first commit, not at intake.
- connect-check gains --json: the per-role connected status is machine-readable
  for a setup script or CI, with the same accounting and exit code.
- intake warns (without failing) when a change labelled chore adds or edits a
  spec, since the chore lane is spec-exempt and such a change is a mislabelled
  feature or fix.

Each guard is deterministic and covered by its self-test; the full base suite
stays green (30/30).

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
…ting-started guide

The developer is always the contributor's own, so a contributor's assistant has
to find the repository's rules on its own. init now writes a thin pointer for
each common assistant that references AGENTS.md:

- CLAUDE.md for Claude Code and the Claude app
- .cursor/rules/asdd.mdc for Cursor
- AGENTS.md itself for Codex and any tool following that convention

Each pointer is skipped if the file already exists, so an existing rule file is
never overwritten. A new guide, docs/guides/bring-your-own-developer.md, walks
the path from an idea (talk it through with the spec agent, no engineering
background needed) to a merged change, and notes the operate agents run on
open-source Goose. The README get-started step now shows the same.

init.test.sh asserts the pointers ship in the base profile, reference AGENTS.md,
and do not clobber an existing file.

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
The completeness check enumerated record-writing paths under cli/ and
.github/asdd/, and treated a recorder as covered if any sibling file named it
and exported. That escape is wrong for a CI workflow: the sink credential lives
in the job, so a workflow that runs a recorder which does not itself export must
export in that same job, and cannot lean on a runner it bypassed.

A deployment that wires dev-council.py straight into a workflow, instead of
through the exporting dev-council.sh runner, would otherwise drop the produce
trail with the sibling-runner escape hiding it. The check now scans
.github/workflows and holds a workflow that runs dev-council.py or a raw
audit.py append/from-review to an in-job export step. The framework's own
workflows go through the exporting runners, so they stay green; only a bypassing
deployment is warned.

Covered by two new doctor self-test cases (flagged without an in-job export,
clean with one); the base suite stays green.

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
init copies asdd-preflight.yml and preflight.sh, but the self-test did not check
they land, unlike every other copied workflow and its script. A rename could
drop the pair and leave a workflow calling a script that is not there. Assert
both reach a plain adopter.

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
The setup guide showed the human connect-check output but not the --json flag,
so a reader wiring it into a setup script or CI would not find it. Add the
one-line usage next to the human form.

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
The deploy guide enumerates what init writes, but not the editor pointers it now
drops (CLAUDE.md, the Cursor rule), so a reader comparing the guide to their tree
would find files the guide does not mention. Add them, note the skip-if-exists
behaviour, and link the bring-your-own-developer guide.

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
…nto governance-completeness-and-getting-started
…nto governance-completeness-and-getting-started
…to governance-completeness-and-getting-started

# Conflicts:
#	CHANGELOG.md
…vernance-completeness-and-getting-started

# Conflicts:
#	CHANGELOG.md
#	cli/doctor.test.sh
…' into governance-completeness-and-getting-started

# Conflicts:
#	CHANGELOG.md
#	cli/init.test.sh
@asdd-agent
asdd-agent Bot requested a review from welsbach as a code owner July 25, 2026 14:06
@asdd-agent asdd-agent Bot added the govern label Jul 25, 2026
The declared docs convention holds that a command or gate is not shipped until
the CLI reference describes it, and a new guide must be indexed. Update the
references for the CLI changes in this branch:

- cli/README.md: connect-check --json, and doctor's new warnings (unset git
  identity, a reasoning-model reviewer, and any record path or CI job with no
  audit export route).
- docs/reference/README.md: add connect-check to the command list.
- docs/README.md: index the bring-your-own-developer guide.

Signed-off-by: Christoph Welsbach <awchristoph@gmail.com>
@welsbach welsbach added feature and removed govern labels Jul 25, 2026
@github-actions

Copy link
Copy Markdown

ASDD review - advisory (recommendation: comment)

Produced by an automated agent under human direction. Advisory only: a human approves and merges.
Nothing here merges automatically.

The review runtime returned invalid output; a human should review manually. Security scan (deterministic + SAST): 4 finding(s). Impact scan: 1 finding(s), 0 block.

SECURITY - ok

  • note: Starting a process with a partial executable path (severity LOW, confidence HIGH).
  • note: subprocess call - check for execution of untrusted input. (severity LOW, confidence HIGH).
  • note: Starting a process with a partial executable path (severity LOW, confidence HIGH).
  • note: subprocess call - check for execution of untrusted input. (severity LOW, confidence HIGH).

IMPACT - concerns

  • warn: This change touches a behavioural surface (a gate, lens, agent prompt, or the runtime seam: .github/asdd/audit-export.sh, .github/asdd/audit-export.test.sh, .github/asdd/intake-check.sh, .github/asdd/intake-check.test.sh, .github/asdd/operate/runner-trail.test.sh). If it changes behaviour adopters rely on for conformance, it is normative: declare it and add an impact analysis and target version. If it preserves behaviour, no action.

Generated by the ASDD advisory review. Mode: live.

@welsbach welsbach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check

@welsbach
welsbach merged commit bd7afda into main Jul 25, 2026
9 of 11 checks passed
@welsbach
welsbach deleted the governance-completeness-and-getting-started branch July 25, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant