docs(readme): update command list and add new feature descriptions
- Reorganize commit commands into commit-msg and commit - Add sections for scaffold, recipe, and testgen - Update PR description base branch example - Add new features to quality section: AI unit test generation, file scaffolding, transactional recipes - Update directory structure with .grokkit/recipes and internal/recipe
This commit is contained in:
parent
383d28a91a
commit
bb3f968711
75
README.md
75
README.md
@ -40,7 +40,8 @@ grokkit version
|
||||
- [chat](#-grokkit-chat)
|
||||
- [query](#-grokkit-query)
|
||||
- [edit](#-grokkit-edit-file-instruction)
|
||||
- [commit / commitmsg](#-grokkit-commitmsg)
|
||||
- [commit-msg](#-grokkit-commit-msg)
|
||||
- [commit](#-grokkit-commit)
|
||||
- [review](#-grokkit-review)
|
||||
- [pr-describe](#-grokkit-pr-describe)
|
||||
- [history](#-grokkit-history)
|
||||
@ -48,6 +49,8 @@ grokkit version
|
||||
- [lint](#-grokkit-lint-file)
|
||||
- [docs](#-grokkit-docs-file)
|
||||
- [testgen](#-grokkit-testgen)
|
||||
- [scaffold](#-grokkit-scaffold-file-description)
|
||||
- [recipe](#-grokkit-recipe-run-recipe)
|
||||
- [agent](#-grokkit-agent)
|
||||
- [Configuration](#configuration)
|
||||
- [Workflows](#workflows)
|
||||
@ -114,13 +117,13 @@ grokkit edit utils.go "add detailed docstrings to all exported functions"
|
||||
- Requires confirmation before applying
|
||||
- Uses silent streaming (no console spam)
|
||||
|
||||
### 📝 `grokkit commitmsg`
|
||||
### 📝 `grokkit commit-msg`
|
||||
Generate conventional commit messages from staged changes.
|
||||
|
||||
```bash
|
||||
git add .
|
||||
grokkit commitmsg # Generate message only
|
||||
grokkit commitmsg -m grok-4 # Use specific model
|
||||
grokkit commit-msg # Generate message only
|
||||
grokkit commit-msg -m grok-4 # Use specific model
|
||||
```
|
||||
|
||||
Output format: `type(scope): subject\n\nbody`
|
||||
@ -158,9 +161,12 @@ Output includes:
|
||||
Generate comprehensive PR descriptions.
|
||||
|
||||
```bash
|
||||
# From current branch vs main
|
||||
# From current branch vs master
|
||||
grokkit pr-describe
|
||||
|
||||
# Compare against a specific base branch
|
||||
grokkit pr-describe --base main
|
||||
|
||||
# With specific model
|
||||
grokkit pr-describe -m grok-4
|
||||
```
|
||||
@ -231,27 +237,70 @@ grokkit docs app.py -m grok-4
|
||||
- Requires confirmation (unless `--auto-apply`)
|
||||
|
||||
### 🧪 `grokkit testgen PATHS...`
|
||||
|
||||
|
||||
**Description**: Generate comprehensive unit tests for Go/Python/C/C++ files using AI.
|
||||
|
||||
|
||||
**Benefits**:
|
||||
- Go: Table-driven `t.Parallel()` matching codebase.
|
||||
- Python: Pytest with `@parametrize`.
|
||||
- C: Check framework suites.
|
||||
- C++: Google Test `EXPECT_*`.
|
||||
- Boosts coverage; safe preview.
|
||||
|
||||
|
||||
**CLI examples**:
|
||||
```bash
|
||||
grokkit testgen internal/grok/client.go
|
||||
grokkit testgen app.py --yes
|
||||
grokkit testgen foo.c bar.cpp
|
||||
```
|
||||
|
||||
|
||||
**Safety features**:
|
||||
- Lang detection via `internal/linter`.
|
||||
- Unified diff preview.
|
||||
- Y/N (--yes auto).
|
||||
|
||||
### 🏗️ `grokkit scaffold FILE "DESCRIPTION"`
|
||||
|
||||
**Description**: Scaffold a new file with Grok using project context for style matching.
|
||||
|
||||
**CLI examples**:
|
||||
```bash
|
||||
# Basic usage
|
||||
grokkit scaffold internal/git/utils.go "git wrapper for listing tags"
|
||||
|
||||
# Scaffold with a basic test file
|
||||
grokkit scaffold app.py "Flask route for health checks" --with-tests
|
||||
|
||||
# Preview without writing
|
||||
grokkit scaffold main.go "simple CLI entrypoint" --dry-run
|
||||
```
|
||||
|
||||
**Features**:
|
||||
- Project context harvesting (siblings/style matching).
|
||||
- Optional test generation (`--with-tests`).
|
||||
- Safety checks (won't overwrite without `--force`).
|
||||
- Language detection and overrides (`--lang`).
|
||||
|
||||
### 👨🍳 `grokkit recipe run [name|path]`
|
||||
|
||||
**Description**: Execute transactional "recipes" for complex, multi-step AI workflows.
|
||||
|
||||
**CLI examples**:
|
||||
```bash
|
||||
# Run a project-local recipe
|
||||
grokkit recipe run result-refactor
|
||||
|
||||
# Pass parameters to the recipe
|
||||
grokkit recipe run result-refactor -p package_path=internal/git -p dry_run=false
|
||||
|
||||
# Run a specific recipe file
|
||||
grokkit recipe run ./my-custom-recipe.md
|
||||
```
|
||||
|
||||
**Recipe System**:
|
||||
- **Local Recipes**: Stored in `.grokkit/recipes/*.md`.
|
||||
- **Global Recipes**: Stored in `~/.local/share/grokkit/recipes/*.md`.
|
||||
- Recipes are markdown-based with YAML frontmatter for parameters and configuration.
|
||||
|
||||
### 🤖 `grokkit agent`
|
||||
Multi-file agent for complex refactoring (experimental).
|
||||
@ -523,6 +572,9 @@ grokkit review -v
|
||||
- ✅ **Git workflow integration** - Commit messages, reviews, PR descriptions
|
||||
- ✅ **Multi-language linting** - 9 languages supported with AI-powered fixes
|
||||
- ✅ **AI documentation generation** - 8 doc styles (godoc, PEP 257, Doxygen, JSDoc, rustdoc, YARD, Javadoc, shell)
|
||||
- ✅ **AI unit test generation** - Go (table-driven), Python (pytest), C (Check), C++ (GTest)
|
||||
- ✅ **AI file scaffolding** - Create new files with project-aware style matching
|
||||
- ✅ **Transactional Recipes** - Markdown-based multi-step AI workflows
|
||||
|
||||
### Quality & Testing
|
||||
- ✅ **Test coverage 68%+** - Comprehensive unit tests including all command message builders
|
||||
@ -594,9 +646,13 @@ grokkit/
|
||||
├── cmd/ # CLI commands (Cobra)
|
||||
│ ├── docs.go # grokkit docs — AI documentation generation
|
||||
│ ├── lint.go # grokkit lint — AI-powered linting
|
||||
│ ├── recipe.go # grokkit recipe — transactional recipe runner
|
||||
│ ├── scaffold.go # grokkit scaffold — project-aware file generation
|
||||
│ └── ... # chat, edit, commit, review, history, pr-describe, agent
|
||||
├── config/ # Viper configuration
|
||||
├── docs/ # Documentation
|
||||
├── .grokkit/ # Project-local Grokkit data
|
||||
│ └── recipes/ # Custom AI workflows (recipes)
|
||||
├── todo/ # TODO tracking: queued/ (pending) and completed/ (historical record)
|
||||
│ ├── queued/ # Pending TODO items
|
||||
│ └── completed/ # Completed TODO items with history
|
||||
@ -606,6 +662,7 @@ grokkit/
|
||||
│ ├── grok/ # xAI Grok API client
|
||||
│ ├── linter/ # Multi-language linting
|
||||
│ ├── logger/ # Structured slog logging
|
||||
│ ├── recipe/ # Recipe loading and execution engine
|
||||
│ └── version/ # Build/version info
|
||||
├── main.go # Application entrypoint
|
||||
├── go.mod # Dependencies
|
||||
|
||||
Loading…
Reference in New Issue
Block a user