一键导入
hunt-gap
Verify and fix documented gaps one at a time — reproduce, root cause, minimal fix, wire-test regression, close
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify and fix documented gaps one at a time — reproduce, root cause, minimal fix, wire-test regression, close
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Discover undocumented gaps by comparing AxiomDB against MySQL/PostgreSQL — build inventory, run tests, classify, hand off to hunt-gap
Run Criterion micro-benchmarks and 3-Docker comparison benchmarks, verify no regression against MySQL/PostgreSQL
Explore approaches before proposing — read context, ask questions, present 2+ options with trade-offs, write sprint with dependencies
Save session context to a checkpoint file so the next session can resume without losing state
Systematic debug protocol — reproduce with minimal test, 2+ hypotheses, fix root cause, add regression test
Full phase close protocol — tests, clippy, fmt, benchmarks, docs, memory update, commit, push
| name | hunt-gap |
| description | Verify and fix documented gaps one at a time — reproduce, root cause, minimal fix, wire-test regression, close |
Systematically verify and fix documented gaps or bugs. Never assume a gap still exists — always reproduce first with real code against the running server.
/hunt-gap GAP-A.1 — single gap by ID
/hunt-gap 11.2d — single gap by subphase
/hunt-gap UNION support — single gap by description
/hunt-gap fase 3 — scan ALL gaps in phase 3
/hunt-gap fase 1-11 — scan ALL gaps in phases 1 through 11
/hunt-gap fase 39 — scan ALL gaps in phase 39
/hunt-gap all — scan ALL gaps in docs/progreso.md
When the argument is a phase number or range (not a specific gap ID):
Read docs/progreso.md and collect every [ ] ⏳ item within the
requested phase range. Also collect ⚠️ DEFERRED items from
specs/fase-N/ and docs/fase-N.md files in scope.
Build a gap inventory — list all gaps found with:
SCAN: Phase [N] to [M]
Found [X] gaps:
1. [id] — [one-line description] — [severity estimate]
2. [id] — [one-line description] — [severity estimate]
...
Suggest priority order based on:
Process one at a time — for each gap in order, run Phase 1 through Phase 6 below. After closing one gap, move to the next. Report progress:
Gap hunt progress: [X/Y] gaps processed
Closed: [list]
Already fixed: [list]
Skipped (needs other phase): [list]
Ask before proceeding to the next gap after each close (unless the user said to process all automatically).
Find the gap record — search in order:
docs/progreso.md — look for the gap ID or keywordsspecs/fase-N/ — detailed spec if it existsdocs/fase-N.md — phase docs for contextDocument the gap — before doing anything, state clearly:
GAP: [identifier]
SYMPTOM: [what the user would observe]
EXPECTED: [what should happen instead]
LOCATION: [file(s) and line(s) involved]
SEVERITY: [critical / high / medium / low]
TYPE: [code-level | wire-visible | parser | executor | storage]
Check if already fixed — grep the codebase and git log for evidence that this was already resolved in a later phase:
git log --oneline --all --grep="GAP-X" | head -5
If fixed, update docs/progreso.md and skip to Phase 6 (report only).
Classify the gap type — this determines Phase 2 strategy:
For gaps that are purely about code patterns in src/:
Grep for the exact pattern described in the gap:
# Count occurrences
grep -rn 'unwrap()' crates/axiomdb-sql/src/target_file.rs
grep -rn 'expect(' crates/axiomdb-sql/src/target_file.rs
Read each occurrence — determine if it's:
#[cfg(test)]) → not a gap, skipReport findings:
PATTERN: [what was found]
COUNT: [number of occurrences]
GUARDED: [yes/no — has preceding safety check]
VERDICT: CONFIRMED / ALREADY-FIXED
If CONFIRMED → skip to Phase 5 (implementation is straightforward for
these: replace unwrap() with map_err(|_| error)? or ?).
export PATH="$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:$PATH"
cargo build -p axiomdb-server
Copy tools/gap_test_template.py → tools/tmp_gap_test.py and fill in
the test_gap() function. The template handles server start/stop, PORT=13307,
connect(), ok(), and cleanup boilerplate.
Every test must include these 3 categories:
| Category | Purpose | Example |
|---|---|---|
| Control | Proves test infra works | SELECT 1+1 → 2 |
| Gap test | Exercises the documented gap | SELECT 1 UNION SELECT 2 → error? |
| Edge case | Boundary conditions | UNION ALL with NULLs, empty sets |
python3 tools/tmp_gap_test.py
For each failure, determine:
Report:
VERIFICATION RESULT for GAP-X.Y:
Status: CONFIRMED / ALREADY-FIXED / PARTIALLY-FIXED
Tests: X passed, Y failed
Collateral findings: [unexpected bugs discovered, if any]
If ALREADY-FIXED: Update docs/progreso.md, delete tmp file, report, done.
If CONFIRMED: Proceed to Phase 4.
If PARTIALLY-FIXED: Document what works and what doesn't. The remaining broken part is the actual gap to fix.
Collateral findings: Create entries in a ## Collateral section at the
end of the test output. These become candidates for future /hunt-gap runs.
Do not fix them now.
Hypothesis A: [description]
Evidence: [what supports this]
How to verify: [specific code to read or experiment to run]
Hypothesis B: [description]
Evidence: [what supports this]
How to verify: [specific code to read or experiment to run]
handler.rs → executor/ → specific module.planner_select.rs, not just one.ROOT CAUSE:
File: [path:line]
Function: [name]
Problem: [what exactly is wrong and why]
Scope: [how many call sites / similar patterns need fixing]
Effort required: [low | medium | high | max]
Reason: [one line]
axiomdb_types::coerce(value, target, mode)export PATH="$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:$PATH"
# 1. Build the affected crate
cargo build -p axiomdb-<crate>
# 2. Run unit tests for the crate
cargo test -p axiomdb-<crate>
# 3. If it touches SQL: rebuild server + re-run gap test
cargo build -p axiomdb-server
python3 tools/tmp_gap_test.py
If the test still fails after the fix:
# Full wire test (must pass all existing tests)
python3 tools/wire-test.py
# Unit tests for affected crate
cargo test -p axiomdb-<crate>
# Clippy
cargo clippy -p axiomdb-<crate> -- -D warnings
If wire-test shows regressions: the fix broke something else. Investigate before proceeding — do not skip regressions.
rm tools/tmp_gap_test.py
In docs/progreso.md, change the gap entry:
- [x] GAP-X.Y description — closed: [brief explanation of root cause and fix]
GAP [id] CLOSED
Root cause: [one-line summary]
Fix: [file(s) changed and what was done]
Scope: [N files, M lines changed]
Tests: [what was verified — unit + wire + gap test]
Regressions: none / [list any and how they were resolved]
Collateral findings: [new gaps discovered during this hunt]
git add [specific files]
git commit -m "fix(fase-N): close GAP-X.Y — [description]
- [detail 1]
- [detail 2]"
Do NOT include Co-Authored-By from Claude (per CLAUDE.md).
tools/tmp_gap_test.py after closing each gap.research/postgresql/, research/mariadb/,
research/sqlite/, research/duckdb/ for SQL semantics questions.