feat(selfhost): let a review skill opt out via enabled: false frontmatter - #2590
Conversation
…matter Add isReviewSkillEnabled(text): a self-host review skill can set `enabled: false` (or no/off/0) in its frontmatter to be omitted from the review context, so an operator can turn a rubric off without deleting the file. The local review-context reader skips disabled skills. Fully backward-compatible: a skill without an `enabled` key (every existing one) stays enabled, so behavior is unchanged unless the directive is explicitly set. Cover the parse vocabulary and the reader-level omission.
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-03 02:40:13 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 4 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2590 +/- ##
=======================================
Coverage 96.10% 96.10%
=======================================
Files 237 237
Lines 26540 26545 +5
Branches 9625 9628 +3
=======================================
+ Hits 25507 25512 +5
Misses 424 424
Partials 609 609
🚀 New features to boost your workflow:
|
…ective `enabled: true # note` captured the whole value tail (`true # note`), failed the truthy test, and wrongly disabled the skill. Strip a trailing ` # …` comment before matching so an inline-commented directive reads as its bare value.
Summary
Self-host operators configure per-repo review rubrics as
review/skills/*.mdfiles (read bymakeLocalReviewContextReaderand rendered into the reviewer's context). Today the only way to stop a skill from applying is to delete the file or hand-edit itswhen:glob.This adds a small, opt-in
enabled:frontmatter directive so an operator can turn a rubric off without deleting it — useful while iterating on a rubric, or parking one temporarily:isReviewSkillEnabled(text): returnstrueunless the frontmatter sets a non-truthyenabled(false/no/off/0), matching the codebase's existing truthy-flag convention (/^(1|true|yes|on)$/i).makeLocalReviewContextReaderskips disabled skills so they never enter the review context.Fully backward-compatible: a skill with no
enabledkey — i.e. every existing skill — stays enabled, so behavior is byte-identical unless the directive is explicitly set. No new env flag is needed because the feature is self-gating per skill file.No linked issue: small, additive, backward-compatible operator convenience scoped to the self-host review-skill reader; per this repo's
linkedIssuePolicy: preferred, a direct PR with this rationale is appropriate.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run typechecknpm run test:coveragelocally; theprivate-configsuite (22 tests) passes. New tests coverisReviewSkillEnabled(default-enabled, quoted truthy, andfalse/no/0disabling) and the reader omitting anenabled: falseskill while keeping the active one. Both branches of every changed line are covered (verified via lcovBRDA); the existing skill-reader andparseReviewSkilltests are unchanged and still pass.If any required check was skipped, explain why:
src/selfhost; it changes no API schema, wrangler binding, migration, or UI, so OpenAPI/cf-typegen/migration regeneration is not applicable.Safety
Notes
isReviewSkillEnabled("---\nname: x\n---\nbody")andisReviewSkillEnabled("no frontmatter")both returntrue; only an explicit non-truthyenableddisables. So repos with noenabled:directive get identical review context to before.