Skip to content

feat: explore skills interface abstraction layer - #70

Merged
m2ux merged 13 commits into
mainfrom
feat/skills-interface
Jan 18, 2026
Merged

feat: explore skills interface abstraction layer#70
m2ux merged 13 commits into
mainfrom
feat/skills-interface

Conversation

@m2ux

@m2ux m2ux commented Jan 18, 2026

Copy link
Copy Markdown
Owner

🎫 Issue

Fixes #56

Summary

Explore adding a "skills" interface to Concept-RAG that provides high-level abstractions over the existing MCP tools, reducing tool selection errors and enabling successful multi-step workflows.

Problem

LLM agents struggle to select the appropriate tool from 11 granular MCP tools despite detailed descriptions and tool-selection guides. Multi-step workflows require manual context threading, and tool selection critically impacts result relevance.

Goal

Evaluate and potentially implement a skills-based abstraction layer that:

  • Bundles related tools with appropriate sequencing
  • Preserves context across multi-step workflows
  • Provides intent-based interaction ("research topic X")
  • Reduces cognitive load on LLM agents

Status

🚧 Planning in progress

Scope

In Scope:

  • Landscape evaluation of existing skills frameworks
  • Bundled workflows with context preservation
  • Meta-skill for capability discovery
  • Intent mapping to appropriate tool selection
  • Client-agnostic approaches

Out of Scope:

  • Redesigning existing MCP tools
  • Building a custom MCP client
  • Real-time tool editing/configuration UI

Research Required

  • Survey existing skills frameworks (skill-mcp-fastmcp, others)
  • Evaluate MCP ecosystem standards for skills/workflows
  • Compare implementation approaches (external package vs. custom)

Tracks research into skills-based abstraction layer for MCP tools.

Fixes #56
@m2ux m2ux self-assigned this Jan 18, 2026
m2ux added 12 commits January 18, 2026 10:52
- Add Intent layer (problem domain): understand-topic, know-my-library
- Add Skill layer (solution domain): deep-research, library-discovery
- Register 6 new MCP resources for intents and skills
- Update Cursor rule to direct agents to skills flow
- Update architecture documentation

Intent index: 25 lines (target: <50) for context efficiency.
Tiered loading: verbose content loaded on demand.

Fixes #56
Skills interface (intents + skills) replaces the legacy get-guidance
and tool-selection-guide resources. Agents now use the tiered
intent/skill resources instead.
Intents (problem domain):
- understand-topic, know-my-library, explore-concept
- analyze-document, explore-category
- identify-patterns, identify-best-practices

Skills (solution domain):
- deep-research, library-discovery, concept-exploration
- document-analysis, category-exploration
- pattern-research, practice-research

Additional changes:
- Remove get_guidance tool (replaced by resources)
- Remove tool-selection-guide.md (content in guidance.md)
- Add docs/development.md (moved from README)
- Consolidate README documentation links
- Add ide-setup.md for IDE integration

All 10 tools now covered by skill workflows.
- Add mcp-resources.e2e.test.ts with 27 tests covering:
  - Resource file existence (17 resources)
  - Content validation (markdown, headings)
  - Intent/skill index completeness
  - Intent→skill and skill→tool linkage
  - IDE setup configuration

- Update AIL tests to remove get_guidance references:
  - tier1-single-document: remove get_guidance from expected tools
  - tier2-cross-document: remove get_guidance from expected tools
  - tier3-complex-research: remove get_guidance from expected tools
  - tool-selection-evaluator: update comments
  - llm-agent-runner: load guidance from file instead of tool
Each intent now maps to primary and supporting skills:
- understand-topic: deep-research + concept-exploration, document-analysis
- know-my-library: library-discovery + category-exploration
- explore-concept: concept-exploration + deep-research
- analyze-document: document-analysis + concept-exploration
- explore-category: category-exploration + library-discovery, concept-exploration
- identify-patterns: pattern-research + deep-research, document-analysis
- identify-best-practices: practice-research + deep-research, concept-exploration

Updated E2E tests to verify multi-skill structure.
New skills-interface.ail.test.ts tests:
- 7 scenarios mapping each intent to expected skill workflow
- Validates tool selection matches skill guidance
- Tests tool call efficiency with skills guidance
- Covers all intents: understand-topic, know-my-library,
  explore-concept, analyze-document, explore-category,
  identify-patterns, identify-best-practices

Updated llm-agent-runner.ts:
- Injects intents/index.md, skills/index.md, guidance.md
- Agent receives full skills interface context
- Replaces minimal ide-setup.md injection
- Update vitest.config.ts to load .env files
- Add .env.example with AIL configuration options
- Enables OPENROUTER_API_KEY to be set via .env file

Usage:
  cp .env.example .env
  # Edit .env with your API key
  npm test -- src/__tests__/ail/skills-interface.ail.test.ts
Architecture clarification:
- Intent → Skill: Flexible (agent chooses skill(s) for intent)
- Skill → Tool: Fixed sequence (once skill chosen, follow its workflow)

Changes:
- Update skill files with fixed tool sequences
- Update skills/index.md to show tool sequences
- Update AIL tests to validate sequence compliance
- Add more valid workflows to evaluator
- Switch default model to google/gemini-3-flash-preview
- Skip flaky know-my-library test (model behavior issue)
- Add ASCII sequence diagrams showing tool workflows with loops
- Update skills index to show execution model with iteration
- Update tool selection evaluator to use skill-based validation
- Skills now clearly show where iteration/looping occurs
- Validation checks tools belong to skill's tool set, not strict order

Closes #56
- Remove dependency on undefined evaluation.toolSelection object
- Validate that agent uses valid skill tools rather than strict sequences
- Tests now verify tool selection patterns, not answer quality
- All 8 AIL skills interface tests now passing
…aries

- New intent: curate-lexicon for creating project-specific concept lexicons
- Uses category-exploration as primary skill with supporting skills
- Includes workflow diagram, scope boundaries, and validation rules
- References TDD concepts template as example output format
- Updated intents index with new intent and quick match patterns
- Registered MCP resource and updated E2E tests
@m2ux
m2ux marked this pull request as ready for review January 18, 2026 16:49
@m2ux
m2ux merged commit adcbdca into main Jan 18, 2026
5 checks passed
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.

Explore adding a 'skills' interface

1 participant