code-review-standards
Severity-tagged code review checklist (CRITICAL/HIGH/MEDIUM/LOW) used by code-critic agent
What this skill does
# Code Review Standards ## Purpose This skill defines the structured checklist that the `code-critic` agent applies during Stage 4 of the code production pipeline. The checklist is severity-tagged so that PM and engineer both know exactly which findings block delivery and which are advisory. Engineers may load this skill for self-review before requesting a critic pass. The checklist exists because unstructured code review in multi-agent systems produces inconsistent signal: one critic dispatch flags naming; another flags security; neither flags the same things. Severity tagging makes the review deterministic across dispatches. ## The Severity-Tagged Checklist ### CRITICAL (must fix, blocks delivery) - [ ] No secrets, API keys, or credentials hardcoded - [ ] No SQL injection vectors (parameterized queries only) - [ ] No arbitrary code execution paths (no `eval`, `exec`, unrestricted `pickle.loads`) - [ ] Authentication/authorization not bypassable - [ ] No infinite loops without escape conditions ### HIGH (must fix, blocks delivery) - [ ] Type hints on all public functions and classes - [ ] mypy --strict passes with zero errors - [ ] pytest passes with zero failures - [ ] Test coverage >= 90% on new code - [ ] No bare except clauses - [ ] No mutable default arguments - [ ] No global mutable state - [ ] No synchronous I/O inside async functions - [ ] No N+1 query patterns - [ ] Error cases handled explicitly (not silently swallowed) ### MEDIUM (flag, note in report, proceed) - [ ] Functions <= 20 lines (prefer <= 10) - [ ] No nested loops where hash map would reduce complexity - [ ] list.pop(0) replaced with deque.popleft() where relevant - [ ] asyncio.gather uses return_exceptions=True where appropriate - [ ] Async operations have explicit timeouts - [ ] Docstrings on public methods (Google or NumPy style) - [ ] No Any types in production code paths ### LOW (note only) - [ ] PEP 8 compliance (black + isort handles this automatically) - [ ] Variable naming is clear and descriptive - [ ] No commented-out code left in - [ ] Import ordering is clean ## Verdict Format Critic output MUST begin with the verdict on the first line, followed by the finding table, followed by a summary paragraph. **First line format:** ``` VERDICT: APPROVE ``` or ``` VERDICT: WARN ``` or ``` VERDICT: BLOCK ``` **Finding table format:** | Severity | File | Line | Issue | Required Fix | |----------|------|------|-------|--------------| | CRITICAL | auth.py | 47 | Hardcoded API key `sk-...` | Move to env var; add to `.env.example` | | HIGH | fetcher.py | 23 | `requests.get()` called inside `async def` | Replace with `await httpx.AsyncClient().get()` | | MEDIUM | parser.py | 88 | Function is 34 lines | Extract `_parse_headers()` helper | **Verdict definitions:** | Verdict | Condition | PM Action | |---------|-----------|-----------| | APPROVE | Zero CRITICAL, zero HIGH findings | Proceed to Stage 5 (Security) | | WARN | Zero CRITICAL, one or more HIGH findings | Proceed to Stage 5 with findings logged to docs handoff | | BLOCK | Any CRITICAL finding (one or more) | Halt pipeline; surface findings to user; await user direction | **APPROVE** means the implementation is ready for security review. MEDIUM and LOW findings in an APPROVE review are passed to the Documentation agent as notes — they do not block delivery but are preserved for future reference. **WARN** means the implementation has structural issues that should be fixed but do not represent exploitable defects or correctness failures. PM proceeds to security review and appends the WARN finding table to the documentation handoff message. PM also logs the findings (KB entry or todo) so they are not silently dropped. **BLOCK** means the implementation has at least one defect that, if shipped, creates a security vulnerability, data loss risk, or silent failure mode. PM halts the pipeline immediately, presents the critic finding table verbatim to the user, and awaits explicit direction. PM MUST NOT auto-retry the engineer without user input. ## 80% Confidence Filter A clean review is a valid review. Do not manufacture findings. Only report issues with >80% confidence they are real problems. Do not flag: - Style preferences as HIGH or CRITICAL - "This could theoretically be an issue in an edge case" without specific evidence - Patterns that look unusual but may be intentional and correct - Missing features that were not in scope (check the Stage 1 spec) When confidence is below 80%, note the concern as a question in the summary paragraph rather than as a finding in the table. Example: "The `process_batch()` function did not appear to handle empty input — verify whether the caller guarantees non-empty batches." This filter prevents the critic from becoming a noise generator that trains PM to ignore findings. Each finding in the table should be actionable: engineer reads it, knows exactly what to fix, and can do so without asking for clarification. ## Navigation For detailed criteria with examples: - **[CRITICAL Criteria](references/criteria-critical.md)**: Detailed explanations and examples for each CRITICAL item - **[HIGH Criteria](references/criteria-high.md)**: Detailed explanations and examples for each HIGH item - **[MEDIUM Criteria](references/criteria-medium.md)**: Detailed explanations and examples for each MEDIUM item - **[LOW Criteria](references/criteria-low.md)**: Detailed explanations and examples for each LOW item - **[Verdict Protocol](references/verdict-protocol.md)**: Full PM behavior for each verdict, failure loop templates
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.