一键导入
source-command-audit-analyze-code-ia-practices
Review the codebase against the best-practices rubric and propose INTELLIGENT refactors (not random splits).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review the codebase against the best-practices rubric and propose INTELLIGENT refactors (not random splits).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Domain Engineering diagnostic — shows what the classifier decides for an objective (CMIS/DAS/profile/skills/mode). Observation-only; never mutates or blocks.
Business-driven methodology entry point — classify (intake), create/advance an Operation or Business work context, and drive the intake → operation → nested-workflow flow. Host-neutral; dry-run by default.
Workflow Navigator — shows the current phase, deliverables, and next commands for an ADR-0057 workflow. Read-only; never mutates state.
Start a focused session on one objective — locks scope, blocks opportunistic refactors.
Deterministic QA gate (ADR-0055) — run the project suite; green + complete acceptance criteria ⇒ qa-approve testing cards into conclusion; red ⇒ report (and qa-reject only attributable failures).
L6 — autonomous feature pipeline. Drives the full squad: design → implement → review → test → log. Checkpoints can be manual or automatic.
| name | source-command-audit-analyze-code-ia-practices |
| description | Review the codebase against the best-practices rubric and propose INTELLIGENT refactors (not random splits). |
Use this skill when the user asks to run the migrated source command analyze-code-ia-practices.
Audit the codebase (focus: $ARGUMENTS if given, else the whole repo) against the rubric and propose improvements with engineering judgment.
contextkit/best-practices.md — the rubric (Tier 1 system &
architecture; Tier 2 module & function hygiene; the four-block
Principle / Smells / Fix / Don't over-apply per rule).contextkit/review-protocol.md — the protocol (severity vocabulary
anchored on scanner sev 1..5; scope / spike relaxations; report shape;
scanner-vs-agent contract).AGENTS.md constitution (especially §1 line budget, §2 SRP, §3 layers).contextkit/config.json → l5.lineBudget for the project's thresholds.node contextkit/tools/scripts/tech-debt-scan.mjs --json
The scanner emits findings on a 1..5 severity scale from four detectors:
line-budget (sev 3/5), srp-and (sev 2 — JS And/Or/E, Python
_and_/_or_), react-state-loop (sev 3 — React/JSX only,
> 2 useState + ≥ 1 useEffect), todo-marker (sev 1 — TODO/FIXME/
HACK/XXX). Custom detectors auto-load from contextkit/detectors/*.mjs.
That is the floor of the report, not the ceiling.> 2 useState + ≥ 1 effect) → extract a
custom hook.renderX() → promote to a real component.best-practices.md). If you
spot one during the pass, name it briefly and dispatch the relevant
agent/command — don't expand this command's lane.path:line — TIER/§ID — SEVERITY — what's wrong — proposed fix
Sort by tier (1 → 2), then severity (BLOCKER → NIT), then blast radius.
Top 5 first; the rest below.node contextkit/tools/scripts/pipeline.mjs add --type chore --priority <P> \
--source "practices:<file>" --title "refactor <file> by responsibility"
--source keeps re-runs idempotent; then pipeline.mjs sync. Priorities
stay editable (pipeline.mjs prioritize <id> <P> or /pipeline)./dev-start "refactor <file> by responsibility" (or /ship)
on the top item.If best-practices aren't active yet, ask the user whether to adopt them
(set practices.active = true via /context-config and fill the AGENTS.md
constitution).