* feat(ai): add smart context generation with multi-provider support
Implements the SkillKit Smart Context Generation system:
- Multi-Provider Support: 6 LLM providers (Anthropic, OpenAI, Google, Ollama, OpenRouter, Mock) with auto-detection via environment variables
- Multi-Source Context Engine: 4 context sources (docs, codebase, skills, memory) with relevance weighting
- Skill Composition Engine: Natural language search and intelligent skill merging
- Agent Optimization: Agent-specific optimization for 10+ agents with compatibility scoring
- Security Module: Trust scoring (0-10 scale) and prompt injection detection
- Wizard Core: 6-step interactive wizard (expertise → context-sources → composition → clarification → review → install)
- CLI Integration: `skillkit generate` command with @clack/prompts
New files:
- packages/core/src/ai/providers/{types,anthropic,openai,google,ollama,openrouter,factory}.ts
- packages/core/src/ai/context/{index,docs-source,codebase-source,skills-source,memory-source}.ts
- packages/core/src/ai/composition/{index,analyzer,merger}.ts
- packages/core/src/ai/agents/{optimizer,compatibility}.ts
- packages/core/src/ai/security/{trust-score,injection-detect}.ts
- packages/core/src/ai/wizard/{types,steps,clarification,index}.ts
- packages/cli/src/commands/generate.ts
- 6 test files for new modules
* fix(ai): address Devin/CodeRabbit review feedback
- Escape regex in codebase-source.ts to prevent ReDoS attacks
- Fix division by zero in skills-source.ts when no keywords present
- Include all config overrides in ProviderFactory cache key
- Validate AI-provided indices before indexing skills arrays
- Use limited array in ollama.ts search to avoid out-of-bounds access
- Add 120s timeout with AbortController to ollama/openrouter requests
- Fix provider precedence in wizard: config.provider > options.provider
- Fix emitComplete timing to fire after install step completes
- Guard memory lookups with memoryPersonalization opt-out check
* chore(deps): update Google AI SDK to new @google/genai package
The legacy @google/generative-ai package is deprecated as of Nov 2025.
Updated to the new unified @google/genai SDK (GA since May 2025).
* fix(ai): address remaining Devin/CodeRabbit review issues
- Update AIConfig type to support all providers (google, ollama, openrouter)
- Update getAIConfig() in CLI to detect all configured providers
- Add defensive check for expertise in clarification fallback questions
- Add null check for OpenAI choices[0] response
- Validate AI-provided indices in OpenAI/Anthropic search methods
- Add 120s timeout with AbortController to OpenAI/Anthropic requests
- Guard against zero/Infinity per-source chunk allocation in ContextEngine
- Normalize trust score weights and clamp final score to [0-10]
- Fix Windows path handling in memory-source.ts (use [\\/] regex)
- Fix token-to-character ratio consistency (use 4 throughout)
- Target 95% of max tokens in truncation to stay under limit
* chore: sync docs package versions to 1.13.0 and update lockfile
- Update docs/skillkit/package.json version to 1.13.0
- Update docs/fumadocs/package.json version to 1.13.0
- Regenerate pnpm-lock.yaml with new @google/genai dependency
* fix(ai): final code review fixes for smart context generation
- Add 'mock' to AIConfig provider union type
- Show mock provider in handleProviders() when no API keys configured
- Reserve space for truncation marker in truncateContent
- Capture pre-heading content in splitIntoSections
- Add tolerant JSON parsing in anthropic parseSearchResponse
- Use Number.isInteger for index validation in openai search
- Validate all required fields in openai generateFromExample
- Guard against zero sentences in trust-score scoreClarity
- Sanitize weight values (non-negative, finite) in TrustScorer
* fix(ai): re-validate after AI optimization and validate parseGenerateResponse
- Re-truncate content after AI optimization if it exceeds agent max context
- Add JSON extraction from code fences in parseGenerateResponse
- Validate required fields (name, description, content) in parseGenerateResponse
- Clamp confidence to [0,1] range and properly type-check optional fields
Features:
- Hierarchical skill tree with 12 categories (skillkit tree)
- LLM-based reasoning engine for skill discovery
- Explainable recommendations (--explain, --reasoning flags)
- Connector placeholders for tool-agnostic skills (~~CRM, ~~chat, etc.)
- Execution flow tracking with metrics
- Standalone vs Enhanced mode detection
CLI:
- New `tree` command for taxonomy navigation
- Enhanced `recommend` with explanation support
- Fixed --skill alias and agent detection
Documentation:
- Added tree.mdx for Skill Tree documentation
- Updated recommendations.mdx with reasoning features
- Updated TUI docs with tree view mode
- Updated README with new features
- Updated website Features and Commands
- Remove deprecated @types/minimatch dependency (minimatch 10.x has bundled types)
- Fix TUI text rendering overlap by using single text elements instead of multiple
text elements in box rows (Browse, Installed, Marketplace, SkillList screens)
- Fix terminal crash on 'q' press by properly unmounting React tree and restoring
terminal state with escape sequences
- Add signal handlers (SIGINT, SIGTERM) for clean exit
- Bump version to 1.7.6
- Add --recursive flag to scan nested directories for agents
- Add --source flag to specify custom source directory
- New functions: discoverAgentsRecursive, discoverAgentsFromPath
- Add 13 new tests for recursive discovery
- Update README with agent commands documentation
- Bump version to 1.6.3
- Add comprehensive E2E test suite (180 tests)
- Fix ESM compatibility, security improvements in test runner
- Align E2E tests with actual CLI interface
- Add timeout guards for reliable test execution
* feat: add TUI enhancements and monorepo structure
- Add Translate screen for cross-agent skill translation
- Add Context screen for project context management
- Add Recommend screen with smart skill recommendations
- Fix TUI screen duplication by using fixed height container
- Clean up unnecessary comments following code-simplifier principles
- Refactor to monorepo structure with @skillkit/core, @skillkit/cli,
@skillkit/tui, and @skillkit/agents packages
- Add comprehensive tests for translator, context, and recommend features
- Update license to Apache-2.0
- Add CONTRIBUTING.md with contribution guidelines
* ci: switch from npm to pnpm for monorepo support
* ci: use pnpm version from package.json
* fix: remove unused import in TUI helpers