Two new rules for Tier 2 (added per user directive 2026-06-27 after Tier 2 ran the full batch and piped through Select-Object -Last 20, losing the full record): 1. NEVER filter test output (Select-Object, head, tail, | Select -First N). ALWAYS redirect to a log file, then read it with read_file/grep. 2. Prefer targeted tier runs (--tier tier3, --filter test_<file>) over the full 11-tier batch. The full batch is for the USER post-merge, not for Tier 2 per-task verification. Applied to 3 files: tier2-autonomous.md, tier-2-auto-execute.md, workflow.md Tier 2 Autonomous Sandbox conventions.
6.2 KiB
description, agent
| description | agent |
|---|---|
| Autonomously execute a conductor track in the Tier 2 sandbox | tier2-autonomous |
/tier-2-auto-execute
Run a track autonomously in the Tier 2 sandboxed mode. No permission: ask prompts.
Arguments
$ARGUMENTS - Track name (required). Examples: result_migration_review_pass, data_structure_strengthening_20260606.
Optional flags: --resume (continue from last completed task), --toast (Windows toast on give-up).
Pre-flight
-
MANDATORY: Read these 8 files IN ORDER before any other action (added 2026-06-24 post-MCP-regression):
AGENTS.md(project root) — operating rulesconductor/workflow.md— workflow + tier conventionsconductor/edit_workflow.md— edit tool contractconductor/tier2/githooks/forbidden-files.txt— file denylistconductor/tracks/tier2_leak_prevention_20260620/spec.md— prior leak incident (DO NOT REPEAT)conductor/code_styleguides/data_oriented_design.md— canonical DODconductor/code_styleguides/error_handling.md—Result[T]conventionconductor/code_styleguides/type_aliases.md— the 10 TypeAliases
The first commit of the track must include "TIER-2 READ before " in the commit message. The failcount contract treats an unacknowledged first commit as a red-phase failure.
-
Verify sandbox is active. This slash command must be invoked from a sandboxed OpenCode session. If
manual-slop_get_ui_performancereturns an error or the run_tier2_sandboxed.ps1 wrapper is not in the parent process, refuse to start. -
Load the track spec. Read
conductor/tracks/<track-name>/spec.mdandplan.mdfrom the current branch. If the track does not exist, abort. -
Check for a previous run. If
tests/artifacts/tier2_state/<track-name>/state.jsonexists AND--resumeis NOT set, abort with: "Previous run found for this track. Use--resumeto continue, or delete the state file to start fresh."
Protocol
git fetch origin master(NOTE: this repo usesmaster, notmain; added 2026-06-17)git switch -c tier2/<track-name> origin/master(NOTgit checkout- it is banned)- Initialize failcount state at
tests/artifacts/tier2_state/<track-name>/state.json(useload_stateor fresh state) - For each task in
plan.md: a. Red: delegate test creation to @tier3-worker b. Run tests viauv run python scripts/run_tests_batched.py(NEVERuv run pytestdirectly; the batched runner provides tier filtering, parallelization, and the summary table — added 2026-06-17) c. If pass unexpectedly, callrecord_red_failureand checkshould_give_upd. Green: delegate implementation to @tier3-worker e. Run tests viascripts/run_tests_batched.py; if fail, callrecord_green_failureand checkshould_give_upf. On green:record_commitandrecord_green_success(resets counters) g. Commit per task withgit add <specific files> && git commit -m "..."and attach git note h. Updateplan.mdwith commit SHA - After all tasks complete, write the end-of-track report (see step 7) and print success summary.
- On give-up: call
write_failure_reportfromscripts.tier2.write_report, print "TRACK ABORTED, see report at ". - End-of-track report (added 2026-06-17): on success, write
docs/reports/TRACK_COMPLETION_<track-name>.mdfollowing the precedent set byTRACK_COMPLETION_tier2_autonomous_sandbox_20260616.md. Updateconductor/tracks/<track-name>/state.tomltostatus = "completed". The user reads this report to decide merge.
Conventions (MUST follow - added 2026-06-17)
- Test runner: use
uv run python scripts/run_tests_batched.py(NOTuv run pytest) - NEVER filter test output (added 2026-06-27 per user directive). Do NOT pipe test output through
Select-Object,| Select -First N,| Select -Last N,head,tail, or any truncation filter. Instead, ALWAYS redirect to a log file:uv run python scripts/run_tests_batched.py > tests/artifacts/tier2_state/<track>/test_run_<phase>_<task>.log 2>&1. Then read the log file to find relevant sections. The log file is your full record; you can search it without re-running. - Prefer targeted tier runs (added 2026-06-27 per user directive). Do NOT run the full 11-tier batch for every verification. Run only the tiers relevant to the current task (e.g.,
--tier tier3or--filter test_<specific_file>). The full batch is for the USER to run after merge review, not for Tier 2's per-task verification. - Default branch:
master(this repo never hadmain) - Line endings: preserve existing (CRLF stays CRLF, LF stays LF)
- Throw-away scripts: write to
scripts/tier2/artifacts/<track-name>/, NOT the base directory - Run-time expectation: tracks are 1-4 hours. If context runs out, note progress to disk and continue.
- Temp files (added 2026-06-17, rewritten 2026-06-18, paths updated 2026-06-18 per Tier 2's project-relative relocation; deny patterns expanded 2026-06-19 to catch all env-var forms): All scratch, state, audit-output, and intermediate files MUST live INSIDE the Tier 2 clone. Default locations:
tests/artifacts/tier2_state/<track>/state.jsonfor failcount state,tests/artifacts/tier2_failures/for failure reports,scripts/tier2/artifacts/<track>/for throwaway scripts. NEVER USE APPDATA — the AppData tree is OFF-LIMITS. The full list of forbidden literals (matched against the command string):*AppData\\*,*AppData\Local\Temp\*,*$env:TEMP*,*$env:TMP*,*%TEMP%*,*%TMP%*,*GetTempPath*,*gettempdir*,*mkstemp*. Do NOT attempt to use$env:TEMP,$env:TMP,%TEMP%,%TMP%, or any temp-dir API in any form — every one of those literal command strings is denied at the bash level.
Hard Bans (enforced by 3 layers)
git restore*(any form) — deniedgit push*(any push) — deniedgit checkout*(any form) — denied; usegit switchinsteadgit reset*(any form) — denied
Filesystem access is restricted to the Tier 2 clone (C:\projects\manual_slop_tier2\). The Windows restricted token blocks reads/writes outside this path at the OS level. NEVER USE APPDATA — there is no longer any Tier 2 state or scratch dir on AppData; the *AppData\\* bash deny rule enforces this.