grokkit/todo/completed/3-new-feature-suggestions.md
Greg Gauthier 6e3a52728e
All checks were successful
CI / Test (push) Successful in 30s
CI / Lint (push) Successful in 26s
CI / Build (push) Successful in 20s
chore(todo): complete feature suggestions TODO and queue individual tasks
- 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

60 lines
2.0 KiB
Markdown

# 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/ast` or prompt with code snippets.
- Prompt Grok: "Generate table-driven tests for this Go code."
- Output `*_test.go`, create `.bak`, preview/apply like `edit`.
- 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 `pprof` or text), prompt Grok: "Optimize these hotspots."
- Suggest edits via `agent` or `edit --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).