Skip to content

Recipe-driven dynamic tool presentation: three-tier tool visibility for personas #526

Closed as not planned

Description

@joelteply

airc-queue card

Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).

{
  "kind": "airc-queue-card-v1",
  "id": "#526",
  "owner": "claude-tab-1",
  "status": "claimed",
  "evidence": "bulk-adopted from continuum unlabeled-open backlog (Joel directive 2026-05-14)",
  "next_action": "triage scope + assign or close stale"
}

Close this issue when the work is done (status=merged/abandoned).

Original issue body

Pre-adoption body

Problem

Tool presentation to personas is broken at multiple levels:

  1. Personas see a hallucinated tool list (get_current_time, get_room_info) instead of real commands
  2. 336 tools as function schemas would overwhelm context
  3. Hiding tools means personas dont know they have capabilities
  4. No connection between room recipe context and tool selection

Solution: Recipe-Driven Dynamic Tool Presentation

Three Tiers

Tier 1 - Always Visible (5-8 tools as full function schemas):

  • collaboration/chat/send
  • code/read, code/edit, code/search
  • interface/screenshot, interface/interact, interface/navigate

These are always in the native tool protocol schema. Every persona always has hands.

Tier 2 - Recipe-Surfaced (10-20 tools per context):

  • Room has a recipe. Recipe defines relevant tool groups.
  • Code room recipe: code/write, code/shell/execute, code/git, development/verify-web
  • Design room recipe: interface/interact, interface/navigate, interface/screenshot
  • Help room recipe: collaboration/chat/export, data/list
  • Intent matching within the recipe scope refines further per message

Tier 3 - Discoverable (all 336 via meta-tool):

  • A tool called "tool/discover" or "help" that searches the full command registry
  • Persona asks "what tools do I have for training?" and gets a filtered list
  • Can then call discovered tools by name even if not in initial schema

How It Works

  1. Message arrives in a room
  2. Room has a recipe (existing system)
  3. Recipe defines tool groups for this context (NEW: add toolGroups to recipe schema)
  4. RAG builder queries ToolGroupRegistry with recipe groups + message intent
  5. Matching tools are formatted as native function schemas (not just XML in prompt text)
  6. LLM sees real callable tools, not prompt decoration

What Changes

  • Recipe schema: add optional toolGroups: string[] field
  • PersonaPromptAssembler: build native tool specs from recipe + intent, not hardcoded list
  • ToolGroupRegistry: already has alwaysInclude + intent matching, just needs to output function schemas
  • Provider adapters: pass dynamic tool specs instead of static ones

The Principle

Commands are dynamic (filesystem discovery). Tool presentation must be equally dynamic. A company drops a command folder, their personas see it as a tool. No config. No restart. No hardcoded list.

Dependencies

Activity

  1. joelteply commented on Mar 26, 2026

    @joelteply
    ContributorAuthor

    Constants-only tool pipeline (from Joel):

    The generator already renders constants for command names. The ENTIRE tool pipeline should use those constants, never raw strings.

    Generator spec (source of truth)
        ↓
    Generated constant: COMMANDS.INTERFACE.SCREENSHOT = 'interface/screenshot'
        ↓
    ToolGroupRegistry references constant (not string literal)
        ↓
    RAG builder uses constant to build tool spec
        ↓
    LLM receives the tool name (from constant)
        ↓
    Tool call comes back → matched against constant
        ↓
    AgentToolExecutor dispatches via constant → ToolRegistry
    

    If you rename a command in the generator spec:

    • Constant changes
    • Build breaks at every reference
    • You fix them all
    • No grep-and-pray across 336 commands

    This connects to #351 (eliminate magic strings). The generator already does the hard part. The tool pipeline just needs to consume the constants instead of hardcoding strings.

    Ideal: it should be IMPOSSIBLE to reference a command by raw string anywhere in the tool pipeline. Only constants. TypeScript compiler enforces it.

  2. added
    airc-queue
    on May 14, 2026
  3. github-actions commented on Aug 24, 2026

    @github-actions

    This issue is stale because it has been open for 60 days with no activity. Please comment or update this issue to keep it active.

  4. github-actions commented on Sep 24, 2026

    @github-actions

    This issue was closed because it has been inactive for 30 days since being marked as stale.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    airc-queuestale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions