feat(review): add .gittensory.yml review.path_instructions (per-path AI review rules)#1350
Merged
Merged
Conversation
…AI review rules) (#review-path-instructions)
A CodeRabbit-parity knob: a maintainer declares per-path natural-language review guidance that the AI
maintainer reviewer applies when a PR's changed files match the glob:
review:
path_instructions:
- path: "src/**"
instructions: "Enforce strict null checks and explicit error handling."
- path: "tests/**"
instructions: "Cover both sides of every conditional."
Config-only (manifest.review, no DB migration) and PRESENTATION ONLY — it guides the advisory write-up,
never the gate verdict. No match / none configured ⇒ the reviewer prompt is byte-identical.
- focus-manifest.ts: ReviewPathInstruction type + `pathInstructions` on FocusManifestReviewConfig; parse
(path required + trimmed, instructions required + public-safe, capped at 50, per-entry warnings) +
serialize; resolveReviewPathInstructions(entries, changedPaths) → the applicable prompt section (uses
the manifest's own matchesManifestPath glob semantics); resolveReviewPromptOverrides(manifest) centralizes
the null-manifest defaults for profile + path-instructions.
- ai-review.ts: `pathGuidance` on the input; buildSystemPrompt appends it.
- processors.ts: resolve overrides from the cached manifest at the AI-review call site; match against the
PR files inside runAiReviewForAdvisory (pure, no extra fetch) and thread the guidance in.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1350 +/- ##
=======================================
Coverage 95.27% 95.28%
=======================================
Files 188 188
Lines 20336 20373 +37
Branches 7327 7340 +13
=======================================
+ Hits 19375 19412 +37
Misses 378 378
Partials 583 583
🚀 New features to boost your workflow:
|
This was referenced Jun 25, 2026
feat(review): add .gittensory.yml review.pre_merge_checks (deterministic pre-merge assertions)
#1357
Merged
Closed
12 tasks
This was referenced Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The second CodeRabbit-parity feature: a
.gittensory.ymlreview.path_instructionslist that lets a maintainer attach per-path natural-language guidance, which the AI maintainer reviewer applies when a PR's changed files match the glob.manifest.review(.gittensory.ymlconfig-as-code), no DB migration / OpenAPI.Changes
focus-manifest.ts—ReviewPathInstructiontype +pathInstructionsonFocusManifestReviewConfig; parse (path required + trimmed, instructions required + public-safe, capped at 50, per-entry warnings) + serialize;resolveReviewPathInstructions(entries, changedPaths)→ the applicable prompt section using the manifest's ownmatchesManifestPathglob semantics;resolveReviewPromptOverrides(manifest)centralizes the null-manifest defaults for profile + path-instructions.ai-review.ts—pathGuidanceon the input;buildSystemPromptappends it.processors.ts— resolve overrides from the already-cached manifest at the AI-review call site; the per-PR glob match happens insiderunAiReviewForAdvisory(pure, no extra fetch).Closes #1345
Scope
src/only — config parse + resolver + prompt suffix + threading; no migration/OpenAPI/binding (ui:openapi:checkgreen)Validation
npm run test:ci— exit 0; 4319 tests passnpm audit --audit-level=moderate— 0 vulnerabilitiesfocus-manifest.ts,ai-review.ts,processors.ts) — incl. non-string path, missing instructions, non-public-safe, non-array, cap, and the null-manifest defaultresolveReviewPathInstructions(match / no-match / empty);resolveReviewPromptOverrides(null + non-null);buildSystemPromptappends/omitspathGuidanceSafety