8000 Build BM25 capability index and capability_search · Issue #16 · Observal/Axl · GitHub
[go: up one dir, main page]

Skip to content

Build BM25 capability index and capability_search #16

Closed

Description

@Haz3-jolt

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_search input 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.md bodies 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

  1. Complete ask_user_question under OBS-895.
  2. Fix compaction under OBS-902.
  3. Implement this BM25 index and Skills support.
  4. Add selected MCP tools under OBS-899.
  5. 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

Sources

Activity

  1. added
    enhancement
    api
    performance
    priority: high
    tests
    area:daemon
    on Sep 4, 2026
  2. changed the title [-]Build turn-scoped BM25 capability discovery[/-] [+]Build BM25 capability index and capability_search[/+] on Sep 14, 2026
  3. iamrishu11 commented on Sep 25, 2026

    @iamrishu11

    ig this issue is closed now? as the pr is merged .. ( found it when looking in the issue #409 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apiarea:daemonenhancementperformancepriority: hightests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0