carson 2.13.2 → 2.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/copilot-instructions.md +1 -1
- data/API.md +1 -1
- data/MANUAL.md +5 -6
- data/README.md +22 -35
- data/RELEASE.md +19 -0
- data/VERSION +1 -1
- data/lib/carson/config.rb +1 -1
- data/templates/.github/AGENTS.md +1 -1
- data/templates/.github/CLAUDE.md +1 -1
- data/templates/.github/carson.md +45 -0
- data/templates/.github/copilot-instructions.md +1 -1
- metadata +2 -2
- data/templates/.github/carson-instructions.md +0 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 17b8bd4f2f9f3b9d1cc1d637accc607cfb3f7a49e98cc4a998cb8b797a82bc50
|
|
4
|
+
data.tar.gz: 3247d5bac41cbd0da539a45210521c66436b2ee3d2da8b6e28ee8f6a6c694955
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e018a857a0af89a3828355f0af131b4bf3fee40412d6c1e719c20493f9c6daf91f2da595d9b0b611f0df787a25e6d65997456668160615ca4b9c6419ffb89ee7
|
|
7
|
+
data.tar.gz: f7db01059c1dfb0b8be6be61c34859c157ac7283df40f010120f57bcdc1ad95b3bbdaf2a6596329be260be1dfcb818d2b177ded70e92d637294441fe70bc0f69
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Read `.github/
|
|
1
|
+
Read `.github/AGENTS.md` for repository governance rules enforced by Carson.
|
data/API.md
CHANGED
|
@@ -73,7 +73,7 @@ Blocked Carson artefacts in host repositories:
|
|
|
73
73
|
- `.tools/carson/*`
|
|
74
74
|
|
|
75
75
|
Allowed Carson-managed persistence in host repositories:
|
|
76
|
-
- `.github/carson
|
|
76
|
+
- `.github/carson.md` — governance baseline (source of truth)
|
|
77
77
|
- `.github/copilot-instructions.md` — agent discovery pointer for Copilot
|
|
78
78
|
- `.github/CLAUDE.md` — agent discovery pointer for Claude Code
|
|
79
79
|
- `.github/AGENTS.md` — agent discovery pointer for Codex
|
data/MANUAL.md
CHANGED
|
@@ -8,7 +8,7 @@ For the mental model and command overview, see `README.md`. For formal interface
|
|
|
8
8
|
Prerequisites: Ruby `>= 3.4`, `gem` and `git` in `PATH`. `gh` (GitHub CLI) recommended for full review governance.
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
gem install
|
|
11
|
+
gem install carson
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
If `carson` is not found after installation:
|
|
@@ -202,7 +202,7 @@ These define what Carson *is*. They are not configurable.
|
|
|
202
202
|
- **Outsider boundary** — Carson never places its own artefacts inside a governed repository.
|
|
203
203
|
- **Centralised lint** — one policy source distributed into each repo's `.github/linters/`, zero per-repo drift. MegaLinter enforces it in CI.
|
|
204
204
|
- **Active review** — undisposed reviewer findings block merge; feedback must be acknowledged.
|
|
205
|
-
- **Self-diagnosing output** — every
|
|
205
|
+
- **Self-diagnosing output** — every warning and error names what went wrong, why, and what to do next.
|
|
206
206
|
- **Transparent governance** — Carson prepares everything for merge but never makes decisions without telling you.
|
|
207
207
|
|
|
208
208
|
### Configurable defaults
|
|
@@ -299,10 +299,9 @@ Carson writes managed files that help interactive agents (Claude Code, Codex, Co
|
|
|
299
299
|
|
|
300
300
|
**How it works:**
|
|
301
301
|
|
|
302
|
-
- `.github/
|
|
303
|
-
- `.github/CLAUDE.md` — read by Claude Code at session start. Points to `
|
|
304
|
-
- `.github/
|
|
305
|
-
- `.github/copilot-instructions.md` — read by GitHub Copilot. Points to `carson-instructions.md`.
|
|
302
|
+
- `.github/AGENTS.md` — full governance baseline; read by Codex and other agents. Points to `carson.md`.
|
|
303
|
+
- `.github/CLAUDE.md` — read by Claude Code at session start. Points to `AGENTS.md`.
|
|
304
|
+
- `.github/copilot-instructions.md` — read by GitHub Copilot. Points to `AGENTS.md`.
|
|
306
305
|
|
|
307
306
|
Each agent reads its own expected filename and follows the reference to the shared baseline. One file to maintain, zero drift across agents.
|
|
308
307
|
|
data/README.md
CHANGED
|
@@ -21,24 +21,11 @@ Carson is an autonomous governance runtime that lives on your workstation and in
|
|
|
21
21
|
**Portfolio-level autonomy** — `carson govern` is a triage loop that scans your registered repositories, classifies every open PR, and acts: merge what's ready, dispatch coding agents (Codex or Claude) to fix what's failing, and escalate what needs human judgement. One command, all your projects, unmanned.
|
|
22
22
|
|
|
23
23
|
```
|
|
24
|
-
|
|
25
|
-
│
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
│ ~/.carson/cache/ Reports │
|
|
30
|
-
│ ~/.carson/govern/ Dispatch state │
|
|
31
|
-
│ │
|
|
32
|
-
│ carson govern ──► for each repo: │
|
|
33
|
-
│ 1. List open PRs (gh) │
|
|
34
|
-
│ 2. Classify: CI / review / audit status │
|
|
35
|
-
│ 3. Act: merge | dispatch agent | escalate │
|
|
36
|
-
│ 4. Housekeep: sync + prune │
|
|
37
|
-
│ │
|
|
38
|
-
│ Governed repos: repo-A/ repo-B/ repo-C/ │
|
|
39
|
-
│ .github/* templates (committed) │
|
|
40
|
-
│ core.hooksPath → ~/.carson/hooks │
|
|
41
|
-
└──────────────────────────────────────────────┘
|
|
24
|
+
~/.carson/ ← Carson lives here, never inside your repos
|
|
25
|
+
│
|
|
26
|
+
├─ hooks ──────────────► commit gates (every governed repo)
|
|
27
|
+
├─ lint configs ───────► .github/linters/ (MegaLinter auto-discovers)
|
|
28
|
+
└─ govern ─────────────► PR triage → merge | dispatch agent | escalate
|
|
42
29
|
```
|
|
43
30
|
|
|
44
31
|
This separation is Carson's defining trait — the **outsider boundary**: no Carson scripts, config files, or governance payloads are ever placed inside a governed repository.
|
|
@@ -60,25 +47,17 @@ Carson is opinionated about governance. These are non-negotiable principles, not
|
|
|
60
47
|
- **Outsider boundary** — Carson lives outside your repo, never inside. No Carson-owned artefacts in your repository. Offboarding leaves no trace.
|
|
61
48
|
- **Centralised lint** — lint policy distributed from a central source into each repo's `.github/linters/`. One source of truth, zero drift. MegaLinter enforces it in CI.
|
|
62
49
|
- **Active review** — undisposed reviewer findings block merge. Feedback must be acknowledged, not buried.
|
|
63
|
-
- **Self-diagnosing output** — every
|
|
50
|
+
- **Self-diagnosing output** — every warning and error names what went wrong, why, and what to do next. If you have to read source code to understand a message, that message is a bug.
|
|
64
51
|
- **Transparent governance** — Carson prepares everything for merge but never oversteps. It does not make decisions for you without telling you.
|
|
65
52
|
|
|
66
53
|
Everything else bends to your preference. Which branch is main, how PRs are merged, which repositories to govern, which coding agent to dispatch, where your lint policy lives — Carson asks during setup and remembers. Sensible defaults are provided; you only change what matters to you. See `MANUAL.md` for the full list.
|
|
67
54
|
|
|
68
55
|
## Quickstart
|
|
69
56
|
|
|
70
|
-
Prerequisites: Ruby `>= 3.4`, `git`, and `gem` in your PATH.
|
|
71
|
-
`gh` (GitHub CLI) is recommended for full review governance features.
|
|
57
|
+
Prerequisites: Ruby `>= 3.4`, `git`, and `gem` in your PATH. `gh` (GitHub CLI) is recommended for full review governance features.
|
|
72
58
|
|
|
73
59
|
```bash
|
|
74
|
-
gem install
|
|
75
|
-
carson version
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Prepare your lint policy.** A policy source is any directory (or git URL) containing your lint configuration files (`.rubocop.yml`, `biome.json`, `ruff.toml`, etc.). Carson copies these into the governed repo's `.github/linters/` where MegaLinter auto-discovers them:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
carson lint policy --source /path/to/your-policy-repo
|
|
60
|
+
gem install carson
|
|
82
61
|
```
|
|
83
62
|
|
|
84
63
|
**Onboard a repository:**
|
|
@@ -87,6 +66,8 @@ carson lint policy --source /path/to/your-policy-repo
|
|
|
87
66
|
carson onboard /path/to/your-repo
|
|
88
67
|
```
|
|
89
68
|
|
|
69
|
+
On first run, Carson walks you through setup — remote, main branch, workflow style, merge method — then installs hooks, syncs templates, and runs an initial audit.
|
|
70
|
+
|
|
90
71
|
After `carson onboard`, your repository has:
|
|
91
72
|
- Git hooks that run `carson audit` on every commit.
|
|
92
73
|
- Managed `.github/*` templates synchronised from Carson.
|
|
@@ -94,10 +75,20 @@ After `carson onboard`, your repository has:
|
|
|
94
75
|
|
|
95
76
|
Commit the generated `.github/*` changes, and the repository is governed.
|
|
96
77
|
|
|
97
|
-
**
|
|
78
|
+
**Set up lint policy** (optional). If you have a central directory or repository of lint configs, point Carson at it — configs are copied into `.github/linters/` where MegaLinter auto-discovers them:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# local directory
|
|
82
|
+
carson lint policy --source /path/to/your-policy-dir
|
|
83
|
+
|
|
84
|
+
# remote repository
|
|
85
|
+
carson lint policy --source https://github.com/you/lint-policy.git
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Govern your portfolio.** Once repositories are onboarded, `carson govern` is your recurring command. Run it whenever you want Carson to triage open PRs, enforce review policy, dispatch coding agents, and housekeep across all governed repos:
|
|
98
89
|
|
|
99
90
|
```bash
|
|
100
|
-
carson govern --dry-run #
|
|
91
|
+
carson govern --dry-run # preview what Carson would do, change nothing
|
|
101
92
|
carson govern # triage PRs, merge ready ones, dispatch agents, housekeep
|
|
102
93
|
carson govern --loop 300 # run continuously, cycling every 5 minutes
|
|
103
94
|
```
|
|
@@ -106,10 +97,6 @@ carson govern --loop 300 # run continuously, cycling every 5 minutes
|
|
|
106
97
|
|
|
107
98
|
- **MANUAL.md** — installation, first-time setup, CI configuration, daily operations, full command reference, troubleshooting.
|
|
108
99
|
- **API.md** — formal interface contract: commands, exit codes, configuration schema.
|
|
109
|
-
- **RELEASE.md** — version history and upgrade actions.
|
|
110
|
-
- **docs/define.md** — product definition and scope.
|
|
111
|
-
- **docs/design.md** — experience and brand design.
|
|
112
|
-
- **docs/develop.md** — contributor guide: architecture, development workflow.
|
|
113
100
|
|
|
114
101
|
## Support
|
|
115
102
|
|
data/RELEASE.md
CHANGED
|
@@ -5,6 +5,25 @@ Release-note scope rule:
|
|
|
5
5
|
- `RELEASE.md` records only version deltas, breaking changes, and migration actions.
|
|
6
6
|
- Operational usage guides live in `MANUAL.md` and `API.md`.
|
|
7
7
|
|
|
8
|
+
## 2.13.3 — Rename carson-instructions.md to carson.md
|
|
9
|
+
|
|
10
|
+
### What changed
|
|
11
|
+
|
|
12
|
+
- Renamed `.github/carson-instructions.md` → `.github/carson.md` in both the template set and the Carson repo itself. Shorter name, consistent with Carson's naming conventions.
|
|
13
|
+
- Enriched `carson.md` content: added Commands section (before committing, before merge, housekeeping), exit codes table, and clearer headings. Governance rules are unchanged.
|
|
14
|
+
- Updated agent pointer files: `CLAUDE.md` and `copilot-instructions.md` now point to `AGENTS.md`; `AGENTS.md` points to `carson.md`. One extra level of indirection, zero new files to maintain.
|
|
15
|
+
|
|
16
|
+
### Migration
|
|
17
|
+
|
|
18
|
+
In each governed repository, run:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git rm .github/carson-instructions.md
|
|
22
|
+
carson template apply
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`carson template apply` writes the new `carson.md` and updates the pointer files. The old `carson-instructions.md` must be removed manually — Carson will not delete it automatically.
|
|
26
|
+
|
|
8
27
|
## 2.13.2 — Docs Refresh
|
|
9
28
|
|
|
10
29
|
### What changed
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.13.
|
|
1
|
+
2.13.3
|
data/lib/carson/config.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Carson
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"template" => {
|
|
51
|
-
"managed_files" => [ ".github/carson
|
|
51
|
+
"managed_files" => [ ".github/carson.md", ".github/copilot-instructions.md", ".github/CLAUDE.md", ".github/AGENTS.md", ".github/pull_request_template.md", ".github/workflows/carson-lint.yml" ]
|
|
52
52
|
},
|
|
53
53
|
"lint" => {
|
|
54
54
|
"policy_source" => "wanghailei/lint.git"
|
data/templates/.github/AGENTS.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Read `.github/carson
|
|
1
|
+
Read `.github/carson.md` for repository governance rules enforced by Carson.
|
data/templates/.github/CLAUDE.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Read `.github/
|
|
1
|
+
Read `.github/AGENTS.md` for repository governance rules enforced by Carson.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Carson Governance
|
|
2
|
+
|
|
3
|
+
This repository is governed by [Carson](https://github.com/wanghailei/carson), an autonomous governance runtime. Carson lives on the maintainer's workstation, not inside this repository.
|
|
4
|
+
|
|
5
|
+
## What Carson Does Not Do
|
|
6
|
+
|
|
7
|
+
Carson has no `commit`, `push`, or `pr` commands. Use `git` and `gh` for those. Carson audits and governs; you execute.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
**Before committing:**
|
|
12
|
+
```bash
|
|
13
|
+
carson audit # full governance check — run before every commit
|
|
14
|
+
carson template check # detect drift in .github/* managed files
|
|
15
|
+
carson template apply # fix drift if detected
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Before recommending merge:**
|
|
19
|
+
```bash
|
|
20
|
+
carson review gate # block until actionable review findings are resolved
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Branch housekeeping:**
|
|
24
|
+
```bash
|
|
25
|
+
carson sync # fast-forward local main from remote
|
|
26
|
+
carson prune # remove stale branches (safer than git branch -d on squash repos)
|
|
27
|
+
carson housekeep # sync + prune together
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Exit Codes
|
|
31
|
+
|
|
32
|
+
- `0` — success
|
|
33
|
+
- `1` — runtime or configuration error
|
|
34
|
+
- `2` — policy blocked (hard stop; treat as expected failure in CI)
|
|
35
|
+
|
|
36
|
+
## Governance Rules
|
|
37
|
+
|
|
38
|
+
- Before commit and before push, run `carson audit`.
|
|
39
|
+
- At session start and again immediately before merge recommendation, run `gh pr list --state open --limit 50` and re-confirm active PR priorities.
|
|
40
|
+
- Before merge recommendation, run `carson review gate`; it enforces warm-up wait, unresolved-thread convergence, and `Disposition:` acknowledgements for actionable top-level findings.
|
|
41
|
+
- Actionable findings are unresolved review threads, any non-author `CHANGES_REQUESTED` review, or non-author comments/reviews with risk keywords (`bug`, `security`, `incorrect`, `block`, `fail`, `regression`).
|
|
42
|
+
- `Disposition:` responses must include one token (`accepted`, `rejected`, `deferred`) and the target review URL.
|
|
43
|
+
- Scheduled governance runs `carson review sweep` every 8 hours to track late actionable review activity.
|
|
44
|
+
- Do not treat green checks or `mergeStateStatus: CLEAN` as sufficient if unresolved review threads remain.
|
|
45
|
+
- Never suggest destructive operations on protected refs (`main`/`master`, local or remote).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Read `.github/
|
|
1
|
+
Read `.github/AGENTS.md` for repository governance rules enforced by Carson.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: carson
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.13.
|
|
4
|
+
version: 2.13.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hailei Wang
|
|
@@ -63,7 +63,7 @@ files:
|
|
|
63
63
|
- lib/carson/version.rb
|
|
64
64
|
- templates/.github/AGENTS.md
|
|
65
65
|
- templates/.github/CLAUDE.md
|
|
66
|
-
- templates/.github/carson
|
|
66
|
+
- templates/.github/carson.md
|
|
67
67
|
- templates/.github/copilot-instructions.md
|
|
68
68
|
- templates/.github/pull_request_template.md
|
|
69
69
|
- templates/.github/workflows/carson-lint.yml
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
## Shared Governance Baseline
|
|
2
|
-
|
|
3
|
-
- GitHub rulesets and required checks are merge authority.
|
|
4
|
-
- Carson runs as an outsider runtime for hook health, main sync, scope integrity, and gh visibility.
|
|
5
|
-
- Before commit and before push, run `carson audit`.
|
|
6
|
-
- At session start and again immediately before merge recommendation, run `gh pr list --state open --limit 50` and re-confirm active PR priorities.
|
|
7
|
-
- Before merge recommendation, run `carson review gate`; it enforces warm-up wait, unresolved-thread convergence, and `Disposition:` dispositions for actionable top-level findings.
|
|
8
|
-
- Actionable findings are unresolved review threads, any non-author `CHANGES_REQUESTED` review, or non-author comments/reviews with risk keywords (`bug`, `security`, `incorrect`, `block`, `fail`, `regression`).
|
|
9
|
-
- `Disposition:` dispositions must include one token (`accepted`, `rejected`, `deferred`) and the target review URL.
|
|
10
|
-
- Scheduled governance runs `carson review sweep` every 8 hours to track late actionable review activity on recent open/closed PRs.
|
|
11
|
-
- Do not treat green checks or `mergeStateStatus: CLEAN` as sufficient if unresolved review threads remain.
|
|
12
|
-
- Never suggest destructive operations on protected refs (`main`/`master`, local or remote).
|