A package manager for a project's reusable resources: skills, rules and task bundles, composed into presets.
Teams copy the same SKILL.md directories, instruction files and bootstrap taskfiles from repo to
repo by hand. Nobody knows which copy is current, an improvement made in one project never reaches
the others, and a fresh clone works only if whoever cloned it remembers to copy the files again.
souk gives those artefacts a declarative descriptor (souk.yaml), a lockfile (souk.lock) and
one reconciliation command (souk sync). You declare what the project needs, sync materialises
it, and both the descriptor and the materialised tree are committed, so a clone or a new worktree
is complete without running anything. souk is always scoped to the project: it never writes to
~/.claude/.
It handles four kinds of resource, and one way of composing them:
| Type | Installed at | Ownership |
|---|---|---|
| skill | .claude/skills/<name>/ |
managed: rewritten from the source at every sync |
| plugin | .claude/skills/<name>/ |
managed: a Claude Code plugin with its skills, hooks, mods and MCP servers, named after its plugin.json |
| rule | .claude/rules/<name>/ |
managed: rewritten from the source at every sync |
| bundle | .souk/bundles/ and resources/<name>/ |
both: see below |
| preset | nothing | a macro: presets apply expands it into souk.yaml once |
Managed means sync compares what is on disk against the digest in the lock and, when they
differ, overwrites from the source without asking. A hand edit under .claude/skills/ is lost at
the next sync. To change a resource, change it in the registry it comes from.
A skill the project writes for itself and publishes nowhere is declared unmanaged: souk never
installs it, sync --prune spares it and doctor does not call it an orphan.
unmanaged:
- skills/my-hackManaged resources are committed by default. commit: false at the top of souk.yaml keeps every
managed resource out of git, and commit: on a skill, plugin or rule entry overrides it for that
entry. sync lists the exact paths of the resources not committed in a block between
# souk:begin and # souk:end in .gitignore, creating the file when missing and removing the
block when nothing is left in it. Everything outside the markers survives byte for byte. A fresh
clone or a new worktree lacks those resources until souk sync restores them.
A bundle has both regimes at once, decided by position. A bundle is one Taskfile.yaml, plus
the scripts it calls and the resources it seeds:
| In the bundle | In your project | Regime |
|---|---|---|
Taskfile.yaml |
.souk/bundles/includes/Taskfile.<name>.yaml |
managed |
scripts/ |
.souk/bundles/scripts/<name>/ |
managed |
resources/ |
<resources_dir>/<name>/ |
seeded: written only when the file is missing, then yours |
README.md |
nowhere | it is the bundle's description |
Nothing is templated. Files are copied byte for byte; what has to vary is a Task variable the
generated include passes in (SCRIPTS_DIR, RESOURCES_DIR, PROJECT_ROOT, all absolute). Do not
edit anything under .souk/: like .claude/, the next sync rewrites it.
From the Homebrew tap sourcesense/homebrew-tap, on macOS and Linux:
brew install sourcesense/tap/soukbrew update && brew upgrade souk moves you to the latest release. Binaries for darwin, linux and
windows are also attached to every GitHub Release.
Go 1.26 or later, and git on PATH.
git clone https://github.com/sourcesense/souk.git
cd souk
go build -o souk ./cmd/soukPut the binary on your PATH; from a clone, go install ./cmd/souk does the same into
$(go env GOPATH)/bin. A source build reports dev - the real version is stamped in at release
time, see docs/RELEASING.md:
$ souk --version
souk devThe repo also ships a Taskfile.yml, if you have Task: task build writes
bin/souk, task install runs the go install, and task check is the gate CI runs (gofmt,
go mod tidy -diff, vet, tests). task --list prints the rest.
A full run against a registry that lives inside the project itself. Every block below is real terminal output.
A registry is a git repo, or - as here - a plain directory, that exposes resources by folder convention. Nothing indexes it; the folder names are the whole contract.
team-registry/
skills/changelog/SKILL.md
skills/release-notes/SKILL.md
rules/commit-style/README.md
rules/commit-style/subjects.md
bundles/projects/README.md
bundles/projects/Taskfile.yaml
bundles/projects/scripts/check.sh
bundles/projects/resources/projects.json
presets/backend.yaml
souk init writes a descriptor and applies the default preset: the raw file
presets/default.yaml of this repository, at the tag matching the binary's
version (main for an untagged build). It declares a few public registries and installs nothing.
$ souk init
Created souk.yaml
Found 0 skills and 0 rules already under .claude/skills and .claude/rules; souk does not adopt them.
Run `souk doctor` to see what to do with them.
added registry diagram-design to souk.yaml
added registry humanizer to souk.yaml
added registry mattpocock to souk.yaml
added registry plannotator to souk.yaml
added registry ponytail to souk.yaml
added registry pstack to souk.yamlA preset that installs nothing leaves no souk.lock: the first sync that installs something writes
it. --preset <location> applies another preset instead, SOUK_DEFAULT_PRESET replaces the default
preset for every init on the machine (a company points it at its own), and --no-preset writes
registries: {}. This walkthrough starts empty and declares its own registry:
$ souk init --no-preset
Created souk.yaml
Found 0 skills and 0 rules already under .claude/skills and .claude/rules; souk does not adopt them.
Run `souk doctor` to see what to do with them.
$ souk registry add default ./team-registry
added registry default -> ./team-registry$ cat souk.yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/sourcesense/souk/main/souk.schema.json
version: 1
registries:
default: ./team-registrydefault is an ordinary alias. Every entry names the alias, git url or path it comes from; souk registry add declares more aliases.
$ souk skills ls -a
╭───────────────┬──────────┬──────────────────────────────────────────────────────────╮
│ NAME │ REGISTRY │ DESCRIPTION │
├───────────────┼──────────┼──────────────────────────────────────────────────────────┤
│ changelog │ default │ Write a release changelog from the merged pull requests. │
│ release-notes │ default │ Turn a tag range into release notes. │
╰───────────────┴──────────┴──────────────────────────────────────────────────────────╯
$ souk bundles ls -a
╭──────────┬──────────┬─────────────────────────────────────────────────╮
│ NAME │ REGISTRY │ DESCRIPTION │
├──────────┼──────────┼─────────────────────────────────────────────────┤
│ projects │ default │ Bootstrap and check a multi-project repository. │
╰──────────┴──────────┴─────────────────────────────────────────────────╯Each add edits souk.yaml and then syncs.
$ souk skills add changelog --source default
added skill default skills/changelog to souk.yaml
created skill changelog
$ souk rules add commit-style --source default
added rule default rules/commit-style to souk.yaml
created rule commit-style
$ souk bundles add projects --source default
added bundle projects to souk.yaml
created aggregator .souk/bundles/Taskfile.yaml
created block Taskfile.yaml
created bundle projectsThe bundle printed three extra lines because it writes three kinds of thing: its own files, the
aggregator souk generates from the descriptor, and the marked block souk splices into the project's
Taskfile.yaml.
$ cat souk.yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/sourcesense/souk/main/souk.schema.json
version: 1
registries:
default: ./team-registry
skills:
- source: default
include:
- skills/changelog
rules:
- source: default
include:
- rules/commit-style
bundles:
- name: projects
source: default$ find .claude .souk resources Taskfile.yaml -type f | sort
.claude/rules/commit-style/subjects.md
.claude/skills/changelog/SKILL.md
.souk/bundles/includes/Taskfile.projects.yaml
.souk/bundles/scripts/projects/check.sh
.souk/bundles/Taskfile.yaml
resources/projects/projects.json
Taskfile.yamlresources/projects/projects.json was seeded - written because it was missing - and is yours
now. Taskfile.yaml is the project's file, and souk touched only the block it owns in it:
$ cat Taskfile.yaml
version: '3'
includes:
# souk:begin - generated by souk, do not edit
souk:
taskfile: ./.souk/bundles/Taskfile.yaml
flatten: true
# souk:endEverything generated sits one level down, in the aggregator souk owns whole:
$ cat .souk/bundles/Taskfile.yaml
version: '3'
# Generated by souk. Do not edit: rewritten at every sync.
includes:
projects:
taskfile: ./includes/Taskfile.projects.yaml
dir: "./"
flatten: true
vars:
SCRIPTS_DIR:
sh: realpath "{{.ROOT_DIR}}/.souk/bundles/scripts/projects"
RESOURCES_DIR:
sh: realpath "{{.ROOT_DIR}}/resources/projects"
PROJECT_ROOT:
sh: realpath "{{.ROOT_DIR}}"$ task -l
task: Available tasks for this project:
* projects:check: Check every declared project
* projects:list: List the declared projects
$ task projects:check
task: [projects:check] /private/tmp/souk-demo/.souk/bundles/scripts/projects/check.sh /private/tmp/souk-demo/resources/projects/projects.json
ok: /private/tmp/souk-demo/resources/projects/projects.jsonThe names are unprefixed: the includes are flattened at both levels. The two absolute paths come
from SCRIPTS_DIR and RESOURCES_DIR, resolved at run time, which is why a bundle never has to
know where it was installed.
$ souk status
╭──────────────┬────────┬─────────────────┬───────╮
│ RESOURCE │ TYPE │ ORIGIN │ STATE │
├──────────────┼────────┼─────────────────┼───────┤
│ changelog │ skill │ ./team-registry │ ok │
│ commit-style │ rule │ ./team-registry │ ok │
│ projects │ bundle │ ./team-registry │ ok │
╰──────────────┴────────┴─────────────────┴───────╯$ cat souk.lock
version: 1
generated_by: souk dev
skills_dir: .claude/skills
rules_dir: .claude/rules
sources:
- dir: ./team-registry
skills:
- name: changelog
source: ./team-registry
path: skills/changelog
digest: sha256:335078ac87eadb83f11d0d6034eec04e23578bee782ce28381c032c17c3c6336
rules:
- name: commit-style
source: ./team-registry
path: rules/commit-style
digest: sha256:ae2bc8c476bf434b0cce86a48312374893c43d2a0c3be67ed29eff190185e155
bundles:
- name: projects
source: ./team-registry
path: bundles/projects
digest: sha256:f7e8353d26067845d76d63a65c1cd96e74bb6b9c8b08041b109c3a7bdbaf0625A bundle's digest covers its managed zone only - the installed taskfile and the scripts.
Nothing under resources/ is in the lock, in any shape, so no later command can ever call an
edited resource drift.
Edit a managed file by hand and souk notices:
$ echo "# local" >> .souk/bundles/scripts/projects/check.sh
$ souk status
╭──────────────┬────────┬─────────────────┬─────────╮
│ RESOURCE │ TYPE │ ORIGIN │ STATE │
├──────────────┼────────┼─────────────────┼─────────┤
│ changelog │ skill │ ./team-registry │ ok │
│ commit-style │ rule │ ./team-registry │ ok │
│ projects │ bundle │ ./team-registry │ drifted │
╰──────────────┴────────┴─────────────────┴─────────╯
$ souk sync --check
would update bundle projects
.souk/bundles/scripts/projects/check.sh differs from what souk.lock pins
souk: error: the managed tree does not match souk.lock: 1 resource to reconcile
$ souk sync
updated bundle projectsEdit the seeded resource instead and nothing happens at all - that is the point of the seed zone:
$ echo '{"projects":["api"]}' > resources/projects/projects.json
$ souk sync --check
Everything is up to date.The price is three consequences worth knowing before you rely on it. A resource is written only when it is missing, so a file added upstream arrives at the next sync, a file renamed upstream lands beside the one it replaced, and a file you delete on purpose comes back:
$ rm resources/projects/projects.json
$ souk sync
Everything is up to date.
$ ls resources/projects
projects.jsonNote the wording: the sync reports nothing, because the managed zone did not change and the seed zone has no digest to report on. The file is back all the same. Deleting a resource for good means removing it upstream, or removing the bundle.
souk.yaml, souk.lock, .claude/, .souk/, Taskfile.yaml and whatever a bundle seeded all go
into git together.
$ git add -A && git commit -m "Adopt souk"
$ souk doctor
0 errors, 0 warnings
$ souk sync --check
Everything is up to date.Every command accepts the global flags, before or after the command name:
$ souk --help
Usage: souk [global flags] <command> [arguments]
Commands:
bundles add, remove or list declared bundles
contribute send the edits made to managed resources back to their registry
doctor report what is wrong with the project, and --fix what is mechanical
init create souk.yaml in the current project and apply the default preset
presets apply a preset, or list what the registries publish
registry list, add or remove registry aliases
rules add, remove or update declared rules
skills add, remove or update declared skills
status show the declared resources and their state
sync reconcile the project with souk.yaml and souk.lock
update re-resolve the refs, rewrite the lock and sync
version print the version, also available as --version
help print this message
Global flags:
-C <dir> project root (default: the nearest ancestor with souk.yaml)
--json machine-readable output; never prompts
--no-cache ignore the discovery and content caches
--force allow destructive operations
--version print the version and exit
-h, --help print the help of the command and exit
-v, --verbose more output
-q, --quiet less outputsouk <command> --help and souk <command> <subcommand> --help print the same detail for one
level; a group command with no subcommand prints its own help.
souk init [flags]
| Flag | What it is for |
|---|---|
--preset <location|name> |
apply this preset instead of the default one (or $SOUK_DEFAULT_PRESET); repeatable, the first one a location |
--no-preset |
apply no preset: write registries: {} |
Writes souk.yaml and applies one preset: --preset, else SOUK_DEFAULT_PRESET, else the default
preset at https://raw.githubusercontent.com/sourcesense/souk/<tag>/presets/default.yaml, <tag>
being the binary's version (main for an untagged build). Its provenance comment is written like
any https preset. The first preset is a location (<git-url>//<path>@<ref> or an https:// URL):
a new project declares no registry for a name to be looked up in, so a name there is refused before
anything is written. A later --preset may be a name, looked up in the registries the presets
before it declared. A preset that does not apply removes the souk.yaml this run wrote. souk.lock
is written only when a preset installs something. Init also reports any skills and rules already
sitting under the managed directories: souk does not adopt them.
souk status
One row per declared resource: name, type, origin, and whether the managed files match the lock
(ok, drifted, missing). Nothing is written.
souk sync [flags]
The one reconciliation command. With no flags it makes the tree match souk.yaml, rewrites
souk.lock, regenerates the aggregator and splices the marked block.
| Flag | What it is for |
|---|---|
--dry-run |
report what would change and write nothing |
--check |
exit 1 when the project is out of sync, changing nothing - the CI gate |
--frozen |
refuse to resolve anything the lock does not already cover - the CI build |
--restore |
rebuild every managed resource, drift included |
--prune |
remove the managed resources the descriptor no longer declares |
souk update [<name>...]
Re-resolves the refs of the git-backed sources, rewrites the lock and syncs. With names, only those
resources. It prompts when more than one resource would move, so in a script pass --json (or
redirect stdin from /dev/null).
$ souk update
Nothing to re-resolve: no git source is selected.
Everything is up to date.souk skills ls [-a] souk rules ls [-a]
souk skills info <name> souk rules info <name>
souk skills add [flags] [<name|url>...]
souk skills rm [--no-sync] <name>...
souk skills update [<name>...]
Flag (on add) |
What it is for |
|---|---|
--source <alias|url|path> |
the registry to take it from; required with a name |
--ref <branch|tag|sha> |
the git ref to pin the entry to |
--as <name> |
install it under another name; selects exactly one resource |
--include <path> |
select a path in the source; repeatable |
--all |
select everything the source publishes of this type |
--no-sync |
write souk.yaml and skip the implicit sync |
A name is looked up in the --source registry wherever it sits, and the entry is written in the long
form with the path found. ls lists what the project declares; -a lists what the configured
registries publish. rm takes --no-sync only.
souk plugins ls [-a]
souk plugins add [--source <alias|url|path>] [--ref <ref>] [--include <path>] [--all] [--no-sync] [<name>...]
souk plugins rm [--no-sync] <name>...
A plugin is a registry directory with .claude-plugin/plugin.json, at any depth. add installs
what Claude Code reads of it - .claude-plugin/, the component directories, scripts/, the skills
it loads, .mcp.json and every ./ path its plugin.json names - under
.claude/skills/<name>/, where Claude Code loads it once the folder is trusted. A name is the
plugin.json name on the --source registry; with nothing named, add opens a flat picker of every
registry's plugins. souk update, status, doctor and contribute treat a plugin like any other
managed resource. souk skills add <plugin> still adds the plugin's skills one by one, without its
hooks.
souk bundles ls [-a]
souk bundles add [flags] <name>...
souk bundles rm [--no-sync] <name>...
souk bundles update [<name>...]
The same verbs, minus info, which bundles do not have yet. add takes --source, --ref,
--as, --include and --no-sync, and differs from the skill form in two ways the binary
enforces: there is no --all (a bundle is declared by name), and --include holds exactly one
registry-root-relative path, because a bundle is one tree.
rm takes back the managed zone and leaves the seeded one alone, saying so:
$ souk bundles rm projects
removed bundle projects from souk.yaml
deleted aggregator .souk/bundles/Taskfile.yaml
deleted block Taskfile.yaml
deleted bundle projects
souk: info: resources/projects/ was left in place: 1 file the project owns (projects.json)When the last bundle goes, so do .souk/bundles/ and the marked block.
--as renames everything at once - the include, both zones and the three variables - while name
stays the bundle's identity in the registry:
$ souk bundles add projects --source default --as bootstrap
added bundle bootstrap to souk.yaml
created aggregator .souk/bundles/Taskfile.yaml
created block Taskfile.yaml
created bundle bootstrapsouk presets ls [-a]
souk presets info <name>
souk presets apply [--dry-run] [--no-sync] <name|location>...
A preset is a partial souk.yaml published in a registry. apply expands it into the descriptor
once and then syncs; nothing about the preset reaches the lock.
apply and init --preset also read a preset file from wherever it sits, outside any registry:
<git-url>//<path>@<ref>: the file at<path>in that repository at<ref>, HEAD when@<ref>is absent, read with the same git credentials souk uses for registries;- an
https://URL of a raw.yamlfile.
The same content rules apply. Each written entry carries # from preset <git-url>//<path>@<sha> or
# from preset <url>.
$ souk presets apply https://github.com/acme/presets//backend.yaml@v2
$ souk presets apply https://gist.githubusercontent.com/acme/0a1b/raw/backend.yaml$ souk presets info backend
name backend
registry default
sha 082ba29
description What a backend service starts with.
requires team -> ../team-registry
expands skill team skills/changelog
rule team rules/commit-style
bundle team projectssouk registry ls
souk registry add <alias> <source> [--ref <branch|tag|sha>]
souk registry rm <alias>
Manages the aliases in registries:. add refuses to rebind an alias, and rm refuses an alias an
entry still uses.
--ref declares the alias's channel: the ref every entry that names it tracks unless the
entry pins its own. It is how a project reads an edge registry and a stable one side by side, and
it reaches everything that reads the registry - skills ls -a, info, presets, sync and the
lock. A path registry has no revision and so no channel.
$ souk registry ls
╭─────────┬─────────────────────────────────┬─────────╮
│ ALIAS │ SOURCE │ REF │
├─────────┼─────────────────────────────────┼─────────┤
│ default │ ./team-registry │ │
│ edge │ github.com/acme/claude-registry │ develop │
╰─────────┴─────────────────────────────────┴─────────╯souk contribute [--yes] [--dry-run] [-m <title>] [<name>...]
Sends the edits made to managed resources back to the registry they come from: one branch per
diverged resource, souk/<skills|rules|bundles>/<name>, pushed over git. Without names it takes
every diverged resource. It prints a summary of the diff of each one, warns that the local edit is
overwritten by the next sync until the contribution is merged, and asks before pushing. The
project, the lock and the descriptor are never written; a merged contribution comes back through
update.
Each pushed branch is printed with where to open the pull request: the GitHub pull/new URL for a
GitHub registry, otherwise the registry URL and the branch name.
| Flag | Meaning |
|---|---|
--yes |
push without asking; required when there is no terminal |
--dry-run |
print the summaries and the branches that would be pushed; push nothing |
-m <title> |
replace the commit title |
$ echo "a local tweak" >> .claude/skills/changelog/SKILL.md
$ souk contribute --dry-run
skill/changelog: 1 file changed, 1 insertion(+), 0 deletions(-)
skill/changelog: would push branch souk/skills/changelog to file:///tmp/team-registry
Nothing was pushed: --dry-run.
$ souk contribute --yes
skill/changelog: 1 file changed, 1 insertion(+), 0 deletions(-)
Your local edits are overwritten by the next `souk sync` until the contribution is merged.
skill/changelog: file:///tmp/team-registry (branch souk/skills/changelog)For a GitHub registry the line carries the pull-request URL:
$ souk contribute --yes
skill/changelog: 1 file changed, 1 insertion(+), 0 deletions(-)
Your local edits are overwritten by the next `souk sync` until the contribution is merged.
skill/changelog: https://github.com/org/reg/pull/new/souk/skills/changelog (branch souk/skills/changelog)On a terminal, without --yes, it opens the contribute screen: the diverged resources, all picked,
beside the commit message and the diff of the one under the cursor. Space unpicks, e edits the
message, enter pushes; q prints Nothing was contributed. and exits 0. A branch that already exists on the registry is not
overwritten: it is listed under Not pushed: and the exit is 2.
Only a resource that comes from a registry named in registries: is contributable. A git URL
declared on the entry, a path registry, an unmanaged resource and a bundle's seeded files are
listed as skipped:
$ souk contribute
Not contributable, skipped:
- skill beta: its source is a git URL declared on the entry, not a registries: alias
Nothing to contribute: no managed resource differs from the lock.Naming a skipped resource is an error, exit 2. Exit 0 when done or when nothing is diverged, 2 for an invocation or
configuration error (an ambiguous name, an existing branch, an edit to the name: line of a skill
installed with as), 3 when the registry rejects the push, 4 when the diff no longer applies to the
registry's ref: souk update, then redo the edit.
souk doctor [--fix]
Diagnoses the project - unmanaged files, a stale or uncommitted lock, a bad descriptor, a missing
or misdirected marked block, a resource whose git state does not match its commit: - and repairs
mechanically what --fix can. It exits 1 when it found errors, 0 when it found only warnings.
A short-form entry (- changelog, a plugin's bare name, or a bundle without source:) names no
registry, so every other command refuses it. doctor reports each one, and when the descriptor
declares a default alias doctor --fix rewrites it onto that alias: a skill, plugin or rule as
source: default plus include: [<path>] (the path the lock recorded, else the one a path
registry keeps the name at, else the convention's), a bundle by adding source: default:
$ souk doctor --fix
rewrote 1 short-form entry in the long form
0 errors, 0 warnings
$ cat souk.yaml
...
skills:
- source: default
include:
- skills/writing/changelogA resource edited by hand is a warning, and the message points at souk contribute:
$ souk doctor
souk: warning: skill "alpha" differs from the digest souk.lock records: the next sync overwrites it, with a visible diff in git
-> souk sync --restore (restore it now)
-> souk contribute (keep the change: push it to the registry as a branch)
-> or drop the entry and declare `unmanaged: [skills/alpha]`
0 errors, 1 warningFor bundles it also does what no other command can: it reads the tasks: keys of the installed
taskfiles and refuses a collision, because Task's own failure names the include rather than the
bundles, and stops everything from running.
$ souk doctor
souk: error: bundles "projects" and "legacy" both define the task "projects:list", and Task then refuses to run anything at all
-> keep one of the two, in souk.yaml:
- name: legacy
excludes: [projects:list]
1 error, 0 warnings
souk: error: 1 error to fixTaking that advice and running souk sync writes the excludes: into the aggregator, and both
bundles coexist with the surviving definition winning.
souk version
souk --version
Three files are written by hand: the descriptor, a registry's resources, and a preset. souk.lock
is generated and belongs to souk - commit it, never edit it.
The project's descriptor. It is the only file that says what the project needs.
# yaml-language-server: $schema=https://raw.githubusercontent.com/sourcesense/souk/main/souk.schema.json
version: 1 # the only required key; the constant 1
registries:
default: ./team-registry # an alias like any other
vendor: https://github.com/acme/claude-registry.git
# Where managed resources land, and where a bundle seeds what the project then owns.
# All three are optional, project-relative, and forbidden inside a preset.
skills_dir: .claude/skills # default
rules_dir: .claude/rules # default
resources_dir: resources # default
commit: false # keep managed resources out of git; default true
skills:
- source: default # source + include are both required
include: [skills/changelog]
- source: vendor
include: [skills/reviewer]
ref: v2.1.0 # a git branch, tag or sha; not allowed on a path source
as: acme-reviewer # rename; only when the include selects exactly one path
commit: true # overrides the top-level `commit:` for this entry
plugins:
- source: vendor # no `as`: a plugin is named by its plugin.json
include: [tools/quality] # the plugin's directory, `.` at the registry root
rules:
- source: default
include: [rules/commit-style]
- source: vendor
include: [rules/*] # globs are allowed in include/exclude
exclude: [rules/legacy]
bundles:
- name: projects # a bundle is always named, and names its registry
source: default
- name: release
source: vendor
ref: main
as: rel # renames the include, both zones and the variables
include: [bundles/release] # exactly one registry-root-relative path
excludes: [release:version] # task names to drop, so the project's own definition winsA bundle entry has no vars:: nothing is templated, so there is nothing to feed. Nor is there any key to say what a bundle may overwrite - position in the bundle decides that, and it is not negotiable per project.
A registry is a git repo or a directory reachable from the project. There is no index file; the folder names are the contract.
skills/<name>/SKILL.md # the SKILL.md is what makes it a skill
**/.claude-plugin/plugin.json # the plugin.json is what makes its directory a plugin
rules/<name>/ # no marker: on a non-conventional repo, use --include
bundles/<name>/Taskfile.yaml # the Taskfile.yaml is what makes it a bundle
presets/<name>.yaml
A skill's description comes from the frontmatter of its SKILL.md; a rule's and a bundle's from
the frontmatter of their README.md.
Discovery skips .git/, the other dot directories and the registry's own .claude/: what a
registry installs or keeps for itself is never registry content, even when a plugin.json names a
path inside it.
bundles/projects/
README.md # the description; installed nowhere
Taskfile.yaml # required; managed
scripts/check.sh # managed
resources/projects.json # seeded
README.md:
---
description: Bootstrap and check a multi-project repository.
---
What this bundle publishes, and what the project is expected to edit.Taskfile.yaml - written against the three variables, never against a relative path, and with the
full task name spelled out, because the flattened include adds no prefix:
version: '3'
tasks:
projects:list:
desc: List the declared projects
cmds:
# RESOURCES_DIR is absolute and points at <resources_dir>/projects
- cat "{{.RESOURCES_DIR}}/projects.json"
projects:check:
desc: Check every declared project
cmds:
# SCRIPTS_DIR is absolute and points at .souk/bundles/scripts/projects
- "{{.SCRIPTS_DIR}}/check.sh {{.RESOURCES_DIR}}/projects.json"| Variable | Value, always absolute |
|---|---|
SCRIPTS_DIR |
.souk/bundles/scripts/<name> |
RESOURCES_DIR |
<resources_dir>/<name> |
PROJECT_ROOT |
the root of the repository that holds the bundle |
PROJECT_ROOT is not Task's ROOT_DIR: ROOT_DIR is the directory of the root taskfile, which
a bundle included from somewhere else cannot count on.
A partial souk.yaml, published at presets/<name>.yaml. One rule of its own: every alias an entry
names is declared in the preset, default included. skills_dir, rules_dir and
resources_dir are not among the keys it may carry - where a project installs is the project's
choice.
description: What a backend service starts with.
registries:
team: ../team-registry # a named alias, resolved relative to the registry
skills:
- source: team
include: [skills/changelog]
rules:
- source: team
include: [rules/commit-style]
bundles:
- name: projects
source: teamOne contract, shared by every command.
| Code | Meaning | What to do |
|---|---|---|
0 |
Success. | Nothing. An update answered n is 0 too: it wrote nothing. |
1 |
Out of sync, or doctor found errors. |
Run souk sync and commit the result. In CI, fail the job: the branch is not reproducible as committed. |
2 |
Configuration or invocation error - bad flag, invalid souk.yaml, unknown resource, no project root, a name collision, an ambiguous selection, a symlink in a source. |
Fix the command or the descriptor. Retrying unchanged will not help. |
3 |
Network or ref-resolution failure. | Retry, check connectivity and credentials. Nothing is left half-written: the lock, the managed tree and souk.yaml are all as they were. |
4 |
A conflict that needs a human. | Produced by contribute only: the diff of an edit does not apply to the head of the registry's ref. Run souk update, then redo the edit. |
A failed add or presets apply puts souk.yaml back to the bytes it had before the command,
comments and formatting included, and reports the code the sync raised:
$ souk skills add --source default --include skills/nosuch
added skill default skills/nosuch to souk.yaml
souk: info: the sync failed: souk.yaml was restored to what it was before the command
souk: error: registry team-registry (alias default) does not contain the skill skills/nosuch declared in souk.yamlTwo commands, and one flag.
souk sync --check is the pull-request gate. It writes nothing and exits 1 when the committed
tree does not match souk.yaml and souk.lock - which is what git diff --exit-code cannot catch,
because a resource declared but never synced leaves no diff at all.
souk sync --checksouk sync --frozen is the build. It materialises strictly from the lock: it never re-resolves
a ref, never rewrites the lock, and fails with exit 1 rather than moving on if the lock does not
already agree with the descriptor.
souk sync --frozen--json is for wrappers. Everything human-facing moves into diagnostics, the payload into
data, and the process exit code is repeated in the envelope, so nothing has to be scraped:
$ souk status --json
{"version":1,"command":"status","data":{"rows":[{"resource":"changelog","type":"skill","origin":"./team-registry","state":"ok"},{"resource":"commit-style","type":"rule","origin":"./team-registry","state":"ok"},{"resource":"projects","type":"bundle","origin":"./team-registry","state":"ok"}]},"diagnostics":[],"exit_code":0}--json also removes every prompt: an invocation that would have asked becomes an exit 2 carrying
what it would have offered. sync --check, sync --frozen and status never prompt in any case;
update does, so a job that runs it should pass --json or redirect stdin from /dev/null.
contribute without a terminal and without --yes is exit 2: pass --yes or --dry-run.
The detail, including the shape of each command's data, is in docs/ci.md.
- Hooks, MCP servers, agents and commands travel inside a plugin, never on their own: souk
writes nothing into
.claude/settings.jsonor.mcp.json. A hook script outsidescripts/,bin/or a./path ofplugin.jsonis not installed. A plugin needs the workspace trust dialog, and each MCP server its own approval.marketplace.jsonis not read. - No hook telling you the project is out of sync. Run
souk sync --check, from CI or a pre-commit hook of your own. - A Helm chart that has to stay centrally updatable has no home. A chart the project is meant to extend is a bundle resource, seeded once and then the project's, so an upstream fix never reaches a project that already has it. Answering that would take a third zone, and two is what buys the model its simplicity. If a chart must stay managed, publish it elsewhere and pull it with the bundle's own tasks.
- A bundle is one taskfile. Anything bigger is several bundles, and a preset recomposes them
into one line of
souk.yaml. - There are no dependencies between bundles, and no key expresses one. Each bundle carries its own prerequisites. Composition is a preset's job.
- No record of which files a bundle seeded, hence the three consequences in step 7 above:
reach for
gitto see what changed under<resources_dir>/, not for souk. - The marked blocks are the only places souk edits a file it does not own: the one in
Taskfile.yamland the one in.gitignore. A project that deletes one gets it back: souk cannot tell "deleted on purpose" from "never written". - No preset nesting (
extends), no preset as a live reference, no activatable profiles. One descriptor, one set of resources. - No npm or other package registry as a source. It would bring a second versioning model next to the git ref, which is deliberately the only one.
- No per-machine selectors and nothing in
~/.claude/. The descriptor is committed and shared; what holds for one machine only belongs outside souk.
The full list, with the reasoning, is in docs/limits.md.
| Document | What it covers |
|---|---|
| Getting started | The worked run above, with more of the registry side |
| Commands | Every command, flag and message in full |
| File formats | souk.yaml, registries, bundles, presets, souk.lock |
| In CI | --json payloads, sync --check, sync --frozen, exit codes |
| Design limits | What souk deliberately does not do |
| Releasing | How a release and the tap bump are cut |