Skip to content

Entitled skill surface tier: resolver staging gate + leak-guard + ADR-0011 - #618

Merged
aarontrowbridge merged 5 commits into
mainfrom
skills/entitled-tier
Aug 27, 2026
Merged

Entitled skill surface tier: resolver staging gate + leak-guard + ADR-0011#618
aarontrowbridge merged 5 commits into
mainfrom
skills/entitled-tier

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #614.

Third surface tier per spec §Amendment A1 (reviewed APPROVED-WITH-ADVISORIES): surface: entitled + entitlement: <code> ships in the .vsix but stages only for sessions whose resolved entitlements include the code — prep-time, every session type, headless included. Reuses LocalEntitlementProvider (the scores' mechanism); no new entitlement plumbing. Leak guard widens to admit public + entitled while still hard-refusing internal (the repo boundary remains the internal gate). ADR-0011 documents the three-tier model.

TDD history with two findings worth noting: the synthetic-frontmatter probe caught entitlement: "" slipping through the widened regex guard (fixed — quote-strip before emptiness); settings-level bare-string root overrides stay public-only by design (a custom root wanting entitled must declare it in its surfaces list).

resolveLibrarySkills semantics for the third surface tier (spec §Amendment
A1, amicode#614; ADR-0011): surface:entitled + entitlement:<code> stages
IFF the session's resolved entitlements include the code; malformed/missing
entitlement codes follow the skip+warn philosophy (never throw); public
entries stage unconditionally; the per-root surfaces guard still applies
first. DEFAULT_LIBRARY_ROOTS in-repo root admits public + entitled.

Red here: (b) absent/wrong code still stages, (c) missing/malformed codes
still stage, DEFAULT shape still public-only. (a)/(d)/(e) pin the positive
contract + unchanged behavior and are satisfied by the same GREEN change
that fixes the gate — they guard against an implementation that skips
entitled entries entirely or drops the per-root guard.
Third surface tier (spec §Amendment A1, amicode#614; ADR-0011):
surface:entitled + entitlement:<code> stages IFF the session's resolved
entitlements include the code. The gate lives in resolveLibrarySkills
(roots, entitlements) — a PREP-time decision, not a run-gate; entitlements
come from the same LocalEntitlementProvider read the score filter already
does, passed through from prepareOpencodeProject for every session type
(headless included). Entitled is a STAGING gate, not a location: entitled
skills share the in-repo library with public ones, and DEFAULT_LIBRARY_ROOTS'
in-repo root now admits {public, entitled}. Missing/malformed entitlement
codes are skip+warn (never throw); a well-formed code the session lacks is
a silent skip. No LLM anywhere in the gating path.
The shipped-library leak guard widens to the three-tier model (spec §A1.3(b),
ADR-0011): a shipped SKILL.md must carry surface: public (loads for all) or
surface: entitled with a non-empty entitlement code (stages only for
entitled sessions) — internal, untagged, and missing tags remain offenders,
and the internal dev-workflow hard-refusal (implement-issue,
break-into-subissues) is unchanged: the repo boundary remains the internal
gate. Same widening applied to the twin source-level guard in
package_skills.test.ts. Entitlement raw values are quote-stripped before
the emptiness check so entitlement: "" reads as missing (the resolver
already refuses it at runtime — guard agrees). Both guards verified against
synthetic frontmatter: public/entitled+code admitted; entitled without a
code, quoted-empty code, internal, untagged refused.
Documents the entitled surface tier amending ADR-0003 (spec §A1 as design
of record): public (ships, loads for all) / entitled (ships in the .vsix,
stages only for entitled sessions — a staging gate, not a location; same
in-repo library as public) / internal (private vault, never ships). Covers
the safe-to-possess content policy for the entitled tier (usage-only, the
per-line usage-vs-internals test, review-time enforcement) and the
entitlement staging gate via LocalEntitlementProvider at prep time for
every session type, headless included. No LLM in the gating path.
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: da7b1e56-c835-4b79-be88-50a8d01df430


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…; name the server boot lane as the open enforcement point (review finding)
@aarontrowbridge
aarontrowbridge marked this pull request as ready for review August 27, 2026 21:45
@aarontrowbridge
aarontrowbridge merged commit b683416 into main Aug 27, 2026
8 checks passed
@aarontrowbridge
aarontrowbridge deleted the skills/entitled-tier branch August 27, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entitled skill surface tier: resolver staging gate + leak-guard update + ADR-0011

1 participant