feat: add doc-map input for path-scoped doc injection #137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Callers want a reviewer that audits code against project-specific design docs. The current action has no way to inject local repo files as context — only external pattern repos via
patterns-repo.The right model: a config file in the caller's repo maps source paths to governing docs. review-bot reads the map, intersects with changed paths in the PR, and injects only the relevant docs. This keeps context surgical — a PR touching one module gets its governing doc, not the entire docs tree.
What
New action input:
doc-mapConfig file format (
.review-bot/doc-map.ymlin the caller's repo)paths— glob patterns matched against changed files in the PR diffdocs— local file paths or directories (all.mdfiles under a directory) to injectpathsentries can map to the same doc; docs are deduplicatedBehavior
doc-mapfilepathsdocs, deduplicate.mdfiles under a directory) from the local checkoutsystem-prompt-filecontent, under a## Design DocumentsheadingContext size guard
If total injected doc content exceeds a configurable limit (default: 100KB), truncate with a notice. Prevents accidental context window overflow when a PR touches many modules.
Acceptance criteria
doc-mapinput added to action.yml## Design Documentsheading.mdfiles under that directoryExample workflow usage
Related
grgl/gargoyle#778 — the first consumer of this feature