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
67
README.md
67
README.md
@ -40,7 +40,8 @@ grokkit version
|
|||||||
- [chat](#-grokkit-chat)
|
- [chat](#-grokkit-chat)
|
||||||
- [query](#-grokkit-query)
|
- [query](#-grokkit-query)
|
||||||
- [edit](#-grokkit-edit-file-instruction)
|
- [edit](#-grokkit-edit-file-instruction)
|
||||||
- [commit / commitmsg](#-grokkit-commitmsg)
|
- [commit-msg](#-grokkit-commit-msg)
|
||||||
|
- [commit](#-grokkit-commit)
|
||||||
- [review](#-grokkit-review)
|
- [review](#-grokkit-review)
|
||||||
- [pr-describe](#-grokkit-pr-describe)
|
- [pr-describe](#-grokkit-pr-describe)
|
||||||
- [history](#-grokkit-history)
|
- [history](#-grokkit-history)
|
||||||
@ -48,6 +49,8 @@ grokkit version
|
|||||||
- [lint](#-grokkit-lint-file)
|
- [lint](#-grokkit-lint-file)
|
||||||
- [docs](#-grokkit-docs-file)
|
- [docs](#-grokkit-docs-file)
|
||||||
- [testgen](#-grokkit-testgen)
|
- [testgen](#-grokkit-testgen)
|
||||||
|
- [scaffold](#-grokkit-scaffold-file-description)
|
||||||
|
- [recipe](#-grokkit-recipe-run-recipe)
|
||||||
- [agent](#-grokkit-agent)
|
- [agent](#-grokkit-agent)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Workflows](#workflows)
|
- [Workflows](#workflows)
|
||||||
@ -114,13 +117,13 @@ grokkit edit utils.go "add detailed docstrings to all exported functions"
|
|||||||
- Requires confirmation before applying
|
- Requires confirmation before applying
|
||||||
- Uses silent streaming (no console spam)
|
- Uses silent streaming (no console spam)
|
||||||
|
|
||||||
### 📝 `grokkit commitmsg`
|
### 📝 `grokkit commit-msg`
|
||||||
Generate conventional commit messages from staged changes.
|
Generate conventional commit messages from staged changes.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git add .
|
git add .
|
||||||
grokkit commitmsg # Generate message only
|
grokkit commit-msg # Generate message only
|
||||||
grokkit commitmsg -m grok-4 # Use specific model
|
grokkit commit-msg -m grok-4 # Use specific model
|
||||||
```
|
```
|
||||||
|
|
||||||
Output format: `type(scope): subject\n\nbody`
|
Output format: `type(scope): subject\n\nbody`
|
||||||
@ -158,9 +161,12 @@ Output includes:
|
|||||||
Generate comprehensive PR descriptions.
|
Generate comprehensive PR descriptions.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# From current branch vs main
|
# From current branch vs master
|
||||||
grokkit pr-describe
|
grokkit pr-describe
|
||||||
|
|
||||||
|
# Compare against a specific base branch
|
||||||
|
grokkit pr-describe --base main
|
||||||
|
|
||||||
# With specific model
|
# With specific model
|
||||||
grokkit pr-describe -m grok-4
|
grokkit pr-describe -m grok-4
|
||||||
```
|
```
|
||||||
@ -253,6 +259,49 @@ grokkit testgen foo.c bar.cpp
|
|||||||
- Unified diff preview.
|
- Unified diff preview.
|
||||||
- Y/N (--yes auto).
|
- 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`
|
### 🤖 `grokkit agent`
|
||||||
Multi-file agent for complex refactoring (experimental).
|
Multi-file agent for complex refactoring (experimental).
|
||||||
|
|
||||||
@ -523,6 +572,9 @@ grokkit review -v
|
|||||||
- ✅ **Git workflow integration** - Commit messages, reviews, PR descriptions
|
- ✅ **Git workflow integration** - Commit messages, reviews, PR descriptions
|
||||||
- ✅ **Multi-language linting** - 9 languages supported with AI-powered fixes
|
- ✅ **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 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
|
### Quality & Testing
|
||||||
- ✅ **Test coverage 68%+** - Comprehensive unit tests including all command message builders
|
- ✅ **Test coverage 68%+** - Comprehensive unit tests including all command message builders
|
||||||
@ -594,9 +646,13 @@ grokkit/
|
|||||||
├── cmd/ # CLI commands (Cobra)
|
├── cmd/ # CLI commands (Cobra)
|
||||||
│ ├── docs.go # grokkit docs — AI documentation generation
|
│ ├── docs.go # grokkit docs — AI documentation generation
|
||||||
│ ├── lint.go # grokkit lint — AI-powered linting
|
│ ├── 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
|
│ └── ... # chat, edit, commit, review, history, pr-describe, agent
|
||||||
├── config/ # Viper configuration
|
├── config/ # Viper configuration
|
||||||
├── docs/ # Documentation
|
├── docs/ # Documentation
|
||||||
|
├── .grokkit/ # Project-local Grokkit data
|
||||||
|
│ └── recipes/ # Custom AI workflows (recipes)
|
||||||
├── todo/ # TODO tracking: queued/ (pending) and completed/ (historical record)
|
├── todo/ # TODO tracking: queued/ (pending) and completed/ (historical record)
|
||||||
│ ├── queued/ # Pending TODO items
|
│ ├── queued/ # Pending TODO items
|
||||||
│ └── completed/ # Completed TODO items with history
|
│ └── completed/ # Completed TODO items with history
|
||||||
@ -606,6 +662,7 @@ grokkit/
|
|||||||
│ ├── grok/ # xAI Grok API client
|
│ ├── grok/ # xAI Grok API client
|
||||||
│ ├── linter/ # Multi-language linting
|
│ ├── linter/ # Multi-language linting
|
||||||
│ ├── logger/ # Structured slog logging
|
│ ├── logger/ # Structured slog logging
|
||||||
|
│ ├── recipe/ # Recipe loading and execution engine
|
||||||
│ └── version/ # Build/version info
|
│ └── version/ # Build/version info
|
||||||
├── main.go # Application entrypoint
|
├── main.go # Application entrypoint
|
||||||
├── go.mod # Dependencies
|
├── go.mod # Dependencies
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user