Skip to content

Commit 71fefe9

Browse files
schurchleycciclaude
andcommitted
Update README build-prompt docs for auto-detection behavior
Update the Quick Start and build-prompt command reference to reflect that --org and --repos are optional and auto-detected from git remote. Add a behavior matrix documenting all four flag combinations. Update examples to show the auto-detect-first workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c88eeaf commit 71fefe9

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ To build and install from source:
5555
chunk auth login
5656

5757
# Generate a context prompt from your org's review patterns
58-
chunk build-prompt --org myorg
58+
# (auto-detects org and repo from git remote)
59+
chunk build-prompt
5960

60-
# Use the generated context with an AI coding agent
61-
# Place the output file in .chunk/context/ or pass it via --config
61+
# Or specify org and repos explicitly
62+
chunk build-prompt --org myorg --repos api,backend
6263
```
6364

6465
## Commands
@@ -72,20 +73,15 @@ Mines PR review comments from GitHub to generate a custom review prompt tuned to
7273
3. **Generate** — produces a markdown prompt file that agents can use for context
7374

7475
```bash
75-
chunk build-prompt --org <org> [options]
76+
chunk build-prompt [options]
7677
```
7778

78-
**Required:**
79-
80-
| Flag | Description |
81-
|------|-------------|
82-
| `--org <org>` | GitHub organization to analyze |
83-
8479
**Options:**
8580

8681
| Flag | Default | Description |
8782
|------|---------|-------------|
88-
| `--repos <repos>` | all repos in org | Comma-separated list of repo names to include |
83+
| `--org <org>` | auto-detected from git remote | GitHub organization to analyze |
84+
| `--repos <repos>` | current repo (auto-detected) | Comma-separated list of repo names to include |
8985
| `--top <n>` | `5` | Number of top reviewers to analyze |
9086
| `--since <date>` | 3 months ago | Start date in `YYYY-MM-DD` format |
9187
| `--output <path>` | `./review-prompt.md` | Output path for the generated prompt |
@@ -109,17 +105,29 @@ chunk build-prompt --org <org> [options]
109105
| `<output>-analysis.md` | Claude's analysis of reviewer patterns |
110106
| `<output>.md` | Final generated prompt |
111107

108+
**Behavior matrix:**
109+
110+
| Flags provided | Behavior |
111+
|---------------|----------|
112+
| (none) | Auto-detect org and current repo from git remote |
113+
| `--repos` only | Auto-detect org from git remote, analyze specified repos |
114+
| `--org` + `--repos` | Analyze the specified repos in the specified org |
115+
| `--org` only | Error (cannot enumerate all repos in an org) |
116+
112117
**Examples:**
113118

114119
```bash
115-
# Analyze all repos in an org
116-
chunk build-prompt --org myorg
120+
# Auto-detect org and repo from git remote
121+
chunk build-prompt
122+
123+
# Auto-detect org, analyze specific repos
124+
chunk build-prompt --repos api,backend,frontend
117125

118-
# Analyze specific repos, keeping the top 10 reviewers
126+
# Explicit org and repos, keeping the top 10 reviewers
119127
chunk build-prompt --org myorg --repos api,backend,frontend --top 10
120128

121129
# Limit data sent to Claude and save output to a specific path
122-
chunk build-prompt --org myorg --repos myrepo --max-comments 50 --output ./prompts/review.md
130+
chunk build-prompt --repos myrepo --max-comments 50 --output ./prompts/review.md
123131
```
124132

125133
Once generated, place the output file in `.chunk/context/` so AI coding agents (e.g., Claude Code) automatically pick it up as context.

0 commit comments

Comments
 (0)