Skip to content

feat: reduce skill startup context without workflow changes - #35

Merged
LaloLalo1999 merged 14 commits into
mainfrom
feat/context-pointer-skills
Oct 2, 2026
Merged

LaloLalo1999 merged 14 commits into
mainfrom
feat/context-pointer-skills

Conversation

@Sebastiangmz

@Sebastiangmz Sebastiangmz commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Objective

Apply the progressive-disclosure and context-load pattern described in Matt Pocock's Writing for Agents to OMP Pantheon. Execution turns receive only relevant skill catalog entries while OMP discovery, skill:// reads, mandatory trigger policy, project-local filtering, session behavior, and every non-skill system-prompt byte retain their previous behavior.

Implementation

  • The final before_agent_start handler parses the existing <skills> block from event.systemPrompt; it never scans a second registry.
  • The parser accepts both OMP catalog forms: standard list entries with multiline continuation text/blank separators, and custom <skill name="…">…</skill> blocks.
  • A dedicated, tool-free call to the active model selects strict, known skill names at temperature 0.
  • Certain selections render original catalog blocks in original order and accumulate during the session.
  • Switch, branch, and shutdown clear accumulated state; stale in-flight routes cannot repopulate a reset session.
  • Uncertain, malformed, unknown-name, model, credential, timeout, provider, thrown-router, or session-change failures return the exact original prompt.
  • Existing Skill[] discovery, resources_discover, manual commands, project-local skills.includeSkills, and skill:// resolution remain unchanged.

Compatibility evidence

The original six-scenario evaluation remains recorded in evals/evidence/progressive-skill-routing-2026-08-19.json: five deterministic cases match the full-catalog baseline skill set exactly; the ambiguous case restores the exact original prompt.

Correction-specific runtime evidence:

  • Neutral-CWD OMP probe routed and read using-superpowers plus playwright, opened https://example.com, and returned Example Domain; no routing fallback was logged.
  • A second turn retained both selected catalog entries and returned PERSISTENCIA_OK; no routing fallback was logged.
  • The same captured standard catalog transformed from 294 entries / 121,390 characters / approximately 30,348 tokens to 2 entries / 473 characters / approximately 119 tokens.
  • The non-skill SHA-256 digest remained identical before and after routing: 539747d80f861aa8359a7da1d9014e25c57f9e57602bccda54284bccdfba04f7.
  • A worktree-CWD probe with the existing project-local allowlist still exposed only herdr; skill://playwright remained unavailable. Its uncertain decision fell back to that one-entry local catalog, not the global catalog.

No raw prompts, credentials, private traces, or local machine paths are committed as evidence.

Verification

  • bun test: 539 pass, 1 skip, 0 fail; 1,802 assertions.
  • bun run typecheck: pass, including both extensions.
  • bun run format:check: pass; 107 files checked.
  • bun run lint: pass; 107 files checked.
  • Focused routing suite: 46 pass, 0 fail; 91 assertions.
  • EvalFly: run-smoke-20260820075730, suite smoke, 12 pass, 0 fail, 0 critical regressions, privacy sanitized, SpecSafe slice SPEC-20260820-SKILL-ROUTING-XML, commit range main..HEAD.
  • Installer smoke: pass in an isolated temporary HOME; extension/runtime and existing skill symlinks verified, temporary tree removed.
  • SpecSafe: correction slice closed PASS.
  • Final five-lens review: goal PASS, local code quality PASS, security PASS, hands-on QA PASS, repository consistency PASS. Remote-head publication is verified after the consent-gated push.

Tradeoff

Each execution turn adds one active-model routing call. The fail-open design prefers the original project-visible catalog whenever selection is uncertain, so latency/cost can increase without reducing previous skill availability or changing user-turn behavior.

Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: context-pointer-skills
Spec-Slice: SPEC-20260820-SKILL-ROUTING-XML
Spec-Slice: SPEC-20260820-SKILL-ROUTING-XML
Spec-Slice: SPEC-20260820-SKILL-ROUTING-XML
Spec-Slice: SPEC-20260820-SKILL-ROUTING-XML
@LaloLalo1999
LaloLalo1999 marked this pull request as ready for review October 2, 2026 12:44
@LaloLalo1999
LaloLalo1999 merged commit 837c6aa into main Oct 2, 2026
3 checks passed
@LaloLalo1999
LaloLalo1999 deleted the feat/context-pointer-skills branch October 2, 2026 12:44
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.

2 participants