Files
skillkit/packages/cli/src/commands/index.ts
T
Rohit Ghumare 8121c2bbac feat(core): add PageIndex-inspired patterns for skill discovery (#37)
* feat(core): add PageIndex-inspired patterns for skill discovery

Implements patterns from anthropics/knowledge-work-plugins:

Tree Module (packages/core/src/tree/):
- Hierarchical skill taxonomy with 12 categories
- Tree generator from skill tags and metadata
- Tree serializer for JSON/Markdown export
- Related skills graph with 4 relation types

Reasoning Engine (packages/core/src/reasoning/):
- LLM-based tree traversal for skill discovery
- Explainable recommendations with reasoning chains
- Search planning with category relevance scoring
- Result caching with 5-minute TTL

Connectors (packages/core/src/connectors/):
- Tool-agnostic ~~ placeholder system
- 13 connector categories (crm, chat, email, etc.)
- Auto-suggest mappings from MCP config
- Placeholder detection and replacement utilities

Execution Flow (packages/core/src/execution/):
- Step-by-step execution tracking with metrics
- Automatic retry with exponential backoff
- Standalone vs Enhanced mode detection
- Capability-based feature gating

CLI Integration:
- New `skillkit tree` command with --generate, --stats flags
- Enhanced `skillkit recommend` with --explain, --reasoning flags

TUI Integration:
- Tree view mode in Marketplace (toggle with 'v')
- Arrow key navigation for tree hierarchy

* fix: address CodeRabbit and Devin review feedback

- Use os.homedir() instead of process.env.HOME || '~' fallback
  (tree.ts, tree.service.ts, mode.ts)
- Add guard for division by zero in tree stats percentage
- Validate parseInt result for --depth flag
- Fix average stats calculation to use cacheMisses count
- Extract category from data in validateCategoryScore
- Remove unused skillMap field from TreeGenerator
- Make reasoning provider configurable instead of hardcoded
- Add try/catch for tree loading errors in Marketplace
- Handle missing tree nodes during traversal

* fix(execution): clear timeout timer to prevent resource leak

Store setTimeout ID and clear it in finally block when step
completes successfully before timeout. This prevents orphaned
timers from accumulating during long-running applications.
2026-02-02 16:18:13 +00:00

111 lines
3.2 KiB
TypeScript

// Command exports
export { ListCommand } from './list.js';
export { ReadCommand } from './read.js';
export { SyncCommand } from './sync.js';
export { InitCommand } from './init.js';
export { EnableCommand, DisableCommand } from './enable.js';
export { RemoveCommand } from './remove.js';
export { InstallCommand } from './install.js';
export { UpdateCommand } from './update.js';
export { ValidateCommand } from './validate.js';
export { FixCommand } from './fix.js';
export { CreateCommand } from './create.js';
export { UICommand } from './ui.js';
export { TranslateCommand } from './translate.js';
export { ContextCommand } from './context.js';
export { RecommendCommand } from './recommend.js';
export { StatusCommand } from './status.js';
export { PauseCommand } from './pause.js';
export { ResumeCommand } from './resume.js';
export {
WorkflowRunCommand,
WorkflowListCommand,
WorkflowCreateCommand,
WorkflowPipelineCommand,
WorkflowPipelineListCommand,
} from './workflow/index.js';
export { RunCommand } from './run.js';
export { TestCommand } from './test.js';
export { MarketplaceCommand } from './marketplace.js';
export { MemoryCommand } from './memory.js';
export { SettingsCommand } from './settings.js';
export { CICDCommand } from './cicd.js';
export { TeamCommand } from './team.js';
export { PluginCommand } from './plugin.js';
export { MethodologyCommand } from './methodology.js';
export {
HookCommand,
HookTemplateListCommand,
HookTemplateApplyCommand,
HookTemplateShowCommand,
} from './hook.js';
export { PlanCommand } from './plan.js';
export { CommandCmd, CommandAvailableCommand, CommandInstallCommand } from './command.js';
export { AICommand } from './ai.js';
export { AuditCommand } from './audit.js';
export { PublishCommand, PublishSubmitCommand } from './publish.js';
export {
AgentCommand,
AgentListCommand,
AgentShowCommand,
AgentCreateCommand,
AgentFromSkillCommand,
AgentTranslateCommand,
AgentSyncCommand,
AgentValidateCommand,
AgentInstallCommand,
AgentAvailableCommand,
} from './agent.js';
export { CheckCommand } from './check.js';
export { FindCommand } from './find.js';
export {
ManifestCommand,
ManifestInitCommand,
ManifestAddCommand,
ManifestRemoveCommand,
ManifestInstallCommand,
ManifestGenerateCommand,
} from './manifest.js';
export { PrimerCommand } from './primer.js';
export { MeshCommand } from './mesh.js';
export { MessageCommand } from './message.js';
export {
LearnCommand,
PatternStatusCommand,
PatternFeedbackCommand,
PatternApproveCommand,
PatternRejectCommand,
PatternExportCommand,
PatternImportCommand,
PatternClusterCommand,
} from './learn.js';
export {
SessionCommand,
SessionStatusCommand,
SessionStartCommand,
SessionLoadCommand,
SessionListCommand,
SessionNoteCommand,
SessionCompleteCommand,
SessionInProgressCommand,
} from './session.js';
export {
ProfileCommand,
ProfileListCommand,
ProfileCreateCommand,
ProfileRemoveCommand,
} from './profile.js';
export {
GuidelineCommand,
GuidelineListCommand,
GuidelineShowCommand,
GuidelineEnableCommand,
GuidelineDisableCommand,
GuidelineCreateCommand,
GuidelineRemoveCommand,
} from './guideline.js';
// Tree command for hierarchical skill browsing (Phase 21)
export { TreeCommand } from './tree.js';