fix(docs-review): check related docs by name and directory, not just identifier grep#3233
fix(docs-review): check related docs by name and directory, not just identifier grep#3233csoceanu wants to merge 3 commits into
Conversation
…identifier grep The docs-review skill currently finds stale docs by grepping for identifiers from the diff. This misses docs that describe the same feature area but don't mention any specific changed identifier — common when a PR adds new behavior rather than renaming existing behavior. Add a step to check whether documentation files covering the same feature exist based on file name and directory structure, and evaluate them as candidates even without grep matches. Update the quick-scan pass to handle candidates without grep hits by reading section headings instead. Signed-off-by: csoceanu <csoceanu@redhat.com>
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
PR Summary by QodoImprove docs-review: include related docs via name/directory matching
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Site previewPreview: https://4c4fee58-site.fullsend-ai.workers.dev Commit: |
Code Review by Qodo
1.
|
| Additionally, for each changed code file, check whether a | ||
| documentation file covering the same feature exists based on file | ||
| name and directory structure. If one exists and is not already in the | ||
| candidate list, add it. |
There was a problem hiding this comment.
2. Related-doc match underspecified 🐞 Bug ⚙ Maintainability
The new “match by file name and directory structure” instruction doesn’t define a concrete heuristic (what directories to search, what constitutes a match, or how many candidates to add), so different runs/agents can apply different interpretations and produce inconsistent candidate sets. This ambiguity is duplicated into the docs-currency sub-agent instructions, increasing variance in behavior.
Agent Prompt
## Issue description
The new related-doc discovery step relies on “file name and directory structure” but does not specify how to perform the mapping. Without a defined heuristic and limits, different agents may select different docs (or too many docs), reducing repeatability.
## Issue Context
This instruction is now present both in the docs-review skill (step 4) and in the docs-currency sub-agent summary, so it should be specific enough to apply consistently.
## Fix Focus Areas
- internal/scaffold/fullsend-repo/skills/docs-review/SKILL.md[127-130]
- internal/scaffold/fullsend-repo/skills/pr-review/sub-agents/docs-currency.md[18-22]
Suggested change: document an explicit heuristic (and bounds), e.g.:
- Only consider docs under known doc roots (docs/, README*, etc.).
- Match by basename/stem (case-insensitive), optionally plus one parent directory segment.
- Cap added candidates per changed file (e.g., top 1–3 matches).
- Provide 1–2 examples of expected matches/non-matches.
This makes the step reproducible and reduces over-expansion of candidates.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The name/directory match step could re-add documentation files that step 4 already excluded (docs modified in the same PR). Add the same exclusion condition to prevent false-positive findings against docs that the PR author is actively updating. Signed-off-by: csoceanu <csoceanu@redhat.com>
|
Hello! We are migrating agents to an independent repository, we still need to remove files from here. Could you open this very same PR but against https://github.com/fullsend-ai/agents? |
|
Sure, opened the same PR against the agents repo: fullsend-ai/agents#55 |
|
🤖 Finished Retro · ✅ Success · Started 8:34 AM UTC · Completed 8:42 AM UTC |
|
PR #3233 was a human-authored fork PR by csoceanu modifying 2 files under Proposals filed
|
Summary
The docs-review skill finds stale docs by grepping for identifiers from the diff. This misses docs that describe the same feature area but don't mention any specific changed identifier — common when a PR adds new behavior rather than renaming existing behavior.
This PR adds a step to check whether documentation files covering the same feature exist based on file name and directory structure, and evaluate them as candidates even without grep matches.
Changes
docs-review/SKILL.mdstep 4: after the identifier grep, also check for related doc files by name/directory matchdocs-review/SKILL.mdstep 5: handle candidates without grep hits by reading section headings in the quick-scan passdocs-currency.md: align the sub-agent instructions with the updated skillContext
An impact analysis of 111 merged PRs found that the skill missed stale docs in 7 PRs (6% false negative rate). In most of these cases, the PR added new user-visible behavior and the related doc file wasn't found because the new identifiers didn't exist in existing docs. This change addresses that gap by matching code files to doc files by name and directory structure, not just identifier grep.