[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JJP7JEDBW7283JF13F6SCR":3,"skill-same:01M6JJP7JEDBW7283JF13F6SCR":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6JJP7JEDBW7283JF13F6SCR","cwtf",null,"Audit the workflow itself. Use when you suspect agents shortcut or after a bug escapes despite the workflow running. Checks phase execution, rule coverage, and agent thoroughness.","joshft\u002Fcorrectless","joshft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2847920?v=4","01M6JJGJ1WCYFH1BKGPZJ0Z4YD","josh","01M6JJGJ69XYFA6MTDXSH5BG42",66,"MIT","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fcorrectless\u002Fskills\u002Fcwtf\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"write","shortcut","you","bug","wtf","use","autonomous","coverage","edit","workflow","read","jq","find","grep","Bash","execution","audit","artifacts","git","2026-11-10 10:12:30",false,"---\nname: cwtf\ndescription: Audit the workflow itself. Use when you suspect agents shortcut or after a bug escapes despite the workflow running. Checks phase execution, rule coverage, and agent thoroughness.\nallowed-tools: Read, Grep, Glob, Write(.correctless\u002Fartifacts\u002Fwtf-*), Bash(git*), Bash(jq*), Bash(find*), Bash(grep*)\ndisallowed-tools: Edit, MultiEdit, NotebookEdit, CreateFile\ninteraction_mode: autonomous\n---\n\n# \u002Fcwtf — Workflow Accountability\n\n> **Shared constraints apply.** Before executing, read `_shared\u002Fconstraints.md` from the parent of this skill's base directory. All constraints there apply to this skill.\n\nEvery other skill watches the code. This skill watches the agents watching the code. It answers: **\"Did the workflow actually do what the skill instructions said it should do?\"**\n\nInvoke with: `\u002Fcwtf` (analyzes the most recent or current workflow) or `\u002Fcwtf {phase}` (analyzes a specific phase)\n\n## Important: Not Punitive\n\nThis report identifies gaps, not blame. \"QA checked 4 of 6 rules\" is a fact, not an accusation. The QA agent may have had good reason — context overflow, rate limiting, or the 2 unchecked rules were trivially satisfied by the implementation. Present findings with context, not judgment. Let the user decide what matters.\n\nFrame gaps as: \"R-003 was not checked during QA. This may indicate context overflow, rate limiting, or that the agent prioritized higher-risk rules.\" NOT: \"The QA agent FAILED to check R-003.\"\n\n## Progress Visibility (MANDATORY)\n\nAccountability analysis takes 5-10 minutes. The user must see progress throughout.\n\n**Before starting**, create a task list:\n1. Load workflow state and spec\n2. Check phase execution\n3. Analyze rule coverage\n4. Check agent thoroughness (QA)\n5. Check agent thoroughness (review)\n6. Detect deviations\n7. Generate verdict\n\n**Between each step**, print a 1-line status: \"Phase execution verified — all 7 phases ran. Checking rule coverage...\" Mark each task complete as it finishes.\n\n## Step 1: Load Context\n\nDerive the branch slug and hash using the same formula as other hooks (`sed + md5sum\u002Fmd5`). Determine the repo root with `git rev-parse --show-toplevel` — prepend this to all relative paths for the Read tool.\n\nDerive the task-slug from the workflow state's `.spec_file` field: extract the basename and strip the `.md` extension. For example, if `spec_file` is `.correctless\u002Fspecs\u002Fstatusline-live-cost.md`, the task-slug is `statusline-live-cost`. This is the canonical slug used by all artifact filenames.\n\nRead these data sources (skip any that don't exist):\n\n1. **Workflow state** — `.correctless\u002Fartifacts\u002Fworkflow-state-{slug}-{hash}.json`\n2. **Spec file** — path from `.spec_file` field (relative to repo root — prepend repo root for Read tool)\n3. **QA findings** — `.correctless\u002Fartifacts\u002Fqa-findings-{task-slug}.json`\n4. **Test edit log** — `.correctless\u002Fartifacts\u002Ftdd-test-edits.log`\n5. **Audit trail** — `.correctless\u002Fartifacts\u002Faudit-trail-{slug}-{hash}.jsonl`\n6. **Override log** — `.correctless\u002Fartifacts\u002Foverride-log.json`\n7. **Verification report** — `.correctless\u002Fverification\u002F{task-slug}-verification.md`\n8. **Session-meta** — `find ~\u002F.claude\u002Fusage-data\u002Fsession-meta\u002F -name '*.json'` filtered by `project_path` matching repo root\n9. **Conversation JSONL** (optional, for deep analysis) — find the session file at `~\u002F.claude\u002Fprojects\u002F`. List directories with `find ~\u002F.claude\u002Fprojects\u002F -maxdepth 2 -name '*.jsonl'`, identify the correct file by matching the project path pattern in the directory name and selecting the most recent file. This file can be very large — use targeted `jq` queries, never read it entirely.\n\nIf no workflow state file exists: \"No active or completed workflow on this branch. Nothing to analyze.\"\n\nExtract the spec rules: grep the spec file for `R-xxx` or `INV-xxx` identifiers. Count them — this is the baseline for coverage checks.\n\n## Step 2: Phase Execution Verification\n\nCheck whether all mandatory phases executed:\n\n**At standard intensity**: spec → review → tdd-tests → tdd-impl → tdd-qa → done → verified → documented\n**At high+ intensity**: spec → review-spec (or model → review-spec) → tdd-tests → tdd-impl → tdd-qa → (tdd-verify →) done → verified → documented\n\n**Primary source for phase history: the audit trail.** The workflow state's `phase_entered_at` field only contains the MOST RECENT transition timestamp — it cannot prove earlier phases ran. Instead, extract distinct phase values from the audit trail: `jq -r '.phase' .correctless\u002Fartifacts\u002Faudit-trail-{slug}-{hash}.jsonl | sort -u`. This shows every phase that had tool activity. If no audit trail exists, fall back to the current `phase` field as a minimum marker and note: \"No audit trail — can only verify current phase, not history.\"\n\nAlso check:\n- Were overrides used? (check override log for entries during this workflow)\n- How many spec updates happened? (from `spec_update_history` — many updates suggests the spec was undercooked)\n\nReport: \"All {N} phases executed\" or \"Phase {X} was skipped via override: '{reason}'\"\n\n## Step 3: Rule Coverage\n\nFor each spec rule (R-xxx or INV-xxx):\n\n1. **Test exists?** Grep test files for the rule ID (e.g., `Tests R-001`, `R-001`). Use the `patterns.test_file` from `workflow-config.json` to find test files.\n2. **Integration tag?** If the rule is tagged `[integration]`, check whether the test uses real wiring or mocks.\n3. **QA checked?** Search the QA findings artifact for mentions of this rule ID.\n4. **Verification status?** If the verification report exists, check its rule coverage table.\n\nOutput as a table:\n```\n| Rule | Test | QA Checked | Verify Status |\n|------|------|-----------|---------------|\n| R-001 | auth.test.ts:42 | Yes | covered |\n| R-002 | — | NO | UNCOVERED |\n```\n\n**Recommended action for gaps**: \"R-002 has no test. Run `\u002Fctdd` from the tests phase to add coverage, or run `\u002Fcverify` to confirm this is a known gap.\"\n\n## Step 4: Agent Thoroughness — QA\n\nThe most valuable analysis. Assess QA coverage and depth:\n\n**Rule mention count**: Search the QA findings artifact AND the conversation JSONL for mentions of each rule ID. Count: \"QA mentioned {N} of {M} spec rules.\" Missing rules are listed.\n\n**Token budget indicator** (best-effort): Find the most recent session-meta entry matching this project's path. Report its total `output_tokens`. If multiple prior sessions exist for the project, compute a rough average and compare: \"This session used {N}k tokens ({X}% of project average).\" A session at 30% of average likely shortcut. Note: identifying which session corresponds to QA specifically is imprecise — this is a rough signal, not a measurement. If session-meta is unavailable, skip this metric.\n\n**File coverage** (if audit trail exists): From the audit trail, which files had Read operations during the tdd-qa phase? Compare against files modified during tdd-impl. \"QA read {N} of {M} files modified during implementation.\" Missing files are listed.\n\n**Recommended action**: \"QA did not check R-003 or R-005. Consider: re-run QA with `workflow-advance.sh fix` then `workflow-advance.sh qa`, or manually verify these rules are satisfied.\"\n\n## Step 5: Agent Thoroughness — Review\n\nCheck whether the review agent was thorough:\n\n**Security checklist coverage**: If the spec touches auth, user input, data storage, or APIs, the security checklist should have fired. Search conversation JSONL for security-related terms (CSRF, XSS, injection, auth bypass, SSRF, RLS, CORS, HSTS). Count how many categories were checked vs how many were applicable.\n\n**Antipattern check**: Did the review mention any antipattern IDs (AP-xxx)? If the project has antipatterns.md with entries, the review should have checked against them.\n\n**Recommended action**: \"Review did not check for CSRF despite the spec touching API endpoints. Run `\u002Fcreview` again or verify CSRF protection manually.\"\n\n## Step 5.5: Lens Auditability (INV-010)\n\nCheck whether the mini-audit ran the right lenses for this feature. The LENS field is an open enum — handle unknown lens values gracefully from recommended lenses.\n\n**Dormant (PAT-019)**: When the lens recommendation artifact for the current branch does not exist (`.correctless\u002Fartifacts\u002Flens-recommendations-{branch_slug}.json`), skip all lens auditability checks with no error and no warning. Only perform these checks when the artifact exists.\n\nWhen the artifact exists, check:\n\n**(a) Recommended lenses none ran**: If the `recommended_lenses` array is non-empty but the `outcomes` field shows no recommended lenses with `ran: true`, warn: \"Review recommended {N} lenses but mini-audit ran none — was the recommendation ignored?\"\n\n**(b) CRITICAL finding lens not executed**: For each recommended lens linked to a CRITICAL review finding (check `source_finding` and look up its severity), if the lens has `ran: false` in outcomes, warn: \"Lens {lens_name} recommended due to CRITICAL finding {source_finding}: {source_finding_summary} was not executed.\" The `source_finding_summary` field provides the display text without requiring cross-artifact lookup.\n\n**(c) Lens selection rationale**: Report the full lens selection from the artifact — which lenses were recommended, which were selected (ran), and which were excluded (budget exceeded or other reason from `failure_reason`).\n\n## Step 5.6: Rule-Load Observability (InstructionsLoaded)\n\nThis step presents **direct rule-load evidence** so you can judge, for yourself, whether a `.claude\u002Frules\u002F*.md` rule (for example `hooks-pretooluse.md`) was actually loaded into agent editing context around the hook edits in this workflow. It is a plain-language, side-by-side view of two local logs — it draws **no** conclusion and emits **no** verdict. The human classifies.\n\n**Two sources:**\n\n1. **Rule-load events** — `.correctless\u002Fmeta\u002Finstructions-loaded.jsonl` (the InstructionsLoaded telemetry log). Each line records a rule file that was loaded, with `trigger_file_path` (the file whose open triggered the load) and a timestamp.\n2. **Hook-edit entries** — the target workflow\u002Fbranch's `audit-trail-*.jsonl`. Locate it by globbing `audit-trail-*.jsonl` for the target branch (edits made off-workflow do not appear in the audit trail — note this caveat when the picture looks thin).\n\n**How to group (RS-027):** do **not** filter rule-loads by the session running `\u002Fcwtf` — `\u002Fcwtf` usually analyzes a *past* workflow, so the invoking session is not the session that made the edits. Instead, derive the set of edit-session ids from the **target workflow's hook-edit entries** (audit-trail lines whose `.file` is under `hooks\u002F`), then present rule-loads **grouped per edit-session**. A hook-edit with no `session_id` (pre-instrumentation) is shown in an **unattributed** group; rule-loads are not attributed to it. Sessions that appear in the rule-load log but never made a hook-edit are intentionally excluded.\n\n**Consumer contract:** both logs are read line-by-line with the project JSONL consumer contract — `jq -R 'fromjson? ...'` (try\u002Fcatch, skip malformed lines), **never** slurping the whole file into a variable\u002Fargv, and never a single-shot slurp of all lines. Hook-edit times are read as `.ts \u002F\u002F .timestamp` (RS-030) because the audit-trail file is mixed-shape: the audit hook writes `ts`, `\u002Fcauto` writes `timestamp` to the same file. Uses only `\u002Fcwtf`'s existing `Bash(jq*)`\u002F`Bash(grep*)`\u002F`Bash(find*)` tools — no new helper script.\n\n**Liveness (INV-016):** always print the denominators the presentation worked from (how many rule-load events, how many with null `rule_file`, how many hook-edit entries, across how many edit-sessions, and when the log was last written) so a dead or field-drifted channel is visible rather than silently producing an empty picture.\n\n**Dormant \u002F field-drift (INV-009):** if the log is absent or empty, print a single non-alarming advisory explaining it populates the first time a `.claude\u002Frules\u002F*.md`-scoped file is opened and requires harness ≥2.1.69, then continue. If the log is present but **every** `rule_file` is null, surface a field-drift note (\"all with null rule_file — possible harness field drift\").\n\nRun this presentation block (inputs: `IL_LOG` = the instructions-loaded.jsonl path; `AUDIT_TRAIL` = the target branch's audit-trail-*.jsonl path):\n\n\u003C!-- cwtf:rule-load-extract:start -->\n```bash\n# Inputs (env): IL_LOG = instructions-loaded.jsonl ; AUDIT_TRAIL = target branch audit-trail-*.jsonl\nIL_LOG=\"${IL_LOG:-.correctless\u002Fmeta\u002Finstructions-loaded.jsonl}\"\nAUDIT_TRAIL=\"${AUDIT_TRAIL:-}\"\n\n# Repo root for .file canonicalization (MA-R3-001). audit-trail .file values are a\n# MIX of absolute (\u002Fhome\u002F...\u002Fhooks\u002Fx.sh) and relative (hooks\u002Fx.sh) paths. Each of the\n# 3 hook-edit filter sites strips this \"$root\u002F\" prefix (ltrimstr) so an ABSOLUTE hook\n# path canonicalizes to repo-relative BEFORE the ^hooks\u002F anchor — otherwise every\n# absolute .file misses the anchor and the channel silently reads 0 hook edits. Bash(git*)\n# is granted. Empty (non-repo cwd) => ltrimstr \"\u002F\" is a harmless no-op prefix; relative\n# paths still match, absolute won't (acceptable degradation outside a repo).\nroot=\"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\" || true\n\n# Every jq over IL_LOG \u002F AUDIT_TRAIL guards with `fromjson? | objects` (MA-001):\n# bare `fromjson?` only catches fromjson's own parse error, so a VALID-but-non-object\n# line (5, \"x\", [1,2]) or a mistyped field ({\"file\":5}) would raise a downstream\n# `.field`\u002F`test`\u002F`startswith` runtime error that `?` does NOT catch — and on jq 1.7\n# (CI) that aborts the whole stream, truncating evidence and breaking liveness.\n# `objects` drops any non-object line so a forged\u002Ftorn\u002Fscalar\u002Fmistyped line is\n# skipped, never fatal, on jq 1.7 AND 1.8. Fields used in matching are also coerced\n# (`(.file \u002F\u002F \"\") | tostring`) so a non-string field can never error.\n#\n# Hook-edit filter (MA-002 \u002F MA-R2-002 \u002F MA-R3-001): .file is FIRST canonicalized to\n# repo-relative via `ltrimstr($root + \"\u002F\")` (audit-trail records .file as a MIX of\n# absolute and relative paths — without this, every absolute \u002Fhome\u002F...\u002Fhooks\u002Fx.sh path\n# misses the anchor and the channel silently reads 0). Then match ONLY the real\n# Correctless hook roots: `^hooks\u002F` (source tree) or `^\\.correctless\u002Fhooks\u002F` (installed).\n# Both anchors are start-anchored because the path is now repo-relative. This deliberately\n# EXCLUDES src\u002Fhooks\u002F (React), .git\u002Fhooks\u002F, node_modules\u002F**\u002Fhooks\u002F, app\u002Fhooks\u002F, the legacy\n# Claude hooks dir, AND the `correctless\u002Fhooks\u002F` sync-mirror dir (a nested prefix that no\n# longer matches ^hooks\u002F — mirror edits are secondary, acceptable to exclude) so a\n# downstream project's unrelated \"hooks\" directory is never miscounted as a Correctless\n# hook edit.\n# A write-tool gate (.tool in Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)\n# further excludes Read\u002FGrep of hook files, which audit-trail.sh ALSO records with a\n# .file (MA-CC-03). Bash IS included: a hook edited via a Bash redirect\u002Fwriter command\n# is a real edit, recorded as tool:\"Bash\" with the write target in .file by\n# get_target_file (a plain read like `cat hooks\u002Fx` has no write target, so no .file\n# under a hook root, so it is not counted). The predicate is byte-identical at all\n# three sites (the hook_edits count,\n# the edit_sessions derivation, and the per-session render) so counts and grouping\n# stay consistent. Non-hook audit-trail entries (\u002Fcauto orchestration events, \u002Fcaudit\n# records) still fail the test and are excluded.\n\n# --- Resolve the hook-edit source (MA-004 \u002F MA-R2-001) ----------------------\n# Distinguish \"audit-trail path not resolved\" from \"resolved, zero hook edits\".\n# audit_autoresolved=1 marks a fallback pick (provenance: name the file in output,\n# do NOT claim it authoritatively describes \"the target workflow\").\naudit_located=1\naudit_autoresolved=0\nif [ -z \"$AUDIT_TRAIL\" ] || [ ! -f \"$AUDIT_TRAIL\" ]; then\n  # Not passed \u002F missing: locate THIS branch's audit trail ONLY (MA-R2-001). NEVER\n  # fall back to another branch's trail — a cross-branch lexicographic pick can mask a\n  # dead channel or misattribute another workflow's edits. Scope the glob to the\n  # current branch slug (Bash(git*) is granted); the trailing '*' matches the -{hash}\n  # suffix. This is a scoped lexicographic pick within THIS branch's trails, NOT an\n  # mtime\u002Fmost-recent pick.\n  br=\"$(git rev-parse --abbrev-ref HEAD 2>\u002Fdev\u002Fnull)\" || true\n  # slug must mirror branch_slug() (scripts\u002Flib.sh) char-class transform EXACTLY so the\n  # glob prefix matches the real filename (MA-R3-002): ${branch\u002F\u002F[^a-zA-Z0-9]\u002F-} then\n  # truncate to 80. The md5 suffix branch_slug appends can't be recomputed without\n  # md5sum (not granted), so the trailing terminal-hash glob below matches it instead.\n  slug=\"${br\u002F\u002F[^a-zA-Z0-9]\u002F-}\"; slug=\"${slug:0:80}\"\n  if [ -n \"$slug\" ]; then\n    # Terminal-hash anchor (MA-R3-003): only accept a filename where $slug is IMMEDIATELY\n    # followed by the 6-hex-char branch_slug hash + .jsonl, so a longer sibling slug\n    # sharing this prefix (e.g. audit-trail-${slug}-extra-abc123.jsonl) is NOT matched.\n    # slug is [a-zA-Z0-9-] only (after the transform above), safe inside grep -E.\n    AUDIT_TRAIL=\"$(find .correctless\u002Fartifacts -maxdepth 1 -type f -name \"audit-trail-${slug}-*.jsonl\" 2>\u002Fdev\u002Fnull | grep -E \"\u002Faudit-trail-${slug}-[0-9a-f]{6}\\\\.jsonl$\" | sort | tail -1)\"\n  else\n    AUDIT_TRAIL=\"\"\n  fi\n  if [ -n \"$AUDIT_TRAIL\" ] && [ -f \"$AUDIT_TRAIL\" ]; then\n    audit_autoresolved=1\n  else\n    audit_located=0\n  fi\nfi\n\n# --- Hook-edit denominators + edit-session ids (computed FIRST, MA-003) ------\nhook_edits=0\nedit_sessions=\"\"\nif [ \"$audit_located\" -eq 1 ]; then\n  # hook-edit entries = write-tool ops whose .file is under a real Correctless hook\n  # root (MA-002 \u002F MA-R2-002 \u002F MA-CC-03); time read as .ts \u002F\u002F .timestamp (RS-030).\n  hook_edits=\"$(jq -R --arg root \"$root\" 'fromjson? | objects | select(((.file \u002F\u002F \"\") | tostring | ltrimstr($root + \"\u002F\") | (test(\"^hooks\u002F\") or test(\"^\\\\.correctless\u002Fhooks\u002F\"))) and ((.tool \u002F\u002F \"\") | tostring | test(\"^(Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)$\"))) | 1' \"$AUDIT_TRAIL\" 2>\u002Fdev\u002Fnull | grep -c .)\" || true\n  # edit-session ids (missing\u002Fnull\u002Fempty session_id -> unattributed), de-duplicated.\n  # `\u002F\u002F \"unattributed\"` alone does NOT catch \"\" (jq \u002F\u002F only catches null\u002Ffalse), so\n  # empty-string sessions are folded into unattributed explicitly (QA-001 \u002F INV-015).\n  edit_sessions=\"$(jq -Rr --arg root \"$root\" 'fromjson? | objects | select(((.file \u002F\u002F \"\") | tostring | ltrimstr($root + \"\u002F\") | (test(\"^hooks\u002F\") or test(\"^\\\\.correctless\u002Fhooks\u002F\"))) and ((.tool \u002F\u002F \"\") | tostring | test(\"^(Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)$\"))) | (.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end)' \"$AUDIT_TRAIL\" 2>\u002Fdev\u002Fnull | sort -u)\"\nfi\nedit_session_count=\"$(printf '%s\\n' \"$edit_sessions\" | grep -c .)\" || true\n\n# --- Rule-load denominators (try\u002Fcatch consumer contract; never whole-file slurp)\nrule_loads=\"$(jq -R 'fromjson? | objects | 1' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | grep -c .)\" || true\nnull_rules=\"$(jq -R 'fromjson? | objects | select(.rule_file == null) | 1' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | grep -c .)\" || true\n# MA-005: -Rr so the timestamp prints raw (unquoted) in the liveness line.\nlast_written=\"$(jq -Rr 'fromjson? | objects | (.ts \u002F\u002F .timestamp) \u002F\u002F empty' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | tail -1)\"\n\n# --- Attributed rule-loads (reconciliation, MA-R2-003 \u002F MA-011) --------------\n# attributed = rule-loads whose session_id matches a REAL (non-unattributed) edit-\n# session. Computed ONCE here and reused by BOTH the liveness denominator (so read K\n# reconciles as attributed + other + null) AND the drift note below (MA-006). When\n# there is no real edit-session to match against, attributed is 0 by construction.\nreal_edit_sessions=\"$(printf '%s\\n' \"$edit_sessions\" | grep -v '^unattributed$' | grep -v '^$')\"\nif [ -z \"$real_edit_sessions\" ]; then\n  attributed=0\nelse\n  attributed=\"$(jq -Rr 'fromjson? | objects | (.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end)' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | grep -Fxf \u003C(printf '%s\\n' \"$real_edit_sessions\") 2>\u002Fdev\u002Fnull | grep -c .)\" || true\nfi\n\n# --- Dormant vs dead channel (MA-003 \u002F MA-R2-003) ---------------------------\n# hook_edits is already computed. Empty\u002Fabsent IL_LOG is benign ONLY when no hook\n# edits happened; if hook edits happened with zero rule-loads the channel may be\n# dead (hook not registered, harness too old to emit InstructionsLoaded, or not\n# firing), not merely quiet.\nif [ ! -s \"$IL_LOG\" ]; then\n  if [ \"${hook_edits:-0}\" -eq 0 ]; then\n    echo \"no direct rule-load signal yet — the InstructionsLoaded log populates the first time a .claude\u002Frules\u002F*.md-scoped file is opened; requires harness >=2.1.69 AND that \u002Fcsetup has registered the InstructionsLoaded hook in this project's settings.json (re-run \u002Fcsetup if you recently upgraded)\"\n  else\n    echo \"WARNING: ${hook_edits} hook-edit(s) occurred but zero rule-load events were recorded — the channel may be dead (hook not registered, harness \u003C2.1.69 which does not emit InstructionsLoaded, or not firing), not merely quiet.\"\n  fi\nelif [ \"${rule_loads:-0}\" -eq 0 ]; then\n  # MA-008(a): the file has bytes but nothing parses as an object.\n  echo \"log present but 0 parseable JSONL lines — possible corruption or torn writes; treat as no signal\"\nfi\n\n# --- Liveness denominators (INV-016 \u002F DA-004 \u002F MA-011) ----------------------\nif [ \"$audit_located\" -eq 1 ]; then\n  # read K reconciles: attributed (to this workflow's real edit-sessions) + other\n  # (rule-loads from unrelated sessions) + null rule_file (MA-011).\n  # MA-R3-004: clamp the \"from other sessions\" figure at 0 so a forged newline-inflated\n  # attributed count can't render a negative rule-load breakdown.\n  other=$(( rule_loads - attributed )); [ \"$other\" -lt 0 ] && other=0\n  rl_breakdown=\"read ${rule_loads} rule-load event(s) (${attributed} attributed to this workflow's edit-sessions, ${other} from other sessions, ${null_rules} with null rule_file)\"\n  if [ \"$audit_autoresolved\" -eq 1 ]; then\n    # MA-R2-001 provenance: source was auto-resolved by fallback — name it, do NOT\n    # assert it authoritatively describes \"the target workflow\".\n    echo \"Liveness: ${rl_breakdown} and ${hook_edits} hook-edit entries across ${edit_session_count} edit-session(s) (hook-edit source auto-resolved to ${AUDIT_TRAIL##*\u002F}; verify it matches the workflow you are auditing); log last written ${last_written:-never}\"\n  else\n    echo \"Liveness: ${rl_breakdown} and ${hook_edits} hook-edit entries across ${edit_session_count} edit-session(s) for the target workflow; log last written ${last_written:-never}\"\n  fi\nelse\n  # MA-004: no source located — do NOT report \"0 hook-edit entries\" as if measured.\n  echo \"Liveness: read ${rule_loads} rule-load event(s) (${null_rules} with null rule_file); hook-edit source not located (audit-trail-*.jsonl not found) — hook-edit attribution unavailable; log last written ${last_written:-never}\"\nfi\n\n# --- Field-drift note (INV-009 \u002F MA-008b \u002F MA-R2-004) -----------------------\nif [ \"${rule_loads:-0}\" -gt 0 ] && [ \"${rule_loads}\" = \"${null_rules}\" ]; then\n  echo \"${rule_loads} rule-load events, all with null rule_file — possible harness field drift; treat the rule-load evidence as unreliable\"\nelif [ \"${rule_loads:-0}\" -gt 0 ] && [ \"$(( null_rules * 2 ))\" -ge \"${rule_loads}\" ]; then\n  echo \"high null-rule ratio (${null_rules}\u002F${rule_loads}) — possible harness field drift; treat the rule-load evidence as unreliable\"\nfi\n\n# --- Raw evidence grouped by the TARGET workflow's edit-session ids (RS-027) --\nprintf '%s\\n' \"$edit_sessions\" | while IFS= read -r sess; do\n  [ -z \"$sess\" ] && continue\n  echo \"=== edit-session: ${sess} ===\"\n  # MA-007: the unattributed group predates session_id instrumentation.\n  if [ \"$sess\" = \"unattributed\" ]; then\n    echo \"  these edits predate session_id instrumentation — rule-loads cannot be attributed to them; absence of rule-loads here is NOT evidence the rule was unloaded.\"\n  fi\n  jq -Rr --arg s \"$sess\" --arg root \"$root\" 'fromjson? | objects\n     | select(((.file \u002F\u002F \"\") | tostring | ltrimstr($root + \"\u002F\") | (test(\"^hooks\u002F\") or test(\"^\\\\.correctless\u002Fhooks\u002F\"))) and ((.tool \u002F\u002F \"\") | tostring | test(\"^(Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)$\")))\n     | select((.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end) == $s)\n     | \"  hook-edit: \\(.file) at \\((.ts \u002F\u002F .timestamp) \u002F\u002F \"?\")\"' \"$AUDIT_TRAIL\" 2>\u002Fdev\u002Fnull\n  # Rule-loads are only attributed to real (non-unattributed) sessions. The key is\n  # normalized identically so a null\u002Fempty-session rule-load can never match a real\n  # $s, and the \"unattributed\" group never claims any rule-load (QA-001 \u002F INV-015).\n  if [ \"$sess\" != \"unattributed\" ]; then\n    jq -Rr --arg s \"$sess\" 'fromjson? | objects\n       | select((.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end) == $s)\n       | \"  rule-load: \\(.rule_file \u002F\u002F \"(null)\") (trigger_file_path \\(.trigger_file_path \u002F\u002F \"?\")) at \\(.ts \u002F\u002F \"?\")\"' \"$IL_LOG\" 2>\u002Fdev\u002Fnull\n  fi\ndone\n\n# --- Unmatched rule-load sessions (MA-006 \u002F EA-005 \u002F MA-R2-004 \u002F MA-010) -----\n# Surface the DISTINCT rule-load session_ids so a human can spot session_id format\n# drift. Fire ONLY when there was at least one real (non-unattributed) edit-session to\n# match against — when real_edit_sessions is empty (all edits pre-instrumentation),\n# attributed==0 is BENIGN and the unattributed-group header already explains it, so\n# the drift note is suppressed to avoid a false \"session_id format drift\" alarm.\nif [ \"${rule_loads:-0}\" -gt 0 ] && [ -n \"$real_edit_sessions\" ] && [ \"${attributed:-0}\" -eq 0 ]; then\n  rl_sess_seen=\"$(jq -Rr 'fromjson? | objects | (.session_id \u002F\u002F \"(null)\")' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | sort -u | grep . | tr '\\n' ' ')\" || true\n  echo \"note: ${rule_loads} rule-load event(s) exist but none matched an edit-session_id — possible session_id format drift across events (EA-005); rule-load session_ids seen: ${rl_sess_seen}\"\nfi\n\nexit 0\n```\n\u003C!-- cwtf:rule-load-extract:end -->\n\nPresent the block's output as-is under a \"Rule-load evidence\" heading. Do **not** compute or state whether a rule \"was\" or \"was not\" in context for a given edit — show the timestamps side by side and let the reader judge.\n\n## Step 6: Deviation Detection\n\nCross-reference what happened against what should have happened:\n\n**Source files modified during QA**: The audit trail should show no Edit\u002FWrite operations on source files during `tdd-qa` phase. If it does: \"Source file {file} was modified during QA phase at {timestamp}. This is a gate bypass — the QA agent should be read-only.\"\n\n**Test files modified during GREEN without logging**: Compare audit trail (test file edits during `tdd-impl`) against the test-edit log. If the audit trail shows a test edit that the log doesn't mention: \"Test file {file} was edited during GREEN at {timestamp} but not logged in tdd-test-edits.log.\"\n\n**Overrides**: List all overrides with their reasons and when they occurred relative to the workflow timeline.\n\n**Spec updates**: If `spec_updates > 0`, list each update with its reason. Multiple updates suggest the spec wasn't thorough enough.\n\n**Recommended action per deviation**: specific, not vague. \"Source file edited during QA — check if this was a legitimate fix round (should have used `workflow-advance.sh fix` first) or a gate bypass.\"\n\n## Step 7: Generate Verdict\n\nAssess the overall workflow quality:\n\n- **THOROUGH** — all phases ran, all rules have coverage, QA checked all rules, review ran security checklist, no deviations\n- **ADEQUATE** — all phases ran, most rules covered, minor gaps in QA\u002Freview thoroughness that don't affect correctness\n- **INCOMPLETE** — phases ran but significant rule coverage gaps, QA missed multiple rules, or review skipped applicable security checks\n- **SHORTCUT** — phases skipped via override, QA used far below average tokens, multiple rules unchecked, or source files modified during QA\n\n**Precedence rule**: If any SHORTCUT criterion is met (phase skip via override, source edit during QA, token usage far below average), the verdict cannot be higher than SHORTCUT regardless of other positive signals. A single gate bypass dominates all other indicators.\n\nThe verdict is a judgment call within those constraints. Explain the reasoning. Users can disagree.\n\n## Output Format\n\n**Persist before presenting (AP-029).** Before displaying the report to the user, write it to `.correctless\u002Fartifacts\u002Fwtf-report-{branch-slug}.md` where branch-slug is derived from `branch_slug()`. This is the recovery path if the terminal display is interrupted or context is compacted.\n\n```markdown\n## Workflow Accountability Report\n\n### Workflow: {task name}\n**Branch:** {branch}\n**Phases completed:** {list}\n**QA rounds:** {N}\n**Overrides used:** {N}\n\n### Phase Execution: {PASS | {N} issues}\n{details}\n\n### Rule Coverage: {N}\u002F{M} rules covered\n| Rule | Test | QA Checked | Verify Status |\n|------|------|-----------|---------------|\n| R-001 | auth.test.ts:42 | Yes | covered |\n| R-002 | — | NO | UNCOVERED |\n\n### Agent Thoroughness\n**QA**: Checked {N}\u002F{M} rules. Token usage: {N}k ({X}% of average).\n- {Missing rules with recommended actions}\n\n**Review**: {N}\u002F{M} security checks applied.\n- {Skipped checks with recommended actions}\n\n### Deviations ({N} found)\n{Each deviation with timestamp, evidence, and recommended action}\n\n### Verdict: {THOROUGH | ADEQUATE | INCOMPLETE | SHORTCUT}\n{2-3 sentences explaining the assessment and what, if anything, should be done about it.}\n```\n\n## Claude Code Feature Integration\n\n### Task Lists\nSee \"Progress Visibility\" section above — task creation and narration are mandatory.\n\n## Code Analysis (MCP Integration)\n\nIf `mcp.serena` is `true` in `workflow-config.json`, use Serena MCP for symbol-level code analysis during thoroughness checking — particularly call-graph-based analysis:\n\n- Use `find_symbol` instead of grepping for function\u002Ftype names\n- Use `find_referencing_symbols` to trace callers and dependencies for call-graph completeness\n- Use `get_symbols_overview` for structural overview of a module\n- Use `replace_symbol_body` for precise edits (not used in this skill — wtf is read-only)\n- Use `search_for_pattern` for regex searches with symbol context\n\n**Fallback table** — if Serena is unavailable, fall back silently to text-based equivalents:\n\n| Serena Operation | Fallback |\n|-----------------|----------|\n| `find_symbol` | Grep for function\u002Ftype name |\n| `find_referencing_symbols` | Grep for symbol name across source files |\n| `get_symbols_overview` | Read directory + read index files |\n| `replace_symbol_body` | Edit tool |\n| `search_for_pattern` | Grep tool |\n\n## Autonomous Defaults\n\n- **AD-001**: Analysis scope — analyze all available data sources for accountability report (default). No human input required; this skill runs to completion autonomously.\n\n## If Something Goes Wrong\n\n- This skill is read-only. Re-run anytime safely.\n- **Conversation JSONL too large**: Use targeted `grep` and `jq` queries on the JSONL file. Search for specific rule IDs, tool names, or phase-related keywords. Never read the entire file into memory.\n- **Audit trail missing**: The skill still works from qa-findings + verification report, but agent thoroughness analysis will be less detailed. Note: \"Audit trail not available — thoroughness analysis based on artifacts only.\"\n- **No session-meta match**: Token budget comparison unavailable. Note it and skip that metric.\n\n## Constraints\n\n- **Read-only.** Never modify workflow state, findings, source code, or any artifact.\n- **Not punitive.** Frame gaps as observations with context, not accusations. Include possible reasons for each gap.\n- **Recommended actions.** Every gap should suggest a specific next step — not auto-fix, just point the user at the right command.\n- **Targeted JSONL queries.** The conversation JSONL can be megabytes. Use `grep` for rule IDs, `jq` for structured extraction. Never `cat` the entire file.\n- **Verdict is honest.** SHORTCUT is a valid assessment. Don't soften it to ADEQUATE if the evidence shows shortcuts. But explain why.\n- **Redact if sharing.** If this output will be shared externally, apply redaction rules from `templates\u002Fredaction-rules.md` first.\n","# \u002Fcwtf — Workflow Accountability\n\n> **Shared constraints apply.** Before executing, read `_shared\u002Fconstraints.md` from the parent of this skill's base directory. All constraints there apply to this skill.\n\nEvery other skill watches the code. This skill watches the agents watching the code. It answers: **\"Did the workflow actually do what the skill instructions said it should do?\"**\n\nInvoke with: `\u002Fcwtf` (analyzes the most recent or current workflow) or `\u002Fcwtf {phase}` (analyzes a specific phase)\n\n## Important: Not Punitive\n\nThis report identifies gaps, not blame. \"QA checked 4 of 6 rules\" is a fact, not an accusation. The QA agent may have had good reason — context overflow, rate limiting, or the 2 unchecked rules were trivially satisfied by the implementation. Present findings with context, not judgment. Let the user decide what matters.\n\nFrame gaps as: \"R-003 was not checked during QA. This may indicate context overflow, rate limiting, or that the agent prioritized higher-risk rules.\" NOT: \"The QA agent FAILED to check R-003.\"\n\n## Progress Visibility (MANDATORY)\n\nAccountability analysis takes 5-10 minutes. The user must see progress throughout.\n\n**Before starting**, create a task list:\n1. Load workflow state and spec\n2. Check phase execution\n3. Analyze rule coverage\n4. Check agent thoroughness (QA)\n5. Check agent thoroughness (review)\n6. Detect deviations\n7. Generate verdict\n\n**Between each step**, print a 1-line status: \"Phase execution verified — all 7 phases ran. Checking rule coverage...\" Mark each task complete as it finishes.\n\n## Step 1: Load Context\n\nDerive the branch slug and hash using the same formula as other hooks (`sed + md5sum\u002Fmd5`). Determine the repo root with `git rev-parse --show-toplevel` — prepend this to all relative paths for the Read tool.\n\nDerive the task-slug from the workflow state's `.spec_file` field: extract the basename and strip the `.md` extension. For example, if `spec_file` is `.correctless\u002Fspecs\u002Fstatusline-live-cost.md`, the task-slug is `statusline-live-cost`. This is the canonical slug used by all artifact filenames.\n\nRead these data sources (skip any that don't exist):\n\n1. **Workflow state** — `.correctless\u002Fartifacts\u002Fworkflow-state-{slug}-{hash}.json`\n2. **Spec file** — path from `.spec_file` field (relative to repo root — prepend repo root for Read tool)\n3. **QA findings** — `.correctless\u002Fartifacts\u002Fqa-findings-{task-slug}.json`\n4. **Test edit log** — `.correctless\u002Fartifacts\u002Ftdd-test-edits.log`\n5. **Audit trail** — `.correctless\u002Fartifacts\u002Faudit-trail-{slug}-{hash}.jsonl`\n6. **Override log** — `.correctless\u002Fartifacts\u002Foverride-log.json`\n7. **Verification report** — `.correctless\u002Fverification\u002F{task-slug}-verification.md`\n8. **Session-meta** — `find ~\u002F.claude\u002Fusage-data\u002Fsession-meta\u002F -name '*.json'` filtered by `project_path` matching repo root\n9. **Conversation JSONL** (optional, for deep analysis) — find the session file at `~\u002F.claude\u002Fprojects\u002F`. List directories with `find ~\u002F.claude\u002Fprojects\u002F -maxdepth 2 -name '*.jsonl'`, identify the correct file by matching the project path pattern in the directory name and selecting the most recent file. This file can be very large — use targeted `jq` queries, never read it entirely.\n\nIf no workflow state file exists: \"No active or completed workflow on this branch. Nothing to analyze.\"\n\nExtract the spec rules: grep the spec file for `R-xxx` or `INV-xxx` identifiers. Count them — this is the baseline for coverage checks.\n\n## Step 2: Phase Execution Verification\n\nCheck whether all mandatory phases executed:\n\n**At standard intensity**: spec → review → tdd-tests → tdd-impl → tdd-qa → done → verified → documented\n**At high+ intensity**: spec → review-spec (or model → review-spec) → tdd-tests → tdd-impl → tdd-qa → (tdd-verify →) done → verified → documented\n\n**Primary source for phase history: the audit trail.** The workflow state's `phase_entered_at` field only contains the MOST RECENT transition timestamp — it cannot prove earlier phases ran. Instead, extract distinct phase values from the audit trail: `jq -r '.phase' .correctless\u002Fartifacts\u002Faudit-trail-{slug}-{hash}.jsonl | sort -u`. This shows every phase that had tool activity. If no audit trail exists, fall back to the current `phase` field as a minimum marker and note: \"No audit trail — can only verify current phase, not history.\"\n\nAlso check:\n- Were overrides used? (check override log for entries during this workflow)\n- How many spec updates happened? (from `spec_update_history` — many updates suggests the spec was undercooked)\n\nReport: \"All {N} phases executed\" or \"Phase {X} was skipped via override: '{reason}'\"\n\n## Step 3: Rule Coverage\n\nFor each spec rule (R-xxx or INV-xxx):\n\n1. **Test exists?** Grep test files for the rule ID (e.g., `Tests R-001`, `R-001`). Use the `patterns.test_file` from `workflow-config.json` to find test files.\n2. **Integration tag?** If the rule is tagged `[integration]`, check whether the test uses real wiring or mocks.\n3. **QA checked?** Search the QA findings artifact for mentions of this rule ID.\n4. **Verification status?** If the verification report exists, check its rule coverage table.\n\nOutput as a table:\n```\n| Rule | Test | QA Checked | Verify Status |\n|------|------|-----------|---------------|\n| R-001 | auth.test.ts:42 | Yes | covered |\n| R-002 | — | NO | UNCOVERED |\n```\n\n**Recommended action for gaps**: \"R-002 has no test. Run `\u002Fctdd` from the tests phase to add coverage, or run `\u002Fcverify` to confirm this is a known gap.\"\n\n## Step 4: Agent Thoroughness — QA\n\nThe most valuable analysis. Assess QA coverage and depth:\n\n**Rule mention count**: Search the QA findings artifact AND the conversation JSONL for mentions of each rule ID. Count: \"QA mentioned {N} of {M} spec rules.\" Missing rules are listed.\n\n**Token budget indicator** (best-effort): Find the most recent session-meta entry matching this project's path. Report its total `output_tokens`. If multiple prior sessions exist for the project, compute a rough average and compare: \"This session used {N}k tokens ({X}% of project average).\" A session at 30% of average likely shortcut. Note: identifying which session corresponds to QA specifically is imprecise — this is a rough signal, not a measurement. If session-meta is unavailable, skip this metric.\n\n**File coverage** (if audit trail exists): From the audit trail, which files had Read operations during the tdd-qa phase? Compare against files modified during tdd-impl. \"QA read {N} of {M} files modified during implementation.\" Missing files are listed.\n\n**Recommended action**: \"QA did not check R-003 or R-005. Consider: re-run QA with `workflow-advance.sh fix` then `workflow-advance.sh qa`, or manually verify these rules are satisfied.\"\n\n## Step 5: Agent Thoroughness — Review\n\nCheck whether the review agent was thorough:\n\n**Security checklist coverage**: If the spec touches auth, user input, data storage, or APIs, the security checklist should have fired. Search conversation JSONL for security-related terms (CSRF, XSS, injection, auth bypass, SSRF, RLS, CORS, HSTS). Count how many categories were checked vs how many were applicable.\n\n**Antipattern check**: Did the review mention any antipattern IDs (AP-xxx)? If the project has antipatterns.md with entries, the review should have checked against them.\n\n**Recommended action**: \"Review did not check for CSRF despite the spec touching API endpoints. Run `\u002Fcreview` again or verify CSRF protection manually.\"\n\n## Step 5.5: Lens Auditability (INV-010)\n\nCheck whether the mini-audit ran the right lenses for this feature. The LENS field is an open enum — handle unknown lens values gracefully from recommended lenses.\n\n**Dormant (PAT-019)**: When the lens recommendation artifact for the current branch does not exist (`.correctless\u002Fartifacts\u002Flens-recommendations-{branch_slug}.json`), skip all lens auditability checks with no error and no warning. Only perform these checks when the artifact exists.\n\nWhen the artifact exists, check:\n\n**(a) Recommended lenses none ran**: If the `recommended_lenses` array is non-empty but the `outcomes` field shows no recommended lenses with `ran: true`, warn: \"Review recommended {N} lenses but mini-audit ran none — was the recommendation ignored?\"\n\n**(b) CRITICAL finding lens not executed**: For each recommended lens linked to a CRITICAL review finding (check `source_finding` and look up its severity), if the lens has `ran: false` in outcomes, warn: \"Lens {lens_name} recommended due to CRITICAL finding {source_finding}: {source_finding_summary} was not executed.\" The `source_finding_summary` field provides the display text without requiring cross-artifact lookup.\n\n**(c) Lens selection rationale**: Report the full lens selection from the artifact — which lenses were recommended, which were selected (ran), and which were excluded (budget exceeded or other reason from `failure_reason`).\n\n## Step 5.6: Rule-Load Observability (InstructionsLoaded)\n\nThis step presents **direct rule-load evidence** so you can judge, for yourself, whether a `.claude\u002Frules\u002F*.md` rule (for example `hooks-pretooluse.md`) was actually loaded into agent editing context around the hook edits in this workflow. It is a plain-language, side-by-side view of two local logs — it draws **no** conclusion and emits **no** verdict. The human classifies.\n\n**Two sources:**\n\n1. **Rule-load events** — `.correctless\u002Fmeta\u002Finstructions-loaded.jsonl` (the InstructionsLoaded telemetry log). Each line records a rule file that was loaded, with `trigger_file_path` (the file whose open triggered the load) and a timestamp.\n2. **Hook-edit entries** — the target workflow\u002Fbranch's `audit-trail-*.jsonl`. Locate it by globbing `audit-trail-*.jsonl` for the target branch (edits made off-workflow do not appear in the audit trail — note this caveat when the picture looks thin).\n\n**How to group (RS-027):** do **not** filter rule-loads by the session running `\u002Fcwtf` — `\u002Fcwtf` usually analyzes a *past* workflow, so the invoking session is not the session that made the edits. Instead, derive the set of edit-session ids from the **target workflow's hook-edit entries** (audit-trail lines whose `.file` is under `hooks\u002F`), then present rule-loads **grouped per edit-session**. A hook-edit with no `session_id` (pre-instrumentation) is shown in an **unattributed** group; rule-loads are not attributed to it. Sessions that appear in the rule-load log but never made a hook-edit are intentionally excluded.\n\n**Consumer contract:** both logs are read line-by-line with the project JSONL consumer contract — `jq -R 'fromjson? ...'` (try\u002Fcatch, skip malformed lines), **never** slurping the whole file into a variable\u002Fargv, and never a single-shot slurp of all lines. Hook-edit times are read as `.ts \u002F\u002F .timestamp` (RS-030) because the audit-trail file is mixed-shape: the audit hook writes `ts`, `\u002Fcauto` writes `timestamp` to the same file. Uses only `\u002Fcwtf`'s existing `Bash(jq*)`\u002F`Bash(grep*)`\u002F`Bash(find*)` tools — no new helper script.\n\n**Liveness (INV-016):** always print the denominators the presentation worked from (how many rule-load events, how many with null `rule_file`, how many hook-edit entries, across how many edit-sessions, and when the log was last written) so a dead or field-drifted channel is visible rather than silently producing an empty picture.\n\n**Dormant \u002F field-drift (INV-009):** if the log is absent or empty, print a single non-alarming advisory explaining it populates the first time a `.claude\u002Frules\u002F*.md`-scoped file is opened and requires harness ≥2.1.69, then continue. If the log is present but **every** `rule_file` is null, surface a field-drift note (\"all with null rule_file — possible harness field drift\").\n\nRun this presentation block (inputs: `IL_LOG` = the instructions-loaded.jsonl path; `AUDIT_TRAIL` = the target branch's audit-trail-*.jsonl path):\n\n\u003C!-- cwtf:rule-load-extract:start -->\n```bash\n# Inputs (env): IL_LOG = instructions-loaded.jsonl ; AUDIT_TRAIL = target branch audit-trail-*.jsonl\nIL_LOG=\"${IL_LOG:-.correctless\u002Fmeta\u002Finstructions-loaded.jsonl}\"\nAUDIT_TRAIL=\"${AUDIT_TRAIL:-}\"\n\n# Repo root for .file canonicalization (MA-R3-001). audit-trail .file values are a\n# MIX of absolute (\u002Fhome\u002F...\u002Fhooks\u002Fx.sh) and relative (hooks\u002Fx.sh) paths. Each of the\n# 3 hook-edit filter sites strips this \"$root\u002F\" prefix (ltrimstr) so an ABSOLUTE hook\n# path canonicalizes to repo-relative BEFORE the ^hooks\u002F anchor — otherwise every\n# absolute .file misses the anchor and the channel silently reads 0 hook edits. Bash(git*)\n# is granted. Empty (non-repo cwd) => ltrimstr \"\u002F\" is a harmless no-op prefix; relative\n# paths still match, absolute won't (acceptable degradation outside a repo).\nroot=\"$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull)\" || true\n\n# Every jq over IL_LOG \u002F AUDIT_TRAIL guards with `fromjson? | objects` (MA-001):\n# bare `fromjson?` only catches fromjson's own parse error, so a VALID-but-non-object\n# line (5, \"x\", [1,2]) or a mistyped field ({\"file\":5}) would raise a downstream\n# `.field`\u002F`test`\u002F`startswith` runtime error that `?` does NOT catch — and on jq 1.7\n# (CI) that aborts the whole stream, truncating evidence and breaking liveness.\n# `objects` drops any non-object line so a forged\u002Ftorn\u002Fscalar\u002Fmistyped line is\n# skipped, never fatal, on jq 1.7 AND 1.8. Fields used in matching are also coerced\n# (`(.file \u002F\u002F \"\") | tostring`) so a non-string field can never error.\n#\n# Hook-edit filter (MA-002 \u002F MA-R2-002 \u002F MA-R3-001): .file is FIRST canonicalized to\n# repo-relative via `ltrimstr($root + \"\u002F\")` (audit-trail records .file as a MIX of\n# absolute and relative paths — without this, every absolute \u002Fhome\u002F...\u002Fhooks\u002Fx.sh path\n# misses the anchor and the channel silently reads 0). Then match ONLY the real\n# Correctless hook roots: `^hooks\u002F` (source tree) or `^\\.correctless\u002Fhooks\u002F` (installed).\n# Both anchors are start-anchored because the path is now repo-relative. This deliberately\n# EXCLUDES src\u002Fhooks\u002F (React), .git\u002Fhooks\u002F, node_modules\u002F**\u002Fhooks\u002F, app\u002Fhooks\u002F, the legacy\n# Claude hooks dir, AND the `correctless\u002Fhooks\u002F` sync-mirror dir (a nested prefix that no\n# longer matches ^hooks\u002F — mirror edits are secondary, acceptable to exclude) so a\n# downstream project's unrelated \"hooks\" directory is never miscounted as a Correctless\n# hook edit.\n# A write-tool gate (.tool in Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)\n# further excludes Read\u002FGrep of hook files, which audit-trail.sh ALSO records with a\n# .file (MA-CC-03). Bash IS included: a hook edited via a Bash redirect\u002Fwriter command\n# is a real edit, recorded as tool:\"Bash\" with the write target in .file by\n# get_target_file (a plain read like `cat hooks\u002Fx` has no write target, so no .file\n# under a hook root, so it is not counted). The predicate is byte-identical at all\n# three sites (the hook_edits count,\n# the edit_sessions derivation, and the per-session render) so counts and grouping\n# stay consistent. Non-hook audit-trail entries (\u002Fcauto orchestration events, \u002Fcaudit\n# records) still fail the test and are excluded.\n\n# --- Resolve the hook-edit source (MA-004 \u002F MA-R2-001) ----------------------\n# Distinguish \"audit-trail path not resolved\" from \"resolved, zero hook edits\".\n# audit_autoresolved=1 marks a fallback pick (provenance: name the file in output,\n# do NOT claim it authoritatively describes \"the target workflow\").\naudit_located=1\naudit_autoresolved=0\nif [ -z \"$AUDIT_TRAIL\" ] || [ ! -f \"$AUDIT_TRAIL\" ]; then\n  # Not passed \u002F missing: locate THIS branch's audit trail ONLY (MA-R2-001). NEVER\n  # fall back to another branch's trail — a cross-branch lexicographic pick can mask a\n  # dead channel or misattribute another workflow's edits. Scope the glob to the\n  # current branch slug (Bash(git*) is granted); the trailing '*' matches the -{hash}\n  # suffix. This is a scoped lexicographic pick within THIS branch's trails, NOT an\n  # mtime\u002Fmost-recent pick.\n  br=\"$(git rev-parse --abbrev-ref HEAD 2>\u002Fdev\u002Fnull)\" || true\n  # slug must mirror branch_slug() (scripts\u002Flib.sh) char-class transform EXACTLY so the\n  # glob prefix matches the real filename (MA-R3-002): ${branch\u002F\u002F[^a-zA-Z0-9]\u002F-} then\n  # truncate to 80. The md5 suffix branch_slug appends can't be recomputed without\n  # md5sum (not granted), so the trailing terminal-hash glob below matches it instead.\n  slug=\"${br\u002F\u002F[^a-zA-Z0-9]\u002F-}\"; slug=\"${slug:0:80}\"\n  if [ -n \"$slug\" ]; then\n    # Terminal-hash anchor (MA-R3-003): only accept a filename where $slug is IMMEDIATELY\n    # followed by the 6-hex-char branch_slug hash + .jsonl, so a longer sibling slug\n    # sharing this prefix (e.g. audit-trail-${slug}-extra-abc123.jsonl) is NOT matched.\n    # slug is [a-zA-Z0-9-] only (after the transform above), safe inside grep -E.\n    AUDIT_TRAIL=\"$(find .correctless\u002Fartifacts -maxdepth 1 -type f -name \"audit-trail-${slug}-*.jsonl\" 2>\u002Fdev\u002Fnull | grep -E \"\u002Faudit-trail-${slug}-[0-9a-f]{6}\\\\.jsonl$\" | sort | tail -1)\"\n  else\n    AUDIT_TRAIL=\"\"\n  fi\n  if [ -n \"$AUDIT_TRAIL\" ] && [ -f \"$AUDIT_TRAIL\" ]; then\n    audit_autoresolved=1\n  else\n    audit_located=0\n  fi\nfi\n\n# --- Hook-edit denominators + edit-session ids (computed FIRST, MA-003) ------\nhook_edits=0\nedit_sessions=\"\"\nif [ \"$audit_located\" -eq 1 ]; then\n  # hook-edit entries = write-tool ops whose .file is under a real Correctless hook\n  # root (MA-002 \u002F MA-R2-002 \u002F MA-CC-03); time read as .ts \u002F\u002F .timestamp (RS-030).\n  hook_edits=\"$(jq -R --arg root \"$root\" 'fromjson? | objects | select(((.file \u002F\u002F \"\") | tostring | ltrimstr($root + \"\u002F\") | (test(\"^hooks\u002F\") or test(\"^\\\\.correctless\u002Fhooks\u002F\"))) and ((.tool \u002F\u002F \"\") | tostring | test(\"^(Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)$\"))) | 1' \"$AUDIT_TRAIL\" 2>\u002Fdev\u002Fnull | grep -c .)\" || true\n  # edit-session ids (missing\u002Fnull\u002Fempty session_id -> unattributed), de-duplicated.\n  # `\u002F\u002F \"unattributed\"` alone does NOT catch \"\" (jq \u002F\u002F only catches null\u002Ffalse), so\n  # empty-string sessions are folded into unattributed explicitly (QA-001 \u002F INV-015).\n  edit_sessions=\"$(jq -Rr --arg root \"$root\" 'fromjson? | objects | select(((.file \u002F\u002F \"\") | tostring | ltrimstr($root + \"\u002F\") | (test(\"^hooks\u002F\") or test(\"^\\\\.correctless\u002Fhooks\u002F\"))) and ((.tool \u002F\u002F \"\") | tostring | test(\"^(Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)$\"))) | (.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end)' \"$AUDIT_TRAIL\" 2>\u002Fdev\u002Fnull | sort -u)\"\nfi\nedit_session_count=\"$(printf '%s\\n' \"$edit_sessions\" | grep -c .)\" || true\n\n# --- Rule-load denominators (try\u002Fcatch consumer contract; never whole-file slurp)\nrule_loads=\"$(jq -R 'fromjson? | objects | 1' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | grep -c .)\" || true\nnull_rules=\"$(jq -R 'fromjson? | objects | select(.rule_file == null) | 1' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | grep -c .)\" || true\n# MA-005: -Rr so the timestamp prints raw (unquoted) in the liveness line.\nlast_written=\"$(jq -Rr 'fromjson? | objects | (.ts \u002F\u002F .timestamp) \u002F\u002F empty' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | tail -1)\"\n\n# --- Attributed rule-loads (reconciliation, MA-R2-003 \u002F MA-011) --------------\n# attributed = rule-loads whose session_id matches a REAL (non-unattributed) edit-\n# session. Computed ONCE here and reused by BOTH the liveness denominator (so read K\n# reconciles as attributed + other + null) AND the drift note below (MA-006). When\n# there is no real edit-session to match against, attributed is 0 by construction.\nreal_edit_sessions=\"$(printf '%s\\n' \"$edit_sessions\" | grep -v '^unattributed$' | grep -v '^$')\"\nif [ -z \"$real_edit_sessions\" ]; then\n  attributed=0\nelse\n  attributed=\"$(jq -Rr 'fromjson? | objects | (.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end)' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | grep -Fxf \u003C(printf '%s\\n' \"$real_edit_sessions\") 2>\u002Fdev\u002Fnull | grep -c .)\" || true\nfi\n\n# --- Dormant vs dead channel (MA-003 \u002F MA-R2-003) ---------------------------\n# hook_edits is already computed. Empty\u002Fabsent IL_LOG is benign ONLY when no hook\n# edits happened; if hook edits happened with zero rule-loads the channel may be\n# dead (hook not registered, harness too old to emit InstructionsLoaded, or not\n# firing), not merely quiet.\nif [ ! -s \"$IL_LOG\" ]; then\n  if [ \"${hook_edits:-0}\" -eq 0 ]; then\n    echo \"no direct rule-load signal yet — the InstructionsLoaded log populates the first time a .claude\u002Frules\u002F*.md-scoped file is opened; requires harness >=2.1.69 AND that \u002Fcsetup has registered the InstructionsLoaded hook in this project's settings.json (re-run \u002Fcsetup if you recently upgraded)\"\n  else\n    echo \"WARNING: ${hook_edits} hook-edit(s) occurred but zero rule-load events were recorded — the channel may be dead (hook not registered, harness \u003C2.1.69 which does not emit InstructionsLoaded, or not firing), not merely quiet.\"\n  fi\nelif [ \"${rule_loads:-0}\" -eq 0 ]; then\n  # MA-008(a): the file has bytes but nothing parses as an object.\n  echo \"log present but 0 parseable JSONL lines — possible corruption or torn writes; treat as no signal\"\nfi\n\n# --- Liveness denominators (INV-016 \u002F DA-004 \u002F MA-011) ----------------------\nif [ \"$audit_located\" -eq 1 ]; then\n  # read K reconciles: attributed (to this workflow's real edit-sessions) + other\n  # (rule-loads from unrelated sessions) + null rule_file (MA-011).\n  # MA-R3-004: clamp the \"from other sessions\" figure at 0 so a forged newline-inflated\n  # attributed count can't render a negative rule-load breakdown.\n  other=$(( rule_loads - attributed )); [ \"$other\" -lt 0 ] && other=0\n  rl_breakdown=\"read ${rule_loads} rule-load event(s) (${attributed} attributed to this workflow's edit-sessions, ${other} from other sessions, ${null_rules} with null rule_file)\"\n  if [ \"$audit_autoresolved\" -eq 1 ]; then\n    # MA-R2-001 provenance: source was auto-resolved by fallback — name it, do NOT\n    # assert it authoritatively describes \"the target workflow\".\n    echo \"Liveness: ${rl_breakdown} and ${hook_edits} hook-edit entries across ${edit_session_count} edit-session(s) (hook-edit source auto-resolved to ${AUDIT_TRAIL##*\u002F}; verify it matches the workflow you are auditing); log last written ${last_written:-never}\"\n  else\n    echo \"Liveness: ${rl_breakdown} and ${hook_edits} hook-edit entries across ${edit_session_count} edit-session(s) for the target workflow; log last written ${last_written:-never}\"\n  fi\nelse\n  # MA-004: no source located — do NOT report \"0 hook-edit entries\" as if measured.\n  echo \"Liveness: read ${rule_loads} rule-load event(s) (${null_rules} with null rule_file); hook-edit source not located (audit-trail-*.jsonl not found) — hook-edit attribution unavailable; log last written ${last_written:-never}\"\nfi\n\n# --- Field-drift note (INV-009 \u002F MA-008b \u002F MA-R2-004) -----------------------\nif [ \"${rule_loads:-0}\" -gt 0 ] && [ \"${rule_loads}\" = \"${null_rules}\" ]; then\n  echo \"${rule_loads} rule-load events, all with null rule_file — possible harness field drift; treat the rule-load evidence as unreliable\"\nelif [ \"${rule_loads:-0}\" -gt 0 ] && [ \"$(( null_rules * 2 ))\" -ge \"${rule_loads}\" ]; then\n  echo \"high null-rule ratio (${null_rules}\u002F${rule_loads}) — possible harness field drift; treat the rule-load evidence as unreliable\"\nfi\n\n# --- Raw evidence grouped by the TARGET workflow's edit-session ids (RS-027) --\nprintf '%s\\n' \"$edit_sessions\" | while IFS= read -r sess; do\n  [ -z \"$sess\" ] && continue\n  echo \"=== edit-session: ${sess} ===\"\n  # MA-007: the unattributed group predates session_id instrumentation.\n  if [ \"$sess\" = \"unattributed\" ]; then\n    echo \"  these edits predate session_id instrumentation — rule-loads cannot be attributed to them; absence of rule-loads here is NOT evidence the rule was unloaded.\"\n  fi\n  jq -Rr --arg s \"$sess\" --arg root \"$root\" 'fromjson? | objects\n     | select(((.file \u002F\u002F \"\") | tostring | ltrimstr($root + \"\u002F\") | (test(\"^hooks\u002F\") or test(\"^\\\\.correctless\u002Fhooks\u002F\"))) and ((.tool \u002F\u002F \"\") | tostring | test(\"^(Edit|Write|MultiEdit|NotebookEdit|CreateFile|Bash)$\")))\n     | select((.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end) == $s)\n     | \"  hook-edit: \\(.file) at \\((.ts \u002F\u002F .timestamp) \u002F\u002F \"?\")\"' \"$AUDIT_TRAIL\" 2>\u002Fdev\u002Fnull\n  # Rule-loads are only attributed to real (non-unattributed) sessions. The key is\n  # normalized identically so a null\u002Fempty-session rule-load can never match a real\n  # $s, and the \"unattributed\" group never claims any rule-load (QA-001 \u002F INV-015).\n  if [ \"$sess\" != \"unattributed\" ]; then\n    jq -Rr --arg s \"$sess\" 'fromjson? | objects\n       | select((.session_id \u002F\u002F \"\" | if . == \"\" then \"unattributed\" else . end) == $s)\n       | \"  rule-load: \\(.rule_file \u002F\u002F \"(null)\") (trigger_file_path \\(.trigger_file_path \u002F\u002F \"?\")) at \\(.ts \u002F\u002F \"?\")\"' \"$IL_LOG\" 2>\u002Fdev\u002Fnull\n  fi\ndone\n\n# --- Unmatched rule-load sessions (MA-006 \u002F EA-005 \u002F MA-R2-004 \u002F MA-010) -----\n# Surface the DISTINCT rule-load session_ids so a human can spot session_id format\n# drift. Fire ONLY when there was at least one real (non-unattributed) edit-session to\n# match against — when real_edit_sessions is empty (all edits pre-instrumentation),\n# attributed==0 is BENIGN and the unattributed-group header already explains it, so\n# the drift note is suppressed to avoid a false \"session_id format drift\" alarm.\nif [ \"${rule_loads:-0}\" -gt 0 ] && [ -n \"$real_edit_sessions\" ] && [ \"${attributed:-0}\" -eq 0 ]; then\n  rl_sess_seen=\"$(jq -Rr 'fromjson? | objects | (.session_id \u002F\u002F \"(null)\")' \"$IL_LOG\" 2>\u002Fdev\u002Fnull | sort -u | grep . | tr '\\n' ' ')\" || true\n  echo \"note: ${rule_loads} rule-load event(s) exist but none matched an edit-session_id — possible session_id format drift across events (EA-005); rule-load session_ids seen: ${rl_sess_seen}\"\nfi\n\nexit 0\n```\n\u003C!-- cwtf:rule-load-extract:end -->\n\nPresent the block's output as-is under a \"Rule-load evidence\" heading. Do **not** compute or state whether a rule \"was\" or \"was not\" in context for a given edit — show the timestamps side by side and let the reader judge.\n\n## Step 6: Deviation Detection\n\nCross-reference what happened against what should have happened:\n\n**Source files modified during QA**: The audit trail should show no Edit\u002FWrite operations on source files during `tdd-qa` phase. If it does: \"Source file {file} was modified during QA phase at {timestamp}. This is a gate bypass — the QA agent should be read-only.\"\n\n**Test files modified during GREEN without logging**: Compare audit trail (test file edits during `tdd-impl`) against the test-edit log. If the audit trail shows a test edit that the log doesn't mention: \"Test file {file} was edited during GREEN at {timestamp} but not logged in tdd-test-edits.log.\"\n\n**Overrides**: List all overrides with their reasons and when they occurred relative to the workflow timeline.\n\n**Spec updates**: If `spec_updates > 0`, list each update with its reason. Multiple updates suggest the spec wasn't thorough enough.\n\n**Recommended action per deviation**: specific, not vague. \"Source file edited during QA — check if this was a legitimate fix round (should have used `workflow-advance.sh fix` first) or a gate bypass.\"\n\n## Step 7: Generate Verdict\n\nAssess the overall workflow quality:\n\n- **THOROUGH** — all phases ran, all rules have coverage, QA checked all rules, review ran security checklist, no deviations\n- **ADEQUATE** — all phases ran, most rules covered, minor gaps in QA\u002Freview thoroughness that don't affect correctness\n- **INCOMPLETE** — phases ran but significant rule coverage gaps, QA missed multiple rules, or review skipped applicable security checks\n- **SHORTCUT** — phases skipped via override, QA used far below average tokens, multiple rules unchecked, or source files modified during QA\n\n**Precedence rule**: If any SHORTCUT criterion is met (phase skip via override, source edit during QA, token usage far below average), the verdict cannot be higher than SHORTCUT regardless of other positive signals. A single gate bypass dominates all other indicators.\n\nThe verdict is a judgment call within those constraints. Explain the reasoning. Users can disagree.\n\n## Output Format\n\n**Persist before presenting (AP-029).** Before displaying the report to the user, write it to `.correctless\u002Fartifacts\u002Fwtf-report-{branch-slug}.md` where branch-slug is derived from `branch_slug()`. This is the recovery path if the terminal display is interrupted or context is compacted.\n\n```markdown\n## Workflow Accountability Report\n\n### Workflow: {task name}\n**Branch:** {branch}\n**Phases completed:** {list}\n**QA rounds:** {N}\n**Overrides used:** {N}\n\n### Phase Execution: {PASS | {N} issues}\n{details}\n\n### Rule Coverage: {N}\u002F{M} rules covered\n| Rule | Test | QA Checked | Verify Status |\n|------|------|-----------|---------------|\n| R-001 | auth.test.ts:42 | Yes | covered |\n| R-002 | — | NO | UNCOVERED |\n\n### Agent Thoroughness\n**QA**: Checked {N}\u002F{M} rules. Token usage: {N}k ({X}% of average).\n- {Missing rules with recommended actions}\n\n**Review**: {N}\u002F{M} security checks applied.\n- {Skipped checks with recommended actions}\n\n### Deviations ({N} found)\n{Each deviation with timestamp, evidence, and recommended action}\n\n### Verdict: {THOROUGH | ADEQUATE | INCOMPLETE | SHORTCUT}\n{2-3 sentences explaining the assessment and what, if anything, should be done about it.}\n```\n\n## Claude Code Feature Integration\n\n### Task Lists\nSee \"Progress Visibility\" section above — task creation and narration are mandatory.\n\n## Code Analysis (MCP Integration)\n\nIf `mcp.serena` is `true` in `workflow-config.json`, use Serena MCP for symbol-level code analysis during thoroughness checking — particularly call-graph-based analysis:\n\n- Use `find_symbol` instead of grepping for function\u002Ftype names\n- Use `find_referencing_symbols` to trace callers and dependencies for call-graph completeness\n- Use `get_symbols_overview` for structural overview of a module\n- Use `replace_symbol_body` for precise edits (not used in this skill — wtf is read-only)\n- Use `search_for_pattern` for regex searches with symbol context\n\n**Fallback table** — if Serena is unavailable, fall back silently to text-based equivalents:\n\n| Serena Operation | Fallback |\n|-----------------|----------|\n| `find_symbol` | Grep for function\u002Ftype name |\n| `find_referencing_symbols` | Grep for symbol name across source files |\n| `get_symbols_overview` | Read directory + read index files |\n| `replace_symbol_body` | Edit tool |\n| `search_for_pattern` | Grep tool |\n\n## Autonomous Defaults\n\n- **AD-001**: Analysis scope — analyze all available data sources for accountability report (default). No human input required; this skill runs to completion autonomously.\n\n## If Something Goes Wrong\n\n- This skill is read-only. Re-run anytime safely.\n- **Conversation JSONL too large**: Use targeted `grep` and `jq` queries on the JSONL file. Search for specific rule IDs, tool names, or phase-related keywords. Never read the entire file into memory.\n- **Audit trail missing**: The skill still works from qa-findings + verification report, but agent thoroughness analysis will be less detailed. Note: \"Audit trail not available — thoroughness analysis based on artifacts only.\"\n- **No session-meta match**: Token budget comparison unavailable. Note it and skip that metric.\n\n## Constraints\n\n- **Read-only.** Never modify workflow state, findings, source code, or any artifact.\n- **Not punitive.** Frame gaps as observations with context, not accusations. Include possible reasons for each gap.\n- **Recommended actions.** Every gap should suggest a specific next step — not auto-fix, just point the user at the right command.\n- **Targeted JSONL queries.** The conversation JSONL can be megabytes. Use `grep` for rule IDs, `jq` for structured extraction. Never `cat` the entire file.\n- **Verdict is honest.** SHORTCUT is a valid assessment. Don't soften it to ADEQUATE if the evidence shows shortcuts. But explain why.\n- **Redact if sharing.** If this output will be shared externally, apply redaction rules from `templates\u002Fredaction-rules.md` first.\n",{"name":5,"description":7,"allowed-tools":43,"disallowed-tools":44,"interaction_mode":25},"Read, Grep, Glob, Write(.correctless\u002Fartifacts\u002Fwtf-*), Bash(git*), Bash(jq*), Bash(find*), Bash(grep*)","Edit, MultiEdit, NotebookEdit, CreateFile","main","74f9ef3f5acae9c857f6be6dd86cdc3b10830c90","correctless\u002Fskills\u002Fcwtf",4,"https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless","https:\u002F\u002Fjoshft.github.io\u002Fcorrectless\u002F","https:\u002F\u002Fgithub.com\u002Fjoshft","2026-11-14 02:53:56",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add joshft\u002Fcorrectless --skill cwtf",{"tool":59,"command":60},"bunx","bunx skills add joshft\u002Fcorrectless --skill cwtf",{"tool":62,"command":63},"pnpm","pnpm dlx skills add joshft\u002Fcorrectless --skill cwtf","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fcorrectless\u002Fskills\u002Fcwtf\u002FSKILL.md",true,[],[68,73,92,110,127,140],{"skillNo":69,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":38},"01M6JJW224Q40TCVMTKRZPDHDY","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fskills\u002Fcwtf\u002FSKILL.md",[],[5,28,37,36,35,34,33,32,31,30,29,19,27,26,25,24,23,22,21,20],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":38},"01M6JJVT9M4KGWQ99V0CSF6WZ5","cverify","Verify implementation matches spec. Check rule coverage, undocumented dependencies, architecture compliance. Writes verification report and drift debt. Run after \u002Fctdd completes.","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fskills\u002Fcverify\u002FSKILL.md",[],[75,80,28,81,82,37,83,84,33,29,19,27,26,85,86,87,88,89,90,91],"go","architecture","run","verification","Meta","diff","ruff","drift","verify implementation","cargo","stryker","ctdd",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":38},"01M6JJVP2E6BHHKF3SCMDXG0S2","cupdate-arch","Update .correctless\u002FARCHITECTURE.md after features land. Use after \u002Fcdocs or when the codebase structure has changed.","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fskills\u002Fcupdate-arch\u002FSKILL.md",[],[99,100,101,81,102,37,103,33,104,32,29,19,27,24,105,106,107,108,109],"arch","cupdate arch","docs","update","land","Rules","structure","codebase","features","codebase structure","cdocs",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":38},"01M6JJVJVZ72KVWN1K3RWQK0YJ","ctriage","Bulk triage deferred findings backlog. Presents findings one at a time with disposition options.","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fskills\u002Fctriage\u002FSKILL.md",[],[112,117,84,33,118,32,30,119,29,19,27,120,121,122,123,124,125,126],"triage","json","one at a time","interactive","options","backlog","time","bulk","with","at",{"skillNo":128,"name":91,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":38},"01M6JJVCYCNYD4GHK33DZE9DXA","Enforced TDD workflow. Write failing tests from spec rules, then implement. Use after \u002Fcreview approves a spec.","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fskills\u002Fctdd\u002FSKILL.md",[],[91,133,134,135,28,36,136,33,104,32,29,19,27,24,137,138,139],"spec","implement","tdd","tdd workflow","task","tests","creview",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":38},"01M6JJV7S3EQG3GHQ56DD8P1SA","csummary","Feature summary. Use after \u002Fcdocs to see what the workflow caught, or mid-feature to check progress.","https:\u002F\u002Fgithub.com\u002Fjoshft\u002Fcorrectless\u002Fblob\u002Fmain\u002Fskills\u002Fcsummary\u002FSKILL.md",[],[142,28,37,36,33,32,147,29,19,27,25,24,148,149,150,151,109],"check","what the","summary","feature","progress"]