@grunnverk/kodrdriv 1.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.
Files changed (84) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/.cursor/rules/no-local-dependencies.md +6 -0
  3. package/.gitignore~ +23 -0
  4. package/.kodrdriv-example-branch-targeting.yaml +71 -0
  5. package/BUG_TREE_PUBLISH_CONFIG_DIR.md +79 -0
  6. package/LICENSE +190 -0
  7. package/README.md +218 -0
  8. package/dist/application.js +228 -0
  9. package/dist/application.js.map +1 -0
  10. package/dist/arguments.js +1307 -0
  11. package/dist/arguments.js.map +1 -0
  12. package/dist/constants.js +255 -0
  13. package/dist/constants.js.map +1 -0
  14. package/dist/logging.js +176 -0
  15. package/dist/logging.js.map +1 -0
  16. package/dist/main.js +24 -0
  17. package/dist/main.js.map +1 -0
  18. package/dist/mcp/prompts/check_development.md +169 -0
  19. package/dist/mcp/prompts/dependency_update.md +62 -0
  20. package/dist/mcp/prompts/fix_and_commit.md +53 -0
  21. package/dist/mcp/prompts/publish.md +100 -0
  22. package/dist/mcp/prompts/tree_fix_and_commit.md +102 -0
  23. package/dist/mcp/prompts/tree_publish.md +118 -0
  24. package/dist/mcp-server.js +15601 -0
  25. package/dist/mcp-server.js.map +7 -0
  26. package/dist/types.js +303 -0
  27. package/dist/types.js.map +1 -0
  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 +224 -0
  35. package/guide/integration.md +510 -0
  36. package/guide/monorepo.md +533 -0
  37. package/guide/quickstart.md +249 -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/input/250509-kodrdriv-library-rules.m4a +0 -0
  42. package/package.json +105 -0
  43. package/packages/components/package.json +7 -0
  44. package/packages/tools/package.json +7 -0
  45. package/packages/utils/package.json +7 -0
  46. package/processed/250705-kodrdriv-confirm-editor-for-commit-and-release.m4a +0 -0
  47. package/processed/250705-kodrdriv-confirm-flag-release.m4a +0 -0
  48. package/processed/250705-kodrdriv-context-for-review.m4a +0 -0
  49. package/processed/250705-kodrdriv-feedback-on-publish-pipeline.m4a +0 -0
  50. package/processed/250705-kodrdriv-intelligent-eslint-style.m4a +0 -0
  51. package/processed/250705-kodrdriv-make-review-less-strict.m4a +0 -0
  52. package/processed/250705-kodrdriv-multilevel-transcription.m4a +0 -0
  53. package/processed/250705-kodrdriv-opinionated-review.m4a +0 -0
  54. package/processed/250705-kodrdriv-publish-next-version.m4a +0 -0
  55. package/processed/250705-kodrdriv-release-branches-and-milestones.m4a +0 -0
  56. package/processed/250705-kodrdriv-scope-check-fix-or-ignore.m4a +0 -0
  57. package/processed/250705-kodrdriv-scope-checker.m4a +0 -0
  58. package/processed/250705-kodrdriv-specify-a-release-note-for-publish.m4a +0 -0
  59. package/scripts/build-mcp.js +111 -0
  60. package/scripts/pre-commit-hook.sh +52 -0
  61. package/scripts/test-get-version-tool.js +102 -0
  62. package/scripts/test-mcp-compliance.js +254 -0
  63. package/scripts/update-test-log-assertions.js +73 -0
  64. package/temp-dist/arguments.js +817 -0
  65. package/temp-dist/constants.js +202 -0
  66. package/temp-dist/logging.js +130 -0
  67. package/temp-dist/types.js +112 -0
  68. package/temp-dist/util/stdin.js +132 -0
  69. package/temp-dist/util/storage.js +149 -0
  70. package/temp-dist/util/validation.js +110 -0
  71. package/test-external-unlink/package.json +16 -0
  72. package/test-externals/package.json +8 -0
  73. package/test-increment.js +0 -0
  74. package/test-multiline/cli/package.json +8 -0
  75. package/test-multiline/core/package.json +5 -0
  76. package/test-multiline/mobile/package.json +8 -0
  77. package/test-multiline/web/package.json +8 -0
  78. package/test-project/package-lock.json +21 -0
  79. package/test-project/package.json +1 -0
  80. package/test-review-flow.sh +15 -0
  81. package/test-sort-files/alpha.md +3 -0
  82. package/test-sort-files/middle.txt +3 -0
  83. package/test-sort-files/zebra.txt +3 -0
  84. package/test_output.txt +161 -0
@@ -0,0 +1,12 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm install:*)",
5
+ "Bash(kodrdriv tree publish:*)",
6
+ "Bash(git push:*)",
7
+ "Bash(kill:*)",
8
+ "Bash(pkill:*)",
9
+ "Bash(kodrdriv development:*)"
10
+ ]
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ # No Local Dependencies
2
+
3
+ Never create local dependencies between projects. Never use `file://` URLs in package.json dependencies.
4
+
5
+ All dependencies must be published packages with proper version numbers from npm registry or equivalent package registries.
6
+
package/.gitignore~ ADDED
@@ -0,0 +1,23 @@
1
+ .env
2
+ dist
3
+ temp-dist
4
+ node_modules
5
+ *.log
6
+ .vscode
7
+ coverage/
8
+ input/
9
+ output/
10
+ processed/
11
+ .kodrdriv-test-cache.json
12
+ RELEASE_NOTES.md
13
+ RELEASE_TITLE.md
14
+ tsconfig.tsbuildinfo
15
+
16
+ # KodrDriv link backup files
17
+ .kodrdriv-link-backup.json
18
+
19
+ # Git hooks (environment-specific)
20
+ .git/hooks/pre-commit
21
+
22
+ # Fallback commit message files (should go to output/ directory)
23
+ commit-message-*.txt
@@ -0,0 +1,71 @@
1
+ # Example KodrDriv Configuration for Branch-Dependent Targeting
2
+ # This demonstrates how to set up automated CI/CD pipeline targeting
3
+ # Using the NEW branches configuration format
4
+
5
+ # Global settings
6
+ model: gpt-4o-mini
7
+ verbose: true
8
+
9
+ # Branch-dependent targeting configuration
10
+ branches:
11
+ working:
12
+ targetBranch: "development"
13
+ developmentBranch: true # Mark this as the active development branch
14
+ version:
15
+ type: "prerelease"
16
+ increment: true
17
+ incrementLevel: "patch" # Increment patch version when going back to working
18
+ tag: "dev"
19
+
20
+ development:
21
+ targetBranch: "test"
22
+ version:
23
+ type: "prerelease"
24
+ increment: false
25
+ tag: "development"
26
+
27
+ test:
28
+ targetBranch: "main"
29
+ version:
30
+ type: "prerelease"
31
+ increment: false
32
+ tag: "test"
33
+
34
+ main:
35
+ version:
36
+ type: "release"
37
+
38
+ # Publish configuration (applies to all branches unless overridden by targets)
39
+ publish:
40
+ mergeMethod: "squash"
41
+ checksTimeout: 1800000 # 30 minutes for complex CI/CD workflows
42
+ waitForReleaseWorkflows: true
43
+ sendit: true # Auto-commit and merge without prompts
44
+
45
+ # Commit configuration
46
+ commit:
47
+ add: true
48
+ sendit: true
49
+ push: true
50
+
51
+ # Note: The 'development' command will automatically navigate to whichever
52
+ # branch is marked with 'developmentBranch: true' (in this case, 'working')
53
+ #
54
+ # Example workflow commands:
55
+ # kodrdriv tree checkout working # Switch entire workspace to working branch
56
+ # kodrdriv tree publish # Publish working → development
57
+ # kodrdriv tree checkout development # Switch to development to test
58
+ # kodrdriv tree publish # Publish development → test
59
+ # kodrdriv development # Back to working for more coding
60
+
61
+ # Optional: workspace linking for local development
62
+ link:
63
+ scopeRoots:
64
+ "@yourcompany": "../"
65
+
66
+ # File exclusions
67
+ excludedPatterns:
68
+ - node_modules
69
+ - dist
70
+ - "*.log"
71
+ - coverage
@@ -0,0 +1,79 @@
1
+ # Bug: tree_publish passes incorrect --config-dir path
2
+
3
+ ## Problem
4
+
5
+ When `tree_publish` executes `kodrdriv publish` for each package, it passes `--config-dir` with the parent directory path, but kodrdriv's config discovery expects either:
6
+ 1. The full path to the config directory (`.kodrdriv`), or
7
+ 2. No `--config-dir` flag at all (to allow hierarchical discovery)
8
+
9
+ ## Current Behavior
10
+
11
+ When `tree_publish` runs from `/Users/tobrien/gitw/grunnverk/kodrdriv`, it passes:
12
+ ```
13
+ --config-dir "/Users/tobrien/gitw/grunnverk/kodrdriv"
14
+ ```
15
+
16
+ This causes kodrdriv to look for a config directory named `kodrdriv` instead of `.kodrdriv`.
17
+
18
+ When `tree_publish` runs from `/Users/tobrien/gitw/grunnverk`, it passes:
19
+ ```
20
+ --config-dir "/Users/tobrien/gitw/grunnverk"
21
+ ```
22
+
23
+ This causes kodrdriv to look for a config directory named `grunnverk` instead of `.kodrdriv`.
24
+
25
+ ## Expected Behavior
26
+
27
+ The config file exists at: `/Users/tobrien/gitw/grunnverk/.kodrdriv/config.yaml`
28
+
29
+ `tree_publish` should either:
30
+ 1. Pass `--config-dir "/Users/tobrien/gitw/grunnverk/.kodrdriv"` (full path to config directory), or
31
+ 2. Not pass `--config-dir` at all and let hierarchical discovery find `.kodrdriv` automatically
32
+
33
+ ## Error Details
34
+
35
+ ```
36
+ Command failed: kodrdriv publish --config-dir "/Users/tobrien/gitw/grunnverk"
37
+ [winston] ... "Using hierarchical discovery: configDirName=grunnverk, startingDir=/Users/tobrien/gitw"
38
+ [winston] ... "Checking for config directory: /Users/tobrien/gitw/grunnverk"
39
+ [winston] ... "Found config directory at level 0: /Users/tobrien/gitw/grunnverk"
40
+ [winston] ... "Attempting to load config file: /Users/tobrien/gitw/grunnverk/config.yaml"
41
+ [winston] ... "Config file not found at /Users/tobrien/gitw/grunnverk/config.yaml"
42
+ ```
43
+
44
+ The system is looking for `/Users/tobrien/gitw/grunnverk/config.yaml` but the actual file is at `/Users/tobrien/gitw/grunnverk/.kodrdriv/config.yaml`.
45
+
46
+ ## Location of Issue
47
+
48
+ The issue is in `/Users/tobrien/gitw/grunnverk/commands-tree/src/commands/tree.ts` around line 2476:
49
+
50
+ ```typescript
51
+ if (runConfig.configDirectory) globalOptions.push(`--config-dir "${runConfig.configDirectory}"`);
52
+ ```
53
+
54
+ ## Investigation Needed
55
+
56
+ 1. Find where `runConfig.configDirectory` is set in the tree_publish flow
57
+ 2. Determine if it should:
58
+ - Be set to the full path of the `.kodrdriv` directory (e.g., `/Users/tobrien/gitw/grunnverk/.kodrdriv`)
59
+ - Not be set at all (let hierarchical discovery work)
60
+ - Be set differently based on how kodrdriv's config discovery works
61
+
62
+ ## Suggested Fix
63
+
64
+ Option 1: If `configDirectory` should point to the config directory itself:
65
+ - When setting `runConfig.configDirectory`, append `/.kodrdriv` to the directory path
66
+ - Or detect the config directory location and use that full path
67
+
68
+ Option 2: If hierarchical discovery should handle it:
69
+ - Don't set `runConfig.configDirectory` when it would point to a parent directory
70
+ - Only set it when explicitly provided by the user or when pointing to the actual `.kodrdriv` directory
71
+
72
+ ## Testing
73
+
74
+ After fixing, verify that:
75
+ 1. `tree_publish` can find the config at `/Users/tobrien/gitw/grunnverk/.kodrdriv/config.yaml`
76
+ 2. The publish workflow completes successfully
77
+ 3. Both scenarios work:
78
+ - Running from `/Users/tobrien/gitw/grunnverk/kodrdriv`
79
+ - Running from `/Users/tobrien/gitw/grunnverk`
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025 Tim O'Brien
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # KodrDriv - AI-Powered Git Workflow Automation
2
+
3
+ <!-- Build trigger: 2026-01-21 -->
4
+
5
+ [![MCP Integration](https://img.shields.io/badge/MCP-Enabled-blue)](https://modelcontextprotocol.io)
6
+ [![14 MCP Tools](https://img.shields.io/badge/MCP_Tools-14-brightgreen)]()
7
+ [![8 Resources](https://img.shields.io/badge/MCP_Resources-8-brightgreen)]()
8
+ [![6 Prompts](https://img.shields.io/badge/MCP_Prompts-6-brightgreen)]()
9
+
10
+ # KodrDriv
11
+
12
+ KodrDriv is an AI-powered Git workflow automation tool that generates intelligent commit messages and release notes from your code changes. It analyzes your repository to create meaningful documentation while automating the entire release process.
13
+
14
+ ## 🤖 For AI Assistants
15
+
16
+ **Complete AI Guide**: [`AI-GUIDE.md`](AI-GUIDE.md) - Comprehensive documentation for AI assistants helping with kodrdriv
17
+
18
+ **Quick Start**: [`guide/index.md`](guide/index.md) - Navigation hub for all guides
19
+
20
+ ## Why KodrDriv?
21
+
22
+ Writing good commit messages and release notes is time-consuming and often done when you're least in the mood for reflection. **KodrDriv was created specifically to solve the "context switch" problem** that happens when you've been deep in code and Git asks you to summarize what you've done.
23
+
24
+ KodrDriv reads your code changes and Git history to automatically generate contextual, meaningful documentation that reflects your actual work.
25
+
26
+ ## Requirements
27
+
28
+ - **Node.js 24.0.0 or higher** - KodrDriv uses Vite 7+ which requires Node.js 24+
29
+ - Git installed and configured
30
+ - OpenAI API key (for AI-powered content generation)
31
+
32
+ To check your Node.js version:
33
+ ```bash
34
+ node --version
35
+ ```
36
+
37
+ If you need to upgrade Node.js, visit [nodejs.org](https://nodejs.org/) or use a version manager like [nvm](https://github.com/nvm-sh/nvm).
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ npm install -g @grunnverk/kodrdriv
43
+ ```
44
+
45
+ ## 🤖 MCP Integration
46
+
47
+ KodrDriv supports the **Model Context Protocol (MCP)**, enabling AI assistants like Cursor to directly invoke kodrdriv commands.
48
+
49
+ ### Features
50
+ - **14 Fully Implemented Tools**: All kodrdriv commands including automated publish→development workflow
51
+ - **8 Resources**: Access configs, status, workspace data via `kodrdriv://` URIs
52
+ - **6 Workflow Prompts**: Guided multi-step operations
53
+
54
+ ### Quick Setup for Cursor
55
+
56
+ Add to `.cursor/mcp.json`:
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "kodrdriv": {
61
+ "command": "kodrdriv-mcp"
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ Then simply ask: *"Use kodrdriv to commit my changes"*
68
+
69
+ ### Documentation
70
+ - **[Integration Guide](MCP_INTEGRATION.md)** - Complete MCP documentation
71
+ - **[Tools Reference](docs/mcp-tools-reference.md)** - All 14 tools
72
+ - **[Resources Reference](docs/mcp-resources-reference.md)** - All 8 resources
73
+ - **[Prompts Reference](docs/mcp-prompts-reference.md)** - All 6 workflows
74
+
75
+
76
+ ## Quick Start
77
+
78
+ ### Generate a Commit Message
79
+ ```bash
80
+ git add .
81
+ kodrdriv commit
82
+
83
+ # With detailed analysis report
84
+ kodrdriv commit --self-reflection
85
+
86
+ # With context files
87
+ kodrdriv commit --context-files IMPLEMENTATION.md --sendit
88
+ ```
89
+
90
+ ### Generate Release Notes
91
+ ```bash
92
+ kodrdriv release
93
+
94
+ # With context and analysis
95
+ kodrdriv release --context-files CHANGELOG.md --self-reflection
96
+ ```
97
+
98
+ ### Automate Your Release Process
99
+ ```bash
100
+ kodrdriv publish
101
+ ```
102
+
103
+ ### Smart Git Operations
104
+ ```bash
105
+ # Smart pull with auto-conflict resolution
106
+ kodrdriv pull
107
+ kodrdriv tree pull # Pull all packages in monorepo
108
+
109
+ # Update dependencies with AI analysis
110
+ kodrdriv tree updates --report # See dependency conflicts
111
+ kodrdriv updates --analyze # Get AI upgrade recommendations
112
+ ```
113
+
114
+ ### Audio-Driven Development
115
+ ```bash
116
+ kodrdriv select-audio # Configure microphone (one-time setup)
117
+ kodrdriv audio-commit # Record audio to generate commit messages
118
+ ```
119
+
120
+ ## Key Features
121
+
122
+ - **AI-Powered Analysis** - Uses OpenAI models with tool-calling for deep investigation
123
+ - Always-on agentic mode for intelligent analysis
124
+ - 13 specialized tools for release notes generation
125
+ - 8 tools for commit message generation
126
+ - Self-reflection reports with tool effectiveness metrics
127
+ - Configurable iteration limits for complex releases
128
+ - **Smart Git Operations** - Intelligent handling of common git pain points
129
+ - **Smart Pull** - Auto-resolves `package-lock.json`, version bumps, and build artifacts
130
+ - **Dependency Analysis** - AI-powered upgrade recommendations with version conflict detection
131
+ - **Context Files** - Pass documentation files as context for better AI understanding
132
+ - **Human-Readable Output** - Professional tone without AI slop, emojis, or marketing speak
133
+ - **GitHub Issues Integration** - Automatically analyzes recently closed issues to provide context for commit messages, prioritizing milestone-relevant issues
134
+ - **Stop-Context Filtering** - Automatically filters sensitive information from AI-generated content to maintain privacy across projects
135
+ - **Adaptive Diff Management** - Automatically handles large diffs with intelligent truncation and retry logic to ensure reliable LLM processing
136
+ - **Comprehensive Release Automation** - Handles dependency updates, version bumping, PR creation, and GitHub releases
137
+ - **Audio-Driven Workflows** - Record audio to provide context for commits and reviews
138
+ - **Intelligent Workspace Management** - Provides tools for linking and managing related packages in monorepos
139
+ - **Flexible Configuration** - Hierarchical configuration with command-line overrides
140
+
141
+ ## Configuration
142
+
143
+ Set up your environment variables:
144
+ ```bash
145
+ export OPENAI_API_KEY="your-openai-api-key"
146
+ export GITHUB_TOKEN="your-github-token" # Required for publish command
147
+
148
+ # If using a project-scoped API key (starts with sk-proj-):
149
+ export OPENAI_PROJECT_ID="proj-your-project-id"
150
+ ```
151
+
152
+ **Note:** If your OpenAI API key starts with `sk-proj-`, you must also set `OPENAI_PROJECT_ID`. You can find your project ID in the [OpenAI dashboard](https://platform.openai.com/settings/organization/projects). Alternatively, create a legacy API key (starts with just `sk-`) to avoid needing the project ID.
153
+
154
+ Initialize configuration files:
155
+ ```bash
156
+ kodrdriv --init-config
157
+ kodrdriv --check-config
158
+ ```
159
+
160
+ ## Documentation
161
+
162
+ 📚 **Comprehensive Documentation**
163
+
164
+ ### 🤖 AI-Friendly Guides
165
+
166
+ **NEW**: Complete guide system designed for AI assistants and developers:
167
+ - **[AI Guide (Master)](AI-GUIDE.md)** - Complete reference for AI assistants
168
+ - **[Guide Directory](guide/)** - 13 focused guides covering everything
169
+ - [Quick Start](guide/quickstart.md) - 5-minute setup
170
+ - [Integration](guide/integration.md) - Add to your project
171
+ - [Usage](guide/usage.md) - Common workflows
172
+ - [Commands](guide/commands.md) - Quick reference
173
+ - [Configuration](guide/configuration.md) - All options
174
+ - [AI System](guide/ai-system.md) - How AI works
175
+ - [Debugging](guide/debugging.md) - Troubleshooting
176
+ - [Architecture](guide/architecture.md) - System design
177
+ - [Development](guide/development.md) - Extend kodrdriv
178
+ - [Testing](guide/testing.md) - Test suite
179
+ - [Tree Operations](guide/tree-operations.md) - Multi-package
180
+ - [Monorepo](guide/monorepo.md) - Monorepo workflows
181
+
182
+ ### Commands
183
+ - **[All Commands Overview](docs/public/commands.md)** - Complete command reference with examples
184
+ - **[commit](docs/public/commands/commit.md)** - Generate intelligent commit messages
185
+ - **[audio-commit](docs/public/commands/audio-commit.md)** - Record audio for commit context
186
+ - **[review](docs/public/commands/review.md)** - Analyze review notes and create GitHub issues
187
+ - **[audio-review](docs/public/commands/audio-review.md)** - Record audio for review analysis
188
+ - **[release](docs/public/commands/release.md)** - Generate comprehensive release notes
189
+ - **[publish](docs/public/commands/publish.md)** - Automate the entire release process
190
+ - **[pull](docs/public/commands/pull.md)** - Smart pull with auto-conflict resolution
191
+ - **[updates](docs/public/commands/updates.md)** - Dependency updates with AI analysis
192
+ - **[link](docs/public/commands/link.md)** - Link local packages for development
193
+ - **[unlink](docs/public/commands/unlink.md)** - Remove workspace links
194
+ - **[clean](docs/public/commands/clean.md)** - Clean generated files
195
+ - **[select-audio](docs/public/commands/select-audio.md)** - Configure audio device
196
+
197
+ ### Configuration & Customization
198
+ - **[Configuration](docs/public/configuration.md)** - All configuration options and environment variables
199
+ - **[Customization](docs/public/customization.md)** - Custom instructions, personas, and override structures
200
+ - **[Examples](docs/public/examples.md)** - Practical usage examples and common workflows
201
+
202
+ ### Technical Details
203
+ - **[Architecture](docs/public/architecture.md)** - Technical architecture and design
204
+ - **[Assumptions](docs/public/assumptions.md)** - Development assumptions and conventions
205
+
206
+ ## Contributing
207
+
208
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
209
+
210
+ ## License
211
+
212
+ Apache-2.0 - see [LICENSE](LICENSE) file for details.
213
+
214
+ ## About the Name
215
+
216
+ Like Thor's hammer, this tool smashes through your repetitive coding tasks. But unlike Mjölnir, it won't make you worthy — it'll just make you faster. Strike through commits, forge releases, and channel the lightning of AI to automate your workflow. Because sometimes you need a hammer, and sometimes you need a tool that actually works. Pirate.
217
+
218
+ <!-- Build: 2026-01-15 15:59:12 UTC -->