feat: adapter-driven CI workflow that runs gates.json gates on PRs (#8) - #13
Merged
Conversation
Add server-side gate enforcement so a merge is gated by CI, not only by the orchestrator remembering to run gate.sh before opening a PR. Downstream (reDeploy) a PR could merge with an empty status-check rollup. - .github/workflows/gates.yml: runs on pull_request, one matrix job per gate (build/lint/typecheck/test/coverage/security) so each surfaces as its own PR check (what visual front-ends like emdash monitor). Each job just runs `gate.sh <name>`, which reads the command from gates.json and skips empties — no hand-maintained YAML per downstream repo. - .github/actions/setup: composite action, adapter-driven from gates.json (project.packageManager / language / coverage_threshold). Sets up the JS/TS toolchain, runs the `install` gate, exports COVERAGE_THRESHOLD, and leaves a clearly-marked extension point for other stacks (Foundry/Python) — the seam to issue #9 (per-worktree lifecycle). - docs/GETTING_STARTED.md: new "Step 7 — Enforce gates in CI" with branch- protection (required checks) as the enforcement teeth, incl. a gh api recipe. - docs/PROMPTS.md: prompt #10 to wire up / adapt CI enforcement. Closes #8. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sub-task
Ship a CI workflow that runs the
gates.jsongates on PRs — server-side gate enforcement (issue #8).What changed
.github/workflows/gates.yml— runs onpull_request(+workflow_dispatch). One matrix job per gate (build/lint/typecheck/test/coverage/security) so each surfaces as its own PR check (what visual front-ends like emdash monitor). Each job just runsbash .claude/scripts/gate.sh <name>, which reads the command fromgates.jsonand skips empties — so it's fully adapter-driven, no hand-maintained YAML per downstream repo.fail-fast: false+ per-refconcurrencycancel..github/actions/setup/action.yml— composite action driven bygates.json(project.packageManager/language/coverage_threshold). Sets up the JS/TS toolchain (the common case), runs theinstallgate, exportsCOVERAGE_THRESHOLDto env, and leaves a clearly-marked extension point for other stacks (Foundry/Python examples inline) — the seam to Per-worktree setup/teardown lifecycle hooks so isolated workers can run all gates #9 (per-worktree lifecycle).docs/GETTING_STARTED.md— new "Step 7 — Enforce gates in CI": branch-protection (required status checks) as the actual enforcement teeth, with agh apirecipe + a checklist item.docs/PROMPTS.md— prompt Evaluate an optional visual cockpit (e.g. emdash) as a front-end over the headless pipeline #10 to wire up / adapt CI enforcement.Why
The harness enforces gates locally (hooks +
gate.sh) and the orchestrator runs them before opening a PR — but nothing enforced gates at the GitHub PR level (no.github/workflows/). Downstream (reDeploy), a PR could merge with an empty status-check rollup. Any visual front-end (emdash et al.) also expects server-side checks to exist.Design notes
gate.shrather than reimplementing gate parsing — same skip-empty semantics as the local hooks, single source of truth.gates.jsonare repo-global, and one check per gate is what gives front-ends granular pass/fail to surface.Gates
This is the template repo (no self-gates yet — see #11). Both YAML files validated as well-formed; the workflow path-resolves
gate.shfrom repo root andnodeis preinstalled on runners (same dependencygate.shalready has).Open risks / follow-ups
installruns once per matrix job (separate runners — inherent to matrix parallelism); cache tuning left to downstream.Closes #8.
🤖 Generated via the multi-agent orchestrator template.