@sous-io/sous 1.1.13 → 1.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.
@@ -86,3 +86,4 @@
86
86
  - [0041: A target one harness's build holds reaches that harness](adrs/0041-harness-only-targets.md)
87
87
  - [0042: Retired recipes stay in the index and name their replacements](adrs/0042-retired-recipes.md)
88
88
  - [0043: Every command runs the waiting migrations first](adrs/0043-migrations-before-every-command.md)
89
+ - [0044: A recipe can recommend other recipes, and sous asks before subscribing to them](adrs/0044-recipe-recommendations.md)
@@ -23,7 +23,11 @@ finds by walking up from the working directory.
23
23
 
24
24
  - `-y, --yes` answers yes to every confirmation the command would ask, and runs any
25
25
  [waiting migrations](#sous-migrate) without asking, taking each question's default. Every command takes it.
26
- `-f`, `--force` and, on the commands that trust a repository, `--trust` are the same flag.
26
+ `-f`, `--force` and, on the commands that trust a repository, `--trust` are the same flag. It does not accept a
27
+ recipe's [recommendations](repositories-consuming.md#recommended-recipes); `--accept-recommendations` does.
28
+ - `--accept-recommendations` and `--decline-recommendations`, on `subscription add` and `update`, subscribe to
29
+ or decline every recipe a subscribed recipe recommends, without asking. Without a terminal and without
30
+ either, a recommendation stays pending and the output lists it; the command does not fail.
27
31
  - `--skip-failed-migrations` skips a waiting migration that fails, or asks a question nothing answers, and runs
28
32
  the command anyway. The skipped migration is not recorded as run: the next command tries it again. Every
29
33
  command takes it.
@@ -422,8 +426,8 @@ sous launch claude-code -- -c
422
426
 
423
427
  ### `sous search TEXT`
424
428
 
425
- Searches the recipes every trusted repository publishes, by name or description. Also spelled
426
- `sous repo search`.
429
+ Searches the recipes every trusted repository publishes, by name or description. A result lists the recipes
430
+ it recommends. Also spelled `sous repo search`.
427
431
 
428
432
  ```bash
429
433
  sous search task
@@ -434,7 +438,10 @@ sous search task
434
438
  Moves the lockfile's pins to the newest versions their ranges allow, then rebuilds: every subscription, or only
435
439
  the repository, namespace or recipe `REF` names. `--dry-run` prints the plan and changes nothing. It asks before
436
440
  it changes anything and before trusting a repository a newer version needs; `--yes` answers yes, and
437
- `--answer <name>=<value>` or `--answers-file <path>` answer a new version's questions ahead of time.
441
+ `--answer <name>=<value>` or `--answers-file <path>` answer a new version's questions ahead of time. Every
442
+ recommendation the project has not answered yet is offered, whether a newer version brings it or an earlier run left
443
+ it pending, and the plan lists them; `--accept-recommendations` or `--decline-recommendations` answers them ahead of
444
+ time, and `--yes` does not.
438
445
  `sous subscription update` and `sous recipe update` are other spellings of it. See
439
446
  [Moving to newer versions](repositories-consuming.md#moving-to-newer-versions).
440
447
 
@@ -674,7 +681,9 @@ Publishes new versions of the repository's recipes: raises their versions, regen
674
681
  tags. It plans first and asks once, and it needs a git commit identity (`user.name` and `user.email`) in the
675
682
  repository. `--check` only validates, and `--ci` is the setting for a merge job. A recipe the repository no
676
683
  longer lists keeps its published versions in the index, marked retired, with any replacements `sous.repo.yaml`
677
- names (see [Retire or move a recipe](repositories-authoring.md#retire-or-move-a-recipe)).
684
+ names (see [Retire or move a recipe](repositories-authoring.md#retire-or-move-a-recipe)). It warns about every
685
+ recipe that uses `recommends`, which needs sous 1.2.0 or later in every subscribing project (see
686
+ [Recommend other recipes](repositories-authoring.md#recommend-other-recipes)).
678
687
 
679
688
  ```bash
680
689
  sous repo release --recipe workflow/task-files --bump minor --push
@@ -704,7 +713,10 @@ Manages which recipes the project subscribes to. `REF` is `namespace` or `namesp
704
713
  trust, the subscription, the lockfile and the answers written, so a failed subscription, a declined question
705
714
  or Ctrl-C leaves the project as it was. Without `@<range>` the subscription accepts any version,
706
715
  so an update may move it to a new major version; the plan shown before the question, and the result, name
707
- the range recorded.
716
+ the range recorded. A recipe it installs may recommend others; each is offered, with its reason, and
717
+ `--accept-recommendations` or `--decline-recommendations` answers every one ahead of time (see
718
+ [Recommended recipes](repositories-consuming.md#recommended-recipes)). A declined one is recorded under
719
+ `declinedRecommendations`, and adding it later with `subscription add` removes it from there.
708
720
  - `subscription remove` (or `sous unsubscribe`) removes a subscription and everything only it brought in. The
709
721
  built-in `core` subscription is switched off instead, keeping its pin.
710
722
  - `subscription update [REF]` is [`sous update`](#sous-update-ref).
@@ -730,8 +742,8 @@ explaining the repository `project`.
730
742
  - `namespace show REF` lists one namespace's recipes, with their latest and pinned versions.
731
743
  - `recipe list` lists every recipe, across every namespace. A description takes at most three lines, the
732
744
  third ending in `...` when more is left out; `recipe show` prints it whole.
733
- - `recipe show REF` describes one recipe completely: its versions, dependencies, the questions it asks and where
734
- its files go, even before anything installs it.
745
+ - `recipe show REF` describes one recipe completely: its versions, dependencies, recommendations, the questions it
746
+ asks and where its files go, even before anything installs it.
735
747
 
736
748
  ```bash
737
749
  sous namespace show sous-recipes:core
@@ -456,6 +456,23 @@ Two more keys settle what plugins do:
456
456
  `sous plugins show` lists every plugin and what it adds. Recipes may ship plugins too; see
457
457
  [where plugins come from](architecture/specifications/S1-engine.md#where-plugins-come-from).
458
458
 
459
+ ## Declined recommendations
460
+
461
+ `declinedRecommendations` (`string[]`, default `[]`) lists the recipes this project said no to when a
462
+ subscribed recipe [recommended](repositories-consuming.md#recommended-recipes) them, so sous does not offer
463
+ them again. Each entry is a recipe (`namespace/recipe`) or a whole namespace (`namespace`), in canonical form.
464
+
465
+ Sous writes it to `.sous/conf.d/510-subscriptions.jsonc` when you decline a recommendation, or pass
466
+ `--decline-recommendations` to `sous subscription add` or `sous update`. `sous subscription add` with a
467
+ declined ref removes that entry. You may edit the list by hand too; once an entry is deleted, sous offers
468
+ that recommendation again the next time a subscription or an update brings it.
469
+
470
+ ```jsonc
471
+ {
472
+ "declinedRecommendations": ["quality/lint-rules", "workflow"]
473
+ }
474
+ ```
475
+
459
476
  ## Outputs, the state file and backups
460
477
 
461
478
  Sous records every file it writes in the state file, `.sous/sous.state.json` by default
@@ -316,6 +316,36 @@ short names are refused: a local repository is a consumer's convenience, and a s
316
316
  private label. See [Dependencies named by location](repositories-file-formats.md#dependencies-named-by-location)
317
317
  and every accepted spelling in [Ref forms](repositories-file-formats.md#ref-forms).
318
318
 
319
+ ### Recommend other recipes
320
+
321
+ `recommends` names recipes that make yours work better but that it does not need. Sous offers each one to the
322
+ subscriber, showing your `reason`, and subscribes to it only when the subscriber says yes; a subscriber who says
323
+ no is not asked again. Use it for anything a subscriber could reasonably do without, and keep `subscribes` for
324
+ what your recipe cannot work without.
325
+
326
+ ```yaml
327
+ recommends:
328
+ - quality/lint-rules
329
+ - ref: quality/test-coverage
330
+ reason: >-
331
+ /review flags untested changes much more precisely when the coverage skill is present. Skip it if your
332
+ project has no test suite.
333
+ - ref: github://sous-io/sous-recipes/workflow/task-files@^1.2
334
+ reason: Lets /review attach its findings to the current task file.
335
+ ```
336
+
337
+ An entry is a ref, written exactly as a `subscribes` entry is, or `{ ref, reason }`. Write the `reason` for
338
+ someone deciding whether to say yes: what the other recipe adds to yours, and when to skip it. It is shown
339
+ shortened when it is long, so put the point in its first sentence.
340
+
341
+ !> A sous older than 1.2.0 refuses a manifest that holds `recommends`, so every subscriber needs sous 1.2.0 or
342
+ later once your recipe uses it. `sous repo release` warns about each recipe that does.
343
+
344
+ A recommended recipe may be missing, because the subscriber declined it, so a recommendation gives your
345
+ templates nothing: an include line resolves only against your recipe and what it lists under `depends` or
346
+ `subscribes`, and a recommended recipe's questions are asked only when the subscriber accepts it. Write your
347
+ instructions so they still read correctly without it ("if the task-files skill is present, ...").
348
+
319
349
  ## Cut a release
320
350
 
321
351
  `sous repo release` publishes new versions: one run raises versions, regenerates `sous.index.json`, commits both,
@@ -122,7 +122,8 @@ major version; with one, it stays in that range. The plan shown before the quest
122
122
  both name the range recorded (`any version`, or `^1.2.0`).
123
123
 
124
124
  A few flags change how it runs: `--yes` answers yes to the subscribe confirmation and the trust
125
- question, `--answer <name>=<value>` answers a recipe's question ahead of time, `--dry-run` prints what
125
+ question (but not to [recommendations](#recommended-recipes)), `--accept-recommendations` and
126
+ `--decline-recommendations` answer every recommendation, `--answer <name>=<value>` answers a recipe's question ahead of time, `--dry-run` prints what
126
127
  would be installed without writing or downloading anything, and `--non-interactive` fails instead of
127
128
  asking, naming the flag that would have answered. `sous subscription add --help` lists every flag.
128
129
 
@@ -186,6 +187,50 @@ like `workflow/qa-helper` above, is fetched and pinned but stays out of your out
186
187
  lists have their questions asked. See
187
188
  [Dependencies](repositories.md#dependencies).
188
189
 
190
+ ### Recommended recipes
191
+
192
+ A recipe may recommend other recipes: ones that make it work better but that it does not need. Sous asks
193
+ about each one, showing the recipe author's reason, and subscribes to it only when you say yes. It asks:
194
+
195
+ - when `sous subscription add` subscribes to a recipe that recommends others;
196
+ - when `sous update` runs, for every recommendation not answered yet: one a newer version brings, and one an
197
+ earlier run left pending ([Moving to newer versions](#moving-to-newer-versions)).
198
+
199
+ It never asks during `sous build`. The recommendations of a recipe you subscribe to, or that one of your
200
+ recipes lists under `subscribes`, are offered; those of a recipe held only through `depends` are not. A recipe
201
+ your project already subscribes to or holds is not offered. This
202
+ shows the flow; the exact wording is the command's own:
203
+
204
+ ```text
205
+ 'quality/code-review' recommends 'quality/test-coverage':
206
+ /review flags untested changes much more precisely when the coverage skill is present. Skip it
207
+ if your project has no test suite.
208
+ ? Subscribe to 'quality/test-coverage' too? (y/N)
209
+ ```
210
+
211
+ What each answer does:
212
+
213
+ - **Yes** makes the recommended recipe a subscription of your project's own, exactly as if you had run
214
+ `sous subscription add` with it: removing the recipe that recommended it later leaves it in place. Its own
215
+ recommendations are offered in turn.
216
+ - **No** declines it. The ref is added to `declinedRecommendations` in `.sous/conf.d/510-subscriptions.jsonc`,
217
+ so sous does not ask about it again, whichever recipe recommends it.
218
+
219
+ Two switches answer every recommendation ahead of time: `--accept-recommendations` subscribes to each one,
220
+ and `--decline-recommendations` declines each one. `--yes` does neither, so a scripted run never subscribes
221
+ to something you did not name. With `--yes` (or `--trust`), `--accept-recommendations` also trusts a
222
+ repository a recommended recipe lives in that the project has not added. With `--accept-recommendations`, an
223
+ `--answer` may also answer a question of a recipe it subscribes to; one that names nothing any subscribed
224
+ recipe asks is reported as unused.
225
+
226
+ Without a terminal and without either switch, sous neither accepts nor declines: each recommendation stays
227
+ **pending**, the command finishes, and its output lists every pending one with the recipe that recommends it.
228
+ Nothing is recorded for a pending recommendation; to take one, run `sous subscription add` with its ref.
229
+
230
+ To change your mind about a declined one, run `sous subscription add` with its ref: that subscribes to it and
231
+ removes it from `declinedRecommendations`. To be asked again instead, delete its entry from
232
+ `declinedRecommendations` in `.sous/conf.d/510-subscriptions.jsonc` by hand.
233
+
189
234
  ## Choose where the files land
190
235
 
191
236
  Recipe files compile under the [`.tpl.` convention](configuration.md#templates-and-the-tpl-convention): a file
@@ -345,6 +390,11 @@ What it will and will not do:
345
390
  fails naming the flag. With nothing to update it says so and asks nothing.
346
391
  - A repository a newer version needs that the project does not trust goes through the usual trust
347
392
  question, and new questions the newer versions ask are asked the way subscribing asks them.
393
+ - Every recommendation the project has not answered yet is offered, as subscribing offers it
394
+ ([Recommended recipes](#recommended-recipes)): one a newer version brings, and one an earlier run
395
+ left pending. A declined one is not. The plan lists them, marking the ones a new version brings.
396
+ `--yes` accepts the plan but not the recommendations; `--accept-recommendations` and
397
+ `--decline-recommendations` answer them.
348
398
  - A repository whose index cannot be fetched is skipped and named, and its pins stay put.
349
399
  - A linked repository's pins move too, and the plan notes that builds keep reading the checkout
350
400
  until it is unlinked.
@@ -580,6 +630,10 @@ So a pipeline or an agent needs three things and nothing else: `--yes` for the c
580
630
  `--accept-first` for an ambiguous one-word ref, and either `--answer` or those environment
581
631
  variables. The command's help prints under the error, on stderr, and the error itself on stdout.
582
632
 
633
+ A [recommendation](#recommended-recipes) does not fail such a run. It is an offer, not something the command
634
+ needs, so it stays pending and the output lists it. Pass `--accept-recommendations` or
635
+ `--decline-recommendations` to answer every recommendation instead.
636
+
583
637
  ## Where to go next
584
638
 
585
639
  - [Troubleshooting](repositories-troubleshooting.md): what a failed add, subscribe or build is
@@ -9,7 +9,10 @@ change raises that number, so an older sous refuses a file it would otherwise mi
9
9
 
10
10
  ?> Both hand-written manifests are YAML or JSON, never JavaScript: `.yaml`, `.yml`, `.json` or `.jsonc`
11
11
  (both JSON forms allow comments and trailing commas). Two in one directory is an error, not a first-match
12
- win. Unknown keys are rejected except extension keys starting with `x-`, carried through untouched; [the one
12
+ win. In the recipe manifest, a key sous does not know is skipped with a warning naming the key and the file,
13
+ so a manifest written for a later sous still loads (a sous older than 1.2.0 refuses it instead); the
14
+ repository manifest refuses one. Extension keys starting with `x-` are carried through untouched in both,
15
+ with no warning; [the one
13
16
  sous reads](repositories-authoring.md#declare-the-variables-a-recipe-needs) is `x-intentional`. Every path
14
17
  in a manifest is checked: absolute paths, backslashes, `.` or `..` segments, empty segments and trailing
15
18
  slashes are refused.
@@ -98,6 +101,14 @@ version: 0.1.0
98
101
  depends: # 'subscribes' takes the same two spellings
99
102
  - workflow/qa-helper
100
103
  - github://sous-io/sous-recipes/workflow/sub-agent-delegation@^1.0
104
+ recommends: # offered to the subscriber, who decides
105
+ - quality/lint-rules
106
+ - ref: quality/test-coverage
107
+ reason: >-
108
+ /review flags untested changes much more precisely when the coverage skill is present. Skip it if
109
+ your project has no test suite.
110
+ - ref: github://sous-io/sous-recipes/workflow/task-files@^1.2
111
+ reason: Lets /review attach its findings to the current task file.
101
112
  contents: # what a subscriber actually receives
102
113
  - kind: skills
103
114
  include: [skills/**/*.md] # 'exclude' is the optional counterpart
@@ -110,6 +121,7 @@ contents: # what a subscriber actually receives
110
121
  | `version` | to release | An exact semantic version; the manifest is the source of truth and the git tag follows it. `sous repo release` refuses a recipe that names none |
111
122
  | `description` | no | Copied into the index at release time; shown by `sous recipe list` and `sous repo search` |
112
123
  | `depends`, `subscribes` | no | Build dependencies and co-subscriptions; within either list, no entry may repeat |
124
+ | `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) |
113
125
  | `contents`, `variables` | no | Contents default to an empty list, which is what a curated bundle publishes; a duplicated variable name, or two definitions claiming one `env`, is an error. Any value in `contents` may be an expression; see [Contents are config](#contents-are-config) |
114
126
  | `edits` | no | Changes to document files the recipe does not own; see [Edits](#edits) |
115
127
  | `submissions` | no | Whether this recipe takes proposed changes, winning over the repository's block; see [The submissions block](#the-submissions-block) |
@@ -254,9 +266,28 @@ proposes it if the contributor carries on. `sous repo release --check` fails a p
254
266
  because a pull request can be opened without `submit`, and the check is the one gate every change passes. A
255
267
  release itself is never restricted, so whatever publishes the recipe still releases it.
256
268
 
269
+ ### Recommendations
270
+
271
+ `recommends` names recipes that work well beside this one but that it does not need. Unlike a `subscribes`
272
+ entry, a recommendation lands nothing on its own: sous asks the subscriber about each one, showing its
273
+ `reason`, and only a yes subscribes to it. What the subscriber sees is in
274
+ [Recommended recipes](repositories-consuming.md#recommended-recipes).
275
+
276
+ An entry is either a ref, written as a `subscribes` entry is ([Dependencies named by location](#dependencies-named-by-location)),
277
+ or an object:
278
+
279
+ | Field | Required | Notes |
280
+ |-------|----------|-------|
281
+ | `ref` | yes | The recommended recipe or namespace, in any form a `subscribes` entry accepts |
282
+ | `reason` | no | Why the subscriber may want it, in plain sentences. Sous shows it when it asks, shortened when it is long and with control characters and terminal escape sequences removed; `sous repo release` warns about a long one or one holding such characters, and publishes it as written |
283
+
284
+ The object form is spelled `ref:` because an entry may name a whole namespace as well as a recipe. No ref may
285
+ repeat within the list. `sous repo release` warns about every recipe that uses `recommends`, because a sous
286
+ older than 1.2.0 refuses a manifest holding it.
287
+
257
288
  ### Dependencies named by location
258
289
 
259
- `depends` and `subscribes` name their targets by where they live: `workflow/qa-helper` is a sibling in this
290
+ `depends`, `subscribes` and `recommends` name their targets by where they live: `workflow/qa-helper` is a sibling in this
260
291
  same repository, and `github://sous-io/sous-recipes/workflow/sub-agent-delegation@^1.0` is a recipe in
261
292
  another one. Every spelling in [Ref forms](#ref-forms) that names a namespace or a recipe is accepted here,
262
293
  except a `repo:` qualifier (one project's private name for a repository), a local path or `local://`
@@ -303,7 +334,7 @@ end of the project path with `/-/`, so it reads one way.
303
334
  | --- | --- |
304
335
  | The command line | every form; names in any case |
305
336
  | A config file's subscription keys | `namespace` or `namespace/recipe`, lowercase; the repository is recorded in the lockfile and a range in the entry's `range` field |
306
- | A recipe manifest's `depends` and `subscribes` | every form naming a namespace or a recipe, except `repo:` and a local location |
337
+ | A recipe manifest's `depends`, `subscribes` and `recommends` | every form naming a namespace or a recipe, except `repo:` and a local location |
307
338
  | A key sous stores (the lockfile, the index, the store) | `namespace` or `namespace/recipe`, lowercase |
308
339
  | An include line, after its `~` | `namespace/recipe/path`, any part a glob, optionally starting with a `repo:` qualifier; see [Include syntax](configuration.md#include-syntax) |
309
340
 
@@ -372,6 +403,10 @@ fetches only this file; nothing more is downloaded until a project subscribes.
372
403
  "kind": "depends" } },
373
404
  "depends": [ "github://sous-io/sous-recipes/workflow/sub-agent-delegation@^1.0" ],
374
405
  "subscribes": [ "workflow" ],
406
+ "recommends": [
407
+ { "key": "quality/lint-rules", "range": "^0.3.0", "declared": "quality/lint-rules" },
408
+ { "key": "quality/test-coverage", "range": "^1.4.0", "declared": "quality/test-coverage",
409
+ "reason": "/review flags untested changes much more precisely when the coverage skill is present." } ],
375
410
  "variables": [ { "name": "qaNotesDir", "type": "path", "prompt": "Where should notes go?",
376
411
  "description": "The directory QA notes are written to.", "example": "docs/qa",
377
412
  "default": ".sous/qa-notes", "required": true, "secret": false, "scope": "shared" } ],
@@ -391,6 +426,7 @@ fetches only this file; nothing more is downloaded until a project subscribes.
391
426
  | `dependencies` | per version | The range each dependency may take, keyed `namespace/recipe`; see below |
392
427
  | `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 |
393
428
  | `depends`, `subscribes` | per version | The version's manifest lists, exactly as written; `[]` when empty |
429
+ | `recommends` | per version | The version's recommendations, settled at release, in the manifest's order; `[]` when it has none, and absent on a version released before sous recorded recommendations. Each carries `key` (`namespace/recipe`, or `namespace` for a whole namespace), `range` (worked out as a dependency's is; absent for a namespace), `repo` (the identity of another repository; absent for this one), `declared` (the entry's ref exactly as written) and `reason` when the entry has one. Recommendations are not dependencies and never appear under `dependencies` |
394
430
  | `retired` | top level | Recipes the repository published and no longer lists, keyed `namespace/recipe`; absent when there are none. Each entry carries `path`, `description` and `versions` as a recipe under `recipes` does, plus `replacements`; see below |
395
431
  | `replacements` | per retired recipe | The recipes offered in its place, in order. Each carries `key` (`namespace/recipe`), `repo` (the identity of another repository; absent for this one) and `declared` (the entry exactly as `sous.repo.yaml` wrote it) |
396
432
 
@@ -428,7 +464,7 @@ that the list lacks, a recipe in the list the manifest does not declare, a recor
428
464
  declared one (for a sibling named with no range, not a `^<version>` range or `*`), an older entry's `version`
429
465
  outside its declared range, or another repository's entry with a different repository is an error naming the
430
466
  recipe, the version and each difference; restore the entry if the index was edited, or bump the version to publish
431
- different dependencies. A version rebuilt from its tag, when the index lost it, has its dependencies recorded
467
+ different dependencies. Its recorded `recommends` is checked against the manifest the same way. A version rebuilt from its tag, when the index lost it, has its dependencies recorded
432
468
  from the repository as it stood at that tag, then frozen the same way. An entry written before sous
433
469
  recorded dependencies carries none, stays that way, and installs by resolving its manifest's ranges.
434
470
 
@@ -568,6 +604,8 @@ subscriptions:
568
604
  workflow/task-files:
569
605
  range: "^1.2.0" # defaults to "*"; prerelease, enabled, alwaysPull, addedAt
570
606
  prerelease: false # and addedBy work as they do above
607
+ declinedRecommendations: # recommendations this project said no to; sous does not offer them again
608
+ - quality/lint-rules
571
609
  store: # every value is a default you can change
572
610
  maxBytes: 1073741824 # one gigabyte; past it, 'sous repo gc' evicts unpinned entries
573
611
  freshnessSeconds: 300 # how long a fetched index stays fresh
@@ -588,6 +626,7 @@ projectRecipes: # the project's own recipes; both values are the defa
588
626
  | `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 |
589
627
  | `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 |
590
628
  | `enabled: false` | either of the two above | The opt-out for the entries sous provides itself, the `sous-recipes` repository and the `core` subscription |
629
+ | `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) |
591
630
  | `store` | fixed fields | Plain numbers, all optional; the values sous ships are defaults, not assumptions |
592
631
  | `recipes` | content kind | What each kind does; see [recipes: what each content kind does](#recipes-what-each-content-kind-does) |
593
632
  | `recipes.handlers` | a list | Written by sous while the config is built: one `{ recipe, purpose, file, handler }` entry for each handler a subscribed recipe from a trusted repository, or one of the project's own recipes, lists; see [Handlers](handlers.md) |
@@ -632,7 +671,7 @@ are `.jsonc` so they can carry real comments, and each opens with a header sayin
632
671
  | Layer | Holds | Written by |
633
672
  |-------|-------|-----------|
634
673
  | `500-repos.jsonc` | `repos` | `sous repo add`, `sous repo remove` |
635
- | `510-subscriptions.jsonc` | `subscriptions` | `sous subscription add`, `remove`, `enable` and `disable` |
674
+ | `510-subscriptions.jsonc` | `subscriptions`, `declinedRecommendations` | `sous subscription add`, `remove`, `enable` and `disable`; `sous subscription add` and `sous update` when a recommendation is declined |
636
675
  | `520-var-mappings.jsonc` | `varMappings` | `sous vars ask` |
637
676
 
638
677
  ```jsonc
@@ -111,6 +111,21 @@ a recipe made mostly of `subscribes` entries. Because both lists are
111
111
  declarative YAML rather than code, sous can read the whole dependency closure before fetching any
112
112
  of it, which is what makes the trust decision answerable up front.
113
113
 
114
+ A third list, `recommends`, names recipes that work well beside this one but that it does not need. A
115
+ recommendation lands nothing by itself: sous asks the subscriber about each one, showing the author's
116
+ reason, and a yes makes it one of the project's own subscriptions. A no is remembered in the project's
117
+ config, so sous does not ask again. See [Recommended recipes](repositories-consuming.md#recommended-recipes).
118
+
119
+ ```yaml
120
+ recommends:
121
+ - quality/lint-rules
122
+ - ref: quality/test-coverage
123
+ reason: >-
124
+ /review flags untested changes much more precisely when the coverage skill is present.
125
+ ```
126
+
127
+ A recipe that uses `recommends` needs sous 1.2.0 or later.
128
+
114
129
  ### The lockfile
115
130
 
116
131
  `.sous/sous.lock.json` records the exact version, content hash and holder of everything the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sous-io/sous",
3
- "version": "1.1.13",
3
+ "version": "1.2.0",
4
4
  "description": "Compiles AI coding agent configuration (CLAUDE.md, skills, memories) from LiquidJS templates",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -39,49 +39,49 @@
39
39
  "sous.config.schema.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@sous-io/sous-plugin-api": "1.1.13"
42
+ "@sous-io/sous-plugin-api": "1.2.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "esbuild": "^0.27.4",
46
46
  "jsonc-parser": "^3.3.1",
47
47
  "yaml": "^2.9.0",
48
48
  "zod": "^4.4.3",
49
- "@sous-io/sous-lib-documents": "1.1.13",
50
- "@sous-io/sous-lib-core": "1.1.13",
51
- "@sous-io/sous-plugin-build": "1.1.13",
52
- "@sous-io/sous-plugin-claude-code": "1.1.13",
53
- "@sous-io/sous-plugin-authoring": "1.1.13",
54
- "@sous-io/sous-plugin-confd": "1.1.13",
55
- "@sous-io/sous-plugin-cli": "1.1.13",
56
- "@sous-io/sous-plugin-config-files": "1.1.13",
57
- "@sous-io/sous-plugin-expressions": "1.1.13",
58
- "@sous-io/sous-plugin-formats": "1.1.13",
59
- "@sous-io/sous-plugin-github": "1.1.13",
60
- "@sous-io/sous-plugin-compiler": "1.1.13",
61
- "@sous-io/sous-plugin-gitlab": "1.1.13",
62
- "@sous-io/sous-plugin-harnesses": "1.1.13",
63
- "@sous-io/sous-plugin-init": "1.1.13",
64
- "@sous-io/sous-plugin-host": "1.1.13",
65
- "@sous-io/sous-plugin-git": "1.1.13",
66
- "@sous-io/sous-plugin-inspect": "1.1.13",
67
- "@sous-io/sous-plugin-liquid": "1.1.13",
68
- "@sous-io/sous-plugin-memories": "1.1.13",
69
- "@sous-io/sous-plugin-local": "1.1.13",
70
- "@sous-io/sous-plugin-mcp": "1.1.13",
71
- "@sous-io/sous-plugin-npm": "1.1.13",
72
- "@sous-io/sous-plugin-pnpm": "1.1.13",
73
- "@sous-io/sous-plugin-recipes": "1.1.13",
74
- "@sous-io/sous-plugin-recipe-answers": "1.1.13",
75
- "@sous-io/sous-plugin-refs": "1.1.13",
76
- "@sous-io/sous-plugin-skills": "1.1.13",
77
- "@sous-io/sous-plugin-update": "1.1.13",
78
- "@sous-io/sous-plugin-variables": "1.1.13",
79
- "@sous-io/sous-plugin-yarn": "1.1.13",
80
- "@sous-io/sous-plugin-editor": "1.1.13",
81
- "@sous-io/sous-plugin-doctor": "1.1.13",
82
- "@sous-io/sous-plugin-handlers": "1.1.13",
83
- "@sous-io/sous-plugin-migrations": "1.1.13",
84
- "@sous-io/sous-plugin-codex": "1.1.13"
49
+ "@sous-io/sous-lib-documents": "1.2.0",
50
+ "@sous-io/sous-lib-core": "1.2.0",
51
+ "@sous-io/sous-plugin-authoring": "1.2.0",
52
+ "@sous-io/sous-plugin-build": "1.2.0",
53
+ "@sous-io/sous-plugin-claude-code": "1.2.0",
54
+ "@sous-io/sous-plugin-cli": "1.2.0",
55
+ "@sous-io/sous-plugin-compiler": "1.2.0",
56
+ "@sous-io/sous-plugin-confd": "1.2.0",
57
+ "@sous-io/sous-plugin-expressions": "1.2.0",
58
+ "@sous-io/sous-plugin-formats": "1.2.0",
59
+ "@sous-io/sous-plugin-git": "1.2.0",
60
+ "@sous-io/sous-plugin-config-files": "1.2.0",
61
+ "@sous-io/sous-plugin-github": "1.2.0",
62
+ "@sous-io/sous-plugin-gitlab": "1.2.0",
63
+ "@sous-io/sous-plugin-harnesses": "1.2.0",
64
+ "@sous-io/sous-plugin-host": "1.2.0",
65
+ "@sous-io/sous-plugin-init": "1.2.0",
66
+ "@sous-io/sous-plugin-inspect": "1.2.0",
67
+ "@sous-io/sous-plugin-liquid": "1.2.0",
68
+ "@sous-io/sous-plugin-local": "1.2.0",
69
+ "@sous-io/sous-plugin-mcp": "1.2.0",
70
+ "@sous-io/sous-plugin-memories": "1.2.0",
71
+ "@sous-io/sous-plugin-npm": "1.2.0",
72
+ "@sous-io/sous-plugin-pnpm": "1.2.0",
73
+ "@sous-io/sous-plugin-recipe-answers": "1.2.0",
74
+ "@sous-io/sous-plugin-recipes": "1.2.0",
75
+ "@sous-io/sous-plugin-refs": "1.2.0",
76
+ "@sous-io/sous-plugin-update": "1.2.0",
77
+ "@sous-io/sous-plugin-variables": "1.2.0",
78
+ "@sous-io/sous-plugin-skills": "1.2.0",
79
+ "@sous-io/sous-plugin-yarn": "1.2.0",
80
+ "@sous-io/sous-plugin-handlers": "1.2.0",
81
+ "@sous-io/sous-plugin-editor": "1.2.0",
82
+ "@sous-io/sous-plugin-doctor": "1.2.0",
83
+ "@sous-io/sous-plugin-migrations": "1.2.0",
84
+ "@sous-io/sous-plugin-codex": "1.2.0"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=22"
@@ -118,7 +118,13 @@ project subscribes to it, directly or through its namespace, or when an active r
118
118
  lists it under `subscribes`. Only an active recipe adds anything to the project: output files,
119
119
  skills, tool hooks, tool plugins (such as a Claude Code plugin) and Sous plugins (code that
120
120
  extends sous itself). A recipe held only through `depends` is a library: an active recipe may
121
- include, call or import its files, but it adds nothing to the project itself.
121
+ include, call or import its files, but it adds nothing to the project itself. A recipe an active
122
+ recipe lists under `recommends` is only offered: `sous subscription add` and `sous update` ask about
123
+ it, and a yes makes it one of the project's own subscriptions. A no is recorded under
124
+ `declinedRecommendations` in `.sous/conf.d/510-subscriptions.jsonc`; `sous subscription add` with
125
+ that ref, or deleting the entry, undoes it. `--yes` never accepts a recommendation;
126
+ `--accept-recommendations` and `--decline-recommendations` answer every one, and without a
127
+ terminal and without either, each stays pending and is listed in the output.
122
128
 
123
129
  The project's own recipes (under `.sous/recipes/` by default; `projectRecipes.paths` in the config
124
130
  sets where) are active with no subscription and no trust question, since they are files in the
@@ -3,7 +3,7 @@ name: about-sous-recipes
3
3
  description: >
4
4
  YOU MUST load this skill when creating or changing a sous recipe: its sous.recipe.yaml, its
5
5
  version, the variables it asks for, the files it publishes, a Sous plugin it ships or requires,
6
- its depends or subscribes lists, or a partial or @~ include inside it.
6
+ its depends, subscribes or recommends lists, or a partial or @~ include inside it.
7
7
  user-invocable: false
8
8
  license: Apache-2.0
9
9
  compatibility:
@@ -21,8 +21,9 @@ load `about-agent-skills`.
21
21
 
22
22
  ## The Manifest
23
23
 
24
- The manifest is YAML or JSON, never JavaScript, and unknown keys are refused except extension keys
25
- starting with `x-`. A typical one:
24
+ The manifest is YAML or JSON, never JavaScript. A key sous does not know is skipped with a warning (a
25
+ sous older than 1.2.0 refuses it instead); extension keys starting with `x-` are carried through
26
+ with no warning. A typical one:
26
27
 
27
28
  ```yaml
28
29
  formatVersion: 1
@@ -59,7 +60,7 @@ The fields in that example:
59
60
  `projectRoot`, which sous sets itself (to the directory holding `.sous/`); setting it is an error. A recipe that only bundles others
60
61
  may leave `contents` out.
61
62
  - `plugin` and `requires` are described in "Shipping Sous Plugins" below.
62
- - `depends`, `subscribes` and `variables` are described below; `submissions` is in
63
+ - `depends`, `subscribes`, `recommends` and `variables` are described below; `submissions` is in
63
64
  `about-sous-repos`.
64
65
 
65
66
  A file whose name contains `.tpl.` is rendered through LiquidJS and loses the `.tpl.`; every other
@@ -170,15 +171,17 @@ combination: secret, `local` or required if any definition is, and only the valu
170
171
  accepts. When no value can satisfy both (different types, no shared `enum` option), each recipe is
171
172
  asked separately under its recipe-scoped name.
172
173
 
173
- ## Depends and Subscribes
174
+ ## Depends, Subscribes and Recommends
174
175
 
175
- Both lists name other recipes, and they do different things:
176
+ The three lists name other recipes, and they do different things:
176
177
 
177
178
  - `depends` makes the other recipe a **library** for this one. It is fetched and pinned, and its
178
179
  files can be included from this recipe's templates, but its files never reach the subscriber's
179
180
  output.
180
181
  - `subscribes` is a **co-subscription**. The other recipe's files land, as if the project had
181
182
  subscribed to it too.
183
+ - `recommends` is an **offer**. Sous asks the subscriber about each recommended recipe, showing its
184
+ `reason`, and subscribes to it only on a yes; a no is remembered, and never asked again.
182
185
 
183
186
  Under either list, the other recipe's questions are asked, and its answers are in this recipe's
184
187
  templates.
@@ -199,6 +202,25 @@ Each entry names its target by where it lives:
199
202
  `local://` locators and `repo:` short names are refused: both are one project's private view of a
200
203
  repository, and a published manifest is read everywhere.
201
204
 
205
+ A `recommends` entry is a ref, written as above, or `{ ref, reason }`. Use it for a recipe that makes
206
+ this one work better but that a subscriber could do without, and keep `subscribes` for what this
207
+ recipe needs. The `reason` tells the subscriber what the other recipe adds and when to skip it; put
208
+ the point in its first sentence, because a long one is shortened when shown.
209
+
210
+ ```yaml
211
+ recommends:
212
+ - quality/lint-rules
213
+ - ref: quality/test-coverage
214
+ reason: >-
215
+ /review flags untested changes much more precisely when the coverage skill is present. Skip
216
+ it if your project has no test suite.
217
+ ```
218
+
219
+ A recommended recipe may be missing, because the subscriber declined it: this recipe MUST NOT
220
+ include its files or read its variables, and its instructions MUST read correctly without it. A
221
+ sous older than 1.2.0 refuses a manifest holding `recommends`, and `sous repo release` warns about
222
+ every recipe that uses it.
223
+
202
224
  ## Shipping Sous Plugins
203
225
 
204
226
  A recipe MAY ship a Sous plugin (code that extends sous itself, for example to add a Liquid
@@ -47,7 +47,9 @@ A recipe repository holds three kinds of file that sous reads:
47
47
 
48
48
  Manifests are YAML (`.yaml`, `.yml`) or JSON (`.json`, `.jsonc`, both allowing comments and
49
49
  trailing commas), never JavaScript: sous reads them before anyone has trusted the repository, so
50
- nothing in them may run. Unknown keys are refused, except extension keys starting with `x-`. A
50
+ nothing in them may run. A key sous does not know is refused in the repo manifest and skipped with
51
+ a warning in a recipe manifest (a sous older than 1.2.0 refuses it there too); extension keys
52
+ starting with `x-` are carried through with no warning. A
51
53
  recipe folder MUST NOT contain a symbolic link; the release refuses one.
52
54
 
53
55
  ```yaml
@@ -73,8 +75,8 @@ once a git tag shaped `namespace/recipe@version` exists for it (for example
73
75
  `review/checklist@1.2.0`). The index records each published version with its content hash, its
74
76
  tag, the range each of its dependencies may take (the declared range, or `^<version at release>`
75
77
  for a sibling named with no range; each with the manifest entry that brought it in and whether it
76
- is a co-subscription or a build dependency) and the variable
77
- definitions it publishes, which is how a project lists what a recipe installs and asks before
78
+ is a co-subscription or a build dependency), its `recommends` list (settled the same way, each
79
+ `reason` included) and the variable definitions it publishes, which is how a project lists what a recipe installs and asks before
78
80
  fetching it; for the length of one release commit it also records the version each manifest
79
81
  declares, whose tag that release cuts next. A published version never changes: new files need a
80
82
  new version, and a release refuses to publish different content under a version already tagged. A
@@ -108,7 +110,8 @@ the index has uncommitted changes, or while git cannot say who is committing. Un
108
110
  to other files (a project file a sous migration rewrote, for example) do not stop it, and its
109
111
  commit leaves them out. In one run it:
110
112
 
111
- 1. validates every manifest;
113
+ 1. validates every manifest, warning about each recipe that uses `recommends` (subscribers need
114
+ sous 1.2.0 or later to read it);
112
115
  2. finds the recipes whose files changed since the tag that last published them (a recipe never
113
116
  tagged is released at the version its manifest declares);
114
117
  3. raises the version of each changed recipe whose version still equals that tag (a patch step by
@@ -11,7 +11,7 @@ formatVersion: 1
11
11
 
12
12
  namespace: core
13
13
  name: sous-skills
14
- version: 1.1.13
14
+ version: 1.2.0
15
15
 
16
16
  description: >-
17
17
  The skills that teach an agent what sous is and how it works: which files sous
@@ -359,6 +359,15 @@
359
359
  },
360
360
  "additionalProperties": false
361
361
  },
362
+ "declinedRecommendations": {
363
+ "description": "The recommended recipes and namespaces this project declined, so sous does not offer them again. Sous adds one when you decline a recommendation, and removes one when you subscribe to it.",
364
+ "type": "array",
365
+ "default": [],
366
+ "items": {
367
+ "type": "string",
368
+ "description": "A recipe ('namespace/recipe') or a namespace ('namespace')."
369
+ }
370
+ },
362
371
  "editor": {
363
372
  "description": "Edits to files Sous does not own (editor.edits), applied, recorded and undone by the editor.",
364
373
  "type": "object",