Skip to content

Commit f6cbf96

Browse files
author
Test
committed
Extend Caveman guidelines to commit and review skills
Before this commit, even when Caveman Mode was active, specialized workflows like code reviews and git commits still used default formatting rules, creating verbose git message logs and multi-line comments that defeated the token compression objectives of Caveman Mode. We modified git-commit.md and code-review.md system skill instructions to add dedicated Caveman Mode overrides. When the mode is active, the model is instructed to generate conventional commits without filler words, keeping sentences extremely telegraphic, and to write code review comments as ultra-terse, single-line messages. An ideal solution would include a configuration parameter for formatting templates so that developers can customize review symbols and define custom message templates for commits.
1 parent 0e281e3 commit f6cbf96

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

cmd/gptcode/caveman.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var cavemanCompressCmd = &cobra.Command{
5454
Long: `Reads the target file and uses the LLM to rewrite its natural language prose
5555
in a highly compressed Caveman format. Saves a backup of the original file
5656
as <filename>.original.<ext>. Code blocks, URLs, and file paths are preserved byte-for-byte.`,
57-
Args: cobra.ExactArgs(1),
57+
Args: cobra.ExactArgs(1),
5858
RunE: func(cmd *cobra.Command, args []string) error {
5959
path := args[0]
6060
data, err := os.ReadFile(path)

internal/prompt/skills/code-review.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,15 @@ Rules for comments:
6969
# Code Review
7070

7171
[Comments numbered [1], [2], etc.]
72+
```
73+
74+
## Caveman Mode Override
75+
76+
If Caveman Mode is active (enabled in defaults/config):
77+
- Make comments telegraphic, dropping filler, hedging, and articles.
78+
- Keep comments to a single line where possible.
79+
- Format: `[line]: 🔴 bug/warning: [issue]. [fix].`
80+
- Example: `L42: 🔴 bug: user null. Add guard.`
81+
- Example: `L84: ⚠️ warning: load all records into memory. 10k+ records will OOM. Use pagination.`
82+
7283

internal/prompt/skills/git-commit.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,13 @@ git commit -m $'paragraph 1\n\nparagraph 2\n- bullet point\n- bullet point'
6565
```
6666

6767
Once you commit, let me know what the commit title was.
68+
69+
## Caveman Mode Override
70+
71+
If Caveman Mode is active (enabled in defaults/config):
72+
- Keep conventional structure but drop all filler, hedging, and articles.
73+
- Keep sentences telegraphic and extremely short. Focus strictly on "why" over "what".
74+
- Example P1: "Agent output verbose. Bloat context window. Increase cost."
75+
- Example P2: "Impl filter engine in filter.go. Compress test, install, git output. Add Tee cache for failed commands. Save savings statistics to disk."
76+
- Example P3: "Ideal: user configure custom filter rules via config file."
77+

0 commit comments

Comments
 (0)