review-design: move the fix history lookup with an error branch into a script with tests
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Read .agents/skills/review-design/SKILL.md and docs/doc-rules.md, then inspect the open pull request #83 before starting; the work may already be underway. Add the history lookup script under tools/review-design/ with tests for wrong and deleted paths, unlimited history, merge commits, and the requested commit details. Update step 1 to run the script, and consider the issue done when its behavior matches the proposal and the tests pass.
Written by the indexing model from the issue text.
Description
Kind
Does not agree with another doc
Location
.agents/skills/review-design/SKILL.mdline 25: the fix history command in step 1, Collect the symptoms.docs/doc-rules.md: the bullet "Commands and scripts in skills" in Writing style, as PR #67 changes it.
The command in Report of .agents/skills/trace-decision/SKILL.md has the same problem. #38 handles it: https://github.com/c-w-z/commit-decision-record/issues/38#issuecomment-7336649249
Version
4804c6b
Problem
PR #67 adds this rule: "A command can give a wrong or incomplete result and not say so. Do not handle such a case in the skill text. Handle it in a script in tools/ with tests. Examples of such text are an error branch, a check after the command, and a second run with other options."
The step runs git log … | grep . || { echo …; false; }. git log exits with 0 and prints nothing for a wrong path. The grep . error branch handles that case in the skill text, and no test covers it. So the step does not follow the rule.
Also, -30 cuts the history, and nothing tells the AI assistant that more commits exist.
Evidence
The reviews of PR #67 found them:
- https://github.com/c-w-z/commit-decision-record/pull/67#pullrequestreview-6131335176
- https://github.com/c-w-z/commit-decision-record/pull/67#pullrequestreview-6131955288
Proposal
Add a script in tools/review-design/ with tests, and run it in step 1:
- It prints
%h %sand--numstatfor each commit that changed<path>, from the repo root.<path>can be a deleted path. - If no commit changed
<path>, it exits with 1, because the path is wrong. - It reads the whole history of
<path>, with no limit. - It keeps merge commits in the list, as step 1 does now.
--no-mergeswith the pull request of each commit is #82.
Rejected: One lookup module for this step, the Report step of trace-decision and the --log input of #66. After the lookup the three need different things: --numstat; the oldest commit; landing commits and pull requests. They share only "run git log and check that the result is not empty". A shared module would add modes, a ref parameter for each user and rules for an empty result for each user.
Rejected: Keep a limit, with a status line when the script cuts the history. The script reads only local Git, and each commit gives 2 to 4 lines, so the whole history is cheap. 752f048 added -30 with the first version of the skill and gives no reason for it.
Cost: A path with a long history gives a long output.
- Dominant language
- Shell
- Stars
- 1
- Forks
- 0
- Avg merge
- 6h 59m
- Merged PRs (30d)
- 26
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from c-w-z/commit-decision-record
-
type/documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
c-w-z/commit-decision-record#90 · 1 comment ·
Maintainers usually reply within 1 day
-
type/documentation
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
c-w-z/commit-decision-record#85 ·
Maintainers usually reply within 1 day
-
type/documentation
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
c-w-z/commit-decision-record#84 ·
Maintainers usually reply within 1 day
-
type/feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
c-w-z/commit-decision-record#35 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue type/documentation
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
c-w-z/commit-decision-record#33 ·
Maintainers usually reply within 1 day
All issues in c-w-z/commit-decision-record
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
omacom/omarchy#21286 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ChurchCRM/docs.churchcrm.io#328 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
melodic-software/claude-code-plugins#20573 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bmaltais/StartDrive#17 ·