"DoD compliance sweep -- dispatches to node_dod_sweep_orchestrator for execution"
Resources
1Install
npx skillscat add omninode-ai/omniclaude/plugins-onex-skills-dod-sweep Install via the SkillsCat registry.
DoD Compliance Sweep
Validate Definition of Done compliance across closed epics/tickets. Operates in
two modes: batch (retroactive sweep of recently completed tickets) and
targeted (pre-close gate for a specific epic or ticket).
Dual Mode
- Batch (
/dod-sweep): Query Linear for tickets completed in the lookback
window viatracker.list_issues, filter bycompletedAt. - Batch since-last-cycle (
/dod-sweep --since-last-cycle): Query Linear for
tickets completed since the last autopilot close-out cycle. Reads the last cycle
timestamp from$ONEX_STATE_DIR/autopilot/cycle-state.yamlfieldlast_cycle_id, which stores the cycle boundary timestamp. Falls back to--since-days 7if no prior cycle exists. - Targeted (
/dod-sweep <TICKET-ID>): If the target is an epic, expand child
tickets. If a single ticket, sweep just that one.
Per-Ticket Verification Mode
When --per-ticket-verify is passed (or when invoked from autopilot as Step B1),
the sweep runs dod-verify individually against each discovered ticket instead of
delegating to the batch check_dod_compliance.py handler. This provides granular
evidence receipts per ticket.
Flow:
- Discover tickets (via batch or since-last-cycle query)
- For each ticket, invoke the
dod-verifyskill logic:- Locate ticket contract at
$ONEX_CC_REPO_PATH/contracts/{ticket_id}.yaml - If contract exists with
dod_evidence[], run evidence checks via the shared
runner atplugins/onex/skills/_lib/dod-evidence-runner/dod_evidence_runner.py - Collect the DoD verification result for the ticket. Durable per-ticket
receipt persistence is not yet implemented in the backing node and must not be claimed until it is.
- Locate ticket contract at
- Flag any tickets with incomplete DoD evidence (failed or missing checks)
- Aggregate results and report summary
Check Confidence Tiers
The 6 per-ticket checks are organized into two confidence tiers:
Primary (Artifact Checks -- High Confidence)
Deterministic file existence and content parsing. If the file is there and
parseable, the check is authoritative.
- CONTRACT_EXISTS:
ls $ONEX_CC_REPO_PATH/contracts/{ticket_id}.yaml - RECEIPT_EXISTS: Check deterministic location
$ONEX_CC_REPO_PATH/.evidence/{ticket_id}/dod_report.jsonfirst, then$ONEX_STATE_DIRas fallback. In targeted mode, also validate receipt
freshness -- receipt must be newer than the ticket'scompletedAtdate. - RECEIPT_CLEAN: Parse receipt JSON, verify
result.failed == 0.
Supporting (Operational Checks -- Medium Confidence)
Depends on cross-repo search, SHA linkage, and drift artifact grep. Can produce
UNKNOWN when linkage cannot be established cleanly.
- PR_MERGED:
gh pr list --search "{ticket_id}" --state merged --json number
across repos. If no PR found, recordUNKNOWNwith detail "No merged PR found
matching ticket ID -- may indicate PR title/branch naming mismatch" rather than
hard FAIL. - CI_GREEN: Use the GitHub check-runs endpoint for the merged commit SHA --
verify all conclusions are "success". If the SHA cannot be determined, recordUNKNOWN. - INTEGRATION_SWEEP_EVIDENCE: If contract has
interfaces_touched, grep$ONEX_CC_REPO_PATH/drift/integration/*.yamlfor ticket_id. This verifies
presence of sweep evidence linked to the ticket, not substantive correctness
of every relevant integration surface. If nointerfaces_touched, this check
is automatically PASS (not applicable).
Receipt Freshness Doctrine (Targeted Mode Only)
In targeted mode (pre-close gate), receipts must be associated with the
completion being audited, not merely exist from some historical run:
- Validate: receipt timestamp > ticket's
completedAtdate, OR receipt was
generated within the current session. - Deterministic ticket-specific receipt locations
($ONEX_CC_REPO_PATH/.evidence/{ticket_id}/dod_report.json) are preferred
over broadfinddiscovery to prevent false association. - In batch mode (retroactive sweep), existence-only is acceptable since the
goal is historical audit, not real-time gating.
UNKNOWN Semantics
UNKNOWN is not a single state. It may represent:
| Meaning | Example | Gate behavior |
|---|---|---|
| Exempt / not checked | Ticket predates contract system | Non-blocking |
| Inconclusive linkage | PR search found no match by ticket ID | Non-blocking if primary checks pass |
| Mixed check state | Some checks PASS, others UNKNOWN | Non-blocking but flagged |
| No evidence-backed passes | All tickets exempt | Non-blocking (rollout accommodation) |
Targeted-Mode Gate Decision Matrix
| Primary checks | Supporting checks | Gate result | Action |
|---|---|---|---|
| Any FAIL | anything | BLOCK | Create follow-up tickets |
| All PASS | All PASS | ALLOW CLEAN | Mark epic Done |
| All PASS | Some UNKNOWN | ALLOW WITH WARNING | Mark epic Done, post warning |
| All PASS | Any FAIL | ALLOW WITH FOLLOW-UP | Mark epic Done, create follow-up |
| All exempt | n/a | ALLOW UNKNOWN-REVIEW | Mark epic Done (rollout accommodation) |
Exemption Handling
- Load
$ONEX_CC_REPO_PATH/dod_sweep_exemptions.yaml - Skip tickets completed before cutoff_date
- Skip explicitly exempted ticket IDs
- Check
expires_onif present -- expired exemptions are no longer valid
Follow-Up Ticket Creation and Dedup
For each failed ticket (when not --dry-run):
- Search existing open tickets for
[dod-sweep-gap:{ticket_id}]marker in
description. If found and still open, update the existing ticket's description
with the current failed check set rather than creating a duplicate. - If found but closed (gap recurred), create a new ticket with reference to the
previous closed one. - On recurrence, record the delta explicitly (prior state vs current failed state)
rather than silently overwriting history.
Follow-up ticket format:
- Title:
fix: DoD gap -- {ticket_id} -- {failed_check_names} - Parent: same epic as the original ticket
- Description includes: which checks failed, passed, and UNKNOWN, with confidence
tier of each failed check
Rendered Output Evidence Enforcement
Tickets with any of the following labels MUST have at least one rendered_output
evidence item in their dod_evidence[] array:
data_pipelinedashboarddisplayprojection
Check logic:
- For each ticket in the sweep, check if any of the above labels are present
- If label match: verify
dod_evidence[]contains at least one item withtype: rendered_output - If missing: flag the ticket as
RENDERED_OUTPUT_MISSINGin the sweep report - Create a follow-up ticket with title
fix: DoD gap -- {ticket_id} -- missing rendered_output evidence
This enforcement encodes the Visual Output Verification requirement into the automated
DoD compliance pipeline.
Report Output
- Write
ModelDodSweepResultYAML to$ONEX_CC_REPO_PATH/drift/dod_sweep/{date}.yaml - Print summary table to stdout -- table distinguishes passed, failed, exempted,
and UNKNOWN counts - Emit
dod.sweep.completedKafka event (non-blocking)
Recurring Usage
/loop 2h /onex:dod_sweep --dry-run
/loop daily /onex:dod_sweep