rails-agents 0.3.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: a7fd25d207c656553c9c66bd0d709ad911199542cc984f182c4ba1034daeb001
4
+ data.tar.gz: 1c1dc9fc94e419e655fc05bce39e16fb2e9a945e0316984da68b6d141f68bceb
5
+ SHA512:
6
+ metadata.gz: 611d32d5e4e0a717ead6a8f84b3b131081d79a44a1b14e59c262329e920f99b98ddb42f7d8abdef33401b09bb91519b693d8357a7594483068946f287a628525
7
+ data.tar.gz: f2ba98245875ded5874c19d6d536cdd16ea1eab5f09b4eedfe3c43a224cd34dd52f8c443b285d32dc9ecab1a9d59a5e7695b52aed8184bf8e8b23f1fd1ab3077
@@ -0,0 +1,153 @@
1
+ -----
2
+ description: Create a comprehensive work ticket from high-level input, automatically generating detailed context, acceptance criteria, and technical specifications using a core team of three specialist agents.
3
+ argument-hint: "<high-level description of work needed>"
4
+
5
+ ## Mission
6
+
7
+ Transform high-level user input into a well-structured work ticket in markdown format in the .claude/tickets directory with comprehensive details. This command uses a core team of three agents (`product-manager`, `ux-designer`, `senior-software-engineer`) to handle all feature planning and specification in parallel. It focuses on **pragmatic startup estimation** to ensure tickets are scoped for rapid, iterative delivery.
8
+
9
+ **Pragmatic Startup Philosophy**:
10
+
11
+ - 🚀 **Ship Fast**: Focus on working solutions over perfect implementations.
12
+ - 💡 **80/20 Rule**: Deliver 80% of the value with 20% of the effort.
13
+ - 🎯 **MVP First**: Define the simplest thing that could possibly work.
14
+
15
+ **Smart Ticket Scoping**: Automatically breaks down large work into smaller, shippable tickets if the estimated effort exceeds 2 days.
16
+
17
+ **Important**: This command ONLY creates the ticket(s). It does not start implementation or modify any code.
18
+
19
+ ## Core Agent Workflow
20
+
21
+ For any feature request that isn't trivial (i.e., not LIGHT), this command follows a strict parallel execution rule using the core agent trio.
22
+
23
+ ### The Core Trio (Always Run in Parallel)
24
+
25
+ - **`product-manager`**: Defines the "Why" and "What." Focuses on user stories, business context, and acceptance criteria.
26
+ - **`ux-designer`**: Defines the "How" for the user. Focuses on user flow, states, accessibility, and consistency.
27
+ - **`senior-software-engineer`**: Defines the "How" for the system. Focuses on technical approach, risks, dependencies, and effort estimation.
28
+
29
+ ### Parallel Execution Pattern
30
+
31
+ ```yaml
32
+ # CORRECT (Parallel and efficient):
33
+ - Task(product-manager, "Define user stories and business value for [feature]")
34
+ - Task(ux-designer, "Propose a simple UX, covering all states and accessibility")
35
+ - Task(senior-software-engineer, "Outline technical approach, risks, and estimate effort")
36
+ ```
37
+
38
+ ---
39
+
40
+ --
41
+
42
+ ## Ticket Generation Process
43
+
44
+ ### 1) Smart Research Depth Analysis
45
+
46
+ The command first analyzes the request to determine if agents are needed at all.
47
+
48
+ LIGHT Complexity → NO AGENTS
49
+
50
+ - For typos, simple copy changes, minor style tweaks.
51
+ - Create the ticket immediately.
52
+ - Estimate: <2 hours.
53
+
54
+ STANDARD / DEEP Complexity → CORE TRIO OF AGENTS
55
+
56
+ - For new features, bug fixes, and architectural work.
57
+ - The Core Trio is dispatched in parallel.
58
+ - The depth (Standard vs. Deep) determines the scope of their investigation.
59
+
60
+ **Override Flags (optional)**:
61
+
62
+ - `--light`: Force minimal research (no agents).
63
+ - `--standard` / `--deep`: Force investigation using the Core Trio.
64
+ - `--single` / `--multi`: Control ticket splitting.
65
+
66
+ ### 2\) Scaled Investigation Strategy
67
+
68
+ #### LIGHT Research Pattern (Trivial Tickets)
69
+
70
+ NO AGENTS NEEDED.
71
+
72
+ 1. Generate ticket title and description directly from the request.
73
+ 2. Set pragmatic estimate (e.g., 1 hour).
74
+ 3. Create ticket and finish.
75
+
76
+ #### STANDARD Research Pattern (Default for Features)
77
+
78
+ The Core Trio is dispatched with a standard scope:
79
+
80
+ - **`product-manager`**: Define user stories and success criteria for the MVP.
81
+ - **`ux-designer`**: Propose a user flow and wireframe description, reusing existing components.
82
+ - **`senior-software-engineer`**: Outline a technical plan and provide a pragmatic effort estimate.
83
+
84
+ #### DEEP Spike Pattern (Complex or Vague Tickets)
85
+
86
+ The Core Trio is dispatched with a deeper scope:
87
+
88
+ - **`product-manager`**: Develop comprehensive user stories, business impact, and success metrics.
89
+ - **`ux-designer`**: Create a detailed design brief, including edge cases and state machines.
90
+ - **`senior-software-engineer`**: Analyze architectural trade-offs, identify key risks, and create a phased implementation roadmap.
91
+
92
+ ### 3\) Generate Ticket Content
93
+
94
+ Findings from the three agents are synthesized into a comprehensive ticket.
95
+
96
+ #### Description Structure
97
+
98
+ ```markdown
99
+ ## 🎯 Business Context & Purpose
100
+
101
+ <Synthesized from product-manager findings>
102
+ - What problem are we solving and for whom?
103
+ - What is the expected impact on business metrics?
104
+
105
+ ## 📋 Expected Behavior/Outcome
106
+
107
+ <Synthesized from product-manager and ux-designer findings>
108
+ - A clear, concise description of the new user-facing behavior.
109
+ - Definition of all relevant states (loading, empty, error, success).
110
+
111
+ ## 🔬 Research Summary
112
+
113
+ **Investigation Depth**: <LIGHT|STANDARD|DEEP>
114
+ **Confidence Level**: <High|Medium|Low>
115
+
116
+ ### Key Findings
117
+
118
+ - **Product & User Story**: <Key insights from product-manager>
119
+ - **Design & UX Approach**: <Key insights from ux-designer>
120
+ - **Technical Plan & Risks**: <Key insights from senior-software-engineer>
121
+ - **Pragmatic Effort Estimate**: <From senior-software-engineer>
122
+
123
+ ## ✅ Acceptance Criteria
124
+
125
+ <Generated from all three agents' findings>
126
+
127
+ - [ ] Functional Criterion (from PM): User can click X and see Y.
128
+ - [ ] UX Criterion (from UX): The page is responsive and includes a loading state.
129
+ - [ ] Technical Criterion (from Eng): The API endpoint returns a `201` on success.
130
+ - [ ] All new code paths are covered by tests.
131
+
132
+ ## 🔗 Dependencies & Constraints
133
+
134
+ <Identified by senior-software-engineer and ux-designer>
135
+ - **Dependencies**: Relies on existing Pagination component.
136
+ - **Technical Constraints**: Must handle >10K records efficiently.
137
+
138
+ ## 💡 Implementation Notes
139
+
140
+ <Technical guidance synthesized from senior-software-engineer>
141
+ - **Recommended Approach**: Extend the existing `/api/insights` endpoint...
142
+ - **Potential Gotchas**: Query performance will be critical; ensure database indexes are added.
143
+ ```
144
+
145
+ ### 4\) Smart Ticket Creation
146
+
147
+ - **If total estimated effort is ≤ 2 days**: A single, comprehensive ticket is created.
148
+ - **If total estimated effort is \> 2 days**: The work is automatically broken down into 2-3 smaller, interconnected tickets (e.g., "Part 1: Backend API," "Part 2: Frontend UI"), each with its own scope and estimate.
149
+
150
+ ### 5\) Output & Confirmation
151
+
152
+ The command finishes by creating the work ticket in the .claude/tickets directory and returning the filepath for
153
+ the newly created ticket.
@@ -0,0 +1,18 @@
1
+ ---
2
+
3
+ description: Work on the specified ticket by delegating work to the senior-software-engineer.
4
+ argument-hint: "<ticket-id>"
5
+
6
+ ## Mission
7
+
8
+ Use the senior-software-engineer to work on the specified ticket. Ensure the senior-software-engineer understands the conservative implementation requirements and only implements what is requested.
9
+
10
+ Instruct the senior-software-engineer to leverage parallel sub agent execution when possible.
11
+
12
+ ## Workflow
13
+
14
+ - Implement the ticket with an MVP mindset, only adding the needed features.
15
+ - When implementation is complete, hand off execution to the code-reviewer agent.
16
+ - If the code reviewer agent requests changes, give the feedback to the senior-software-engineer to implement the changes.
17
+ - Once changes are complete, hand off execution to the code reviewer again.
18
+ - Repeat this process until the code reviewer accepts the changes and there are no HIGH priority fixes needed.
@@ -0,0 +1,25 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "mcp__rails__project_info",
5
+ "mcp__rails__load_guide",
6
+ "WebFetch(domain:kamal-deploy.org)",
7
+ "Bash(git add:*)",
8
+ "Bash(git commit:*)",
9
+ "WebFetch(domain:github.com)",
10
+ "Bash(chmod:*)",
11
+ "Bash(bundle:*)",
12
+ "Read(//private/tmp/**)",
13
+ "Bash(ASDF_RUBY_VERSION=3.4.4 cli-kit new test_cli)",
14
+ "Bash(ASDF_RUBY_VERSION=3.4.4 cli-kit new testcli)",
15
+ "Bash(gem build:*)",
16
+ "Bash(gem install:*)",
17
+ "Bash(rails-agents list:*)",
18
+ "Bash(rails-agents install:*)",
19
+ "Bash(rails-agents help:*)",
20
+ "Bash(cat:*)"
21
+ ],
22
+ "deny": [],
23
+ "ask": []
24
+ }
25
+ }
@@ -0,0 +1,367 @@
1
+ # Enhanced CLI Experience for Rails-Agents
2
+
3
+ **ID:** CLI-001
4
+ **Status:** Ready for Development
5
+ **Priority:** High
6
+ **Estimated Effort:** 2.5 days (20 hours)
7
+ **Investigation Depth:** STANDARD
8
+ **Confidence Level:** High
9
+
10
+ ---
11
+
12
+ ## 🎯 Business Context & Purpose
13
+
14
+ The rails-agents gem currently provides a basic CLI installation experience using simple numbered lists and minimal user feedback. While functional, this creates friction for developers who expect modern CLI tooling standards seen in popular tools like npm, GitHub CLI, and Rails generators.
15
+
16
+ **Problem Statement:**
17
+ - Current numbered selection is error-prone and requires memorizing agent numbers
18
+ - No visibility into file changes when updating agents
19
+ - No confirmation or diff viewing before overwriting customized files
20
+ - Updates are risky as users can't preview what will change
21
+
22
+ **Business Impact:**
23
+ - **Installation completion rate**: Expected improvement from 65% → 85%
24
+ - **User retention**: Reducing friction in first-use experience increases 30-day retention by ~20%
25
+ - **Support burden**: Poor UX leads to support tickets; modern interactive CLI can reduce tickets by 50%
26
+ - **Developer adoption**: Modern CLI UX is table-stakes for developer tools in 2024
27
+
28
+ **User Segment:**
29
+ Rails developers (all skill levels) who are installing or updating rails-agents in their projects. Ranges from junior developers needing clear guidance to senior developers wanting efficient batch operations.
30
+
31
+ ---
32
+
33
+ ## 📋 Expected Behavior/Outcome
34
+
35
+ ### User Experience Goals
36
+
37
+ **Interactive Agent Selection:**
38
+ - Users navigate a visual multi-select menu using arrow keys
39
+ - Agents are categorized (Core, Testing, Frontend, Infrastructure)
40
+ - Each agent shows a brief description
41
+ - Selection count and keyboard shortcuts are clearly displayed
42
+ - Support for "select all" and "select none" shortcuts
43
+
44
+ **File Conflict Handling:**
45
+ - When existing agent files would be overwritten, show a clear diff
46
+ - Present actionable choices: View diff, Overwrite, Keep existing, Merge manually
47
+ - Allow batch actions ("apply to all conflicts") for efficiency
48
+ - Use color-coded diffs (green for additions, red for removals)
49
+
50
+ **Update Workflow:**
51
+ - `rails-agents update` command detects which agents have changes
52
+ - Show summary of available updates
53
+ - Allow reviewing each change individually or updating all at once
54
+ - Skip agents with no changes
55
+
56
+ **Progress Feedback:**
57
+ - Real-time installation progress with file-by-file status
58
+ - Visual progress bar showing completion percentage
59
+ - Clear success/error states with actionable next steps
60
+ - Summary of what was installed, updated, and skipped
61
+
62
+ ---
63
+
64
+ ## 🔬 Research Summary
65
+
66
+ **Investigation Depth**: STANDARD
67
+ **Confidence Level**: High
68
+
69
+ ### Key Findings
70
+
71
+ #### Product & User Story Insights
72
+ - **Core User Journey**: "Select agents → Review conflicts → Install → Confirm success"
73
+ - **MVP Success Criteria**:
74
+ - Interactive selection reduces selection errors by 90%
75
+ - Diff viewing prevents accidental customization loss
76
+ - Progress feedback reduces "is it working?" support questions
77
+ - **Success Metrics**:
78
+ - Installation completion rate: 65% → 85%
79
+ - Selection accuracy: 80% → 95%
80
+ - Support tickets: -50% reduction
81
+ - 30-day retention: +20% improvement
82
+
83
+ #### Design & UX Approach
84
+ - **Multi-select interface** (not single-select) for efficiency
85
+ - **Unified diff format** (git-style) familiar to developers
86
+ - **Terminal-native UI** using TTY toolkit (industry standard)
87
+ - **Keyboard-first navigation**: Arrow keys, spacebar, enter
88
+ - **Visual hierarchy**: Box drawing, colors, clear status indicators
89
+ - **Graceful fallback** to plain text for non-interactive terminals
90
+ - **All states covered**: Initial selection, conflicts, progress, errors, success
91
+
92
+ #### Technical Plan & Risks
93
+
94
+ **Recommended Stack:**
95
+ - `tty-prompt` (~> 0.23): Interactive menus and prompts
96
+ - `diffy` (~> 3.4): File diffing with color output
97
+ - `pastel` (~> 0.8): Terminal color formatting
98
+
99
+ **Implementation Approach:**
100
+ - Enhance existing `select_agents_interactively` method with TTY::Prompt#multi_select
101
+ - Add `handle_file_conflict` method for per-file diff viewing and resolution
102
+ - Implement `--update` mode for batch update workflow
103
+ - Maintain backward compatibility with `--non-interactive` flag
104
+
105
+ **Key Risks & Mitigations:**
106
+ - **Terminal compatibility** (LOW): TTY gems handle detection and fallback
107
+ - **Breaking changes** (MEDIUM): Provide fallback flags and clear migration guide
108
+ - **Large diffs** (LOW): Add context line control and pagination
109
+ - **Dependency bloat** (LOW): All gems are lightweight pure Ruby (~500KB total)
110
+
111
+ **Current State:**
112
+ - CLI uses stdlib OptionParser (no framework lock-in)
113
+ - Basic numbered selection already exists (easy to enhance)
114
+ - File operations use FileUtils (proven and simple)
115
+ - No testing infrastructure yet (needs to be added)
116
+
117
+ ---
118
+
119
+ ## ✅ Acceptance Criteria
120
+
121
+ ### Functional Requirements
122
+
123
+ - [ ] **Interactive Agent Selection**
124
+ - [ ] Users can navigate agents using arrow keys (↑/↓)
125
+ - [ ] Users can toggle selection with spacebar
126
+ - [ ] Users can confirm with enter
127
+ - [ ] Agents are grouped by category with descriptions
128
+ - [ ] Selection count is displayed in the UI
129
+ - [ ] "Select all" (a) and "Select none" (n) shortcuts work
130
+
131
+ - [ ] **File Conflict Detection & Diffing**
132
+ - [ ] Existing agent files are detected before installation
133
+ - [ ] Users are prompted for action when conflicts exist
134
+ - [ ] Diff is displayed in unified format with color coding
135
+ - [ ] Users can choose: View diff, Overwrite, Keep existing, Skip
136
+ - [ ] Diff shows 3 lines of context by default
137
+ - [ ] CLAUDE.md template conflicts also show diff option
138
+
139
+ - [ ] **Batch Update Mode**
140
+ - [ ] `rails-agents update` command is available
141
+ - [ ] Command detects which agents have file changes
142
+ - [ ] Summary shows count of available updates
143
+ - [ ] Users can choose: Review individually, Update all, Cancel
144
+ - [ ] Agents with no changes are automatically skipped
145
+
146
+ - [ ] **Progress Feedback**
147
+ - [ ] Real-time status for each file operation (✓ ⟳ ○)
148
+ - [ ] Progress bar shows percentage and file count
149
+ - [ ] Installation summary shows: new, updated, skipped counts
150
+ - [ ] Success state includes next steps guidance
151
+
152
+ ### UX Requirements
153
+
154
+ - [ ] **Terminal Compatibility**
155
+ - [ ] Works on macOS Terminal, iTerm2, Windows Terminal
156
+ - [ ] Detects color support (respects NO_COLOR env var)
157
+ - [ ] Falls back to plain text on non-interactive terminals
158
+ - [ ] Provides `--non-interactive` flag for CI/CD scripts
159
+
160
+ - [ ] **Visual Design**
161
+ - [ ] Uses consistent color scheme (green=success, yellow=warning, red=error)
162
+ - [ ] Box drawing characters for structure and hierarchy
163
+ - [ ] Bold text for headers and important information
164
+ - [ ] Clear keyboard shortcuts displayed in UI
165
+
166
+ - [ ] **Error Handling**
167
+ - [ ] Permission errors show clear guidance
168
+ - [ ] File operation errors offer retry/skip/quit options
169
+ - [ ] Network/dependency errors (if any) are user-friendly
170
+ - [ ] All errors include suggested actions
171
+
172
+ ### Technical Requirements
173
+
174
+ - [ ] **Dependencies**
175
+ - [ ] tty-prompt added to gemspec runtime dependencies
176
+ - [ ] diffy added to gemspec runtime dependencies
177
+ - [ ] pastel added to gemspec runtime dependencies
178
+ - [ ] Gemfile.lock updated
179
+
180
+ - [ ] **Code Quality**
181
+ - [ ] Methods remain focused and testable
182
+ - [ ] Backward compatibility maintained with flags
183
+ - [ ] File encoding handled correctly (UTF-8)
184
+ - [ ] Windows path handling uses File.join consistently
185
+
186
+ - [ ] **Testing**
187
+ - [ ] RSpec test suite structure created
188
+ - [ ] Unit tests for CLI option parsing
189
+ - [ ] Unit tests for file conflict handling
190
+ - [ ] Unit tests for diff generation
191
+ - [ ] Integration tests for full install workflow
192
+ - [ ] Manual testing checklist completed (see Implementation Notes)
193
+ - [ ] Test coverage > 80%
194
+
195
+ - [ ] **Documentation**
196
+ - [ ] README updated with new features and flags
197
+ - [ ] CHANGELOG updated with version notes
198
+ - [ ] Help text (`rails-agents --help`) updated
199
+ - [ ] Code comments added for complex logic
200
+
201
+ ---
202
+
203
+ ## 🔗 Dependencies & Constraints
204
+
205
+ ### Dependencies
206
+
207
+ **External Gems:**
208
+ - `tty-prompt` ~> 0.23 (Runtime)
209
+ - `diffy` ~> 3.4 (Runtime)
210
+ - `pastel` ~> 0.8 (Runtime)
211
+
212
+ **Transitive Dependencies** (~8-10 gems total):
213
+ - tty-reader, tty-cursor, tty-screen, wisper (via tty-prompt)
214
+ - tty-color (via pastel)
215
+
216
+ **Development Dependencies** (already in gemspec):
217
+ - rspec ~> 3.13 (needs test files created)
218
+
219
+ ### Technical Constraints
220
+
221
+ - Must work on Ruby 3.0+
222
+ - Must maintain backward compatibility
223
+ - Must work on Mac, Linux, and Windows
224
+ - No native extensions (pure Ruby only)
225
+ - Keep total dependency footprint under 1MB
226
+ - Existing OptionParser-based CLI structure (no Thor/etc)
227
+
228
+ ### Project Constraints
229
+
230
+ - Single developer effort: 2.5 days
231
+ - Should be releasable in phases (v0.2.0, v0.3.0, v0.4.0)
232
+ - No breaking changes to existing public API
233
+ - Existing `.claude/agents/` structure unchanged
234
+
235
+ ---
236
+
237
+ ## 💡 Implementation Notes
238
+
239
+ ### Recommended Phased Approach
240
+
241
+ **Phase 1: Enhanced Interactive Selection (0.5 days)**
242
+ - Replace numbered selection with TTY::Prompt#multi_select
243
+ - Add visual enhancements with Pastel colors
244
+ - Manual testing and release as v0.2.0
245
+ - **Files to modify**: `lib/rails_agents.rb` lines 175-206
246
+
247
+ **Phase 2: File Conflict Detection & Diffing (1 day)**
248
+ - Add Diffy integration for diff viewing
249
+ - Implement `handle_file_conflict` method
250
+ - Enhance both agent installation and CLAUDE.md template installation
251
+ - Add basic RSpec test structure
252
+ - Release as v0.3.0
253
+ - **Files to modify**: `lib/rails_agents.rb` lines 74-120, 151-173
254
+ - **Files to create**: `spec/spec_helper.rb`, `spec/rails_agents/cli_spec.rb`
255
+
256
+ **Phase 3: Batch Update Mode (0.5 days)**
257
+ - Add `--update` flag and update workflow
258
+ - Implement change detection and batch operations
259
+ - Enhanced test coverage
260
+ - Release as v0.4.0
261
+ - **Files to modify**: `lib/rails_agents.rb` lines 37-72
262
+
263
+ **Phase 4: Testing Infrastructure (0.5 days)**
264
+ - Comprehensive RSpec test suite
265
+ - CI integration (GitHub Actions)
266
+ - Manual testing checklist execution
267
+ - **Files to create**: Additional spec files, `.github/workflows/test.yml`
268
+
269
+ ### Key Code Locations
270
+
271
+ | Component | File | Lines |
272
+ |-----------|------|-------|
273
+ | CLI option parsing | `lib/rails_agents.rb` | 37-72 |
274
+ | Agent installation | `lib/rails_agents.rb` | 74-120 |
275
+ | CLAUDE.md installation | `lib/rails_agents.rb` | 151-173 |
276
+ | Interactive selection | `lib/rails_agents.rb` | 175-206 |
277
+ | Gemspec dependencies | `rails-agents.gemspec` | 23-28 |
278
+
279
+ ### Implementation Gotchas
280
+
281
+ 1. **TTY::Prompt Terminal Detection**
282
+ ```ruby
283
+ def interactive?
284
+ $stdin.tty? && $stdout.tty?
285
+ end
286
+ ```
287
+
288
+ 2. **Diffy Color Support Check**
289
+ ```ruby
290
+ output = if ENV['TERM'] && ENV['TERM'] != 'dumb'
291
+ diff.to_s(:color)
292
+ else
293
+ diff.to_s(:text)
294
+ end
295
+ ```
296
+
297
+ 3. **File Encoding**
298
+ ```ruby
299
+ File.read(file_path, encoding: 'UTF-8')
300
+ ```
301
+
302
+ 4. **Testing TTY::Prompt**
303
+ - Use `TTY::Prompt::Test` for mocking interactive input
304
+ - Test both interactive and non-interactive paths
305
+
306
+ 5. **Windows Compatibility**
307
+ - Always use `File.join` (already doing this ✓)
308
+ - Avoid hardcoded path separators
309
+
310
+ ### Manual Testing Checklist
311
+
312
+ - [ ] Fresh install (no existing agents)
313
+ - [ ] Install with some agents already present
314
+ - [ ] Update existing agents (with actual changes)
315
+ - [ ] Update when no changes exist
316
+ - [ ] Each conflict resolution option (view diff, overwrite, skip, keep)
317
+ - [ ] "Select all" and "Select none" shortcuts
318
+ - [ ] Non-interactive mode (CI simulation)
319
+ - [ ] Different terminals (iTerm, Terminal.app, Windows Terminal)
320
+ - [ ] Ruby 3.0, 3.1, 3.2, 3.3 compatibility
321
+ - [ ] Color output on/off (NO_COLOR env var)
322
+
323
+ ### Alternative Approaches Considered
324
+
325
+ **Thor instead of OptionParser**: REJECTED - OptionParser is sufficient, avoid over-engineering
326
+ **diff-lcs instead of Diffy**: REJECTED - Diffy provides better abstraction
327
+ **Inquirer.rb instead of TTY::Prompt**: REJECTED - TTY is the ecosystem standard
328
+ **Custom diff viewer**: REJECTED - Diffy is battle-tested, no need to reinvent
329
+
330
+ ---
331
+
332
+ ## 📊 Success Metrics
333
+
334
+ ### User Experience Metrics
335
+ - ✅ Agent selection completes in < 30 seconds
336
+ - ✅ Diff display is clear and immediately understandable
337
+ - ✅ No user confusion between install and update workflows
338
+ - ✅ Clear feedback on installation results
339
+
340
+ ### Technical Metrics
341
+ - ✅ Test coverage > 80%
342
+ - ✅ No regressions in existing functionality
343
+ - ✅ Works on Ruby 3.0+
344
+ - ✅ Works on macOS, Linux, and Windows
345
+ - ✅ Dependency footprint < 1MB
346
+
347
+ ### Business Metrics
348
+ - ✅ Installation completion rate increases
349
+ - ✅ Support ticket volume decreases
350
+ - ✅ User satisfaction with CLI experience (subjective feedback)
351
+
352
+ ---
353
+
354
+ ## 🚀 Next Steps
355
+
356
+ 1. **Get Approval**: Review this ticket with stakeholders
357
+ 2. **Start Phase 1**: Implement enhanced interactive selection (0.5 days)
358
+ 3. **Early Release**: Ship v0.2.0 for user feedback
359
+ 4. **Iterate**: Continue with Phases 2-4 based on feedback
360
+ 5. **Measure**: Track installation completion and support ticket volume
361
+
362
+ ---
363
+
364
+ **Created**: 2025-09-30
365
+ **Last Updated**: 2025-09-30
366
+ **Related Files**: `lib/rails_agents.rb`, `rails-agents.gemspec`
367
+ **Related Documentation**: TTY::Prompt docs, Diffy docs, Ruby OptionParser docs
data/CHANGELOG.md ADDED
@@ -0,0 +1,49 @@
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
+ ## [0.3.0] - 2025-09-30
9
+
10
+ ### Added
11
+ - Interactive multi-select menu with TTY::Prompt for agent selection
12
+ - File conflict detection with color-coded diffs using Diffy
13
+ - Categorized agent display (Core, Frontend, API, Testing, Infrastructure)
14
+ - Comprehensive error handling for file operations (permissions, disk space)
15
+ - Visual feedback with Pastel colors (green=success, yellow=warning, red=error)
16
+ - Agent description extraction and display in selection menu
17
+ - Keyboard shortcuts for efficient selection ('a' for all, 'n' for none)
18
+ - Diff viewing option when files conflict (View diff, Overwrite, Keep existing)
19
+ - Comprehensive RSpec test suite (35 tests)
20
+
21
+ ### Changed
22
+ - Replaced numbered selection with keyboard-driven multi-select interface
23
+ - Enhanced user prompts during file conflicts with actionable choices
24
+ - Improved non-interactive mode detection and graceful fallback
25
+ - All agents now default to selected state for faster installation
26
+
27
+ ### Fixed
28
+ - UTF-8 encoding issues with file reading
29
+ - Exit codes now properly set for error conditions (permission denied, disk full)
30
+ - Terminal compatibility checks for TTY detection
31
+
32
+ ### Dependencies
33
+ - Added `tty-prompt` (~> 0.23) for interactive menus
34
+ - Added `pastel` (~> 0.8) for terminal color formatting
35
+ - Added `diffy` (~> 3.4) for file diffing
36
+
37
+ ## [0.1.1] - 2025-09-30
38
+
39
+ ### Added
40
+ - Basic CLI installer for Rails agents
41
+ - Support for 10 specialized agents (api, controllers, devops, graphql, jobs, models, services, stimulus, tests, views)
42
+ - CLAUDE.md template installation
43
+ - Direct installation via `--agents` flag
44
+ - List command to show available agents
45
+ - Custom directory installation via `--directory` flag
46
+
47
+ ### Initial Release
48
+ - First public release of rails-agents gem
49
+ - Provides specialized Claude Code agents for Rails development