[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M718V07XV36P30YBDG8A8D04":3,"skill-same:01M718V07XV36P30YBDG8A8D04":66},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M718V07XV36P30YBDG8A8D04","oma-docs",null,"Verify documentation references against the current codebase, propose updates for diff-affected docs, detect i18n translation drift, and lint translated docs for CJK style issues. Use to check if docs still match reality (broken file paths, CLI commands, config keys, env vars, scripts), to surface docs that may need updating after code changes, or to find stale or style-broken translations.","vasceannie\u002Fslopgate","vasceannie","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F20271133?v=4","01M718RGA8VV2EF22XJEMXVQ0Q","Travis Vasceannie","01M718RGB0GWSXBBZBN67Q6NHQ",1,"MIT","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Foma-docs\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"docs","oma docs","for","diff","cjk","paths","commands","config","scripts","affected","cli","i18n","references","documentation","code","drift","updates","issues","broken","translation","2026-11-10 10:12:30",false,"---\nname: oma-docs\ndescription: Verify documentation references against the current codebase, propose updates for diff-affected docs, detect i18n translation drift, and lint translated docs for CJK style issues. Use to check if docs still match reality (broken file paths, CLI commands, config keys, env vars, scripts), to surface docs that may need updating after code changes, or to find stale or style-broken translations.\n---\n\n# oma-docs - Documentation Drift Detector\n\n## Scheduling\n\n### Goal\nDetect broken references in repo markdown — default glob `**\u002F*.md` (verify mode), propose LLM-generated patch proposals for docs affected by recent code changes (sync mode), detect structural drift between English source docs and their translations (i18n mode), and lint translated docs for CJK style anti-patterns (lint mode). All modes run on-demand; sync is always interactive.\n\n### Intent signature\n- User asks to check if docs are up to date, find broken doc links, verify file paths referenced in docs, or detect documentation drift.\n- User asks to update docs after a code change, propose doc patches for a git diff, or sync affected docs.\n- User asks whether translations are stale, which i18n docs drifted from the English source, or to lint translated docs for style issues (em-dashes in CJK targets, etc.).\n- A workflow hook checks `docs.auto_verify: true` and runs `oma docs verify --json` at completion.\n\n### When to use\n- After a refactor, rename, or file deletion, to find stale references in docs.\n- Before a release, to confirm that CLI commands, file paths, and config keys in docs still exist.\n- After a significant git diff, to discover which docs reference the changed files and may need updating.\n- After updating English source docs (`web\u002Fdocs`), to find translations (`web\u002Fi18n\u002F{lang}\u002F...`) that drifted or went missing.\n- Before a docs release, to lint CJK translations for content-level anti-patterns.\n- Routine drift check on any docs-heavy repo.\n\n### When NOT to use\n- Generating docs from scratch for undocumented features → v2 create mode.\n- Actually translating or restructuring docs → use `oma-translation` (`oma docs i18n` \u002F `oma docs lint` only detect; they never edit translations).\n- Symbol-level semantic drift (function signature changes not reflected in prose) → v2 L3 mode.\n- CI-blocking enforcement → v2 block mode (v1 is warn-only).\n- Explaining a code change as an educational document → use `oma-explanation` (this skill detects drift; it does not author explainers).\n\n### Expected inputs\n\n**verify mode**: Optional glob path (default `**\u002F*.md`), optional `--json` flag, optional `--report-file \u003Cpath>`.\n\n**sync mode**: Optional git diff range (default `--cached`, fallback `HEAD~1..HEAD`).\n\n**i18n mode**: Optional `--min-severity \u003CCRITICAL|HIGH|MEDIUM|LOW>` (default `MEDIUM`), optional `--json`.\n\n**lint mode**: Optional `--locales \u003Clist>` (comma-separated CJK locales for the `cjk-em-dash` rule, default `ko,ja,zh`), optional `--json`. The default `wrong-language` rule always scans every locale under `web\u002Fi18n\u002F` and is not narrowed by `--locales`.\n\n### Expected outputs\n\n**verify mode**:\n- Markdown drift report to stdout (default), or raw JSON with `--json`, or full markdown written to file with `--report-file`.\n- Exit code 0 if clean, 1 if any broken refs found.\n\n**sync mode**:\n- Per-doc patch proposals drafted by the host LLM from the CLI's candidate-doc list, confirmed per doc (`[y] apply [n] skip [d] diff [s] full proposal` style).\n- Docs modified only on explicit user approval; `doc-refs.json` regenerated after applies.\n\n**i18n mode**:\n- Per-pair structural drift signals (line count, heading count, EN-newer recency flag) with severity, as markdown summary or `--json`. Report-only: drifting pairs are handed to `oma-translation` in diff-sync mode.\n\n**lint mode**:\n- Style issues grouped by rule \u002F language \u002F file, as markdown summary or `--json`. Report-only: restructuring goes through `oma-translation`.\n\n### Dependencies\n- `cli\u002Fcommands\u002Fdocs\u002Fextract.ts`: markdown AST + L2 pattern extractor.\n- `cli\u002Fcommands\u002Fdocs\u002Fresolve.ts`: deterministic broken-ref checker.\n- `cli\u002Fcommands\u002Fdocs\u002Freporter.ts`: deterministic markdown\u002FJSON report renderer (no LLM call; host LLM does narrative synthesis).\n- `cli\u002Fcommands\u002Fdocs\u002Fsync-propose.ts`: git diff intake, reverse lookup, candidate-doc selector with secret redaction (no LLM call; host LLM drafts patches).\n- `cli\u002Fcommands\u002Fdocs\u002Fi18n-drift.ts`: EN↔translation structural drift detector (line\u002Fheading counts, last-commit recency; no LLM call).\n- `cli\u002Fcommands\u002Fdocs\u002Flint-i18n.ts`: translated-doc linter for selected-locale CJK em-dash style and all-locale wrong-language placeholders (no LLM call, no auto-fix).\n- `docs\u002Fgenerated\u002Fdoc-refs.json`: single-direction reference index, regenerated on every verify run. Gitignored — the CLI force-adds `docs\u002Fgenerated\u002F` to `.gitignore` so generated artifacts are never committed.\n- `docs\u002Fgenerated\u002Furl-drift.json`: lychee-produced URL drift report (written by background lychee spawn; gitignored under the same `docs\u002Fgenerated\u002F` rule).\n- `lychee`: external Rust tool for URL link checking. Detected on PATH; install via `brew install lychee` or see https:\u002F\u002Fgithub.com\u002Flycheeverse\u002Flychee#installation. Optional but recommended.\n- `.agents\u002Foma-config.yaml`: `docs.auto_verify` (workflow hook opt-in), `docs.check_urls` (URL checking on\u002Foff, default true), and `docs.exclude` (glob list of markdown trees the walker must not scan — benchmark artifacts, translation mirrors, etc.; default `[]`) toggles.\n\n### Control-flow features\n- Mode is selected from the first argument: `verify`, `sync`, `i18n`, or `lint`.\n- verify: extract → resolve → report (fully deterministic CLI; host LLM adds narrative summary on top of the JSON\u002Fmarkdown output).\n- sync: git diff → reverse lookup → candidate list (CLI) → host-LLM patch proposals → interactive accept\u002Freject.\n- i18n \u002F lint: fully deterministic CLI reports; host LLM routes drifting pairs \u002F style issues to `oma-translation`.\n- Branches on `--json`, `--report-file`, LLM availability, and network reachability.\n- Never blocks workflow completion in v1 (warn-only hook policy).\n\n## Structural Flow\n\n### Entry\n1. Read first argument to select mode (`verify` | `sync` | `i18n` | `lint`). If absent, print help and exit.\n2. Load `oma-config.yaml` to check `docs.auto_verify` when invoked from a workflow hook.\n3. Confirm required CLI dependencies (`oma docs verify`, `oma docs sync`) are on PATH.\n\n### Scenes\n1. **PREPARE**: Determine mode, resolve path\u002Fdiff-range arguments, confirm tool availability.\n2. **ACQUIRE**: Run extractor (`extract.ts`) to regenerate `doc-refs.json` from repo markdown (`**\u002F*.md`, verify) or build in-memory reverse index from `doc-refs.json` (sync; a cached index newer than 5 minutes is reused, otherwise regenerated).\n3. **REASON**: Resolve each reference deterministically (verify) or correlate changed files to candidate docs via reverse lookup (sync).\n4. **ACT**: Render the deterministic drift report (verify) or list candidate docs with matched refs (sync). Host LLM does any natural-language synthesis or patch drafting on top of this output.\n5. **VERIFY**: Confirm output shape is valid (JSON schema check for `--json`; structured candidate list for sync).\n6. **FINALIZE**: Print to stdout, write report file if requested, emit exit code.\n\n### Transitions\n- verify mode: PREPARE → ACQUIRE (extract) → REASON (resolve) → ACT (report) → FINALIZE.\n- sync mode: PREPARE → ACQUIRE (reverse index) → REASON (candidate matching) → ACT (LLM proposals) → VERIFY (interactive) → FINALIZE (apply approved).\n- If LLM is unavailable in verify: skip reporter summary, emit raw JSON drift report.\n- If LLM is unavailable in sync: emit candidate-list-only output (no patch proposals); user reviews manually.\n- If `doc-refs.json` is missing or older than 5 minutes in sync: regenerate via the extractor, then continue.\n\n### Failure and recovery\n- Extractor parse error on a single doc: skip doc + warn, continue with remaining docs.\n- lychee unavailable or URL check incomplete: print install hint, skip URL checking, continue (core check is unaffected).\n- Host-LLM context limit exceeded while drafting patches: process candidate docs in smaller batches.\n- `oma docs` CLI not found: skip with installation hint (workflow hook: skip silently).\n- `doc-refs.json` write failure: abort and report the write error; do not emit partial index.\n\n### Exit\n- Success (verify): drift report emitted; exit 0 if clean, exit 1 if broken refs found.\n- Success (sync): approved patches applied; `doc-refs.json` regenerated; session summary printed.\n- Partial success: extractor or resolver errors are explicit in the report; no silent failures.\n\n## Logical Operations\n\n### Actions\n| Action | SSL primitive | Notes |\n|--------|---------------|-------|\n| Parse CLI args and mode | `READ` | First arg selects verify or sync |\n| Extract refs from docs | `CALL_TOOL` | `extract.ts`: remark AST + L2 patterns → `doc-refs.json` |\n| Check broken refs | `RESOLVE` | `resolve.ts`: file, url, cli, script, env, config checks |\n| Build reverse index | `INFER` | `sync-propose.ts`: in-memory map from `doc-refs.json` |\n| Match diff to candidate docs | `RESOLVE` | `sync-propose.ts`: git diff + reverse lookup |\n| Redact secrets from diff | `VALIDATE` | Exclude `.env*`, `*.pem`, `*.key`, `id_rsa*`; sanitize content |\n| Detect i18n drift | `RESOLVE` | `i18n-drift.ts`: EN↔translation structural signals + severity |\n| Lint translated docs | `VALIDATE` | `lint-i18n.ts`: selected-locale CJK style plus all-locale wrong-language placeholders, report-only |\n| Generate patch proposals | `INFER` | Host LLM drafts patches from `sync-propose.ts` candidate output (no CLI LLM call) |\n| Render drift report | `RENDER` | `reporter.ts`: markdown (default), JSON (`--json`), file (`--report-file`) |\n| Apply approved patches | `WRITE` | `git apply` on user-confirmed patches only |\n| Notify hook summary | `NOTIFY` | 1-3 line stdout summary for workflow hooks |\n\n### Tools and instruments\n- `cli\u002Fcommands\u002Fdocs\u002Fextract.ts`: `remark` + `unified` markdown AST, L2 pattern extraction, escape hatch filter, `docs\u002Fgenerated\u002Fdoc-refs.json` writer.\n- `cli\u002Fcommands\u002Fdocs\u002Fresolve.ts`: case-sensitive file existence, `which` for CLI tokens, `package.json` scripts lookup, ripgrep\u002Fgit grep for env vars, `oma-config.yaml` deep-path check. URL kind is filtered out by the verify command and delegated to lychee. (Internal caching strategy: see design doc.)\n- `cli\u002Fcommands\u002Fdocs\u002Freporter.ts`: deterministic markdown + JSON renderer. **No LLM call.** Friendly summary, severity tagging, fix prioritization are the host LLM's responsibility.\n- `cli\u002Fcommands\u002Fdocs\u002Fsync-propose.ts`: git diff intake, reverse index build, secret-pattern + gitignore file exclusion. Returns candidate docs with matched refs only. **No LLM call.** Patch synthesis is the host LLM's responsibility.\n- `cli\u002Fcommands\u002Fdocs\u002Fi18n-drift.ts`: pairs `web\u002Fdocs` English sources with `web\u002Fi18n\u002F{lang}\u002F...` translations, emits line\u002Fheading\u002Frecency drift signals with severity. **No LLM call.** Translation patching is `oma-translation`'s responsibility.\n- `cli\u002Fcommands\u002Fdocs\u002Flint-i18n.ts`: content-level linter with `cjk-em-dash` for selected CJK locales and `wrong-language` placeholder detection across all locales. **No LLM call, no auto-fix.** Restructuring is the host LLM's responsibility via `oma-translation`.\n- External: [`lychee`](https:\u002F\u002Fgithub.com\u002Flycheeverse\u002Flychee) (background URL link checking; install via `brew install lychee`).\n\n### Host-LLM contract\n\nThis skill follows the OMA pattern (mirroring `oma-scholar`): **the CLI emits structured data; the host LLM (the agent runtime that invoked the skill) does any natural-language synthesis or judgment.**\n\nAfter `oma docs verify --json`:\n1. Read the JSON drift report.\n2. Group findings by severity \u002F urgency (host-LLM judgment).\n3. Suggest fixes per finding, prioritizing files most central to the project.\n4. If the user asks for natural-language summary, host LLM produces it from the JSON, never from cached prose.\n\nAfter `oma docs sync \u003Crange> --json`:\n1. Read the candidate doc list (each entry: `{ doc, changedFiles, matchedRefs }`).\n2. For each candidate doc: read the doc itself, read `git diff` for `changedFiles`, draft a unified-diff patch reflecting the code change.\n3. Present patches to the user for review. **Never auto-apply.**\n4. On user approval, apply via `git apply` or by writing the doc directly.\n\nAfter `oma docs i18n --json`:\n1. Read the drift pairs (severity, line\u002Fheading diff, EN-newer flag per translation).\n2. Prioritize CRITICAL\u002FHIGH pairs; pass each to `oma-translation` in diff-sync mode (see that skill's § Diff-Sync Mode).\n3. Never bulk-retranslate; patch only the drifted sections, with user confirmation.\n\nAfter `oma docs lint --json`:\n1. Read the style issues grouped by rule \u002F language \u002F file.\n2. Restructure flagged sentences via `oma-translation` (e.g. § Stage 4-A em-dash rule); confirm edits with the user before writing.\n\n### Canonical command path\n\n**verify mode** runs a drift check against the current codebase:\n\n```bash\n# Default: scan all repo markdown (**\u002F*.md, gitignored files excluded),\n# render markdown to stdout.\n# URL link checking is delegated to lychee in the background\n# (install: `brew install lychee`). Core check ~8s on a 1k-doc repo.\noma docs verify\n\n# Narrow to a path or glob (uses minimatch)\noma docs verify \"docs\u002F**\u002F*.md\"\noma docs verify cli\u002FREADME.md\n\n# Machine-readable output for CI \u002F hooks\noma docs verify --json\n\n# Persist full markdown report to a file (works alongside --json too)\noma docs verify --report-file .\u002Fdrift-report.md\n\n# Skip URL checking entirely (when lychee is run separately, or as a\n# one-off override of docs.check_urls=true in oma-config.yaml)\noma docs verify --no-urls\n\n# Block until lychee finishes (CI scenarios needing complete URL data)\noma docs verify --urls-sync\n\n# Exit code: 0 = clean, 1 = broken refs found in core check.\n# URL drift, if any, is reported separately at docs\u002Fgenerated\u002Furl-drift.json\n# and does NOT affect this exit code.\n```\n\n**sync mode** proposes patches for docs affected by a git diff (always interactive, never auto-applies):\n\n```bash\n# Default: staged changes (--cached), fallback HEAD~1..HEAD\noma docs sync\n\n# Explicit range\noma docs sync HEAD~5..HEAD\noma docs sync main..feature-branch\n\n# The CLI emits the candidate-doc list; the host LLM drafts patches and\n# confirms per doc ([y] apply \u002F [n] skip \u002F [d] diff \u002F [s] full proposal).\n# Sync regenerates docs\u002Fgenerated\u002Fdoc-refs.json after applying any patches.\n```\n\n**i18n mode** detects structural drift between English source docs (`web\u002Fdocs`) and translations (`web\u002Fi18n\u002F{lang}\u002F...`); report-only, never edits translations:\n\n```bash\n# Default: severity ≥ MEDIUM, markdown summary to stdout\noma docs i18n\n\n# Machine-readable, custom threshold\noma docs i18n --json --min-severity HIGH\n\n# Output: per-pair drift signals (line\u002Fheading diff, EN-newer flag).\n# Hand CRITICAL\u002FHIGH pairs to `oma-translation` diff-sync mode.\n```\n\n**lint mode** checks translated docs for content-level style anti-patterns (report-only, no auto-fix):\n\n```bash\n# Default CJK locales: ko,ja,zh\noma docs lint\noma docs lint --json --locales ko,ja\n```\n\n**Workflow hook (opt-in)** runs verify automatically at workflow completion when `docs.auto_verify: true` in `oma-config.yaml`:\n\n```bash\n# Hook command emitted by \u002Fscm, \u002Fwork, \u002Fultrawork\noma docs verify --json\n# Hook policy: warn-only in v1; non-zero exit does NOT block workflow completion\n```\n\n### Resource scope\n| Scope | Resource target |\n|-------|-----------------|\n| `LOCAL_FS` read | repo markdown `**\u002F*.md` (extractor input), `docs\u002Fgenerated\u002Fdoc-refs.json` (index), `web\u002Fdocs` + `web\u002Fi18n\u002F**` (i18n\u002Flint), `.env.example`, `package.json`, `.agents\u002Foma-config.yaml` |\n| `LOCAL_FS` write | `docs\u002Fgenerated\u002Fdoc-refs.json` (regenerated each verify run), approved sync patches |\n| `CODEBASE` read-only | Existence checks for file\u002Fcli\u002Fscript\u002Fenv\u002Fconfig refs; git diff intake |\n| `PROCESS` | `git diff`, `git apply`, `which`, background `lychee` spawn |\n| `NETWORK` | URL checking delegated to `lychee` (no internal HEAD fallback; see Guardrail 6) |\n\n### Preconditions\n- Markdown files exist in the repo; `docs\u002Fgenerated\u002F` is created on demand for the index.\n- `cli\u002Fcommands\u002Fdocs\u002F` is built and `oma` binary is on PATH (or invoked directly via `bun run`).\n- For sync mode: a git diff is available (`--cached` stage or recent commits).\n- For i18n \u002F lint modes: `web\u002Fdocs` (EN source) and `web\u002Fi18n\u002F{lang}` trees exist.\n\n### Effects and side effects\n- verify: regenerates `docs\u002Fgenerated\u002Fdoc-refs.json` (always overwrites).\n- sync: modifies docs files only on user approval; regenerates `doc-refs.json` after applies.\n- i18n \u002F lint: stdout report only; no file writes.\n- All modes: stdout output (summary or full report).\n- No `.agents\u002F` definition files are ever modified (run outputs under `.agents\u002Fresults\u002F` and `.agents\u002Fstate\u002F` are not definitions).\n\n### Guardrails\n\n1. **Never modify `.agents\u002F` definitions**: CLAUDE.md SSOT protection covers skills, workflows, rules, agents, and config, in all modes. Generated artifacts under `.agents\u002Fresults\u002F` and `.agents\u002Fstate\u002F` are not SSOT and must not be deleted to \"restore\" protection.\n2. **Never auto-apply sync patches**: sync is always interactive; `[y]` confirm required per doc.\n3. **LLM unavailable → graceful degradation**: verify falls back to raw JSON; sync falls back to candidate-list-only (no proposals). Neither mode blocks on LLM availability.\n4. **Response language follows `oma-config.yaml` `language`**: user-facing report text is localized; code, paths, JSON keys, and CLI commands stay in English.\n5. **Secret-bearing files excluded from sync output**: `.env*`, `*.pem`, `*.key`, `id_rsa*`, and gitignored files never appear in candidate `changedFiles` lists. Host LLM never sees secret file paths.\n6. **URL link checking delegated to lychee**: when `docs.check_urls=true` (default), URL refs are checked by `lychee` running in the background; results land in `docs\u002Fgenerated\u002Furl-drift.json`. If `lychee` is missing, an install hint is printed and URL checking is skipped (no internal HEAD fallback).\n7. **No direct LLM API calls from the CLI**: the CLI never imports vendor SDKs, never reads API keys, never makes outbound LLM requests. All synthesis, patch drafting, and natural-language framing is the host LLM's responsibility (mirrors `oma-scholar`'s pattern). This makes `oma-docs` vendor-agnostic: works identically under Claude Code \u002F Codex \u002F Gemini \u002F Qwen \u002F Antigravity.\n8. **Hook is warn-only in v1**: broken refs never block workflow completion; `docs.auto_verify: false` by default (explicit opt-in required).\n9. **Escape hatch respected**: `\u003C!-- oma-docs:ignore-start -->` \u002F `\u003C!-- oma-docs:ignore-end -->` blocks and frontmatter `oma-docs: skip` are honored; no ref extraction from ignored regions. Use this for illustrative example paths in tutorials (hypothetical project files in inline code) that intentionally do not resolve.\n10. **Gitignored targets are generated, not broken**: a `file` ref whose target does not exist but matches the project's gitignore rules (`git check-ignore`) is classified as `skipped` (a documented runtime\u002Fgenerated output such as `.agents\u002Fresults\u002Fresult-*.md`, `.agents\u002Fstate\u002Fmemories\u002F*`, `.serena\u002Fmemories\u002F*`, `.agents\u002Fstate\u002F*.json`), never as `broken`. gitignore is the single source of truth for \"produced at runtime\" — gitignore an output path and it stops being flagged. The `skipped` count is surfaced (markdown summary + JSON `skippedCount`) so nothing is silently dropped.\n11. **Non-prose trees excluded via `docs.exclude`**: committed-but-non-prose markdown (benchmark run artifacts, translation mirrors validated separately by `oma docs i18n`) is dropped from the scan by the `docs.exclude` globs rather than producing unactionable broken refs. An explicit single-file path argument bypasses `docs.exclude`.\n12. **i18n \u002F lint modes never write**: both emit reports only. Translation patches go through `oma-translation` with per-file user confirmation; the CLI never edits translations.\n\n### v1 scope note\nv1 covers `verify`, `sync` (broken-only classification, L2 ref extraction), `i18n` (structural translation drift), and `lint` (CJK style anti-patterns). The following are explicitly deferred to v2: `create` mode (generate missing docs), semantic (content-level) translation drift, L3 symbol-level extraction (Tree-sitter\u002FLSP), GitHub Action wrapper, `block` hook mode.\n\n## References\n- Design doc: `docs\u002Fplans\u002Fdesigns\u002F008-oma-docs.md` (full architecture, schema spec, decision log, edge cases).\n- Schema spec: `doc-refs.json` v1 schema defined in design doc § doc-refs.json Schema.\n- Workflow hook integration: design doc § Workflow Hook Integration.\n- Migration: `deepinit` Step 6 retirement, design doc § Migration: deepinit Step 6.\n- Adjacent skills: `oma-translation` (v2 multilingual), `oma-skill-creation` (SSL-lite validation).\n","# oma-docs - Documentation Drift Detector\n\n## Scheduling\n\n### Goal\nDetect broken references in repo markdown — default glob `**\u002F*.md` (verify mode), propose LLM-generated patch proposals for docs affected by recent code changes (sync mode), detect structural drift between English source docs and their translations (i18n mode), and lint translated docs for CJK style anti-patterns (lint mode). All modes run on-demand; sync is always interactive.\n\n### Intent signature\n- User asks to check if docs are up to date, find broken doc links, verify file paths referenced in docs, or detect documentation drift.\n- User asks to update docs after a code change, propose doc patches for a git diff, or sync affected docs.\n- User asks whether translations are stale, which i18n docs drifted from the English source, or to lint translated docs for style issues (em-dashes in CJK targets, etc.).\n- A workflow hook checks `docs.auto_verify: true` and runs `oma docs verify --json` at completion.\n\n### When to use\n- After a refactor, rename, or file deletion, to find stale references in docs.\n- Before a release, to confirm that CLI commands, file paths, and config keys in docs still exist.\n- After a significant git diff, to discover which docs reference the changed files and may need updating.\n- After updating English source docs (`web\u002Fdocs`), to find translations (`web\u002Fi18n\u002F{lang}\u002F...`) that drifted or went missing.\n- Before a docs release, to lint CJK translations for content-level anti-patterns.\n- Routine drift check on any docs-heavy repo.\n\n### When NOT to use\n- Generating docs from scratch for undocumented features → v2 create mode.\n- Actually translating or restructuring docs → use `oma-translation` (`oma docs i18n` \u002F `oma docs lint` only detect; they never edit translations).\n- Symbol-level semantic drift (function signature changes not reflected in prose) → v2 L3 mode.\n- CI-blocking enforcement → v2 block mode (v1 is warn-only).\n- Explaining a code change as an educational document → use `oma-explanation` (this skill detects drift; it does not author explainers).\n\n### Expected inputs\n\n**verify mode**: Optional glob path (default `**\u002F*.md`), optional `--json` flag, optional `--report-file \u003Cpath>`.\n\n**sync mode**: Optional git diff range (default `--cached`, fallback `HEAD~1..HEAD`).\n\n**i18n mode**: Optional `--min-severity \u003CCRITICAL|HIGH|MEDIUM|LOW>` (default `MEDIUM`), optional `--json`.\n\n**lint mode**: Optional `--locales \u003Clist>` (comma-separated CJK locales for the `cjk-em-dash` rule, default `ko,ja,zh`), optional `--json`. The default `wrong-language` rule always scans every locale under `web\u002Fi18n\u002F` and is not narrowed by `--locales`.\n\n### Expected outputs\n\n**verify mode**:\n- Markdown drift report to stdout (default), or raw JSON with `--json`, or full markdown written to file with `--report-file`.\n- Exit code 0 if clean, 1 if any broken refs found.\n\n**sync mode**:\n- Per-doc patch proposals drafted by the host LLM from the CLI's candidate-doc list, confirmed per doc (`[y] apply [n] skip [d] diff [s] full proposal` style).\n- Docs modified only on explicit user approval; `doc-refs.json` regenerated after applies.\n\n**i18n mode**:\n- Per-pair structural drift signals (line count, heading count, EN-newer recency flag) with severity, as markdown summary or `--json`. Report-only: drifting pairs are handed to `oma-translation` in diff-sync mode.\n\n**lint mode**:\n- Style issues grouped by rule \u002F language \u002F file, as markdown summary or `--json`. Report-only: restructuring goes through `oma-translation`.\n\n### Dependencies\n- `cli\u002Fcommands\u002Fdocs\u002Fextract.ts`: markdown AST + L2 pattern extractor.\n- `cli\u002Fcommands\u002Fdocs\u002Fresolve.ts`: deterministic broken-ref checker.\n- `cli\u002Fcommands\u002Fdocs\u002Freporter.ts`: deterministic markdown\u002FJSON report renderer (no LLM call; host LLM does narrative synthesis).\n- `cli\u002Fcommands\u002Fdocs\u002Fsync-propose.ts`: git diff intake, reverse lookup, candidate-doc selector with secret redaction (no LLM call; host LLM drafts patches).\n- `cli\u002Fcommands\u002Fdocs\u002Fi18n-drift.ts`: EN↔translation structural drift detector (line\u002Fheading counts, last-commit recency; no LLM call).\n- `cli\u002Fcommands\u002Fdocs\u002Flint-i18n.ts`: translated-doc linter for selected-locale CJK em-dash style and all-locale wrong-language placeholders (no LLM call, no auto-fix).\n- `docs\u002Fgenerated\u002Fdoc-refs.json`: single-direction reference index, regenerated on every verify run. Gitignored — the CLI force-adds `docs\u002Fgenerated\u002F` to `.gitignore` so generated artifacts are never committed.\n- `docs\u002Fgenerated\u002Furl-drift.json`: lychee-produced URL drift report (written by background lychee spawn; gitignored under the same `docs\u002Fgenerated\u002F` rule).\n- `lychee`: external Rust tool for URL link checking. Detected on PATH; install via `brew install lychee` or see https:\u002F\u002Fgithub.com\u002Flycheeverse\u002Flychee#installation. Optional but recommended.\n- `.agents\u002Foma-config.yaml`: `docs.auto_verify` (workflow hook opt-in), `docs.check_urls` (URL checking on\u002Foff, default true), and `docs.exclude` (glob list of markdown trees the walker must not scan — benchmark artifacts, translation mirrors, etc.; default `[]`) toggles.\n\n### Control-flow features\n- Mode is selected from the first argument: `verify`, `sync`, `i18n`, or `lint`.\n- verify: extract → resolve → report (fully deterministic CLI; host LLM adds narrative summary on top of the JSON\u002Fmarkdown output).\n- sync: git diff → reverse lookup → candidate list (CLI) → host-LLM patch proposals → interactive accept\u002Freject.\n- i18n \u002F lint: fully deterministic CLI reports; host LLM routes drifting pairs \u002F style issues to `oma-translation`.\n- Branches on `--json`, `--report-file`, LLM availability, and network reachability.\n- Never blocks workflow completion in v1 (warn-only hook policy).\n\n## Structural Flow\n\n### Entry\n1. Read first argument to select mode (`verify` | `sync` | `i18n` | `lint`). If absent, print help and exit.\n2. Load `oma-config.yaml` to check `docs.auto_verify` when invoked from a workflow hook.\n3. Confirm required CLI dependencies (`oma docs verify`, `oma docs sync`) are on PATH.\n\n### Scenes\n1. **PREPARE**: Determine mode, resolve path\u002Fdiff-range arguments, confirm tool availability.\n2. **ACQUIRE**: Run extractor (`extract.ts`) to regenerate `doc-refs.json` from repo markdown (`**\u002F*.md`, verify) or build in-memory reverse index from `doc-refs.json` (sync; a cached index newer than 5 minutes is reused, otherwise regenerated).\n3. **REASON**: Resolve each reference deterministically (verify) or correlate changed files to candidate docs via reverse lookup (sync).\n4. **ACT**: Render the deterministic drift report (verify) or list candidate docs with matched refs (sync). Host LLM does any natural-language synthesis or patch drafting on top of this output.\n5. **VERIFY**: Confirm output shape is valid (JSON schema check for `--json`; structured candidate list for sync).\n6. **FINALIZE**: Print to stdout, write report file if requested, emit exit code.\n\n### Transitions\n- verify mode: PREPARE → ACQUIRE (extract) → REASON (resolve) → ACT (report) → FINALIZE.\n- sync mode: PREPARE → ACQUIRE (reverse index) → REASON (candidate matching) → ACT (LLM proposals) → VERIFY (interactive) → FINALIZE (apply approved).\n- If LLM is unavailable in verify: skip reporter summary, emit raw JSON drift report.\n- If LLM is unavailable in sync: emit candidate-list-only output (no patch proposals); user reviews manually.\n- If `doc-refs.json` is missing or older than 5 minutes in sync: regenerate via the extractor, then continue.\n\n### Failure and recovery\n- Extractor parse error on a single doc: skip doc + warn, continue with remaining docs.\n- lychee unavailable or URL check incomplete: print install hint, skip URL checking, continue (core check is unaffected).\n- Host-LLM context limit exceeded while drafting patches: process candidate docs in smaller batches.\n- `oma docs` CLI not found: skip with installation hint (workflow hook: skip silently).\n- `doc-refs.json` write failure: abort and report the write error; do not emit partial index.\n\n### Exit\n- Success (verify): drift report emitted; exit 0 if clean, exit 1 if broken refs found.\n- Success (sync): approved patches applied; `doc-refs.json` regenerated; session summary printed.\n- Partial success: extractor or resolver errors are explicit in the report; no silent failures.\n\n## Logical Operations\n\n### Actions\n| Action | SSL primitive | Notes |\n|--------|---------------|-------|\n| Parse CLI args and mode | `READ` | First arg selects verify or sync |\n| Extract refs from docs | `CALL_TOOL` | `extract.ts`: remark AST + L2 patterns → `doc-refs.json` |\n| Check broken refs | `RESOLVE` | `resolve.ts`: file, url, cli, script, env, config checks |\n| Build reverse index | `INFER` | `sync-propose.ts`: in-memory map from `doc-refs.json` |\n| Match diff to candidate docs | `RESOLVE` | `sync-propose.ts`: git diff + reverse lookup |\n| Redact secrets from diff | `VALIDATE` | Exclude `.env*`, `*.pem`, `*.key`, `id_rsa*`; sanitize content |\n| Detect i18n drift | `RESOLVE` | `i18n-drift.ts`: EN↔translation structural signals + severity |\n| Lint translated docs | `VALIDATE` | `lint-i18n.ts`: selected-locale CJK style plus all-locale wrong-language placeholders, report-only |\n| Generate patch proposals | `INFER` | Host LLM drafts patches from `sync-propose.ts` candidate output (no CLI LLM call) |\n| Render drift report | `RENDER` | `reporter.ts`: markdown (default), JSON (`--json`), file (`--report-file`) |\n| Apply approved patches | `WRITE` | `git apply` on user-confirmed patches only |\n| Notify hook summary | `NOTIFY` | 1-3 line stdout summary for workflow hooks |\n\n### Tools and instruments\n- `cli\u002Fcommands\u002Fdocs\u002Fextract.ts`: `remark` + `unified` markdown AST, L2 pattern extraction, escape hatch filter, `docs\u002Fgenerated\u002Fdoc-refs.json` writer.\n- `cli\u002Fcommands\u002Fdocs\u002Fresolve.ts`: case-sensitive file existence, `which` for CLI tokens, `package.json` scripts lookup, ripgrep\u002Fgit grep for env vars, `oma-config.yaml` deep-path check. URL kind is filtered out by the verify command and delegated to lychee. (Internal caching strategy: see design doc.)\n- `cli\u002Fcommands\u002Fdocs\u002Freporter.ts`: deterministic markdown + JSON renderer. **No LLM call.** Friendly summary, severity tagging, fix prioritization are the host LLM's responsibility.\n- `cli\u002Fcommands\u002Fdocs\u002Fsync-propose.ts`: git diff intake, reverse index build, secret-pattern + gitignore file exclusion. Returns candidate docs with matched refs only. **No LLM call.** Patch synthesis is the host LLM's responsibility.\n- `cli\u002Fcommands\u002Fdocs\u002Fi18n-drift.ts`: pairs `web\u002Fdocs` English sources with `web\u002Fi18n\u002F{lang}\u002F...` translations, emits line\u002Fheading\u002Frecency drift signals with severity. **No LLM call.** Translation patching is `oma-translation`'s responsibility.\n- `cli\u002Fcommands\u002Fdocs\u002Flint-i18n.ts`: content-level linter with `cjk-em-dash` for selected CJK locales and `wrong-language` placeholder detection across all locales. **No LLM call, no auto-fix.** Restructuring is the host LLM's responsibility via `oma-translation`.\n- External: [`lychee`](https:\u002F\u002Fgithub.com\u002Flycheeverse\u002Flychee) (background URL link checking; install via `brew install lychee`).\n\n### Host-LLM contract\n\nThis skill follows the OMA pattern (mirroring `oma-scholar`): **the CLI emits structured data; the host LLM (the agent runtime that invoked the skill) does any natural-language synthesis or judgment.**\n\nAfter `oma docs verify --json`:\n1. Read the JSON drift report.\n2. Group findings by severity \u002F urgency (host-LLM judgment).\n3. Suggest fixes per finding, prioritizing files most central to the project.\n4. If the user asks for natural-language summary, host LLM produces it from the JSON, never from cached prose.\n\nAfter `oma docs sync \u003Crange> --json`:\n1. Read the candidate doc list (each entry: `{ doc, changedFiles, matchedRefs }`).\n2. For each candidate doc: read the doc itself, read `git diff` for `changedFiles`, draft a unified-diff patch reflecting the code change.\n3. Present patches to the user for review. **Never auto-apply.**\n4. On user approval, apply via `git apply` or by writing the doc directly.\n\nAfter `oma docs i18n --json`:\n1. Read the drift pairs (severity, line\u002Fheading diff, EN-newer flag per translation).\n2. Prioritize CRITICAL\u002FHIGH pairs; pass each to `oma-translation` in diff-sync mode (see that skill's § Diff-Sync Mode).\n3. Never bulk-retranslate; patch only the drifted sections, with user confirmation.\n\nAfter `oma docs lint --json`:\n1. Read the style issues grouped by rule \u002F language \u002F file.\n2. Restructure flagged sentences via `oma-translation` (e.g. § Stage 4-A em-dash rule); confirm edits with the user before writing.\n\n### Canonical command path\n\n**verify mode** runs a drift check against the current codebase:\n\n```bash\n# Default: scan all repo markdown (**\u002F*.md, gitignored files excluded),\n# render markdown to stdout.\n# URL link checking is delegated to lychee in the background\n# (install: `brew install lychee`). Core check ~8s on a 1k-doc repo.\noma docs verify\n\n# Narrow to a path or glob (uses minimatch)\noma docs verify \"docs\u002F**\u002F*.md\"\noma docs verify cli\u002FREADME.md\n\n# Machine-readable output for CI \u002F hooks\noma docs verify --json\n\n# Persist full markdown report to a file (works alongside --json too)\noma docs verify --report-file .\u002Fdrift-report.md\n\n# Skip URL checking entirely (when lychee is run separately, or as a\n# one-off override of docs.check_urls=true in oma-config.yaml)\noma docs verify --no-urls\n\n# Block until lychee finishes (CI scenarios needing complete URL data)\noma docs verify --urls-sync\n\n# Exit code: 0 = clean, 1 = broken refs found in core check.\n# URL drift, if any, is reported separately at docs\u002Fgenerated\u002Furl-drift.json\n# and does NOT affect this exit code.\n```\n\n**sync mode** proposes patches for docs affected by a git diff (always interactive, never auto-applies):\n\n```bash\n# Default: staged changes (--cached), fallback HEAD~1..HEAD\noma docs sync\n\n# Explicit range\noma docs sync HEAD~5..HEAD\noma docs sync main..feature-branch\n\n# The CLI emits the candidate-doc list; the host LLM drafts patches and\n# confirms per doc ([y] apply \u002F [n] skip \u002F [d] diff \u002F [s] full proposal).\n# Sync regenerates docs\u002Fgenerated\u002Fdoc-refs.json after applying any patches.\n```\n\n**i18n mode** detects structural drift between English source docs (`web\u002Fdocs`) and translations (`web\u002Fi18n\u002F{lang}\u002F...`); report-only, never edits translations:\n\n```bash\n# Default: severity ≥ MEDIUM, markdown summary to stdout\noma docs i18n\n\n# Machine-readable, custom threshold\noma docs i18n --json --min-severity HIGH\n\n# Output: per-pair drift signals (line\u002Fheading diff, EN-newer flag).\n# Hand CRITICAL\u002FHIGH pairs to `oma-translation` diff-sync mode.\n```\n\n**lint mode** checks translated docs for content-level style anti-patterns (report-only, no auto-fix):\n\n```bash\n# Default CJK locales: ko,ja,zh\noma docs lint\noma docs lint --json --locales ko,ja\n```\n\n**Workflow hook (opt-in)** runs verify automatically at workflow completion when `docs.auto_verify: true` in `oma-config.yaml`:\n\n```bash\n# Hook command emitted by \u002Fscm, \u002Fwork, \u002Fultrawork\noma docs verify --json\n# Hook policy: warn-only in v1; non-zero exit does NOT block workflow completion\n```\n\n### Resource scope\n| Scope | Resource target |\n|-------|-----------------|\n| `LOCAL_FS` read | repo markdown `**\u002F*.md` (extractor input), `docs\u002Fgenerated\u002Fdoc-refs.json` (index), `web\u002Fdocs` + `web\u002Fi18n\u002F**` (i18n\u002Flint), `.env.example`, `package.json`, `.agents\u002Foma-config.yaml` |\n| `LOCAL_FS` write | `docs\u002Fgenerated\u002Fdoc-refs.json` (regenerated each verify run), approved sync patches |\n| `CODEBASE` read-only | Existence checks for file\u002Fcli\u002Fscript\u002Fenv\u002Fconfig refs; git diff intake |\n| `PROCESS` | `git diff`, `git apply`, `which`, background `lychee` spawn |\n| `NETWORK` | URL checking delegated to `lychee` (no internal HEAD fallback; see Guardrail 6) |\n\n### Preconditions\n- Markdown files exist in the repo; `docs\u002Fgenerated\u002F` is created on demand for the index.\n- `cli\u002Fcommands\u002Fdocs\u002F` is built and `oma` binary is on PATH (or invoked directly via `bun run`).\n- For sync mode: a git diff is available (`--cached` stage or recent commits).\n- For i18n \u002F lint modes: `web\u002Fdocs` (EN source) and `web\u002Fi18n\u002F{lang}` trees exist.\n\n### Effects and side effects\n- verify: regenerates `docs\u002Fgenerated\u002Fdoc-refs.json` (always overwrites).\n- sync: modifies docs files only on user approval; regenerates `doc-refs.json` after applies.\n- i18n \u002F lint: stdout report only; no file writes.\n- All modes: stdout output (summary or full report).\n- No `.agents\u002F` definition files are ever modified (run outputs under `.agents\u002Fresults\u002F` and `.agents\u002Fstate\u002F` are not definitions).\n\n### Guardrails\n\n1. **Never modify `.agents\u002F` definitions**: CLAUDE.md SSOT protection covers skills, workflows, rules, agents, and config, in all modes. Generated artifacts under `.agents\u002Fresults\u002F` and `.agents\u002Fstate\u002F` are not SSOT and must not be deleted to \"restore\" protection.\n2. **Never auto-apply sync patches**: sync is always interactive; `[y]` confirm required per doc.\n3. **LLM unavailable → graceful degradation**: verify falls back to raw JSON; sync falls back to candidate-list-only (no proposals). Neither mode blocks on LLM availability.\n4. **Response language follows `oma-config.yaml` `language`**: user-facing report text is localized; code, paths, JSON keys, and CLI commands stay in English.\n5. **Secret-bearing files excluded from sync output**: `.env*`, `*.pem`, `*.key`, `id_rsa*`, and gitignored files never appear in candidate `changedFiles` lists. Host LLM never sees secret file paths.\n6. **URL link checking delegated to lychee**: when `docs.check_urls=true` (default), URL refs are checked by `lychee` running in the background; results land in `docs\u002Fgenerated\u002Furl-drift.json`. If `lychee` is missing, an install hint is printed and URL checking is skipped (no internal HEAD fallback).\n7. **No direct LLM API calls from the CLI**: the CLI never imports vendor SDKs, never reads API keys, never makes outbound LLM requests. All synthesis, patch drafting, and natural-language framing is the host LLM's responsibility (mirrors `oma-scholar`'s pattern). This makes `oma-docs` vendor-agnostic: works identically under Claude Code \u002F Codex \u002F Gemini \u002F Qwen \u002F Antigravity.\n8. **Hook is warn-only in v1**: broken refs never block workflow completion; `docs.auto_verify: false` by default (explicit opt-in required).\n9. **Escape hatch respected**: `\u003C!-- oma-docs:ignore-start -->` \u002F `\u003C!-- oma-docs:ignore-end -->` blocks and frontmatter `oma-docs: skip` are honored; no ref extraction from ignored regions. Use this for illustrative example paths in tutorials (hypothetical project files in inline code) that intentionally do not resolve.\n10. **Gitignored targets are generated, not broken**: a `file` ref whose target does not exist but matches the project's gitignore rules (`git check-ignore`) is classified as `skipped` (a documented runtime\u002Fgenerated output such as `.agents\u002Fresults\u002Fresult-*.md`, `.agents\u002Fstate\u002Fmemories\u002F*`, `.serena\u002Fmemories\u002F*`, `.agents\u002Fstate\u002F*.json`), never as `broken`. gitignore is the single source of truth for \"produced at runtime\" — gitignore an output path and it stops being flagged. The `skipped` count is surfaced (markdown summary + JSON `skippedCount`) so nothing is silently dropped.\n11. **Non-prose trees excluded via `docs.exclude`**: committed-but-non-prose markdown (benchmark run artifacts, translation mirrors validated separately by `oma docs i18n`) is dropped from the scan by the `docs.exclude` globs rather than producing unactionable broken refs. An explicit single-file path argument bypasses `docs.exclude`.\n12. **i18n \u002F lint modes never write**: both emit reports only. Translation patches go through `oma-translation` with per-file user confirmation; the CLI never edits translations.\n\n### v1 scope note\nv1 covers `verify`, `sync` (broken-only classification, L2 ref extraction), `i18n` (structural translation drift), and `lint` (CJK style anti-patterns). The following are explicitly deferred to v2: `create` mode (generate missing docs), semantic (content-level) translation drift, L3 symbol-level extraction (Tree-sitter\u002FLSP), GitHub Action wrapper, `block` hook mode.\n\n## References\n- Design doc: `docs\u002Fplans\u002Fdesigns\u002F008-oma-docs.md` (full architecture, schema spec, decision log, edge cases).\n- Schema spec: `doc-refs.json` v1 schema defined in design doc § doc-refs.json Schema.\n- Workflow hook integration: design doc § Workflow Hook Integration.\n- Migration: `deepinit` Step 6 retirement, design doc § Migration: deepinit Step 6.\n- Adjacent skills: `oma-translation` (v2 multilingual), `oma-skill-creation` (SSL-lite validation).\n",{"name":5,"description":7},"master","5fab8004af1390aa17b3447f2780766c8bf2482c",".agents\u002Fskills\u002Foma-docs",0,"https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate","https:\u002F\u002Fgithub.com\u002Fvasceannie","thingswithstuff.io","2026-11-12 20:22:46",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add vasceannie\u002Fslopgate --skill oma-docs",{"tool":58,"command":59},"bunx","bunx skills add vasceannie\u002Fslopgate --skill oma-docs",{"tool":61,"command":62},"pnpm","pnpm dlx skills add vasceannie\u002Fslopgate --skill oma-docs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Foma-docs\u002FSKILL.md",true,[],[67,93,114,136,158,177],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":39},"01M71951JDWCYMS8GDC2C7395D","type-strictness","Enforce strict type compliance by eliminating `Any` types and `# type: ignore` comments. Use when:\n(1) Editing code that contains `Any` as a type annotation\n(2) Code has `# type: ignore` or `# pyright: ignore` comments\n(3) User requests type fixes or type strictness enforcement\n(4) Importing from untyped third-party libraries\n(5) User asks to \"fix types\", \"remove Any\", or \"add proper typing\"\n(6) Pyrefly or mypy reports type errors that need resolution\n(7) Code review reveals weak typing patterns\nFollows hierarchical resolution: codebase inference → type stubs → library inspection → type guards → casting (last resort).","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002Fbundle\u002Fshared\u002Fskills\u002Ftype-strictness\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,33,84,85,86,87,88,89,90,91,92],"type","type strictness","typing","types","remove","code review","fix","errors","inspection","when","review","reports","libraries","casting","pyrefly","mypy","pyright","library","patterns",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":39},"01M7194XGBQXSE7Y5BZ4K5CSTK","slopgate-test-extender","Extend Python test suites with parametrization, fixture reuse, and quality enforcement. Use when asked to add tests, extend existing tests, improve test coverage, consolidate duplicate tests, fix test quality issues, or when Slopgate reports untested-production-code, missing test references, or coverage gaps. Triggers on requests like \"add tests for X\", \"extend these tests\", \"parametrize tests\", \"consolidate tests\", \"fix test quality\", \"improve test coverage\", \"write tests for this function\", \"test this module\", \"behavior tests\", \"integration tests\", \"missing tests\", \"coverage holes\", \"untested code\", or when a hook denies with test-related findings.","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002Fbundle\u002Fshared\u002Fskills\u002Fslopgate-test-extender\u002FSKILL.md",[],[100,101,102,103,104,80,36,105,106,107,108,109,83,33,110,111,85,31,112,113],"slopgate test extender","test","coverage","fixture","testing","write tests","improve","only","cleanup","loop","candidate","consolidate","opencode","orchestrator",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":39},"01M7194RMVQS5YJJ4ZEFXX20VS","slopgate-intelligent-coding-patterns","Pattern-selection playbook for agents editing code with complex branching, stateful parsers\u002Fworkflows, duplicated skeletons, policy checks, or ordered transforms. Load before refactoring if\u002Felif dispatch chains, boolean-flag state machines, repeated validation predicates, parallel provider\u002Flanguage implementations, or regex\u002Fcontent transformation pipelines. Also load when asked to \"apply a design pattern\", \"which pattern should I use here\", \"refactor this switch statement\", \"replace if-elif chain\", \"state machine pattern\", \"strategy pattern\", \"template method\", \"pipeline pattern\", \"specification pattern\", \"dispatch table\", \"guard clause refactor\", \"reduce cyclomatic complexity\", or when Slopgate fires PY-CODE-014, PY-CODE-017, PY-CODE-018, QUALITY-LINT-001, or PY-QUALITY-010. Use with behavior-locking tests and avoid pattern theater for simple one-off code.","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002Fbundle\u002Fshared\u002Fskills\u002Fslopgate-intelligent-coding-patterns\u002FSKILL.md",[],[121,122,92,123,124,125,126,127,128,129,130,131,132,107,108,133,134,83,135,33],"coding patterns","slopgate intelligent coding patterns","coding","stateful","complexity","branch","which","chain","parsers","pipeline","selection","design","utility","workflows","reduce",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":39},"01M7194KTXBM85GB0W7JKFQD55","slopgate-hygiene-orchestrator","Orchestrate systematic elimination of linter warnings and errors across Python, TypeScript, and Rust codebases. Use when asked to \"clean up lints\", \"fix all warnings\", \"run hygiene\", \"eliminate type errors\", \"orchestrate code quality fixes\", \"fix lint errors\", \"resolve quality gate failures\", \"pass CI checks\", \"reduce tech debt\", \"refactor to pass hooks\", or when a Slopgate hook denies with QUALITY-LINT-001, PY-CODE-017, PY-CODE-018, or any collector finding. This skill coordinates multiple code-hygiene-enforcer agents working in parallel on non-conflicting file groupings, tracks progress persistently via JSON exports, and loops until all issues are resolved. CRITICAL: Never run linters directly—always use `slopgate lint check` as the primary gate, discover project-specific tools from config files, and export findings to JSON for tracking.","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002Fbundle\u002Fshared\u002Fskills\u002Fslopgate-hygiene-orchestrator\u002FSKILL.md",[],[143,144,113,145,80,146,147,148,149,150,108,135,151,152,153,26,154,155,156,157],"slopgate hygiene orchestrator","hygiene","project","ci","local","clean","never run","files","run","lint check","systematic","typescript","debt","quality-gates","hook",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":39},"01M7194G50FZYXXT8VNK360RPA","slopgate-code-smell-utility-locator","Autoactivate when code-smell hooks or reviews mention feature envy, thin wrappers, duplicate helpers, duplicate code,\nscattered helpers, builders\u002Ffactories\u002Fconfig\u002Fconstants\u002Fdataclass reuse, PY-CODE-012, PY-CODE-013, QUALITY-LINT-001,\nor repeated slopgate code-quality denials. Also load when asked to \"find existing helpers\", \"consolidate utilities\",\n\"search for duplicate code\", \"where is this already implemented\", \"reuse existing logic\", \"don't duplicate this\",\n\"find similar functions\", \"utility inventory\", \"code smell radar\", or before adding new helpers\u002Fwrappers so agents can\nfind existing shared utilities and consolidate instead of duplicating.","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002Fbundle\u002Fshared\u002Fskills\u002Fslopgate-code-smell-utility-locator\u002FSKILL.md",[],[133,165,33,166,102,167,168,169,170,107,171,83,172,111,112,173,174,26,175,176],"slopgate code smell utility locator","shared","reviews","inventory","search","hooks","new","coordination","radar","code-quality","Utilities","dataclass",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":39},"01M7194AWG1Q37F9756H4SFDH9","slopgate-code-hygiene-refactor","Recovery playbook for Slopgate and project quality failures. Load after hook\u002Flint denials such as PY-CODE-017 flat sibling modules, PY-CODE-018 oversized modules, QUALITY-LINT-001 post-edit quality backstops, PY-QUALITY-010 magic numbers \u002F repeated literals, PY-CODE-012\u002FPY-CODE-013 smell findings, type-suppression bans, duplicate helpers, or repeated hygiene retry loops. Also load when asked to \"refactor this module\", \"split this file\", \"extract a class\", \"reduce complexity\", \"fix god class\", \"flatten module hierarchy\", \"move code to a package\", \"extract helpers\", \"consolidate duplicates\", \"replace magic numbers with constants\", or when a hook blocks an edit with structural complaints. Focuses on preserving public APIs while refactoring toward packages, cohesive modules, typed seams, and focused tests.","https:\u002F\u002Fgithub.com\u002Fvasceannie\u002Fslopgate\u002Fblob\u002Fmaster\u002Fbundle\u002Fshared\u002Fskills\u002Fslopgate-code-hygiene-refactor\u002FSKILL.md",[],[184,185,33,186,144,187,125,188,189,145,190,168,191,80,107,133,83,135,172,111],"code hygiene","slopgate code hygiene refactor","refactor","modules","duplicates","retry","move","structural"]