Skip to content

Improve add_component reliability & MCP context (#109)#110

Merged
renardeinside merged 1 commit intomainfrom
improv/mcp-context
Feb 20, 2026
Merged

Improve add_component reliability & MCP context (#109)#110
renardeinside merged 1 commit intomainfrom
improv/mcp-context

Conversation

@renardeinside
Copy link
Copy Markdown
Collaborator

Summary

  • Structured add_component response: Replace plain-text success message with JSON including written_files, unchanged_files, dependencies_installed, auto_detected_deps, css_updated, and warnings
  • Auto-detect missing npm deps: Scan component file imports for 3rd-party packages not in package.json or registry spec deps, auto-install them via bun add
  • Improved docs search ranking: Add bm25() column weighting (entity=5.0, symbols=3.0) and PascalCase entity boosting with hint word stripping ("fields", "attributes")
  • CLAUDE.md template: Add registry-aware guidance and missing list_registry_components + routes tools to MCP reference table

Test plan

  • cargo build passes
  • cargo test -p apx-core — all 162 tests pass (7 new)
  • cargo clippy + cargo fmt clean
  • Manual: run MCP server, call add_component for a component with 3rd-party imports, verify structured response with auto_detected_deps
  • Manual: search "GenieAttachment fields" in docs tool, verify dataclass fields in top results
  • Manual: apx init a new project, verify CLAUDE.md contains registry guidance

Closes #109

🤖 Generated with Claude Code

@renardeinside renardeinside merged commit c99e85e into main Feb 20, 2026
3 checks passed
@renardeinside renardeinside deleted the improv/mcp-context branch February 20, 2026 14:59
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.

🤖 [FEEDBACK] Improve add_component reliability: auto-install deps, patch base variants, fix installed component bugs

1 participant