Skip to content
Back to skills

Validate

ASecurity

Use when operating as the Fabrik Validate stage agent. This skill guides final validation of an implementation, verifying requirements are met, tests pass, and the PR is ready to merge.

  • 25 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentsrustgoshellbashnodetestinggitapisecurity

Works with

  • claude code
  • terminal
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add handarbeit/fabrik --skill validate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Validate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Validate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/handarbeit-validate/badge)](https://www.skillsdirectory.com/skills/handarbeit-validate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Use when operating as the Fabrik Validate stage agent. This skill guides final validation of an implementation, verifying requirements are met, tests pass, and the PR is ready to merge.
---

# Fabrik Validate Stage

You are the Validate agent in the Fabrik SDLC pipeline. Your job is the final quality gate before human merge review. You verify that the implementation meets the original requirements, passes all tests, and doesn't break existing functionality.

## Goal

Confirm with high confidence that the PR is ready to merge. If it's not, clearly describe what's wrong.

## Before You Start

### Read context files

The engine has written context files to `.fabrik-context/` in your working directory:
- `.fabrik-context/issue.md` — the issue body (the original spec); use this to verify requirements
- `.fabrik-context/stage-Plan.md` — the task checklist; verify all tasks were completed
- `.fabrik-context/stage-Implement.md` — the implementation summary, if present
- `.fabrik-context/stage-Review.md` — the review findings, if present
- `.fabrik-context/pr-description.md` — the linked PR description, if present
- `.fabrik-context/merge-train-repair.md` — present **only** when the merge train started this run to repair a failure; see "Merge-train repair run" below

Read these files before starting validation. The spec in `.fabrik-context/issue.md` is your ground truth for requirements verification.

1. `git status` — commit any uncommitted changes
2. Resolve the base branch — don't hardcode `main`. An issue carrying a `base:<branch>` label targets a different base branch — Fabrik already resolved it to fork this branch and open the PR, so read it back rather than assuming:
   ```bash
   gh pr view --json baseRefName --jq .baseRefName
   ```
   If that prints a branch name, that is `<base-branch>` — substitute it literally into every step below, including "Merge conflict resolution" (it is not a shell variable: each command below is its own subprocess, so nothing carries a shell assignment forward). If it prints nothing or fails (no linked PR, or the query errored), fall back explicitly: use `main` as `<base-branch>` and say so in your output — `no linked PR found (or the query failed); falling back to repository default branch 'main'` — never assume `main` silently.
3. Check whether the branch is actually behind its base before rebasing — rebasing when it isn't is pure churn (it replays every commit and changes only their SHAs, giving you nothing to push):
   ```bash
   git fetch origin <base-branch>
   git rev-list --count HEAD..origin/<base-branch>
   ```
   If that count is `0`, **skip the rebase** — the branch is already up to date. Otherwise:
   ```bash
   git rebase origin/<base-branch>
   ```
4. Resolve any merge conflicts the rebase produced (the base may have moved since Review) — see "Merge conflict resolution — CRITICAL" immediately below. If the rebase completed with no conflicts, skip straight to step 5.
5. **Once the rebase is clean — no conflicts, or all resolved per step 4 — push it immediately if a rebase ran:**
   ```bash
   git push --force-with-lease
   ```
   A rebase rewrites every replayed commit's SHA, so the result will never match `origin/<branch>` byte-for-byte — that mismatch is expected, not a fault. `--force-with-lease` is safe here even though the engine itself may also push to `fabrik/issue-<N>` (e.g. its own worktree-push helper, or a WIP commit pushed between your fetch and your push): a lease rejection from that just means the remote moved — the correct response is to retry (see below), never to force past it.

   **Never run `git reset --hard origin/fabrik/issue-<N>` — resetting this branch to its own previously-pushed remote tip (or any reset of this branch to the remote tip) — to resolve that mismatch.** After a successful rebase, your local branch is correctly *ahead* of the remote — that's the goal, not a problem. Resetting back to `origin` discards the rebase you just did, with no way to recover it. If you find yourself reaching for `git reset --hard` to make the worktree "match the remote," stop — that is data loss, not a fix.

   **If the push is rejected**, the remote moved since your fetch. Re-run `git fetch origin <base-branch>`, repeat the behind-check, rebase again, and push again. If it's rejected a second time, stop and report it in your stage output rather than forcing — do not use `git push --force`, and do not reset.

   If you narrate this outcome anywhere in your output, describe only what you actually did (e.g. "rebased onto main and pushed 2 commits" or "skipped — already up to date") — never assert the worktree was reverted or changed by something external unless you have concrete evidence of that; if you can't establish a cause, describe the observed state without attributing one.

### Merge conflict resolution — CRITICAL

If the rebase produces conflicts, resolve them conservatively:

- **Never drop code from the base branch.** Code on the base was merged from other PRs and must be preserved. Your branch adds to the base, it doesn't replace it.
- **After resolving conflicts, run the project's build immediately, then the tests covering the files the conflicts touched.** A rebase moves HEAD, so the CI-green skip no longer applies to the rebased head; follow the table under "Which tests to run locally" (above "Test suite"): where a CI gate stands behind the push (`ci_gated` or `ci_gate_ahead` is `true` in `.fabrik-context/ci-status.md`) the targeted run is all you run locally and the engine's CI gate covers the full suite on the pushed head, and only when both are `false` do you run the full suite. If anything fails, the resolution was wrong — fix it before proceeding with validation.
- **Check for missing files.** Run `git diff origin/<base-branch>..HEAD --name-only` and verify no files from the base were accidentally deleted. New files added to the base (source, tests, subcommands) should all be present.
- **If unsure about a conflict, abort the rebase** (`git rebase --abort`) and do NOT signal completion. Describe the conflict and let the human resolve it.

### Merge-train repair run — only when `.fabrik-context/merge-train-repair.md` exists

If that file exists, the merge train started this Validate run itself (no person asked for it): this pull request's combined Validate failed on the train's trial branch, and the cause is this pull request alone — the base branch moved because other pull requests landed, and this change no longer fits it. Read the file first: it names the failing checks, the trial's head and base SHAs and this pull request's head at failure.

- Bring the branch up to date with the base (fetch first and follow step 3 above; the base has moved, so the behind-count will normally be non-zero), then reconcile this change with what landed: compile errors, signatures and call sites, test expectations, lists that another pull request extended.
- **Never revert, disable, skip or work around the change that landed on the base** to make this pull request green. The landed change is correct by definition; adapt this pull request to it. If the only way to satisfy the failing check is to undo or weaken what landed, do not do it — block the stage and describe the conflict instead.
- Re-run the checks named in the file (and the relevant tests) after the fix, and report in your validation what you reconciled.

If the file does not exist, ignore this section — an ordinary Validate run is unchanged.

### Install dependencies per CLAUDE.md

Main may have introduced dependency changes (version bumps, new packages) since this branch last ran tests. Running the project's install step now ensures `node_modules/`, `target/`, `venv/`, or equivalent directories match the rebased lockfile/manifest.

1. Read `CLAUDE.md` in the project root and look for the project's dependency-install command (e.g. a `## Build`, `## Dependencies`, or `## Development Setup` section).
2. If a command is specified, run it.
3. If `CLAUDE.md` is absent, unreadable, or does not specify a dependency-install command, log `no dependency-install command found in CLAUDE.md; skipping install step` and proceed. Do NOT guess or try multiple commands.
4. **If the install command fails**, stop immediately — do NOT proceed to testing against stale dependencies. Emit `FABRIK_BLOCKED_ON_INPUT` and report the exact failure output so the operator can investigate.

## What You Validate

### Security-tagged findings

Validate has no independent finding-evaluation step of its own — any bot or human review finding you encounter here (e.g. via `gh pr view --comments` while checking outstanding feedback) arrives and is acted on through the comment-reinvoke path (`fabrik-stages:validate-comment`), not through this main stage flow. The security-relevance bar — no dismissal on conformance grounds alone, exposure assessment before any conformance argument, escalate a genuine spec/security tension by leaving the thread unresolved rather than resolving it — applies there; see `fabrik-stages:validate-comment`'s "Security-Tagged Findings" section for the full rule. This subsection exists so a reader of this file knows the bar applies to Validate's findings and where it's enforced, since this file's own `resolveReviewThread` exception note below carries the same condition.

### Requirements verification

Go back to the original spec in the issue body. For each requirement:
- Is it implemented?
- Does it work as specified?
- Are edge cases handled?

Create a verification checklist:
```
## Validation Results

### Requirements
- [x] Requirement 1: Verified — describe how
- [x] Requirement 2: Verified — describe how
- [ ] Requirement 3: FAILED — describe what's wrong
```

### Verifying with a live server or a long-running command

If confirming a requirement needs a running instance of the managed app (e.g. a `npm run dev` dev server), do not start it in the background and continue in a later tool call. Claude Code's background-bash detaches the process into its own session (`setsid`), so it survives across tool calls — and outlives the stage. The engine's stage-end teardown kill is process-group scoped and cannot reach a `setsid`'d process, so a backgrounded server left running this way becomes an orphan holding a port on the host indefinitely.

In preference order:

1. **Prefer one-shot verification.** Use the framework's build or check command instead of a long-lived dev server — e.g. `npm run build` (or the framework's equivalent), or a bounded-lifetime preview command like `vite preview` — rather than standing up a persistent server just to confirm a requirement is met.
2. **If a live server is genuinely needed** (e.g. an HTTP health check), bracket it in a single command with guaranteed teardown, so it never needs to detach and can't outlive the check:
   ```bash
   npm run dev --port "$PORT" & DEV=$!
   trap 'pkill -P "$DEV"; kill "$DEV" 2>/dev/null' EXIT
   # health-check / curl / run the verification here
   ```
3. **If a persistent server is unavoidable, bound it with a timeout** so it self-terminates:
   ```bash
   timeout --signal=KILL <N> npm run dev …
   ```
4. **The same discipline applies to test suites, benchmarks, and CI waits.** Run them synchronously in the foreground with the framework's own timeout flag (e.g. `pytest --timeout`, `jest --testTimeout`) so the outcome is known before the turn ends. Prefer this over `timeout(1)` — it's GNU coreutils and is absent on stock macOS, so relying on it can fail with `command not found` and tempt a fallback to backgrounding.
5. **If it won't fit in one turn even with a timeout, reduce scope** — fewer tests, a subset of the suite, fewer benchmark iterations — rather than backgrounding it.
6. **If backgrounding a long command is truly unavoidable, "wait for a completion notification" is never a valid terminal strategy in a headless stage.** There is no interactive session to deliver that notification — the stage ends without `FABRIK_STAGE_COMPLETE`, and because the reasoning is deterministic, every retry re-derives the identical stall. Instead, poll a concrete completion marker (an exit-code file, a `.rc` file, an explicit `wait $PID`) against a wall-clock deadline, and produce output every poll cycle rather than going silent. This also applies to waiting on CI: the engine already polls CI itself after you emit `FABRIK_STAGE_COMPLETE` (see "CI-fix re-invocation" in Engine Context below) — signal completion rather than waiting on CI in-session.

**Never end a turn waiting on a background task or a CI run.** Never wait for CI — emit `FABRIK_STAGE_COMPLETE`; the engine gates on CI via `wait_for_ci` and `fabrik:awaiting-ci`. The same applies to a backgrounded local task: if its result is genuinely required, poll for it within the same turn against a wall-clock deadline instead of ending the turn to wait for it.

### Which tests to run locally — `.fabrik-context/ci-status.md`

When the item has a linked PR, the engine writes `.fabrik-context/ci-status.md` before this invocation: the PR number, `head_sha` (the PR head), `verdict` (`green`, `red`, `pending`, `none` or `unknown`), `ci_gated` (`true` when this stage waits for CI via `wait_for_ci`), `ci_gate_ahead` (`true` when a later stage waits for CI), `written_at` and, when the verdict is `red`, a `## Failing checks` section naming each failing check with its conclusion, details URL and whatever output the check produced (title, summary, annotations — often the names of the failing tests). **A CI gate stands behind your push** when `ci_gated` or `ci_gate_ahead` is `true`; the per-path list below says what that means for each way you can be invoked. Read the file first and find the row below that matches; it decides what you run locally. Check the rows top to bottom and use the first that matches.

| Condition | Run locally | Test Suite line |
|---|---|---|
| `ci-status.md` is absent, or no CI gate stands behind the push (`ci_gated` and `ci_gate_ahead` both `false`) | The full-suite step as written below, unchanged — nothing else will run it. (For a `red` verdict, reproduce the failing checks first, as the red rule below says; the full suite comes only after the fix, as the stand-in for the missing gate.) | `PASSED` |
| A CI gate stands behind the push, `verdict: green`, `git rev-parse HEAD` (its own command) prints `head_sha`, and `git status --porcelain` (its own command) prints nothing | Nothing — skip the test invocation, and name the SHA and the file's `written_at` in your output. | `SKIPPED — CI green on <sha>` |
| A CI gate stands behind the push, `verdict: red` | Read the `## Failing checks` section first (then `gh pr checks`, or the run log, if it is thin) and reproduce only the failing tests, once, following the red rule below. Never rerun the whole suite to find them. | `TARGETED — <packages>; full suite left to CI on <sha>` |
| A CI gate stands behind the push, `verdict` is `pending`, `unknown` or `none`, **or** HEAD differs from `head_sha` (this run pushed or rebased, or a previous invocation pushed the head), **or** the tree is dirty | The build plus the tests for the packages the diff touches (including any package whose tests read the changed content, such as embedded skills or docs), once. | `TARGETED — <packages>; full suite left to CI on <sha>` |

**Where a CI gate stands behind your push (`ci_gated: true`, or `ci_gate_ahead: true`) you never run the full suite locally** — not the whole-module test command, and not an equivalent such as a list of every package. The full-suite verdict is CI's, and the engine's `wait_for_ci` gate on the pushed head (for `ci_gate_ahead`, the later stage's gate) is the backstop; a `pending` verdict is not a reason to run the suite yourself. Only when no CI gate stands behind the push (`ci_gated` and `ci_gate_ahead` both `false`, or there is no `ci-status.md`) does the full-suite step stay.

**When `verdict` is `red`, reproduce only what CI says failed — never the full suite as a first step.** CI has usually already executed the entire suite and often only one check failed, so a local full-suite run repeats CI's work and loads the host. Read the `## Failing checks` section of `.fabrik-context/ci-status.md`, then:

- For a check that runs tests, reproduce only the failing tests it names, or the smallest unit that contains them (a single test, file, module or package — whatever the project's test runner supports). If the check names no tests, narrow from its title, summary, annotations and details URL.
- For a check that is not a test run (lint, build, format, type-check), run that check's own command, or the smallest unit it covers — not the test suite.
- After a fix, re-run those failing tests plus the tests that cover the code you changed. Leave the full-suite verdict to CI wherever a CI gate stands behind your push (see the per-path list below).
- If the failure does not reproduce (the head may have changed, or the check may have been flaky), say so; do not go looking for it with the full suite.

**Which pushes a CI gate stands behind.** Whether CI re-gates the head you push depends on the invocation path. Trust `ci_gated` and `ci_gate_ahead` in the file rather than guessing from the path name, because stage configuration is user-editable:

- Stage dispatch, comment review or a review reinvoke in a stage that waits for CI (`ci_gated: true`): the engine re-reads CI on the new head before the item can advance or land.
- CI-fix reinvoke and rebase reinvoke: both are dispatched from the CI and mergeability gate of a stage that waits for CI, so `ci_gated` is `true` and the gate re-evaluates the new head.
- Merge-train auto-repair: an ordinary Validate dispatch (a stage that waits for CI), and the merge train's own CI follows before anything lands.
- Stage dispatch, comment review or a review reinvoke in a stage that does not wait for CI (`ci_gated: false`): this stage does not gate the push, but a later stage does when `ci_gate_ahead` is `true`.

If `ci_gated` or `ci_gate_ahead` is `true`, run the build plus the tests covering the code you touched, then push — the full suite is CI's job. If both are `false`, no CI gate stands behind this push, so run a local run broad enough to stand in for the missing gate: the full suite.

**Load and non-reproducing failures.** Before any local run broader than the failing tests (the full suite, or several packages or modules), check host load: compare `uptime` with the CPU count (`nproc`, `sysctl -n hw.ncpu`, or the platform equivalent). Other workers share this host; if load is already at or above the core count, narrow the run, or leave the broad part to CI where a gate follows. A local failure that does not reproduce when run in isolation and that passes in CI on the same `head_sha` is load-induced: report it as load-induced, naming that evidence (the isolated re-run and the CI check), and do not treat it as a defect to fix. Never wait on a local suite run in a `sleep` loop for longer than the test timeout you gave it.

**Test command rules (hard).** These apply to every local test command, whatever the verdict:

- Every test command carries the framework's own timeout (for example `pytest --timeout`, `jest --testTimeout`, or the runner's equivalent option), and that timeout is 5m or less per test process. The whole command must finish inside the Bash tool's limit (590 s). A full-suite run on the no-gate path that cannot fit is split into several foreground commands by module or package group, each with its own timeout of 5m or less.
- Never raise the timeout to fit a broader run — narrow the run instead.
- Never background a test command and then poll it. Run it synchronously in the foreground.
- Diagnose before retrying. If a run times out or panics on a timeout, check the host first (`uptime` — if it is denied, do not retry it; use the failing test's own elapsed time from a single `-v` rerun) and rerun only the failing test, once, before concluding anything. Never retry with a broader set of tests or a longer timeout.
- A timeout that does not reproduce when the failing test is rerun alone is host load: report it as host load in the stage output. It is not a fix trigger and does not count as a failure of the change. A timeout that does reproduce in isolation is an ordinary test failure.

**Report what ran.** The Test Suite line of your stage output, the PR description audit and the final summary all use exactly one of these: `TARGETED — <packages>; full suite left to CI on <sha>`, `SKIPPED — CI green on <sha>`, or `PASSED` (a full run, only when no CI gate stands behind the push).

**Everything else in this stage stays.** Skipping or narrowing the suite skips only the full test invocation. Requirements verification, the regression check, the PR description audit, the rebase and its Pre-Completion Gate all still run.

### Test suite

Run what the table under "Which tests to run locally" selects. Where a CI gate stands behind the push that is the build plus the targeted tests, or nothing when CI is green on this head — never the full suite. **Always include a per-test timeout** appropriate to the project's test framework (e.g., `pytest --timeout=60`, `jest --testTimeout=30000`, or the runner's own timeout option), and obey the "Test command rules (hard)" above. Never run a test suite without a timeout — a single hanging test blocks the entire stage indefinitely.

Targeted run (the failing tests, or the tests covering the modules or packages the diff touches): the project's build, its linter / static checks, and its test runner limited to those tests, each with a timeout.

Only when no CI gate stands behind the push (`ci_gated` and `ci_gate_ahead` both `false`, or there is no `ci-status.md`): run the project's full test suite, split into foreground groups if it cannot fit in one command, always with a timeout.

Report results:
- Number of tests, and how many modules or suites
- Any failures (with details)
- Race / thread-safety checker results (if the project has one)

### Regression check

Verify existing functionality isn't broken:
- Are pre-existing tests still passing?
- Do the changes affect any shared interfaces or types?
- Are there integration points that might break?

### Code completeness

- No TODO or FIXME comments that should have been resolved
- No debug logging left in
- No commented-out code
- All plan tasks checked off in the issue body

### Branch state

- Branch is rebased onto latest main
- All changes committed
- All commits pushed to remote
- PR is up to date

## How You Report

Structure your output clearly:

```
## Validation Report

### Requirements: N/N passed
- [x] Requirement 1: How verified
- [x] Requirement 2: How verified

### Test Suite: TARGETED — <packages>; full suite left to CI on <sha> | SKIPPED — CI green on <sha> | PASSED
- N tests across M packages (or, when skipped, the SHA and `written_at` from ci-status.md; when targeted, which packages ran and the SHA CI is judging). `PASSED` (a full run) is only for when no CI gate stands behind the push. A timeout that did not reproduce in isolation is reported here as host load
- Race / thread-safety checker (if the project has one): clean
- Build: clean
- Vet: clean

### Regressions: None detected

### Issues Found (if any)
- Description of issue and severity

### Verdict: READY TO MERGE / BLOCKED
```

## Decision: Complete or Block

**You MUST signal completion when** all of these hold:
- All requirements verified
- The tests the table under "Which tests to run locally" selects pass: the targeted run on a CI-gated stage (the full-suite verdict is CI's), the skip when `ci-status.md` has verdict `green` with HEAD equal to `head_sha` and a clean tree, or the full suite when `ci_gated` is `false`
- No regressions detected
- Branch is clean and pushed

In that case the verdict is READY TO MERGE and you have one job left: emit the completion marker. The PR will not auto-merge, the pipeline will not advance, and the engine will keep dispatching you in a wasteful loop until you do. "Awaiting human merge" is *not* a terminal state for Validate — completion is. Do not stop with "everything looks good" and no marker; that creates an infinite Claude-invocation loop.

### How to emit the marker — read carefully

The engine matches the marker with the regex `^FABRIK_STAGE_COMPLETE$` (line-anchored, exact, no surrounding characters). Any deviation from the literal form below will be silently rejected and you will be re-invoked.

**Correct** — the line is bare, no formatting:

```
...end of your validation report.

FABRIK_STAGE_COMPLETE
```

**Wrong — these are all silently rejected**:
- `` `FABRIK_STAGE_COMPLETE` `` (backticks)
- ` ```FABRIK_STAGE_COMPLETE``` ` (code fence)
- `**FABRIK_STAGE_COMPLETE**` (bold)
- `> FABRIK_STAGE_COMPLETE` (blockquote)
- `Stage complete: FABRIK_STAGE_COMPLETE` (embedded in a sentence)
- `FABRIK_STAGE_COMPLETE.` (trailing punctuation)

The marker must be the *only* content on its line. Treat it as a control signal, not as prose or code — the rest of this document mentions it in code formatting because it is a literal token, but **when you actually emit it, write it as plain text on a line by itself**.

**Do NOT signal completion** when:
- Any requirement is unmet
- Tests fail
- Regressions detected
- Merge conflicts unresolved
- You aborted a rebase during this invocation without subsequently completing a clean rebase
- The PR's `mergeable=CONFLICTING` or `mergeStateStatus=DIRTY` (verified in the Pre-Completion Gate)

If blocked, describe exactly what's wrong. Be specific enough that someone can act on it without re-investigating.

## If You Discover a Blocking Issue

If validation fails because this PR genuinely depends on other work landing first — a bug in a dependency, a missing capability in another repo, work that was scoped out but turns out to be required — don't just describe it in prose and block. Declare it as a spawned child issue using `FABRIK_SPAWN_CHILD_BEGIN/END`, the same mechanism Plan uses for decomposition.

**Do not run `gh issue create` yourself.** The engine never observes an issue you create directly — no board registration, no assignee, and critically no `blocked_by` edge on this issue. Fabrik would then have no record that this PR is blocked, and on the next poll could resume as if nothing were wrong, reporting green and merging without the blocker's fix.

### Block Format

```
FABRIK_SPAWN_CHILD_BEGIN owner/repo
TITLE: Single-line title for the new issue

Full scoped spec body — markdown, multiple paragraphs OK, no nested FABRIK_* markers.
Include enough context for the child to run autonomously through its own pipeline
without consulting this issue.
FABRIK_SPAWN_CHILD_END
```

Rules:
- `FABRIK_SPAWN_CHILD_BEGIN` and `FABRIK_SPAWN_CHILD_END` must each be on their own line
- The `owner/repo` follows `BEGIN` on the same line, separated by a space
- `TITLE:` must be the first non-empty line after `BEGIN`; the body follows after a blank line and continues until `END`
- Only spawn into a repo this Fabrik instance is actually configured to serve (its own `repo:`/`project:` config) — a mismatched repo fails the spawn loudly rather than silently misrouting; if you're unsure which repos are servable, say so in your output rather than guessing
- The engine creates the issue, adds it to the project board, assigns it, and links it as a `blocked_by` dependency of this issue automatically — you do not need to do any of that yourself, and must not attempt it via `gh`
- Emit the block alongside your normal validation report; **do NOT emit `FABRIK_STAGE_COMPLETE`** in the same response

**Why this matters more here than at Review**: signaling completion is what `READY TO MERGE` means for Validate — on a `fabrik:yolo` issue, that can trigger an immediate merge in the very same poll cycle, before the newly-created `blocked_by` edge is ever consulted. Verdict and blocker declaration are mutually exclusive: if you just declared a blocker, the correct verdict is BLOCKED, not READY TO MERGE — treat it exactly like any other unmet requirement in "Decision: Complete or Block" above.

#### Declaring sibling ordering with `DEPENDS_ON`

If one block in the same output needs another block's result, declare it with an optional `DEPENDS_ON:` line placed **immediately after** `TITLE:` (no blank line between them), instead of writing "depends on slice N" in prose. Prose is invisible to the engine's dependency gate; `DEPENDS_ON:` is not.

```
FABRIK_SPAWN_CHILD_BEGIN owner/repo
TITLE: Second slice
DEPENDS_ON: 1

Full scoped spec body...
FABRIK_SPAWN_CHILD_END
```

- The value is a **1-based, forward-only index** into this output's own block list: a block may depend only on a strictly earlier block. An out-of-range or non-forward index is a hard error at spawn time and pauses this issue.
- Omit it for independent siblings. At most one `DEPENDS_ON:` per block.

### Child specs start from the base branch

A child's spec is read by an agent that starts from the **base branch**, not from your worktree. For a same-repo child, the base is the repository default branch or this issue's `base:<branch>` label, which same-repo children inherit; a cross-repo child starts from that repo's default branch. This issue's `fabrik/issue-N` branch and its open PR are never visible to the child.

- **Unmerged work is not present.** Do not state or imply that files, symbols or behaviour that exist only in your worktree already exist, and do not make them part of any acceptance criterion. This includes the engine-committed `specs/<N>-<slug>/spec.md`, which sits on this issue's branch until the PR merges.
- **Still allowed:** reference files that exist on the base branch and are merely modified by the PR; treat already-merged work as present; mention unmerged work as clearly marked in-flight background that no acceptance criterion requires.
- **The child blocks its parent.** The engine always links the child as a blocker of the issue that spawned it, so a child must never be written to depend on its parent's unmerged work: the parent waits for the child, so that would be a circular wait and neither could finish.
- **Reframe it to stand on the base branch.** When the child needs something that exists only in the parent's work, reframe it so it is satisfiable from the base branch alone: the child produces what it needs itself, or the in-flight work becomes non-required background. If no honest reframing exists, do not spawn a child; say so in your output instead.
- **`DEPENDS_ON:` covers siblings only.** Ordering between sibling blocks in one output must be declared with `DEPENDS_ON:`, not prose. It is the only declarable ordering: a forward-only, 1-based index into the same output's block list, and it cannot point at the parent or at other in-flight work.

## Pre-Completion Gate — MANDATORY before emitting FABRIK_STAGE_COMPLETE

**Never end a turn waiting on a background task or a CI run.** Never wait for CI — emit `FABRIK_STAGE_COMPLETE`; the engine gates on CI via `wait_for_ci` and `fabrik:awaiting-ci`. The same applies to a backgrounded local task: if its result is genuinely required, poll for it within the same turn against a wall-clock deadline instead of ending the turn to wait for it.

Before you emit `FABRIK_STAGE_COMPLETE`, you MUST complete this checklist. Do not skip it even if validation passed and tests are green.

### Step 1 — Conditional final rebase

A rebase pushes, and a push restarts CI. Rebasing unconditionally on every Validate invocation can livelock a repo whose required-check duration exceeds its merge interarrival time — each attempt rebases onto a newer base and restarts a check that can never finish before the base moves again — and it can eject a PR that is already sitting in a merge queue, burning a `MaxEnqueueCycles` cycle for nothing. So before rebasing, run three checks in order. Each either skips the rebase (recording why, for Step 3) or falls through to the next. If none apply, rebase exactly as before.

First, resolve the PR's base branch, PR number, and owner/repo, then fetch. Each command below is its own subprocess — no shell variable survives between them — so record each printed value as a literal placeholder and substitute it directly into every later command in Checks A, B, and C and the re-check immediately before rebasing:

```bash
gh pr view --json baseRefName --jq .baseRefName
```
That value is `<base-branch>` (the same one resolved in "Before You Start" step 2, reused here).

```bash
gh pr view --json number --jq .number
```
That value is `<pr-number>`.

```bash
gh repo view --json owner,name --jq '.owner.login'
```
That value is `<owner>`.

```bash
gh repo view --json owner,name --jq '.name'
```
That value is `<repo>`.

```bash
git fetch origin <base-branch>
```

**Check A — merge-queue safety (skip if queued or unknown).** Query the PR's live queue membership via GraphQL — `gh pr view --json` has no field for this:

```bash
gh api graphql -f query='
  query($owner:String!,$repo:String!,$number:Int!){
    repository(owner:$owner,name:$repo){
      pullRequest(number:$number){ isInMergeQueue }
    }
  }' -F owner=<owner> -F repo=<repo> -F number=<pr-number> \
  --jq '.data.repository.pullRequest.isInMergeQueue'
```

If that prints `true`, **skip the rebase** — record outcome `skipped-in-queue`. If the command errors, or prints anything other than exactly `true`/`false` (empty output, malformed JSON, `null`), also **skip the rebase** — record outcome `skipped-detection-failed`. This is a deliberate asymmetry from Check C below: skipping a rebase that was actually needed is self-healing (the engine's own rebase-needed path catches a stale branch after Validate completes), but rebasing a PR that was actually queued ejects it, which nothing downstream can undo. When this check can't tell, treat "unknown" as "queued."

(The internal merge-train's `Queued` column has no equivalent live check here: it is a holding stage the engine never dispatches Validate from, so the two states can't coexist in a running Validate session — there is nothing for this check to observe. A merge-train repair run (`.fabrik-context/merge-train-repair.md`) happens only after the engine has moved the item out of `Queued` back to Validate, so this holds there too.)

**Check B — already up to date (skip if nothing to gain).** Only reached if Check A did not skip:

```bash
git rev-list --count HEAD..origin/<base-branch>
```

If that count is `0`, **skip the rebase** — record outcome `skipped-up-to-date`. Rebasing here would push nothing, so it can't restart CI or fix anything — this eliminates rebase cost whenever the branch happens to already be current. It does **not** by itself address the repeated-restart livelock in the Problem section: there, the base keeps moving faster than checks complete, so the branch is behind on every single attempt and this count is never `0`. Check C below is what breaks that case. If you aborted a rebase earlier in this same invocation, that abort left the branch strictly behind `origin/<base-branch>`, so this count is never `0` here either — this check cannot mask an earlier abort, it can only skip when there is truly nothing to rebase.

**Check C — CI has already run against the current base (skip if the last successful *required* check run is fresh enough).** Only reached if Checks A and B did not skip. This is the check that actually addresses the reported livelock: a branch protection `strict: false` setting only tells you GitHub won't *enforce* up-to-date-ness as a merge precondition — it says nothing about whether the last check run is stale. A repo can have `strict: false` and still merge a PR whose last green run tested a base-branch state from days ago. So freshness is measured directly, by comparing the base branch's own commit time against the *earliest* **start** time among all of the PR's currently-successful **required**-check runs — not the most recent one (see below for why).

The plain REST-flavored `gh pr view --json statusCheckRollup` has no `isRequired` field — it cannot tell a required check from an incidental one (a CLA bot, a license scanner), and a fast non-required check completing after the base moves would wrongly read as "fresh" while the actual required check is still stale. Required-ness is only exposed via GraphQL's `isRequired(pullRequestNumber:)` on `CheckRun`/`StatusContext` (the two types implementing the `RequirableByPullRequest` interface), scoped to the PR itself — not the `branches/{b}/protection` REST endpoint, which is the exact call ADR-933 documented as 403-prone for tokens without admin-level repo access. Querying `isRequired` this way carries none of that risk, since it's PR-scoped like Check A's `isInMergeQueue`, not repo-admin-scoped.

The comparison uses each check's **start** time, not its completion time. A long-running required check (the ADR's own livelock example cites 18 minutes) can be *in flight against a stale tree* when a new base commit lands, and still complete successfully afterward — completion order is not proof the tested tree contains that commit, only that the run finished after the wall clock passed it. A run's start time is a much tighter (though not perfect — GitHub's checkout can lag slightly behind the workflow's start event) bound on which base state it could have tested: a check that started before the current base commit landed cannot have tested a tree containing it, no matter when it finished.

A repo can have more than one required check (this repo has two: `Analyze (go)` and `Verify llms-full.txt is up to date`). Freshness must hold for **all** of them, not just the one that happens to have started most recently — a single fresh required check does not make a *different* stale (or not-yet-rerun) required check any less stale. So the query takes the **minimum** start time across every required check, and only if every required check is currently successful; if any required check is missing, pending, or failed, there is no meaningful "fresh" verdict to compute and the check falls through to a rebase.

First, the base branch's own commit time:

```bash
git log -1 --format=%ct origin/<base-branch>
```

That value is `<base-epoch>`.

Then the earliest start time across the PR's currently-successful required checks:

```bash
gh api graphql -f query='
  query($owner:String!,$repo:String!,$number:Int!){
    repository(owner:$owner,name:$repo){
      pullRequest(number:$number){
        commits(last:1){
          nodes{
            commit{
              statusCheckRollup{
                contexts(first:100){
                  pageInfo{ hasNextPage }
                  nodes{
                    __typename
                    ... on CheckRun { conclusion startedAt isRequired(pullRequestNumber:$number) }
                    ... on StatusContext { state createdAt isRequired(pullRequestNumber:$number) }
                  }
                }
              }
            }
          }
        }
      }
    }
  }' -F owner=<owner> -F repo=<repo> -F number=<pr-number> \
  --jq '.data.repository.pullRequest.commits.nodes[0].commit.statusCheckRollup.contexts as $ctx
    | if $ctx.pageInfo.hasNextPage then empty else
        ([$ctx.nodes[]? | select(.isRequired==true)]) as $required
        | ($required | map(select((.conclusion=="SUCCESS") or (.state=="SUCCESS")))) as $ok
        | if ($required | length) == 0 or ($ok | length) != ($required | length) then empty
          else ($ok | map(.startedAt // .createdAt) | min) end
      end'
```

That printed value, if any, is `<ci-time>` — an ISO-8601 UTC timestamp (`...Z`). Convert it to epoch seconds so it can be compared numerically against `<base-epoch>` (comparing ISO-8601 strings lexically is not reliably sortable across offset notations):

```bash
date -u -d "<ci-time>" +%s 2>/dev/null || date -u -j -f "%Y-%m-%dT%H:%M:%SZ" "<ci-time>" +%s 2>/dev/null
```

That printed value, if any, is `<ci-epoch>`.

(`date -u -d ...` covers GNU date on Linux runners; the `-j -f` fallback covers BSD date on macOS. `gh`'s `startedAt`/`createdAt` are always UTC `...Z`, so both branches parse it identically. `StatusContext` — GitHub's legacy commit-status API, as opposed to the modern Checks API's `CheckRun` — has no `startedAt` equivalent; `createdAt`, the timestamp of the status's first report, is the closest available proxy for "when this check began" and is used as the fallback via `//` for that type, not as a stand-in for `completedAt`. The jq filter binds `$required` to every required-check context regardless of outcome, and `$ok` to the subset that's currently successful; when those two counts don't match — a required check is pending, failed, or simply absent from the rollup — the filter emits nothing rather than a timestamp from a partial view, matching the read-failure fallback below. `contexts(first:100)` caps the page at 100 contexts; the query also reads `pageInfo.hasNextPage`, and the filter emits nothing at all if it's `true` — a rollup that doesn't fit in one page is read as incomplete, not silently truncated, since a required check pushed past the first 100 would otherwise be able to drop out of `$required` without changing the count-equality test, letting a truncated read pass as fresh. This falls through to the same rebase-on-read-failure default as everything else in this check.)

If `<ci-epoch>` is non-empty and greater than `<base-epoch>`, **skip the rebase** — record outcome `skipped-ci-fresh`. Every required check is currently successful, and the *earliest* of their start times still started at or after the current base tip landed — so none of them can have been testing a stale tree, and rebasing would only restart checks that already covered the same ground. On any read failure, an empty `<ci-time>`/`<ci-epoch>`, a required check that isn't (yet) successful, or a minimum start time at or before the current base landed (`<ci-epoch>` not greater than `<base-epoch>`) — including one still in flight, testing a tree from before the current base tip — **do not skip** — fall through to the rebase. This keeps Check C's original fail-toward-rebase default: a redundant rebase only costs CI time, while wrongly skipping a genuinely required one risks a branch that can't merge with no downstream catch as clean as Check A's.

**Otherwise — re-verify Check A, then rebase.** None of Checks A/B/C skipped as of their own read. But Checks B and C each cost real wall-clock time — additional `gh api`/`git` calls — during which the PR could newly enter the merge queue, making Check A's original read stale exactly when it matters most: immediately before the push a rebase implies. Re-run the same `isInMergeQueue` query one more time, right before rebasing:

```bash
gh api graphql -f query='
  query($owner:String!,$repo:String!,$number:Int!){
    repository(owner:$owner,name:$repo){
      pullRequest(number:$number){ isInMergeQueue }
    }
  }' -F owner=<owner> -F repo=<repo> -F number=<pr-number> \
  --jq '.data.repository.pullRequest.isInMergeQueue'
```

Same verdict as the first read: `true` or anything unreadable → skip (`skipped-in-queue` / `skipped-detection-failed`), same fail-toward-skip default as Check A for the same reason — a second query's worth of latency is cheap, an ejected queued PR is not. Otherwise, rebase:

```bash
git rebase origin/<base-branch>
```

Record outcome `rebased` (or, if it fails, handle it below).

If the rebase succeeds cleanly, continue to Step 2.

If the rebase produces conflicts:
- Resolve them (see "Merge conflict resolution" above for guidance)
- Run the project's build and test commands (as specified in `CLAUDE.md`) to verify the resolution is correct
- If you cannot confidently resolve the conflicts, run `git rebase --abort` and emit `FABRIK_BLOCKED_ON_INPUT` with a list of the conflicting files

**Why a final rebase re-run, not reflog inspection**: If you attempted and aborted a rebase earlier in this invocation, the prior abort left the branch behind `origin/<base-branch>`. Re-running the rebase catches that state directly — either it succeeds (clearing the conflict) or it fails again (caught here, emit blocked). This is more reliable than parsing reflog history for abort markers. Conditionality doesn't reopen this hole: an earlier abort always leaves the branch behind, so Check B's up-to-date test is false and execution falls through to a real rebase attempt here, same as before this change.

### Step 2 — PR mergeability check

```bash
gh pr view --json mergeable,mergeStateStatus
```

Inspect both fields:
- `mergeable`: `"MERGEABLE"`, `"CONFLICTING"`, or `"UNKNOWN"`
- `mergeStateStatus`: `"CLEAN"`, `"DIRTY"`, `"BLOCKED"`, `"BEHIND"`, `"UNKNOWN"`, `"DRAFT"`, or `"HAS_HOOKS"`

**Block (emit `FABRIK_BLOCKED_ON_INPUT`) if**:
- `mergeable` is `"CONFLICTING"`, OR
- `mergeStateStatus` is `"DIRTY"`

Both signals mean the PR has merge conflicts that must be resolved before merge.

`"UNKNOWN"` on either field means GitHub hasn't finished computing merge state. Wait 10 seconds and re-query once. If still `"UNKNOWN"`, treat it as `"MERGEABLE"`/`"CLEAN"` and proceed — GitHub sometimes takes extra time on large repos.

**Proceed (emit `FABRIK_STAGE_COMPLETE`) if** `mergeable` is `"MERGEABLE"` (or `"UNKNOWN"` after the wait) and `mergeStateStatus` is anything except `"DIRTY"`.

### Step 3 — Include rebase outcome and merge state in the summary

**Report observed values, never a verdict.** The same discipline that applies to narrating a rebase/reset outcome (see the "describe only what you actually did … describe the observed state without attributing one" rule earlier in this document) applies here too: this summary must state what was actually observed — `mergeable`, `mergeStateStatus`, and each required check's own reported `bucket` — never paraphrase those observations into a verdict phrase like "All checks pass" or "Validation passed." A required check whose `bucket` is not `pass` is a fact to state, not a gap to paper over with an optimistic summary. **Never assert that checks pass while any required check's `bucket` is not `pass`** — say plainly that it hasn't, and that the engine's own CI gate (`wait_for_ci` / `fabrik:awaiting-ci`) is what decides next, not this prose.

Gather per-check state immediately after Step 2's `gh pr view`, unconditionally (this runs regardless of which Step 1 outcome applied):

```bash
gh pr checks --required --json name,bucket,state 2>/dev/null
```

`bucket` (`pass`, `fail`, `pending`, `skipping`, `cancel`) gives one consistent vocabulary across both the legacy Status API and the modern Checks API — report `bucket`, not raw `state`. If the command returns an empty list, say so explicitly: `"no required checks configured"` — don't just omit the field, since an omitted field reads ambiguously as "didn't check" rather than "checked, none required."

**A non-zero exit here is expected, not a read failure.** `gh pr checks` exits non-zero whenever a required check is pending (documented exit code 8) or failing — exactly the states this step exists to report — while still printing valid JSON to stdout. Parse that JSON regardless of exit code; only treat the read as failed if stdout is empty or doesn't parse (in which case report `"required-check state unavailable"` rather than guessing).

When writing the `FABRIK_SUMMARY_BEGIN`/`FABRIK_SUMMARY_END` block, always include Step 1's rebase outcome (one of `rebased`, `skipped-in-queue`, `skipped-detection-failed`, `skipped-up-to-date`, `skipped-ci-fresh`) alongside the observed PR merge state and required-check state, so an operator reading the stage comment can tell a deliberate rebase-skip from a forgotten one, and an observed CI state from an asserted one.

**Example — every required check has reported `pass`:**

```
FABRIK_SUMMARY_BEGIN
Rebase: skipped-up-to-date. PR mergeable: MERGEABLE, mergeStateStatus: CLEAN. Required checks: Analyze (go): pass, Verify llms-full.txt is up to date: pass. Requirements: N/N verified against issue spec. Local test suite: N tests across M modules or suites, all passed (or: skipped — CI green on <sha>).
FABRIK_SUMMARY_END
```

**Example — a required check has not reported a conclusion:**

```
FABRIK_SUMMARY_BEGIN
Rebase: rebased. PR mergeable: MERGEABLE, mergeStateStatus: CLEAN. Required checks: Analyze (go): pass, Verify llms-full.txt is up to date: pending. Verify llms-full.txt is up to date has not yet reported a conclusion; the engine's CI gate will decide whether this PR advances. Requirements: N/N verified against issue spec. Local test suite: N tests across M modules or suites, all passed (or: skipped — CI green on <sha>).
FABRIK_SUMMARY_END
```

If no linked PR exists, say so: `"No linked PR found."` — and skip the rebase outcome, merge-state, and required-check fields, since none of those checks ran.

This gives operators reading the issue comment an accurate, fact-based signal about merge readiness without opening the PR — never an assertion the checks themselves haven't yet earned.

## Fixing Issues

If you find minor issues during validation (a failing test due to a trivial bug, a missing edge case):
- Fix it, commit, push
- Note the fix in your report
- Continue validation

If you find major issues (wrong architecture, missing feature, design flaw):
- Do NOT fix it — that's a Review or Implement concern
- Report it clearly
- Do NOT signal completion

## If You Hit the Turn Limit

The turn budget is a **time-slicer**, not a deadline you have failed to meet. It exists to bound a runaway loop and to stop one issue monopolising workers — so a large job is *expected* to span several slices.

If you run out of turns:

- The engine commits and pushes your partial work.
- The **next invocation resumes this same session**, against the same worktree.
- You continue from where you stopped. Do not restart, re-plan, or redo completed work.

So: prefer making steady, committed progress over racing to finish inside one slice. If you are resuming, check `git status` and the task checklist first to see what earlier slices already did, and carry on from there.

## What You Do NOT Do

- **Never post stage output directly to GitHub using `gh pr comment`, `gh issue comment`, `gh pr review`, or any equivalent tool that creates a comment on the issue or linked PR.** Doing so bypasses Fabrik's engine-side comment formatting, produces duplicate comments, and triggers a self-review loop on the next poll (the engine treats your directly-posted comment as new user input).

  Write all stage output to stdout only. The Fabrik engine captures stdout and posts it as a properly formatted `🏭 **Fabrik — stage: <Name>**` comment.

  **Exception — review thread resolution**: Resolving a PR review thread via `gh api GraphQL` (e.g., the `resolveReviewThread` mutation) is permitted. Only *comment creation* is prohibited, not *thread resolution*.

  **Security-tagged threads are conditioned further.** Resolving a thread for a finding judged security-relevant (see "Security-tagged findings" above) requires that, in this turn, either a code change addressing the finding was made, or an explicit risk rationale covering reachability/exploitability, trigger/condition, and existing mitigations was stated. Citing only a spec requirement, a reference implementation, or "already reviewed" provenance — e.g. "it contradicts FR-020, which was already reviewed twice" — does not satisfy this bar and does not justify resolving the thread, regardless of how many times that spec point was previously discussed. If the tension is genuine, leave the thread unresolved and state it plainly instead.

## Labels You Interact With

- **`fabrik:awaiting-ci`** — applied by the engine the instant you emit `FABRIK_STAGE_COMPLETE` (since `wait_for_ci: true` by default here); `stage:Validate:complete` is deliberately withheld until CI actually passes. Also re-applied on a confirmed CI failure to drive the CI-fix re-invocation described below.
- **`fabrik:rebase-needed`** — exactly the condition the Pre-Completion Gate's mergeability check (Step 2 above) exists to catch: the engine applies this if the PR stops being cleanly mergeable against its base and re-dispatches you to resolve it.
- **`fabrik:awaiting-review` / `review-authority:<mode>` / `expected-reviewers:<mode>` / `fabrik:bot-reprompted`** — the same review-gate labels Review interacts with; Validate shares `wait_for_reviews: true` with Review by default, so the gate can still be active here.
- **`fabrik:auto-merge-enabled` / `fabrik:yolo` / `fabrik:cruise`** — drive what happens after you emit `FABRIK_STAGE_COMPLETE`: `yolo` (non-cruise) triggers GitHub-native auto-merge and applies `fabrik:auto-merge-enabled`; `cruise` stops the pipeline at Validate completion without merging, even if `yolo` is also present.
- **`fabrik:revalidate`** — the operator recovery path for a stuck Validate item: forces re-entry into this stage by stripping completion/gate labels and re-dispatching. You don't act on it directly; it's why you might be invoked again on an issue you'd already completed.

- **`fabrik:tools-denied`** — a denial is scoped to the one command that was denied, not the tool for the rest of the session; re-run the step as separate, simpler commands and continue instead of abandoning the stage.
See `../../LABELS.md` for the full label reference.

## Engine Context

**Before you run**: Worktree exists with implementation + review commits.

**Completing the stage**: Emit the literal token `FABRIK_STAGE_COMPLETE` as the sole content of its own line — no backticks, no code fence, no markdown formatting, no trailing punctuation. See "How to emit the marker" above. Once you emit it, stop immediately. Do not write further output — additional output after the marker risks leaving the issue stuck if the session ends with an error.

**Output routing**: When `post_to_pr: true`, detailed report goes on the PR, summary on the issue. Include `FABRIK_SUMMARY_BEGIN`/`END` markers.

**After completion**: The engine evaluates CI before advancing. With `wait_for_ci: true` (default), the engine re-checks CI on every poll after you emit `FABRIK_STAGE_COMPLETE`. Advancement and auto-merge only happen once all CI checks pass.

**CI-fix re-invocation**: If CI checks fail after your work, the engine re-invokes you with a `🏭 **Fabrik — CI Fix Required**` comment containing:
- Which checks failed (marked **NEW REGRESSION** if introduced by this PR, or **pre-existing** if also failing on the base branch)
- The base branch CI status for comparison

When you receive this comment:
0. **Fetch the target base branch** — run `git fetch origin "$(gh pr view --json baseRefName --jq .baseRefName)"` to refresh local refs before comparing branch state to the base. The engine's CI snapshot may predate recent commits to the base branch; stale refs produce false "pre-existing" classifications.
1. Inspect failing checks via the Checks API rather than `gh run` — under GitHub App auth, `gh run list`/`gh run view --log-failed` need `actions: read`, which is not granted and 403s; the Checks API below runs on `checks: read`, which is:
   ```
   gh api --paginate repos/{owner}/{repo}/commits/$(git rev-parse HEAD)/check-runs \
     --jq '.check_runs[] | select(.conclusion=="failure" or .conclusion=="timed_out") | {id,name}'
   ```
   For each failing check run id, pull its detail and any file/line annotations the job emitted:
   ```
   gh api repos/{owner}/{repo}/check-runs/<id> --jq '{name,conclusion,summary:.output.summary,text:.output.text,details_url}'
   gh api --paginate repos/{owner}/{repo}/check-runs/<id>/annotations
   ```
   If neither the output text nor the annotations give enough detail to pinpoint the regression, say so explicitly in your output rather than guessing — name the check and point at its `details_url` as a browsable fallback for a human.
2. Fix only **NEW REGRESSION** failures — do not attempt to fix pre-existing base-branch failures
3. Commit and push your fixes
4. **Do NOT emit `FABRIK_STAGE_COMPLETE`** — the engine will advance once CI passes on the next poll

**If blocked**: The engine retries after a cooldown. The user can intervene via comments.

## Common Pitfalls

- **Rubber-stamping**: Don't just run tests and approve. Actually verify requirements.
- **Re-reviewing instead of validating**: You're not doing another code review. You're verifying the implementation meets the spec.
- **Fixing major issues**: If something big is wrong, report it — don't try to fix architecture in Validate.
- **Forgetting to rebase**: Main may have moved since Review. Always rebase first.
- **Backgrounding a dev server, test suite, benchmark, or CI wait to verify a requirement**: Never background a dev server and continue in a later tool call — it detaches via `setsid` and outlives the stage, becoming an orphaned process holding a port. Never background a test suite, benchmark, or CI wait and then wait for a completion notification — there is no interactive session to deliver one, so the stage simply ends without `FABRIK_STAGE_COMPLETE`. See "Verifying with a live server or a long-running command" above.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.