Proposal: scope-based skill resolution and organizational inheritance for primitives #1722
RudsonCarvalho
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Picture a multinational group. The HQ platform team publishes a global
code-reviewskill (or a compliance / data-handling instruction set) as an APM package. Each subsidiary then needs to narrow it for local rules — GDPR in the EU entity, central-bank reporting requirements in another, sector regulators elsewhere. The base is 90% shared; only the regulatory delta differs per country.Today the only way to express that delta is copy-and-modify: fork the package, edit a few lines, re-publish under a new name. The cost shows up later:
acme-br/code-reviewisacme/code-reviewplus a regional override.Why APM is the right layer
APM already owns the primitives that make this tractable: version pinning,
apm.lock.yamlfor provenance, registries/marketplaces for distribution, and policy composition. Crucially, APM already does hierarchical inheritance — on the policy plane:apm-policy.ymlsupportsextends:with a tighten-only merge across the enterprise-hub → org → repo chain (up to 5 levels deep), with a deterministic merge-rule table and detectable lineage.So scope-based resolution isn't an alien concept here — the machinery exists for policy. The proposal is to offer an analogous, opt-in model for primitives (skills, instructions, prompts), where the merge semantics differ: instead of tighten-only allow/deny, it's most-specific-wins override plus non-overridable invariants declared by the parent scope.
Proposed concept
apm.lock.yamlrecords which scope each resolved primitive came from, so the base→override relationship is auditable rather than implied by a fork.A strawman
apm.yml. Note which lines are existing syntax vs. proposed:Open questions
apm-policy.yml's tighten-only merge — one composition engine for both planes, or two with shared lineage?This overlaps with the governance/composition direction in #148 and the monorepo-scoping question in #1546 — happy to fold it into either if maintainers feel it fits better there.
I explored this pattern (Hierarchical Skill Resolution) in more depth here: https://doi.org/10.5281/zenodo.20619456
Beta Was this translation helpful? Give feedback.
All reactions