feat(playbook): add syntax book and codex skills tooling

This commit is contained in:
csh
2025-12-22 13:39:49 +08:00
parent 5b97ed5322
commit 283d311d4f
41 changed files with 247368 additions and 646 deletions
@@ -0,0 +1,46 @@
---
name: systematic-debugging
description: Systematic debugging for bugs, failing tests, regressions (TSL/C++/Python). Triggers: debug, failing test, regression, crash, 复现, 定位, 排查, 调试.
---
# Systematic Debugging(系统化调试)
## When to Use
- Bugs, crashes, failing/flaky tests, regressions
- “It doesnt work” reports with unclear reproduction
## Inputsrequired
- Expected vs actual behavior
- Repro command/steps (or best-known approximation)
- Logs/traces/screenshots/error output
- Environment details (OS, versions, configs)
## Proceduredefault
1. **Reproduce**
- Make the failure deterministic if possible
- Minimize repro steps (smallest input/command)
2. **Localize**
- Identify failing component and boundary conditions
- Add temporary logging/assertions if needed (then remove)
3. **Hypothesize & Test**
- Form a small number of hypotheses
- Design quick experiments to falsify each hypothesis
4. **Fix & Verify**
- Fix the root cause (not just symptoms)
- Add/update tests; rerun the minimal relevant suite
## Output Contractstable
- Repro: exact steps/command
- Diagnosis: root cause + evidence
- Fix: what changed + why it works
- Verification: commands + outputs/exit codes
- Follow-ups: hardening or cleanup tasks
## Guardrails
- Avoid changing multiple variables at once
- Prefer instrumentation and evidence over guessing
- Keep fixes minimal and scoped