tidb-change-instruction-critic

Validates prescribed code change instructions against TiDB correctness and compatibility constraints before implementation.

40.5k|6.2k|Updated Sep 6, 2015
One-click install
npx skills add https://github.com/pingcap/tidb --skill tidb-change-instruction-critic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidb-change-instruction-critic
Source: https://github.com/pingcap/tidb/tree/main/.agents/skills/tidb-change-instruction-critic
Command: npx skills add https://github.com/pingcap/tidb --skill tidb-change-instruction-critic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When implementing user- or reviewer-prescribed code changes in TiDB, blindly following instructions can introduce correctness bugs, SQL semantic regressions, or compatibility breaks. This Skill forces structured validation of every prescribed change before any code is written.

Core Features & Use Cases

  • Instruction Decomposition: Separates a requested change into intent, constraints, and proposed method, marking each as mandatory or negotiable.
  • Solution Comparison: Evaluates the requested approach against at least one alternative using correctness, compatibility, performance, and maintenance criteria.
  • Challenge Gate: Blocks implementation and asks clarifying questions when requirements are ambiguous, SQL semantics may shift, or blast radius is large.
  • Use Case: A reviewer comments "just use option B to fix the planner bug." The Skill reconstructs the actual defect from code evidence, compares option B with an alternative, shares a short analysis summary, and only implements after alignment.

Quick Start

Review this reviewer-suggested fix for the TiDB planner and validate whether the requested approach is correct before implementing it.

Frequently Asked Questions about tidb-change-instruction-critic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle review comments that prescribe a specific fix?

Treat the prescribed fix as a hypothesis: decompose it into intent, constraints, and method, then verify the actual problem from code evidence. Compare the requested approach with at least one alternative before implementing.

How to evaluate risky code change requests in TiDB?

Reconstruct the problem from concrete evidence, then judge candidate solutions by correctness, compatibility, performance, and maintenance cost. Prioritize behavior-contract fit over mechanical risk minimization when choosing.

When should I ask for clarification before implementing a requested change?

Ask before coding when requirements are ambiguous or conflicting, when SQL semantics or distributed behavior may change non-obviously, when blast radius is large, or when tests cannot prove safety.

What are the limitations of blindly following reviewer suggestions?

Reviewer suggestions may be incomplete, misaligned with behavior contracts, or increase blast radius through broad refactors. Validating intent against code evidence prevents regressions and preserves correctness.

Does this workflow require writing regression tests?

Yes, the workflow requires adding or updating regression coverage whenever behavior changes or bugs are fixed. Validation scope must align with the assessed risk of the change.