research-codebase
Map how the code a ticket touches works today, then name the next step: develop, refactor, or grill-with-docs.
- License 许可
- MIT
- 所属仓库
- lithammer/ai
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- research-codebase
- description
- Map how the code a ticket touches works today, then name the next step: develop, refactor, or grill-with-docs.
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml119 B
03 SKILL.md 正文
Research codebase
Map the code a ticket touches as it stands, so the next step starts from facts instead of finding them again. The map describes; the next step decides, so every choice stays open for the user.
1. Frame the questions
Read the ticket and the files it names before dispatching anything. Turn the ticket into questions about the current code: where the relevant parts live, how data and control flow through them, which callers, tests, and configuration depend on them, which patterns nearby code follows, and where the need the ticket addresses originates, such as a bug's cause. Each question asks how the code works now.
When the ticket names no area of code to change, there is nothing to map yet:
route to grill-with-docs and stop.
2. Investigate
Dispatch a sub-agent for each independent question, so the main context
holds the questions and findings, not the reading. Each sub-agent returns
observations with path:line.
The step is done when every question has an answer backed by path:line, or
is marked open with the places searched.
3. Write the map
Write one Markdown file:
# <topic>
Ticket: <reference>
Commit: <short sha>
## Questions
<numbered, as framed in step 1>
## Findings
<per question: what exists, where, how it works, how parts connect>
## Open
<questions the code did not answer, with the places searched>
Write every finding as an observation of the current code. A gap or quirk is a fact with a location like any other.
The map describes one commit and goes stale as the change lands. Save it where
the repository keeps working notes for tasks; when it has none, under
.research/ at the repository root, with .research/ listed in
.git/info/exclude to keep it out of commits.
4. Route
Before naming the route, open the cited lines for each fact it rests on. Reply with a short summary of the map, its path, and the first route that applies:
refactorwhen the map traces the ticket's need to a cause outside the code the ticket names, and a structural change no larger than the ticket's own could remove the need.developwhen the ticket and the map leave one reasonable way to make the change: no open choice alters observable behavior or an interface.grill-with-docswhen a choice remains that is the user's to make. List each choice in one line.
The user starts the next step, often in a fresh session given the map's path.
04 同仓库更多 Skills
shape
Review a working change for its shape (cause, ownership, states, names, size, reuse, cost), then apply what you accept.
correctness
Review a working change for defects (logic, state, lifecycle, concurrency, regression) and for drift from its ticket, docs, and rules, then apply what you accept.
zero-tech-debt
Rework a change as if the intended UX and architecture existed from day one, deleting compatibility cruft and accidental complexity.
waterfall-review
Review a code change by dispatching specialized review subagents in parallel — each focused on a single dimension (correctness, security, architecture, etc.) — then triaging their findings into a unified report. Works standalone on a branch or as part of the waterfall flow after implementation. Invoke when the user explicitly asks to review a branch or diff, or as a step inside waterfall-implement; avoid auto-triggering on casual mentions of "review".
waterfall-refactor
Identify refactoring opportunities in code that a feature will touch. Runs at strategic level during design (looking for structural moves that could change which approach is chosen) or tactical level before implementation (looking for pre-work that gives the feature a better foundation). Primarily invoked by waterfall-design or waterfall-implement; avoid auto-triggering on casual mentions of "refactor".
waterfall-plan
Detail a chosen design approach into an implementation plan (objective, file manifest, execution order, test strategy), then auto-proceed to waterfall-challenge. Convergent phase of the waterfall flow.