Skip to content

feat: MCP progressive disclosure — guide tools, sampling, skills knowledge base#31

Merged
TomProkop merged 17 commits into
masterfrom
feature/mcp-progressive-disclosure
Apr 27, 2026
Merged

feat: MCP progressive disclosure — guide tools, sampling, skills knowledge base#31
TomProkop merged 17 commits into
masterfrom
feature/mcp-progressive-disclosure

Conversation

@TomProkop
Copy link
Copy Markdown
Member

@TomProkop TomProkop commented Apr 27, 2026

Summary

Replaces 97 static MCP tools with 9 always-on tools implementing progressive disclosure via domain-specific guide tools with MCP sampling, a same-turn execution bridge, and an embedded skills knowledge base.

Problem

  • 97 tools exposed statically — 76% of the VS Code/Copilot 128-tool hard cap
  • Context bloat from tool schemas (~55K tokens)
  • Poor AI steering — terse descriptions, confusable local vs live operations

Architecture

9 always-on tools:

Tool Purpose
guide Cross-domain sampling-based discovery with recipe generation
guide_workspace LOCAL dev — "instant and reversible, prefer this"
guide_environment LIVE environment — "requires profile, 30s-5min"
guide_deployment Deployment lifecycle
guide_data LIVE data operations
guide_config CLI configuration
execute_operation Same-turn bridge (destructiveHint: true)
get_skill_details Public knowledge base (14 skills)
copilot-instructions Project setup (user-customizable defaults)

Key Features

  • MCP Sampling (server.SampleAsync()) — required for tool selection. No keyword fallback.
  • Recipe generation — guides produce multi-step plans with concrete execute_operation calls, validation checkpoints, and error recovery
  • Local-first steering — sampling prompts encode preference for workspace ops over environment ops
  • Two-tier skills — 7 internal (proprietary reasoning in sampling prompts, never exposed) + 14 public (via get_skill_details + txc docs)
  • [CliLongRunning] + [CliWorkflow] attributes — zero MCP project changes when adding CLI commands
  • Roslyn analyzers TXC010-TXC013 — enforce description quality, profiled command context, destructive signaling, workflow classification
  • txc docs list/show CLI commands for dual delivery
  • Destructive operation safety — verified end-to-end (annotations → --yes enforcement → production protection)
  • Build error recovery skill — maps TALXISXSD001, TALXISGUID001 codes to fixes

New files

  • ToolCatalog.cs — pre-cached schemas, workflow tagging, sampling prompts
  • ActiveToolSet.cs — session-scoped tool management with LRU eviction
  • GuideHandler.cs — sampling + recipe generation + tool injection
  • GuideReasoningEngine.cs — loads internal skills for guide sampling context
  • PublicSkillLoader.cs — loads public skills from embedded resources
  • Skills/Internal/ — 7 proprietary reasoning skills (decision trees)
  • Features.Docs/Skills/ — 14 public skills + index.json
  • Features.Docs/DocsListCliCommand.cs + DocsShowCliCommand.cs
  • 4 Roslyn analyzers (TXC010-TXC013)
  • [CliLongRunning], [CliWorkflow] attributes in Core

Breaking changes

  • list_tools now returns 9 always-on tools (was 97 static tools)
  • McpToolDescriptorProvider removed — replaced by ToolCatalog
  • data_package_convert hidden (removed from CLI command tree, unfinished)
  • Clients must support MCP sampling — no keyword fallback

Validated

  • Live Copilot CLI session: recipe generation, guide scoping, execute_operation, skills
  • 3 code reviews + destructive safety audit
  • All review threads resolved
  • 483 unit tests + 26 integration tests passing (7 pre-existing integration failures on master due to template package discovery)

TomProkop and others added 8 commits April 27, 2026 15:56
- Improve 31 tool descriptions for AI steering (LOCAL/LIVE context, profile
  requirements, cross-references for confusable pairs)
- Add ToolCatalog: pre-built schemas, workflow tagging, sampling prompt
  generation, category derivation
- Add ActiveToolSet: session-scoped tool management with always-on tools,
  LRU eviction for injected tools, thread safety
- Refactor McpToolRegistry to populate ToolCatalog at startup with
  pre-cached schemas (no longer rebuilt on every ListTools call)
- Add static BuildToolDefinition helper for guide tool injection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…e disclosure

Replace static 97-tool list_tools with 8 always-on tools:
- guide: cross-domain tool discovery via sampling/createMessage
- guide_workspace: LOCAL development (scaffolding, workspace understanding)
- guide_environment: LIVE environment inspection and mutation
- guide_deployment: deployment lifecycle (pack, import, publish)
- guide_data: LIVE data operations (queries, CRUD, bulk, CMT)
- guide_config: CLI configuration (auth, profiles, connections)
- execute_operation: bridge for same-turn execution of discovered tools
- copilot-instructions: unchanged

Guide tools use MCP sampling to delegate tool selection to the client's
LLM with local-first development steering. Falls back to keyword
matching when sampling is unavailable.

Discovered tools are injected into ActiveToolSet for direct calling
on subsequent turns (client re-fetches list_tools between turns).

execute_operation validates against the full internal catalog (not just
active set) enabling same-turn execution of guide-discovered tools.

ServerInstructions rewritten with workflow map and local-first guidance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… public guidance

Internal reasoning skills (src/TALXIS.CLI.MCP/Skills/Internal/):
- 6 proprietary markdown files NOT exposed to clients
- local-first-philosophy, schema-workflow, deployment-sequence,
  troubleshooting-patterns, data-migration-workflow, solution-management
- Loaded by GuideReasoningEngine at startup, injected into guide
  sampling prompts for context-aware tool selection

Public skills (src/TALXIS.CLI.Features.Docs/Skills/):
- 8 developer-facing skill files + index.json manifest
- project-structure, component-creation, solution-layering,
  deployment-workflow, data-migration, troubleshooting,
  environment-management, schema-management
- Accessible via get_skill_details MCP tool (new always-on tool)
- Embedded as assembly resources, shipped via NuGet

Infrastructure:
- GuideReasoningEngine: loads internal skills, maps them to domain guides
- PublicSkillLoader: loads public skills from Features.Docs assembly
- get_skill_details handler with skill index in description
- Guide sampling prompts now include relevant internal skills
- Integration test updated to verify get_skill_details in always-on set

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wire DocsCliCommand into root command tree with two subcommands:
- txc docs list: lists available skills from embedded index.json
- txc docs show <skill-id>: prints full skill markdown content

Both commands read from the same embedded resources as the MCP
get_skill_details tool, providing dual delivery (CLI + MCP).

Uses project conventions: TxcLeafCommand, OutputFormatter,
ExitSuccess/ExitError/ExitValidationError, TxcJsonOptions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests (32 new, 509 total passing):
- ToolCatalogTests: 12 tests — registration, workflow filtering, catalog
  prompts, category/workflow derivation
- ActiveToolSetTests: 10 tests — always-on, injection, LRU eviction,
  thread safety, IsActive
- GuideReasoningEngineTests: 5 tests — skill loading, context mapping
- McpToolRegistryTests: 4 new tests — catalog population, pre-built
  schemas, workflow tags, prompt generation

Documentation:
- README.md: progressive disclosure architecture, 9 always-on tools,
  workflow, skills tiers, local-first philosophy
- architecture.md: MCP server progressive disclosure behavior,
  ActiveToolSet, sampling, execute_operation bridge, skills

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…de scoping

Bug 1 (High): execute_operation passed outer params to task-augmented
execution instead of parsed inner tool arguments. Added overrideArguments
parameter to ExecuteAsTaskAsync so long-running tools (solution import,
package import) receive correct arguments when invoked via the bridge.

Bug 2 (Medium): guide_environment with a query dispatched to the generic
unscoped handler, making it identical to guide. Now searches both
environment-inspection and environment-mutation workflows and merges
results, maintaining proper domain scoping.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix 1: Replace hardcoded _longRunningCommandTypes with [CliLongRunning] attribute
Fix 2: Add [CliWorkflow] attribute with heuristic fallback for workflow classification
Fix 3: Eliminate McpToolDescriptorProvider (dead parallel state)
Fix 4: Remove dead McpToolRegistry.ListTools() method
Fix 5: Remove dead PublicSkillLoader.GetIndex() method
Fix 6: Consolidate duplicate BuildGuidanceFromEntries into GuideHandler
Fix 7: Parallelize guide_environment and remove format-dependent filtering
Fix 8: Set ListChanged = false (honest about capabilities)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…flow enforcement

TXC010 (Error): Leaf [CliCommand] Description must be >= 20 chars.
  Prevents empty/terse descriptions that degrade AI tool discovery.

TXC011 (Warning): ProfiledCliCommand subclass description should mention
  'profile' or 'environment'. Ensures AI harnesses know prerequisites.
  Currently flags ~20 commands from PRs #25/#29 that need description updates.

TXC012 (Warning): [CliDestructive] description should contain danger words
  (delete, remove, uninstall, etc.). Ensures both humans and AI see risk.

TXC013 (Warning): Commands in TALXIS.CLI.Features.Data without [CliWorkflow]
  get a warning. Prevents workflow misclassification by name heuristic.

Also: add [CliWorkflow("local-development")] to DataModelConvert and
DataPackageConvert to resolve TXC013 warnings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements MCP progressive disclosure for txc-mcp by introducing a session-scoped active tool set, guide-based discovery (with sampling), a same-turn execute_operation bridge, and an embedded skills knowledge base (internal + public).

Changes:

  • Added ToolCatalog (pre-built schemas + workflow tagging) and ActiveToolSet (always-on + LRU-injected tools) to reduce tool-list bloat.
  • Implemented guide tooling (guide*) with sampling-based selection + keyword fallback, plus execute_operation and get_skill_details.
  • Added public skills + txc docs list/show, internal reasoning skills, and new Roslyn analyzers (TXC010–TXC013) to enforce tool/command metadata quality.

Reviewed changes

Copilot reviewed 80 out of 80 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/TALXIS.CLI.Tests/MCP/ToolCatalogTests.cs Adds unit coverage for catalog registration, workflow derivation, and prompts.
tests/TALXIS.CLI.Tests/MCP/McpToolRegistryTests.cs Updates registry tests to validate catalog-driven tool building and metadata.
tests/TALXIS.CLI.Tests/MCP/McpServerProtocolTests.cs Switches MCP protocol tests to use catalog-derived tool definitions.
tests/TALXIS.CLI.Tests/MCP/GuideReasoningEngineTests.cs Adds tests for loading internal embedded skill resources and guide mappings.
tests/TALXIS.CLI.Tests/MCP/ActiveToolSetTests.cs Adds tests for always-on tools, injection behavior, and LRU eviction.
tests/TALXIS.CLI.IntegrationTests/McpTests.cs Updates integration test expectations to the always-on tool set at startup.
src/TALXIS.CLI/TxcCliCommand.cs Adds txc docs command group into the CLI root command tree.
src/TALXIS.CLI.MCP/ToolCatalog.cs Introduces internal catalog with cached prompts, schema caching, and workflow tagging.
src/TALXIS.CLI.MCP/TALXIS.CLI.MCP.csproj Embeds internal skills and references the Docs feature assembly.
src/TALXIS.CLI.MCP/Skills/Internal/troubleshooting-patterns.md Adds internal troubleshooting decision trees for sampling prompts.
src/TALXIS.CLI.MCP/Skills/Internal/solution-management.md Adds internal solution-management guidance for sampling prompts.
src/TALXIS.CLI.MCP/Skills/Internal/schema-workflow.md Adds internal local schema workflow guidance for sampling prompts.
src/TALXIS.CLI.MCP/Skills/Internal/local-first-philosophy.md Adds internal local-first steering content for sampling prompts.
src/TALXIS.CLI.MCP/Skills/Internal/deployment-sequence.md Adds internal deployment sequencing guidance for sampling prompts.
src/TALXIS.CLI.MCP/Skills/Internal/data-migration-workflow.md Adds internal data migration workflow guidance for sampling prompts.
src/TALXIS.CLI.MCP/README.md Documents progressive disclosure architecture and skills tiers.
src/TALXIS.CLI.MCP/PublicSkillLoader.cs Loads public skills index/content from embedded resources in Docs assembly.
src/TALXIS.CLI.MCP/Program.cs Reworks MCP server to expose only active tools; adds guides, bridge execution, and skills tool.
src/TALXIS.CLI.MCP/McpToolRegistry.cs Replaces descriptor provider with catalog population + attribute-derived metadata.
src/TALXIS.CLI.MCP/McpToolDescriptorProvider.cs Removes obsolete descriptor provider in favor of ToolCatalog.
src/TALXIS.CLI.MCP/GuideReasoningEngine.cs Loads internal embedded skills and returns guide-scoped prompt context.
src/TALXIS.CLI.MCP/GuideHandler.cs Implements sampling-based/keyword-based tool discovery and injection into active set.
src/TALXIS.CLI.MCP/ActiveToolSet.cs Adds thread-safe active tool management with LRU eviction for injected tools.
src/TALXIS.CLI.Features.Workspace/ComponentTypeListCliCommand.cs Improves command description to emphasize local-only behavior.
src/TALXIS.CLI.Features.Workspace/ComponentParameterListCliCommand.cs Improves command description and local scaffolding guidance.
src/TALXIS.CLI.Features.Workspace/ComponentCreateCliCommand.cs Improves command description with local-first and discovery steps.
src/TALXIS.CLI.Features.Environment/Solution/SolutionUninstallCliCommand.cs Marks uninstall as long-running for task-augmented MCP execution.
src/TALXIS.CLI.Features.Environment/Solution/SolutionImportCliCommand.cs Marks import as long-running and clarifies live/profile requirements.
src/TALXIS.CLI.Features.Environment/Solution/SolutionExportCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Solution/SolutionDeleteCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Solution/SolutionCreateCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Setting/SettingUpdateCliCommand.cs Clarifies environment vs local settings in description.
src/TALXIS.CLI.Features.Environment/Setting/SettingListCliCommand.cs Clarifies environment vs local settings in description.
src/TALXIS.CLI.Features.Environment/Package/PackageUninstallCliCommand.cs Marks uninstall as long-running for task-augmented MCP execution.
src/TALXIS.CLI.Features.Environment/Package/PackageImportCliCommand.cs Marks import as long-running for task-augmented MCP execution.
src/TALXIS.CLI.Features.Environment/Entity/EntityListCliCommand.cs Clarifies live/profile requirements and local alternative in description.
src/TALXIS.CLI.Features.Environment/Entity/EntityDescribeCliCommand.cs Clarifies live/profile requirements and intended usage in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordUploadFileCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordUpdateCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordGetCliCommand.cs Clarifies live/profile requirements and discovery guidance in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordDownloadFileCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordDisassociateCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordDeleteCliCommand.cs Clarifies permanence/confirmation expectations in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordCreateCliCommand.cs Clarifies live/profile requirements and local alternative in description.
src/TALXIS.CLI.Features.Environment/Data/Record/EnvDataRecordAssociateCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Query/EnvDataQuerySqlCliCommand.cs Clarifies read-only/live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Query/EnvDataQueryODataCliCommand.cs Clarifies live/profile requirements and usage guidance in description.
src/TALXIS.CLI.Features.Environment/Data/Query/EnvDataQueryFetchXmlCliCommand.cs Clarifies live/profile requirements and usage guidance in description.
src/TALXIS.CLI.Features.Environment/Data/Bulk/EnvDataBulkUpsertCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Bulk/EnvDataBulkUpdateCliCommand.cs Clarifies live/profile requirements in description.
src/TALXIS.CLI.Features.Environment/Data/Bulk/EnvDataBulkCreateCliCommand.cs Clarifies live/profile requirements and input guidance in description.
src/TALXIS.CLI.Features.Docs/TALXIS.CLI.Features.Docs.csproj Embeds public skills and adds needed project references.
src/TALXIS.CLI.Features.Docs/Skills/troubleshooting.md Adds public troubleshooting skill content.
src/TALXIS.CLI.Features.Docs/Skills/solution-layering.md Adds public solution layering/segmentation skill content.
src/TALXIS.CLI.Features.Docs/Skills/schema-management.md Adds public live schema CRUD guidance skill content.
src/TALXIS.CLI.Features.Docs/Skills/project-structure.md Adds public repository/workspace structure guidance skill content.
src/TALXIS.CLI.Features.Docs/Skills/index.json Adds skills index used by txc docs and get_skill_details.
src/TALXIS.CLI.Features.Docs/Skills/environment-management.md Adds public environment/profile setup guidance skill content.
src/TALXIS.CLI.Features.Docs/Skills/deployment-workflow.md Adds public deployment workflow guidance skill content.
src/TALXIS.CLI.Features.Docs/Skills/data-migration.md Adds public data migration guidance skill content.
src/TALXIS.CLI.Features.Docs/Skills/component-creation.md Adds public local component scaffolding guidance skill content.
src/TALXIS.CLI.Features.Docs/DocsShowCliCommand.cs Implements txc docs show to display a skill by id.
src/TALXIS.CLI.Features.Docs/DocsListCliCommand.cs Implements txc docs list to list available skills from index.
src/TALXIS.CLI.Features.Docs/DocsCliCommand.cs Adds txc docs command group routing to list/show.
src/TALXIS.CLI.Features.Data/DataPackageImportCliCommand.cs Adds long-running + workflow metadata; improves live/profile description.
src/TALXIS.CLI.Features.Data/DataPackageExportCliCommand.cs Adds workflow metadata; improves live/profile description.
src/TALXIS.CLI.Features.Data/DataPackageConvertCliCommand.cs Adds workflow metadata; clarifies local-only transform behavior.
src/TALXIS.CLI.Features.Data/DataModelConvertCliCommand.cs Adds workflow metadata for correct catalog classification.
src/TALXIS.CLI.Features.Config/Setting/SettingSetCliCommand.cs Clarifies local vs live settings in description.
src/TALXIS.CLI.Features.Config/Setting/SettingListCliCommand.cs Clarifies local vs live settings in description.
src/TALXIS.CLI.Features.Config/Setting/SettingGetCliCommand.cs Clarifies local vs live settings in description.
src/TALXIS.CLI.Core/Shared/CliWorkflowAttribute.cs Adds workflow classification attribute for commands.
src/TALXIS.CLI.Core/Shared/CliLongRunningAttribute.cs Adds long-running attribute for task support classification.
src/TALXIS.CLI.Analyzers/WorkflowRecommendedAnalyzer.cs Adds TXC013 to recommend explicit workflow for ambiguous data_ tools.
src/TALXIS.CLI.Analyzers/ProfiledDescriptionAnalyzer.cs Adds TXC011 to enforce profiled command prerequisite signaling.
src/TALXIS.CLI.Analyzers/DiagnosticIds.cs Registers TXC010–TXC013 diagnostic IDs.
src/TALXIS.CLI.Analyzers/DestructiveDescriptionAnalyzer.cs Adds TXC012 to ensure destructive commands signal danger in descriptions.
src/TALXIS.CLI.Analyzers/DescriptionQualityAnalyzer.cs Adds TXC010 enforcing minimum description length for leaf commands.
src/TALXIS.CLI.Analyzers/AnalyzerReleases.Unshipped.md Documents new analyzer rules for release tracking.
docs/architecture.md Documents progressive disclosure architecture in txc-mcp.

Comment thread src/TALXIS.CLI.MCP/ActiveToolSet.cs Outdated
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs Outdated
Comment thread docs/architecture.md Outdated
Comment thread src/TALXIS.CLI.MCP/README.md
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs
Comment thread src/TALXIS.CLI.MCP/Program.cs
Comment thread src/TALXIS.CLI.MCP/Program.cs
Comment thread src/TALXIS.CLI.MCP/Program.cs
- Remove ListChanged property from ToolsCapability
- Remove (CallToolResult, bool ToolsInjected) tuple pattern from guide handlers
- Change ActiveToolSet.InjectTools return type from bool to void
- Remove all listChanged/toolsInjected references from code and docs
- Change top parameter schema type from number to integer with defensive parsing
- Remove type constraint from arguments schema in execute_operation
- Catch JsonException specifically and exclude raw input from error messages
- Update BuildGuidanceResponse trailing message for eviction awareness
- Update tests to match new void InjectTools signature

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 80 out of 80 changed files in this pull request and generated 6 comments.

Comment thread src/TALXIS.CLI.MCP/Program.cs
Comment thread src/TALXIS.CLI.MCP/Program.cs
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs
Comment thread src/TALXIS.CLI.Analyzers/ProfiledDescriptionAnalyzer.cs
Comment thread tests/TALXIS.CLI.Tests/MCP/GuideReasoningEngineTests.cs Outdated
TomProkop and others added 4 commits April 27, 2026 22:16
Skills deduplication:
- Internal skills rewritten as pure decision trees (no duplicated prose)
- Public skills enriched with concrete examples, common scenarios, anti-patterns

New skills (5 public + 1 internal):
- plugin-development: project structure, registration, stages, testing
- form-xml-reference: XML hierarchy, ClassID table, dialog forms, fragments
- custom-api-development: XML structure, type codes, plugin backing
- bpf-development: BPF entities, stages, branching, workflow metadata
- pcf-controls: manifest, lifecycle methods, dataset vs field controls
- component-composition-chains: multi-step scaffolding decision trees

PR feedback round 2:
- execute_operation rejects MCP-specific in-process tools with clear error
- Compact listing (no schemas) for workflow browse / empty query responses
- Full schemas only for specific tool matches via query/sampling
- ProfiledDescriptionAnalyzer message lists all 4 accepted keywords
- GuideReasoningEngine test uses >= instead of exact count

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Recipe generation:
- Guide sampling prompt now produces multi-step recipes with concrete
  execute_operation calls, parameter values, and validation checkpoints
- SampleToolSelectionAsync returns (tools, recipeText) tuple
- BuildGuidanceResponse prepends RECIPE section when recipe available
- MaxTokens increased to 1500 for recipe content
- Keyword fallback still works (no recipe, just tools)

Skill trimming (-728 lines net):
- Removed template parameter listings from public skills (AI discovers
  via workspace_component_parameter_list at runtime)
- Removed XML schema details, ClassID tables, form hierarchy details
- Kept: composition chains, decision trees, architecture decisions
- Skills now 30-60 lines each (was 70-150)

Copilot-instructions slimmed:
- Kept: Project Structure and Naming Conventions (user-customizable defaults)
- Removed: verbose MANDATORY operational rules (now in ServerInstructions)
- Replaced with brief pointer to MCP guides

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
New public skill: build-errors.md
- Maps TALXISXSD001, TALXISGUID001, TALXISQF001, TALXISPCF001,
  TALXISJSONSCHEMA001 to causes and fixes
- Includes structural rules (name lengths, GUID patterns, required elements)

Internal skill trimming:
- component-composition-chains.md: 194 → 35 lines
- Removed parameter listings, XML details, tool-discoverable content
- All 7 internal skills verified under 80 lines, pure decision trees

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keyword matching was a low-quality fallback that produced wrong results
(e.g., environment_entity_create ranked above workspace_component_create
for 'create a table'). Sampling is required since Copilot CLI v1.0.13.

Changes:
- DiscoverToolsAsync/DiscoverToolsWithScopedCatalogAsync now throw
  InvalidOperationException if sampling returns no results
- Removed KeywordMatch method entirely
- Removed word-by-word fallback extraction from sampling response parser
- Clients without sampling support get a clear error message

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TomProkop TomProkop requested a review from Copilot April 27, 2026 22:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 88 out of 88 changed files in this pull request and generated 7 comments.

Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs Outdated
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs Outdated
Comment thread src/TALXIS.CLI.MCP/Program.cs
Comment thread tests/TALXIS.CLI.Tests/MCP/ToolCatalogTests.cs
Comment thread src/TALXIS.CLI.MCP/GuideHandler.cs
Comment thread tests/TALXIS.CLI.Tests/MCP/McpServerProtocolTests.cs
TomProkop and others added 4 commits April 28, 2026 00:49
Remove DataPackageConvertCliCommand from parent Children array so it's
unreachable from both CLI and MCP. Clean all references from:
- data-migration.md (public skill)
- data-migration-workflow.md (internal skill)

The command class is kept for future completion but not wired.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove stale 'keyword matching fallback' references from GuideHandler
- Rewrite ParseToolNamesAndRecipeFromSamplingResponse with robust
  line-by-line JSON array scanning (no more fragile first-bracket grab)
- Clamp 'top' parameter to [1, 20] range in HandleGuideToolAsync
- Fix JsonDocument leak in ToolCatalogTests.CreateTestSchema
- Clarify sampling prompt: MCP in-process tools should be called
  directly, not through execute_operation
- Mirror production ListChanged=false in McpServerProtocolTests;
  add comments explaining test vs production tool listing divergence

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ferences

- GuideHandler: remove stale keyword-matching references in comments
- GuideHandler: rewrite JSON parsing to line-by-line progressive scan
- GuideHandler: clarify sampling prompt re MCP in-process tools
- Program.cs: clamp 'top' parameter to 1-20 range
- ToolCatalogTests: dispose JsonDocument properly
- McpServerProtocolTests: align with progressive disclosure (ListChanged=false)
- McpToolRegistryTests: remove data_package_convert assertion (command hidden)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sampling is required since keyword matching was removed. Updated
architecture.md to reflect that sampling is mandatory, not a fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@TomProkop TomProkop merged commit 740e23c into master Apr 27, 2026
@TomProkop TomProkop deleted the feature/mcp-progressive-disclosure branch May 1, 2026 11:46
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.

2 participants