appydave-tools 0.70.0 → 0.71.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/brainstorming-agent.md +227 -0
  3. data/.claude/commands/cli-test.md +251 -0
  4. data/.claude/commands/dev.md +234 -0
  5. data/.claude/commands/po.md +227 -0
  6. data/.claude/commands/progress.md +51 -0
  7. data/.claude/commands/uat.md +321 -0
  8. data/.rubocop.yml +9 -0
  9. data/AGENTS.md +43 -0
  10. data/CHANGELOG.md +12 -0
  11. data/CLAUDE.md +26 -3
  12. data/README.md +15 -0
  13. data/bin/dam +21 -1
  14. data/bin/jump.rb +29 -0
  15. data/bin/subtitle_processor.rb +54 -1
  16. data/bin/zsh_history.rb +846 -0
  17. data/docs/README.md +162 -69
  18. data/docs/architecture/cli/exe-bin-convention.md +434 -0
  19. data/docs/architecture/cli-patterns.md +631 -0
  20. data/docs/architecture/gpt-context/gpt-context-architecture.md +325 -0
  21. data/docs/architecture/gpt-context/gpt-context-implementation-guide.md +419 -0
  22. data/docs/architecture/gpt-context/gpt-context-vision.md +179 -0
  23. data/docs/architecture/testing/testing-patterns.md +762 -0
  24. data/docs/backlog.md +120 -0
  25. data/docs/cli-tests/FR-3-jump-location-tool.md +515 -0
  26. data/docs/specs/fr-002-gpt-context-help-system.md +265 -0
  27. data/docs/specs/fr-003-jump-location-tool.md +779 -0
  28. data/docs/specs/zsh-history-tool.md +820 -0
  29. data/docs/uat/FR-3-jump-location-tool.md +741 -0
  30. data/exe/jump +11 -0
  31. data/exe/{subtitle_manager → subtitle_processor} +1 -1
  32. data/exe/zsh_history +11 -0
  33. data/lib/appydave/tools/configuration/openai.rb +1 -1
  34. data/lib/appydave/tools/dam/file_helper.rb +28 -0
  35. data/lib/appydave/tools/dam/project_listing.rb +4 -30
  36. data/lib/appydave/tools/dam/s3_operations.rb +2 -1
  37. data/lib/appydave/tools/dam/ssd_status.rb +226 -0
  38. data/lib/appydave/tools/dam/status.rb +3 -51
  39. data/lib/appydave/tools/jump/cli.rb +561 -0
  40. data/lib/appydave/tools/jump/commands/add.rb +52 -0
  41. data/lib/appydave/tools/jump/commands/base.rb +43 -0
  42. data/lib/appydave/tools/jump/commands/generate.rb +153 -0
  43. data/lib/appydave/tools/jump/commands/remove.rb +58 -0
  44. data/lib/appydave/tools/jump/commands/report.rb +214 -0
  45. data/lib/appydave/tools/jump/commands/update.rb +42 -0
  46. data/lib/appydave/tools/jump/commands/validate.rb +54 -0
  47. data/lib/appydave/tools/jump/config.rb +233 -0
  48. data/lib/appydave/tools/jump/formatters/base.rb +48 -0
  49. data/lib/appydave/tools/jump/formatters/json_formatter.rb +19 -0
  50. data/lib/appydave/tools/jump/formatters/paths_formatter.rb +21 -0
  51. data/lib/appydave/tools/jump/formatters/table_formatter.rb +183 -0
  52. data/lib/appydave/tools/jump/location.rb +134 -0
  53. data/lib/appydave/tools/jump/path_validator.rb +47 -0
  54. data/lib/appydave/tools/jump/search.rb +230 -0
  55. data/lib/appydave/tools/subtitle_processor/transcript.rb +51 -0
  56. data/lib/appydave/tools/version.rb +1 -1
  57. data/lib/appydave/tools/zsh_history/command.rb +37 -0
  58. data/lib/appydave/tools/zsh_history/config.rb +235 -0
  59. data/lib/appydave/tools/zsh_history/filter.rb +184 -0
  60. data/lib/appydave/tools/zsh_history/formatter.rb +75 -0
  61. data/lib/appydave/tools/zsh_history/parser.rb +101 -0
  62. data/lib/appydave/tools.rb +25 -0
  63. data/package.json +1 -1
  64. metadata +51 -4
@@ -0,0 +1,265 @@
1
+ # FR-002: GPT Context AI-Friendly Help System
2
+
3
+ **Status**: Ready for Development
4
+ **Priority**: High
5
+ **Created**: 2025-12-07
6
+
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ Enhance GPT Context's help system to provide structured, comprehensive documentation suitable for AI agent consumption. Model after DAM's multi-level help architecture.
12
+
13
+ ---
14
+
15
+ ## User Story
16
+
17
+ As an AI agent using GPT Context via skills, I want structured, comprehensive help output so I can understand all options and use the tool correctly without guessing.
18
+
19
+ ---
20
+
21
+ ## Current State
22
+
23
+ **GPT Context help** (`gpt_context --help`):
24
+ - Basic OptionParser output
25
+ - Lists flags with brief descriptions
26
+ - No examples, no detailed explanations
27
+ - No `--version` flag
28
+
29
+ **DAM help** (`dam help`):
30
+ - Multi-level: `dam help`, `dam help [topic]`
31
+ - Structured sections with examples
32
+ - Topic-specific deep dives
33
+ - Machine-parseable format
34
+
35
+ ---
36
+
37
+ ## Requirements
38
+
39
+ ### Must Have
40
+
41
+ 1. **Enhanced `--help` output** with structured sections:
42
+ - Synopsis (command signature)
43
+ - Description (what the tool does)
44
+ - Options (all flags with details)
45
+ - Output Formats (tree, content, json, aider, files)
46
+ - Examples (real-world usage)
47
+
48
+ 2. **Each option must include**:
49
+ - Flag(s): `-i, --include`
50
+ - Description: What it does
51
+ - Default: Default value if any
52
+ - Valid values: For constrained options like `-f`
53
+
54
+ 3. **Add `--version` flag**
55
+ - Output: `gpt_context version X.Y.Z`
56
+
57
+ 4. **Real-world examples** in help output:
58
+ ```
59
+ Examples:
60
+ # Gather Ruby library code
61
+ gpt_context -i 'lib/**/*.rb' -e 'spec/**/*' -d
62
+
63
+ # Project structure overview
64
+ gpt_context -i '**/*' -f tree -e 'node_modules/**/*'
65
+
66
+ # Generate aider command
67
+ gpt_context -i 'lib/**/*.rb' -f aider -p "Add logging"
68
+ ```
69
+
70
+ ### Nice to Have
71
+
72
+ - `gpt_context help formats` - detailed format documentation
73
+ - `gpt_context help examples` - extended examples collection
74
+ - Markdown-formatted output option (`--help --format md`)
75
+
76
+ ---
77
+
78
+ ## Technical Implementation
79
+
80
+ ### File Locations
81
+
82
+ - **CLI**: `bin/gpt_context.rb`
83
+ - **Options**: `lib/appydave/tools/gpt_context/options.rb`
84
+ - **Version**: `lib/appydave/tools/version.rb` (already exists)
85
+
86
+ ### Approach
87
+
88
+ **Option A: Enhanced OptionParser** (Recommended)
89
+ - Keep single `--help` flag
90
+ - Add custom `banner` and `separator` calls for structure
91
+ - Add `--version` flag
92
+ - Simpler, maintains current architecture
93
+
94
+ **Option B: Subcommand Pattern** (Like DAM)
95
+ - Add `help` subcommand with topics
96
+ - More complex, requires CLI restructure
97
+ - Overkill for single-purpose tool
98
+
99
+ ### Recommended: Option A
100
+
101
+ Enhance the existing OptionParser in `bin/gpt_context.rb`:
102
+
103
+ ```ruby
104
+ # Current structure (simplified)
105
+ OptionParser.new do |opts|
106
+ opts.banner = "Usage: gpt_context [options]"
107
+ opts.on('-i', '--include PATTERN', 'Include pattern') { ... }
108
+ # etc
109
+ end
110
+
111
+ # Enhanced structure
112
+ OptionParser.new do |opts|
113
+ opts.banner = <<~BANNER
114
+ GPT Context Gatherer - Collect project files for AI context
115
+
116
+ SYNOPSIS
117
+ gpt_context [options]
118
+
119
+ DESCRIPTION
120
+ Collects and packages codebase files for AI assistant context.
121
+ Outputs to clipboard (default), file, or stdout.
122
+
123
+ BANNER
124
+
125
+ opts.separator ""
126
+ opts.separator "OPTIONS"
127
+ opts.separator ""
128
+
129
+ opts.on('-i', '--include PATTERN',
130
+ 'Glob pattern for files to include (repeatable)',
131
+ 'Example: -i "lib/**/*.rb" -i "bin/**/*.rb"') do |pattern|
132
+ # ...
133
+ end
134
+
135
+ opts.on('-e', '--exclude PATTERN',
136
+ 'Glob pattern for files to exclude (repeatable)',
137
+ 'Example: -e "spec/**/*" -e "node_modules/**/*"') do |pattern|
138
+ # ...
139
+ end
140
+
141
+ opts.on('-f', '--format FORMATS',
142
+ 'Output format(s): tree, content, json, aider, files',
143
+ 'Comma-separated. Default: content',
144
+ 'Example: -f tree,content') do |formats|
145
+ # ...
146
+ end
147
+
148
+ opts.on('-o', '--output TARGET',
149
+ 'Output target: clipboard, filename, or stdout',
150
+ 'Default: clipboard') do |target|
151
+ # ...
152
+ end
153
+
154
+ opts.on('-d', '--debug', 'Enable debug output') do
155
+ # ...
156
+ end
157
+
158
+ opts.on('-l', '--line-limit N', Integer,
159
+ 'Limit lines per file (default: unlimited)') do |n|
160
+ # ...
161
+ end
162
+
163
+ opts.on('-p', '--prompt TEXT',
164
+ 'Prompt text for aider format') do |text|
165
+ # ...
166
+ end
167
+
168
+ opts.separator ""
169
+ opts.separator "OUTPUT FORMATS"
170
+ opts.separator " tree - Directory tree structure"
171
+ opts.separator " content - File contents with headers"
172
+ opts.separator " json - Structured JSON output"
173
+ opts.separator " aider - Aider CLI command format"
174
+ opts.separator " files - File paths only"
175
+ opts.separator ""
176
+
177
+ opts.separator "EXAMPLES"
178
+ opts.separator " # Gather Ruby library code for AI context"
179
+ opts.separator " gpt_context -i 'lib/**/*.rb' -e 'spec/**/*' -d"
180
+ opts.separator ""
181
+ opts.separator " # Project structure overview"
182
+ opts.separator " gpt_context -i '**/*' -f tree -e 'node_modules/**/*'"
183
+ opts.separator ""
184
+ opts.separator " # Save to file with tree and content"
185
+ opts.separator " gpt_context -i 'src/**/*.ts' -f tree,content -o context.txt"
186
+ opts.separator ""
187
+ opts.separator " # Generate aider command"
188
+ opts.separator " gpt_context -i 'lib/**/*.rb' -f aider -p 'Add logging'"
189
+ opts.separator ""
190
+
191
+ opts.on('-v', '--version', 'Show version') do
192
+ puts "gpt_context version #{Appydave::Tools::VERSION}"
193
+ exit
194
+ end
195
+
196
+ opts.on('-h', '--help', 'Show this help') do
197
+ puts opts
198
+ exit
199
+ end
200
+ end
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Acceptance Criteria
206
+
207
+ - [ ] `gpt_context --help` shows structured output with sections
208
+ - [ ] All options include description, default (if any), and examples
209
+ - [ ] Examples section shows 3-4 real-world use cases
210
+ - [ ] Output formats section explains each format
211
+ - [ ] `gpt_context --version` outputs version number
212
+ - [ ] Help output is easily parseable by AI agents (clear sections, consistent formatting)
213
+
214
+ ---
215
+
216
+ ## Testing
217
+
218
+ ```bash
219
+ # Manual verification
220
+ gpt_context --help # Should show enhanced help
221
+ gpt_context --version # Should show version
222
+ gpt_context -v # Short version flag
223
+
224
+ # Verify help includes all required sections
225
+ gpt_context --help | grep -E "^(SYNOPSIS|DESCRIPTION|OPTIONS|OUTPUT FORMATS|EXAMPLES)"
226
+ ```
227
+
228
+ Add spec:
229
+ ```ruby
230
+ # spec/appydave/tools/gpt_context/cli_spec.rb
231
+ describe 'CLI help' do
232
+ it 'includes synopsis section' do
233
+ output = `bin/gpt_context.rb --help`
234
+ expect(output).to include('SYNOPSIS')
235
+ end
236
+
237
+ it 'includes examples section' do
238
+ output = `bin/gpt_context.rb --help`
239
+ expect(output).to include('EXAMPLES')
240
+ end
241
+
242
+ it 'shows version' do
243
+ output = `bin/gpt_context.rb --version`
244
+ expect(output).to match(/gpt_context version \d+\.\d+\.\d+/)
245
+ end
246
+ end
247
+ ```
248
+
249
+ ---
250
+
251
+ ## Definition of Done
252
+
253
+ 1. Enhanced `--help` output with all sections
254
+ 2. `--version` flag working
255
+ 3. Specs pass
256
+ 4. Manual verification complete
257
+ 5. Commit with `kfeat "add AI-friendly help system to GPT Context"`
258
+
259
+ ---
260
+
261
+ ## Reference
262
+
263
+ - **DAM help implementation**: `bin/dam` lines 1-200 (help system)
264
+ - **Current GPT Context CLI**: `bin/gpt_context.rb`
265
+ - **GPT Context architecture**: `docs/architecture/gpt-context/`