UNPKG

roocommander

Version:

Bridge Claude Code skills to Roo Code with intelligent orchestration. CLI tool + Custom Mode + 60+ production-tested skills for Cloudflare, AI, Frontend development.

301 lines (243 loc) β€’ 15.4 kB
# Session State **Current Phase**: Phase 12 (Release - Critical Bugfixes) **Current Stage**: Production **Last Checkpoint**: bd9850c (2025-11-11) **Planning Docs**: `docs/IMPLEMENTATION_PHASES.md`, `docs/ARCHITECTURE.md`, `docs/PROJECT_BRIEF.md` --- ## πŸŽ‰ Production Release Complete! **Published to npm**: v9.0.4 (after 4 critical bugfix releases) **Latest Release** (v9.0.4): - βœ… Published to npm: https://www.npmjs.com/package/roocommander - βœ… GitHub release: https://github.com/jezweb/roo-commander/releases/tag/v9.0.4 - βœ… All schema violations fixed (whenToUse added, customInstructions corrected) - βœ… Mode should now appear in Roo Code extension - βœ… Documentation complete **What's Working**: - βœ… CLI Tool with 6 commands (list, read, search, generate-index, sync-index, init) - βœ… Skill Parser (64 skills parsed successfully) - βœ… Index Generator (categorized markdown with 7 categories) - βœ… Template Installer (.roo/ structure, .roomodes merging - FIXED v9.0.1) - βœ… GitHub Cloner (skills repository setup) - βœ… Custom Instructions (3 template files) - βœ… Slash Commands (9 complete commands) - βœ… Roo Commander Mode (orchestration + skill routing - FIXED v9.0.2, v9.0.3) - βœ… Comprehensive Documentation (README + CHANGELOG) **Releases (2025-11-10 to 2025-11-11)**: - v9.0.0: Initial npm publish - v9.0.1: Fixed `.roomodes` YAML structure (customModes wrapper) - v9.0.2: Fixed invalid groups value (workflow β†’ read,mcp) - v9.0.3: Fixed invalid emoji field (removed, added to name) - v9.0.4: Fixed missing whenToUse field + invalid customInstructions (file paths β†’ removed) **Investigation Process (v9.0.4)**: - Used `/ask-gemini` to get second opinion on why mode wasn't appearing - Compared against official Roo Code repository examples - Discovered two schema violations: missing `whenToUse`, invalid `customInstructions` format - Learned that customInstructions must be inline string OR omitted (file paths not supported) - Confirmed that `.roo/rules-{mode-slug}/` directory is the correct pattern for file-based instructions **Current Work (v9.1.0 - In Progress)**: - Started implementing global installation feature - Created `src/installer/global-installer.ts` (243 lines) - Adds `--global` flag (default) and `--project` flag for installation scope - Detects Roo Code settings location across platforms (Windows/macOS/Linux) - Status: Partially implemented, needs integration and testing **Next Action**: **Option 1 (Recommended)**: Test v9.0.4 first to verify mode appears, then continue global install in next session **Option 2**: Complete global installation implementation now (requires significant refactoring) --- ## Phase 1: CLI Project Setup βœ… **Type**: Infrastructure | **Completed**: 2025-11-08 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-1-cli-project-setup` **Summary**: npm project initialized with TypeScript, Commander.js CLI structure, all dependencies installed, build working, npm link tested successfully. **Files Created**: - package.json (@jezweb/roo-commander v9.0.0) - tsconfig.json (ES2020, CommonJS) - src/index.ts (CLI entry with shebang) - src/cli.ts (Commander.js with 6 command placeholders) - .gitignore **Verification Results**: - βœ… `npm run build` compiles without errors - βœ… `npm link` created global symlink - βœ… `roo-commander --version` shows 9.0.0 - βœ… `roo-commander --help` shows all 6 commands - βœ… TypeScript types resolve correctly ## Phase 2: Skill Parser βœ… **Type**: API | **Completed**: 2025-11-08 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-2-skill-parser` **Summary**: Built complete skill parsing library with TypeScript interfaces, YAML frontmatter extraction, keyword parsing, template discovery, and validation. Tested successfully with 62 real skills. **Files Created**: - src/parser/types.ts (ClaudeSkill, SkillMetadata, ValidationResult interfaces + custom errors) - src/parser/yaml-parser.ts (gray-matter wrapper + keyword/useWhen extraction) - src/parser/skill-parser.ts (parseSkill, validateSkill, findAllSkills functions) - test-parser.js (test script) **Verification Results**: - βœ… parseSkill() successfully parses real skills - βœ… Required fields (name, description) validated correctly - βœ… Keywords extracted from description "Keywords:" section - βœ… Templates discovered and listed recursively - βœ… Missing templates handled gracefully (undefined, not error) - βœ… findAllSkills() parsed 62 skills from ~/.claude/skills/ - βœ… Malformed YAML produces clear error messages - βœ… Broken symlinks handled gracefully (warning, no crash) - βœ… Error handling for missing name field (motion skill skipped) ## Phase 3: CLI Commands - List & Read βœ… **Type**: Feature | **Completed**: 2025-11-08 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-3-cli-commands---list--read` **Summary**: Implemented all three CLI commands (list, read, search) with formatted output, fuzzy matching, loading spinners, and comprehensive error handling. Tested successfully with 62 real skills. **Files Created**: - src/commands/list.ts (compact/verbose list view with keywords and templates) - src/commands/read.ts (output skill content with fuzzy matching) - src/commands/search.ts (keyword search with scoring algorithm) **Files Modified**: - src/cli.ts (wired all three commands with --source and --verbose options) **Verification Results**: - βœ… `roo-commander list` shows all 62 skills with name, description, keywords - βœ… Loading spinners display during skill discovery - βœ… `roo-commander read "Cloudflare D1 Database"` outputs full SKILL.md content - βœ… Skill not found shows helpful error with similar suggestions - βœ… `roo-commander search cloudflare` finds 45 matching skills - βœ… Case-insensitive fuzzy matching works correctly - βœ… --source flag works with custom directory - βœ… --verbose flag shows full descriptions - βœ… --raw flag outputs plain markdown without formatting - βœ… Missing skills directory shows helpful error with solutions ## Phase 4: Index Generation βœ… **Type**: Feature | **Completed**: 2025-11-08 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-4-index-generation` **Summary**: Implemented index generation system that creates categorized markdown index of all skills for Roo Code custom instructions. Generates .roo/rules/01-skills-index.md with 7 categories and usage instructions. **Files Created**: - src/generator/index-generator.ts (categorization logic, markdown generation, 303 lines) - src/commands/generate-index.ts (generate-index command, 75 lines) - src/commands/sync-index.ts (sync-index alias, 20 lines) **Files Modified**: - src/cli.ts (wired both commands with --source and --output options) **Verification Results**: - βœ… `roo-commander generate-index` creates .roo/rules/01-skills-index.md - βœ… Index includes all 62 skills (299 lines total) - βœ… Skills categorized into 7 logical groups (AI, Cloudflare, Frontend, etc.) - βœ… Each skill has name, description, keywords - βœ… Category headers have appropriate emoji (πŸ€– ☁️ βš›οΈ πŸ“ πŸ“Š πŸ“„ πŸ“¦) - βœ… Usage instructions section is clear and helpful - βœ… Markdown is valid and readable - βœ… `sync-index` command updates existing index successfully - βœ… Creates .roo/rules/ directory if missing - βœ… --source flag works with custom directories - βœ… --output flag allows custom output path ## Phase 5: Custom Instructions Templates βœ… **Type**: Templates | **Completed**: 2025-11-08 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-5-custom-instructions-templates` **Summary**: Created 2 comprehensive template files that teach ALL Roo Code modes how to use roo-commander CLI and when to check for skills before implementing features. Templates are ready for Phase 9 init command to copy to .roo/rules/. **Files Created**: - src/templates/rules/02-cli-usage.md (CLI command reference, 341 lines) - src/templates/rules/03-skill-patterns.md (skill usage patterns, 408 lines) **Verification Results**: - βœ… All 6 CLI commands documented with full syntax - βœ… Command examples match actual implementation - βœ… Troubleshooting section covers common errors - βœ… When to check skills clearly defined with keyword triggers - βœ… 3 practical examples showing time/token savings - βœ… Anti-patterns section warns about common mistakes - βœ… Decision tree for skills vs manual implementation - βœ… Writing tone is imperative for AI agents - βœ… Markdown formatting is valid (headings, lists, code blocks) - βœ… Templates ready for init command to copy in Phase 9 ## Phase 6: Roo Commander Mode Configuration βœ… **Type**: Integration | **Completed**: 2025-11-09 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-6-roo-commander-mode-configuration` **Summary**: Created complete Roo Commander mode configuration with YAML entry and three rule documents. Mode defined as lightweight orchestrator that delegates to execution modes with automatic skill discovery. **Files Created**: - src/templates/.roomodes-entry.yaml (53 lines) - Mode configuration for .roomodes - src/templates/rules-roo-commander/00-core-identity.md (343 lines) - Role and responsibilities - src/templates/rules-roo-commander/01-orchestration.md (598 lines) - Delegation patterns - src/templates/rules-roo-commander/02-skill-routing.md (504 lines) - Keyword-based routing **Verification Results**: - βœ… YAML syntax valid (tested with Python yaml.safe_load) - βœ… Mode has workflow group only (no read/edit/command access) - βœ… roleDefinition clearly defines orchestrator role - βœ… Core identity explains what Roo Commander does/doesn't do - βœ… Orchestration document has 6 delegation message templates - βœ… Skill routing has routing tables for 8 technology categories - βœ… All documents use imperative tone for AI agents - βœ… Complete delegation examples with skill loading instructions - βœ… Markdown structure valid (H1 title, H2 sections) ## Phase 7: Slash Commands - Session Management βœ… **Type**: Integration | **Completed**: 2025-11-09 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-7-slash-commands---session-management` **Summary**: Created four slash commands for Roo Code - session management (wrap/continue) and skills integration (list/load). Commands provide step-by-step instructions for SESSION.md updates, git checkpoints, and CLI integration. **Files Created**: - src/templates/commands/wrap-session.md (272 lines) - Update SESSION.md + git checkpoint - src/templates/commands/continue-session.md (312 lines) - Resume from SESSION.md - src/templates/commands/list-skills.md (200 lines) - Show available skills via CLI - src/templates/commands/load-skill.md (286 lines) - Load specific skill via CLI **Verification Results**: - βœ… All commands have valid YAML frontmatter (description + argument-hint) - βœ… wrap-session provides step-by-step SESSION.md update workflow - βœ… continue-session reads SESSION.md and resumes from Next Action - βœ… list-skills runs roo-commander list with verbose output - βœ… load-skill accepts skill name parameter and runs roo-commander read - βœ… Commands use imperative instruction style (no automation, user-approved) - βœ… No Claude Code-specific features (TodoWrite, skills removed) - βœ… Markdown structure valid (H1 title, H2+ sections) - βœ… Line counts meet specifications (wrap: ~180, continue: ~120, list: ~60, load: ~80) ## Phase 8: Slash Commands - Planning & Release βœ… **Type**: Integration | **Completed**: 2025-11-09 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-8-slash-commands---planning--release` **Summary**: Created five slash commands for project planning and release workflows. Planning commands adapted from Claude Code with manual workflows (no automation/skills). Release commands provide complete checklists for GitHub and general releases. **Files Created**: - src/templates/commands/explore-idea.md (361 lines) - Research and validate project idea - src/templates/commands/plan-project.md (497 lines) - Create implementation phases - src/templates/commands/plan-feature.md (470 lines) - Plan new feature addition - src/templates/commands/github-release.md (437 lines) - GitHub release workflow - src/templates/commands/release.md (527 lines) - Complete release checklist **Verification Results**: - βœ… All commands have valid YAML frontmatter (description + argument-hint) - βœ… explore-idea provides 10-step manual research framework - βœ… plan-project includes IMPLEMENTATION_PHASES.md template structure - βœ… plan-feature explains manual phase insertion and renumbering - βœ… github-release has complete git tag + GitHub release workflow - βœ… release has 9-step comprehensive checklist (version, build, test, deploy) - βœ… No Claude Code-specific features (skills, subagents, automation removed) - βœ… Instructions are clear and actionable - βœ… Markdown structure valid (H1 title, H2+ sections) ## Phase 9: CLI Init Command βœ… **Type**: Integration | **Completed**: 2025-11-09 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-9-cli-init-command` **Summary**: Implemented complete init command that sets up Roo Commander in any project. Handles skills directory cloning, template installation, skills index generation, and .roomodes merging. **Files Created**: - src/installer/github-cloner.ts (204 lines) - Clone skills from GitHub - src/installer/template-installer.ts (283 lines) - Copy templates to project - src/commands/init.ts (225 lines) - Main init command orchestration **Files Modified**: - src/cli.ts (wired init command with --source and --force options) **Verification Results**: - βœ… TypeScript compilation successful (npm run build) - βœ… github-cloner handles missing ~/.claude/skills/ with git clone --depth 1 - βœ… template-installer copies all templates (.roo/rules, rules-roo-commander, commands) - βœ… .roomodes file merging (doesn't overwrite existing modes) - βœ… Skills index generation integrated - βœ… Idempotent operation (checks if already installed) - βœ… Progress spinners for long operations (ora) - βœ… Comprehensive success message with next steps - βœ… --force flag for reinstallation - βœ… --source flag for custom skills directory ## Phase 10: Documentation & Testing βœ… **Type**: Documentation | **Completed**: 2025-11-09 **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-10-documentation--testing` **Summary**: Created comprehensive project documentation including README with quick start, complete CHANGELOG for v9.0.0, and updated package.json with metadata and keywords. **Files Created**: - README.md (444 lines) - Project overview, quick start, examples, architecture - CHANGELOG.md (298 lines) - Complete v9.0.0 changes, breaking changes from v8.1 **Files Modified**: - package.json (updated description, added 11 keywords for discoverability) **Verification Results**: - βœ… README quick start is clear and concise (3 steps: install CLI, install mode, use) - βœ… Installation instructions complete (CLI + marketplace options) - βœ… Example workflows provided (3 complete examples) - βœ… Architecture overview with Mermaid diagram - βœ… CHANGELOG documents all v9.0.0 changes comprehensively - βœ… Breaking changes from v8.1 clearly noted - βœ… package.json keywords optimized for npm search - βœ… All links and references accurate ## Phase 11: Marketplace Packaging ⏸️ **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-11-marketplace-packaging` ## Phase 12: Release & Community ⏸️ **Spec**: `docs/IMPLEMENTATION_PHASES.md#phase-12-release--community`