Repository navigation
Description
Outcome
Build one daemon-owned, authority-filtered BM25 capability index and expose it through capability_search. Keep optional capability catalogs out of the stable prompt. Search returns compact metadata; selecting a result activates the capability additively for the current turn.
There is no fixed three-capability ceiling per turn. Any result limit is a bounded per-search input. A turn may perform additional searches, and already activated capabilities remain available through that turn's continuations.
Foundation already completed
Commit 61882b6b40f967b83dbb4a8fb3c8b4906ff37186 stabilizes the core model context, removes prompt-wide Skills disclosure and MCP runtime activation, makes active tool disclosure profile-aware, and leaves explicit failing stubs for ask_user_question and capability_search.
First supported capability kind: Agent Skills
Implement Skills as the first end-to-end consumer of the index.
A conforming skill is a directory containing SKILL.md with Agent Skills frontmatter and Markdown instructions. Optional scripts/, references/, and assets/ resources remain rooted inside the skill directory.
Discover Skills from all supported interoperability locations:
Global
~/.axl/skills/~/.agents/skills/
Project
<repo>/.axl/skills/<repo>/.agents/skills/
Project discovery walks the applicable repository-root-to-current-working-directory hierarchy in broadest-to-nearest order. Nearest project definitions override broader and global definitions by exact stable identity.
.agents is not another location for AGENTS.md. It is a shared resource convention. In this issue it means .agents/skills/ only.
Global user resources and project resources must retain distinct provenance and scope. Project-local Skills remain subject to project trust and effective daemon policy. Discovery validates metadata and containment without executing scripts or loading full skill bodies into the prompt.
Acceptance criteria
- Define one bounded normalized capability record with stable identity, kind, name, description, aliases, canonical source path, global or project scope, provenance, enabled state, trust state, required authority, and activation metadata.
- Build the disposable BM25 index only from enabled, available, trusted, and granted records. Disabled or denied resources contribute no prompt content, tool schema, UI, or background work.
- Implement typed
capability_searchinput and output. Exact names and aliases rank first, project scope breaks equivalent scores, and deterministic BM25 scoring handles the remaining candidates. - Bound query length and per-search result count. Do not impose a fixed total-capabilities-per-turn ceiling.
- Return compact metadata and canonical paths only. Do not return full
SKILL.mdbodies or executable resource contents from search. - Activate selected capabilities additively for the current user-authored turn and preserve the activation set through every continuation in that turn.
- Record searches, selected identities, activation, denial, and effective model-visible additions canonically so replay reconstructs the request.
- Implement Agent Skills as the first capability kind, including required
SKILL.md, optional resource directories, frontmatter validation, duplicate precedence, containment checks, and exact diagnostics. - Discover global Skills from both
~/.axl/skills/and~/.agents/skills/. - Discover project Skills from both
.axl/skills/and.agents/skills/along the applicable repository-root-to-working-directory hierarchy. - Load full skill instructions only after explicit selection or activation. Never restore the prompt-wide skill catalog.
- Add deterministic tests for ranking, aliases, thresholds, per-search limits, repeated search, additive turn activation, continuation stability, canonical logging, global and project precedence,
.agents/skills, trust filtering, malformed metadata, symlink escape rejection, and disabled zero contribution.
Sequencing
- Complete
ask_user_questionunder OBS-895. - Fix compaction under OBS-902.
- Implement this BM25 index and Skills support.
- Add selected MCP tools under OBS-899.
- Build the daemon runtime extension surface under OBS-922 and related extension issues.
Boundaries
- The daemon owns discovery, trust filtering, indexing, activation, and canonical events.
- The kernel retains policy enforcement and turn ownership.
- Provider-specific tool rendering remains in
packages/ai. - Clients only render SDK projections and submit typed intent.
- Do not add embeddings, a vector database, provider-native search, a generic untyped execution gateway, or automatic script execution during discovery.
Verification
Use fixed local fixtures and deterministic scoring assertions. Verify exact model requests, canonical events, replay, trust denial, and disabled behavior.
Related work
- OBS-895: interactive
ask_user_question - OBS-902: deterministic compaction
- OBS-899: selected MCP tool schemas
- OBS-922: capability-scoped runtime extension API
- Build BM25 capability index and capability_search #16: capability discovery
- Expose selected MCP tools through provider-native schemas #21: MCP tool selection
- Implement the capability-scoped runtime extension API with real consumers #44: runtime extensions
Sources
- Agent Skills specification: https://agentskills.io/specification
- AGENTS.md convention: https://agents.md/
- Axl issue mirror: Build BM25 capability index and capability_search #16
Activity
[-]Build turn-scoped BM25 capability discovery[/-][+]Build BM25 capability index and capability_search[/+]iamrishu11 commentedon Sep 25, 2026
ig this issue is closed now? as the pr is merged .. ( found it when looking in the issue #409 )