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
Markdown
# 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`