name: autoz
description: "Autonomous z-pipeline driver. Triggered by autoz or $autoz. Builds SSOT-LIST + SSOT-TASK-TREE first (per local:using-ssot), reproduces the user's instruction/issue as a RED test, confirms RED, then drives the full local:using-z / local:z procedure end-to-end without asking the user any questions. Open decisions are resolved by mutual agreement between you and codex (mcp__llm__chat model=codex). PR approval runs via gh pr review --approve from the gh CLI's authenticated account. After approval, proves success against the SSOT (using-ssot Hook 4) and posts that proof to the source issue as the evidence record of why the PR resolved it."
autoz — Autonomous z-pipeline
Trigger
- Explicit:
$autoz,autoz, orautoz <issue-url|prompt>. - Implicit: any instruction or issue link paired with autoz semantics ("autoz this", "autoz the issue", "autoz로 처리해줘").
Hard Rules
SSOT contract. Apply
local:using-ssotat every lifecycle hook (Intake / Drift / Resume / Report). autoz-specific overrides:- (a) Never pause for user confirmation at any hook. Output the tree, then proceed. Outputting the SSOT-TASK-TREE is not a question — it's a visible work plan.
- (b) Codex consult is bounded by switching cost. Skip codex when the operation is trivial:
- Intake — tree has
ssot-taskcount == 1 AND depth == 1. - Drift — diff is
added-only AND adds ≤ 1 node AND nochanged/removed. Otherwise callmcp__llm__chatmodel: codex(usegeminias tiebreaker), log the transcript reference in the PR body. Report uses the ztrace single-pass result mandated by Hook 4.
- Intake — tree has
RED-first. After SSOT is captured, before any implementation, reproduce the user's intent (or the issue's described behavior) as a failing test.
- Bug → test asserts the missing/broken behavior and must fail against current code.
- Feature → test pins the new behavior and must fail because the feature isn't built yet.
- Confirm RED is actually red by running the test command and reading the output. Do not proceed until RED is stable and reproducible.
- For pure doc/skill/config additions where "test" reduces to existence/format checks, the RED is the
ls/cat/lint command that fails because the artifact does not yet exist or does not yet conform. Log it. - Each RED test must trace back to one or more
ssot-taskIDs — record the mapping.
No user questions. Never call
ASK_USER_QUESTION/UIAskUserQuestion. Never end a turn waiting for clarification. Every decision point goes through Rule 1(b)'s codex consult; the consult answer + your own analysis = binding decision (logged in the PR body for audit).Drive the full local:using-z / local:z pipeline. Invoke
using-zrouting first, thenzfor the actual run. Honor every phase boundary (CONTINUE_SESSION handoffs included). Do not skipzcheck. Do not skip simplify / oracle / reviewer steps that the z flow defines at the current scope.PR approval via gh CLI. After CI is green and required reviews pass:
- Run
gh pr review <number> --approve --body "<short rationale>"from the bot's gh-authenticated shell. - Do not request user approval. Do not paste the approve URL — execute the approval.
- If merge requires a separate
gh pr merge, run it too unless project policy forbids it. Check.github/andCLAUDE.mdfor merge-policy hints before merging.
- Run
SSOT success proof, posted to the issue (mandatory, after approve). Prove — against the SSOT, not the work narrative — why the run succeeded, then write that proof into the source issue:
- Render the
local:using-ssotHook 4 mapping: perssot-task, quote the SSOT sentence it came from → the concrete artifact (PR / commit / file / test) → the causal reason the artifact satisfies the requirement. Verify with the single ztrace pass mandated by Hook 4. An unmappedssot-taskmeans the run is NOT done — go back and finish; never write the proof around the gap. - Post the proof as a comment on the source issue:
gh issue comment <number> --body-file <proof.md>(bot-token 401 → the 5-retry protocol from Hard Blockers, raw curl included). This comment is the evidence record of why this PR resolved this issue — SSOT quote → what was done → why that satisfies it, plus RED→GREEN evidence and the PR link. - If the run started from a plain instruction with no issue, append the proof as the final section of the PR body instead.
- The run is not finished until this evidence is posted.
- Render the
Terminal report only. Render via the
local:esmode template (which already implements Hook 4's per-ssot-taskaccountability block). autoz-specific additions on top ofes:- PR URL + CI status + approve status + the evidence URL from Rule 6 (issue-comment URL preferred; the PR-body proof section URL on the no-issue fallback).
- Codex transcript references for every autonomous decision.
- The single ztrace pass result from Hook 4 attached as verification evidence — unmapped
ssot-taskis blocking, not advisory. - No mid-run progress check-ins. The only mid-run user-facing output is the SSOT-TASK-TREE visibility mandated by Hook 1 / Hook 2.
Hard Blockers (when stopping is allowed)
Stop and report — do not silently fail — only when:
- Repo / branch literally cannot be accessed (auth, disk, network) after the 5-retry-strategy protocol from your memory: (a) different headers (Bearer↔token), (b) different tokens in env, (c) raw curl bypass, (d) alternative trigger paths (PR close+reopen, empty commit, force push), (e) a real fix attempt. "Permission insufficient" alone is never enough to delegate to the user.
- User's intent is genuinely incoherent (mutually contradictory requirements). Even then, present codex's diagnosis of the contradiction as a SSOT-TASK-TREE that cannot be made acyclic, not an open-ended question.
- Drift instruction explicitly retracts work that has already been merged and the retraction is non-revertible (e.g. a destructive migration already ran in prod) — surface the irreversibility, do not silently re-do.
Pipeline Order
- Hook 1 — Intake & tree. Parse instruction / fetch link / build SSOT-LIST → SSOT-TASK-TREE → output to user → TodoWrite register → codex validation.
- Codex scope consult. Align on acceptance criteria per
ssot-task. Save transcript reference. - Workspace. Clone / locate working tree. Create branch.
- RED. Write RED test(s), tag each with the
ssot-taskIDs it covers. Run. Confirm RED. - GREEN. Implement until GREEN. Re-run target tests + full test suite + lint + typecheck.
- Commit, push, open PR with codex-decided scope notes + the SSOT-TASK-TREE rendered in the PR body (collapsed
<details>for thessot-subtasklayer). - CI watch. Iterate on red CI without asking user — diagnose, fix, push.
- Self-review with
local:zcheck. Address blocking findings. - Drift check before approve. If a new user message arrived during 6–8, run Hook 2 first and re-loop 4–8 as needed.
gh pr review --approveonce green and zcheck is clean.- SSOT success proof → issue update. Build the Hook 4 per-
ssot-taskproof (ztrace-verified) and post it to the source issue as the why-this-PR-resolved-it record (Hard Rule 6). - Terminal report. Hook 4. Includes
ztracecross-check + the Rule 6 evidence URL (issue comment, or PR-body proof section when no issue).
What This Skill Does NOT Do
- Does not skip the SSOT-TASK-TREE intake/output (Hook 1) even for "obvious" one-line changes.
- Does not paraphrase the user's instruction when building SSOT — raw text only.
- Does not wipe-and-restart on drift. Always diff at
ssot-taskgranularity and resume. - Does not skip the RED phase even for "obvious" changes.
- Does not approve PRs with unresolved review comments or red CI.
- Does not end the run without the SSOT success proof posted to the source issue (or PR body when no issue exists).
- Does not force-push to
main, does not bypass branch protection, does not skip git hooks (--no-verify,--no-gpg-sign, etc.) unless the user has explicitly authorized it. - Does not re-implement the z pipeline. It only enforces the autonomous, SSOT-first + RED-first, no-user-question contract on top of
local:using-z/local:z.
Relationship to Other Skills
| Skill | Relationship |
|---|---|
local:using-ssot |
autoz binds every Hook (1·2·3·4) to this contract. The SSOT-TASK-TREE shape, drift diff, handoff payload, and completion mapping all live there. |
local:using-z |
autoz delegates routing to using-z once the SSOT-TASK-TREE is on screen. Session handoffs carry SSOT-LIST + tree. |
local:z |
autoz hands off implementation/CI/review to z and never re-implements those phases. z phase0 reuses the SSOT-TASK-TREE autoz built rather than rebuilding. |
local:zcheck |
autoz calls zcheck before approval. Blocking findings must be fixed before gh pr review --approve. zcheck's persuasion step ties findings back to ssot-task IDs. |
local:ztrace |
autoz's terminal report cross-checks the SSOT-TASK-TREE coverage against ztrace scenarios. |
local:es |
autoz's terminal report uses the es mode template, with the SSOT-TASK-TREE walk as the body. |
local:decision-gate |
autoz lets z phase0 run decision-gate for tier selection (tree depth/breadth is one of the tier signals). autoz itself does not gate on user input. |
mcp__llm__chat (codex) |
Sole consultation channel when a decision would otherwise become a user question. Used for SSOT-TASK-TREE validation, scope alignment, drift-diff justification, tie-break decisions. Transcript references must be logged in PR body. |