chiron 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b1bedffbe29eddeb944137d4f3e986b45d20acfac3ddefa8d5f731efa1c7bc76
4
+ data.tar.gz: 1c710a2bb2eb67b01ae126f38d2853edc0527c7536832a6a691a94d896d4d79c
5
+ SHA512:
6
+ metadata.gz: f1a40196a2c48302fec0be7bdba442d21386bcd8e0b2f3b88174e32f2927bec876c5673ee018e9c23cf1dd46b299ae1a628acc9b831b26c12d4da86c801913ea
7
+ data.tar.gz: 93668d0ac4144e80aa5b80172bad66706db730d1068f6250a2e18e3ee621479d1ca09ae118abc6b615f4b05e6b332342a53913c09fb1c392b633fa2275316344
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rspec_status ADDED
@@ -0,0 +1,7 @@
1
+ example_id | status | run_time |
2
+ -------------------------------------- | ------ | --------------- |
3
+ ./spec/claude_rails_setup_spec.rb[1:1] | passed | 0.00042 seconds |
4
+ ./spec/cli_spec.rb[1:1:1] | failed | 0.02051 seconds |
5
+ ./spec/cli_spec.rb[1:1:2] | failed | 0.00553 seconds |
6
+ ./spec/cli_spec.rb[1:1:3] | failed | 0.00268 seconds |
7
+ ./spec/cli_spec.rb[1:2:1] | passed | 0.00101 seconds |
data/.rubocop.yml ADDED
@@ -0,0 +1,24 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+ NewCops: enable
4
+ Exclude:
5
+ - 'vendor/**/*'
6
+ - 'tmp/**/*'
7
+ - 'bin/**/*'
8
+
9
+ Style/Documentation:
10
+ Enabled: false
11
+
12
+ Style/StringLiterals:
13
+ EnforcedStyle: single_quotes
14
+
15
+ Style/StringLiteralsInInterpolation:
16
+ EnforcedStyle: single_quotes
17
+
18
+ Metrics/BlockLength:
19
+ Exclude:
20
+ - 'spec/**/*'
21
+ - '*.gemspec'
22
+
23
+ Layout/LineLength:
24
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2025-01-21
11
+
12
+ ### Added
13
+ - Initial release of Chiron gem (renamed from claude_rails_setup)
14
+ - CLI command `chiron init` to initialize Claude AI workflows in Rails projects
15
+ - PRD workflow templates for structured feature development
16
+ - Task generation and management system
17
+ - Development journal functionality
18
+ - Quality assurance workflows and pre-commit checklists
19
+ - Migration tool from `.cursor` to `.claude` directory structure
20
+ - Comprehensive test suite with RSpec
21
+ - GitHub Actions CI/CD pipeline
22
+ - Support for Ruby 3.0+ and Rails projects
23
+
24
+ ### Features
25
+ - **Quick Setup**: Initialize Claude workflow with one command
26
+ - **PRD Workflow**: Structured Product Requirements Document creation
27
+ - **Task Management**: Generate and track implementation tasks
28
+ - **Development Journal**: Track progress and maintain project history
29
+ - **Migration Tool**: Easy migration from `.cursor` to `.claude` structure
30
+ - **Quality Checks**: Pre-commit checklists and TDD workflows
31
+ - **Customizable**: Adapt workflows to your team's needs
32
+
33
+ [Unreleased]: https://github.com/ebrett/chiron/compare/v0.1.0...HEAD
34
+ [0.1.0]: https://github.com/ebrett/chiron/releases/tag/v0.1.0
data/CLAUDE.md ADDED
@@ -0,0 +1,108 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Chiron is a Ruby gem that initializes Claude AI development workflows, PRD templates, and journaling system for Rails projects. Named after the wise centaur who mentored heroes, Chiron helps developers set up structured development processes that integrate seamlessly with Claude Code.
8
+
9
+ ## Development Commands
10
+
11
+ **Important**: Always use bundle exec for consistency in gem development.
12
+
13
+ ```bash
14
+ # Setup
15
+ bundle install
16
+
17
+ # Testing
18
+ bundle exec rspec # Run all tests
19
+ bundle exec rspec spec/cli_spec.rb # Run specific test file
20
+
21
+ # Code quality
22
+ bundle exec rubocop # Linting
23
+ bundle exec rubocop --autocorrect # Auto-fix correctable violations
24
+
25
+ # Gem development
26
+ gem build chiron.gemspec # Build gem
27
+ gem install chiron-*.gem # Install locally
28
+ ```
29
+
30
+ ## Architecture Overview
31
+
32
+ ### Core Classes
33
+ - `Chiron::CLI` - Thor-based command line interface
34
+ - `Chiron::VERSION` - Gem version constant
35
+
36
+ ### Key Features
37
+ - Template copying system for Claude workflows
38
+ - ERB template processing for customizable files
39
+ - Interactive project setup with TTY::Prompt
40
+ - Migration support from .cursor to .claude structure
41
+
42
+ ## Technical Stack
43
+
44
+ - **Framework**: Ruby gem with Thor CLI framework
45
+ - **Dependencies**:
46
+ - `thor` - Command line interface framework
47
+ - `tty-prompt` - Interactive command line prompts
48
+ - `colorize` - Terminal output coloring
49
+ - **Testing**: RSpec with comprehensive test coverage
50
+ - **Code Quality**: RuboCop for style enforcement
51
+ - **CI/CD**: GitHub Actions for Ruby 3.0-3.3
52
+
53
+ ## Gem Structure
54
+
55
+ ```
56
+ lib/
57
+ ├── chiron.rb # Main entry point
58
+ └── chiron/
59
+ ├── version.rb # Version constant
60
+ ├── cli.rb # CLI implementation
61
+ └── templates/ # Template files for Rails projects
62
+ ├── CLAUDE.md.erb # Rails project CLAUDE.md template
63
+ ├── claude/settings.json
64
+ ├── commands/ # Workflow command templates
65
+ └── development_journal.md.erb
66
+ ```
67
+
68
+ ## Development Patterns
69
+
70
+ ### CLI Commands
71
+ - `init` - Initialize Claude workflow in Rails project
72
+ - `migrate-cursor` - Migrate from .cursor to .claude structure
73
+ - `add-workflow` - Add specific workflow templates
74
+ - `update` - Update workflows to latest version
75
+ - `doctor` - Health check for Claude setup
76
+ - `version` - Display gem version
77
+
78
+ ### Template System
79
+ - ERB templates with project-specific variables
80
+ - Modular command structure (workflows, conventions, context, journal, quality)
81
+ - Customizable file copying with conditional logic
82
+
83
+ ### PRD Workflow
84
+ - Use `.claude/commands/workflows/create-prd.md` for structured feature development
85
+ - PRDs should be saved in `/tasks/` directory as `prd-[feature-name].md`
86
+ - Follow the clarifying questions process before implementation
87
+
88
+ ### Code Quality
89
+ - RuboCop for consistent styling
90
+ - Comprehensive test coverage with RSpec
91
+ - GitHub Actions CI for multi-Ruby version testing
92
+
93
+ ## Testing Standards
94
+
95
+ - Write tests before implementation (TDD)
96
+ - Maintain high test coverage
97
+ - Mock file system operations in tests
98
+ - Test CLI commands with temporary directories
99
+ - Follow RSpec best practices
100
+
101
+ ## Important Reminders
102
+
103
+ - Always run tests before committing
104
+ - Use semantic commit messages
105
+ - Update the development journal for significant changes
106
+ - Follow the pre-commit checklist in `.claude/commands/quality/pre-commit.md`
107
+ - Update CHANGELOG.md for notable changes
108
+ - Test gem building and installation locally before releasing
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in claude_rails_setup.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 13.0'
9
+ gem 'rspec', '~> 3.0'
10
+ gem 'rubocop', '~> 1.21'
11
+
12
+ # Development tools
13
+ group :development do
14
+ gem 'pry'
15
+ gem 'yard'
16
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,93 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ chiron (0.1.0)
5
+ colorize (~> 1.1)
6
+ thor (~> 1.3)
7
+ tty-prompt (~> 0.23)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ast (2.4.3)
13
+ coderay (1.1.3)
14
+ colorize (1.1.0)
15
+ diff-lcs (1.6.2)
16
+ json (2.12.2)
17
+ language_server-protocol (3.17.0.5)
18
+ lint_roller (1.1.0)
19
+ method_source (1.1.0)
20
+ parallel (1.27.0)
21
+ parser (3.3.8.0)
22
+ ast (~> 2.4.1)
23
+ racc
24
+ pastel (0.8.0)
25
+ tty-color (~> 0.5)
26
+ prism (1.4.0)
27
+ pry (0.15.2)
28
+ coderay (~> 1.1)
29
+ method_source (~> 1.0)
30
+ racc (1.8.1)
31
+ rainbow (3.1.1)
32
+ rake (13.3.0)
33
+ regexp_parser (2.10.0)
34
+ rspec (3.13.1)
35
+ rspec-core (~> 3.13.0)
36
+ rspec-expectations (~> 3.13.0)
37
+ rspec-mocks (~> 3.13.0)
38
+ rspec-core (3.13.4)
39
+ rspec-support (~> 3.13.0)
40
+ rspec-expectations (3.13.5)
41
+ diff-lcs (>= 1.2.0, < 2.0)
42
+ rspec-support (~> 3.13.0)
43
+ rspec-mocks (3.13.5)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.13.0)
46
+ rspec-support (3.13.4)
47
+ rubocop (1.77.0)
48
+ json (~> 2.3)
49
+ language_server-protocol (~> 3.17.0.2)
50
+ lint_roller (~> 1.1.0)
51
+ parallel (~> 1.10)
52
+ parser (>= 3.3.0.2)
53
+ rainbow (>= 2.2.2, < 4.0)
54
+ regexp_parser (>= 2.9.3, < 3.0)
55
+ rubocop-ast (>= 1.45.1, < 2.0)
56
+ ruby-progressbar (~> 1.7)
57
+ unicode-display_width (>= 2.4.0, < 4.0)
58
+ rubocop-ast (1.45.1)
59
+ parser (>= 3.3.7.2)
60
+ prism (~> 1.4)
61
+ ruby-progressbar (1.13.0)
62
+ thor (1.3.2)
63
+ tty-color (0.6.0)
64
+ tty-cursor (0.7.1)
65
+ tty-prompt (0.23.1)
66
+ pastel (~> 0.8)
67
+ tty-reader (~> 0.8)
68
+ tty-reader (0.9.0)
69
+ tty-cursor (~> 0.7)
70
+ tty-screen (~> 0.8)
71
+ wisper (~> 2.0)
72
+ tty-screen (0.8.2)
73
+ unicode-display_width (3.1.4)
74
+ unicode-emoji (~> 4.0, >= 4.0.4)
75
+ unicode-emoji (4.0.4)
76
+ wisper (2.0.1)
77
+ yard (0.9.37)
78
+
79
+ PLATFORMS
80
+ arm64-darwin-24
81
+ ruby
82
+
83
+ DEPENDENCIES
84
+ bundler (~> 2.0)
85
+ chiron!
86
+ pry
87
+ rake (~> 13.0)
88
+ rspec (~> 3.0)
89
+ rubocop (~> 1.21)
90
+ yard
91
+
92
+ BUNDLED WITH
93
+ 2.6.4
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Brett McHargue
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,155 @@
1
+ # Chiron
2
+
3
+ A Ruby gem that initializes Claude AI development workflows, PRD templates, and journaling system for Rails projects. Named after the wise centaur who mentored heroes, Chiron helps you quickly set up a structured development process that integrates seamlessly with Claude Code.
4
+
5
+ ## Features
6
+
7
+ - 🚀 **Quick Setup**: Initialize Claude workflow with one command
8
+ - 📋 **PRD Workflow**: Structured Product Requirements Document creation
9
+ - ✅ **Task Management**: Generate and track implementation tasks
10
+ - 📓 **Development Journal**: Track progress and maintain project history
11
+ - 🔄 **Migration Tool**: Easy migration from `.cursor` to `.claude` structure
12
+ - 🎯 **Quality Checks**: Pre-commit checklists and TDD workflows
13
+ - 🛠️ **Customizable**: Adapt workflows to your team's needs
14
+
15
+ ## Installation
16
+
17
+ Add this line to your application's Gemfile:
18
+
19
+ ```ruby
20
+ gem 'chiron'
21
+ ```
22
+
23
+ And then execute:
24
+ ```bash
25
+ bundle install
26
+ ```
27
+
28
+ Or install it yourself as:
29
+ ```bash
30
+ gem install chiron
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ### Initialize Claude Workflow
36
+
37
+ In your Rails project root:
38
+
39
+ ```bash
40
+ chiron init
41
+ ```
42
+
43
+ This will:
44
+ - Create `.claude/commands/` directory with workflow templates
45
+ - Generate `CLAUDE.md` with project-specific configuration
46
+ - Set up `tasks/` directory for PRDs and task lists
47
+ - Initialize development journal in `docs/`
48
+ - Update `.gitignore` appropriately
49
+
50
+ ### Command Options
51
+
52
+ ```bash
53
+ # Initialize with options
54
+ chiron init --project-name="MyApp" --with-viewcomponents
55
+
56
+ # Migrate from .cursor to .claude
57
+ chiron migrate-cursor
58
+
59
+ # Add specific workflow
60
+ chiron add-workflow test-driven
61
+
62
+ # Update workflows to latest version
63
+ chiron update
64
+
65
+ # Check setup health
66
+ chiron doctor
67
+ ```
68
+
69
+ ## Workflow Structure
70
+
71
+ After initialization, you'll have:
72
+
73
+ ```
74
+ your-rails-app/
75
+ ├── .claude/
76
+ │ ├── commands/
77
+ │ │ ├── workflows/ # Development workflows
78
+ │ │ │ ├── create-prd.md
79
+ │ │ │ ├── generate-tasks.md
80
+ │ │ │ └── process-tasks.md
81
+ │ │ ├── conventions/ # Language/framework rules
82
+ │ │ │ └── rails.md
83
+ │ │ ├── context/ # Context commands
84
+ │ │ │ ├── quickstart.md
85
+ │ │ │ └── catchup.md
86
+ │ │ ├── journal/ # Journal management
87
+ │ │ │ ├── instructions.md
88
+ │ │ │ └── template.md
89
+ │ │ └── quality/ # Quality assurance
90
+ │ │ ├── pre-commit.md
91
+ │ │ └── test-driven.md
92
+ │ └── settings.json # Claude permissions
93
+ ├── CLAUDE.md # Project-specific Claude instructions
94
+ ├── tasks/ # PRDs and task lists
95
+ └── docs/
96
+ └── development_journal.md
97
+ ```
98
+
99
+ ## Key Workflows
100
+
101
+ ### 1. Creating a PRD
102
+ When starting a new feature, Claude will:
103
+ - Ask clarifying questions
104
+ - Generate a structured PRD
105
+ - Save it as `tasks/prd-[feature-name].md`
106
+
107
+ ### 2. Generating Tasks
108
+ From a PRD, Claude will:
109
+ - Create high-level tasks
110
+ - Break them into subtasks
111
+ - Save as `tasks/tasks-prd-[feature-name].md`
112
+
113
+ ### 3. Development Journal
114
+ Claude maintains a journal with:
115
+ - Daily work summaries
116
+ - Technical decisions
117
+ - Bug fixes and features
118
+ - Multi-developer collaboration tracking
119
+
120
+ ### 4. Quality Checks
121
+ Before committing:
122
+ - Run the pre-commit checklist
123
+ - Follow TDD workflow
124
+ - Update documentation
125
+
126
+ ## Example Claude Commands
127
+
128
+ After setup, you can tell Claude:
129
+
130
+ - "Create a PRD for user authentication"
131
+ - "Generate tasks from prd-user-auth.md"
132
+ - "Catchup" (for project status)
133
+ - "Update the journal"
134
+ - "Run pre-commit checks"
135
+
136
+ ## Customization
137
+
138
+ All templates are customizable. After initialization:
139
+ 1. Edit files in `.claude/commands/` to match your workflow
140
+ 2. Modify `CLAUDE.md` for project-specific instructions
141
+ 3. Add custom workflows as needed
142
+
143
+ ## Development
144
+
145
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
146
+
147
+ To install this gem onto your local machine, run `bundle exec rake install`.
148
+
149
+ ## Contributing
150
+
151
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ebrett/chiron.
152
+
153
+ ## License
154
+
155
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require 'rubocop/rake_task'
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,60 @@
1
+ # Development Journal - Chiron Gem
2
+
3
+ ## Project Overview
4
+ Chiron is a Ruby gem that helps Rails developers set up Claude AI workflows, PRD templates, and development journaling systems.
5
+
6
+ ---
7
+
8
+ ## 2025-01-21 - Initial Setup and Module Rename
9
+
10
+ ### What was accomplished today:
11
+ - Set up complete gem development infrastructure
12
+ - Initialized git repository with proper .gitignore
13
+ - Created comprehensive RSpec test suite (5 tests, all passing)
14
+ - Set up GitHub Actions CI for Ruby 3.0-3.3
15
+ - Added CHANGELOG.md and MIT LICENSE
16
+ - Updated README with chiron branding and examples
17
+ - Added RuboCop configuration and fixed style issues
18
+ - Renamed module from `ClaudeRailsSetup` to `Chiron` throughout codebase
19
+ - Updated email to GitHub no-reply address
20
+ - Added Claude workflows to the gem itself (meta!)
21
+
22
+ ### Technical decisions made:
23
+ - **Module Naming**: Changed from `ClaudeRailsSetup` to `Chiron` for better branding
24
+ - **File Structure**: Moved `lib/claude_rails_setup/` to `lib/chiron/`
25
+ - **Testing Strategy**: Used temporary directories and mocked TTY::Prompt for CLI tests
26
+ - **CI/CD**: GitHub Actions with matrix testing across Ruby versions
27
+ - **Code Quality**: RuboCop with single quotes, 120 character line length
28
+
29
+ ### Bugs fixed:
30
+ - Fixed missing `Date` require in CLI for ERB template processing
31
+ - Fixed missing `version` method in CLI class
32
+ - Updated all module references after rename
33
+ - Fixed test directory handling by using `Dir.chdir` instead of mocking
34
+
35
+ ### Features added:
36
+ - Complete gem development infrastructure
37
+ - Module rename from old name to Chiron
38
+ - Self-hosting: Added Claude workflows to the gem itself using its own templates
39
+
40
+ ### Code quality metrics:
41
+ - RSpec: 5 examples, 0 failures
42
+ - RuboCop: 15 minor style violations (mostly method length, acceptable for CLI)
43
+ - Test Coverage: CLI functionality well covered
44
+
45
+ ### Next steps:
46
+ - Create GitHub repository and push code
47
+ - Test gem building and installation
48
+ - Consider adding more comprehensive CLI tests
49
+ - Add contribution guidelines
50
+ - Prepare for RubyGems publishing
51
+
52
+ ### Notes:
53
+ - The gem now "eats its own dog food" by using Claude workflows for its own development
54
+ - All original functionality preserved during module rename
55
+ - Ready for GitHub publication and RubyGems release
56
+
57
+ ---
58
+
59
+ *Template: [Entry Date] - [Brief Summary]*
60
+ *What was accomplished, technical decisions, bugs fixed, features added, next steps*
data/exe/chiron ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'chiron'
5
+
6
+ Chiron::CLI.start(ARGV)