Loading...
Loading...
Explains how to use skeeper to keep spec artifacts (SPEC.md, ADRs, RFCs, plan/PRD/TechSpec markdown, custom globs) next to the code they describe without polluting main-repo history. Covers strict hooks, the tracked skeeper.lock file, namespaces, sync/verify/fsck, safe drift workflows with diff/hydrate/reconcile/rescue/update, adopt/untrack/pattern, repair, SKEEPER_SKIP, and the GitHub Action. Use when setting up skeeper, configuring a sidecar, syncing/verifying a lockfile, recovering drift or failed syncs, auditing bypasses, or wiring CI. Do not use for general Git hook questions, repos with no .skeeper.yml and no intent to add one, or editing skeeper internals.
npx skill4agent add compozy/skeeper skeeperskeeperskeeper.lockpre-commitpre-merge-commitskeeper.lockpre-push<namespace>/__branches__/<source-branch>diffhydratereconcilerescueupdate.git/skeeper/rescue/gitghskeeper initskeeper.lockSKEEPER_SKIP=1.git/skeeper/bypass.jsonstatusfsckpre-pushskeeper syncgit commit --no-verifypre-pushflowchart LR
A[git commit] --> B[existing user hook content]
B --> C[skeeper pre-commit block]
C --> D[reconcile staged specs and ownership]
D --> E[fetch and rebase sidecar branch]
E --> F[mirror namespace files into .skeeper/]
F --> G[commit and push sidecar]
G --> H[write and stage skeeper.lock]
H --> I[main commit proceeds]
I --> J[git push]
J --> K[skeeper pre-push verify]# Inside any Git repository
skeeper init # interactive: pick sidecar mode, namespace, patterns
skeeper hooks install # one-time per clone
$EDITOR src/auth/SPEC.md
git add src/auth/service.go src/auth/SPEC.md
git commit -m "auth: design OAuth provider flow"
# the hook syncs the sidecar and stages skeeper.lock; commit it normally
git pushskeeper adopt <glob>init| Command | Purpose | Read-only? |
|---|---|---|
| Interactively bootstrap | no |
| Restore spec files from the sidecar commits recorded in | no |
| Mirror current specs to the sidecar and stage | no |
| Move main-tracked specs under sidecar coverage | no |
| Reverse adoption: stop tracking specs in the main repo | no |
| Preview which working-tree files a glob would match | yes |
| Add a glob to a namespace and update | no |
| Show sidecar URL, branch, lock state, namespace digests, repair, bypass | yes |
| Show sidecar history for a single spec file (default: locked commit; | yes |
| Compare working-tree specs against | yes |
| List path-level drift classes such as local-only, missing, modified, and conflict | yes |
| Resolve drift explicitly by adopting, pruning to rescue, merging, or choosing ours/theirs | no |
| Validate | yes |
| Install or refresh the strict hooks, | no |
| Validate that managed hook blocks and the merge driver are wired correctly | yes |
| Regenerate | no |
| List rescue manifests for files moved aside before prune or overwrite | yes |
| Restore all or selected files from a rescue manifest | no |
| Agent-friendly update workflow: fast-forward, verify, hydrate, fsck, hooks | no |
| Show the active transaction and any pending bypass | yes |
| Re-run the recorded plan after a transient failure | no |
| Clear the transaction (only safe before main-index mutation) | no |
| Print build metadata | yes |
--json--dry-run--forcesettings.guardrailsreferences/cli-reference.md.skeeper.ymlsidecar: git@github.com:user/myproject-specs.git
namespaces:
- name: project
patterns:
- "**/SPEC.md"
- "docs/specs/**"
- ".claude/plans/**"
- "**/*.spec.md"
exclude:
- "docs/specs/private/**"settings:
guardrails:
max_files: 100 # default 100
max_bytes: 10485760 # default 10 MiB
hooks:
pre_push_timeout: 30s # default 30s
allow_skip_env: SKEEPER_SKIP # default SKEEPER_SKIPexclude!docs/private/**patternsexclude__branches__references/config-reference.mdskeeper init \
--sidecar-name myproject-specs \
--visibility private \
--namespace project \
--patterns "**/SPEC.md" \
--patterns "docs/specs/**"
skeeper hooks install
git add .skeeper.yml .gitignore
git commit -m "chore: bootstrap skeeper"skeeper init --sidecar git@github.com:user/shared-specs.git \
--namespace project \
--patterns "**/SPEC.md"
skeeper hydrateskeeper initskeeper hooks installskeeper pattern test "docs/adrs/**" # confirm matches
skeeper adopt --dry-run "docs/adrs/**" # preview move
skeeper adopt "docs/adrs/**" # execute
git commit -m "chore: adopt ADRs into sidecar"skeeper repair status
# transaction: <id> (<phase>)
# fix the underlying network/auth/contention issue, then:
skeeper repair resume
# or, only before main-index mutation:
skeeper repair abortskeeper diff --modified
skeeper hydrate --dry-run
skeeper reconcile --adopt-local
# or preserve local-only files before restoring locked content:
skeeper reconcile --prune-local
skeeper rescue listreconcile --adopt-localreconcile --prune-local.git/skeeper/rescue/<id>/--merge--ours--theirsskeeper update
skeeper update --reconcile keep-localupdateskeeper.lockfsckskeeper.lockgit merge feature/auth-redesign
# .gitattributes routes lock conflicts through skeeper merge-driver automatically
# if you resolved by hand:
skeeper sync
git add skeeper.lock
git commitname: skeeper
on:
pull_request:
push:
branches: [main]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: compozy/skeeper@v0.2.1
with:
args: |
verify
--json
ssh-private-key: ${{ secrets.SKEEPER_SSH_PRIVATE_KEY }}ssh-private-keyGIT_SSH_COMMANDtokenGIT_CONFIG_GLOBAL::add-mask::SKEEPER_SKIP=1git commit --no-verifySKEEPER_SKIP=1skeeper.lockskeeper syncskeeper merge-driverskeeper repair abortskeeper repair resumeSKEEPER_SKIP=1skeeper syncstatusfsckpre-pushpatternsexcludeskeeper.lockskeeper verifyskeeper hydrate--latestskeeper logskeeper diff--adopt-local--prune-local--merge--ours--theirsreferences/cli-reference.mdreferences/config-reference.md.skeeper.yml