@sous-io/sous 1.2.1 → 1.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sous-io/sous",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
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.2.1"
42
+ "@sous-io/sous-plugin-api": "1.2.2"
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-core": "1.2.1",
50
- "@sous-io/sous-lib-documents": "1.2.1",
51
- "@sous-io/sous-plugin-authoring": "1.2.1",
52
- "@sous-io/sous-plugin-build": "1.2.1",
53
- "@sous-io/sous-plugin-claude-code": "1.2.1",
54
- "@sous-io/sous-plugin-compiler": "1.2.1",
55
- "@sous-io/sous-plugin-cli": "1.2.1",
56
- "@sous-io/sous-plugin-confd": "1.2.1",
57
- "@sous-io/sous-plugin-config-files": "1.2.1",
58
- "@sous-io/sous-plugin-formats": "1.2.1",
59
- "@sous-io/sous-plugin-git": "1.2.1",
60
- "@sous-io/sous-plugin-github": "1.2.1",
61
- "@sous-io/sous-plugin-gitlab": "1.2.1",
62
- "@sous-io/sous-plugin-harnesses": "1.2.1",
63
- "@sous-io/sous-plugin-host": "1.2.1",
64
- "@sous-io/sous-plugin-expressions": "1.2.1",
65
- "@sous-io/sous-plugin-inspect": "1.2.1",
66
- "@sous-io/sous-plugin-liquid": "1.2.1",
67
- "@sous-io/sous-plugin-init": "1.2.1",
68
- "@sous-io/sous-plugin-local": "1.2.1",
69
- "@sous-io/sous-plugin-memories": "1.2.1",
70
- "@sous-io/sous-plugin-mcp": "1.2.1",
71
- "@sous-io/sous-plugin-pnpm": "1.2.1",
72
- "@sous-io/sous-plugin-recipe-answers": "1.2.1",
73
- "@sous-io/sous-plugin-recipes": "1.2.1",
74
- "@sous-io/sous-plugin-npm": "1.2.1",
75
- "@sous-io/sous-plugin-refs": "1.2.1",
76
- "@sous-io/sous-plugin-update": "1.2.1",
77
- "@sous-io/sous-plugin-variables": "1.2.1",
78
- "@sous-io/sous-plugin-yarn": "1.2.1",
79
- "@sous-io/sous-plugin-handlers": "1.2.1",
80
- "@sous-io/sous-plugin-skills": "1.2.1",
81
- "@sous-io/sous-plugin-editor": "1.2.1",
82
- "@sous-io/sous-plugin-doctor": "1.2.1",
83
- "@sous-io/sous-plugin-codex": "1.2.1",
84
- "@sous-io/sous-plugin-migrations": "1.2.1"
49
+ "@sous-io/sous-lib-core": "1.2.2",
50
+ "@sous-io/sous-plugin-authoring": "1.2.2",
51
+ "@sous-io/sous-plugin-build": "1.2.2",
52
+ "@sous-io/sous-plugin-claude-code": "1.2.2",
53
+ "@sous-io/sous-lib-documents": "1.2.2",
54
+ "@sous-io/sous-plugin-cli": "1.2.2",
55
+ "@sous-io/sous-plugin-compiler": "1.2.2",
56
+ "@sous-io/sous-plugin-config-files": "1.2.2",
57
+ "@sous-io/sous-plugin-expressions": "1.2.2",
58
+ "@sous-io/sous-plugin-confd": "1.2.2",
59
+ "@sous-io/sous-plugin-formats": "1.2.2",
60
+ "@sous-io/sous-plugin-git": "1.2.2",
61
+ "@sous-io/sous-plugin-github": "1.2.2",
62
+ "@sous-io/sous-plugin-gitlab": "1.2.2",
63
+ "@sous-io/sous-plugin-harnesses": "1.2.2",
64
+ "@sous-io/sous-plugin-host": "1.2.2",
65
+ "@sous-io/sous-plugin-inspect": "1.2.2",
66
+ "@sous-io/sous-plugin-init": "1.2.2",
67
+ "@sous-io/sous-plugin-liquid": "1.2.2",
68
+ "@sous-io/sous-plugin-local": "1.2.2",
69
+ "@sous-io/sous-plugin-mcp": "1.2.2",
70
+ "@sous-io/sous-plugin-memories": "1.2.2",
71
+ "@sous-io/sous-plugin-npm": "1.2.2",
72
+ "@sous-io/sous-plugin-refs": "1.2.2",
73
+ "@sous-io/sous-plugin-recipes": "1.2.2",
74
+ "@sous-io/sous-plugin-pnpm": "1.2.2",
75
+ "@sous-io/sous-plugin-skills": "1.2.2",
76
+ "@sous-io/sous-plugin-update": "1.2.2",
77
+ "@sous-io/sous-plugin-variables": "1.2.2",
78
+ "@sous-io/sous-plugin-editor": "1.2.2",
79
+ "@sous-io/sous-plugin-yarn": "1.2.2",
80
+ "@sous-io/sous-plugin-doctor": "1.2.2",
81
+ "@sous-io/sous-plugin-recipe-answers": "1.2.2",
82
+ "@sous-io/sous-plugin-migrations": "1.2.2",
83
+ "@sous-io/sous-plugin-codex": "1.2.2",
84
+ "@sous-io/sous-plugin-handlers": "1.2.2"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=22"
@@ -43,9 +43,13 @@ contents:
43
43
  The fields in that example:
44
44
 
45
45
  - `formatVersion` is always `1`.
46
- - `namespace` MUST be declared in the repo manifest, and `name` is unique inside it. Both are
47
- lowercase kebab-case, and together (`review/checklist`) they are the recipe's identity.
48
- - `version` is an exact semantic version (see "Raising the Version").
46
+ - `namespace` is optional; one left out is worked out as for a project's own recipe (below), and
47
+ the first release may write a `sous.namespace.yaml` to keep it fixed (`about-sous-repos`). `name`
48
+ is unique inside the namespace. Both are lowercase kebab-case, and together (`review/checklist`)
49
+ they are the recipe's identity.
50
+ - `version` is an exact semantic version (see "Raising the Version"). It is optional until the
51
+ recipe is published: a recipe with none is released as `1.0.0`, which the release writes into
52
+ the manifest. A recipe with release tags but no version is an error.
49
53
  - `description` is optional; it is copied into the index, and shown by `sous recipe list` and
50
54
  `sous repo search`.
51
55
  - `contents` is what a subscriber receives: one group per kind (`skills`, `memories`, `prompts` or
@@ -84,8 +88,9 @@ subscription, release, version raise or lockfile entry, under the reserved repos
84
88
  them in the lockfile with the project recipe as their holder. A bare `namespace/recipe` means a
85
89
  project recipe first.
86
90
  - Its plugin and handlers run with no trust question.
87
- - It is published only when the project's own `sous.repo.yaml` lists it, through
88
- `sous repo release`.
91
+ - It is published only when the project's own `sous.repo.yaml` lists it (a folder or a glob
92
+ such as `.sous/recipes/*`), through `sous repo release`, which offers to create that file when
93
+ there is none (`--create-manifest`).
89
94
 
90
95
  The rest of this skill applies to it as to any recipe, except "Raising the Version", which applies
91
96
  only once it is published.
@@ -107,9 +112,9 @@ A contributor proposing a change edits `version` by hand. A maintainer releasing
107
112
  repository itself may instead commit the change and run
108
113
  `sous repo release --recipe <namespace>/<recipe> --bump <level>` (`patch` by default, `minor`,
109
114
  `major` or `prerelease`), which raises every changed recipe in scope whose version still equals its
110
- last tag and commits the raise together with the regenerated index. A proposal MUST NOT carry that
111
- index change, because `sous repo submit` refuses one that edits `sous.index.json`;
112
- `about-sous-repos` describes the rest of that run.
115
+ last tag and commits the raise together with the published data. A proposal MUST NOT carry that
116
+ published data change, because `sous repo submit` refuses one that edits it (`sous.index.json`, or
117
+ the `published:` block of `sous.repo.yaml`); `about-sous-repos` describes the rest of that run.
113
118
 
114
119
  Example: `review/checklist` is at `1.2.0`, its last tag. One pull request fixes a typo (a patch) and
115
120
  adds a command (a minor). The manifest goes to `1.3.0`, once.
@@ -35,15 +35,26 @@ For one recipe (its manifest, version, variables, contents and dependencies), YO
35
35
  A recipe repository holds three kinds of file that sous reads:
36
36
 
37
37
  - `sous.repo.yaml`, the **repo manifest**, written by hand, at the repository root or in its
38
- `.sous/` directory (the root's wins when both exist): the repository's suggested short name, an
39
- optional description, its namespaces, and the list of recipe folders it publishes. A folder
40
- is a recipe because this list names it; a new recipe folder MUST be added to the list, or it is
41
- not published. Only `recipes` is required for the file to be valid, but `sous repo release`
42
- needs a `name`, a plain folder path per recipe (it refuses a glob pattern), and every recipe's
43
- namespace declared here.
38
+ `.sous/` directory (the root's wins when both exist): the repository's optional suggested short
39
+ name (the root folder's name when missing), an optional description, optional namespace
40
+ descriptions, and `recipes`, the recipe folders or glob patterns it publishes (expanded the way a
41
+ project expands `projectRecipes.paths`). A folder is a recipe because this list covers it; a new
42
+ recipe folder no pattern matches MUST be added to the list, or it is not published. Only
43
+ `recipes` is required, for the file and for a release. A pattern matching no recipe yet is a
44
+ warning; a listed folder that is missing or holds no recipe is an error.
44
45
  - `sous.recipe.yaml`, one **recipe manifest** in each recipe folder; see `about-sous-recipes`.
45
- - `sous.index.json`, the **index**: the catalog projects read, written only by `sous repo release`.
46
- NEVER edit it by hand.
46
+ - `sous.namespace.yaml`, optional, in a folder above recipes: names the namespace of the recipes
47
+ below it that name none, and may describe it. One namespace described in two places (here and
48
+ `namespaces` in `sous.repo.yaml`, or two namespace files) stops a release, naming both.
49
+ - The **published data**: the catalog projects read, written only by `sous repo release`. NEVER
50
+ edit it by hand. It lives where `index` in `sous.repo.yaml` says:
51
+ - embedded, in a `published:` block at the end of `sous.repo.yaml`: the default for a repository
52
+ that has published nothing (no `published:` block and no `sous.index.json` beside the
53
+ manifest). A release then rewrites `sous.repo.yaml` whole, comments removed, hand-edited fields
54
+ first, then a marker line, then `published:`;
55
+ - a file: `sous.index.json` beside the manifest (an existing one keeps being used), or
56
+ `index: <path>.json`;
57
+ - the release tags alone: `index: tags`; no index is written.
47
58
 
48
59
  A project reads `sous.repo.yaml` first (the root's, then `.sous/`'s) and follows its `index` setting:
49
60
  a `published` block or `index: embedded` holds the index in the manifest; `index: <path>.json` names
@@ -69,7 +80,7 @@ namespaces:
69
80
  review:
70
81
  description: Recipes about reviewing code.
71
82
  recipes:
72
- - recipes/review/checklist
83
+ - recipes/review/*
73
84
  contribute: https://github.com/harbor-labs/team-recipes/blob/main/CONTRIBUTING.md
74
85
  ```
75
86
 
@@ -81,7 +92,7 @@ contribute: https://github.com/harbor-labs/team-recipes/blob/main/CONTRIBUTING.m
81
92
  A recipe's version lives in its manifest, which is the source of truth. A version is **published**
82
93
  once a git tag shaped `namespace/recipe@version` exists for it (for example
83
94
  `review/checklist@1.2.0`). The index records each published version with its content hash, its
84
- tag, the range each of its dependencies may take (the declared range, or `^<version at release>`
95
+ tag (an annotated tag whose message carries the same hash as a `Sous-Hash: sha256-...` line), the range each of its dependencies may take (the declared range, or `^<version at release>`
85
96
  for a sibling named with no range; each with the manifest entry that brought it in and whether it
86
97
  is a co-subscription or a build dependency), its `recommends` list (settled the same way, each
87
98
  `reason` included) and the variable definitions it publishes, which is how a project lists what a recipe installs and asks before
@@ -108,25 +119,43 @@ retired:
108
119
  Zero or more replacements, each a recipe ref as `depends` takes one. A recipe that **moved** to another
109
120
  repository is retired here, naming its new home as a replacement. A `retired` entry for a recipe still
110
121
  listed under `recipes` is a release error. Subscribers' builds warn about the retired recipe, name the
111
- replacements and, in a terminal, offer to swap the subscription. The retirement reaches the index with
112
- the next release that publishes a version.
122
+ replacements and, in a terminal, offer to swap the subscription. The next release writes the retirement
123
+ into the published data, even one that publishes no new version.
113
124
 
114
125
  ## Releasing
115
126
 
116
- `sous repo release` publishes. It refuses to run while a recipe folder, the repository manifest or
117
- the index has uncommitted changes, or while git cannot say who is committing. Uncommitted changes
118
- to other files (a project file a sous migration rewrote, for example) do not stop it, and its
119
- commit leaves them out. In one run it:
127
+ `sous repo release` publishes. It refuses to run while anything it publishes or writes has
128
+ uncommitted changes (every recipe folder it publishes, the repository manifest, the index file when
129
+ the published data is one, and any `sous.namespace.yaml` it is about to write; files the same run
130
+ wrote earlier do not count), or while git cannot say who is committing. Uncommitted changes to
131
+ other files (a project file a sous migration rewrote, for example) do not stop it, and its commit
132
+ leaves them out. In one run it:
120
133
 
121
134
  1. validates every manifest, warning about each recipe that uses `recommends` (subscribers need
122
135
  sous 1.2.0 or later to read it);
123
136
  2. finds the recipes whose files changed since the tag that last published them (a recipe never
124
- tagged is released at the version its manifest declares);
137
+ tagged is released at the version its manifest declares, or at `1.0.0`, written into the
138
+ manifest, when it declares none);
125
139
  3. raises the version of each changed recipe whose version still equals that tag (a patch step by
126
140
  default; `--bump minor` or `--bump major` for more);
127
- 4. regenerates `sous.index.json`;
128
- 5. commits the manifests and the index together;
129
- 6. cuts one annotated tag per new version, dependencies first.
141
+ 4. writes a `sous.namespace.yaml` (`name: <namespace>`) in the folder holding each recipe it
142
+ publishes whose namespace came from the config's `name`, a `package.json`, the git `origin` or
143
+ the project folder, so the published key never changes; if that would change another recipe's
144
+ key, it takes the file back and stops, asking for `namespace:` in the manifests;
145
+ 5. writes the published data;
146
+ 6. commits what changed;
147
+ 7. cuts one annotated tag per new version, dependencies first.
148
+
149
+ A run with no new version still rewrites and commits the published data when it differs (a retired
150
+ or moved recipe, a namespace description, data an older sous wrote), as
151
+ `Update the published data of <name>`, asking first unless `--yes` or `--ci`.
152
+
153
+ With no `sous.repo.yaml` anywhere above, it lists the project's recipe paths and offers to create
154
+ one at the project root (`--create-manifest` answers yes). When a recipe it publishes depends, with
155
+ no location, on a project recipe `sous.repo.yaml` does not list, it asks whether to publish that one
156
+ too (`--publish-dependencies` answers yes; declining stops the release). `--yes` answers neither;
157
+ without a terminal and without the switch, each fails naming the switch. With `index: tags`, `--ci`
158
+ changes no file and makes no commit, so anything that needs a file written is an error there.
130
159
 
131
160
  It prints that plan and asks once. `--yes` answers ahead, `--dry-run` stops after the plan, and
132
161
  `--push` pushes the commit and the tags. `--namespace` and `--recipe` narrow the scope, and
@@ -134,8 +163,8 @@ It prints that plan and asks once. `--yes` answers ahead, `--dry-run` stops afte
134
163
  raises and commits but cuts no tags, because tags are cut after the merge; `--tag` overrides that.
135
164
  Two presets matter most:
136
165
 
137
- - `--check` only reads. It validates every manifest, reports how a merge would rewrite the index
138
- (as information, never as a failure), lists the versions that publish on merge, and fails a
166
+ - `--check` only reads. It validates every manifest, reports how a merge would rewrite the
167
+ published data (as information, never as a failure), lists the versions that publish on merge, and fails a
139
168
  change to a recipe whose `submissions` block refuses proposals.
140
169
  - `--ci` is for automation after a merge. It raises no versions, accepts the plan without asking,
141
170
  and fails on any changed recipe whose version still equals its last tag. It does NOT push; pass
@@ -149,17 +178,19 @@ A repository made by `sous repo init` carries `.github/workflows/sous-release.ym
149
178
 
150
179
  - on every pull or merge request, `sous repo release --check`;
151
180
  - on every push to the default branch, `sous repo release --ci --push --yes`, which tags every
152
- version that has no tag yet, commits the regenerated index when it changed, and pushes both.
181
+ version that has no tag yet, commits the published data when it changed, and pushes both.
182
+
183
+ A project with its own release pipeline adds that one step, `sous repo release --ci --push --yes`.
153
184
 
154
185
  So a change to a recipe MUST raise that recipe's version in the pull request itself, by editing
155
186
  `version` in its `sous.recipe.yaml`: after the merge, `--ci` refuses a recipe whose files changed
156
187
  while its version stayed the same. A contributor NEVER runs `sous repo release` on a proposal
157
- branch (`--check` and `--dry-run` excepted), because it commits a regenerated index and
158
- `sous repo submit` refuses a change that edits the index.
188
+ branch (`--check` and `--dry-run` excepted), because it commits the published data and
189
+ `sous repo submit` refuses a change that edits it.
159
190
 
160
191
  Example: a contributor fixes a typo in `review/checklist`, which is at `1.2.0`, its last tag. The
161
192
  pull request changes the skill file and sets `version: 1.2.1`; `--check` passes and lists
162
- `review/checklist@1.2.1` as publishing on merge; after the merge, `--ci` regenerates the index,
193
+ `review/checklist@1.2.1` as publishing on merge; after the merge, `--ci` writes the published data,
163
194
  commits it and cuts the tag `review/checklist@1.2.1`.
164
195
 
165
196
  ## Proposing a Change
@@ -173,8 +204,10 @@ submit <repo>`). Run on the default branch, it first creates a branch named
173
204
 
174
205
  Before sending anything it checks that everything is committed (`--commit` commits it, after
175
206
  listing the changes and asking once), validates the repository, and confirms the change leaves
176
- `sous.index.json` alone. It pushes through a fork on the contributor's own account when the
177
- contributor cannot push to the repository, and NEVER forces a push. The title and the description
207
+ the published data alone: an index file may not be edited; for embedded data only the
208
+ `published:` block is compared, so the rest of `sous.repo.yaml` may change (to list a new recipe);
209
+ with `index: tags` there is nothing to check. It pushes through a fork on the contributor's own
210
+ account when the contributor cannot push to the repository, and NEVER forces a push. The title and the description
178
211
  come from the user (`--title` and `--body`, or asked); sous never borrows a commit message, and
179
212
  adds a changelog it builds by comparing the manifests with the default branch.
180
213
 
@@ -216,8 +249,8 @@ file is left as it is and named in a note, and `.gitignore` gains a block betwee
216
249
  comments. `--overwrite` replaces existing files; `--force` is `--yes`, not overwrite.
217
250
  `sous-io/sous-recipes` is the model a scaffold follows: a new repository is as complete as it, minus
218
251
  its recipes. It does not run git: run `git init`, commit, and add a remote before the first release,
219
- because `sous repo release` reads and writes tags. Every new recipe folder is then listed under
220
- `recipes` in `sous.repo.yaml`.
252
+ because `sous repo release` reads and writes tags. Every new recipe folder is then covered by
253
+ `recipes` in `sous.repo.yaml`, by its own path or by a glob pattern.
221
254
 
222
255
  After the scaffold it runs `sous init` in the same directory, so the repository is also a sous
223
256
  project. Init imports any `CLAUDE.md`, `AGENTS.md` or `.claude/skills/` already there; with nothing
@@ -11,7 +11,7 @@ formatVersion: 1
11
11
 
12
12
  namespace: core
13
13
  name: sous-skills
14
- version: 1.2.1
14
+ version: 1.2.2
15
15
 
16
16
  description: >-
17
17
  The skills that teach an agent what sous is and how it works: which files sous