Skip to content

Latest commit

 

History

History
818 lines (640 loc) · 28.3 KB

File metadata and controls

818 lines (640 loc) · 28.3 KB

Cairel Development Progress

2026-01-14 - Phase 1: Rule Abstraction & Curation ✅ COMPLETE

Session 1: Initial Design & Rule Abstraction

Completed:

  • ✅ Analyzed 100+ rule files from multi-project compendium
  • ✅ Created standardized rule format with frontmatter
  • ✅ Abstracted 7 core project-agnostic rules
  • ✅ Created agent templates (general-dev.json, agent-template.hbs)
  • ✅ Designed complete project architecture
  • ✅ Selected tech stack (TypeScript + Commander + Inquirer + Handlebars + Zod)
  • ✅ Designed three-mode wizard (Quick/Detailed/Custom)
  • ✅ Documented future vision (carm package manager)

Rules Created (Initial 7):

  1. context-retrieval.md - Token optimization
  2. implementation-approval.md - Permission protocol
  3. package-manager-safety.md - Safe package management
  4. typescript-validation.md - Compilation validation
  5. component-structure.md - Component organization
  6. git-management.md - Repository management
  7. visual-verification.md - UI verification

Documentation Created:

  • PROJECT-SPEC.md - Complete specification
  • PHASE-1-SUMMARY.md - Phase 1 details
  • QUICK-REFERENCE.md - Quick guide
  • README.md - Main overview
  • docs/FUTURE.md - carm vision

Session 2: Corrections & Completion

Issues Fixed:

  • ✅ Added .ai/ directory structure (docs/README.md)
  • ✅ Made agent template wizard-driven (no hardcoded settings)
  • ✅ Decoupled all project-specific references
  • ✅ Moved all docs to docs/ directory (except README.md)

Additional Rules Created (6 more): 8. multi-environment-management.md - Dev/QA/Prod protection 9. semantic-versioning.md - Package versioning 10. react-props-destructuring.md - React props patterns 11. mock-data-strategy.md - Frontend mock data 12. icon-usage-patterns.md - Icon standardization 13. absolute-imports.md - Import path configuration 14. chakra-ui-v3-integration.md - Chakra UI with MCP 15. gluestack-ui-v1-themed.md - GlueStack UI patterns 16. eslint-configuration.md - Linting compliance 17. package-json-management.md - Dependency management

Templates Updated:

  • ✅ agent-template.hbs - Full wizard-driven logic with conditionals

Documentation Completed:

  • ✅ WIZARD-CONFIG.md - Complete wizard specification
  • ✅ docs/dev-plan.md - Stage-based development plan
  • ✅ docs/architecture.md - System architecture
  • ✅ docs/progress.md - This file
  • ✅ docs/README.md - Project overview

Final Statistics:

  • Rules: 17 curated, project-agnostic rules
  • Templates: 2 (agent + wizard-driven template)
  • Documentation: 9 comprehensive docs
  • Total Files: 28 created/updated

Session 3: Bootstrap Command & Final Clarifications

Added:

  • cairel bootstrap command - Shows path to cairel's .ai/ for project initialization
  • ✅ Clarified .ai/ directory is NOT copied to user projects
  • ✅ Documented workflow: init → bootstrap → kiro-cli creates docs
  • ✅ Updated all documentation with bootstrap command

Files Updated:

  • docs/dev-plan.md - Added bootstrap to Stage 2
  • docs/architecture.md - Added bootstrap command documentation
  • README.md - Added bootstrap to Quick Start workflow
  • .ai/README.md - Added bootstrap workflow example

Bootstrap Command Purpose: Tell kiro-cli where to find cairel's .ai/KICKOFF-PROMPT.txt so it can guide users through the new.md protocol to create proper project documentation (README, dev-plan, architecture, progress, bugs).


Phase 1 Summary

Status: ✅ COMPLETE

Achievements:

  • Abstracted and curated 17 universal rules from multi-project compendium
  • Created standardized, AI-optimized rule format
  • Designed wizard-driven configuration system
  • Documented complete architecture and development plan
  • Prepared for Phase 2 implementation

Quality Metrics:

  • All rules are project-agnostic
  • All rules follow standardized format
  • Agent template is fully wizard-driven
  • No hardcoded settings
  • Comprehensive documentation

Next Phase: Phase 2 - Implementation

Status: 🚧 IN PROGRESS

Stage 2: Core CLI Framework ✅ COMPLETE

Completed (2026-01-14):

  • ✅ npm project initialized
  • ✅ Dependencies installed (commander, inquirer, chalk, ora, handlebars, zod, ajv, fs-extra, glob)
  • ✅ TypeScript configured
  • ✅ Directory structure created (src/commands, src/core, src/utils, src/types)
  • ✅ CLI entry point implemented (src/index.ts)
  • ✅ All commands scaffolded (init, bootstrap, update, validate, list)
  • ✅ Bootstrap command fully working
  • ✅ Interactive menu when no args provided
  • ✅ CLI globally linkable via npm link
  • ✅ .gitignore configured (excludes source material)

Exit Criteria Met:

  • cairel --help works
  • cairel --version works
  • cairel (no args) shows getting started menu
  • cairel bootstrap shows path to .ai/ for kiro-cli
  • ✅ Command structure in place
  • ✅ Can be run with npm link

Next: Stage 3 - Wizard Implementation


Stage 3: Wizard Implementation ✅ COMPLETE

Completed (2026-01-14):

  • ✅ Wizard types defined (wizard.ts)
  • ✅ MCP server detection implemented
  • ✅ Mode selection (Quick/Detailed/Custom)
  • ✅ Quick setup flow (6 questions)
  • ✅ Detailed setup flow (12 questions)
  • ✅ Context-aware framework choices
  • ✅ Answer validation
  • ✅ Init command integrated with wizard

Exit Criteria Met:

  • ✅ Wizard completes successfully
  • ✅ All questions asked based on mode
  • ✅ Answers validated
  • ✅ MCP servers detected

Next: Stage 4 - File Generation System


Stage 4: File Generation System ✅ COMPLETE

Completed (2026-01-14):

  • ✅ Rules selector with conditional logic based on wizard answers
  • ✅ Handlebars template created with full conditional MCP/toolsSettings
  • ✅ File generator with directory creation
  • ✅ Rules copying from curated-presets
  • ✅ Agent JSON generation from template
  • ✅ Template variables builder
  • ✅ Support for both kiro-cli and Amazon Q paths

Exit Criteria Met:

  • ✅ Rules copied to correct directory
  • ✅ Agent JSON generated correctly
  • ✅ Files have proper permissions
  • ✅ No file conflicts

Next: Stage 5 - Validation System


Stage 4: File Generation System ✅ COMPLETE

Completed (2026-01-14):

  • ✅ Rules selector with conditional logic based on wizard answers
  • ✅ Handlebars template created with full conditional MCP/toolsSettings
  • ✅ File generator with directory creation
  • ✅ Rules copying from curated-presets
  • ✅ Agent JSON generation from template
  • ✅ Template variables builder
  • ✅ Support for both kiro-cli and Amazon Q paths
  • Data-driven rules selection: Manifest auto-generated from frontmatter
  • Manifest generation script: Reads conditions from rule frontmatter
  • All 17 rules updated: Added conditions to frontmatter
  • Build integration: Manifest regenerates on every build (prebuild hook)
  • Tested and verified: Correct rule selection for different project types

Exit Criteria Met:

  • ✅ Rules copied to correct directory
  • ✅ Agent JSON generated correctly
  • ✅ Files have proper permissions
  • ✅ No file conflicts
  • ✅ Rules selection is maintainable and data-driven

Testing Results:

  • UI TypeScript React with Git: 12 rules selected ✅
  • Backend Python without Git: 2 rules selected ✅

Next: Stage 5 - Validation System


Stage 5: Validation System ✅ COMPLETE

Completed (2026-01-15):

  • ✅ Zod schema for rule frontmatter validation
  • ✅ AJV schema for agent JSON validation
  • ✅ Validator class with rule and agent validation methods
  • ✅ Validate command with --rules and --agents options
  • ✅ Auto-detect validation (checks .kiro/ and .amazonq/ directories)
  • ✅ Skip README.md files in validation
  • ✅ Clear error and warning messages
  • ✅ Fixed general-dev.json and cairel-dev.json MCP server format
  • ✅ Updated schema to match official specs (all fields optional)
  • ✅ Comprehensive test coverage (9 tests for validation)
  • ✅ Test fixtures for invalid rules and agents

Test Coverage:

  • Validates all 17 curated rules successfully
  • Detects missing frontmatter
  • Detects missing required fields (id, tags)
  • Detects invalid version format (non-semver)
  • Detects invalid category (not in enum)
  • Detects invalid date format (not YYYY-MM-DD)
  • Validates agent JSON structure
  • Detects invalid JSON format

Exit Criteria Met:

  • cairel validate command works
  • ✅ Rules validated against Zod schema
  • ✅ Agents validated against AJV JSON schema
  • ✅ Clear error messages for validation failures
  • ✅ All 17 curated rules pass validation
  • ✅ Agent templates pass validation
  • ✅ Comprehensive test coverage with edge cases

Next: Stage 6 - Update Command


Stage 5.5: List Command ✅ COMPLETE

Completed (2026-01-15):

  • ✅ List command implementation
  • ✅ Display all rules grouped by category
  • ✅ Show rule descriptions and conditions
  • ✅ Support --rules filter (rules only)
  • ✅ Support --agents filter (agents only)
  • ✅ Support --category filter (filter by category)
  • ✅ Visual formatting with emojis and separators
  • ✅ Handle boolean and array conditions

Exit Criteria Met:

  • cairel list shows all rules
  • cairel list --rules shows only rules
  • cairel list --agents shows only agents
  • cairel list --category typescript filters by category
  • ✅ Clear, formatted output with descriptions

Next: Stage 6 - Update Command


Stage 6: Update Command ✅ COMPLETE

Completed (2026-01-15):

  • ✅ Update command implementation
  • ✅ Detect existing configuration (.kiro/ or .amazonq/)
  • ✅ Create timestamped backups before updates
  • ✅ Selective update (rules only, agents only, or both)
  • ✅ Add new rules without overwriting existing
  • ✅ Preserve custom rules (don't delete)
  • ✅ Update existing rules with user confirmation
  • ✅ Clear summary of changes (added, updated, preserved)

Exit Criteria Met:

  • cairel update works
  • ✅ Existing files backed up with timestamp
  • ✅ Updates applied correctly
  • ✅ No data loss (custom rules preserved)
  • ✅ Clear user prompts and confirmations

Next: Stage 7 - Testing & Polish


2026-01-15 - Stage 7: Testing & Polish 🚧 IN PROGRESS

Manual Testing & Bug Fixes

Issues Found:

  1. ❌ Double checkmark in success message (spinner.succeed adds one automatically)
  2. ❌ icon-usage-patterns rule included without UI library selection
  3. ❌ Extra line breaks in agent.json arrays (template formatting issue)
  4. ❌ Validate command didn't support individual files
  5. ⚠️ Custom rules mode not implemented
  6. ⚠️ No review step before file generation

Fixes Applied (2026-01-15):

  • ✅ Removed duplicate checkmark from generator success message
  • ✅ Added UI library condition to icon-usage-patterns rule (requires chakra-ui or gluestack-ui)
  • ✅ Rewrote agent template with proper Handlebars formatting (no empty lines)
  • ✅ Enhanced validate command to support:
    • Individual file validation
    • Auto-detection of .kiro/ and .amazonq/ directories
    • Smart file type detection (.md for rules, .json for agents)

Test Results:

  • ✅ UI TypeScript Next.js flow works correctly
  • ✅ Backend JavaScript Express flow works correctly
  • ✅ CLI Lua flow works correctly (Lua is valid for CLI tools)
  • ✅ Amazon Q Developer configuration generates correctly
  • ✅ All 62 automated tests passing

Remaining Work:

  • ✅ Implement custom rules mode (Stage 7.5)
  • ✅ Add review step before file generation (Stage 7.5)
  • ⏳ Final documentation polish
  • ⏳ Error handling improvements

Next: Stage 8 - npm Publication


2026-01-15 - Stage 7.5: Missing Features ✅ COMPLETE

Custom Rules Mode

Completed (2026-01-15):

  • ✅ Custom mode implementation
  • ✅ Load all rules from manifest
  • ✅ Group rules by category with visual separators
  • ✅ Allow user to select specific rules
  • ✅ Pre-check "always include" rules
  • ✅ Validate at least one rule selected
  • ✅ MCP server selection
  • ✅ Review step for custom configuration

Features:

  • Interactive checkbox selection with categories
  • Shows rule descriptions
  • Pre-selects always-include rules (context-retrieval, implementation-approval)
  • Validates minimum selection
  • Generates minimal agent configuration

Review Step Before Generation

Completed (2026-01-15):

  • ✅ Review step for Quick/Detailed modes
  • ✅ Review step for Custom mode
  • ✅ Display configuration summary
  • ✅ Show selected rules with descriptions
  • ✅ Show MCP servers
  • ✅ Confirmation prompt
  • ✅ Cancel option (exits gracefully)

Features:

  • Shows all configuration choices
  • Lists rules to be generated
  • Lists MCP servers to be configured
  • Allows user to cancel before file generation
  • Clear visual formatting with colors

Exit Criteria Met:

  • ✅ Custom mode creates valid configurations
  • ✅ Review step shows all selections
  • ✅ User can cancel before file generation
  • ✅ All modes work correctly
  • ✅ All 74 tests passing

Next: Stage 8 - npm Publication


2026-01-16 - Stage 7.5 Completion & Rule Expansion ✅ COMPLETE

New Rules from Compendium Analysis

Completed (2026-01-16):

  • ✅ Analyzed projects-rules-compendium for reusable patterns
  • ✅ Identified 8 new rule candidates across 3 tiers
  • ✅ Created 5 new project-agnostic rules
  • ✅ Enhanced 1 existing rule with testing protocols
  • ✅ Added 2 new categories (lua, testing)

New Rules Created:

  1. markdown-maintenance.md (general) - AI-friendly documentation maintenance
  2. lua-semantic-versioning.md (lua) - Lua library versioning
  3. test-cleanup-protocol.md (testing) - Temporary test file management
  4. react-native-component-patterns.md (ui) - React Native + GlueStack UI v1 patterns
  5. development-workflow-meta.md (general) - Systematic rule application guidance

Enhanced Rules:

  • visual-verification.md - Added test ID strategy, element inspection, dev server management

Infrastructure Improvements:

  • ✅ Created categories.json config file
  • ✅ Updated manifest generation to load categories dynamically
  • ✅ Updated tests to use flexible range assertions
  • ✅ Created comprehensive CONTRIBUTING.md

Statistics:

  • Total Rules: 22 (was 17)
  • Categories: 7 (was 5)
  • All Tests: ✅ 74/74 passing

Exit Criteria Met:

  • ✅ New rules follow standardized format
  • ✅ All rules validated successfully
  • ✅ Categories externalized to config
  • ✅ Tests maintainable and flexible
  • ✅ Contributing guidelines documented

Next: Stage 8 - npm Publication


2026-01-16 - Stage 8: npm Publication Preparation ✅ COMPLETE

Publication Readiness

Completed (2026-01-16):

  • ✅ Created LICENSE file (MIT)
  • ✅ Created .npmignore (excludes source material and dev files)
  • ✅ Added repository URLs to package.json
  • ✅ Verified build process (successful)
  • ✅ Verified all tests (74/74 passing)
  • ✅ Tested package contents with dry-run
  • ✅ Created PUBLISH.md with publication checklist

Package Statistics:

  • Package size: 77.4 kB (unpacked: 311.1 kB)
  • Total files: 82
  • Includes: dist/, curated-presets/, .ai/, README.md, LICENSE
  • Excludes: source material, dev files, phase docs

Exit Criteria Met:

  • ✅ LICENSE file exists
  • ✅ .npmignore configured
  • ✅ Repository URLs in package.json
  • ✅ Build successful
  • ✅ All tests passing
  • ✅ Package contents verified
  • ✅ Publication checklist created

Ready for Publication: The package is ready to be published to npm. Follow steps in PUBLISH.md:

  1. Create GitHub repository
  2. Create git tag (v1.0.0)
  3. npm login
  4. npm publish
  5. Verify installation

Publication Status: ✅ PUBLISHED (2026-01-16)

Next: Monitor issues, gather feedback, plan v1.1.0 features


2026-01-19 - v1.0.1 Bug Fix Release ✅ COMPLETE

Issues Fixed

1. MCP Servers JSON Generation

  • Fixed missing commas between MCP server entries
  • Fixed HTML entities (") in generated JSON
  • Changed to triple braces in Handlebars template
  • Updated buildMcpServersJson() to return complete JSON object

2. Agent Filename Mismatch

  • Agent file now named dev-agent.json (matches JSON name property)
  • generateAgent() returns agent name for display
  • Summary shows actual filename

3. Version Management

  • Version now read dynamically from package.json
  • Removed hardcoded version from src/index.ts
  • Future updates only require changing package.json

4. Update Command Behavior

  • Changed to rule manager (checked = keep, unchecked = remove)
  • Renamed option to "Manage rules (add/remove/update)"
  • Added removal tracking and summary display
  • More intuitive user experience

5. Bootstrap Documentation

  • KICKOFF-PROMPT.txt explicitly mentions docs/ directory
  • Dev-plan template emphasizes stage-based approach
  • Clarified sequential stages without specific dates

6. README Rule Count

  • Updated from 17 to 22 rules

Testing

Test Results:

  • Test Suites: 10 passed, 10 total
  • Tests: 78 passed, 78 total (74 original + 4 new)

New Tests Added:

  • tests/mcp-json.test.ts - 4 tests for MCP JSON generation
    • Validates no HTML entities
    • Tests single/multiple/no MCP servers
    • Tests proper comma formatting

Tests Updated:

  • tests/integration.test.ts - Updated agent filename references

Files Changed

  1. curated-presets/templates/agent-template.hbs - MCP JSON generation
  2. src/core/generator.ts - Agent filename + MCP JSON builder
  3. src/commands/update.ts - Rule manager behavior
  4. src/index.ts - Dynamic version reading
  5. README.md - Rule count update
  6. .ai/KICKOFF-PROMPT.txt - Bootstrap clarity
  7. .ai/docs-dev-plan-TEMPLATE.md - Stage-based emphasis
  8. tests/integration.test.ts - Agent filename
  9. tests/mcp-json.test.ts - New tests
  10. package.json - Version bump to 1.0.1
  11. docs/CHANGELOG.md - v1.0.1 entry

Publication Status: ✅ READY FOR PUBLICATION


Next Phase: v1.1.0 Planning

Planned Start: TBD

Objectives:

  1. Initialize TypeScript project
  2. Implement CLI framework (Commander.js)
  3. Implement wizard (Inquirer.js)
  4. Implement file generation (Handlebars)
  5. Implement validation (Zod + AJV)
  6. Manual testing and polish
  7. npm publication

Estimated Duration: 17-24 hours


Notes

  • Phase 1 completed in single extended session
  • All design decisions documented
  • Ready for immediate implementation
  • No blocking issues identified
  • Community contribution guidelines prepared

Lessons Learned

  1. Rule Abstraction: Common patterns emerge across projects
  2. Project-Agnostic: Removing specific references makes rules universal
  3. Wizard-Driven: User choice is better than hardcoded defaults
  4. Documentation First: Clear docs enable faster implementation
  5. Iterative Refinement: Initial design improved through feedback

Future Work

Phase 2: Implementation (Next)

  • TypeScript project setup
  • CLI framework implementation
  • Wizard implementation
  • File generation system
  • Validation system

Phase 3: Testing & Polish

  • Manual testing
  • Error handling
  • User feedback
  • Documentation refinement

Phase 4: Publication

  • npm publication
  • GitHub repository
  • Community outreach
  • Initial user feedback

Future: carm

  • Package manager for rules
  • Community contributions
  • Versioning and updates
  • Rule marketplace

Last Updated: 2026-01-16 Phase: 2 - Stage 7.5 (Complete) Next Phase: Stage 8 - npm Publication


2026-01-23 - Go Language Support Added ✅ COMPLETE

New Language & Rule

Completed (2026-01-23):

  • ✅ Added Go as supported language
  • ✅ Created comprehensive go-style-conventions.md rule
  • ✅ Added golang category to categories.json
  • ✅ Updated validator schema with golang category
  • ✅ Added Go to wizard language choices
  • ✅ Added Go frameworks (Gin, Echo, Fiber, Chi)
  • ✅ Added Go testing frameworks (testing, testify)
  • ✅ Added Go linter (golangci-lint)
  • ✅ Created tests for Go support (2 new tests)
  • ✅ Updated README with Go support

Rule Details:

  • File: curated-presets/rules/golang/go-style-conventions.md
  • Category: golang
  • Conditions: languages: [go], always-include: true
  • Coverage: Formatting (gofmt), naming conventions, error handling, project structure, context/concurrency, documentation, testing

Test Results:

  • Test Suites: 11 passed, 11 total
  • Tests: 80 passed, 80 total (78 original + 2 new Go tests)

Statistics:

  • Total Rules: 23 (was 22)
  • Categories: 8 (was 7)
  • Supported Languages: 5 (TypeScript, JavaScript, Python, Go, Lua)
  • Go Frameworks: 4 (Gin, Echo, Fiber, Chi)

Files Changed:

  1. curated-presets/categories.json - Added golang category
  2. curated-presets/rules/golang/go-style-conventions.md - New comprehensive rule
  3. src/core/validator.ts - Added golang to category enum
  4. src/core/wizard.ts - Added Go language, frameworks, testing, linter
  5. tests/go-support.test.ts - New test suite
  6. README.md - Updated language and framework lists
  7. docs/progress.md - This entry

Exit Criteria Met:

  • ✅ Rule follows standardized format
  • ✅ All tests passing
  • ✅ Validation successful
  • ✅ Manifest regenerated
  • ✅ Documentation updated

Next: Ready for v1.1.0 release with Go support


2026-04-22 - v2.0.0 Skills Migration 🚧 IN PROGRESS

Migration Plan Created

  • ✅ Researched Agent Skills standard across Kiro, GitHub Copilot, Claude Code, and agentskills.io
  • ✅ Confirmed skills are the emerging cross-platform standard
  • ✅ Designed migration approach: preserve cairel selection logic in metadata.cairel-* fields
  • ✅ Created docs/skills-migration-plan.md with 8-stage plan

Stage 1: Skills Format Design & Rule Conversion ✅ COMPLETE

Completed:

  • ✅ Defined cairel metadata schema (cairel-title, cairel-category, cairel-version, cairel-conditions, cairel-tags, cairel-always-include)
  • ✅ Created 23 skill folders in curated-presets/skills/
  • ✅ Converted all 23 rules to Agent Skills format (skill-name/SKILL.md)
  • ✅ Mapped old frontmatter to skills frontmatter + cairel metadata
  • ✅ Wrote discovery-optimized descriptions (action-oriented, keyword-rich)
  • ✅ Validated all skills against agentskills.io spec constraints
  • ✅ Created curated-presets/skills/README.md with format docs and catalog

Skills Created (23):

Category Skills
General (8) context-retrieval, implementation-approval, package-manager-safety, semantic-versioning, eslint-configuration, package-json-management, markdown-maintenance, development-workflow-meta
TypeScript (4) typescript-validation, component-structure, react-props-destructuring, absolute-imports
Git (1) git-management
UI (6) visual-verification, mock-data-strategy, icon-usage-patterns, chakra-ui-v3-integration, gluestack-ui-v1-themed, react-native-component-patterns
Backend (1) multi-environment-management
Testing (1) test-cleanup-protocol
Lua (1) lua-semantic-versioning
Golang (1) go-style-conventions

Validation Results:

  • ✅ All 23 skill names match directory names
  • ✅ All names valid (lowercase, hyphens, ≤64 chars)
  • ✅ All descriptions present (≤1024 chars)
  • ✅ All cairel metadata preserved in metadata.cairel-*
  • ✅ Content condensed for progressive disclosure

Key Design Decision:

  • AI tools (Kiro, Copilot, Claude Code) discover skills via name and description
  • Cairel uses metadata.cairel-* fields for wizard-driven conditional selection
  • Both work independently — no conflict

Next: Stage 2 - Manifest & Selection Logic Update

Stage 2: Manifest & Selection Logic Update ✅ COMPLETE

Completed:

  • ✅ Updated scripts/generate-manifest.js to read from skills/*/SKILL.md instead of rules/{category}/*.md
  • ✅ Manifest reads metadata.cairel-* fields from skills frontmatter
  • ✅ Updated src/core/generator.ts copyRules() to source from skills folders
  • ✅ Removed getRuleCategory dependency (category now in metadata, not folder structure)
  • ✅ Manifest output format unchanged (backward compatible with selector logic)
  • ✅ Build passes, all 80 tests pass

Verification:

  • Manifest correctly generates 23 skills with all conditions preserved
  • Rule selection logic produces correct results (no changes needed to rules-selector.ts)
  • npm run build regenerates manifest from skills on every build

Next: Stage 3 - Multi-Platform Output Generation

Stage 3: Multi-Platform Output Generation ✅ COMPLETE

Completed:

  • ✅ Added Platform type (kiro, claude-code, github-copilot, amazon-q)
  • ✅ Added platforms: Platform[] field to all answer interfaces
  • ✅ Replaced single-select "AI Tools" wizard question with multi-select platforms
  • ✅ Updated generator to output skill folders (skill-name/SKILL.md) for Kiro, Claude Code, GitHub Copilot
  • ✅ Kept legacy flat format (.md files) for Amazon Q backward compatibility
  • ✅ Generator copies references/ subdirectories when present
  • ✅ Agent JSON generated for Kiro and Amazon Q (platforms that use them)
  • ✅ Derived aiTool from platforms for backward compatibility
  • ✅ Updated all 80 tests for new platform structure

Platform Output Paths:

  • Kiro: .kiro/skills/skill-name/SKILL.md
  • Claude Code: .claude/skills/skill-name/SKILL.md
  • GitHub Copilot: .github/skills/skill-name/SKILL.md
  • Amazon Q: .amazonq/rules/skill-name.md (flat, backward compat)

Test Results: 11 suites, 80 tests, all passing

Next: Stage 4 - Wizard & Template Updates

Stage 4: Wizard & Template Updates ✅ COMPLETE

Completed:

  • ✅ Updated Handlebars template resources field to use RESOURCES_PATH variable
  • ✅ Kiro agents use skill://.kiro/skills/*/SKILL.md (native skill discovery)
  • ✅ Amazon Q agents use file://.amazonq/rules/*.md (backward compat)
  • ✅ Updated buildTemplateVars() with platform-aware getResourcesPath() and getSkillsDir()
  • ✅ Updated generatePrompt() to be platform-agnostic
  • ✅ Agent JSON generated correctly for both Kiro and Amazon Q
  • ✅ All 80 tests passing

Next: Stage 5 - Validation System Update

Stage 5: Validation System Update ✅ COMPLETE

Completed:

  • ✅ Added SkillFrontmatterSchema (Zod) for skills spec validation (name, description, metadata.cairel-*)
  • ✅ Added validateSkill() method — validates SKILL.md frontmatter, name format, directory name match
  • ✅ Added validateSkillsDirectory() method — scans skill folders
  • ✅ Updated cairel validate to detect .kiro/skills/, .claude/skills/, .github/skills/
  • ✅ Auto-detects skill folders vs flat rules when given a directory path
  • ✅ All 23 curated skills pass validation
  • ✅ Legacy rule validation preserved for backward compatibility
  • ✅ All 80 tests passing

Next: Stage 6 - Update & List Commands

Stage 6: Update & List Commands ✅ COMPLETE

Completed:

  • ✅ Updated cairel update to detect skills format (.kiro/skills/) vs legacy (.kiro/steering/)
  • ✅ Skill folders backed up, copied, and removed as directories
  • ✅ Legacy flat-file format still supported for Amazon Q
  • ✅ Existing rule detection works for both folder-based skills and flat .md files
  • cairel list works unchanged (reads from manifest, shows titles and descriptions)
  • ✅ All 80 tests passing

Next: Stage 7 - Testing & Polish

Stage 7: Testing & Polish ✅ COMPLETE

Manual Testing Results:

  • ✅ Multi-platform output (Kiro + Claude Code + GitHub Copilot simultaneously): 13 skills each
  • ✅ Amazon Q legacy flat format: 4 flat .md files with file:// resources
  • ✅ Go project: 6 skills including go-style-conventions
  • ✅ Generated skills pass validateSkillsDirectory() (13/13)
  • ✅ Generated agent JSON passes validateAgent()
  • cairel list --category golang shows correct output
  • cairel validate curated-presets/skills validates all 23 skills
  • ✅ All 80 automated tests passing

Next: Stage 8 - Documentation & Publication

Stage 8: Documentation & Publication ✅ COMPLETE

Completed:

  • ✅ Updated README.md: multi-platform support, skills format, updated wizard example, new output structure
  • ✅ Updated docs/architecture.md: skills directory paths
  • ✅ Updated docs/CONTRIBUTING.md: skills format for new contributions
  • ✅ Updated docs/TESTING.md: 91 tests across 12 suites
  • ✅ Updated docs/CHANGELOG.md: v2.0.0 entry with breaking changes, additions, preserved features
  • ✅ Version bumped to 2.0.0 in package.json
  • ✅ Build passes as cairel@2.0.0
  • ✅ All 91 tests passing