Commit Graph

74 Commits

Author SHA1 Message Date
fd9fbee655 refactor(testgen): enhance debugging for empty responses and refine Go test prompt
Some checks failed
CI / Test (push) Successful in 29s
CI / Lint (push) Failing after 7s
CI / Build (push) Failing after 6s
- Add user-facing message showing the selected model
- Implement detailed error logging when AI response is empty, including raw preview
- Update Go test generation prompt for better naming, rules against monkey-patching, and simplicity
2026-03-03 18:58:40 +00:00
b76aa6f800 refactor(testgen): generalize Go test generation prompt
All checks were successful
CI / Test (push) Successful in 28s
CI / Lint (push) Successful in 19s
CI / Build (push) Successful in 15s
- Remove Grokkit-specific references to make the prompt more versatile.
- Update unit and live test patterns for broader applicability, including standard testing.T usage.
- Adjust test name derivation and skip messages for consistency.
- Sync test assertions in testgen_test.go with the updated prompt.
2026-03-03 18:27:49 +00:00
b82016028e refactor(testgen): refine Go test prompt to match scaffold style exactly
All checks were successful
CI / Test (push) Successful in 28s
CI / Lint (push) Successful in 18s
CI / Build (push) Successful in 15s
- Updated getTestPrompt for Go to enforce exact test structure: unit with t.Parallel() and logs, optional live with precise skip message.
- Ensured test name derivation, no unused imports, and pure output.
- Added example TestTestgenCmd_Unit and _Live in testgen_test.go to demonstrate the new pattern.
- Minor fixes to Python and C prompts for consistency.
2026-03-03 18:06:13 +00:00
Gregory Gauthier
d1eaa5234b refactor(testgen): update Go prompt to enforce unit + live test pattern
All checks were successful
CI / Test (push) Successful in 28s
CI / Lint (push) Successful in 18s
CI / Build (push) Successful in 15s
- Modify user message to reference new pattern in system prompt
- Revise Go test prompt for exact unit/live structure matching scaffold_test.go
- Update testgen_test.go to match new prompt prefix
2026-03-03 16:52:50 +00:00
Gregory Gauthier
0ef58cb5a4 fix(cmd): use Fprintf for efficiency and handle Chdir error in tests
All checks were successful
CI / Test (push) Successful in 25s
CI / Lint (push) Successful in 37s
CI / Build (push) Successful in 15s
- Replace WriteString + Sprintf with Fprintf in harvestContext for better performance.
- Wrap deferred Chdir in scaffold tests with error logging to avoid silent failures.
2026-03-03 15:50:30 +00:00
Gregory Gauthier
eadb4452a8 chore(todo): mark scaffold as completed and queue interactive agent
Some checks failed
CI / Test (push) Successful in 25s
CI / Lint (push) Failing after 31s
CI / Build (push) Successful in 12s
- Renamed todo/queued/scaffold.md to todo/completed/scaffold.md to indicate task completion.
- Added todo/queued/interactive-agent.md with details for the next priority feature: a persistent conversational agent mode for Grokkit.
2026-03-03 15:37:40 +00:00
Gregory Gauthier
1bcf55dedb test(cmd): add tests for scaffold command
Some checks failed
CI / Test (push) Successful in 58s
CI / Lint (push) Failing after 37s
CI / Build (push) Successful in 32s
Add fast unit test and live integration tests for the scaffold command, including
scenarios for basic usage, flags like --with-tests, --dry-run, and --force.

Remove unused charmbracelet dependencies (bubbles, bubbletea, lipgloss, etc.)
and add testify for assertions. Update go.mod and go.sum accordingly.
2026-03-03 15:24:06 +00:00
Gregory Gauthier
3ea26c403a feat(cmd): add scaffold command for AI-assisted file creation
All checks were successful
CI / Test (push) Successful in 39s
CI / Lint (push) Successful in 27s
CI / Build (push) Successful in 22s
Introduce a new `scaffold` command that uses Grok to generate new files based on a description.
Includes options for generating tests, dry runs, force overwrite, and language override.
Detects language from file extension and harvests project context for better generation.
2026-03-03 14:18:05 +00:00
b884f32758 chore(todo): add priorities to queued items and new tool integration plans
All checks were successful
CI / Test (push) Successful in 33s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 19s
- Added priority markers (e.g., "Priority: X of 12") to existing queued TODOs like audit, changelog, profile, scaffold.
- Introduced new detailed TODO markdowns for agent integrations: cnotes, git-chglog, gotools, make, pprof, rg, tea.
- Enhances planning for grokkit agent tooling ecosystem.
2026-03-02 23:42:06 +00:00
c33578b9af feat(scaffold): add spec for grokkit scaffold command to queued tasks
All checks were successful
CI / Test (push) Successful in 32s
CI / Lint (push) Successful in 24s
CI / Build (push) Successful in 19s
Queues a detailed specification for implementing the `grokkit scaffold` command, which enables AI-powered code generation for new files based on natural language descriptions and codebase patterns. Includes CLI examples, implementation notes, flags, and ROI analysis.
2026-03-02 22:39:13 +00:00
fcaad3b936 feat(audit): add todo for AI-powered code audit command
All checks were successful
CI / Test (push) Successful in 31s
CI / Lint (push) Successful in 26s
CI / Build (push) Successful in 20s
Adds a queued todo item outlining the `grokkit audit` feature for comprehensive code audits, including security, performance, and best practices analysis with actionable reports and fix previews.
2026-03-02 22:32:55 +00:00
0bebde05b5 docs(readme): update test coverage metrics
All checks were successful
CI / Test (push) Successful in 33s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 21s
Release / Create Release (push) Successful in 37s
Adjust test coverage badge and details from 72% to 68%, and lower CI gate from 70% to 65% to reflect current status.
2026-03-02 22:23:48 +00:00
34789c50a5 test(cmd): improve error handling in completion test writer close
All checks were successful
CI / Test (push) Successful in 33s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 20s
Handle potential errors when closing the pipe writer in TestCompletionCmd,
and use a deferred anonymous function to ignore errors in defer.
2026-03-02 22:19:47 +00:00
d13731facb ci(workflow): lower coverage threshold to 65% and remove test output file
Some checks failed
CI / Test (push) Successful in 34s
CI / Lint (push) Failing after 18s
CI / Build (push) Successful in 20s
Adjust the CI workflow to enforce a 65% test coverage threshold instead of 70% to accommodate current coverage levels. Delete the obsolete .output.txt file containing old test run logs.
2026-03-02 22:16:13 +00:00
ebb0cbcf3a test(cmd): add unit tests for completion, root execution, config, errors, and logger
Some checks failed
CI / Test (push) Failing after 26s
CI / Lint (push) Has been skipped
CI / Build (push) Has been skipped
- Add tests for shell completion generation in completion_test.go
- Add tests for root command execution and flags in root_test.go
- Expand config tests for temperature, timeout, and log level getters
- Add APIError unwrap test in errors_test.go
- Add WithContext tests in logger_test.go
- Stage test output artifact in .output.txt
2026-03-02 22:12:54 +00:00
c54bc511c9 feat(testgen): add AI unit test generation command
Some checks failed
CI / Test (push) Failing after 27s
CI / Lint (push) Has been skipped
CI / Build (push) Has been skipped
- Implement `grokkit testgen` for Go/Python/C/C++ files
- Add language-specific prompts and test file conventions
- Include backups, previews, auto-apply flag
- Update README with docs and examples
- Add unit tests for helper functions
- Mark todo as completed
2026-03-02 21:57:33 +00:00
599b478a17 chore(build): remove goreleaser configuration
All checks were successful
CI / Test (push) Successful in 33s
CI / Lint (push) Successful in 24s
CI / Build (push) Successful in 19s
Delete the .goreleaser.yaml file as it's no longer needed for the build and release process.
2026-03-02 21:39:21 +00:00
918ccc01c8 refactor(tests): improve error handling and defer usage
All checks were successful
CI / Test (push) Successful in 31s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 22s
Release / Create Release (push) Successful in 36s
- Add error checking for os.Setenv and io operations in test files
- Use anonymous functions in defer to ignore errors from os.Remove, os.Setenv, etc.
- Minor formatting and consistency fixes in tests and client code
2026-03-02 21:33:11 +00:00
032301e041 chore(lint): update golangci-lint configuration
Some checks failed
CI / Test (push) Successful in 34s
CI / Lint (push) Failing after 25s
CI / Build (push) Successful in 20s
Switch default linters to standard and retain misspell enablement, removing explicit enables for govet, errcheck, staticcheck, ineffassign, unused, and gosimple.
2026-03-02 21:25:21 +00:00
586dfeaa8c chore: move gofmt from linters to formatters in .golangci.yml
Some checks failed
CI / Test (push) Successful in 33s
CI / Lint (push) Failing after 16s
CI / Build (push) Successful in 21s
Correctly configure gofmt as a formatter instead of a linter for proper linting behavior.
2026-03-02 21:21:21 +00:00
4f40c7e8d7 chore(lint): remove typecheck from golangci linters
Some checks failed
CI / Test (push) Successful in 31s
CI / Lint (push) Failing after 17s
CI / Build (push) Successful in 20s
Disable the typecheck linter as it may be redundant or unnecessary in the current setup.
2026-03-02 21:18:43 +00:00
03e6703c58 chore(ci): upgrade golangci-lint-action to v7
Some checks failed
CI / Test (push) Successful in 32s
CI / Lint (push) Failing after 39s
CI / Build (push) Successful in 20s
2026-03-02 21:13:31 +00:00
78baa5a400 chore(ci): upgrade golangci-lint-action to v6
Some checks failed
CI / Test (push) Successful in 34s
CI / Lint (push) Failing after 37s
CI / Build (push) Successful in 21s
Update the golangci-lint action in the CI workflow to version 6 and specify lint version v2.1.6 for improved compatibility and features.
2026-03-02 21:10:46 +00:00
90d7b3359d chore(ci): pin golangci-lint version to v2.1.6
Some checks failed
CI / Test (push) Successful in 33s
CI / Lint (push) Failing after 19s
CI / Build (push) Successful in 21s
2026-03-02 21:06:02 +00:00
99ef10b16b refactor(cmd): extract run funcs and add injectable deps for testability
Some checks failed
CI / Test (push) Successful in 34s
CI / Lint (push) Failing after 19s
CI / Build (push) Successful in 20s
- Introduce newGrokClient and gitRun vars to allow mocking in tests.
- Refactor commit, commitmsg, history, prdescribe, and review cmds into separate run funcs.
- Update docs, lint, and review to use newGrokClient.
- Add comprehensive unit tests in run_test.go covering happy paths, errors, and edge cases.
- Expand grok client tests with SSE server mocks for Stream* methods.
2026-03-02 20:47:16 +00:00
f763976a27 docs(client): add documentation comments to Client struct and methods
Some checks failed
CI / Test (push) Failing after 24s
CI / Lint (push) Has been skipped
CI / Build (push) Has been skipped
Release / Create Release (push) Successful in 36s
Add detailed GoDoc-style comments for the Client struct, NewClient function,
and various streaming methods to improve code readability and documentation.
Also include a comment for CleanCodeResponse and minor formatting adjustments.
2026-03-02 20:20:18 +00:00
0aa806be70 feat(cmd): add AI documentation generation and command tests
Some checks failed
CI / Test (push) Failing after 25s
CI / Lint (push) Has been skipped
CI / Build (push) Has been skipped
- Implemented `grokkit docs` command for generating language-specific documentation comments (godoc, PEP 257, Doxygen, etc.) with previews, backups, and auto-apply option
- Extracted message builder functions for commit, history, pr-describe, and review commands
- Added comprehensive unit tests for all command message builders (commit_test.go, docs_test.go, history_test.go, lint_test.go, prdescribe_test.go, review_test.go)
- Enforced 70% test coverage threshold in CI workflow
- Added .golangci.yml configuration with linters like govet, errcheck, staticcheck
- Updated Makefile to include -race in tests and add help target
- Updated README.md with new docs command details, workflows, and quality features
- Added .claude/ to .gitignore
- Configured default model for docs command in config.go
2026-03-02 20:13:50 +00:00
6e3a52728e chore(todo): complete feature suggestions TODO and queue individual tasks
All checks were successful
CI / Test (push) Successful in 30s
CI / Lint (push) Successful in 26s
CI / Build (push) Successful in 20s
- Update CI workflow runner from ubuntu-latest to ubuntu-gitea for auto-complete-todo.
- Move 3-new-feature-suggestions.md to completed/.
- Create queued TODOs for testgen, changelog, and profile features.
2026-03-02 19:33:34 +00:00
d0a4b8922d chore(ci): add auto-complete TODO workflow
All checks were successful
CI / Test (push) Successful in 33s
CI / Lint (push) Successful in 26s
CI / Build (push) Successful in 20s
Introduce Gitea Actions workflow to automatically move TODO files from queued to completed on PR events for feature branches.
Update README with setup instructions and benefits.
2026-03-02 19:20:11 +00:00
742edd7742 docs(readme): add TODO workflow section
All checks were successful
CI / Test (push) Successful in 32s
CI / Lint (push) Successful in 24s
CI / Build (push) Successful in 20s
Add documentation for the TODO workflow policy and process, including branching, PRs, and post-merge steps.
2026-03-02 19:18:20 +00:00
200b2f9aaf refactor(todo): organize TODO items into queued and completed directories
All checks were successful
CI / Test (push) Successful in 30s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 21s
- Update README.md to reflect new todo/ directory structure with queued/ for pending items and completed/ for historical records.
- Rename docs/TODO.md to todo/completed/MODEL_ENFORCEMENT.md.
- Add example todo/queued/TODO_ITEM.md with initial TODO steps.
2026-03-02 19:03:27 +00:00
a9127deedd docs(README): update version info, installation details, and project structure
All checks were successful
CI / Test (push) Successful in 31s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 19s
- Update Go version to 1.24.2 in badge and requirements
- Change repository URL to repos.gmgauthier.com
- Update example VERSION to 0.1.3
- Revise model alias for "fast"
- Add testing and linting instructions in Development section
- Expand directory structure with new internal packages and files
2026-03-02 18:56:20 +00:00
68df041a09 test(version): add tests for version information
All checks were successful
CI / Test (push) Successful in 32s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 20s
Add unit tests to verify that Version is set and note that Commit and BuildDate may be empty in development builds.

Update .gitignore to ignore the .junie/ directory.
2026-03-02 18:41:27 +00:00
Gregory Gauthier
24be047322 feat(config): add per-command model defaults
All checks were successful
CI / Test (push) Successful in 30s
CI / Lint (push) Successful in 25s
CI / Build (push) Successful in 19s
Introduce support for per-command model defaults in config.toml, overriding global default if set. Update GetModel to accept command name and prioritize: flag > command default > global default. Add example config file and adjust all commands to pass their name. Update tests accordingly.
2026-03-02 16:56:56 +00:00
Gregory Gauthier
06917f93d8 docs(todo): add TODO.md with implementation notes for per-command model enforcement
All checks were successful
CI / Test (push) Successful in 35s
CI / Lint (push) Successful in 26s
CI / Build (push) Successful in 20s
Introduces a new TODO.md file outlining steps to enforce specific AI models
for commands like lint, edit, and agent. Includes updates to config.go,
config.toml, and command files for consistent model defaults, optimizing
performance and user experience. Also suggests additional features like
prompt tweaks and auto-fix flags.
2026-03-02 16:31:59 +00:00
30b07df5a4 chore(ci): remove raw binaries from build after packaging
All checks were successful
CI / Test (push) Successful in 31s
CI / Lint (push) Successful in 27s
CI / Build (push) Successful in 20s
Release / Create Release (push) Successful in 35s
Add a cleanup step in the release workflow to delete raw binary files for each platform,
retaining only the tar.gz archives, checksums.txt, and install script.
2026-03-02 00:19:10 +00:00
3f293d1c4e chore(build): add version embedding to Makefile
All checks were successful
CI / Test (push) Successful in 33s
CI / Lint (push) Successful in 29s
CI / Build (push) Successful in 20s
Release / Create Release (push) Successful in 36s
Embed version, commit hash, and build date into the Go binary using ldflags.
This provides better traceability for development builds.
2026-03-02 00:10:39 +00:00
9278c2c718 fix(build): use consistent dashed naming for release assets
All checks were successful
CI / Test (push) Successful in 25s
CI / Lint (push) Successful in 19s
CI / Build (push) Successful in 13s
Release / Create Release (push) Successful in 1m57s
- Move `-trimpath` flag before `-ldflags` in go build command for correct ordering.
- Update asset filename in install script from underscores to dashes for consistency.
2026-03-01 23:33:51 +00:00
b8482b6fb0 feat(release): add automated release workflow and install script
Some checks failed
CI / Test (push) Successful in 26s
CI / Lint (push) Successful in 20s
CI / Build (push) Successful in 14s
Release / Create Release (push) Failing after 10s
- Embed version info in binaries via ldflags
- Create multi-platform builds, archives, and checksums
- Add Gitea release creation and asset upload in CI
- Introduce GoReleaser config for standardized builds
- Add version command and install script for easy deployment
- Update README with pre-built installation instructions
2026-03-01 23:25:31 +00:00
b8906e44c1 ci: replace codecov upload with coverage summary display
All checks were successful
CI / Test (push) Successful in 25s
CI / Lint (push) Successful in 19s
CI / Build (push) Successful in 15s
Remove the Codecov action for uploading coverage reports and instead add a step to display a summary of test coverage in the CI output.
2026-03-01 14:35:27 +00:00
db92750d12 trigger build
All checks were successful
CI / Test (push) Successful in 28s
CI / Lint (push) Successful in 19s
CI / Build (push) Successful in 36s
2026-03-01 14:26:47 +00:00
18ac7a9f9a chore(ci): replace artifact upload with binary verification
Remove the upload-artifact step in the CI workflow and add verification
steps to run the binary with --help and list its details.
2026-03-01 14:25:52 +00:00
e0a0144d77 build(makefile): add lint target using golangci-lint
Some checks failed
CI / Test (push) Successful in 28s
CI / Lint (push) Successful in 19s
CI / Build (push) Failing after 31s
Introduces a new `lint` Makefile target that checks for golangci-lint installation,
runs the linter to match CI pipeline, and updates the help message accordingly.
2026-03-01 14:21:36 +00:00
cdcbd245d7 fix(cmd): add error handling for user input in edit and lint commands
Some checks failed
CI / Test (push) Successful in 27s
CI / Lint (push) Successful in 18s
CI / Build (push) Failing after 33s
- Handle errors from fmt.Scanln in cmd/edit.go and cmd/lint.go to prevent crashes on input failures, providing user feedback and preserving backups.
- Update .gitea/workflows/release.yml to use 'ubuntu-gitea' runner for CI consistency.
2026-03-01 14:14:55 +00:00
ec5c43163b refactor(cmd): improve error handling in commands and tests
Some checks failed
CI / Test (push) Successful in 26s
CI / Lint (push) Failing after 14s
CI / Build (push) Failing after 31s
- Add error checking for filepath.Walk and fmt.Scanln in agent.go
- Ignore MkdirAll error in chat.go, add checks in chat_test.go
- Add Scanln error handling in commit.go
- Capture and exit on completion generation errors in completion.go
- Add WriteFile error checks in edit_test.go
2026-03-01 14:10:24 +00:00
47e7b51d1e ci(workflow): add XAI_API_KEY env to tests and switch lint/build to ubuntu-gitea runner
Some checks failed
CI / Test (push) Successful in 1m3s
CI / Lint (push) Failing after 39s
CI / Build (push) Failing after 33s
- Inject XAI_API_KEY from secrets for test execution.
- Update lint and build jobs to run on ubuntu-gitea instead of ubuntu-latest.
2026-03-01 14:01:13 +00:00
e7eb17c564 chore(ci): change runner to ubuntu-gitea
Some checks failed
CI / Test (push) Failing after 54s
CI / Lint (push) Failing after 5s
CI / Build (push) Failing after 4s
Update the CI workflow to use the ubuntu-gitea runner instead of ubuntu-latest.
2026-03-01 13:40:22 +00:00
4f6e0df698 chore(license): add Unlicense file
Some checks failed
CI / Test (push) Failing after 1m22s
CI / Lint (push) Failing after 24s
CI / Build (push) Failing after 5s
Release the software into the public domain using the Unlicense.
2026-03-01 13:29:14 +00:00
9f1309ba1a feat(lint): add lint command with AI-powered fixes
Introduce new `grokkit lint` command for automatic language detection,
linting, and AI-suggested fixes. Supports 9 languages including Go, Python,
JavaScript, TypeScript, Rust, Ruby, Java, C/C++, and Shell.

- Add cmd/lint.go for command implementation
- Create internal/linter package with detection and execution logic
- Update README.md with usage examples and workflows
- Enhance docs/ARCHITECTURE.md and docs/TROUBLESHOOTING.md
- Add comprehensive tests for linter functionality
2026-03-01 13:21:44 +00:00
cbd779c882 docs: enhance README with badges, TOC, and detailed sections
Add comprehensive documentation files:
- ARCHITECTURE.md: System design overview
- CONFIGURATION.md: Advanced config guide
- TROUBLESHOOTING.md: Common issues and solutions

Update README with:
- Badges for coverage, Go version, license
- Expanded commands, workflows, features sections
- Improved quick start and logging examples
2026-03-01 12:57:08 +00:00