@compozy/skeeper 0.1.1 → 0.2.0

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.
Files changed (2) hide show
  1. package/README.md +172 -211
  2. package/package.json +16 -16
package/README.md CHANGED
@@ -9,9 +9,6 @@
9
9
  <a href="https://pkg.go.dev/github.com/compozy/skeeper">
10
10
  <img src="https://pkg.go.dev/badge/github.com/compozy/skeeper.svg" alt="Go Reference">
11
11
  </a>
12
- <a href="https://goreportcard.com/report/github.com/compozy/skeeper">
13
- <img src="https://goreportcard.com/badge/github.com/compozy/skeeper" alt="Go Report Card">
14
- </a>
15
12
  <a href="LICENSE">
16
13
  <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT">
17
14
  </a>
@@ -21,341 +18,305 @@
21
18
  </p>
22
19
  </div>
23
20
 
24
- Specs and code want to live together. Spec files (`SPEC.md`, `docs/specs/*`, `.claude/plans/*`, ADRs, RFCs) belong next to the code they describe — but committing them to your main repo bloats every PR with documentation noise, and ignoring them loses history. `skeeper` runs a sidecar Git repository that mirrors matched spec files on every commit. You edit specs at their natural paths, your main PRs stay focused on code, and a separate Git history keeps full `git log`, `git blame`, and branch-aware versioning of every spec change. One `skeeper init` and the post-commit hook does the rest — without ever blocking your `git commit`.
25
-
26
- ## ✨ Highlights
21
+ Spec docs drift from code, or they bloat every PR. Skeeper picks neither.
27
22
 
28
- - **One sidecar repo, full Git history.** Specs version normally `git log`, `git blame`, branches, PRs without touching your main repo's diff.
29
- - **Shared sidecars without collisions.** Named namespaces isolate stored paths and pushed branches inside one sidecar remote.
30
- - **Edit specs where they belong.** Spec files stay next to the code they describe. `skeeper` mirrors them into `.skeeper/` for you.
31
- - **A post-commit hook that never breaks your commit.** 750 ms foreground budget per namespace; on failure, the sync queues locally and retries on the next manual `skeeper sync`.
32
- - **Branch-aware mirroring.** Sidecar branches track main-tree branches, so feature work and `main` stay isolated.
33
- - **Fresh-clone hydration.** `skeeper hydrate` restores matched specs into a new clone so teammates start with full context.
34
- - **Glob-based pattern matching.** Doublestar globs (`**/SPEC.md`, `docs/specs/**`, `.claude/plans/**`) — match specs the way you actually organize them.
35
- - **Shells out to `git` and `gh`.** Reuses your existing GitHub auth. Every operation is debuggable with the same Git commands you already know.
36
- - **Single static binary, zero runtime deps.** Linux, macOS, Windows on amd64/arm64. CGO disabled.
37
-
38
- ## 📦 Installation
23
+ It mirrors `SPEC.md`, ADRs, RFCs, and AI plan files into a sidecar Git repository and commits a tiny `skeeper.lock` to your main repo that pins every commit to exact sidecar commits. PR diffs stay focused on code, spec history stays auditable, and nothing silently drifts because the managed Git hooks fail the commit if the sidecar state cannot be proven.
39
24
 
40
- #### Homebrew
25
+ ## ✨ Highlights
41
26
 
42
- ```bash
43
- brew tap compozy/compozy
44
- brew install --cask skeeper
45
- ```
27
+ - **Lockfile-backed reliability.** `skeeper.lock` records sidecar URL, source branch, namespace branch, sidecar commit, per-namespace digest, file count, and byte count.
28
+ - **Strict managed hooks.** The managed `pre-commit` and `pre-merge-commit` hooks sync staged content, push the sidecar, write and stage `skeeper.lock`, and fail closed. The managed `pre-push` hook verifies the lock against the sidecar remote.
29
+ - **Specs stay local to their code.** Edit `SPEC.md`, `docs/specs/**`, `.claude/plans/**`, ADRs, RFCs, or custom globs where they naturally belong.
30
+ - **Shared sidecars without collisions.** Namespaces isolate stored paths and sidecar branches inside one sidecar remote.
31
+ - **Branch-aware history.** Namespace branches use `<namespace>/__branches__/<source-branch>`.
32
+ - **Fresh-clone hydration.** `skeeper hydrate` restores files from the locked sidecar commits, not a best-effort latest branch.
33
+ - **Agent-friendly commands.** `status`, `sync`, `verify`, `fsck`, `hooks check`, `repair status`, `pattern`, `adopt`, and `untrack` all support deterministic output where needed.
34
+ - **Skill for AI agents.** A bundled skill at [`.agents/skills/skeeper/SKILL.md`](.agents/skills/skeeper/SKILL.md) teaches coding agents the strict-sync workflow, namespaces, and recovery commands.
46
35
 
47
- #### NPM
36
+ ## 🎯 Who Is This For
48
37
 
49
- ```bash
50
- npm install -g @compozy/skeeper
51
- ```
38
+ - Teams using AI coding agents that produce `SPEC.md`, PRD, TechSpec, and plan markdown next to code.
39
+ - Engineering organizations running ADRs, RFCs, and design docs in-repo without making every PR a docs+code review.
40
+ - Solo developers who want full spec history (`git log`, `git blame`, branches, PRs) without polluting their main repository's diff.
52
41
 
53
- #### Go
42
+ ## 📦 Installation
54
43
 
55
44
  ```bash
56
45
  go install github.com/compozy/skeeper/cmd/skeeper@latest
57
46
  ```
58
47
 
59
- #### From Source
48
+ Other release channels are available through GitHub Releases, Homebrew, NPM, and the distroless Docker image.
60
49
 
61
- ```bash
62
- git clone git@github.com:compozy/skeeper.git
63
- cd skeeper && make verify && go build -o bin/skeeper ./cmd/skeeper
64
- ```
65
-
66
- #### Docker
67
-
68
- ```bash
69
- git clone git@github.com:compozy/skeeper.git
70
- cd skeeper && make docker-build # builds skeeper:dev (distroless, nonroot)
71
- docker run --rm -v "$PWD:/workspace" -w /workspace skeeper:dev status
72
- ```
73
-
74
- #### Prerequisites
50
+ Prerequisites:
75
51
 
76
52
  - `git` on `PATH`
77
- - `gh` (GitHub CLI) **only when `skeeper init` creates a new sidecar** — existing sidecars can be reused with `--sidecar`. Day-to-day commands need only `git`.
53
+ - `gh` only when `skeeper init` creates a new GitHub sidecar repo
78
54
 
79
55
  ## 🔄 How It Works
80
56
 
81
- Spec files live at their natural paths next to code. Your main repo's `.gitignore` lists the effective namespace patterns plus `.skeeper/`, so neither owned specs nor the sidecar clone ever appear in a main-repo diff.
82
-
83
- On every `git commit`, the managed post-commit hook runs `skeeper sync --hook` with a 750 ms foreground budget per namespace. `skeeper` matches files against namespace patterns, copies them into `.skeeper/`, commits with a reference to the main commit SHA, and pushes to the sidecar remote.
57
+ Spec files live in the main worktree but are ignored by the main repository through a managed `.gitignore` block. The sidecar repository stores mirrored files under `<namespace>/<path>` and pushes them to `<namespace>/__branches__/<source-branch>`.
84
58
 
85
- Each namespace stores files under `<namespace>/<path>` in the sidecar and pushes branch `<namespace>/__branches__/<source-branch>`. For example, namespace `skills` on source branch `main` stores `skills/review.md` as `skills/skills/review.md` and pushes sidecar branch `skills/__branches__/main`.
86
-
87
- If anything fails — network, auth, push rejection, timeout — `skeeper` writes a retry record to `.git/skeeper/queue.json` with the failing namespace when one is known, appends a one-line audit entry to `.git/skeeper/sync.log`, and exits 0 so your `git commit` always succeeds. Run `skeeper sync` later to drain the queue.
59
+ On commit, the managed `pre-commit` block runs last. On automatic merge commits, the managed `pre-merge-commit` block runs the same strict sync path because Git does not run `pre-commit` for merge commits. Both hooks build a plan from the staged index plus explicitly owned ignored/untracked spec paths, fetch and rebase sidecar branches, mirror content into `.skeeper/`, commit and push the sidecar, write `skeeper.lock`, and stage that lock before Git creates the main commit.
88
60
 
89
61
  ```mermaid
90
- flowchart LR
91
- A[Developer<br/>git commit] --> B[post-commit hook<br/>skeeper sync --hook]
92
- B --> C{Namespace sync within<br/>750 ms?}
93
- C -- yes --> D[Copy matched specs<br/>into .skeeper/]
94
- D --> E[git commit<br/>in sidecar]
95
- E --> F[git push<br/>to sidecar remote]
96
- C -- no / error --> G[Write namespace retry record<br/>.git/skeeper/queue.json]
97
- G --> H[Hook exits 0<br/>main commit succeeds]
98
- H -. later .-> I[skeeper sync<br/>drains queue]
99
- I --> D
62
+ flowchart TD
63
+ Start([👤 git commit]):::user --> UserHook[🪝 Existing user hook content]:::user
64
+ UserHook --> Block
65
+
66
+ subgraph Block [📦 Skeeper pre-commit block]
67
+ direction TB
68
+ S1[🧮 Reconcile staged specs<br/>+ ownership] --> S2[🔄 Fetch &amp; rebase<br/>sidecar branch]
69
+ S2 --> S3[🪞 Mirror namespace files<br/>into .skeeper/]
70
+ S3 --> S4[📤 Commit &amp; push sidecar]
71
+ S4 --> S5[🔒 Write &amp; stage<br/>skeeper.lock]
72
+ end
73
+
74
+ Block --> Commit[✅ Main commit proceeds]:::ok
75
+ Commit --> Push([🚀 git push]):::user
76
+ Push --> Verify[🔍 Skeeper pre-push verify]:::skeeper
77
+ Verify --> Done([🎉 Sidecar verified]):::ok
78
+
79
+ classDef user fill:#dbeafe,stroke:#1d4ed8,color:#0c1e3e
80
+ classDef skeeper fill:#fef3c7,stroke:#b45309,color:#3b2c00
81
+ classDef ok fill:#dcfce7,stroke:#15803d,color:#052e16
82
+ class S1,S2,S3,S4,S5 skeeper
100
83
  ```
101
84
 
85
+ If sync fails, the commit fails. This is intentional: a committed main change should not silently drift from the sidecar. The audited bypass is `SKEEPER_SKIP=1`; it records `.git/skeeper/bypass.json`, prints a warning, and `pre-push`, `status`, `fsck`, and `verify` continue to surface stale-lock diagnostics until `skeeper sync` repairs the state. `git commit --no-verify` is unsupported because Git skips all hook code and cannot record an audit trail.
86
+
102
87
  ## ⚙️ Configuration
103
88
 
104
- `skeeper init` writes `.skeeper.yml` at the repo root. Commit it — your teammates need it for `skeeper hydrate`.
89
+ `skeeper init` writes `.skeeper.yml` at the repository root. Commit it.
105
90
 
106
91
  ```yaml
107
- # Required: sidecar repository URL
108
92
  sidecar: git@github.com:user/myproject-specs.git
109
93
 
110
- # Required: namespaces route files into sidecar paths and branches
111
94
  namespaces:
112
- - name: skills
113
- patterns:
114
- - "skills/*.md"
115
-
116
- - name: myproject
95
+ - name: project
117
96
  patterns:
118
97
  - "**/SPEC.md"
119
98
  - "docs/specs/**"
120
99
  - ".claude/plans/**"
121
100
  - "**/*.spec.md"
122
101
  exclude:
123
- - "skills/*.md"
102
+ - "docs/specs/private/**"
124
103
 
125
- # Optional: install one-liner shown to teammates after `skeeper hydrate`
126
104
  bootstrap: brew tap compozy/compozy && brew install --cask skeeper
127
105
  ```
128
106
 
129
- Unknown keys are rejected — config errors fail loud, not silently.
107
+ Advanced operational defaults are optional:
130
108
 
131
- Every namespace needs a `name` and at least one `patterns` glob. `exclude` removes ownership from that namespace; if another namespace owns the excluded files, they stay tracked there. A file owned by more than one namespace is a configuration error because hidden precedence would make deletes unsafe.
109
+ ```yaml
110
+ settings:
111
+ guardrails:
112
+ max_files: 100
113
+ max_bytes: 10485760
114
+ hooks:
115
+ pre_push_timeout: 30s
116
+ allow_skip_env: SKEEPER_SKIP
132
117
 
133
- `skeeper init` writes one namespace by default. Add more namespaces by editing `.skeeper.yml`.
118
+ namespaces:
119
+ - name: generated
120
+ patterns:
121
+ - "generated/specs/**"
122
+ respect_gitignore: false
123
+ ```
134
124
 
135
- Local-only state lives under `.git/skeeper/` (already gitignored by Git's hooks directory):
125
+ Rules:
136
126
 
137
- | File | Purpose |
138
- | ------------ | ------------------------------------------------------ |
139
- | `queue.json` | Pending retries from failed hook runs |
140
- | `sync.log` | Append-only audit log of sync attempts and error codes |
127
+ - Unknown keys are rejected.
128
+ - Every namespace needs a `name` and at least one glob in `patterns`.
129
+ - `exclude` is the only public exclusion mechanism. Negative globs in `patterns` are rejected.
130
+ - Ownership must be unique. If two namespaces own the same file, the plan fails and asks for an `exclude` fix.
131
+ - `respect_gitignore: false` bypasses root `.gitignore`, nested `.gitignore`, `.git/info/exclude`, and global excludes for that namespace. `.git/` and `.skeeper/` are always excluded.
141
132
 
142
- ## 🚀 Quick Start
133
+ Local-only state lives under `.git/skeeper/`:
143
134
 
144
- ### 1. Install
135
+ | File | Purpose |
136
+ | ------------------ | ---------------------------------------------- |
137
+ | `transaction.json` | Current resumable mutating operation and phase |
138
+ | `bypass.json` | Latest audited strict-hook bypass |
145
139
 
146
- ```bash
147
- go install github.com/compozy/skeeper/cmd/skeeper@latest
148
- ```
149
-
150
- ### 2. Initialize the sidecar
151
-
152
- In a Git repo where you want to track specs:
140
+ ## 🚀 Quick Start
153
141
 
154
142
  ```bash
155
143
  skeeper init
156
144
  ```
157
145
 
158
- Interactive by default — opens a terminal form for the sidecar mode, repository name or URL, namespace, bootstrap command, and optional extra context globs. The interactive flow always includes the default spec globs (`**/SPEC.md`, `docs/specs/**`, `.claude/plans/**`, and `**/*.spec.md`) in the initial namespace; the extra context prompt starts empty and is only for additional folders or files you explicitly want in that namespace. Or pass values as flags:
146
+ Interactive init asks for the sidecar mode, repository name or URL, namespace, bootstrap command, and optional extra context globs. With flags:
159
147
 
160
148
  ```bash
161
149
  skeeper init \
162
150
  --sidecar-name myproject-specs \
163
151
  --visibility private \
164
- --namespace myproject \
152
+ --namespace project \
165
153
  --patterns "**/SPEC.md" \
166
- --patterns ".claude/plans/**"
154
+ --patterns "docs/specs/**"
167
155
  ```
168
156
 
169
- To reuse one shared sidecar remote across multiple source repos:
157
+ Use an existing shared sidecar:
170
158
 
171
159
  ```bash
172
160
  skeeper init \
173
161
  --sidecar git@github.com:user/shared-specs.git \
174
- --namespace myproject \
162
+ --namespace project \
175
163
  --patterns "**/SPEC.md"
176
164
  ```
177
165
 
178
- `skeeper init` creates the GitHub repo with `gh repo create` unless `--sidecar` points to an existing remote. It clones the sidecar into `.skeeper/`, writes `.skeeper.yml`, updates `.gitignore`, and installs the post-commit hook. New init defaults the namespace to the source repo name.
179
-
180
- When using flags, repeated `--patterns` values are the complete pattern set written to `.skeeper.yml`; they do not append to the interactive defaults.
181
-
182
- ### 3. Edit specs and commit normally
166
+ Then edit specs and commit normally:
183
167
 
184
168
  ```bash
185
169
  $EDITOR src/auth/SPEC.md
186
- git add .
170
+ git add src/auth/service.go src/auth/SPEC.md
187
171
  git commit -m "auth: design OAuth provider flow"
188
172
  ```
189
173
 
190
- The hook fires automatically. No extra step.
174
+ The `pre-commit` and `pre-merge-commit` hooks mirror specs and stage `skeeper.lock`. If a hook stages a new lock, review it and include it in the commit.
191
175
 
192
- ### 4. Inspect
176
+ ## 🛟 Failed Sync Recovery
177
+
178
+ Inspect local repair state:
193
179
 
194
180
  ```bash
195
- skeeper status # sidecar URL, branch mapping, last sync, pending count
196
- skeeper log src/auth/SPEC.md # sidecar Git history for one file
181
+ skeeper repair status
197
182
  ```
198
183
 
199
- ### 5. Onboard a teammate
184
+ Resume the recorded operation when network/auth/sidecar contention has been fixed:
200
185
 
201
186
  ```bash
202
- git clone git@github.com:user/myproject.git
203
- cd myproject
204
- skeeper hydrate
187
+ skeeper repair resume
205
188
  ```
206
189
 
207
- `hydrate` clones the sidecar into `.skeeper/`, restores matched specs into the working tree, and installs the hook.
208
-
209
- ### 6. Recover from a failed sync
210
-
211
- If the hook ever queued work (network blip, push rejection):
190
+ Abort only before the main index has been mutated:
212
191
 
213
192
  ```bash
214
- skeeper sync # drain queued retries, then run a fresh sync
215
- skeeper sync --pull # rebase the sidecar branch first — useful when teammates pushed
193
+ skeeper repair abort
216
194
  ```
217
195
 
218
- ## 🧰 How Sync Works
219
-
220
- The post-commit hook is a _managed block_ in `.git/hooks/post-commit`, installed idempotently. It runs `skeeper sync --hook` with a 750 ms foreground budget per namespace so your `git commit` stays bounded even on a slow network.
221
-
222
- On the success path, `skeeper` matches files with doublestar globs, copies them into `.skeeper/`, then runs `git add`, `git commit`, and `git push` against the sidecar remote. Each namespace copies to `.skeeper/<namespace>/<path>` and pushes `<namespace>/__branches__/<source-branch>`. Sidecar commits reference the main-repo SHA so you can correlate spec changes back to the code change that triggered them.
223
-
224
- On the failure path — timeout, auth failure, network failure, or push rejection — `skeeper` writes a retry record to `.git/skeeper/queue.json` with the failing namespace when one is known, appends to `.git/skeeper/sync.log`, prints a one-line note, and the hook exits 0. The next `skeeper sync` drains the queue before running a normal sync. Use `skeeper sync --pull` when a teammate pushed sidecar updates between your commits; it fetches and rebases before pushing.
196
+ Run a fresh repair sync when a bypass or stale lock is reported:
225
197
 
226
- This design has two consequences worth knowing:
227
-
228
- - **`git commit` never fails because of `skeeper`.** Worst case, you have queued work to drain.
229
- - **Conflicts surface as Git conflicts.** `skeeper sync --pull` stops if the rebase reports unresolved conflicts; resolve them in `.skeeper/` with normal Git tooling, then re-run.
198
+ ```bash
199
+ skeeper sync
200
+ skeeper verify
201
+ ```
230
202
 
231
203
  ## 📖 CLI Reference
232
204
 
233
- <details>
234
- <summary><code>skeeper init</code> — Create and connect a sidecar specs repository</summary>
235
-
236
205
  ```bash
237
206
  skeeper init [flags]
207
+ skeeper sync [--dry-run] [--json] [--commit --message <msg>] [--force]
208
+ skeeper adopt <path-or-glob>... [--dry-run] [--json] [--force] [--commit --message <msg>]
209
+ skeeper untrack <path-or-glob>... [--dry-run] [--json] [--force] [--commit --message <msg>]
210
+ skeeper pattern test <glob> [--namespace <name>] [--json]
211
+ skeeper pattern add <glob> [--namespace <name>] [--exclude <glob>]... [--adopt-existing] [--dry-run] [--json] [--force] [--commit --message <msg>]
212
+ skeeper hydrate
213
+ skeeper status [--json]
214
+ skeeper log <path> [--latest]
215
+ skeeper fsck [--json] [--source-branch <branch>]
216
+ skeeper verify [--json] [--source-branch <branch>]
217
+ skeeper hooks install [--json]
218
+ skeeper hooks check [--json]
219
+ skeeper merge-driver [--json]
220
+ skeeper repair status|resume|abort [--json]
221
+ skeeper version
238
222
  ```
239
223
 
240
- | Flag | Default | Description |
241
- | ---------------- | --------- | ------------------------------------------------------------ |
242
- | `--sidecar` | | Existing sidecar repository URL |
243
- | `--sidecar-name` | | GitHub sidecar repository name or `OWNER/REPO` |
244
- | `--visibility` | `private` | GitHub visibility: `private`, `public`, or `internal` |
245
- | `--namespace` | repo slug | Initial sidecar namespace for this source repo |
246
- | `--bootstrap` | | Optional install command stored in `.skeeper.yml` |
247
- | `--patterns` | | Complete spec glob pattern set; repeat for multiple patterns |
224
+ Command notes:
248
225
 
249
- When run interactively, `init` opens a terminal form. It includes the default spec globs automatically, then asks whether to add extra context globs such as `AGENTS.md`, `CLAUDE.md`, or `.codex/plans/**`. It runs `gh repo create` for `--sidecar-name` or the create mode, but skips GitHub creation when `--sidecar` is provided. `--sidecar` and `--sidecar-name` are mutually exclusive.
226
+ - `sync` uses working-tree content and stages `skeeper.lock`. Hook mode uses staged index content.
227
+ - `adopt` and `untrack` push sidecar coverage before removing main-index tracking.
228
+ - `pattern add --adopt-existing` updates `.skeeper.yml`, updates the managed `.gitignore` block, then runs the same adoption transaction.
229
+ - `verify` checks `skeeper.lock` against the sidecar remote and does not require hooks.
230
+ - `fsck` compares current working-tree specs against locked sidecar content and does not mutate files or refs.
231
+ - `hydrate` restores from locked sidecar commits by default.
232
+ - `log --latest` fetches the namespace branch and reads its latest history instead of the locked commit.
233
+ - `hooks install` removes legacy Skeeper post-commit blocks, installs strict pre-commit/pre-merge-commit/pre-push blocks, writes `.gitattributes`, and configures the `skeeper.lock` merge driver.
250
234
 
251
- </details>
235
+ ## 🤖 CI Action
252
236
 
253
- <details>
254
- <summary><code>skeeper hydrate</code> — Restore spec files from the sidecar repository</summary>
237
+ Use the same-repository Action to verify `skeeper.lock` in CI:
255
238
 
256
- ```bash
257
- skeeper hydrate
239
+ ```yaml
240
+ name: skeeper
241
+
242
+ on:
243
+ pull_request:
244
+ push:
245
+ branches: [main]
246
+
247
+ jobs:
248
+ verify:
249
+ runs-on: ubuntu-latest
250
+ steps:
251
+ - uses: actions/checkout@v4
252
+ with:
253
+ fetch-depth: 0
254
+ - uses: compozy/skeeper@v0.1.1
255
+ with:
256
+ args: |
257
+ verify
258
+ --json
259
+ ssh-private-key: ${{ secrets.SKEEPER_SSH_PRIVATE_KEY }}
258
260
  ```
259
261
 
260
- Use after a fresh clone of the main repo. `hydrate` clones the sidecar into `.skeeper/`, copies matched spec files into the working tree, and installs the post-commit hook. No flags.
261
-
262
- </details>
263
-
264
- <details>
265
- <summary><code>skeeper sync</code> — Mirror spec files into the sidecar repository</summary>
266
-
267
- ```bash
268
- skeeper sync [flags]
269
- ```
262
+ Credential precedence:
270
263
 
271
- | Flag | Default | Description |
272
- | -------- | ------- | ------------------------------------------------------------------------------------ |
273
- | `--pull` | `false` | Pull and rebase the sidecar branch before syncing |
274
- | `--hook` | `false` | Run in post-commit hook mode: 750 ms foreground budget per namespace, always exits 0 |
264
+ 1. `ssh-private-key` writes a temp key and sets `GIT_SSH_COMMAND`.
265
+ 2. `token` configures HTTPS GitHub credentials.
266
+ 3. Existing runner Git/SSH credentials are used when neither input is provided.
275
267
 
276
- Drains queued retries from `.git/skeeper/queue.json`, then mirrors spec files into `.skeeper/`, commits, and pushes. Use `--pull` when teammates may have pushed sidecar updates between your commits. `--hook` is what the installed post-commit hook calls — you rarely run it manually.
268
+ Secrets are masked before configuration. The wrapper downloads the released Skeeper binary for the action ref/tag and delegates verification to the CLI.
277
269
 
278
- </details>
270
+ ## 🩺 Troubleshooting
279
271
 
280
- <details>
281
- <summary><code>skeeper status</code> — Show sidecar sync status</summary>
272
+ **`SKEEPER_SKIP=1` was used**
282
273
 
283
- ```bash
284
- skeeper status
285
- ```
274
+ Run `skeeper status`, then `skeeper sync`, then `skeeper verify`. The bypass journal remains visible until sync clears it.
286
275
 
287
- Prints the sidecar URL, current source branch, one status block per namespace, last sync commit and age, remote state, tracked file counts, and pending queued syncs. No flags.
276
+ **Sidecar push was rejected**
288
277
 
289
- </details>
278
+ Run `skeeper repair status`. If the failure happened before main-index mutation, fix network/auth or sidecar contention and run `skeeper repair resume`. If the main index was already mutated, inspect the listed files manually.
290
279
 
291
- <details>
292
- <summary><code>skeeper log &lt;path&gt;</code> — Show sidecar history for a spec file</summary>
280
+ **`skeeper.lock` conflicts during merge**
293
281
 
294
- ```bash
295
- skeeper log <path>
296
- ```
282
+ Run `skeeper hooks install` to ensure the merge driver is configured, then rerun the merge. Manual editing of scalar sidecar SHAs is unsupported; regenerate the lock through `skeeper merge-driver` or `skeeper sync`.
297
283
 
298
- Runs `git log` against the sidecar for one spec file. The path is relative to the main repo root, e.g. `skeeper log src/auth/SPEC.md`. `skeeper` resolves the current owning namespace and reads `<namespace>/<path>` inside that namespace branch.
284
+ **`verify` reports a lock mismatch**
299
285
 
300
- </details>
286
+ The main commit and sidecar remote disagree. Run `skeeper sync`, include the updated `skeeper.lock`, and rerun `skeeper verify`.
301
287
 
302
- <details>
303
- <summary><code>skeeper version</code> — Print build metadata</summary>
288
+ **A namespace overlaps another namespace**
304
289
 
305
- ```bash
306
- skeeper version
307
- ```
290
+ Move shared files into exactly one namespace by adding `exclude:` entries. Skeeper does not use order-based precedence.
308
291
 
309
- Prints `Version`, `Commit`, and `BuildDate` injected at build time via ldflags.
292
+ ## 🚫 When Skeeper Is the Wrong Tool
310
293
 
311
- </details>
294
+ - Repositories where specs already belong in the main diff and reviewers explicitly want them inline.
295
+ - Teams that need PR review on the spec content itself before merge — Skeeper mirrors after the main commit succeeds, by design.
296
+ - Repositories without a stable sidecar Git host: Skeeper fails the commit when the sidecar is unreachable (the audited `SKEEPER_SKIP=1` bypass exists, but it is not a substitute for a working remote).
297
+ - Storing build artifacts, generated code, or large binaries. Default guardrails cap mutating plans at 100 files and 10 MiB on purpose.
312
298
 
313
299
  ## 🛠️ Development
314
300
 
315
301
  ```bash
316
- mise install # provision Go 1.26.2, Bun 1.3.4, and CLI tools
302
+ mise install
317
303
  bun install
318
304
  make hooks-install
319
- make verify # fmt → lint → test → build (BLOCKING gate)
305
+ make verify
320
306
  ```
321
307
 
322
308
  Common targets:
323
309
 
324
310
  ```bash
325
- make fmt # gofmt every .go file
326
- make lint # golangci-lint v2 + gopls modernize (zero tolerance)
327
- make test # gotestsum + -race -parallel=4
328
- make build # bin/skeeper with version ldflags
329
- make cover # coverage.out + coverage.html
311
+ make fmt
312
+ make lint
313
+ make test
314
+ make build
315
+ make cover
316
+ make release-snapshot
330
317
  ```
331
318
 
332
- Releases are prepared through release pull requests and published with [GoReleaser Pro](.goreleaser.yml). A push to `main` creates or updates a release PR with `pr-release`; the release PR runs a GoReleaser dry run, and merging the release commit publishes GitHub release artifacts, the Homebrew cask, and the NPM package.
333
-
334
- Release publishing requires these GitHub Actions secrets:
335
-
336
- | Secret | Purpose |
337
- | ---------------- | ------------------------------------------------------------- |
338
- | `RELEASE_TOKEN` | Create/update release PRs, push release tags, update Homebrew |
339
- | `GORELEASER_KEY` | Run GoReleaser Pro |
340
- | `NPM_TOKEN` | Publish `@compozy/skeeper` and authenticate npm in release CI |
341
-
342
- Release notes are generated by `pr-release`. Add pending human-authored notes under `.release-notes/`; the release PR writes the current release body to `RELEASE_BODY.md` and prepends it to `RELEASE_NOTES.md`. The production workflow passes `RELEASE_BODY.md` to GoReleaser with the Skeeper release header and footer templates.
343
-
344
- Local release checks:
345
-
346
- ```bash
347
- make release-snapshot # requires GoReleaser Pro in PATH, or GORELEASER_KEY for the installer
348
- ```
349
-
350
- Contributor guidance, commit conventions, and the agent skill dispatch protocol live in [`CLAUDE.md`](CLAUDE.md) and [`AGENTS.md`](AGENTS.md).
351
-
352
- ## 🤖 Official Agent Skill
353
-
354
- `skeeper` ships its own first-party agent skill at [`skills/skeeper-project/SKILL.md`](skills/skeeper-project/SKILL.md). LLM agents working in this repository should load it before reading or modifying code — it captures the workflow, project rules, and verification gates that aren't obvious from the source alone, and points to `references/domain-map.md` and `references/repo-contract.md` for package boundaries and change rules.
355
-
356
- ## 🤝 Contributing
357
-
358
- Contributions are welcome. Open an issue to discuss larger changes, or send a pull request for fixes and small improvements. All commits follow [Conventional Commits](https://www.conventionalcommits.org/) (`build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `test`), enforced by `commitlint`.
319
+ Contributor guidance, commit conventions, and agent instructions live in [`CLAUDE.md`](CLAUDE.md) and [`AGENTS.md`](AGENTS.md).
359
320
 
360
321
  ## 📄 License
361
322
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compozy/skeeper",
3
3
  "type": "module",
4
- "version": "0.1.1",
4
+ "version": "0.2.0",
5
5
  "description": "Sidecar Git versioning for spec artifacts",
6
6
  "scripts": {
7
7
  "postinstall": "node install.js",
@@ -27,63 +27,63 @@
27
27
  },
28
28
  "archives": {
29
29
  "darwin-arm64": {
30
- "name": "skeeper_0.1.1_darwin_arm64.tar.gz",
31
- "url": "https://github.com/compozy/skeeper/releases/download/v0.1.1/skeeper_0.1.1_darwin_arm64.tar.gz",
30
+ "name": "skeeper_0.2.0_darwin_arm64.tar.gz",
31
+ "url": "https://github.com/compozy/skeeper/releases/download/v0.2.0/skeeper_0.2.0_darwin_arm64.tar.gz",
32
32
  "bins": [
33
33
  "skeeper"
34
34
  ],
35
35
  "format": "tar.gz",
36
36
  "checksum": {
37
37
  "algorithm": "sha256",
38
- "digest": "8b1f41d35c843099df08c3f43b503fc2163dd0ffb77846be14f3b997e0742d9c"
38
+ "digest": "0b989d71f5cf6dc929bcf18d9f86fbe827ba74231b38b98fe268a299ba56d7da"
39
39
  }
40
40
  },
41
41
  "darwin-x64": {
42
- "name": "skeeper_0.1.1_darwin_x86_64.tar.gz",
43
- "url": "https://github.com/compozy/skeeper/releases/download/v0.1.1/skeeper_0.1.1_darwin_x86_64.tar.gz",
42
+ "name": "skeeper_0.2.0_darwin_x86_64.tar.gz",
43
+ "url": "https://github.com/compozy/skeeper/releases/download/v0.2.0/skeeper_0.2.0_darwin_x86_64.tar.gz",
44
44
  "bins": [
45
45
  "skeeper"
46
46
  ],
47
47
  "format": "tar.gz",
48
48
  "checksum": {
49
49
  "algorithm": "sha256",
50
- "digest": "f8e895b2a2206b15041dfd796d6c2df23e24f84a6272dae030ae929b62165a5a"
50
+ "digest": "fced98b16ffae5f72d843dfe532b989ee4f4c6df59973167f38a8e68fde1385c"
51
51
  }
52
52
  },
53
53
  "linux-arm64": {
54
- "name": "skeeper_0.1.1_linux_arm64.tar.gz",
55
- "url": "https://github.com/compozy/skeeper/releases/download/v0.1.1/skeeper_0.1.1_linux_arm64.tar.gz",
54
+ "name": "skeeper_0.2.0_linux_arm64.tar.gz",
55
+ "url": "https://github.com/compozy/skeeper/releases/download/v0.2.0/skeeper_0.2.0_linux_arm64.tar.gz",
56
56
  "bins": [
57
57
  "skeeper"
58
58
  ],
59
59
  "format": "tar.gz",
60
60
  "checksum": {
61
61
  "algorithm": "sha256",
62
- "digest": "711dbee658801c1c388d7c87d5b0ab1e39035c872266768d4ddef6edfa7e2912"
62
+ "digest": "04ab4382e4a01cb7a9165c055b8cf3b9675d03fbebe056ff67e2b04450c02a54"
63
63
  }
64
64
  },
65
65
  "linux-x64": {
66
- "name": "skeeper_0.1.1_linux_x86_64.tar.gz",
67
- "url": "https://github.com/compozy/skeeper/releases/download/v0.1.1/skeeper_0.1.1_linux_x86_64.tar.gz",
66
+ "name": "skeeper_0.2.0_linux_x86_64.tar.gz",
67
+ "url": "https://github.com/compozy/skeeper/releases/download/v0.2.0/skeeper_0.2.0_linux_x86_64.tar.gz",
68
68
  "bins": [
69
69
  "skeeper"
70
70
  ],
71
71
  "format": "tar.gz",
72
72
  "checksum": {
73
73
  "algorithm": "sha256",
74
- "digest": "76e72d20d8486e484b9789df69c19a327ad0307051554eaf7db078474a3cbbac"
74
+ "digest": "f1e0426e926fc654fccf23a6744cebc9313bf43cd5cc14576adef6cdf5612583"
75
75
  }
76
76
  },
77
77
  "win32-x64": {
78
- "name": "skeeper_0.1.1_windows_x86_64.zip",
79
- "url": "https://github.com/compozy/skeeper/releases/download/v0.1.1/skeeper_0.1.1_windows_x86_64.zip",
78
+ "name": "skeeper_0.2.0_windows_x86_64.zip",
79
+ "url": "https://github.com/compozy/skeeper/releases/download/v0.2.0/skeeper_0.2.0_windows_x86_64.zip",
80
80
  "bins": [
81
81
  "skeeper.exe"
82
82
  ],
83
83
  "format": "zip",
84
84
  "checksum": {
85
85
  "algorithm": "sha256",
86
- "digest": "b445168f2811e1a2948f434cc03c91fbe2bff9c0ae1bd64677dfec393ed02559"
86
+ "digest": "7dc1569a187eecaccc5e79e5f69be4da95acf050a6b58816bb790a38303e8733"
87
87
  }
88
88
  }
89
89
  }