本文へ移動
cccskills
無料GitHub で公開

docs-layers

Use when writing, moving or auditing any .md in imp - deciding which file a paragraph belongs in, adding a doc, fixing a stale claim, or when docs_lint.py fails in CI. Covers the four reader layers (L0 README / L1 operators / L2 kernel devs / L3 agents), the HTML-comment metadata header, [PROV:] provenance, the single-source-of-truth map, generated perf blocks, which numbers may appear in prose, plan-doc closure. Triggers on "which doc does this go in", "docs lint failed", "add a doc", "this claim is stale", "update the README", "PROV block", "layer", "STALE.md". Do NOT use for the CHANGELOG or a release body (shipping-prs), or for code-comment accuracy (codebase-audit).

インストール方法を見る

含まれるファイル(1)

  • SKILL.md7.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Docs layers - imp

Docs are organised by READER, not topic; scripts/docs_lint.py gates it.

Hard rules

#Rule
1One layer per file, declared in the metadata header.
2Link downward, never repeat: L0 links a kernel, L2 may assume L0 vocabulary.
3A claim needs a code path; a number needs provenance. Unbacked = deleted, not softened ("experimental", "planned" are not rescue words).
3bA number also needs something that FAILS when it drifts: gate thresholds (8%/8%/10%, verify.sh), hardware constants (32 GB, 1792 GB/s), dated measurements (findings, true of the afternoon named). File/LOC/test counts and build/test runtimes qualify for none: write the COMMAND that prints the number (python3 tools/check_test_lanes.py --report) or the magnitude ("seconds" vs "minutes"). A restated gated number does not inherit the gate (tests/CLAUDE.md lost this twice, #1673; bulk-applied #1827).
4Records are not documentation: CHANGELOG.md, docs/MISSION_JOURNAL.md, docs/vram_audit.md, root AUDIT.md, docs/roadmap.md, prefixes docs/archive/, docs/audit/, docs/plans/ are lint-excluded, append-only. docs/BENCHMARKS.md IS linted (PROV-header allowlist); docs/roadmap.md is drift-gated by check_doc_citations.py (#1772).
5file:line citations in every living doc are gated (#1783): scripts/check_doc_citations.py . over 33 living docs (docs/*.md, docs/internals/*.md, root README/CONTRIBUTING/AGENTS/AUDIT); format path:N anchor (N, N-M, N,M, N/M): no anchor = DEAD (#2185); anchor off line N but once in the file (or the one hit within 25 lines) = DRIFT warning, exit 0, --fix rewrites N; anchor gone, or several hits and none or 2+ within 25 lines = DEAD (#2231); cite a path, not a bare basename (a basename the anchor cannot resolve passes as AMBIGUOUS); it is the citations selection in ci_static_gates.sh, NOT the docs selection.

The layers

LayerReaderFilesMay assume
L0first contact, knows LLMs not CUDAREADME.mdnothing
L1operatorsdocs/*.mdDocker, HTTP, quant basics
L2kernel workdocs/internals/*.mdPTX, MMA, occupancy, roofline
L3agentsper-directory CLAUDE.md, root AGENTS.mdonly what the file says

Smell: mma.sync, TMA, splitk, "NVFP4 block scaling" unexplained in L0/L1 belongs in L2.

Metadata header (HTML comment, never YAML)

<!--
layer: L1            # L0 | L1 | L2 | L3   (hard error if missing/invalid)
audience: operators  # newcomers | operators | kernel-devs | agents (hard error)
verified: 2026-08-13 # staleness warning only
commit: <sha8>       # hard error if missing; drift warning "edited Nx since" (#1683)
-->

Bump verified:/commit: on every content edit. Legacy --- YAML still accepted. Do NOT convert .claude/skills/*/SKILL.md or .github/ISSUE_TEMPLATE/*.md (their YAML is functional).

Single source of truth

InformationOwner
any numberdocs/PERF.md (its PERF block is GENERATED)
what exists, with statusdocs/FEATURES.md
what does not / untesteddocs/LIMITATIONS.md
absent on purposedocs/DESIGN_DECISIONS.md
what sm_120a has and lacksdocs/internals/ARCHITECTURE.md ("no tcgen05/TMEM/wgmma" once stood in eight files)
verdicts on leversdocs/roadmap.md ledgers (fact + number + decision per row; investigation in docs/plans/ or the PR)

Status legend in feature tables: verified (code path AND a gate test) / implemented (must also appear in LIMITATIONS.md) / not implemented (points at DESIGN_DECISIONS.md). "Verified" never means "green in CI" for anything GPU-shaped: CI has no GPU runner; the gate is make verify-fast locally.

Provenance

L0/L1 throughput figures carry [PROV: commit=<sha7> date=<YYYY-MM-DD> hw=RTX5090 model=<name> quant=<fmt> cuda=<ver> path=<dispatch> cmd=<command> n=<runs>] within 12 lines (the quickstart is not exempt: a raw tok/s without PROV fails; write a percentage plus a link to the doc that carries the PROV). Generator emits unknown for missing fields (#1684); hand-written blocks fill real values. Severity: fails in L0/L1, warns in L2. BENCHMARKS.md, GOAL.md, MODELS.md declare per-row conventions in their headers. A harness that outlives an edit window puts its md5 next to the commit (harness_md5=).

Generated blocks

docs/PERF.md <!-- PERF:BEGIN --> / <!-- PERF:END -->: hand edits fail CI. python3 scripts/sync_docs.py regenerates from tests/perf_baseline.json; --check is what CI runs.

Before you push

bash scripts/ci_static_gates.sh docs citations (~2 s; the hooks run it). The Docs job runs docs; Build runs everything unfiltered, so a docs failure shows as Build red. Lint checks: forbidden tokens, unprovenanced numbers, header, generated drift, dead links, size budgets (README <= 400 lines, root CLAUDE.md <= 2000 tokens, per-directory <= 800), staleness > 180 days (warning -> docs/audit/docs-rewrite/STALE.md), refs-generator listing (tests/refs/gen_*.py rows in tests/refs/README.md, #1730). .gitignore respected (#1698). STALE.md is written only by python3 scripts/docs_lint.py --write-stale; hooks and CI leave it untouched (#2194).

Adding a doc

  1. Layer from the reader. 2. Header. 3. Numbers: PROV or a link to PERF.md. 4. Features: code path file.cu:123 + status. 5. Link from docs/README.md (and the README routing table if front-door). 6. Run both scripts.

Per-directory CLAUDE.md (<= 800 tokens)

# <dir>: purpose (2 lines)
## Invariants     ## Entry points (3-7 files)   ## Build & test (this dir)
## Pitfalls       ## Do not touch               ## See also (links, no repetition)

No perf numbers in any CLAUDE.md; link PERF.md. L3 downgrades unprovenanced numbers to a warning; the rule is what you write to. Hook edits (scripts/*.hook) count as docs for the hooks (.hook skips the GPU gate since #1825).

Plan docs (docs/plans/)

YYYY-MM-DD-<topic>.md, lint-exempt records, no header. Closure (#1786): ~~strikethrough~~ + DONE <date> (#PR) / MEASURED / ANSWERED / REFUTED / CLOSED <date> (<reason>), acceptance cell rewritten to the standing evidence, terminal ## ROADMAP CLOSED (<date>). Items are closed, never deleted. Moving text out of docs/roadmap.md rewrites relative links (](MODELS.md) -> ](../MODELS.md)); the hooks do not run hygiene, CI Release hygiene does.

Audit trail

docs/audit/docs-rewrite/: PURGE_LOG.md (append every removed claim with a reason), OPEN_QUESTIONS.md, STALE.md.

Traps

  • The brief can be stale: the rewrite's own brief carried six claims the tree had refuted, two of them perf figures that would have published a phantom regression.
  • A stale code comment outranks nothing (engine_init_resolver.cpp says "prefill is never graph-captured" beside a true default). This skill file is outside the citation gate: prefer path-only citations here.
  • Run the documented command before documenting it (/v1/messages returns a thinking block at content[0]; nothing said so until someone ran the curl).
  • De-prose sweeps (#1802 roadmap 1292 -> 761 lines, #1804 23 files +2033/-3709) work as parallel worktree agents on their own branches; re-run the citation gate after compaction (KERNELS.md:35 became :20).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when adding support for a new model architecture to imp, porting a model family, or debugging a model that loads but produces wrong output - "add support for <model>", "new arch", loader detection, chat template, tokenizer parity, RoPE variant, "outputs garbage", "prompt-blind", "digits scrambled", "NaN logits", "describes a different picture", "does it fit in VRAM". Do NOT use for kernel performance (sm120-cuda-expert) or quant-format questions (quant-formats).

日本語の概要は準備中です。原文の説明を表示しています。

kekzl/imp442026年10月11日 更新

Use when benchmarking, profiling, or A/B-testing CUDA kernels or end-to-end perf in the imp inference engine on RTX 5090 (sm_120), including refreshing tests/perf_baseline.json or publishing numbers to docs/BENCHMARKS.md and the README. Triggers on "benchmark kernel", "profile cuda", "ncu", "nsys", "kernel timing", "kernel sum", "occupancy", "bandwidth bound", "compute bound", "roofline", "perf baseline", "is this regression real", "decode dropped", "aggregate throughput", "two-image A/B", "prefill kernel A/B". Do NOT use for writing/optimizing kernel code (sm120-cuda-expert) or output-quality checks (check-degeneration).

日本語の概要は準備中です。原文の説明を表示しています。

kekzl/imp442026年10月11日 更新

Use when building imp, running its test suite, checking CI status, or debugging build/test failures - "make build", "run the tests", "test-gpu", "verify-fast", GTEST_FILTER, Docker/CUDA toolchain, dependency bumps, "CI is red/blocked", "which gate failed", stale objects / segfault after a header edit, hook edits, docker-entrypoint env vars, determinism or perplexity checks. Do NOT use for benchmarking/profiling (benchmark-cuda) or output-quality batteries (check-degeneration).

日本語の概要は準備中です。原文の説明を表示しています。

kekzl/imp442026年10月11日 更新

Use when verifying that a model in the imp inference engine produces coherent output without repetition loops, token-stuck states, or state corruption across turns or streams. Triggers on "degenerates", "check degeneration", "repetition loop", "own own own", "stuck token", "empty content", "multi-turn regression", "does it still work", "NIAH", and after enabling CUDA graphs / changing forward pass / MoE routing / KV cache or KV dtype / GDN state or scan / sparse attention / PDL / speculation (MTP, n-gram) / ragged prefill / batched-decode kernels (smallm, producer quantize) / FA2 softmax.

日本語の概要は準備中です。原文の説明を表示しています。

kekzl/imp442026年10月11日 更新

Use when a question is about *structure* rather than text - who calls or launches a symbol, where it is defined, what a change would reach, whether something is dead, how a request gets from the API to a kernel. Triggers on "who calls", "who launches this kernel", "where is X defined", "what breaks if I change", "is this still used", "is this dead", "trace the path from X to Y", "blast radius", "what depends on this header". Do NOT use for free-text search (`rg` is better and cheaper) or to open a file whose path you already know.

日本語の概要は準備中です。原文の説明を表示しています。

kekzl/imp442026年10月11日 更新

Use when auditing the imp codebase for structural debt, dead code, god-objects/files, duplication, flag sprawl, or deciding whether a cleanup is worth shipping - "structure audit", "tech debt", "is this still used", "dead code", "refactor for clarity", "should we split this file", "remove this flag", "file size gate red", "alloc sites gate red". Do NOT use for build/test mechanics (building-and-testing), perf/kernel work (benchmark-cuda / sm120-cuda-expert), or output quality (check-degeneration).

日本語の概要は準備中です。原文の説明を表示しています。

kekzl/imp442026年10月11日 更新

kekzl のスキルをすべて見る

このスキルの問題を報告する