Commit b8186ea4 authored by Vacaliuc, Bogdan's avatar Vacaliuc, Bogdan
Browse files

plan: initialization.md — §0 v2 deprecation banner + §11 verification block



§0 banner: declares v2 deprecation of the standalone Initialization
agent (folded into Administrator phase 1 per orchestration.md §6.4 /
§9.6 / §13.1). The checklist content itself remains canonical here;
v1 standalone fallback is in Initialization-prompt.md.

§11 (NEW): Target-branch dependency verification block per
orchestration-v2-redesign.md §15.2. Catches the F1 finding (missing
pytest-timeout plugin) at protocol-rehearsal time instead of leaking
to the Integrator's dry-run-delta cycle. Five probes:

1. Active pixi env corresponds to {base-branch}.
2. pytest-timeout import probe.
3. Canonical test command accepts --timeout=1 (transitively verifies
   pytest-timeout is loaded), with -k 'test_does_not_exist' so no
   tests actually run.
4. Dry-run-only: pixi task test-dry-run exists.
5. pyproject.toml [tool.ruff.lint] ignore list is non-empty.

Both Administrator phase 1 and the v1 standalone Initialization
agent walk this block.

Also updated §10 to add "per-cycle plugins added/removed" as a
re-run trigger.

Co-Authored-By: default avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent 63a686e9
Loading
Loading
Loading
Loading
+99 −4
Original line number Diff line number Diff line
# {tasking-branch} — Initialization agent checklist

**Audience:** the **Initialization** agent (§9.4 of the meta-plan),
run once before the three-agent orchestration starts; also re-runnable
whenever the environment changes (new machine, rotated PAT, new
remote).
## 0. v2 deprecation banner

> **In v2 the standalone Initialization agent is deprecated.** Its
> work is now performed by **phase 1 of the Administrator agent**;
> see [Administrator-prompt.md](Administrator-prompt.md) and
> `plan/orchestration.md` §6.4 / §9.6 / §13.1.
>
> This file remains **canonical for the checklist content** —
> Administrator phase 1 walks §1-§10 below, plus the §11
> Target-branch dependency verification block (added in v2 to catch
> the `pytest-timeout` gap that leaked into the dry-run delta cycle —
> see `dry-run-Analyst-findings.md` F1). Re-init flows (credentials
> rotated, machine moved, `{base-branch}` switched) re-walk this
> document the same way.
>
> The v1 standalone Initialization session remains an acceptable
> fallback — see [Initialization-prompt.md](Initialization-prompt.md).
> New deployments should start the Administrator agent first per
> `plan/orchestration.md` §13.1 instead.

---

**Audience:** **Administrator phase 1** (`plan/Administrator-prompt.md`),
run first on each machine before the three worker agents start; or
the v1 standalone Initialization agent (deprecated, see §0). Also
re-runnable whenever the environment changes (new machine, rotated
PAT, new remote).

**Purpose:** verify that every local feature, credential path, hook,
and remote operation the orchestration depends on actually works
@@ -404,6 +427,78 @@ Re-run whenever any of:
- Switched `{base-branch}` to a branch with different protection
  rules.
- Upgraded `git`, `pixi`, `gh`, or `glab` to a new major version.
- Per-cycle plugins (e.g., `pytest-timeout`) were added or removed.

The checklist is idempotent: re-running on a clean environment
produces the same report and cleans up the same way.

---

## 11. Target-branch dependency verification (v2; per redesign §15.2)

Run this block **after** §8 ("Test environment") and **before**
declaring "Phase 1 complete." (or, in the v1 standalone path,
"Ready to launch orchestration.") in §9. It catches the F1 finding
(missing `pytest-timeout` plugin) at protocol-rehearsal time
instead of leaking it into the Integrator's `dry-run-delta` cycle.

1. **Confirm the active pixi env corresponds to `{base-branch}`**
   (`new_workflow_ui_plan` for this effort):

   ```bash
   cd lr_reduction
   git rev-parse --abbrev-ref HEAD          # expect {base-branch}
   pixi info | grep -E '^(Project|Environments)'
   ```

2. **Probe each test-runtime plugin the protocol requires.** For
   the dry-run delta path and any production cycle that uses
   `--timeout`:

   ```bash
   pixi run python -c "import pytest_timeout; print('pytest-timeout', pytest_timeout.__version__)" \
     || echo "MISSING: pytest-timeout — needed for dry-run-delta. \
              See plan/orchestration-v2-redesign.md §15.1 for install."
   ```

3. **Confirm the canonical test commands accept the full argument
   set the Integrator will use.** `--collect-only` alone (per §8)
   verifies pytest imports; `--timeout=1` transitively verifies
   `pytest-timeout` is loaded:

   ```bash
   pixi run test-reduction -- --collect-only --timeout=1 -k 'test_does_not_exist' \
     2>&1 | tail -5
   ```

   Expect a clean "0 tests collected" line — not an arg-parse error
   (exit 4) and not an environment failure.

4. **Dry-run only**, when `{integrator-test-cmd} = test-dry-run`:
   confirm the dry-run pixi task exists:

   ```bash
   pixi run test-dry-run -- --collect-only 2>&1 | tail -5
   ```

   Expect "0 tests collected" cleanly (the synthesized test files
   don't exist yet on a fresh `{base-branch}`; the *task itself*
   must exist and be invokable). If the task is missing, that's a
   `pyproject.toml` gap — see `plan/orchestration-v2-redesign.md`
   §14.

5. **Read `pyproject.toml`'s `[tool.ruff.lint]` ignore list** and
   confirm it is non-empty (per `dry-run-Initialization-findings.md`
   §2; missing ignore list ⇒ 780 ruff violations on commit, breaking
   pre-commit hooks):

   ```bash
   grep -A30 '\[tool\.ruff\.lint\]' lr_reduction/pyproject.toml \
     | grep -E '^\s*(ignore|extend-ignore)' \
     || echo "WARNING: [tool.ruff.lint].ignore is empty — pre-commit \
              hooks will reject commits with 780+ violations."
   ```

If any check fails, STOP and hand the user a specific action item.
Do **not** enter Administrator phase 2 (or, for the v1 path, launch
the worker agents) until every check passes.