Skip to content

Commit 6107697

Browse files
docs(lint): document policy and generated state split
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 242489d commit 6107697

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

guide/cli-reference.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,17 @@ Override with `ccg --config path/to/config.yaml`.
238238
| drift | Tag not updated after signature change |
239239

240240
Per-category `action: ignore` can be set in `.ccg.yaml`'s `rules`. In `--strict` mode, `action: ignore` rules are applied.
241+
242+
### Lint Policy vs Generated State
243+
244+
CCG now separates human-managed lint policy from generated lint state:
245+
246+
| Path | Owner | Purpose |
247+
|------|-------|---------|
248+
| `.ccg.yaml` | Human | Project policy: excludes, include paths, manual lint rules (`ignore`, etc.) |
249+
| `.ccg/lint-history.json` | Generated | Twice Rule consecutive-occurrence counters |
250+
| `.ccg/auto-rules.yaml` | Generated | Warn-only rules recorded by Twice Rule |
251+
252+
`ccg lint` no longer appends generated warn rules into `.ccg.yaml`. Repeated issues are recorded in `.ccg/auto-rules.yaml`, while `.ccg.yaml` remains the place for manual policy decisions.
253+
254+
If an older repository already has generated `auto: true` rules inside `.ccg.yaml`, run `ccg lint --migrate-auto-rules` once to move them into `.ccg/auto-rules.yaml`.

internal/cli/init.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ exclude:
2121
docs:
2222
out: docs
2323
24+
# lint policy lives in .ccg.yaml.
25+
# generated lint state such as Twice Rule history and auto warn rules lives under .ccg/.
26+
2427
parse:
2528
max_file_bytes: 0
2629
max_total_parsed_bytes: 0

0 commit comments

Comments
 (0)