Skip to content

docs(ai): search the knowledge base on every tooling failure and record every fix #1276

Backlog

Description

@steward-warden

Problem

Agents hardly ever use the knowledge-base MCP server (kb, tools mcp__kb__*). Across both orchestrator owners over two days there were 2 calls in total, both searches. Over the same period the build MCP was called more than 400 times. Every agent has the kb grant, and the calls that were made worked, so the server is reachable.

The instructions only ask for the knowledge base in two places:

  • ai/global/learnings.instructions.md P1, and agent-roles.instructions.md P8: search it before adding Blocked for a tooling problem. Sessions rarely get as far as blocking, so this almost never happens.
  • learnings.instructions.md P3: record a learning as a note. This depends on the agent deciding that something counts as a learning, and it seldom does.

So agents fix the same build, analyzer, restore and hook errors from scratch in every repository, and recorded fixes go unused.

Evidence

  • Daily MCP usage counts from agent session transcripts, both owners:
    • 24 Nov: 0 kb calls, against 458 build-MCP calls.
    • 25 Nov so far: 2 kb calls.
  • The rules that mention the knowledge base: ai/global/learnings.instructions.md P1/P3 and ai/global/agent-roles.instructions.md P8. Each one fires only on block or on an explicit "learning".

Proposed change

  1. Search first. When a build, test, analyzer, restore, lint or commit-hook step fails, search the knowledge base for the error text (the diagnostic ID or message), the project type and the setting involved. Do this BEFORE attempting a fix, not only before blocking. Apply a recorded fix when one matches.
  2. Record every fix. When a tooling, build, analyzer, restore or hook error has been fixed, add or update a knowledge-base note in the same phase. This step is required, not optional. The note holds the symptom (the error text), the exact fix, and where it was proven. Search first, so an existing note gets updated rather than duplicated.
  3. Keep the existing before-blocking search as a final check.
  4. Mirror the change in the agent definitions (orchestrator, code-writer, code-fixer, ci-debugger, code-tester) so that sub-agents follow it as well.

Acceptance criteria

  • learnings.instructions.md and agent-roles.instructions.md say to search the knowledge base on any failure of the steps listed above, before trying a fix.
  • They say to add or update a note after fixing such an error, in the same phase.
  • The ai-instructions lint passes.
  • After the reconcile run, kb calls show up daily in the agents' MCP usage.

Activity

  1. added
    AI-Work
    High
    Enhancement
    Blocked
    on Nov 25, 2026
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

    AI-WorkBlockedEnhancementHigh

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions