- 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.
2.0 KiB
2.0 KiB
3 New AI-Enhanced Feature Suggestions for Grokkit
These suggestions build on existing CLI strengths (chat/edit/lint/agent) to further streamline Go development workflows.
1. grokkit testgen [path...]
Description: Generate comprehensive unit tests for Go files/packages using AI analysis of source code.
Benefits:
- Boost test coverage from current ~72% baseline automatically.
- Enforces modern table-driven tests with
t.Parallel()matching codebase style (e.g.,internal/version/version_test.go).
High-level implementation:
- Extract funcs/structs via
go/astor prompt with code snippets. - Prompt Grok: "Generate table-driven tests for this Go code."
- Output
*_test.go, create.bak, preview/apply likeedit. - Verify:
go test -v ./...post-generation.
CLI example:
grokkit testgen internal/grok/client.go
2. grokkit changelog
Description: AI-generated CHANGELOG.md updates from git history (commits/tags).
Benefits:
- Automates semantic release notes (feat/fix/docs/etc.).
- Integrates with TODO workflow for release PRs.
High-level implementation:
- Fetch
git log --pretty=format:%s%n%b --since=<last-tag>. - Prompt Grok: "Categorize into CHANGELOG sections."
- Append/update
CHANGELOG.md, preview/commit.
CLI example:
grokkit changelog --since=v0.1.3
grokkit changelog --commit # Stage + grokkit commit
3. grokkit profile
Description: Run Go benchmarks/pprof, get AI-suggested performance optimizations.
Benefits:
- Tune CLI hotspots (e.g., API streaming, git subprocesses).
- Proactive perf improvements without manual profiling.
High-level implementation:
go test -bench=. -cpuprofile=prof.out ./cmd.- Parse pprof data (stdlib
pprofor text), prompt Grok: "Optimize these hotspots." - Suggest edits via
agentoredit --preview.
CLI example:
grokkit profile ./cmd/agent.go
# Outputs: hotspots, suggestions, optional auto-fixes
These features align with minimal deps, modern Go, and existing patterns (Cobra cmds, grok client, git integration).