@eldrforge/kodrdriv 1.2.132 → 1.2.134

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 (50) hide show
  1. package/AI-GUIDE.md +837 -0
  2. package/LICENSE +1 -1
  3. package/README.md +35 -6
  4. package/dist/application.js +2 -0
  5. package/dist/application.js.map +1 -1
  6. package/dist/arguments.js +54 -21
  7. package/dist/arguments.js.map +1 -1
  8. package/dist/commands/audio-commit.js +2 -1
  9. package/dist/commands/audio-commit.js.map +1 -1
  10. package/dist/commands/audio-review.js +4 -2
  11. package/dist/commands/audio-review.js.map +1 -1
  12. package/dist/commands/commit.js +91 -133
  13. package/dist/commands/commit.js.map +1 -1
  14. package/dist/commands/publish.js +3 -6
  15. package/dist/commands/publish.js.map +1 -1
  16. package/dist/commands/release.js +62 -139
  17. package/dist/commands/release.js.map +1 -1
  18. package/dist/commands/review.js +1 -1
  19. package/dist/commands/review.js.map +1 -1
  20. package/dist/commands/tree.js +29 -33
  21. package/dist/commands/tree.js.map +1 -1
  22. package/dist/constants.js +3 -1
  23. package/dist/constants.js.map +1 -1
  24. package/dist/types.js +282 -0
  25. package/dist/types.js.map +1 -0
  26. package/dist/util/storageAdapter.js +9 -2
  27. package/dist/util/storageAdapter.js.map +1 -1
  28. package/guide/ai-system.md +522 -0
  29. package/guide/architecture.md +349 -0
  30. package/guide/commands.md +383 -0
  31. package/guide/configuration.md +516 -0
  32. package/guide/debugging.md +587 -0
  33. package/guide/development.md +632 -0
  34. package/guide/index.md +215 -0
  35. package/guide/integration.md +510 -0
  36. package/guide/monorepo.md +533 -0
  37. package/guide/quickstart.md +226 -0
  38. package/guide/testing.md +463 -0
  39. package/guide/tree-operations.md +621 -0
  40. package/guide/usage.md +578 -0
  41. package/package.json +10 -10
  42. package/DUPLICATION-CLEANUP.md +0 -104
  43. package/agentic-reflection-commit-2025-12-27T22-56-06-143Z.md +0 -50
  44. package/agentic-reflection-commit-2025-12-27T23-01-57-294Z.md +0 -50
  45. package/agentic-reflection-commit-2025-12-27T23-11-57-811Z.md +0 -50
  46. package/agentic-reflection-commit-2025-12-27T23-12-50-645Z.md +0 -50
  47. package/agentic-reflection-commit-2025-12-27T23-13-59-347Z.md +0 -52
  48. package/agentic-reflection-commit-2025-12-27T23-14-36-001Z.md +0 -50
  49. package/agentic-reflection-commit-2025-12-27T23-18-59-832Z.md +0 -50
  50. package/agentic-reflection-commit-2025-12-27T23-25-20-667Z.md +0 -62
package/AI-GUIDE.md ADDED
@@ -0,0 +1,837 @@
1
+ # KodrDriv - Complete AI Guide
2
+
3
+ **Purpose**: Help AI assistants understand, debug, integrate, and extend kodrdriv.
4
+
5
+ **Version**: 1.2.133-dev.0 (December 31, 2025)
6
+
7
+ ---
8
+
9
+ ## Quick Overview
10
+
11
+ **KodrDriv** is an AI-powered Git workflow automation tool that generates intelligent commit messages and release notes by analyzing code changes. It uses an **agentic AI system** with specialized tools to investigate changes before generating documentation.
12
+
13
+ **Key Differentiator**: Instead of blindly describing diffs, kodrdriv's AI actively investigates your code using 8-13 tools to understand context, relationships, and implications before writing.
14
+
15
+ ---
16
+
17
+ ## For AI Assistants: Start Here
18
+
19
+ ### If helping someone integrate kodrdriv:
20
+ → Start with [`guide/integration.md`](guide/integration.md)
21
+
22
+ ### If debugging an issue:
23
+ → Go to [`guide/debugging.md`](guide/debugging.md)
24
+
25
+ ### If they want to understand how it works:
26
+ → Read [`guide/architecture.md`](guide/architecture.md) and [`guide/ai-system.md`](guide/ai-system.md)
27
+
28
+ ### If working with monorepos:
29
+ → Check [`guide/monorepo.md`](guide/monorepo.md)
30
+
31
+ ### If extending functionality:
32
+ → See [`guide/development.md`](guide/development.md)
33
+
34
+ ---
35
+
36
+ ## Complete Guide Directory
37
+
38
+ Located in `guide/`:
39
+
40
+ | Guide | Purpose | When to Use |
41
+ |-------|---------|-------------|
42
+ | [`index.md`](guide/index.md) | Overview and navigation | Starting point |
43
+ | [`quickstart.md`](guide/quickstart.md) | 5-minute setup | First-time setup |
44
+ | [`usage.md`](guide/usage.md) | Common workflows | Daily operations |
45
+ | [`integration.md`](guide/integration.md) | Project integration | Setting up kodrdriv |
46
+ | [`commands.md`](guide/commands.md) | Command reference | Finding specific commands |
47
+ | [`configuration.md`](guide/configuration.md) | Configuration options | Customizing behavior |
48
+ | [`architecture.md`](guide/architecture.md) | System design | Understanding internals |
49
+ | [`ai-system.md`](guide/ai-system.md) | AI mechanics | Understanding AI decisions |
50
+ | [`debugging.md`](guide/debugging.md) | Troubleshooting | Fixing problems |
51
+ | [`development.md`](guide/development.md) | Building & extending | Contributing code |
52
+ | [`testing.md`](guide/testing.md) | Test suite | Running tests |
53
+ | [`tree-operations.md`](guide/tree-operations.md) | Multi-package ops | Monorepo automation |
54
+ | [`monorepo.md`](guide/monorepo.md) | Monorepo workflows | Monorepo projects |
55
+
56
+ ---
57
+
58
+ ## Architecture Summary
59
+
60
+ ### Package Ecosystem
61
+
62
+ ```
63
+ @eldrforge/kodrdriv - Main CLI tool
64
+ @eldrforge/ai-service - AI integration (agentic, prompts, tools)
65
+ @eldrforge/tree-core - Dependency graph algorithms
66
+ @eldrforge/tree-execution - Parallel execution engine
67
+ @eldrforge/git-tools - Git operations
68
+ @eldrforge/github-tools - GitHub API integration
69
+ @eldrforge/audio-tools - Audio recording & transcription
70
+ @eldrforge/shared - Common utilities
71
+ ```
72
+
73
+ ### Data Flow
74
+
75
+ ```
76
+ User Command
77
+
78
+ Configuration Loading (hierarchical merge)
79
+
80
+ Git Analysis (diff, log, status)
81
+
82
+ AI Analysis (agentic investigation with tools)
83
+
84
+ Content Generation (commit message or release notes)
85
+
86
+ Output & Execution (save files, create commits/releases)
87
+ ```
88
+
89
+ ### Key Technologies
90
+
91
+ - **TypeScript** - Type safety
92
+ - **Node.js** - Runtime
93
+ - **OpenAI API** - AI intelligence
94
+ - **GitHub API** - Repository integration
95
+ - **Zod** - Schema validation
96
+ - **CardiganTime** - Configuration management
97
+ - **RiotPrompt** - Prompt engineering
98
+ - **Vitest** - Testing
99
+ - **Vite** - Building
100
+
101
+ ---
102
+
103
+ ## Core Concepts
104
+
105
+ ### 1. Agentic AI (Always On)
106
+
107
+ Kodrdriv **always** uses agentic mode - AI doesn't just generate text, it investigates:
108
+
109
+ **Commit Messages** (8 tools):
110
+ - `get_file_content` - Read full files
111
+ - `get_file_history` - View evolution
112
+ - `get_related_tests` - Find test files
113
+ - `analyze_diff_section` - Expand context
114
+ - `get_recent_commits` - Avoid duplicates
115
+ - `search_codebase` - Find usage
116
+ - `get_file_dependencies` - Assess impact
117
+ - `group_files_by_concern` - Organize logically
118
+
119
+ **Release Notes** (13 tools):
120
+ - All commit tools, plus:
121
+ - `get_tag_history` - Release patterns
122
+ - `get_release_stats` - Quantify scope
123
+ - `analyze_commit_patterns` - Detect themes
124
+ - `compare_previous_release` - Context
125
+ - `get_breaking_changes` - Alert users
126
+
127
+ ### 2. Context Files (New Feature)
128
+
129
+ Pass documentation files for better context:
130
+
131
+ ```bash
132
+ kodrdriv commit --context-files IMPL.md ARCHITECTURE.md
133
+ kodrdriv release --context-files CHANGELOG.md MIGRATION.md
134
+ ```
135
+
136
+ Files are read and injected into prompts, giving AI rich context about your changes.
137
+
138
+ ### 3. Self-Reflection
139
+
140
+ Generate detailed analysis reports:
141
+
142
+ ```bash
143
+ kodrdriv commit --self-reflection
144
+ # Creates: output/agentic-reflection-commit-*.md
145
+
146
+ # Report includes:
147
+ # - Tools used and effectiveness
148
+ # - Execution timeline
149
+ # - Conversation history
150
+ # - Performance metrics
151
+ ```
152
+
153
+ ### 4. Tree Operations
154
+
155
+ Execute commands across multiple packages:
156
+
157
+ ```bash
158
+ kodrdriv tree publish --parallel
159
+ # → Analyzes dependencies
160
+ # → Executes in topological order
161
+ # → Parallel where possible
162
+ # → Recovers from failures
163
+ ```
164
+
165
+ ---
166
+
167
+ ## Recent Major Changes (Dec 31, 2025)
168
+
169
+ ### 1. Self-Reflection Files → output/
170
+
171
+ Files now save to `output/` directory instead of project root.
172
+
173
+ ### 2. Human-Readable Prompts
174
+
175
+ Redesigned to avoid AI slop:
176
+ - No emojis
177
+ - No marketing speak
178
+ - No meta-commentary
179
+ - Plain, professional language
180
+
181
+ ### 3. Context Files Support
182
+
183
+ New `--context-files` option:
184
+ ```bash
185
+ kodrdriv release --context-files file1.md file2.md
186
+ ```
187
+
188
+ ### 4. Agentic-Only
189
+
190
+ Removed `--agentic` flag - everything uses AI analysis by default:
191
+ ```bash
192
+ # Old: kodrdriv commit --agentic
193
+ # New: kodrdriv commit (agentic is automatic)
194
+ ```
195
+
196
+ See complete details: `SESSION-SUMMARY-DEC-31.md`
197
+
198
+ ---
199
+
200
+ ## Implementation Documentation
201
+
202
+ The root directory contains extensive implementation docs:
203
+
204
+ ### AI System
205
+ - `AI-SERVICE-INTEGRATION-COMPLETE.md` - AI service extraction (1,463 lines)
206
+ - `AGENTIC-RELEASE-NOTES-COMPLETE.md` - Release notes implementation
207
+ - `AGENTIC-COMMIT-IMPROVEMENTS.md` - Commit generation
208
+ - `AI-FRIENDLY-LOGGING-GUIDE.md` - Logging patterns
209
+ - `RIOTPROMPT-COMPLETE-SUMMARY.md` - Prompt engineering (6,200 lines)
210
+
211
+ ### Tree Operations
212
+ - `TREE-TOOLKIT-COMPLETE.md` - Tree system extraction (6,200 lines)
213
+ - `PARALLEL-PUBLISH-QUICK-REFERENCE.md` - Parallel execution
214
+ - `PARALLEL-PUBLISH-DEBUGGING-GUIDE.md` - Troubleshooting
215
+ - `CHECKPOINT-RECOVERY-FIX.md` - Recovery mechanisms
216
+
217
+ ### Publishing & Releases
218
+ - `MONOREPO-PUBLISH-IMPROVEMENTS.md` - Monorepo workflows
219
+ - `PUBLISH_IMPROVEMENTS_IMPLEMENTED.md` - Publish features
220
+ - `WORKFLOW-PRECHECK-IMPLEMENTATION.md` - Pre-checks
221
+
222
+ ### Recent Updates
223
+ - `SESSION-SUMMARY-DEC-31.md` - Today's session summary
224
+ - `SELF-REFLECTION-IMPROVEMENTS.md` - Reflection file fixes
225
+ - `CONTEXT-FILES-AND-HUMAN-PROMPTS.md` - Context files feature
226
+ - `AGENTIC-ONLY-SIMPLIFICATION.md` - Agentic-only migration
227
+
228
+ ### Configuration & Architecture
229
+ - `CONFIG-FIX-RELEASE-AGENTIC.md` - Configuration system
230
+ - `COMPLETE-IMPLEMENTATION-SUMMARY.md` - Overall architecture
231
+ - `INTEGRATION-COMPLETE.md` - Integration patterns
232
+
233
+ ---
234
+
235
+ ## Quick Command Reference
236
+
237
+ ### Essential Commands
238
+
239
+ ```bash
240
+ # Commit with AI analysis
241
+ kodrdriv commit [--sendit] [--context-files FILES]
242
+
243
+ # Release notes with AI analysis
244
+ kodrdriv release [--context-files FILES] [--interactive]
245
+
246
+ # Complete release workflow
247
+ kodrdriv publish [--sendit] [--parallel]
248
+
249
+ # Multi-package operations
250
+ kodrdriv tree COMMAND [--parallel]
251
+
252
+ # Audio-driven
253
+ kodrdriv audio-commit [--sendit]
254
+ kodrdriv audio-review [--sendit]
255
+ ```
256
+
257
+ ### Essential Options
258
+
259
+ ```bash
260
+ --dry-run # Preview without changes
261
+ --verbose # Detailed logging
262
+ --debug # Maximum detail + debug files
263
+ --self-reflection # Generate analysis reports
264
+ --context-files FILES # Pass context files
265
+ --max-agentic-iterations N # Control analysis depth
266
+ --interactive # Review before executing
267
+ --sendit # Skip confirmations
268
+ ```
269
+
270
+ ### Essential Configuration
271
+
272
+ ```yaml
273
+ model: gpt-4o # AI model
274
+ outputDirectory: output # Output location
275
+
276
+ commit:
277
+ selfReflection: true # Analysis reports
278
+ maxAgenticIterations: 10 # Investigation depth
279
+
280
+ release:
281
+ selfReflection: true
282
+ maxAgenticIterations: 30
283
+
284
+ tree:
285
+ directories: [packages/*] # Package locations
286
+ parallel: true # Parallel execution
287
+ ```
288
+
289
+ ---
290
+
291
+ ## Common Scenarios
292
+
293
+ ### Scenario 1: "Help me integrate kodrdriv"
294
+
295
+ ```bash
296
+ # 1. Install
297
+ npm install -g @eldrforge/kodrdriv
298
+
299
+ # 2. Setup
300
+ export OPENAI_API_KEY="your-key"
301
+ kodrdriv --init-config
302
+
303
+ # 3. Test
304
+ kodrdriv commit --dry-run
305
+
306
+ # 4. Use
307
+ kodrdriv commit --sendit
308
+ ```
309
+
310
+ **Full guide**: [`guide/integration.md`](guide/integration.md)
311
+
312
+ ### Scenario 2: "Kodrdriv isn't working"
313
+
314
+ ```bash
315
+ # Diagnose
316
+ kodrdriv --check-config
317
+ kodrdriv commit --dry-run --verbose
318
+
319
+ # Common fixes:
320
+ # - Set OPENAI_API_KEY
321
+ # - Stage changes (git add)
322
+ # - Check config syntax
323
+ # - Verify in git repo
324
+ ```
325
+
326
+ **Full guide**: [`guide/debugging.md`](guide/debugging.md)
327
+
328
+ ### Scenario 3: "How do I use kodrdriv for releases?"
329
+
330
+ ```bash
331
+ # Generate notes
332
+ kodrdriv release --context-files CHANGELOG.md
333
+
334
+ # Review
335
+ cat output/RELEASE_NOTES.md
336
+
337
+ # Publish
338
+ kodrdriv publish --interactive
339
+ ```
340
+
341
+ **Full guide**: [`guide/usage.md`](guide/usage.md)
342
+
343
+ ### Scenario 4: "How does the AI work?"
344
+
345
+ **Answer**: Agentic system with tools:
346
+ 1. AI receives task and available tools
347
+ 2. AI investigates using tools (reads files, checks history, etc.)
348
+ 3. Tools return results
349
+ 4. AI uses results to decide next action
350
+ 5. Repeats until AI has enough information
351
+ 6. AI generates final output
352
+
353
+ **Full guide**: [`guide/ai-system.md`](guide/ai-system.md)
354
+
355
+ ### Scenario 5: "How do I use with monorepos?"
356
+
357
+ ```bash
358
+ # Setup
359
+ kodrdriv tree link
360
+
361
+ # Develop
362
+ kodrdriv tree precommit --parallel
363
+
364
+ # Release
365
+ kodrdriv tree publish --parallel --context-files MIGRATION.md
366
+ ```
367
+
368
+ **Full guide**: [`guide/monorepo.md`](guide/monorepo.md)
369
+
370
+ ---
371
+
372
+ ## Debugging Checklist
373
+
374
+ When something doesn't work:
375
+
376
+ 1. **Environment**
377
+ - [ ] OPENAI_API_KEY set?
378
+ - [ ] GITHUB_TOKEN set (if using publish)?
379
+ - [ ] In git repository?
380
+ - [ ] Node.js v18+?
381
+
382
+ 2. **Configuration**
383
+ - [ ] `kodrdriv --check-config` shows settings?
384
+ - [ ] Config file syntax valid?
385
+ - [ ] Model name correct?
386
+
387
+ 3. **Git State**
388
+ - [ ] Changes staged (`git diff --cached`)?
389
+ - [ ] Repository has commits?
390
+ - [ ] On correct branch?
391
+
392
+ 4. **Diagnosis**
393
+ - [ ] Try `--dry-run` first
394
+ - [ ] Enable `--verbose` logging
395
+ - [ ] Use `--debug` for detail
396
+ - [ ] Generate `--self-reflection` report
397
+
398
+ 5. **Review**
399
+ - [ ] Check `output/` directory
400
+ - [ ] Review debug files
401
+ - [ ] Check reflection reports
402
+ - [ ] Read error messages carefully
403
+
404
+ ---
405
+
406
+ ## API Cost Guidelines
407
+
408
+ ### Model Costs (per 1M tokens)
409
+
410
+ - **gpt-4o-mini**: $0.15 input, $0.60 output
411
+ - **gpt-4o**: $2.50 input, $10.00 output
412
+
413
+ ### Typical Usage
414
+
415
+ **Commit message** (gpt-4o-mini):
416
+ - Input: 10-20K tokens (diff + history + tool outputs)
417
+ - Output: 100-200 tokens
418
+ - Cost: ~$0.01-0.02 per commit
419
+
420
+ **Release notes** (gpt-4o):
421
+ - Input: 30-80K tokens (commits + diffs + tool outputs)
422
+ - Output: 500-1000 tokens
423
+ - Cost: ~$0.10-0.25 per release
424
+
425
+ ### Cost Optimization
426
+
427
+ ```yaml
428
+ # Use cheaper model for commits
429
+ model: gpt-4o-mini
430
+
431
+ # But quality model for releases
432
+ release:
433
+ model: gpt-4o
434
+
435
+ # Reduce iterations
436
+ commit:
437
+ maxAgenticIterations: 6 # vs default 10
438
+
439
+ # Limit context
440
+ commit:
441
+ messageLimit: 5 # vs default 10
442
+ maxDiffBytes: 10240 # vs default 20480
443
+ ```
444
+
445
+ ---
446
+
447
+ ## Package Documentation
448
+
449
+ Each package has detailed docs:
450
+
451
+ ### ai-service
452
+ - `README.md` - Package overview
453
+ - `QUICKSTART.md` - Quick start
454
+ - `USAGE.md` - Usage patterns
455
+ - `INTEGRATION.md` - Integration guide
456
+ - `DOCUMENTATION_INDEX.md` - Complete docs
457
+ - `examples/` - Working examples
458
+
459
+ ### tree-core & tree-execution
460
+ - `README.md` - Package docs
461
+ - `EXTRACTION-COMPLETE.md` - Implementation details
462
+
463
+ ### git-tools & github-tools
464
+ - `README.md` - API documentation
465
+ - `COVERAGE_REPORT.md` - Test coverage
466
+
467
+ ### audio-tools
468
+ - `README.md` - Audio functionality
469
+ - `DOCUMENTATION_COMPLETE.md` - Complete guide
470
+ - `examples/` - Usage examples
471
+
472
+ ### shared
473
+ - `README.md` - Shared utilities
474
+ - `FINAL_COVERAGE_REPORT.md` - Test details
475
+
476
+ ---
477
+
478
+ ## Implementation Deep Dives
479
+
480
+ Root directory contains comprehensive implementation documentation:
481
+
482
+ ### Major Features (Read These First)
483
+
484
+ **AI System** (Most Important):
485
+ - `AI-SERVICE-INTEGRATION-COMPLETE.md` - How AI service works (293 lines)
486
+ - `AGENTIC-ONLY-SIMPLIFICATION.md` - Why everything is agentic (216 lines)
487
+ - `RIOTPROMPT-COMPLETE-SUMMARY.md` - Prompt engineering system (detailed)
488
+
489
+ **Tree Operations** (For Monorepos):
490
+ - `TREE-TOOLKIT-COMPLETE.md` - Multi-package automation (166 lines)
491
+ - `PARALLEL-PUBLISH-QUICK-REFERENCE.md` - Parallel execution guide
492
+ - `MONOREPO-PUBLISH-IMPROVEMENTS.md` - Monorepo workflows
493
+
494
+ **Recent Changes** (Context for Current State):
495
+ - `SESSION-SUMMARY-DEC-31.md` - Today's improvements (261 lines)
496
+ - `SELF-REFLECTION-IMPROVEMENTS.md` - File location & prompt fixes (157 lines)
497
+ - `CONTEXT-FILES-AND-HUMAN-PROMPTS.md` - Context files feature (261 lines)
498
+
499
+ ### All Implementation Docs (Alphabetically)
500
+
501
+ **AI & Prompts**:
502
+ - AI-FRIENDLY-LOGGING-GUIDE.md
503
+ - AI-LOGGING-MIGRATION-COMPLETE.md
504
+ - AI-SERVICE-EXTRACTION-COMPLETE.md
505
+ - AI-SERVICE-INTEGRATION-COMPLETE.md
506
+ - AI-SERVICE-INTEGRATION-VERIFIED.md
507
+ - AGENTIC-COMMIT-IMPROVEMENTS.md
508
+ - AGENTIC-ONLY-SIMPLIFICATION.md
509
+ - AGENTIC-PUBLISH-IMPLEMENTATION.md
510
+ - AGENTIC-RELEASE-NOTES-COMPLETE.md
511
+ - AGENTIC-RELEASE-SELF-REFLECTION-FIX.md
512
+ - AGENTIC-SEARCH-CODEBASE-FIX.md
513
+ - AGENTIC-SEARCH-FIX.md
514
+ - AGENTIC-TOOLS-FIX.md
515
+
516
+ **Configuration & Architecture**:
517
+ - COMPLETE-IMPLEMENTATION-SUMMARY.md
518
+ - CONFIG-FIX-RELEASE-AGENTIC.md
519
+ - COMPREHENSIVE-DUPLICATION-REPORT.md
520
+ - DUPLICATION-CLEANUP-COMPLETE.md
521
+ - INTEGRATION-COMPLETE.md
522
+ - FINAL-INTEGRATION-REPORT.md
523
+ - FINAL-SUMMARY.md
524
+
525
+ **Tree & Parallel Execution**:
526
+ - TREE-TOOLKIT-COMPLETE.md
527
+ - TREE-COMMIT-AGENTIC-FIX.md
528
+ - PARALLEL_EXECUTION_FIX.md
529
+ - PARALLEL-EXECUTION-FIXES.md
530
+ - PARALLEL-PUBLISH-DEBUGGING-GUIDE.md
531
+ - PARALLEL-PUBLISH-FIXES-IMPLEMENTED.md
532
+ - PARALLEL-PUBLISH-IMPROVEMENTS-IMPLEMENTED.md
533
+ - PARALLEL-PUBLISH-LOGGING-FIXES.md
534
+ - PARALLEL-PUBLISH-QUICK-REFERENCE.md
535
+
536
+ **Publishing & Workflows**:
537
+ - MONOREPO-PUBLISH-IMPROVEMENTS.md
538
+ - PUBLISH_IMPROVEMENTS_IMPLEMENTED.md
539
+ - PUBLISH-AGENTIC-RELEASE-FIX.md
540
+ - WORKFLOW-PRECHECK-IMPLEMENTATION.md
541
+ - WORKFLOW-SKIP-SUMMARY.md
542
+
543
+ **Recovery & Debugging**:
544
+ - CHECKPOINT-RECOVERY-FIX.md
545
+ - RECOVERY-FIXES.md
546
+ - AUDIT-BRANCHES-PROGRESS-FIX.md
547
+ - AUDIT-EXAMPLE-OUTPUT.md
548
+ - BUG-FIXES-COMPLETE.md
549
+ - BUG-FIXES-REPORT.md
550
+
551
+ **RiotPrompt Integration**:
552
+ - RIOTPROMPT-COMPLETE-SUMMARY.md
553
+ - RIOTPROMPT-DONE.md
554
+ - RIOTPROMPT-FINAL-IMPLEMENTATION.md
555
+ - RIOTPROMPT-IMPLEMENTATION-MAP.md
556
+ - RIOTPROMPT-INTEGRATION-ANALYSIS.md
557
+ - RIOTPROMPT-MASTER-SUMMARY.md
558
+ - RIOTPROMPT-MIGRATION-GUIDE.md
559
+ - RIOTPROMPT-PHASE-1-COMPLETE.md
560
+ - RIOTPROMPT-PHASE-2-3-COMPLETE.md
561
+ - RIOTPROMPT-PHASE-2-3-IMPLEMENTATION.md
562
+ - RIOTPROMPT-PHASE-2-3-SUMMARY.md
563
+ - RIOTPROMPT-QUICK-REFERENCE.md
564
+ - RIOTPROMPT-REVIEW-SUMMARY.md
565
+
566
+ **Specific Fixes**:
567
+ - ALREADY-PUBLISHED-PACKAGES-FIX.md
568
+ - CODE-DIFF-SUMMARY.md
569
+ - LOGGING-MIGRATION-STATUS.md
570
+ - MIGRATION-VERIFICATION.md
571
+ - SUBMODULE-LOCK-FIX.md
572
+ - VERSION-AUDIT-FIX.md
573
+
574
+ **Recent Session**:
575
+ - SESSION-SUMMARY-DEC-31.md
576
+ - SELF-REFLECTION-IMPROVEMENTS.md
577
+ - CONTEXT-FILES-AND-HUMAN-PROMPTS.md
578
+
579
+ ---
580
+
581
+ ## Common Integration Tasks
582
+
583
+ ### Task: Add kodrdriv to Existing Project
584
+
585
+ 1. Install: `npm install -g @eldrforge/kodrdriv`
586
+ 2. Setup: `kodrdriv --init-config`
587
+ 3. Configure: Edit `.kodrdriv/config.yaml`
588
+ 4. Test: `kodrdriv commit --dry-run`
589
+ 5. Use: `kodrdriv commit --sendit`
590
+
591
+ **Detailed steps**: [`guide/integration.md`](guide/integration.md)
592
+
593
+ ### Task: Debug kodrdriv Issues
594
+
595
+ 1. Check environment: `echo $OPENAI_API_KEY`
596
+ 2. Verify config: `kodrdriv --check-config`
597
+ 3. Test with dry-run: `kodrdriv commit --dry-run --verbose`
598
+ 4. Review logs: `kodrdriv commit --debug`
599
+ 5. Generate report: `kodrdriv commit --self-reflection`
600
+
601
+ **Full checklist**: [`guide/debugging.md`](guide/debugging.md)
602
+
603
+ ### Task: Extend kodrdriv
604
+
605
+ 1. Clone repository
606
+ 2. Setup: `npm install && npm link`
607
+ 3. Create command: `src/commands/new-command.ts`
608
+ 4. Add types: `src/types.ts`
609
+ 5. Register: `src/main.ts` and `src/arguments.ts`
610
+ 6. Test: `tests/commands/new-command.test.ts`
611
+
612
+ **Full process**: [`guide/development.md`](guide/development.md)
613
+
614
+ ### Task: Use in Monorepo
615
+
616
+ 1. Configure tree: `.kodrdriv/config.yaml`
617
+ 2. Link packages: `kodrdriv tree link`
618
+ 3. Develop: Work normally
619
+ 4. Check: `kodrdriv tree precommit --parallel`
620
+ 5. Publish: `kodrdriv tree publish --parallel`
621
+
622
+ **Complete workflow**: [`guide/monorepo.md`](guide/monorepo.md)
623
+
624
+ ---
625
+
626
+ ## Key Files to Understand
627
+
628
+ ### For Integration
629
+ - `guide/integration.md` - Integration patterns
630
+ - `guide/quickstart.md` - Quick setup
631
+ - `AI-SERVICE-INTEGRATION-COMPLETE.md` - AI system details
632
+
633
+ ### For Development
634
+ - `guide/development.md` - Build & extend
635
+ - `src/types.ts` - Type definitions
636
+ - `src/constants.ts` - Defaults
637
+ - `src/arguments.ts` - CLI parsing
638
+
639
+ ### For Debugging
640
+ - `guide/debugging.md` - Troubleshooting
641
+ - `PARALLEL-PUBLISH-DEBUGGING-GUIDE.md` - Parallel issues
642
+ - `RECOVERY-FIXES.md` - Recovery mechanisms
643
+
644
+ ### For Understanding AI
645
+ - `guide/ai-system.md` - AI mechanics
646
+ - `ai-service/README.md` - AI service docs
647
+ - `AGENTIC-ONLY-SIMPLIFICATION.md` - Why agentic
648
+
649
+ ### For Monorepos
650
+ - `guide/monorepo.md` - Monorepo guide
651
+ - `TREE-TOOLKIT-COMPLETE.md` - Tree implementation
652
+ - `MONOREPO-PUBLISH-IMPROVEMENTS.md` - Workflows
653
+
654
+ ---
655
+
656
+ ## Testing & Validation
657
+
658
+ ### Run All Tests
659
+
660
+ ```bash
661
+ cd kodrdriv && npm test
662
+ cd ai-service && npm test
663
+ cd tree-core && npm test
664
+ cd tree-execution && npm test
665
+ cd shared && npm test
666
+ cd git-tools && npm test
667
+ cd github-tools && npm test
668
+ ```
669
+
670
+ ### Precommit Checks
671
+
672
+ ```bash
673
+ # In each package
674
+ npm run precommit
675
+
676
+ # Or use kodrdriv itself
677
+ kodrdriv tree precommit --parallel
678
+ ```
679
+
680
+ ### Build Verification
681
+
682
+ ```bash
683
+ # Build all packages
684
+ cd ai-service && npm run build
685
+ cd ../tree-core && npm run build
686
+ cd ../tree-execution && npm run build
687
+ cd ../shared && npm run build
688
+ cd ../git-tools && npm run build
689
+ cd ../github-tools && npm run build
690
+ cd ../kodrdriv && npm run build
691
+ ```
692
+
693
+ ---
694
+
695
+ ## FAQs for AI Assistants
696
+
697
+ ### Q: What's the most important thing to understand?
698
+
699
+ **A**: Kodrdriv uses **agentic AI** - it doesn't just generate text, it actively investigates code changes using tools before writing. This is always on, not optional.
700
+
701
+ ### Q: How do I help someone get started?
702
+
703
+ **A**: Point them to [`guide/quickstart.md`](guide/quickstart.md) and help them:
704
+ 1. Set OPENAI_API_KEY
705
+ 2. Run `kodrdriv --init-config`
706
+ 3. Test with `kodrdriv commit --dry-run`
707
+
708
+ ### Q: What if kodrdriv generates poor output?
709
+
710
+ **A**: Check:
711
+ 1. Enable `--self-reflection` to see what AI did
712
+ 2. Pass `--context-files` for more context
713
+ 3. Increase `--max-agentic-iterations` for deeper investigation
714
+ 4. Use `gpt-4o` instead of `gpt-4o-mini`
715
+
716
+ ### Q: How do I debug issues?
717
+
718
+ **A**: Use [`guide/debugging.md`](guide/debugging.md):
719
+ 1. `--dry-run` to preview
720
+ 2. `--verbose` for detail
721
+ 3. `--debug` for maximum info
722
+ 4. Check `output/` directory
723
+ 5. Review self-reflection reports
724
+
725
+ ### Q: Where is detailed implementation info?
726
+
727
+ **A**: Root directory has 40+ implementation docs. Most important:
728
+ - `AI-SERVICE-INTEGRATION-COMPLETE.md` - AI system
729
+ - `TREE-TOOLKIT-COMPLETE.md` - Tree operations
730
+ - `SESSION-SUMMARY-DEC-31.md` - Recent changes
731
+ - `PARALLEL-PUBLISH-DEBUGGING-GUIDE.md` - Troubleshooting
732
+
733
+ ### Q: How do I contribute?
734
+
735
+ **A**: See [`guide/development.md`](guide/development.md):
736
+ 1. Clone repo
737
+ 2. `npm install && npm link`
738
+ 3. Make changes
739
+ 4. `npm run precommit`
740
+ 5. Submit PR
741
+
742
+ ---
743
+
744
+ ## Directory Structure Reference
745
+
746
+ ```
747
+ /Users/tobrien/gitw/grunnverk/
748
+ ├── kodrdriv/ # Main package
749
+ │ ├── guide/ # AI-friendly guides ⭐
750
+ │ ├── docs/ # Detailed documentation
751
+ │ ├── src/ # Source code
752
+ │ ├── tests/ # Test suite
753
+ │ └── output/ # Generated files
754
+
755
+ ├── ai-service/ # AI integration
756
+ ├── tree-core/ # Dependency analysis
757
+ ├── tree-execution/ # Parallel execution
758
+ ├── git-tools/ # Git operations
759
+ ├── github-tools/ # GitHub API
760
+ ├── audio-tools/ # Audio processing
761
+ ├── shared/ # Common utilities
762
+
763
+ └── *.md # Implementation docs ⭐
764
+ (40+ files with detailed technical info)
765
+ ```
766
+
767
+ ---
768
+
769
+ ## Success Criteria
770
+
771
+ ### For Integration
772
+
773
+ - [ ] kodrdriv generates commit messages
774
+ - [ ] Generated messages are accurate
775
+ - [ ] Release notes are comprehensive
776
+ - [ ] publish command completes successfully
777
+ - [ ] Configuration works as expected
778
+
779
+ ### For Debugging
780
+
781
+ - [ ] Issue identified and diagnosed
782
+ - [ ] Solution found in guides
783
+ - [ ] Fix applied and tested
784
+ - [ ] Documentation updated if needed
785
+
786
+ ### For Development
787
+
788
+ - [ ] New feature works correctly
789
+ - [ ] Tests pass
790
+ - [ ] No regressions
791
+ - [ ] Documentation updated
792
+ - [ ] Precommit checks pass
793
+
794
+ ---
795
+
796
+ ## External Resources
797
+
798
+ ### Official Documentation
799
+
800
+ - Repository: https://github.com/username/kodrdriv
801
+ - npm: https://www.npmjs.com/package/@eldrforge/kodrdriv
802
+
803
+ ### Dependencies
804
+
805
+ - **RiotPrompt**: https://github.com/riotprompt/riotprompt
806
+ - **CardiganTime**: https://github.com/theunwalked/cardigantime
807
+ - **OpenAI API**: https://platform.openai.com/docs
808
+ - **GitHub API**: https://docs.github.com/en/rest
809
+
810
+ ---
811
+
812
+ ## Summary for AI Assistants
813
+
814
+ **kodrdriv** is a mature, well-tested AI-powered Git workflow tool with:
815
+
816
+ ✅ **Comprehensive guides** in `guide/` directory
817
+ ✅ **Extensive documentation** in 40+ root `.md` files
818
+ ✅ **Well-architected** with 8 focused packages
819
+ ✅ **Thoroughly tested** with 2,500+ tests
820
+ ✅ **Production-ready** and actively maintained
821
+
822
+ **To help users**:
823
+ 1. Start with the appropriate guide from `guide/` directory
824
+ 2. Reference implementation docs for technical details
825
+ 3. Check recent session summaries for latest changes
826
+ 4. Use debugging guides for troubleshooting
827
+ 5. Leverage the extensive test suite as examples
828
+
829
+ **Key principle**: kodrdriv is designed to be transparent and observable. Use `--verbose`, `--debug`, and `--self-reflection` to understand what's happening at every step.
830
+
831
+ ---
832
+
833
+ This guide is your complete reference for working with kodrdriv. Start with the guide directory, dive into implementation docs as needed, and leverage the extensive documentation to help users succeed!
834
+
835
+
836
+
837
+