@sous-io/sous 1.1.8 → 1.1.9
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 +30 -30
- package/docs/markdown/README.md +4 -1
- package/docs/markdown/_sidebar.md +1 -0
- package/docs/markdown/commands.md +42 -5
- package/docs/markdown/configuration.md +4 -3
- package/package.json +38 -38
- package/recipes/core/sous-skills/skills/about-sous/SKILL.tpl.md +13 -2
- package/recipes/core/sous-skills/sous.recipe.yaml +1 -1
package/docs/markdown/README.md
CHANGED
|
@@ -74,7 +74,7 @@ manager that installed it, so you never need to remember which one that was or i
|
|
|
74
74
|
no `node_modules`, counts as installing sous when its `package.json` declares it and a `.pnp.cjs`
|
|
75
75
|
sits beside it or above it; the installed version is read from `yarn.lock`.
|
|
76
76
|
- **After a project upgrade**, the newly installed copy runs the migrations its version brings (see
|
|
77
|
-
[`sous
|
|
77
|
+
[`sous migrate`](commands.md#sous-migrate)), then builds the project, so
|
|
78
78
|
`.sous/sous.lock.json` pins the core recipe at the new version. Under Yarn Plug'n'Play, Yarn
|
|
79
79
|
runs that build (`yarn run --binaries-only sous build`). `--no-build` skips it.
|
|
80
80
|
|
|
@@ -85,6 +85,9 @@ it fails with `EBADF: bad file descriptor`. Unpack it in `package.json`, then ru
|
|
|
85
85
|
"dependenciesMeta": { "@sous-io/sous": { "unplugged": true } }
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
A copy upgraded any other way (a pull that changed `package.json`, say) runs its migrations before the first
|
|
89
|
+
command you give it, asking first when it can; see [`sous migrate`](commands.md#sous-migrate).
|
|
90
|
+
|
|
88
91
|
`upgrade` always runs in the copy you invoked, never handed off to the project's own; a project copy
|
|
89
92
|
may be too old to have the command. A project config this copy cannot load (one written for a newer
|
|
90
93
|
sous, say) is a warning rather than a stop, since installing a newer copy may be the fix.
|
|
@@ -84,3 +84,4 @@
|
|
|
84
84
|
- [0040: One config build per harness](adrs/0040-one-config-build-per-harness.md)
|
|
85
85
|
- [0041: A target one harness's build holds reaches that harness](adrs/0041-harness-only-targets.md)
|
|
86
86
|
- [0042: Retired recipes stay in the index and name their replacements](adrs/0042-retired-recipes.md)
|
|
87
|
+
- [0043: Every command runs the waiting migrations first](adrs/0043-migrations-before-every-command.md)
|
|
@@ -21,8 +21,12 @@ finds by walking up from the working directory.
|
|
|
21
21
|
|
|
22
22
|
## Flags that answer questions
|
|
23
23
|
|
|
24
|
-
- `-y, --yes` answers yes to every confirmation the command would ask
|
|
25
|
-
|
|
24
|
+
- `-y, --yes` answers yes to every confirmation the command would ask, and runs any
|
|
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.
|
|
27
|
+
- `--skip-failed-migrations` skips a waiting migration that fails, or asks a question nothing answers, and runs
|
|
28
|
+
the command anyway. The skipped migration is not recorded as run: the next command tries it again. Every
|
|
29
|
+
command takes it.
|
|
26
30
|
- `--non-interactive` never asks anything. A run that would have asked fails instead, naming the question and
|
|
27
31
|
the flag that would have answered it.
|
|
28
32
|
- `--dry-run` prints what the command would do, and writes, downloads and asks nothing.
|
|
@@ -32,7 +36,7 @@ what `--non-interactive` does; see [When sous cannot ask](repositories-consuming
|
|
|
32
36
|
|
|
33
37
|
!> `sous clear` is the exception: without `-f` it asks even under `--non-interactive` or in CI, so pass `-f`
|
|
34
38
|
whenever you script it. And `sous repo init --force` is not a confirmation; it overwrites a repository that
|
|
35
|
-
already exists.
|
|
39
|
+
already exists. Its `--yes` still runs waiting migrations without asking.
|
|
36
40
|
|
|
37
41
|
## Flags that control output
|
|
38
42
|
|
|
@@ -477,14 +481,47 @@ migrations run in order and none runs until every question is answered. They do
|
|
|
477
481
|
the last line says they wait: "Nothing failed, but 3 migrations are waiting for an answer."
|
|
478
482
|
|
|
479
483
|
A migration brings a project's files in line with a newer version of sous. Each runs once for the project: the
|
|
480
|
-
lockfile records the version of sous whose migrations the project last ran.
|
|
481
|
-
|
|
484
|
+
lockfile records the version of sous whose migrations the project last ran. Every other command runs the
|
|
485
|
+
waiting ones first; see [`sous migrate`](#sous-migrate).
|
|
482
486
|
|
|
483
487
|
```bash
|
|
484
488
|
sous doctor --dry-run
|
|
485
489
|
sous doctor --yes
|
|
486
490
|
```
|
|
487
491
|
|
|
492
|
+
### `sous migrate`
|
|
493
|
+
|
|
494
|
+
Runs the migrations a newer version of sous brought that this project has not run yet. Each migration's
|
|
495
|
+
questions are asked before any of them runs; `--answer <name>=<value>` answers one ahead of time, `--yes` takes
|
|
496
|
+
each question's default, and `--dry-run` lists what would run, with which answers, and changes nothing. Without
|
|
497
|
+
a terminal, a question nothing answers leaves every migration waiting: the command lists each question and the
|
|
498
|
+
`--answer` for it, and does not fail. `--skip-failed-migrations` stops without failing at a migration that fails
|
|
499
|
+
or cannot be answered: the migrations before it are recorded as run, and it and every one after it stay waiting,
|
|
500
|
+
so the next command tries them again. `sous migrations run`, its earlier name, still works.
|
|
501
|
+
|
|
502
|
+
Every other command runs the waiting migrations first, except `sous doctor` and `sous upgrade` (which run them
|
|
503
|
+
themselves), and `sous help`, `sous --version`, `sous completion`, `sous mcp` and `sous timings show`:
|
|
504
|
+
|
|
505
|
+
- With a terminal, it lists them and asks whether to run them, even when they ask nothing; their own questions
|
|
506
|
+
follow. Answering no stops the command.
|
|
507
|
+
- Without a terminal, they run when nothing is left to ask. When a question is left, the command stops with
|
|
508
|
+
"Sous was upgraded without running migrations, please run 'sous migrate' or 'sous doctor', first", with each
|
|
509
|
+
question and its `--answer` under it.
|
|
510
|
+
- With `--yes`, they run without asking, each question taking its default. A question with no default stops the
|
|
511
|
+
command, as above.
|
|
512
|
+
- A migration that fails stops the command. With `--skip-failed-migrations`, it and the migrations after it are
|
|
513
|
+
left waiting, with a warning, and the command runs; the next command tries them again, by these same rules.
|
|
514
|
+
|
|
515
|
+
What ran, and what was skipped, goes to standard error, so `--json` output stays clean. A tool call through
|
|
516
|
+
`sous mcp` has no terminal, so it follows the rules for no terminal.
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
sous migrate --dry-run
|
|
520
|
+
sous migrate --answer claude-code.memories=keep
|
|
521
|
+
sous build --yes
|
|
522
|
+
sous build --skip-failed-migrations
|
|
523
|
+
```
|
|
524
|
+
|
|
488
525
|
### `sous mcp`
|
|
489
526
|
|
|
490
527
|
Starts an MCP server for the project, for any agent tool that speaks MCP. Its tools are the same commands the
|
|
@@ -91,8 +91,9 @@ A file Sous did not write that is already at `memoriesOutputPath` is backed up t
|
|
|
91
91
|
with a warning, and replaced.
|
|
92
92
|
|
|
93
93
|
?> Before version 1.1.0 the recipes' memories went into the root `CLAUDE.md`. A project upgraded
|
|
94
|
-
from then is asked once, by
|
|
95
|
-
(the default) or keep them in `CLAUDE.md`
|
|
94
|
+
from then is asked once, by the first command it runs (or by `sous migrate`, `sous doctor` or `sous upgrade`),
|
|
95
|
+
whether to move them to the new file (the default) or keep them in `CLAUDE.md`
|
|
96
|
+
(`sous migrate --answer claude-code.memories=keep`).
|
|
96
97
|
|
|
97
98
|
A JSON config may set `"$schema"` to bind the `sous.config.schema.json` artifact shipped with
|
|
98
99
|
sous for editor autocompletion; sous accepts and ignores the key.
|
|
@@ -145,7 +146,7 @@ rebuilds the config when it sees one.
|
|
|
145
146
|
|
|
146
147
|
To write an output only under a condition, put a [config expression](#config-expressions) on the output
|
|
147
148
|
itself. The output setting `_if` was removed; a config that still uses it is refused with the `$if` to write
|
|
148
|
-
instead. `sous
|
|
149
|
+
instead. `sous migrate` (and `sous doctor` and `sous upgrade`) runs a migration that rewrites it for you in a `.json`, `.jsonc` or
|
|
149
150
|
`.yaml` config file, changing only that output; for a config written as JavaScript or TypeScript it lists each
|
|
150
151
|
`_if` with its line and the expression to write. An `_if` on a variable named `env` or `host` is left for you,
|
|
151
152
|
since an expression reads those names as sous's own values:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sous-io/sous",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
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.
|
|
42
|
+
"@sous-io/sous-plugin-api": "1.1.9"
|
|
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.
|
|
50
|
-
"@sous-io/sous-lib-documents": "1.1.
|
|
51
|
-
"@sous-io/sous-plugin-
|
|
52
|
-
"@sous-io/sous-plugin-
|
|
53
|
-
"@sous-io/sous-plugin-
|
|
54
|
-
"@sous-io/sous-plugin-cli": "1.1.
|
|
55
|
-
"@sous-io/sous-plugin-
|
|
56
|
-
"@sous-io/sous-plugin-
|
|
57
|
-
"@sous-io/sous-plugin-
|
|
58
|
-
"@sous-io/sous-plugin-expressions": "1.1.
|
|
59
|
-
"@sous-io/sous-plugin-formats": "1.1.
|
|
60
|
-
"@sous-io/sous-plugin-
|
|
61
|
-
"@sous-io/sous-plugin-
|
|
62
|
-
"@sous-io/sous-plugin-
|
|
63
|
-
"@sous-io/sous-plugin-host": "1.1.
|
|
64
|
-
"@sous-io/sous-plugin-init": "1.1.
|
|
65
|
-
"@sous-io/sous-plugin-
|
|
66
|
-
"@sous-io/sous-plugin-
|
|
67
|
-
"@sous-io/sous-plugin-
|
|
68
|
-
"@sous-io/sous-plugin-
|
|
69
|
-
"@sous-io/sous-plugin-
|
|
70
|
-
"@sous-io/sous-plugin-
|
|
71
|
-
"@sous-io/sous-plugin-
|
|
72
|
-
"@sous-io/sous-plugin-
|
|
73
|
-
"@sous-io/sous-plugin-
|
|
74
|
-
"@sous-io/sous-plugin-
|
|
75
|
-
"@sous-io/sous-plugin-
|
|
76
|
-
"@sous-io/sous-plugin-
|
|
77
|
-
"@sous-io/sous-plugin-
|
|
78
|
-
"@sous-io/sous-plugin-
|
|
79
|
-
"@sous-io/sous-plugin-handlers": "1.1.
|
|
80
|
-
"@sous-io/sous-plugin-
|
|
81
|
-
"@sous-io/sous-plugin-
|
|
82
|
-
"@sous-io/sous-plugin-
|
|
83
|
-
"@sous-io/sous-plugin-
|
|
84
|
-
"@sous-io/sous-plugin-
|
|
49
|
+
"@sous-io/sous-lib-core": "1.1.9",
|
|
50
|
+
"@sous-io/sous-lib-documents": "1.1.9",
|
|
51
|
+
"@sous-io/sous-plugin-authoring": "1.1.9",
|
|
52
|
+
"@sous-io/sous-plugin-build": "1.1.9",
|
|
53
|
+
"@sous-io/sous-plugin-claude-code": "1.1.9",
|
|
54
|
+
"@sous-io/sous-plugin-cli": "1.1.9",
|
|
55
|
+
"@sous-io/sous-plugin-compiler": "1.1.9",
|
|
56
|
+
"@sous-io/sous-plugin-confd": "1.1.9",
|
|
57
|
+
"@sous-io/sous-plugin-config-files": "1.1.9",
|
|
58
|
+
"@sous-io/sous-plugin-expressions": "1.1.9",
|
|
59
|
+
"@sous-io/sous-plugin-formats": "1.1.9",
|
|
60
|
+
"@sous-io/sous-plugin-git": "1.1.9",
|
|
61
|
+
"@sous-io/sous-plugin-gitlab": "1.1.9",
|
|
62
|
+
"@sous-io/sous-plugin-harnesses": "1.1.9",
|
|
63
|
+
"@sous-io/sous-plugin-host": "1.1.9",
|
|
64
|
+
"@sous-io/sous-plugin-init": "1.1.9",
|
|
65
|
+
"@sous-io/sous-plugin-inspect": "1.1.9",
|
|
66
|
+
"@sous-io/sous-plugin-liquid": "1.1.9",
|
|
67
|
+
"@sous-io/sous-plugin-local": "1.1.9",
|
|
68
|
+
"@sous-io/sous-plugin-mcp": "1.1.9",
|
|
69
|
+
"@sous-io/sous-plugin-npm": "1.1.9",
|
|
70
|
+
"@sous-io/sous-plugin-pnpm": "1.1.9",
|
|
71
|
+
"@sous-io/sous-plugin-recipe-answers": "1.1.9",
|
|
72
|
+
"@sous-io/sous-plugin-recipes": "1.1.9",
|
|
73
|
+
"@sous-io/sous-plugin-refs": "1.1.9",
|
|
74
|
+
"@sous-io/sous-plugin-skills": "1.1.9",
|
|
75
|
+
"@sous-io/sous-plugin-update": "1.1.9",
|
|
76
|
+
"@sous-io/sous-plugin-variables": "1.1.9",
|
|
77
|
+
"@sous-io/sous-plugin-memories": "1.1.9",
|
|
78
|
+
"@sous-io/sous-plugin-yarn": "1.1.9",
|
|
79
|
+
"@sous-io/sous-plugin-handlers": "1.1.9",
|
|
80
|
+
"@sous-io/sous-plugin-editor": "1.1.9",
|
|
81
|
+
"@sous-io/sous-plugin-doctor": "1.1.9",
|
|
82
|
+
"@sous-io/sous-plugin-migrations": "1.1.9",
|
|
83
|
+
"@sous-io/sous-plugin-codex": "1.1.9",
|
|
84
|
+
"@sous-io/sous-plugin-github": "1.1.9"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=22"
|
|
@@ -3,8 +3,9 @@ name: about-sous
|
|
|
3
3
|
description: >
|
|
4
4
|
YOU MUST load this skill when you cannot edit a file in this project, are asked why
|
|
5
5
|
a file keeps reverting, want to change a skill, memory or other file that came from a
|
|
6
|
-
recipe, need to know where the source of truth for any managed file lives,
|
|
7
|
-
understand what this project's configuration system is
|
|
6
|
+
recipe, need to know where the source of truth for any managed file lives, need to
|
|
7
|
+
understand what this project's configuration system is, or a sous command fails because
|
|
8
|
+
migrations have not run.
|
|
8
9
|
user-invocable: false
|
|
9
10
|
---
|
|
10
11
|
|
|
@@ -125,6 +126,16 @@ require plugins from npm; `sous subscription add` refuses it while one is missin
|
|
|
125
126
|
its version range, and offers to install it. Run `sous plugins show` to list every loaded plugin
|
|
126
127
|
and what it added.
|
|
127
128
|
|
|
129
|
+
## Migrations After an Upgrade
|
|
130
|
+
|
|
131
|
+
A newer sous may bring migrations: steps that bring the project's files in line with it. Every
|
|
132
|
+
command runs the waiting ones first. Without a terminal (as when an agent runs sous), a
|
|
133
|
+
migration that asks a question stops the command with "Sous was upgraded without running
|
|
134
|
+
migrations, please run 'sous migrate' or 'sous doctor', first", listing each question. Run
|
|
135
|
+
`sous migrate --dry-run` to see what would run, ask the user each listed question, then run
|
|
136
|
+
`sous migrate --answer <name>=<value>` with their answers. `--yes` takes every default without
|
|
137
|
+
asking the user; use it only when the user agrees to the defaults.
|
|
138
|
+
|
|
128
139
|
## Sous's Own Documentation
|
|
129
140
|
|
|
130
141
|
Sous's full documentation ships inside the installed package as plain markdown
|