TileLang Review Skill
Mandatory routing rule
Before answering, follow AGENTS.md section "Docs Auto Routing Rules (Mandatory)".
Scope
- pre-PR code review for npuir branch
- format and lint checks aligned with CI
- risk-focused review for correctness, performance, and synchronization
Review priorities
- Behavior regressions
- Precision and dtype risks
- Synchronization and pipeline hazards
- Missing tests
- Style and format consistency
Docs to consult first
- docs/Tilelang-Ascend贡献指南.md
- docs/Tilelang算子调试指南.md
- docs/开发指南.md
Documentation drift check (agent/skill markdown changes)
When the change set touches .opencode/agents/, .agents/skills/ (including
_shared/standards/), or the conductor orchestration docs, run the shared
standards drift checker before review conclusion:
python3 .agents/tools/standards_check.py check
- Exit 0: no drift. Exit 1: inspect the single-line JSON
failures[]:SC-INLINE-DUP— a consumer inlined canonical rule text instead of referencing.agents/skills/_shared/standards/*.md(reject: single source of truth violated);SC-HASH-MISMATCH/SC-UNTRACKED— a standard file was edited without regenerating the lock (require the author to runstandards_check.py update, and to confirm consumers of the changed standard were synchronized);SC-DANGLING-REF/SC-REF-PATH/SC-FP-STALE— broken references (reject).
- Review focus for standards edits: the mechanical gate rules in
.agents/tools/gate_lint.pymust be updated in the same change when the edited standard carries a mechanically checkable subset.
Knowledge base lint (pattern-library / evolution queue changes)
When the change set touches the knowledge base -- .agents/skills/ tilelang-op-optimize/references/pattern-library/ (topic files, INDEX.md,
repro/), bottleneck-patterns.md, algorithm-candidates.md, or
.agents/evolution/queue.md -- run the KB lint (K-4, same level as
standards_check; used by optimizer write-back self-check, evolver
pre-merge check, and this review path):
python3 .agents/tools/kb_lint.py
- Exit 0: clean (warnings allowed). Exit 1: inspect
KB-*failures:KB-FM-REQUIRED/KB-FM-ENUM— entry missing front-matter fields or illegal kind/status enum (K-1 schema; reject);KB-REPRO-*— repro registered but missing / header lacks entry id or version stamp / syntax error / code references task-workspace paths (ED-F decoupling; reject);KB-QUEUE-SCHEMA— malformed proposal fields (reject).
- Warnings (
KB-BUDGETbyte budgets,KB-IMPERATIVEheuristic,KB-INDEX-COVERED,KB-REPRO-ORPHAN) do not block review but should be queued for the next distill consolidate. - Repro suite execution is on-demand (real NPU probes):
python3 .agents/tools/repro_runner.pyafter toolchain changes.
References
- references/checklist.txt
Related skills
- tilelang-error-fixer
- tilelang-debug-helper