@eldrforge/kodrdriv 1.2.124 → 1.2.126

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.
package/README.md CHANGED
@@ -21,11 +21,17 @@ npm install -g @eldrforge/kodrdriv
21
21
  ```bash
22
22
  git add .
23
23
  kodrdriv commit
24
+
25
+ # Or use agentic mode for deep analysis
26
+ kodrdriv commit --agentic --self-reflection
24
27
  ```
25
28
 
26
29
  ### Generate Release Notes
27
30
  ```bash
28
31
  kodrdriv release
32
+
33
+ # Or use agentic mode for comprehensive analysis
34
+ kodrdriv release --agentic --self-reflection
29
35
  ```
30
36
 
31
37
  ### Automate Your Release Process
@@ -42,7 +48,13 @@ kodrdriv audio-commit # Record audio to generate commit messages
42
48
  ## Key Features
43
49
 
44
50
  - **AI-Powered Analysis** - Uses OpenAI models to understand your code changes
51
+ - **Agentic Mode (NEW)** - AI-powered tool-calling for deep investigation and analysis
52
+ - 13 specialized tools for release notes generation
53
+ - 8 tools for commit message generation
54
+ - Self-reflection reports with tool effectiveness metrics
55
+ - Configurable iteration limits for complex releases
45
56
  - **GitHub Issues Integration** - Automatically analyzes recently closed issues to provide context for commit messages, prioritizing milestone-relevant issues
57
+ - **Stop-Context Filtering** - Automatically filters sensitive information from AI-generated content to maintain privacy across projects
46
58
  - **Adaptive Diff Management** - Automatically handles large diffs with intelligent truncation and retry logic to ensure reliable LLM processing
47
59
  - **Comprehensive Release Automation** - Handles dependency updates, version bumping, PR creation, and GitHub releases
48
60
  - **Audio-Driven Workflows** - Record audio to provide context for commits and reviews
package/dist/arguments.js CHANGED
@@ -81,7 +81,10 @@ z.object({
81
81
  createRetroactiveTags: z.boolean().optional(),
82
82
  workingTagPrefix: z.string().optional(),
83
83
  updateDeps: z.string().optional(),
84
- interProject: z.boolean().optional()
84
+ interProject: z.boolean().optional(),
85
+ agentic: z.boolean().optional(),
86
+ selfReflection: z.boolean().optional(),
87
+ maxAgenticIterations: z.number().optional()
85
88
  });
86
89
  // Function to transform flat CLI args into nested Config structure
87
90
  const transformCliArgs = (finalCliArgs, commandName)=>{
@@ -125,7 +128,7 @@ const transformCliArgs = (finalCliArgs, commandName)=>{
125
128
  }
126
129
  // Nested mappings for 'release' options (only when it's NOT a publish command)
127
130
  if (commandName !== 'publish') {
128
- if (finalCliArgs.from !== undefined || finalCliArgs.to !== undefined || finalCliArgs.maxDiffBytes !== undefined || finalCliArgs.interactive !== undefined || finalCliArgs.noMilestones !== undefined || finalCliArgs.openaiReasoning !== undefined || finalCliArgs.openaiMaxOutputTokens !== undefined) {
131
+ if (finalCliArgs.from !== undefined || finalCliArgs.to !== undefined || finalCliArgs.maxDiffBytes !== undefined || finalCliArgs.interactive !== undefined || finalCliArgs.noMilestones !== undefined || finalCliArgs.openaiReasoning !== undefined || finalCliArgs.openaiMaxOutputTokens !== undefined || finalCliArgs.agentic !== undefined || finalCliArgs.selfReflection !== undefined || finalCliArgs.maxAgenticIterations !== undefined) {
129
132
  transformedCliArgs.release = {};
130
133
  if (finalCliArgs.from !== undefined) transformedCliArgs.release.from = finalCliArgs.from;
131
134
  if (finalCliArgs.to !== undefined) transformedCliArgs.release.to = finalCliArgs.to;
@@ -136,6 +139,9 @@ const transformCliArgs = (finalCliArgs, commandName)=>{
136
139
  if (finalCliArgs.noMilestones !== undefined) transformedCliArgs.release.noMilestones = finalCliArgs.noMilestones;
137
140
  if (finalCliArgs.openaiReasoning !== undefined) transformedCliArgs.release.openaiReasoning = finalCliArgs.openaiReasoning;
138
141
  if (finalCliArgs.openaiMaxOutputTokens !== undefined) transformedCliArgs.release.openaiMaxOutputTokens = finalCliArgs.openaiMaxOutputTokens;
142
+ if (finalCliArgs.agentic !== undefined) transformedCliArgs.release.agentic = finalCliArgs.agentic;
143
+ if (finalCliArgs.selfReflection !== undefined) transformedCliArgs.release.selfReflection = finalCliArgs.selfReflection;
144
+ if (finalCliArgs.maxAgenticIterations !== undefined) transformedCliArgs.release.maxAgenticIterations = finalCliArgs.maxAgenticIterations;
139
145
  }
140
146
  }
141
147
  // Nested mappings for 'publish' options – map whenever publish-specific options are provided
@@ -527,7 +533,7 @@ async function getCliConfig(program, commands) {
527
533
  // Add global options to the main program
528
534
  // (cardigantime already adds most global options like --verbose, --debug, --config-dir)
529
535
  // Add subcommands
530
- const commitCommand = program.command('commit').argument('[direction]', 'direction or guidance for the commit message').description('Generate commit notes').option('--context <context>', 'context for the commit message').option('--cached', 'use cached diff').option('--add', 'add all changes before committing').option('--sendit', 'Commit with the message generated. No review.').option('--interactive', 'Present commit message for interactive review and editing').option('--amend', 'Amend the last commit with the generated message').option('--push [remote]', 'push to remote after committing (default: origin)').option('--message-limit <messageLimit>', 'limit the number of messages to generate').option('--skip-file-check', 'skip check for file: dependencies before committing').option('--max-diff-bytes <maxDiffBytes>', 'maximum bytes per file in diff (default: 2048)');
536
+ const commitCommand = program.command('commit').argument('[direction]', 'direction or guidance for the commit message').description('Generate commit notes').option('--context <context>', 'context for the commit message').option('--cached', 'use cached diff').option('--add', 'add all changes before committing').option('--sendit', 'Commit with the message generated. No review.').option('--interactive', 'Present commit message for interactive review and editing').option('--amend', 'Amend the last commit with the generated message').option('--push [remote]', 'push to remote after committing (default: origin)').option('--message-limit <messageLimit>', 'limit the number of messages to generate').option('--skip-file-check', 'skip check for file: dependencies before committing').option('--max-diff-bytes <maxDiffBytes>', 'maximum bytes per file in diff (default: 2048)').option('--agentic', 'use agentic mode with tool-calling for commit message generation').option('--self-reflection', 'generate self-reflection report with tool effectiveness analysis').option('--max-agentic-iterations <iterations>', 'maximum iterations for agentic mode (default: 10)', parseInt).option('--allow-commit-splitting', 'allow agentic mode to suggest splitting commits').option('--tool-timeout <timeout>', 'timeout for tool execution in milliseconds', parseInt);
531
537
  // Add shared options to commit command
532
538
  addSharedOptions(commitCommand);
533
539
  // Customize help output for commit command
@@ -568,6 +574,36 @@ async function getCliConfig(program, commands) {
568
574
  [
569
575
  '--message-limit <messageLimit>',
570
576
  'limit the number of messages to generate'
577
+ ],
578
+ [
579
+ '--skip-file-check',
580
+ 'skip check for file: dependencies before committing'
581
+ ],
582
+ [
583
+ '--max-diff-bytes <maxDiffBytes>',
584
+ 'maximum bytes per file in diff (default: 20480)'
585
+ ]
586
+ ];
587
+ const agenticOptions = [
588
+ [
589
+ '--agentic',
590
+ 'use agentic mode with tool-calling for commit generation'
591
+ ],
592
+ [
593
+ '--self-reflection',
594
+ 'generate self-reflection report with tool effectiveness analysis'
595
+ ],
596
+ [
597
+ '--max-agentic-iterations <iterations>',
598
+ 'maximum iterations for agentic mode (default: 10)'
599
+ ],
600
+ [
601
+ '--allow-commit-splitting',
602
+ 'allow agentic mode to suggest splitting commits'
603
+ ],
604
+ [
605
+ '--tool-timeout <timeout>',
606
+ 'timeout for tool execution in milliseconds'
571
607
  ]
572
608
  ];
573
609
  const globalOptions = [
@@ -620,12 +656,12 @@ async function getCliConfig(program, commands) {
620
656
  const maxWidth = Math.max(...options.map(([flag])=>flag.length));
621
657
  return `${title}:\n` + options.map(([flag, desc])=>` ${flag.padEnd(maxWidth + 2)} ${desc}`).join('\n') + '\n';
622
658
  };
623
- return nameAndVersion + '\n' + formatOptionsSection('Commit Message Options', commitOptions) + '\n' + formatOptionsSection('Behavioral Options', behavioralOptions) + '\n' + formatOptionsSection('Global Options', globalOptions) + '\n' + 'Environment Variables:\n' + ' OPENAI_API_KEY OpenAI API key (required)\n';
659
+ return nameAndVersion + '\n' + formatOptionsSection('Commit Message Options', commitOptions) + '\n' + formatOptionsSection('Behavioral Options', behavioralOptions) + '\n' + formatOptionsSection('Agentic Mode Options', agenticOptions) + '\n' + formatOptionsSection('Global Options', globalOptions) + '\n' + 'Environment Variables:\n' + ' OPENAI_API_KEY OpenAI API key (required)\n';
624
660
  }
625
661
  });
626
662
  const audioCommitCommand = program.command('audio-commit').option('--cached', 'use cached diff').option('--add', 'add all changes before committing').option('--sendit', 'Commit with the message generated. No review.').option('--direction <direction>', 'direction or guidance for the commit message').option('--message-limit <messageLimit>', 'limit the number of messages to generate').option('--file <file>', 'audio file path').description('Record audio to provide context, then generate and optionally commit with AI-generated message');
627
663
  addSharedOptions(audioCommitCommand);
628
- const releaseCommand = program.command('release').option('--from <from>', 'branch to generate release notes from').option('--to <to>', 'branch to generate release notes to').option('--context <context>', 'context for the commit message').option('--interactive', 'Present release notes for interactive review and editing').option('--max-diff-bytes <maxDiffBytes>', 'maximum bytes per file in diff (default: 2048)').option('--no-milestones', 'disable GitHub milestone integration').option('--from-main', 'force comparison against main branch instead of previous release tag').description('Generate release notes');
664
+ const releaseCommand = program.command('release').option('--from <from>', 'branch to generate release notes from').option('--to <to>', 'branch to generate release notes to').option('--context <context>', 'context for the commit message').option('--interactive', 'Present release notes for interactive review and editing').option('--max-diff-bytes <maxDiffBytes>', 'maximum bytes per file in diff (default: 2048)').option('--no-milestones', 'disable GitHub milestone integration').option('--from-main', 'force comparison against main branch instead of previous release tag').option('--agentic', 'use agentic mode with tool-calling for release notes generation').option('--self-reflection', 'generate self-reflection report with tool effectiveness analysis').option('--max-agentic-iterations <maxAgenticIterations>', 'maximum iterations for agentic mode (default: 30)', parseInt).description('Generate release notes');
629
665
  addSharedOptions(releaseCommand);
630
666
  const publishCommand = program.command('publish').option('--merge-method <method>', 'method to merge PR (merge, squash, rebase)', 'squash').option('--from <from>', 'branch/tag to generate release notes from (default: previous release tag)').option('--target-version <targetVersion>', 'target version for release (explicit version like "4.30.0" or semantic bump: "patch", "minor", "major")').option('--interactive', 'present release notes for interactive review and editing').option('--sendit', 'skip all confirmation prompts and proceed automatically').option('--sync-target', 'attempt to automatically sync target branch with remote before publishing').option('--skip-already-published', 'skip packages that are already published at target version on npm').option('--force-republish', 'delete existing tags and force republish even if tag exists').option('--no-milestones', 'disable GitHub milestone integration').option('--from-main', 'force comparison against main branch instead of previous release tag').option('--update-deps <scope>', 'update inter-project dependencies before publish (e.g., --update-deps @fjell)').description('Publish a release');
631
667
  addSharedOptions(publishCommand);