ADR 0026: PR packet, CI generator, and team policy section

Field Value
Status Accepted
Date 2026-06-01
Deciders Project maintainers
Supersedes
Superseded by
Related ADRs ADR-0011 (Zod schema), ADR-0014 (parsed manifests)

Summary

Three small, deterministic team-workflow helpers land together:

  1. aidokit pr packet assembles a markdown PR review packet (summary, changed files from git diff --name-only main...HEAD, linked task brief, validation commands, risks/rollback) to stdout or --output.
  2. aidokit ci init --provider <github|gitlab|bitbucket> emits a CI config that runs pnpm -r build, pnpm -r test, and aidokit verify --all-facets. Read-before-write: it refuses to clobber an existing target without --force.
  3. The verify policy schema gains an optional, additive team section (allowedMcps?, commitFormat?, prChecklist?). It does not change any existing verify behavior.

All three are zero-LLM, zero-network, deterministic runtime helpers. None touch init emission or the byte-compare fixtures.


Context

Teams adopting aidokit asked for three recurring chores to be scaffolded rather than hand-rolled per project: a consistent PR description, a CI pipeline that runs the same gates aidokit defines, and a place to declare team conventions (allowed MCP servers, commit format, PR checklist) next to the existing verify policy.

These are productivity helpers, not new verification semantics. They follow the existing aidokit audit export pattern (read artifacts off disk, render markdown, never invent evidence) and the existing aidokit eval brief resolution.


Decision

1. aidokit pr packet

A pr parent command with a packet subcommand. Brief resolution reuses the eval rules: --task <id>agent-artifacts/task-briefs/<id>.md, --brief <path> override, or a lone brief in the directory. The packet lifts the brief's ## Goal, ## Validation commands, and any ## Risks / ## Rollback sections via a case-insensitive heading extractor, falling back to honest placeholders when absent. Changed files come from git diff --name-only <base>...HEAD (--base, default main) run via execFile (no shell). Output goes to stdout or --output.

2. aidokit ci init

A ci init subcommand with a required --provider. Plain-string templates (no template engine, CLAUDE.md §6 principle 1) per provider:

Provider Target
github .github/workflows/aidokit.yml
gitlab .gitlab-ci.yml
bitbucket bitbucket-pipelines.yml

Each runs pnpm -r build, pnpm -r test, aidokit verify --all-facets. Read-before-write (principle 8): an existing target is a BAD_INVOCATION error unless --force is passed.

3. Team policy section

PolicySchema gains an optional team object: allowedMcps?: string[], commitFormat?: string, prChecklist?: string[], .strict(). It is absent by default and never read by the verify runner — purely additive and backward-compatible. Future team tooling consumes it declaratively.


Consequences

Positive

Negative

Neutral


Validation


References