@sous-io/sous 1.2.1 → 1.3.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.
- package/dist/sous.js +146 -136
- package/docs/markdown/_sidebar.md +2 -0
- package/docs/markdown/commands.md +24 -16
- package/docs/markdown/config-inspection.md +1 -1
- package/docs/markdown/config-layers.md +2 -2
- package/docs/markdown/project-recipes.md +17 -6
- package/docs/markdown/repositories-authoring.md +109 -36
- package/docs/markdown/repositories-consuming.md +8 -6
- package/docs/markdown/repositories-contributing.md +16 -17
- package/docs/markdown/repositories-file-formats.md +82 -38
- package/docs/markdown/repositories-providers.md +18 -17
- package/docs/markdown/repositories-quickstart.md +25 -20
- package/docs/markdown/repositories-troubleshooting.md +8 -8
- package/docs/markdown/repositories-variables.md +2 -2
- package/docs/markdown/repositories.md +36 -18
- package/docs/markdown/skill-categories.md +5 -4
- package/package.json +38 -38
- package/recipes/core/sous-skills/skills/about-agent-skills/SKILL.tpl.md +1 -1
- package/recipes/core/sous-skills/skills/about-liquid-templates/SKILL.tpl.md +1 -1
- package/recipes/core/sous-skills/skills/about-sous/SKILL.tpl.md +17 -11
- package/recipes/core/sous-skills/skills/about-sous-configuration/SKILL.tpl.md +8 -1
- package/recipes/core/sous-skills/skills/about-sous-recipes/SKILL.tpl.md +14 -9
- package/recipes/core/sous-skills/skills/about-sous-repos/SKILL.tpl.md +70 -36
- package/recipes/core/sous-skills/skills/create-skill/SKILL.tpl.md +1 -1
- package/recipes/core/sous-skills/sous.recipe.yaml +6 -12
|
@@ -24,7 +24,7 @@ ref := [ repo ":" ] namespace [ "/" recipe [ "@" range ] ]
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
So `workflow` is a whole namespace, `workflow/task-files@^1.2.0` one recipe constrained to a range (npm's
|
|
27
|
-
rules; namespaces are not versioned), and `
|
|
27
|
+
rules; namespaces are not versioned), and `the-pantry:workflow/task-files` that recipe in a named
|
|
28
28
|
repository. Only a consuming project writes the `repo:` qualifier; it is that project's own label.
|
|
29
29
|
|
|
30
30
|
| Thing | Shape |
|
|
@@ -43,15 +43,15 @@ one, the one at the root is used.
|
|
|
43
43
|
|
|
44
44
|
```yaml
|
|
45
45
|
formatVersion: 1 # optional; 1 when given
|
|
46
|
-
name: qa-recipes # suggested short name; a project records its own
|
|
47
|
-
namespaces:
|
|
46
|
+
name: qa-recipes # optional suggested short name; a project records its own
|
|
47
|
+
namespaces: # optional: descriptions only
|
|
48
48
|
workflow:
|
|
49
49
|
description: Recipes about how work moves through a project.
|
|
50
50
|
quality:
|
|
51
51
|
description: Recipes that exercise the edges.
|
|
52
|
-
recipes: #
|
|
52
|
+
recipes: # recipe folders or glob patterns, relative to the repository root
|
|
53
53
|
- recipes/workflow/qa-variables
|
|
54
|
-
- recipes/quality
|
|
54
|
+
- recipes/quality/*
|
|
55
55
|
retired: # optional: replacements for recipes no longer listed above
|
|
56
56
|
quality/qa-old-dep:
|
|
57
57
|
replacements:
|
|
@@ -59,19 +59,59 @@ retired: # optional: replacements for recipes no long
|
|
|
59
59
|
- github://acme/recipes/quality/qa-remote-dep # in another repository
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Only `recipes` is required for the file to be valid
|
|
63
|
-
recipe's namespace under `namespaces`.
|
|
62
|
+
Only `recipes` is required, both for the file to be valid and for `sous repo release`.
|
|
64
63
|
|
|
65
64
|
| Field | Required | Notes |
|
|
66
65
|
|-------|----------|-------|
|
|
67
|
-
| `recipes` | yes | One path, or a list of paths, relative to the repository root
|
|
68
|
-
| `name` |
|
|
69
|
-
| `namespaces` |
|
|
66
|
+
| `recipes` | yes | One path, or a list of paths, relative to the repository root; a single string is read as a list of one, and a path listed twice is an error. A path is a recipe folder or a glob pattern (`recipes/*`), expanded the way a project expands its own [`projectRecipes.paths`](project-recipes.md), in a working tree and in the repository at a tag alike. A pattern that matches no recipe yet is a warning; a listed folder that is missing, or holds no recipe manifest, is an error |
|
|
67
|
+
| `name` | no | A suggestion only; `sous repo add --name` decides what a project calls it. When it is missing, the published data uses the name of the repository's root folder |
|
|
68
|
+
| `namespaces` | no | Descriptions only, keyed by namespace name; each entry takes an optional `description`. A namespace needs no entry here: it exists because a recipe is in it. Describing one namespace here and in a [`sous.namespace.yaml`](#sousnamespaceyaml-a-namespaces-name-and-description) too stops a release, naming both |
|
|
70
69
|
| `description`, `contribute` | no | A summary for anyone reading the repository, and where to send a contribution when a provider cannot support `sous repo submit` |
|
|
71
|
-
| `index`, `published` | no | Where the published data lives: `index` is `embedded`, `tags`, or the path of a `.json` file relative to the repository root, and `published` holds the same data as `sous.index.json` apart from `formatVersion` and `name`. A `published` block beside an `index` of `tags` or a path is an error.
|
|
70
|
+
| `index`, `published` | no | Where the published data lives: `index` is `embedded`, `tags`, or the path of a `.json` file relative to the repository root, and `published` holds the same data as `sous.index.json` apart from `formatVersion` and `name`. A `published` block beside an `index` of `tags` or a path is an error. See [Where the published data lives](#where-the-published-data-lives); a project reads every form ([How a project reads a repository](#how-a-project-reads-a-repository)) |
|
|
72
71
|
| `submissions` | no | Whether the repository's recipes take proposed changes; see [The submissions block](#the-submissions-block) |
|
|
73
72
|
| `retired` | no | Keyed `namespace/recipe`; see [Retired recipes](#retired-recipes) |
|
|
74
73
|
|
|
74
|
+
### Where the published data lives
|
|
75
|
+
|
|
76
|
+
The published data is the catalog of every version the repository has published: what
|
|
77
|
+
[`sous.index.json`](#sousindexjson) holds. `sous repo release` writes it in one of three places, which
|
|
78
|
+
the `index` setting and the files beside the manifest decide:
|
|
79
|
+
|
|
80
|
+
- **Embedded**, in a `published:` block at the end of `sous.repo.yaml`. This is where a repository that
|
|
81
|
+
has published nothing (no `published:` block, and no `sous.index.json` beside the manifest) puts it on
|
|
82
|
+
its first release, so `index: embedded` is allowed but never needed. When a release writes the block, it
|
|
83
|
+
writes the whole manifest again, comments removed, in this layout:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
# Note: Comments are systematically removed from this file.
|
|
87
|
+
formatVersion: 1
|
|
88
|
+
name: qa-recipes
|
|
89
|
+
recipes:
|
|
90
|
+
- recipes/quality/*
|
|
91
|
+
x-team: quality # extension keys come after the fields sous knows
|
|
92
|
+
# Everything below is written by Sous when it publishes recipes. Do not edit it by hand.
|
|
93
|
+
published: # what sous.index.json holds, less formatVersion and name
|
|
94
|
+
generatedAt: "2026-12-03T07:06:33.236Z"
|
|
95
|
+
generator: 1.1.13
|
|
96
|
+
recipes:
|
|
97
|
+
quality/qa-remote-dep:
|
|
98
|
+
path: recipes/quality/qa-remote-dep
|
|
99
|
+
versions: {} # each version, as in sous.index.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The fields you edit come first, in a fixed order (`formatVersion`, `name`, `description`,
|
|
103
|
+
`contribute`, `submissions`, `index`, `namespaces`, `recipes`, `retired`), then any `x-` extension
|
|
104
|
+
keys, then the marker line and `published:`. A manifest written as JSON is written back as JSON, in the
|
|
105
|
+
same order.
|
|
106
|
+
- **In a file**: `sous.index.json` beside the manifest (a repository that already has one keeps using
|
|
107
|
+
it), or the `.json` file `index: <path>` names, relative to the repository root.
|
|
108
|
+
- **Nowhere but the tags**, with `index: tags`. A release never writes an index; the release tags are the
|
|
109
|
+
record. Run on a machine, a release still commits the recipe files it has to change (a raised version,
|
|
110
|
+
a first `1.0.0`, a `sous.namespace.yaml`, a new `sous.repo.yaml`, a dependency added to `recipes`)
|
|
111
|
+
before it tags. With `--ci` it changes no file and makes no commit, and does not push the branch: it
|
|
112
|
+
only creates tags, and pushes them with `--push`. A recipe that would need one of those file changes is
|
|
113
|
+
then an error saying to commit the change first, or to run the release on a machine.
|
|
114
|
+
|
|
75
115
|
### Retired recipes
|
|
76
116
|
|
|
77
117
|
A recipe is retired when the repository stops listing its folder under `recipes`. Nothing else is
|
|
@@ -100,14 +140,14 @@ name: qa-remote-dep
|
|
|
100
140
|
version: 0.1.0
|
|
101
141
|
depends: # 'subscribes' takes the same two spellings
|
|
102
142
|
- workflow/qa-helper
|
|
103
|
-
- github://sous-io/
|
|
143
|
+
- github://sous-io/the-pantry/workflow/sub-agent-delegation@^1.0
|
|
104
144
|
recommends: # offered to the subscriber, who decides
|
|
105
145
|
- quality/lint-rules
|
|
106
146
|
- ref: quality/test-coverage
|
|
107
147
|
reason: >-
|
|
108
148
|
/review flags untested changes much more precisely when the coverage skill is present. Skip it if
|
|
109
149
|
your project has no test suite.
|
|
110
|
-
- ref: github://sous-io/
|
|
150
|
+
- ref: github://sous-io/the-pantry/workflow/task-files@^1.2
|
|
111
151
|
reason: Lets /review attach its findings to the current task file.
|
|
112
152
|
contents: # what a subscriber actually receives
|
|
113
153
|
- kind: skills
|
|
@@ -117,8 +157,8 @@ contents: # what a subscriber actually receives
|
|
|
117
157
|
| Field | Required | Notes |
|
|
118
158
|
|-------|----------|-------|
|
|
119
159
|
| `name` | yes | Unique within the recipe's namespace |
|
|
120
|
-
| `namespace` |
|
|
121
|
-
| `version` |
|
|
160
|
+
| `namespace` | no | The recipe's namespace. A recipe that names none gets one worked out from where it is, in a repository as in a project ([Namespaces](project-recipes.md#namespaces)); before publishing such a recipe for the first time, `sous repo release` may write a `sous.namespace.yaml` beside it so its key never changes (see [Cut a release](repositories-authoring.md#cut-a-release)) |
|
|
161
|
+
| `version` | no | An exact semantic version; the manifest is the source of truth and the git tag follows it. A recipe that names none is released as `1.0.0` the first time, and the release writes `version: 1.0.0` into its manifest. A recipe that has release tags but names no version is an error |
|
|
122
162
|
| `description` | no | Copied into the index at release time; shown by `sous recipe list` and `sous repo search` |
|
|
123
163
|
| `depends`, `subscribes` | no | Build dependencies and co-subscriptions; within either list, no entry may repeat |
|
|
124
164
|
| `recommends` | no | Recipes or namespaces the subscriber is offered, and may decline; each entry is a ref, or `{ ref, reason }` with an optional `reason` shown when sous asks. Needs sous 1.2.0 or later; see [Recommendations](#recommendations) |
|
|
@@ -256,7 +296,7 @@ Both manifests accept a `submissions` block. On `sous.repo.yaml` it covers every
|
|
|
256
296
|
```yaml
|
|
257
297
|
submissions:
|
|
258
298
|
allowed: false # defaults to true
|
|
259
|
-
instead: Propose changes in sous-io/sous, under recipes/core/sous-skills/.
|
|
299
|
+
instead: Propose changes in sous-io/sous, under .sous/recipes/core/sous-skills/.
|
|
260
300
|
```
|
|
261
301
|
|
|
262
302
|
It exists for a recipe whose files are copied in from somewhere else: an edit merged into the copy is
|
|
@@ -288,7 +328,7 @@ older than 1.2.0 refuses a manifest holding it.
|
|
|
288
328
|
### Dependencies named by location
|
|
289
329
|
|
|
290
330
|
`depends`, `subscribes` and `recommends` name their targets by where they live: `workflow/qa-helper` is a sibling in this
|
|
291
|
-
same repository, and `github://sous-io/
|
|
331
|
+
same repository, and `github://sous-io/the-pantry/workflow/sub-agent-delegation@^1.0` is a recipe in
|
|
292
332
|
another one. Every spelling in [Ref forms](#ref-forms) that names a namespace or a recipe is accepted here,
|
|
293
333
|
except a `repo:` qualifier (one project's private name for a repository), a local path or `local://`
|
|
294
334
|
locator (a convenience, not a published location), and a location naming a whole repository with nothing
|
|
@@ -316,7 +356,7 @@ which each place allows. A refused form is an error saying what to write there i
|
|
|
316
356
|
| A bare name | `workflow` | a namespace (on the command line, also a recipe or anything else by that name) |
|
|
317
357
|
| Namespace and recipe | `workflow/alpha` | a recipe |
|
|
318
358
|
| Namespace, spelled out | `workflow/*` | a namespace |
|
|
319
|
-
| Repository-qualified | `
|
|
359
|
+
| Repository-qualified | `the-pantry:workflow/alpha` | a recipe in the repository this project calls `the-pantry` |
|
|
320
360
|
| With a range | `workflow/alpha@^1.2` | a recipe, within an npm-style range |
|
|
321
361
|
| Provider-scheme locator | `github://owner/repo/workflow`, `.../workflow/*`, `.../workflow/alpha` | a namespace or a recipe in that repository |
|
|
322
362
|
| A host other than the provider's own | `gitlab://gitlab.example.com/group/proj/-/workflow/alpha` | the same, on a self-hosted instance |
|
|
@@ -375,9 +415,12 @@ one of its options; `secret: true` with `scope: shared` is refused; the committe
|
|
|
375
415
|
|
|
376
416
|
## `sous.namespace.yaml`: a namespace's name and description
|
|
377
417
|
|
|
378
|
-
Hand-written, in a folder among a project's own recipes (also `.yml`, `.json` or
|
|
379
|
-
|
|
380
|
-
|
|
418
|
+
Hand-written, in a folder among a project's own recipes or a repository's (also `.yml`, `.json` or
|
|
419
|
+
`.jsonc`); `sous repo release` also writes one holding only `name` to keep a published key fixed. A recipe
|
|
420
|
+
below it whose manifest names no namespace belongs to the namespace it names; see
|
|
421
|
+
[Namespaces](project-recipes.md#namespaces). Its `description` describes the namespace its `name` gives, or,
|
|
422
|
+
with no `name`, the namespace named after its folder. One namespace described in two places (two namespace
|
|
423
|
+
files, or a namespace file and `namespaces` in `sous.repo.yaml`) stops a release with an error naming both.
|
|
381
424
|
|
|
382
425
|
```yaml
|
|
383
426
|
name: tooling # optional; lowercase kebab-case
|
|
@@ -386,10 +429,12 @@ description: Helpers for the team's own tools. # optional; shown by sous names
|
|
|
386
429
|
|
|
387
430
|
## `sous.index.json`
|
|
388
431
|
|
|
389
|
-
Machine-written by `sous repo release` and committed beside the recipes it describes
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
432
|
+
Machine-written by `sous repo release` and committed beside the recipes it describes, when the repository
|
|
433
|
+
keeps its published data in a file; the same data, less `formatVersion` and `name`, is what an embedded
|
|
434
|
+
`published:` block holds ([Where the published data lives](#where-the-published-data-lives)). Adding a
|
|
435
|
+
repository reads only the repository manifest and this file; nothing more is downloaded until a project
|
|
436
|
+
subscribes. The data may also be built from the release tags; see
|
|
437
|
+
[How a project reads a repository](#how-a-project-reads-a-repository).
|
|
393
438
|
|
|
394
439
|
```json
|
|
395
440
|
{
|
|
@@ -400,10 +445,10 @@ tags; see [How a project reads a repository](#how-a-project-reads-a-repository).
|
|
|
400
445
|
"versions": { "0.1.0": {
|
|
401
446
|
"dependencies": {
|
|
402
447
|
"workflow/qa-helper": { "range": "^0.1.0", "declared": "workflow", "kind": "subscribes" },
|
|
403
|
-
"workflow/sub-agent-delegation": { "range": "^1.0", "repo": "github.com/sous-io/
|
|
404
|
-
"declared": "github://sous-io/
|
|
448
|
+
"workflow/sub-agent-delegation": { "range": "^1.0", "repo": "github.com/sous-io/the-pantry",
|
|
449
|
+
"declared": "github://sous-io/the-pantry/workflow/sub-agent-delegation@^1.0",
|
|
405
450
|
"kind": "depends" } },
|
|
406
|
-
"depends": [ "github://sous-io/
|
|
451
|
+
"depends": [ "github://sous-io/the-pantry/workflow/sub-agent-delegation@^1.0" ],
|
|
407
452
|
"subscribes": [ "workflow" ],
|
|
408
453
|
"recommends": [
|
|
409
454
|
{ "key": "quality/lint-rules", "range": "^0.3.0", "declared": "quality/lint-rules" },
|
|
@@ -421,9 +466,9 @@ tags; see [How a project reads a repository](#how-a-project-reads-a-repository).
|
|
|
421
466
|
|
|
422
467
|
| Field | Where | Notes |
|
|
423
468
|
|-------|-------|-------|
|
|
424
|
-
| `generatedAt`, `generator`, `name`, `namespaces` | top level | When the index was generated and by which sous version, then the name and
|
|
425
|
-
| `recipes` | top level | Keyed `namespace/recipe
|
|
426
|
-
| `hash`, `tag` | per version | The content hash verified after every fetch, and the tag, which must be exactly `namespace/recipe@version` so a version can never point at a branch |
|
|
469
|
+
| `generatedAt`, `generator`, `name`, `namespaces` | top level | When the index was generated and by which sous version, then the repository's name (the manifest's, else the root folder's) and every namespace a published recipe is in, each with its description when the repository manifest or a `sous.namespace.yaml` gives one. `$comment` is free text, since JSON has no comments, and is ignored on a published index |
|
|
470
|
+
| `recipes` | top level | Keyed `namespace/recipe`. Each entry carries `path` (the recipe folder), `description`, and `versions`, keyed by exact version |
|
|
471
|
+
| `hash`, `tag` | per version | The content hash verified after every fetch, and the tag, which must be exactly `namespace/recipe@version` so a version can never point at a branch. The tag is annotated, and its message carries the same hash on a line of its own, `Sous-Hash: sha256-...` |
|
|
427
472
|
| `prerelease`, `releasedAt`, `seeded` | per version | Whether ranges skip it unless a subscription opts in, when it was released, and whether it is the copy sous folds in from its own package |
|
|
428
473
|
| `dependencies` | per version | The range each dependency may take, keyed `namespace/recipe`; see below |
|
|
429
474
|
| `variables` | per version | The version's variable definitions, exactly as its manifest publishes them (see [Variable definitions](#variable-definitions)), with `required`, `secret` and `scope` filled in; `[]` when it asks nothing |
|
|
@@ -482,8 +527,7 @@ one included. A project pinned to such a sous fails to read that index until it
|
|
|
482
527
|
**Retired recipes.** A release keeps every version a retired recipe published: the entries the committed
|
|
483
528
|
index held, and any version a tag carries that it lacks, rebuilt from the tag (the folder and description
|
|
484
529
|
come from the newest tag when the index never recorded them). A retired version whose tag no longer exists
|
|
485
|
-
is an error, as for a published one. A key is under `recipes` or under `retired`, never both
|
|
486
|
-
recipe's namespace need not be declared any more. Retired recipes sit outside `recipes`, so a namespace
|
|
530
|
+
is an error, as for a published one. A key is under `recipes` or under `retired`, never both. Retired recipes sit outside `recipes`, so a namespace
|
|
487
531
|
never reaches one and a new subscription cannot find one; a subscription or a dependency that already names
|
|
488
532
|
one still resolves to its versions.
|
|
489
533
|
|
|
@@ -492,7 +536,7 @@ define: it reads the index without error and treats a retired recipe as gone, so
|
|
|
492
536
|
restore there, as before, until the project moves to a newer sous.
|
|
493
537
|
|
|
494
538
|
**The `seeded` field.** Sous ships the `core` recipe in its own npm package, so a project can build before
|
|
495
|
-
reaching the network. That copy is folded into the
|
|
539
|
+
reaching the network. That copy is folded into the `sous` repository's published data in memory and resolved like
|
|
496
540
|
any other, marked `seeded: true`; if the repository already publishes it, the published copy wins. Sous
|
|
497
541
|
never writes `seeded` onto a fetched index, and when it writes the placeholder into the index cache it
|
|
498
542
|
stamps a fixed `$comment`, so a later run can tell its own placeholder from a real index and replace it.
|
|
@@ -619,7 +663,7 @@ A cached index's `readFrom` names the file the copy was read from (`sous.repo.ya
|
|
|
619
663
|
The marker makes an entry self-describing, so the store is sweepable without consulting a project:
|
|
620
664
|
|
|
621
665
|
```json
|
|
622
|
-
{ "formatVersion": 1, "repo": "github.com/sous-io/
|
|
666
|
+
{ "formatVersion": 1, "repo": "github.com/sous-io/the-pantry", "namespace": "workflow",
|
|
623
667
|
"name": "sub-agent-delegation", "version": "1.0.0", "sizeBytes": 3032,
|
|
624
668
|
"hash": "sha256-6841b6f61a9a62d84152bc0fcfe246af35b7f75001527d6addf55e51068f8387",
|
|
625
669
|
"fetchedAt": "2026-09-12T07:06:57.123Z", "lastAccessAt": "2026-09-12T07:06:57.292Z" }
|
|
@@ -652,8 +696,8 @@ These live at the top level of the merged config; [The config file](configuratio
|
|
|
652
696
|
|
|
653
697
|
```yaml
|
|
654
698
|
repos:
|
|
655
|
-
|
|
656
|
-
url: https://github.com/sous-io/
|
|
699
|
+
the-pantry:
|
|
700
|
+
url: https://github.com/sous-io/the-pantry
|
|
657
701
|
provider: github # inferred from the URL when omitted; github, gitlab, local, or a host a plugin adds
|
|
658
702
|
enabled: true # false opts out of a repository sous provides itself
|
|
659
703
|
alwaysPull: false # install a newer in-range version rather than holding the lock
|
|
@@ -684,7 +728,7 @@ projectRecipes: # the project's own recipes; both values are the defa
|
|
|
684
728
|
|-----|----------|-------|
|
|
685
729
|
| `repos` | the short name refs use | Adding a repository IS trusting it, and removing the entry withdraws that trust. The name `project` is reserved for the project's own recipes and is an error here |
|
|
686
730
|
| `subscriptions` | a ref key | A bare namespace (every recipe in it, including ones published later) or `namespace/recipe`. No repo qualifier and no range in the key |
|
|
687
|
-
| `enabled: false` | either of the two above | The opt-out for the entries sous provides itself
|
|
731
|
+
| `enabled: false` | either of the two above | The opt-out for the entries sous provides itself: the `the-pantry` repository and the `core` subscription. The `sous` repository cannot be switched off. An entry that holds only `enabled: false` needs no `url` |
|
|
688
732
|
| `declinedRecommendations` | a list | `string[]`, empty by default. Each entry is a recommended recipe or namespace the project declined, in canonical form (`namespace/recipe` or `namespace`); see [Recommended recipes](repositories-consuming.md#recommended-recipes) |
|
|
689
733
|
| `store` | fixed fields | Plain numbers, all optional; the values sous ships are defaults, not assumptions |
|
|
690
734
|
| `recipes` | content kind | What each kind does; see [recipes: what each content kind does](#recipes-what-each-content-kind-does) |
|
|
@@ -46,9 +46,9 @@ When you name a repository, sous tries each provider in turn (`github`, then `gi
|
|
|
46
46
|
Three spellings of a hosted URL are all understood, because all three are what people paste:
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
|
-
https://github.com/sous-io/
|
|
50
|
-
git@github.com:sous-io/
|
|
51
|
-
ssh://git@github.com/sous-io/
|
|
49
|
+
https://github.com/sous-io/the-pantry
|
|
50
|
+
git@github.com:sous-io/the-pantry.git
|
|
51
|
+
ssh://git@github.com/sous-io/the-pantry
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
A trailing slash and a trailing `.git` are dropped before anything else happens, and the scheme
|
|
@@ -76,7 +76,7 @@ A named provider is honored for any host nobody recognizes. It is refused only w
|
|
|
76
76
|
**different** provider plainly owns the URL, because that is a contradiction rather than a hint:
|
|
77
77
|
|
|
78
78
|
```text
|
|
79
|
-
Error: The gitlab provider does not handle https://github.com/sous-io/
|
|
79
|
+
Error: The gitlab provider does not handle https://github.com/sous-io/the-pantry; that is a
|
|
80
80
|
github URL, which the github provider handles.
|
|
81
81
|
Drop '--provider' and let sous work it out, or name 'github'.
|
|
82
82
|
```
|
|
@@ -94,10 +94,11 @@ Error: Sous does not recognize the host in the repository URL
|
|
|
94
94
|
`sous repo list` shows which provider each trusted repository resolved to:
|
|
95
95
|
|
|
96
96
|
```text
|
|
97
|
-
Repository
|
|
98
|
-
|
|
99
|
-
qa-recipes
|
|
100
|
-
sous
|
|
97
|
+
Repository Provider Origin Linked Recipes URL
|
|
98
|
+
---------- -------- -------- ------ ----------- ---------------------------------------
|
|
99
|
+
qa-recipes local user no 0 /home/me/Projects/qa-recipes
|
|
100
|
+
sous github built in no not fetched https://github.com/sous-io/sous
|
|
101
|
+
the-pantry github built in no not fetched https://github.com/sous-io/the-pantry
|
|
101
102
|
```
|
|
102
103
|
|
|
103
104
|
## Repository identity
|
|
@@ -106,7 +107,7 @@ Canonicalizing a URL produces the repository's **identity**, `<host>/<owner path
|
|
|
106
107
|
lowercased and with any `.git` suffix gone:
|
|
107
108
|
|
|
108
109
|
```text
|
|
109
|
-
github.com/sous-io/
|
|
110
|
+
github.com/sous-io/the-pantry
|
|
110
111
|
gitlab.example.com/group/subgroup/project
|
|
111
112
|
localhost/home/me/projects/my-recipes
|
|
112
113
|
```
|
|
@@ -117,13 +118,13 @@ every machine-wide thing keys by:
|
|
|
117
118
|
|
|
118
119
|
| Keyed by identity | Looks like |
|
|
119
120
|
|---|---|
|
|
120
|
-
| the store entry | `~/.sous/cache/github.com/sous-io/
|
|
121
|
-
| the cached index | `~/.sous/cache/_indexes/github.com/sous-io/
|
|
122
|
-
| the index sidecar | `~/.sous/cache/_indexes/github.com/sous-io/
|
|
123
|
-
| the tags of a repository that publishes through them | `~/.sous/cache/_tags/github.com/sous-io/
|
|
124
|
-
| the lockfile's `identity` field | `github.com/sous-io/
|
|
121
|
+
| the store entry | `~/.sous/cache/github.com/sous-io/the-pantry/<namespace>/<recipe>/<version>/` |
|
|
122
|
+
| the cached index | `~/.sous/cache/_indexes/github.com/sous-io/the-pantry.json` |
|
|
123
|
+
| the index sidecar | `~/.sous/cache/_indexes/github.com/sous-io/the-pantry.meta.json` |
|
|
124
|
+
| the tags of a repository that publishes through them | `~/.sous/cache/_tags/github.com/sous-io/the-pantry.git` and `.json` |
|
|
125
|
+
| the lockfile's `identity` field | `github.com/sous-io/the-pantry` |
|
|
125
126
|
|
|
126
|
-
A repository's **short name** (`
|
|
127
|
+
A repository's **short name** (`the-pantry`) is something your project chose, and it keys
|
|
127
128
|
nothing shared: two projects may call one repository different things, and two may use one name
|
|
128
129
|
for different repositories. Keying by identity is what lets them share one cached copy without
|
|
129
130
|
colliding. See [The store on disk](repositories-file-formats.md#the-store-on-disk).
|
|
@@ -135,7 +136,7 @@ the `local` provider the HTTPS slot carries the absolute directory, because that
|
|
|
135
136
|
when a recipe is fetched.
|
|
136
137
|
|
|
137
138
|
?> A published manifest names a dependency in another repository by location, such as a locator
|
|
138
|
-
whose scheme is the provider's identifier: `github://sous-io/
|
|
139
|
+
whose scheme is the provider's identifier: `github://sous-io/the-pantry/workflow/sat@^1.1`. A
|
|
139
140
|
first segment containing a dot is read as the host, so `gitlab://gitlab.example.com/group/project/-/ns/recipe`
|
|
140
141
|
addresses a self-hosted instance; without one, the provider's public host is assumed. Where a
|
|
141
142
|
repository path ends, and what a browser URL's path looks like, is each provider's own rule, so a URL
|
|
@@ -301,7 +302,7 @@ anything is written and prints the repository's own contribution route instead:
|
|
|
301
302
|
```text
|
|
302
303
|
Error: The 'local' provider cannot propose a change on your behalf.
|
|
303
304
|
This repository asks that changes be sent this way:
|
|
304
|
-
https://github.com/sous-io/
|
|
305
|
+
https://github.com/sous-io/the-pantry/blob/main/CONTRIBUTING.md
|
|
305
306
|
```
|
|
306
307
|
|
|
307
308
|
That second line is the `contribute` field from the repository's `sous.repo.yaml`; sous prints it
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Repositories Quickstart
|
|
2
2
|
|
|
3
3
|
Twelve steps take you from an empty directory to a project whose agent skills come from the
|
|
4
|
-
official repository and from a repository you wrote yourself, with a lockfile
|
|
5
|
-
restore from. Budget about ten minutes.
|
|
4
|
+
official recipe repository (`the-pantry`) and from a repository you wrote yourself, with a lockfile
|
|
5
|
+
a colleague can restore from. Budget about ten minutes.
|
|
6
6
|
|
|
7
7
|
This page is the guided tour; [Repositories](repositories.md) explains the model behind it, and
|
|
8
8
|
[Consuming recipes](repositories-consuming.md) and
|
|
@@ -73,14 +73,15 @@ sous recipe list
|
|
|
73
73
|
```text
|
|
74
74
|
Recipe Repository Latest Pinned Subscribed What it is
|
|
75
75
|
-------------------------- ------------ ------ ------ ---------- ------------------------------
|
|
76
|
-
communication/control-flow
|
|
77
|
-
core/sous-skills sous
|
|
78
|
-
workflow/task-files
|
|
76
|
+
communication/control-flow the-pantry 1.0.0 no Generic interaction skills
|
|
77
|
+
core/sous-skills sous 0.2.0 0.2.0 yes What sous is, and how it works
|
|
78
|
+
workflow/task-files the-pantry 1.0.2 no Per-branch task files
|
|
79
79
|
...
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
This reads the cached index of every repository the project trusts, so it works offline and
|
|
83
|
-
downloads nothing.
|
|
83
|
+
downloads nothing. Both built-in repositories are trusted out of the box: `sous`, which publishes
|
|
84
|
+
`core`, and `the-pantry`, the official recipe repository.
|
|
84
85
|
|
|
85
86
|
Before subscribing to something, read it:
|
|
86
87
|
|
|
@@ -89,7 +90,7 @@ sous recipe show workflow/task-files
|
|
|
89
90
|
```
|
|
90
91
|
|
|
91
92
|
```text
|
|
92
|
-
Repository :
|
|
93
|
+
Repository : the-pantry
|
|
93
94
|
Latest version : 1.0.2
|
|
94
95
|
Subscribed : no
|
|
95
96
|
...
|
|
@@ -116,8 +117,8 @@ two questions:
|
|
|
116
117
|
➔ What was installed:
|
|
117
118
|
Recipe Version Repository Why
|
|
118
119
|
----------------------------- ------- ------------ --------------------------
|
|
119
|
-
workflow/sub-agent-delegation 1.0.0
|
|
120
|
-
workflow/task-files 1.0.2
|
|
120
|
+
workflow/sub-agent-delegation 1.0.0 the-pantry needed by workflow/task-files
|
|
121
|
+
workflow/task-files 1.0.2 the-pantry you subscribed to it
|
|
121
122
|
|
|
122
123
|
➔ Answers stored:
|
|
123
124
|
taskFileRoot : .sous/tasks TASK_FILE_ROOT in .env
|
|
@@ -182,7 +183,7 @@ On GitLab (an `origin` remote on GitLab, or `--host gitlab`) the scaffold writes
|
|
|
182
183
|
`SOUS_RELEASE_TOKEN`; see [the scaffolded workflow](repositories-authoring.md#the-scaffolded-workflow). The
|
|
183
184
|
output goes on with what `sous init` writes and with its first build, which compiles the
|
|
184
185
|
memories file. The scaffold validates as written, and never replaces a file that already exists
|
|
185
|
-
(`--overwrite` does). `sous.repo.yaml`
|
|
186
|
+
(`--overwrite` does). `sous.repo.yaml` describes the namespaces and lists the recipe folders; each folder's
|
|
186
187
|
`sous.recipe.yaml` is one recipe, with its own version, and is heavily commented. To publish recipes from a
|
|
187
188
|
project you already have instead, run `sous repo init --for-project` in it; see
|
|
188
189
|
[Publish a project's own recipes](repositories-authoring.md#publish-a-projects-own-recipes).
|
|
@@ -211,8 +212,9 @@ second recipe; its path goes in the `recipes` list at the root.
|
|
|
211
212
|
|
|
212
213
|
## 8. Release it
|
|
213
214
|
|
|
214
|
-
Releasing reads versions from the recipe manifests,
|
|
215
|
-
the repository has to be a git repository with your
|
|
215
|
+
Releasing reads versions from the recipe manifests, writes the published data (the catalog of
|
|
216
|
+
versions projects read), commits and tags, so the repository has to be a git repository with your
|
|
217
|
+
work committed:
|
|
216
218
|
|
|
217
219
|
```bash
|
|
218
220
|
cd ~/projects/my-recipes
|
|
@@ -228,15 +230,18 @@ the run would do, and asks once.
|
|
|
228
230
|
...
|
|
229
231
|
▶ Publishing:
|
|
230
232
|
workflow/example: publishing version 0.1.0.
|
|
231
|
-
|
|
233
|
+
written sous.repo.yaml
|
|
232
234
|
Committed: Release workflow/example@0.1.0
|
|
233
235
|
Created the tag workflow/example@0.1.0.
|
|
234
236
|
```
|
|
235
237
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
The published data goes into a `published:` block at the end of `sous.repo.yaml`, because the
|
|
239
|
+
repository has published nothing before; see
|
|
240
|
+
[Where the published data lives](repositories-file-formats.md#where-the-published-data-lives) for
|
|
241
|
+
the other places it can go. Add `--push` to push the commit and the tags in the same run, and
|
|
242
|
+
`--yes` to accept the plan without being asked, which is what the scaffolded workflow does. Never
|
|
243
|
+
edit the `published:` block by hand; the recipe manifests are the source of truth for versions, and
|
|
244
|
+
this command writes the catalog from them. `sous repo release --check` validates without publishing, and runs on a pull
|
|
240
245
|
request.
|
|
241
246
|
|
|
242
247
|
## 9. Add your repository to the project
|
|
@@ -285,9 +290,9 @@ sous subscription add workflow/example
|
|
|
285
290
|
workflow/example 0.1.0 my-recipes you subscribed to it
|
|
286
291
|
```
|
|
287
292
|
|
|
288
|
-
Your skill is now in `.claude/skills/` beside the ones from the official repository
|
|
289
|
-
a recipe's files is special once they are on disk, and nothing
|
|
290
|
-
else's.
|
|
293
|
+
Your skill is now in `.claude/skills/` beside the ones from the official recipe repository
|
|
294
|
+
(`the-pantry`). Nothing about a recipe's files is special once they are on disk, and nothing
|
|
295
|
+
distinguishes yours from anyone else's.
|
|
291
296
|
|
|
292
297
|
## 11. Commit the lockfile
|
|
293
298
|
|
|
@@ -10,7 +10,7 @@ lines under the first sentence of a failure, because that is where the remedy is
|
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
12
|
Error: None of this project's repositories publishes the recipe 'workflow/nope'.
|
|
13
|
-
Checked just now: qa-recipes,
|
|
13
|
+
Checked just now: qa-recipes, the-pantry.
|
|
14
14
|
Check the spelling, or run 'sous repo search nope' to look for it. If a repository this project
|
|
15
15
|
has not added publishes it, add that one with 'sous repo add <url>'.
|
|
16
16
|
```
|
|
@@ -43,8 +43,8 @@ Error: Sous has to ask which 'task-files' you meant, and it is not running where
|
|
|
43
43
|
'task-files' matched 2 things:
|
|
44
44
|
acme:workflow/task-files (the recipe 'task-files' in the namespace 'workflow' of the
|
|
45
45
|
repository 'acme')
|
|
46
|
-
|
|
47
|
-
the repository '
|
|
46
|
+
the-pantry:workflow/task-files (the recipe 'task-files' in the namespace 'workflow' of
|
|
47
|
+
the repository 'the-pantry')
|
|
48
48
|
Answer it ahead of time: write the full reference (for example 'acme:workflow/task-files'), or
|
|
49
49
|
pass '--accept-first' to take the first candidate listed above.
|
|
50
50
|
```
|
|
@@ -217,7 +217,7 @@ fatal: unable to access 'https://github.com/acme/recipes/': Could not resolve ho
|
|
|
217
217
|
## A store entry that fails its hash
|
|
218
218
|
|
|
219
219
|
```text
|
|
220
|
-
The cached copy of github.com/sous-io/sous
|
|
220
|
+
The cached copy of github.com/sous-io/sous:core/sous-skills@0.2.0 did not match its
|
|
221
221
|
recorded content hash, so it was removed from the store and will be fetched again.
|
|
222
222
|
```
|
|
223
223
|
|
|
@@ -256,10 +256,10 @@ same rule.
|
|
|
256
256
|
## Core skills missing after a sous upgrade
|
|
257
257
|
|
|
258
258
|
Every project is subscribed to the `core` namespace, and the matching recipe ships inside the sous
|
|
259
|
-
package, so a first run with no network still gets it. Right after an upgrade the
|
|
260
|
-
|
|
261
|
-
into that repository's
|
|
262
|
-
[The
|
|
259
|
+
package, so a first run with no network still gets it. Right after an upgrade the `sous` repository
|
|
260
|
+
has usually not published the matching version yet, so sous folds the packaged version
|
|
261
|
+
into that repository's published data in memory and leaves the cache untouched; see
|
|
262
|
+
[The built-in repositories](repositories.md#the-built-in-repositories-and-core). Seeding
|
|
263
263
|
never fails a build, and when it genuinely fails it says so and carries on:
|
|
264
264
|
|
|
265
265
|
```text
|
|
@@ -287,8 +287,8 @@ sous vars ask taskFileRoot # one variable, by the name its
|
|
|
287
287
|
sous vars ask SOUS_VAR_TASK_FILE_ROOT # the same one, by a name in use that answers it
|
|
288
288
|
sous vars ask workflow/task-files.taskFileRoot # the same one, spelled out in full
|
|
289
289
|
sous vars ask task-files # every question one recipe asks
|
|
290
|
-
sous vars ask
|
|
291
|
-
sous vars ask https://github.com/sous-io/
|
|
290
|
+
sous vars ask the-pantry # every question that repository's recipes ask
|
|
291
|
+
sous vars ask https://github.com/sous-io/the-pantry/tree/main/recipes/workflow/task-files
|
|
292
292
|
# the same recipe, as a URL copied from the browser
|
|
293
293
|
```
|
|
294
294
|
|
|
@@ -5,7 +5,7 @@ an ordinary git repository holding a few manifest files and some markdown, and s
|
|
|
5
5
|
way a package manager reads a registry: an index says what exists, a project says what it wants,
|
|
6
6
|
and a lockfile records exactly what it got.
|
|
7
7
|
|
|
8
|
-
This page is the map: the vocabulary the system is built from, the
|
|
8
|
+
This page is the map: the vocabulary the system is built from, the two repositories every
|
|
9
9
|
project starts with, how a single build fits them together, and where every file lands on disk.
|
|
10
10
|
The task-oriented guides are listed at the bottom.
|
|
11
11
|
|
|
@@ -66,7 +66,7 @@ contents:
|
|
|
66
66
|
|
|
67
67
|
A recipe is named by a **ref**: `workflow` for a whole namespace, `workflow/task-files` for one
|
|
68
68
|
recipe, `workflow/task-files@^1.2.0` to constrain the version, and
|
|
69
|
-
`
|
|
69
|
+
`the-pantry:workflow/task-files` when two trusted repositories publish the same ref and sous
|
|
70
70
|
needs to be told which one you meant. A one-word ref is a guess at a name, and sous works it out:
|
|
71
71
|
a namespace first, a recipe second, across every repository the project trusts. The full grammar
|
|
72
72
|
is in [Refs: how anything is named](repositories-file-formats.md#refs-how-anything-is-named).
|
|
@@ -99,7 +99,7 @@ questions the target publishes are asked (see [Recipe variables](repositories-va
|
|
|
99
99
|
```yaml
|
|
100
100
|
depends:
|
|
101
101
|
- workflow/qa-helper # a sibling in this repository
|
|
102
|
-
- github://sous-io/
|
|
102
|
+
- github://sous-io/the-pantry/workflow/task-files@^1.0 # one in another repository
|
|
103
103
|
subscribes:
|
|
104
104
|
- quality/code-review
|
|
105
105
|
```
|
|
@@ -161,8 +161,8 @@ every entry is re-fetchable from the pins in some project's lockfile, so deletin
|
|
|
161
161
|
download and nothing else.
|
|
162
162
|
|
|
163
163
|
```text
|
|
164
|
-
~/.sous/cache/github.com/sous-io/
|
|
165
|
-
~/.sous/cache/_indexes/github.com/sous-io/
|
|
164
|
+
~/.sous/cache/github.com/sous-io/the-pantry/workflow/task-files/1.0.3/
|
|
165
|
+
~/.sous/cache/_indexes/github.com/sous-io/the-pantry.json
|
|
166
166
|
```
|
|
167
167
|
|
|
168
168
|
`sous repo gc` collects the store back to a size cap, least recently used first, never evicting
|
|
@@ -230,17 +230,22 @@ variables are not asked, and its pins stay in the committed lockfile. `sous subs
|
|
|
230
230
|
and `sous subscription enable <ref>` switch one off and on for everyone, because they edit the
|
|
231
231
|
committed `conf.d/510-subscriptions.jsonc`.
|
|
232
232
|
|
|
233
|
-
## The
|
|
233
|
+
## The built-in repositories, and core
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
Every project trusts two repositories without `sous repo add`:
|
|
236
|
+
|
|
237
|
+
- **`sous`** ([`sous-io/sous`](https://github.com/sous-io/sous)), the sous repository itself. It
|
|
238
|
+
publishes one namespace, `core`, and its one recipe, `core/sous-skills`. It cannot be switched
|
|
239
|
+
off.
|
|
240
|
+
- **`the-pantry`** ([`sous-io/the-pantry`](https://github.com/sous-io/the-pantry)), the official
|
|
241
|
+
recipe repository. Its namespaces are drawn from the canonical [skill categories](skill-categories.md).
|
|
242
|
+
Nothing in it is subscribed until you subscribe to it.
|
|
238
243
|
|
|
239
244
|
`core` is the exception. It holds the skills that teach an agent what sous is, why generated files
|
|
240
245
|
must not be hand-edited and where the source of a managed file lives; without them an agent will
|
|
241
|
-
cheerfully edit a compiled `CLAUDE.md`. So
|
|
242
|
-
|
|
243
|
-
|
|
246
|
+
cheerfully edit a compiled `CLAUDE.md`. So `core` is subscribed in every project, pinned to the
|
|
247
|
+
sous CLI version you are running, and a copy ships inside the package and seeds the store on first
|
|
248
|
+
run, so a fresh install needs no network at all.
|
|
244
249
|
|
|
245
250
|
```term
|
|
246
251
|
$ sous subscription list
|
|
@@ -252,13 +257,26 @@ $ sous subscription list
|
|
|
252
257
|
workflow/qa-helper any version workflow/qa-helper 0.1.0 user yes
|
|
253
258
|
```
|
|
254
259
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
260
|
+
These are ordinary config entries a person could have written by hand:
|
|
261
|
+
|
|
262
|
+
- `subscriptions: { core: { enabled: false } }` is the only way to drop `core`.
|
|
263
|
+
`sous subscription remove core` writes it for you, keeping core's pin in the lockfile, and
|
|
264
|
+
`sous subscription add core` clears it again. See
|
|
265
|
+
[Opt out of `core`](repositories-consuming.md#opt-out-of-core) for what you give up.
|
|
266
|
+
- `repos: { "the-pantry": { enabled: false } }` switches the official recipe repository off.
|
|
267
|
+
- `repos: { sous: { enabled: false } }` is a config error that names the `core` setting above.
|
|
268
|
+
|
|
269
|
+
**Upgrading from `sous-recipes`.** [`sous-recipes`](https://github.com/sous-io/sous-recipes) is no
|
|
270
|
+
longer built in; each of its recipes is retired and names its new home. The first command a project
|
|
271
|
+
runs with sous 1.3.0 or later runs a migration that moves each pin to the same recipe in
|
|
272
|
+
`the-pantry`, at the newest version it publishes (one patch above the last `sous-recipes` version:
|
|
273
|
+
1.4.2 becomes 1.4.3), drops the `core` pin so the next build pins `core` from `sous`, raises an
|
|
274
|
+
exact version in a subscription to the new one (a range that still matches is left alone), and
|
|
275
|
+
adds `repos.the-pantry.enabled: false` beside any `repos.sous-recipes.enabled: false`. It reads
|
|
276
|
+
`the-pantry` once, so it needs the network; see [`sous migrate`](commands.md#sous-migrate).
|
|
259
277
|
|
|
260
278
|
?> Subscribe to a whole namespace when it is one coherent set your team owns end to end. In the
|
|
261
|
-
official repository, prefer subscribing to recipes one at a time, so a recipe published later
|
|
279
|
+
official recipe repository, prefer subscribing to recipes one at a time, so a recipe published later
|
|
262
280
|
does not arrive in your project unasked. `core` is the deliberate exception.
|
|
263
281
|
|
|
264
282
|
## One build, end to end
|
|
@@ -407,4 +425,4 @@ listed it), the error names it:
|
|
|
407
425
|
- [Repository file formats](repositories-file-formats.md): every manifest, index and schema
|
|
408
426
|
- [Command reference](commands.md): every command and flag
|
|
409
427
|
- [Troubleshooting](repositories-troubleshooting.md): what the errors mean and how to clear them
|
|
410
|
-
- [Skill categories](skill-categories.md): the category list the official repository uses
|
|
428
|
+
- [Skill categories](skill-categories.md): the category list the official recipe repository uses
|