execute-6982c7 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited execute-6982c7 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Drive an approved / user-supplied / review-only plan through the execution loop, quality polish (Step 3.5), docs consistency (3.6), security preflight (3.7), and delivery (Step 4). Supports multi-batch runs via --stop-after <stage> and the unsafe --accept-external-state opt-in.
The Orchestrator MUST Read each of these files at start. They are the single source of truth for this skill's execution loop and output schemas.
docs/protocol/session-file.mddocs/protocol/execution.mddocs/protocol/executor-output.mddocs/protocol/reviewer-output.mdDo not re-derive any rule that already lives in a protocol doc. When a step below says "see docs/protocol/<doc>.md §Foo", follow that doc verbatim. The startup read set is complete only after all 4 docs above have been read explicitly; the embedded executor/reviewer prompt bodies are not a substitute for reading executor-output.md and reviewer-output.md.
agent invocation MUST use subagent_type: general-purpose with the agent's full .md body inlined in the prompt parameter. Never use subagent_type: review-loop:<name>. See CLAUDE.md §"Plugin agent type sandbox bug".
before any lock is acquired or session field is written. The Orchestrator must not modify the session file or create the lock until flag parsing has succeeded.
Exactly one of the three entry flags must be supplied. Supplying more than one is a parse error; the Orchestrator exits without touching the session file or the lock.
# Entry mode 1 — resume an approved session
run execute: --session <uuid> [--stop-after <stage>] [--handsfree] [--accept-external-state]
# Entry mode 2 — execute a user-supplied plan verbatim
run execute: --plan <text|path> --title <...> [--description <...>] [--stop-after <stage>] [--handsfree] [--accept-external-state]
# Entry mode 3 — pure code-review over the current working tree
run execute: --review-only [--description <what was done>] [--stop-after <stage>] [--handsfree] [--accept-external-state]Before parsing flags or touching session state, Read the 4 Protocol Imports docs listed above.
Execute before any lock or session write.
--session,--plan, --review-only are present. If ≠ 1 → print usage and exit with non-zero.
supported set (per docs/protocol/execution.md §Runtime-supported subsets):
exec-roundbefore-polishbefore-docsbefore-securitybefore-deliverydelivery (default when flag is absent)Any other value → reject at parse time. Error message must list the supported subset. Do not create the lock, do not touch the session file.
Handsfree alone does NOT auto-accept drift — see --accept-external-state.
accept" wherever docs/protocol/session-file.md instructs the Orchestrator to pause-and-confirm (drift check step 4; backward-compat missing-baseline fallback). Documented as unsafe: the user is opting out of pausing on external tree drift. The flag has no effect outside those two prompts — it does not bypass unmerged-conflict errors, unknown-git-state errors, or per-stage hard-stops.
.review-loop/config.md if present; otherwiseuse defaults from skills/review-loop/SKILL.md §Configuration.
plan skill(which codex for reviewer: codex).
Compute the session UUID so the lock path is known; do not read or write the session file yet — the single-writer lock must come first per docs/protocol/session-file.md §Lock file lifecycle.
--session <uuid>: adopt the UUID the user supplied. Confirm thepath is well-formed (.review-loop/sessions/{uuid}.md). Do not Read the file content yet.
--plan <text|path>: generate a fresh lowercase UUID.--review-only: generate a fresh lowercase UUID.Flag parsing (Step 0) and --stop-after validation have already completed; those steps are intentionally pre-lock per the --stop-after design-spec requirement and docs/protocol/execution.md §Parse-time validation.
Per docs/protocol/session-file.md §Lock file lifecycle. Every subsequent read and write of the session file (creation, resume-time re-baselining, round updates) must happen under this lock. Summary:
.review-loop/sessions/{uuid}.lock — PID, ISO-8601 started_at,entry_point, stop_after.
PID dead → prompt-to-recover.
--stop-after stop,signal abort trap, unrecoverable error trap).
Per the entry-mode initialization table in docs/protocol/session-file.md §Entry-mode initialization table. All reads and writes below happen after Step 1 acquired the lock.
entry_point is set once on session creation per docs/protocol/session-file.md §Session Metadata schema; --session resumes preserve the original value.
--session <uuid>.review-loop/sessions/{uuid}.md. If the file is missing →release the lock and exit with an error.
missing, pause-and-prompt per docs/protocol/session-file.md §Backward-compat fallback. --accept-external-state auto-picks (A). Handsfree alone blocks. The entry_point backfill rule for legacy sessions also lives in docs/protocol/session-file.md §Session Metadata schema; this skill defers to the protocol doc rather than re-stating it here.
--plan <text|path>.review-loop/sessions/{uuid}.md with the --plan column ofthe init table:
## Approved Plan → - Source: user-supplied followed by theuser's free-form plan text injected verbatim. If --plan was a path, read the file and inject its contents; if it was inline text, inject directly.
## Current Phase: execution.## Context = `"User-supplied plan; no planning-phase contextcaptured." + any --description`.
## Acceptance Criteria = `"Implementation matches theuser-supplied plan in ## Approved Plan."`.
## Session Metadata:entry_point: execute-from-planplan_source: user-suppliedbase_head, base_dirty, etc.) fromcurrent repo state.
execution rounds the reviewer's plan-conformance deviations are advisory / MINOR per docs/protocol/execution.md §Provenance-aware reviewer prompts, plan_source: user-supplied block. Correctness + intent-alignment are still enforced strictly.
--review-only.review-loop/sessions/{uuid}.md with the --review-onlycolumn of the init table:
## Approved Plan → - Source: review-only followed by thetwo-line canonical sentinel exactly as documented in docs/protocol/session-file.md §Canonical sentinel for review-only:
(none — review-only mode)
Scope: see `## Review Target` section below.No other text goes into the body.
## Review Target (non-canonical supplemental section) ispopulated from the user's --description / scope arguments.
## Current Phase: execution.## Files Changed — populated from the actual post-open dirty set(read-only snapshot).
## Session Metadata:entry_point: review-onlyplan_source: review-onlydocs/protocol/execution.md §--review-only first-round skip.
Per docs/protocol/session-file.md §Drift-check decision tree (5 steps). For --plan and --review-only fresh sessions, the freshly written baseline equals current state so step 2 + 3 pass cleanly. For --session resumes, run the full decision tree.
On detected drift:
(A) Accept drift and reset baseline to current state
(clears completed_stages entirely, including exec)
(B) Abort--accept-external-state auto-picks (A). Unsafe.decision).
base_head ← current_head, `base_dirty ←current_dirty, last_verified_head ← current_head, last_verified_dirty ← current_dirty, clear completed_stages` entirely, continue.
delivery_blocked_byPer docs/protocol/session-file.md §Resume from non-null delivery_blocked_by. When the existing session has a non-null delivery_blocked_by: prompt continue-or-abort with the previous block reason; on continue, clear delivery_blocked_by ← null and then run the standard drift check.
Per docs/protocol/execution.md §Step 3 — Execution round loop. Round sequence: update context → Executor (skipped on --review-only round 1) → update context → optional context-persist sub-step → Reviewer → parse → Live Report → loop control.
The Orchestrator picks the reviewer-prompt block that matches the active ## Session Metadata.plan_source, per docs/protocol/execution.md §Provenance-aware reviewer prompts:
plan_source: reviewer-approved → strict plan-conformance block.plan_source: user-supplied → plan-conformance deviations become[MINOR]/advisory unless they change user-visible behavior or violate acceptance criteria; correctness + intent still enforced. The orchestrator MUST emit the literal sentinel (plan_source: user-supplied — plan conformance is advisory/MINOR) verbatim inside the reviewer prompt so tests and audits can confirm this block was selected.
plan_source: review-only → pure CR mode. No plan-conformancelanguage. Reviewer is explicitly told the Approved Plan body is the canonical sentinel from docs/protocol/session-file.md §Canonical sentinel for review-only and ## Review Target carries the scope.
--review-only first-round skipPer docs/protocol/execution.md §--review-only first-round skip:
review content targets the existing diff + ## Review Target scope. The Orchestrator writes the round-1 Review History entry with the literal marker - Executor backend: skipped (review-only first round) so tests and audits can assert the skip unambiguously.
before Step 3.5, and mint exec only after Step 3.4 APPROVE/controlled SKIP, or after Step 3.4 REQUEST_CHANGES is repaired and a later normal Step 3 Reviewer returns APPROVE. This remains the only path where exec can be added without the Executor running before the first review-only gate.
(Executor runs, then Reviewer, alternating).
Executor: see docs/protocol/planning.md §Executor dispatch, Claude Code block — same template, with the execution-mode task body per docs/protocol/execution.md §Round steps step 2.
Dispatch anchor: execute_executor_dispatch_skill. The execution-phase Executor remains a judgment-tier dispatch and resolves model as executor_model if set and not inherit, else judgment_model if set, else omit.
Reviewer: see docs/protocol/planning.md §Reviewer dispatch, Claude Code block, with the execution-mode review content template per docs/protocol/execution.md §Round steps step 5. review_style and review_focus apply to all rounds, not only round 2+.
Never use `subagent_type: review-loop:<name>` — plugin agent-type sandbox bug. Always general-purpose with body inlined.
APPROVE → exit the execution loop. If Step 3.4 has not yet run in thisexecution convergence, run Step 3.4 before Step 3.5 and do not mint exec yet. Step 3.4 is single-pass per execution convergence. Step 3.4 APPROVE or controlled SKIP mints exec into completed_stages for the current tree+index state, then proceeds to Step 3.5 unless --stop-after before-polish. Step 3.4 REQUEST_CHANGES withholds exec and feeds the gate findings to ordinary Step 3 Executor/Reviewer repair rounds; do not run Step 3.4 again while repairing those findings. A later normal Step 3 reviewer APPROVE after those repairs mints exec and proceeds to Step 3.5 unless --stop-after before-polish.
REQUEST_CHANGES → feed feedback to the next Executor round.docs/protocol/execution.md§Per-stage max-round caps (soft_limit_exec, default 3).
--stop-after exec-round → clean exit after the current roundfinishes (even on REQUEST_CHANGES). Perform step 5 of the drift tree (update last_verified_*, append to session_commits).
Per docs/protocol/execution.md §No-op execution round validation. The Orchestrator compares the Executor's claimed file list against the current-round delta (pre-round vs post-round). Same path sets alone do not prove a no-op.
Then release the single-writer lock per docs/protocol/session-file.md §Lock file lifecycle before exiting. Do not proceed with a partial or invented changed-set.
Per docs/protocol/execution.md §Step 3.4 — Terminal Adversarial Gate. Single-entry-point Python invoker; single-pass per execution convergence between Step 3 APPROVE and Step 3.5 polish entry. Gate APPROVE/SKIP mints exec; gate REQUEST_CHANGES returns to ordinary Step 3 repair rounds without minting exec, and the gate does not run again while repairing those findings. All concerns (plugin-path preference, snapshot/restore, drain threads, signal cleanup) live inside the invoker.
# Terminal Adversarial Gate — single-entry-point Python invoker.
python3 scripts/adversarial_gate_invoke.py --focus-file "$focus_text_file"
adversarial_exit=$?
# 0 → APPROVE; 1 → REQUEST_CHANGES; SKIP reasons land on stderr.SKIP banner format: adversarial-gate: SKIP reason=<reason>[ detail=<...>] (5 reasons per the protocol-doc SKIP-reason table). Verdict table: adapter exit 0 → APPROVE; exit 1 → REQUEST_CHANGES; exit 2 → REQUEST_CHANGES because produced-but-malformed adversarial output is blocking, not SKIP. APPROVE mints exec; REQUEST_CHANGES does not mint exec and feeds findings to ordinary Step 3 repair rounds without another Step 3.4 pass in that repair path.
Fallback cleanup failure is a blocking REQUEST_CHANGES, not SKIP: if .review-loop/config.md cannot be proven restored/deleted after fallback execution, or an unexpected existing or create-from-empty config change must be preserved for inspection, do not mint exec; feed the synthetic [CRITICAL] cleanup issue to ordinary Step 3 repair rounds without another Step 3.4 pass in that repair path.
No Agent dispatch involved — invoker is a Bash shell-out to Python, so the plugin-agent-sandbox bug does not apply.
The adversarial_gate_skip_paths config key (default ["**/SKILL.md", "docs/protocol/**", "tests/skills/contracts/**"]) lets the orchestrator skip the gate entirely when every Step 3 changed file matches one of the patterns.
Per docs/protocol/execution.md §Step 3.5. Runs language-specific static analysis, code-quality review-fix loop, simplify, test consolidation. quality_focus applies only when Step 3.5 Quality Polish actually runs. If skip_quality_polish: true in config, mint polish as a no-op completion and continue to Step 3.6.
completed_stages and theOrchestrator replays from exec per docs/protocol/session-file.md §completed_stages lifecycle. Each replay iteration that writes files clears the set and restarts from exec. Termination is guaranteed by the per-stage caps.
reviewer-only fast-replay exception: eligible Step 3.5.4prose/comment/metadata-only writes that do not touch lint-pinned needles or change the bash scripts/run-skill-lint baseline may preserve the current completed_stages per docs/protocol/session-file.md §completed_stages lifecycle.
APPROVE does not mint polish.Step 3.5.6 mints polish only after the full Step 3.5 invocation finishes cleanly with either no writes, or only eligible writes already approved by reviewer-only fast-replay.
0`, discard and retry once; if retry is also 0, skip and report.
--stop-after before-polish → exit after Step 3.4 APPROVE/SKIP andbefore Step 3.5 starts. --stop-after before-docs → exit after Step 3.5 and before Step 3.6.
All Step 3.5 invocations use subagent_type: general-purpose with the agent body inlined, per docs/protocol/execution.md §3.5.2 / §3.5.3 / §3.5.4 / §3.5.5.
Per docs/protocol/execution.md §Step 3.6. Single pass. Update project docs + fix stale code comments. Writes → clear completed_stages, replay from exec, except for the narrow reviewer-only fast-replay exception above when the write is eligible prose/comment/metadata-only work that does not touch lint-pinned needles or change the bash scripts/run-skill-lint baseline. No-write or approved reviewer-only fast-replay → mint docs. After minting `docs`, proceed to Step 3.7 — a no-op docs stage is not a terminal state.
tool_uses: 0, discard and retry once; if retry is also 0, skip and report.--stop-after before-security → exit after Step 3.6 and before Step 3.7.
Per docs/protocol/execution.md §Step 3.7. Single scan. Check for tracked/staged sensitive files; audit .gitignore for missing coverage. Writes to .gitignore or git rm --cached → clear completed_stages, replay from exec. No-write → mint security.
Step 3.7 runs unconditionally after Step 3.6, regardless of whether any prior stage wrote files. A no-op session (zero code changes, zero doc updates) still runs this scan — it is a security gate, not a content-dependent step. The only exits before 3.7 are --stop-after before-security / before-docs / before-polish / exec-round.
tool_uses: 0, discard and retry once; if retry is also 0, skip and report.--stop-after before-delivery → exit after Step 3.7 and before Step 4.
Per docs/protocol/execution.md §Step 4 — Delivery, gated by the delivery gate in §Delivery gate: runtime_supported_set ⊆ completed_stages. For Claude Code the runtime set is {exec, polish, docs, security}; for Codex Stage 1 it is {exec, polish, docs, security}. Codex Stage 1: {exec, polish, docs, security} ⊆ completed_stages.
On gate failure, hard-stop per §Delivery gate: set delivery_blocked_by ← <first missing stage>, release the single-writer lock per docs/protocol/session-file.md §Lock file lifecycle, and exit without delivering. The stuck summary is printed from docs/protocol/execution.md §Per-stage max-round caps.
On gate pass:
auto_commit: true: stage only the files the Executor reported(never git add -A/git add .), commit with {commit_message_prefix}: {title}, append sha to session_commits.
docs/protocol/execution.md §Step 4 — Delivery — this skill reuses the same format). Render the Delivery Summary in 中文 (Simplified Chinese) per docs/protocol/execution.md §Step 4: section headings, prose, and prose-style field values use 中文; ASCII tokens stay in original form.
docs_file if set.delivery_blocked_by ← null. Release the lock.--stop-after replay / invalidation interaction--stop-after exit at any stage clears delivery_blocked_byper docs/protocol/session-file.md §delivery_blocked_by lifecycle, even if the session was previously blocked (the user already acknowledged on resume).
docs/protocol/session-file.md §completed_stages lifecycle) apply during replay. Each writing substep clears the set; replay restarts from exec. Per-stage caps bound iteration.
delivery_blocked_by lifecyclePer docs/protocol/session-file.md §delivery_blocked_by lifecycle.
<stage>) or signal abort("user-abort").
--stop-after exit, user'sresume-continue choice.
last_verified_* anddelivery_blocked_by unchanged so the user can audit.
The Orchestrator keeps minimal state between rounds (session path, latest Reviewer feedback, round number, current stage). All durable state is on disk. See docs/protocol/planning.md §Context management discipline (applies equally to execution).
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.