@sous-io/sous 1.1.10 → 1.1.12

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.
@@ -35,8 +35,10 @@ Sous asks a question only when it can. Piping output, redirecting it to a file a
35
35
  what `--non-interactive` does; see [When sous cannot ask](repositories-consuming.md#when-sous-cannot-ask).
36
36
 
37
37
  !> `sous clear` is the exception: without `-f` it asks even under `--non-interactive` or in CI, so pass `-f`
38
- whenever you script it. And `sous repo init --force` is not a confirmation; it overwrites a repository that
39
- already exists. Its `--yes` still runs waiting migrations without asking.
38
+ whenever you script it.
39
+
40
+ ?> `sous repo init --force` used to overwrite a repository that already existed. It is now the same flag as
41
+ `--yes`, as on every other command, and `sous repo init` never replaces a file unless `--overwrite` is given.
40
42
 
41
43
  ## Flags that control output
42
44
 
@@ -639,8 +641,22 @@ writes `.github/workflows/sous-release.yml` and `--host gitlab` writes `.gitlab-
639
641
  the `origin` remote, else `github`); on GitLab it warns that the release job needs the masked CI/CD variable
640
642
  `SOUS_RELEASE_TOKEN`. See [Authoring a repository](repositories-authoring.md).
641
643
 
644
+ It never replaces a file that exists. A file such as `README.md`, `CONTRIBUTING.md`, `sous.repo.yaml` or the
645
+ workflow is left as it is and named in a note; `.gitignore` gains a block between sous's marker comments, and
646
+ its other lines stay. `--overwrite` replaces the existing files with the scaffold's. `--force` is the same flag
647
+ as `--yes`.
648
+
649
+ `--for-project` lets a project publish its own recipes: it writes only `sous.repo.yaml`, listing
650
+ `.sous/recipes/*`, and does not run init. Then it asks, one at a time, whether to add the CI workflow, an
651
+ example recipe in `.sous/recipes/example`, and a section about the project's recipes at the end of `README.md`.
652
+ `--workflow`, `--example` and `--readme` answer yes ahead of time, and `--no-workflow`, `--no-example` and
653
+ `--no-readme` answer no. Without a terminal, or with `--yes`, a question no switch answers adds nothing. Its
654
+ directory defaults to the project's root. `--in-sous-directory` writes `sous.repo.yaml` into `.sous/` instead of
655
+ the root, with either form.
656
+
642
657
  ```bash
643
658
  sous repo init ./my-recipes --name team-recipes --namespace workflow
659
+ sous repo init --for-project --workflow --no-example --readme
644
660
  ```
645
661
 
646
662
  ### `sous repo release`
@@ -16,20 +16,18 @@ from a project that links the repository.
16
16
  $ sous repo init ./my-recipes --name my-recipes --namespace workflow
17
17
  ▶ Creating a recipe repository:
18
18
 
19
- wrote sous.repo.yaml
20
- wrote sous.index.json
21
- wrote recipes/workflow/example/sous.recipe.yaml
22
- wrote recipes/workflow/example/skills/example-skill/SKILL.tpl.md
23
- wrote README.md
24
- wrote CONTRIBUTING.md
25
- wrote .github/workflows/sous-release.yml
26
- wrote .gitignore
19
+ written sous.repo.yaml
20
+ written recipes/workflow/example/sous.recipe.yaml
21
+ written recipes/workflow/example/skills/example-skill/SKILL.tpl.md
22
+ written README.md
23
+ written CONTRIBUTING.md
24
+ written .gitignore
25
+ written .github/workflows/sous-release.yml
27
26
  // then sous init sets the repository up as a sous project, and runs its first build
28
27
  ```
29
28
 
30
29
  `--name` is the repository's short name (default: the directory's own name), `--namespace` the one namespace to
31
- declare (default: the repository's name), `--force` overwrites a repository that already exists, and `--dry-run`
32
- lists the files without writing them. `--host` names the repository host whose release automation to add:
30
+ declare (default: the repository's name), and `--dry-run` lists the files without writing them. `--host` names the repository host whose release automation to add:
33
31
  `github` writes `.github/workflows/sous-release.yml`, and `gitlab` writes `.gitlab-ci.yml`. Without it, the host is
34
32
  read from the directory's `origin` remote, and is `github` when there is none. Names are lowercase kebab-case, so `My-Recipes` yields `my-recipes`. Every
35
33
  file is read back through the schemas sous uses on published repositories, so the scaffold validates. The scaffold
@@ -46,11 +44,16 @@ with a `.git` folder, whether to install the git hooks; `--yes`, `--move-include
46
44
  `--leave-includes` are passed through, as are `--no-build` and `--dry-run`, and `--yes` installs the hooks. A
47
45
  directory that already holds a sous config keeps it, and init is skipped with a note.
48
46
 
49
- ?> `repo init --force` means overwrite, not "answer yes". It is unrelated to the confirmation flag other
50
- commands spell `--yes`, `-y`, `--force` or `--trust`.
47
+ The command never replaces a file that exists, so it is safe to run in a directory that already holds a README
48
+ or a `.gitignore`. A file that exists (`README.md`, `CONTRIBUTING.md`, `sous.repo.yaml`, the workflow, the example
49
+ recipe's files) is left as it is and named in a note; when it keeps an existing `sous.repo.yaml`, it writes no
50
+ example recipe, which that manifest would not list. `.gitignore` gains a block between sous's marker comments,
51
+ below the lines already there, and a second run leaves it as it is. `--overwrite` replaces the existing files with
52
+ the scaffold's. `--force` is the same flag as `--yes`; it used to mean overwrite.
51
53
 
52
- `sous.repo.yaml` says what the repository publishes, `sous.index.json` is the catalog that `sous repo release`
53
- writes, and each recipe folder carries one `sous.recipe.yaml` beside the files it contributes. `CONTRIBUTING.md` is
54
+ `sous.repo.yaml` says what the repository publishes, and each recipe folder carries one `sous.recipe.yaml` beside the files it contributes. The scaffold writes no
55
+ `sous.index.json`: `sous.repo.yaml` starts with a line saying comments are removed from it, and the first
56
+ `sous repo release` records the catalog of published versions below the fields you edit. `CONTRIBUTING.md` is
54
57
  for agents: it says that contribution instructions are written for agents, and that `sous build` after cloning
55
58
  installs the sous core skills, which explain how a recipe repository works. The scaffold follows
56
59
  [`sous-io/sous-recipes`](https://github.com/sous-io/sous-recipes), a complete repository minus its recipes, and
@@ -61,6 +64,34 @@ data: sous reads, validates and browses them without executing anything, before
61
64
  dry run and in `sous repo release --check`. What trusting a repository authorizes is described under
62
65
  [Trust](repositories.md#trust).
63
66
 
67
+ ### Publish a project's own recipes
68
+
69
+ Any project can publish recipes too, without a separate repository. In the project, run:
70
+
71
+ ```bash
72
+ sous repo init --for-project
73
+ ```
74
+
75
+ It writes one file, `sous.repo.yaml` at the project's root, naming the project and listing `.sous/recipes/*`, the
76
+ folders a project's own recipes live in:
77
+
78
+ ```yaml
79
+ # Note: Comments are systematically removed from this file.
80
+ formatVersion: 1
81
+ name: harbor-web
82
+ recipes:
83
+ - .sous/recipes/*
84
+ ```
85
+
86
+ Then it asks, one at a time, whether to add the CI workflow that checks and releases recipe changes, an example
87
+ recipe in `.sous/recipes/example`, and a section at the end of `README.md` saying how another project uses the
88
+ recipes. `--workflow`, `--example` and `--readme` answer yes ahead of time; `--no-workflow`, `--no-example` and
89
+ `--no-readme` answer no. Without a terminal, or with `--yes`, a question no switch answers adds nothing. The
90
+ README section sits between sous's marker comments, so the rest of the file is never touched. `--in-sous-directory`
91
+ writes the manifest into `.sous/` instead, where sous also looks for it. `--for-project` does not run
92
+ `sous init`; run it first if the project has no `.sous/` yet. A project with its own release pipeline adds one
93
+ step to it, `sous repo release --ci --push`, instead of the workflow.
94
+
64
95
  ## Write a recipe
65
96
 
66
97
  Copy the example folder, edit its manifest, and add its path to the `recipes` list in `sous.repo.yaml`, which is a
@@ -168,23 +168,24 @@ sous repo init ~/projects/my-recipes --name my-recipes --namespace workflow
168
168
 
169
169
  ```text
170
170
  ▶ Creating a recipe repository:
171
- wrote sous.repo.yaml
172
- wrote sous.index.json
173
- wrote recipes/workflow/example/sous.recipe.yaml
174
- wrote recipes/workflow/example/skills/example-skill/SKILL.tpl.md
175
- wrote README.md
176
- wrote CONTRIBUTING.md
177
- wrote .github/workflows/sous-release.yml
178
- wrote .gitignore
171
+ written sous.repo.yaml
172
+ written recipes/workflow/example/sous.recipe.yaml
173
+ written recipes/workflow/example/skills/example-skill/SKILL.tpl.md
174
+ written README.md
175
+ written CONTRIBUTING.md
176
+ written .gitignore
177
+ written .github/workflows/sous-release.yml
179
178
  ```
180
179
 
181
180
  On GitLab (an `origin` remote on GitLab, or `--host gitlab`) the scaffold writes `.gitlab-ci.yml` instead of
182
181
  `.github/workflows/sous-release.yml`, and warns that its release job needs a masked CI/CD variable named
183
182
  `SOUS_RELEASE_TOKEN`; see [the scaffolded workflow](repositories-authoring.md#the-scaffolded-workflow). The
184
183
  output goes on with what `sous init` writes and with its first build, which compiles the
185
- memories file. The scaffold validates as written, and every file it leaves is heavily commented. `sous.repo.yaml`
186
- declares the namespaces and lists every recipe folder; each folder's `sous.recipe.yaml` is one
187
- recipe, with its own version.
184
+ memories file. The scaffold validates as written, and never replaces a file that already exists
185
+ (`--overwrite` does). `sous.repo.yaml` declares the namespaces and lists every recipe folder; each folder's
186
+ `sous.recipe.yaml` is one recipe, with its own version, and is heavily commented. To publish recipes from a
187
+ project you already have instead, run `sous repo init --for-project` in it; see
188
+ [Publish a project's own recipes](repositories-authoring.md#publish-a-projects-own-recipes).
188
189
 
189
190
  ## 7. Put something in the recipe
190
191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sous-io/sous",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
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.10"
42
+ "@sous-io/sous-plugin-api": "1.1.12"
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.1.10",
50
- "@sous-io/sous-lib-documents": "1.1.10",
51
- "@sous-io/sous-plugin-authoring": "1.1.10",
52
- "@sous-io/sous-plugin-claude-code": "1.1.10",
53
- "@sous-io/sous-plugin-build": "1.1.10",
54
- "@sous-io/sous-plugin-cli": "1.1.10",
55
- "@sous-io/sous-plugin-confd": "1.1.10",
56
- "@sous-io/sous-plugin-compiler": "1.1.10",
57
- "@sous-io/sous-plugin-config-files": "1.1.10",
58
- "@sous-io/sous-plugin-expressions": "1.1.10",
59
- "@sous-io/sous-plugin-git": "1.1.10",
60
- "@sous-io/sous-plugin-formats": "1.1.10",
61
- "@sous-io/sous-plugin-gitlab": "1.1.10",
62
- "@sous-io/sous-plugin-init": "1.1.10",
63
- "@sous-io/sous-plugin-github": "1.1.10",
64
- "@sous-io/sous-plugin-inspect": "1.1.10",
65
- "@sous-io/sous-plugin-local": "1.1.10",
66
- "@sous-io/sous-plugin-mcp": "1.1.10",
67
- "@sous-io/sous-plugin-harnesses": "1.1.10",
68
- "@sous-io/sous-plugin-memories": "1.1.10",
69
- "@sous-io/sous-plugin-liquid": "1.1.10",
70
- "@sous-io/sous-plugin-host": "1.1.10",
71
- "@sous-io/sous-plugin-recipe-answers": "1.1.10",
72
- "@sous-io/sous-plugin-npm": "1.1.10",
73
- "@sous-io/sous-plugin-recipes": "1.1.10",
74
- "@sous-io/sous-plugin-refs": "1.1.10",
75
- "@sous-io/sous-plugin-pnpm": "1.1.10",
76
- "@sous-io/sous-plugin-variables": "1.1.10",
77
- "@sous-io/sous-plugin-yarn": "1.1.10",
78
- "@sous-io/sous-plugin-skills": "1.1.10",
79
- "@sous-io/sous-plugin-update": "1.1.10",
80
- "@sous-io/sous-plugin-doctor": "1.1.10",
81
- "@sous-io/sous-plugin-handlers": "1.1.10",
82
- "@sous-io/sous-plugin-codex": "1.1.10",
83
- "@sous-io/sous-plugin-editor": "1.1.10",
84
- "@sous-io/sous-plugin-migrations": "1.1.10"
49
+ "@sous-io/sous-lib-documents": "1.1.12",
50
+ "@sous-io/sous-plugin-claude-code": "1.1.12",
51
+ "@sous-io/sous-plugin-authoring": "1.1.12",
52
+ "@sous-io/sous-plugin-build": "1.1.12",
53
+ "@sous-io/sous-lib-core": "1.1.12",
54
+ "@sous-io/sous-plugin-compiler": "1.1.12",
55
+ "@sous-io/sous-plugin-cli": "1.1.12",
56
+ "@sous-io/sous-plugin-config-files": "1.1.12",
57
+ "@sous-io/sous-plugin-expressions": "1.1.12",
58
+ "@sous-io/sous-plugin-formats": "1.1.12",
59
+ "@sous-io/sous-plugin-github": "1.1.12",
60
+ "@sous-io/sous-plugin-git": "1.1.12",
61
+ "@sous-io/sous-plugin-harnesses": "1.1.12",
62
+ "@sous-io/sous-plugin-host": "1.1.12",
63
+ "@sous-io/sous-plugin-gitlab": "1.1.12",
64
+ "@sous-io/sous-plugin-inspect": "1.1.12",
65
+ "@sous-io/sous-plugin-init": "1.1.12",
66
+ "@sous-io/sous-plugin-liquid": "1.1.12",
67
+ "@sous-io/sous-plugin-local": "1.1.12",
68
+ "@sous-io/sous-plugin-mcp": "1.1.12",
69
+ "@sous-io/sous-plugin-pnpm": "1.1.12",
70
+ "@sous-io/sous-plugin-refs": "1.1.12",
71
+ "@sous-io/sous-plugin-memories": "1.1.12",
72
+ "@sous-io/sous-plugin-npm": "1.1.12",
73
+ "@sous-io/sous-plugin-skills": "1.1.12",
74
+ "@sous-io/sous-plugin-recipes": "1.1.12",
75
+ "@sous-io/sous-plugin-update": "1.1.12",
76
+ "@sous-io/sous-plugin-recipe-answers": "1.1.12",
77
+ "@sous-io/sous-plugin-variables": "1.1.12",
78
+ "@sous-io/sous-plugin-yarn": "1.1.12",
79
+ "@sous-io/sous-plugin-handlers": "1.1.12",
80
+ "@sous-io/sous-plugin-doctor": "1.1.12",
81
+ "@sous-io/sous-plugin-migrations": "1.1.12",
82
+ "@sous-io/sous-plugin-codex": "1.1.12",
83
+ "@sous-io/sous-plugin-editor": "1.1.12",
84
+ "@sous-io/sous-plugin-confd": "1.1.12"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=22"
@@ -198,8 +198,11 @@ yet, then unlinks with `--update`.
198
198
  ## Creating a Repository
199
199
 
200
200
  `sous repo init [dir]` writes a new recipe repository into the directory (the current one by
201
- default): the repo manifest, an empty index, one example recipe with its manifest and a
202
- placeholder skill, a README, `CONTRIBUTING.md` for agents, the release workflow and a `.gitignore`.
201
+ default): the repo manifest (no index; the first release records the published data in it), one
202
+ example recipe with its manifest and a placeholder skill, a README, `CONTRIBUTING.md` for agents,
203
+ the release workflow and a block in `.gitignore`. It NEVER replaces a file that exists: an existing
204
+ file is left as it is and named in a note, and `.gitignore` gains a block between sous's marker
205
+ comments. `--overwrite` replaces existing files; `--force` is `--yes`, not overwrite.
203
206
  `sous-io/sous-recipes` is the model a scaffold follows: a new repository is as complete as it, minus
204
207
  its recipes. It does not run git: run `git init`, commit, and add a remote before the first release,
205
208
  because `sous repo release` reads and writes tags. Every new recipe folder is then listed under
@@ -214,6 +217,12 @@ core skills. `--yes`, `--move-includes`, `--copy-includes`,
214
217
  `--leave-includes`, `--no-build` and `--dry-run` pass through to init. A directory that already
215
218
  holds a sous config keeps it, and init is skipped with a note.
216
219
 
220
+ `sous repo init --for-project` makes an existing project publish its own recipes: it writes only
221
+ `sous.repo.yaml` (listing `.sous/recipes/*`), runs no init, and asks one at a time about the CI
222
+ workflow, an example recipe and a `README.md` section; `--workflow`, `--example` and `--readme`
223
+ (each with a `--no-` form) answer ahead, and without a terminal none is added unless its switch
224
+ says so. `--in-sous-directory` writes the manifest into `.sous/`, where sous also looks for it.
225
+
217
226
  ## Source for this Skill
218
227
 
219
228
  This skill comes from the `core/sous-skills` recipe, installed by sous from a recipe
@@ -11,7 +11,7 @@ formatVersion: 1
11
11
 
12
12
  namespace: core
13
13
  name: sous-skills
14
- version: 1.1.10
14
+ version: 1.1.12
15
15
 
16
16
  description: >-
17
17
  The skills that teach an agent what sous is and how it works: which files sous