skill/audit/SKILL.md
Provide concise project / work item status and run Worklog helpers to augment results. Trigger on user queries such as: 'What is the current status?', 'Status of the project?', 'What is the status of <work-item-id>?', 'status', 'status <work-item-id>', 'audit', 'audit <work-item-id>'
npx skillsauth add sorratheorc/sorraagents auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provide a concise, human-friendly summary of project status or a specific work item. This skill exposes a canonical runner for automated use and a structured markdown report format consumed by orchestrators such as Ralph.
[READ-ONLY AUDIT] in Pi prompts to mark read-only phases, and use [PERSIST-AUDIT] when performing the authorized persistence operation.wl, git, or arbitrary state-modifying commands. Do NOT change state of work items (e.g., update stage, status) beyond audit persistence.wl, git, or other state-modifying commands outside the authorized persister flow, refuse and report the request to the operator.--debug-log flag which appends raw Pi output to a JSONL file (see Scripts section).The audit report MUST be a structured markdown block that begins with the exact header Ready to close: on the first line. Downstream orchestrators parse this block; do not include any prefix text before it.
Ready to close: Yes/No
A work item is considered ready to close when:
met or adjusted. The adjusted verdict indicates that the criterion was adapted during implementation in a way that still satisfies the user story intent.in_review or done stage — children with status: in_progress but stage: in_review are acceptable and do NOT block closure. Only children with stages like idea, intake_complete, plan_complete, or other pre-review stages block closure.Children with an empty stage ("") are excluded from the stage check (they may be newly created or not yet processed).
<concise 2-4 sentence summary of overall status, key findings, and whether the item can be closed>
| # | Criterion | Verdict | Evidence | |---|-----------|---------|----------| | 1 | <criterion text> | met/unmet/partial/adjusted | <file_path:line_number — one-line note> |
<If no acceptance criteria were found, write: "No acceptance criteria defined.">
When one or more acceptance criteria have verdict adjusted, a Variance Decisions section appears after the Acceptance Criteria Status table. This section documents the adjustments made and the justification for accepting them.
| # | Source | Criterion | Justification | |---|--------|-----------|---------------| | 1 | parent or child (<id>) | <criterion text> | <justification> |
<This section is only included when at least one criterion has verdict adjusted; otherwise it is omitted.>
Variance decision template:
| # | Criterion | Verdict | Evidence | |---|-----------|---------|----------| | 1 | <criterion text> | met/unmet/partial/adjusted | <file_path:line_number — one-line note> |
<If there are no children, write: "No children.">
"Success Criteria" is a synonym for "Acceptance Criteria". Both terms are treated equivalently in audit reports. Use Acceptance Criteria as the canonical heading; document Success Criteria as an accepted synonym where relevant.
The audit skill ships a small, canonical runner and a persister. Use these from CI, local automation, or orchestrators.
Runner: skill/audit/scripts/audit_runner.py
python3 skill/audit/scripts/audit_runner.py issue <id> [--do-not-persist] [--pi-bin pi] [--model <name>] [--model-source <remote|local>] [--debug-log <file>]python3 skill/audit/scripts/audit_runner.py project [--pi-bin pi] [--model <name>] [--model-source <remote|local>] [--debug-log <file>]--do-not-persist — do not run persistence (useful for dry runs)--pi-bin — path to the pi binary--model — Pi model name (default: resolved from .ralph.json; falls back to opencode-go/glm-5.1)--model-source — model source: remote or local (default: local)--debug-log — append Pi debug output to a JSONL file (helpful for triage)--json — emit machine-readable JSON outputPersister: skill/audit/scripts/persist_audit.py
cat report.md | python3 skill/audit/scripts/persist_audit.py --issue-id SA-123python3 skill/audit/scripts/persist_audit.py --issue-id SA-123 --file report.mdpython3 skill/audit/scripts/persist_audit.py --issue-id SA-123 --report "Ready to close: Yes\n..."Notes:
--do-not-persist; use --do-not-persist for dry runs. Alternatively, the persister script (skill/audit/scripts/persist_audit.py) may be invoked explicitly to store the report. Both mechanisms perform the same wl update call and are the approved ways to persist an audit.wl update <issue-id> --audit-text "<report>" --json and return a non-zero exit code on failure.--do-not-persist flag — if persistence is disabled for the parent, child persistence is also skipped. Child persist failures are logged as warnings to stderr but do not prevent the parent audit from succeeding.Ready to close: and the canonical sections above.--do-not-persist) or the persister script (skill/audit/scripts/persist_audit.py). When performing the authorized persistence step, annotate the prompt with [PERSIST-AUDIT] and ensure the report is final and complete.After producing a structured audit report, you MUST:
Print the complete audit report to stdout so the operator can see it.
Persist the report using one of these methods:
python3 skill/audit/scripts/persist_audit.py --issue-id <id> --report "<report text>" — pass report inlineecho "<report text>" | python3 skill/audit/scripts/persist_audit.py --issue-id <id>python3 skill/audit/scripts/audit_runner.py issue <id> --do-not-persist=false (runner persists by default)Child audits: When auditing a parent work item with children, the runner automatically persists individual audits to each child work item as well. These are controlled by the same
--do-not-persistflag. Check stderr for any child persist warnings.
Verify persistence by querying the database. An exit code of 0 does not guarantee the audit was stored. You MUST confirm the audit actually landed in the worklog database:
wl audit-show <id> --json
Parse the JSON output and verify all of the following:
success is trueaudit is not nullaudit.rawOutput is not null and is not an empty stringaudit.rawOutput contains the Ready to close: marker on the first lineIf any of these checks fail, the audit was not persisted. Do NOT claim success.
Handle verification failure: If the audit was not persisted (either the persist call failed or the verification query returned null/empty rawOutput):
Only mark the audit as recorded when all verification checks pass.
If you skip persistence, the audit will be invisible to downstream orchestrators (e.g., Ralph) and may cause infinite retry loops. Persistence is the FINAL step of every audit.
Critical: The
persist_audit.pyscript andwl audit-setcommand have been observed returning exit code 0 orsuccess: trueeven when the audit was not actually stored in the database. Always verify withwl audit-show— never trust the exit code alone.
wl/git commands outside the authorized persister/runner flow. If asked to run such commands, refuse and surface the request to the operator.--debug-log flag captures raw Pi output. Use it sparingly and remove sensitive content before sharing.Run an issue audit and persist:
python3 skill/audit/scripts/audit_runner.py issue SA-123
Run an issue audit without persisting (dry run):
python3 skill/audit/scripts/audit_runner.py issue SA-123 --do-not-persist
Run a project audit and write debug output:
python3 skill/audit/scripts/audit_runner.py project --debug-log /tmp/audit_debug.jsonl
persist_audit.py or wl audit-set returns exit code 0 / success: true but the audit is not actually stored in the database. Always verify with wl audit-show --json and check that audit.rawOutput is populated.wl is not available or returns invalid JSON, report the error and do not claim success.testing
Automated batch planning for intake_complete work items. Discovers all items in intake_complete status and invokes /plan for each sequentially, producing a summary report.
data-ai
Unified git management skill that orchestrates the full feature-branch lifecycle — create, commit, push, PR, merge, cleanup — for both AI agents and human operators.
development
Canonical push-to-dev and branch-policy enforcement for agents. Provides the push-to-dev workflow, branch naming, conflict handling, and release process guidance. Trigger with: /skill:ship push-to-dev
development
Write tests, docs and code for a single, specific Worklog work item. Unlike the `implement` skill, this skill operates on exactly one work-item without using `wl next` for recursive dependency resolution or sub-task discovery. It is designed to be invoked by Ralph's per-child loop so that each child is implemented, audited, and remediated independently. Trigger on user queries such as: 'implement-single <work-item-id>', 'complete <work-item-id> (single)', or when Ralph delegates a single-child implement step.