---
name: rigor-lane
description: >-
  Implement one Rigor issue under a fixed architect LaneInput contract in a
  worktree, push, print head SHA, and stop. Do not CI-watch, run parallel host
  make verify, or burn the session on full corpus checks. Finish with Head SHA
  <sha> — lane done or Blocked — need human.
---

# Rigor lane (ADR-115)

Load and follow:

- Role: [`../../roles/lane.md`](../../roles/lane.md)
- Contracts: [`../../contracts/README.md`](../../contracts/README.md)
- Process note (v0.4.0 batch traps):
  [`../../../docs/notes/20260921-queue-release-lane-experience.md`](../../../docs/notes/20260921-queue-release-lane-experience.md)
  (when present on the branch)

## Hard constraints (always)

- **No parallel full-suite `make verify` on the host**
- **Do not own long CI watchers / sleep-poll loops** — push and stop
- **No full survey corpus `check` loops inside this session** — timeout trap;
  record residual risk / leave measurement to orchestrator
- **Issues remain the backlog** (consume the architect contract; do not file a parallel queue)
- Do not `pkill` by pattern
- Lint own `.rb` diffs with RuboCop `--force-exclusion` only
- Prefer worktree isolation

## Preflight (before first Ruby / gh)

1. **Model:** use the agent frontmatter / spawn `model:` (Flash registry id). Do
   not assume `deepseek/deepseek-flash` exists.
2. **Bundle:** untracked `.bundle/config` → `BUNDLE_PATH=<main-repo>/vendor/bundle`
3. **Branch:** `git switch -c <change-slug>-<issue>` before push (not `pi-subagents/…`)
4. **Issue truth:** `gh issue view <n> --comments` — LaneInput may lag maintainer rulings

## Input

Consume a **LaneInput** from the architect (Acceptance, touch, must_not,
worktree/branch). Do not invent policy outside that contract. If live tree or
issue comments contradict the contract, escalate — do not silently widen scope.

## Shared traps (from 2026-09-21 batch)

- `gh issue/pr create` with backticks in a shell heredoc → command substitution;
  always `--body-file`
- Changelog fragment only **after** PR number exists
- Probe engine capability before writing an acceptance example that expects a
  diagnostic (e.g. non-nil `+` mismatch may be silent by design)
- Plugin edges: use RSpec harness fixtures; bare probes often load nothing
- Exact-text `edit` failures: pull exact lines (e.g. Python `repr`) before retry

## Output

1. Implement Acceptance with targeted local checks only.
2. Open/update Draft PR with `--body-file`.
3. Push the change-named branch.
4. Print the tip SHA and stop (orchestrator / external poll owns CI).

LaneOutput shape:

```text
LaneOutput:
  head_sha:        <40-hex>
  status:          "lane done" | "blocked"
  notes:           optional residual risk / wrong turns / corpus deferred
  pr_url:          optional
```

## Finish phrases (exact)

- Success: `Head SHA <sha> — lane done` (40-hex SHA)
- Blocked: `Blocked — need human`

Model band: DeepSeek Flash-class (bound by `scripts/run-role.sh` /
`.pi/agents/rigor-lane.md`).
