@sous-io/sous 1.0.19 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sous-io/sous",
3
- "version": "1.0.19",
3
+ "version": "1.1.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,44 +39,49 @@
39
39
  "sous.config.schema.json"
40
40
  ],
41
41
  "dependencies": {
42
- "@sous-io/plugin-api": "1.0.19"
42
+ "@sous-io/sous-plugin-api": "1.1.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/documents": "1.0.19",
50
- "@sous-io/plugin-build": "1.0.19",
51
- "@sous-io/plugin-claude-code": "1.0.19",
52
- "@sous-io/core": "1.0.19",
53
- "@sous-io/plugin-authoring": "1.0.19",
54
- "@sous-io/plugin-cli": "1.0.19",
55
- "@sous-io/plugin-compiler": "1.0.19",
56
- "@sous-io/plugin-confd": "1.0.19",
57
- "@sous-io/plugin-config-files": "1.0.19",
58
- "@sous-io/plugin-expressions": "1.0.19",
59
- "@sous-io/plugin-formats": "1.0.19",
60
- "@sous-io/plugin-github": "1.0.19",
61
- "@sous-io/plugin-gitlab": "1.0.19",
62
- "@sous-io/plugin-host": "1.0.19",
63
- "@sous-io/plugin-harnesses": "1.0.19",
64
- "@sous-io/plugin-git": "1.0.19",
65
- "@sous-io/plugin-init": "1.0.19",
66
- "@sous-io/plugin-local": "1.0.19",
67
- "@sous-io/plugin-liquid": "1.0.19",
68
- "@sous-io/plugin-memories": "1.0.19",
69
- "@sous-io/plugin-mcp": "1.0.19",
70
- "@sous-io/plugin-npm": "1.0.19",
71
- "@sous-io/plugin-pnpm": "1.0.19",
72
- "@sous-io/plugin-inspect": "1.0.19",
73
- "@sous-io/plugin-recipe-answers": "1.0.19",
74
- "@sous-io/plugin-recipes": "1.0.19",
75
- "@sous-io/plugin-refs": "1.0.19",
76
- "@sous-io/plugin-variables": "1.0.19",
77
- "@sous-io/plugin-update": "1.0.19",
78
- "@sous-io/plugin-yarn": "1.0.19",
79
- "@sous-io/plugin-skills": "1.0.19"
49
+ "@sous-io/sous-lib-core": "1.1.0",
50
+ "@sous-io/sous-lib-documents": "1.1.0",
51
+ "@sous-io/sous-plugin-authoring": "1.1.0",
52
+ "@sous-io/sous-plugin-claude-code": "1.1.0",
53
+ "@sous-io/sous-plugin-build": "1.1.0",
54
+ "@sous-io/sous-plugin-cli": "1.1.0",
55
+ "@sous-io/sous-plugin-confd": "1.1.0",
56
+ "@sous-io/sous-plugin-compiler": "1.1.0",
57
+ "@sous-io/sous-plugin-formats": "1.1.0",
58
+ "@sous-io/sous-plugin-config-files": "1.1.0",
59
+ "@sous-io/sous-plugin-expressions": "1.1.0",
60
+ "@sous-io/sous-plugin-git": "1.1.0",
61
+ "@sous-io/sous-plugin-gitlab": "1.1.0",
62
+ "@sous-io/sous-plugin-github": "1.1.0",
63
+ "@sous-io/sous-plugin-harnesses": "1.1.0",
64
+ "@sous-io/sous-plugin-host": "1.1.0",
65
+ "@sous-io/sous-plugin-init": "1.1.0",
66
+ "@sous-io/sous-plugin-inspect": "1.1.0",
67
+ "@sous-io/sous-plugin-liquid": "1.1.0",
68
+ "@sous-io/sous-plugin-local": "1.1.0",
69
+ "@sous-io/sous-plugin-mcp": "1.1.0",
70
+ "@sous-io/sous-plugin-memories": "1.1.0",
71
+ "@sous-io/sous-plugin-npm": "1.1.0",
72
+ "@sous-io/sous-plugin-refs": "1.1.0",
73
+ "@sous-io/sous-plugin-recipes": "1.1.0",
74
+ "@sous-io/sous-plugin-skills": "1.1.0",
75
+ "@sous-io/sous-plugin-recipe-answers": "1.1.0",
76
+ "@sous-io/sous-plugin-pnpm": "1.1.0",
77
+ "@sous-io/sous-plugin-variables": "1.1.0",
78
+ "@sous-io/sous-plugin-update": "1.1.0",
79
+ "@sous-io/sous-plugin-handlers": "1.1.0",
80
+ "@sous-io/sous-plugin-editor": "1.1.0",
81
+ "@sous-io/sous-plugin-yarn": "1.1.0",
82
+ "@sous-io/sous-plugin-doctor": "1.1.0",
83
+ "@sous-io/sous-plugin-migrations": "1.1.0",
84
+ "@sous-io/sous-plugin-codex": "1.1.0"
80
85
  },
81
86
  "engines": {
82
87
  "node": ">=22"
@@ -23,7 +23,8 @@ in its output, but the edit no longer takes effect:
23
23
 
24
24
  - `.claude/`: Claude Code configuration, skills, and instructions
25
25
  - `.codex/`: Codex configuration and skills
26
- - `AGENTS.md` and `CLAUDE.md`: agent instruction files
26
+ - `.claude/rules/SOUS-MEMORIES.md` and `AGENTS.override.md`: the memories files Sous compiles for
27
+ Claude Code and Codex
27
28
  - Any file you did not create yourself in a designated source directory
28
29
 
29
30
  If you need to change something in one of these files, the change must be made at the
@@ -31,21 +32,23 @@ source, in the central configuration this project uses with Sous.
31
32
 
32
33
  ## Where the Instructions Come From
33
34
 
34
- In a project `sous init` set up, Sous owns all agent configuration. The root `CLAUDE.md` and
35
- `AGENTS.md` are both compiled from `.sous/memories/instructions.tpl.md`, and they and
35
+ In a project `sous init` set up, Sous owns all agent configuration. Each coding tool's plugin
36
+ compiles one memories file that tool reads in every session: `.claude/rules/SOUS-MEMORIES.md` for
37
+ Claude Code, which Claude Code loads beside any `CLAUDE.md` the project has, and, once a project
38
+ turns Codex on, `AGENTS.override.md`, which holds the project's `AGENTS.md` first. They and
36
39
  `.claude/skills/` are gitignored build output, so `sous build` recreates them after a clone.
37
- That source holds no instructions itself; it includes:
40
+ Their source is `.sous/MEMORIES.tpl.md`, which holds no instructions itself; it includes:
38
41
 
39
42
  ```markdown
40
- @*/**/*.md
43
+ @memories/**/*.md
41
44
  @#memories/**/*.md
42
45
  ```
43
46
 
44
- - The first line pulls in this project's own memories: every markdown file in a folder beside
45
- the source, such as `.sous/memories/imported/` (the `CLAUDE.md` or `AGENTS.md` the project had
46
- before `sous init`), `.sous/memories/project/` or `.sous/memories/conventions/`. To change the
47
- instructions, edit one of these files or add one, then run `sous build`. Keep at least one file
48
- there: an include that matches nothing stops the build.
47
+ - The first line pulls in this project's own memories: every markdown file under
48
+ `.sous/memories/`, such as `.sous/memories/imported/` (the `CLAUDE.md` or `AGENTS.md` the
49
+ project had before `sous init`) or `.sous/memories/project.tpl.md`. To change the
50
+ instructions, edit one of these files or add one, then run `sous build`. A memories file that
51
+ compiles to nothing is not written.
49
52
  - Files those memories include by a line holding only `@path.md` were moved or copied to
50
53
  `.sous/includes/<their path from the project root>`, outside `memories/`, so each one appears
51
54
  only where its include line is. Edit them there.
@@ -74,10 +74,10 @@ prefer the on-disk copies.
74
74
  `recipes.memories.first` and `recipes.memories.exclude` (globs over `namespace/recipe`, or
75
75
  `/regex/` strings) order and filter the recipe memories.
76
76
  - A target in `compilation.targets` wins over a plugin's or a recipe's target that would write
77
- the same file. That is why the config `sous init` writes, which compiles
78
- `.sous/memories/instructions.tpl.md` into both `CLAUDE.md` and `AGENTS.md`, replaces the
79
- Claude Code plugin's own `CLAUDE.md`, and why a project skill compiled from `.sous/skills/`
80
- replaces a recipe skill of the same name (the build warns about the recipe's copy).
77
+ the same file. A project that compiles its own memories file replaces the one the Claude Code
78
+ plugin builds (`.claude/rules/SOUS-MEMORIES.md`, from `.sous/MEMORIES.tpl.md`; the config
79
+ `sous init` writes compiles none), and a project skill compiled from `.sous/skills/` replaces a
80
+ recipe skill of the same name (the build warns about the recipe's copy).
81
81
  - The `plugins` key decides which Sous plugins (packages that extend sous itself) load, beyond
82
82
  the built-ins and those listed in the project's `package.json`, and holds each plugin's own
83
83
  options. `configuration.md` above documents its fields. Run `sous plugins show` to see which
@@ -212,10 +212,10 @@ group of `kind: memories`, for example `include: [memories/**/*.md]`. A plain `.
212
212
  as it is; name a file `*.tpl.md` when it needs the subscriber's answers. The recipe never says where
213
213
  a memory lands. A subscribing project can include the memories of every recipe it holds directly
214
214
  with one line, `@#memories/**/*.md`, at the virtual path `#memories/<namespace>/<recipe>/<path>`
215
- (the path being relative to the pattern's static base). The Sous plugin for a coding agent may
216
- also name the instruction file that agent reads (`CLAUDE.md` for Claude Code, for example), and
217
- sous then adds the active recipes' memories to that file itself, unless the subscriber's own config
218
- compiles that file (as one `sous init` set up does, through `@#memories/**/*.md`). A recipe held only through `depends` is a library and
215
+ (the path being relative to the pattern's static base). The Sous plugin for a coding agent also
216
+ compiles one memories file that agent reads in every session (`.claude/rules/SOUS-MEMORIES.md` for
217
+ Claude Code, `AGENTS.override.md` for Codex), whose default source holds that line, so the active
218
+ recipes' memories reach the agent without a line of the subscriber's own. A recipe held only through `depends` is a library and
219
219
  contributes none, and the subscriber's build warns about a published memory no output includes.
220
220
 
221
221
  ## Includes and Partials
@@ -179,9 +179,10 @@ because `sous repo release` reads and writes tags. Every new recipe folder is th
179
179
 
180
180
  After the scaffold it runs `sous init` in the same directory, so the repository is also a sous
181
181
  project. Init imports any `CLAUDE.md`, `AGENTS.md` or `.claude/skills/` already there; with nothing
182
- to import, it writes `.sous/memories/project/sous-repo.tpl.md`, a memory saying this is a sous
183
- recipe repository and naming the core skills an agent loads before changing anything. Its first
184
- build compiles `CLAUDE.md` and `AGENTS.md`. `--yes`, `--move-includes`, `--copy-includes`,
182
+ to import, it writes `.sous/memories/project.tpl.md`, a memory saying this is a sous recipe
183
+ repository and naming the core skills an agent loads before changing anything. Its first build
184
+ compiles the memories file (`.claude/rules/SOUS-MEMORIES.md` for Claude Code) and installs the
185
+ core skills. `--yes`, `--move-includes`, `--copy-includes`,
185
186
  `--leave-includes`, `--no-build` and `--dry-run` pass through to init. A directory that already
186
187
  holds a sous config keeps it, and init is skipped with a note.
187
188
 
@@ -11,7 +11,7 @@ formatVersion: 1
11
11
 
12
12
  namespace: core
13
13
  name: sous-skills
14
- version: 1.0.19
14
+ version: 1.1.0
15
15
 
16
16
  description: >-
17
17
  The skills that teach an agent what sous is and how it works: which files sous
@@ -75,6 +75,166 @@
75
75
  "type": "string"
76
76
  }
77
77
  },
78
+ "varOverrides": {
79
+ "default": [],
80
+ "description": "Variables for every output whose path matches a pattern, outputs a plugin or a recipe added included. A rule wins over the output's own _vars.",
81
+ "type": "array",
82
+ "items": {
83
+ "type": "object",
84
+ "properties": {
85
+ "match": {
86
+ "anyOf": [
87
+ {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ {
92
+ "minItems": 1,
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ }
98
+ }
99
+ ],
100
+ "description": "The output paths the rule applies to: a glob, or a regular expression written /.../, or a list of them."
101
+ },
102
+ "exclude": {
103
+ "description": "Output paths the rule leaves out, though match takes them.",
104
+ "anyOf": [
105
+ {
106
+ "type": "string",
107
+ "minLength": 1
108
+ },
109
+ {
110
+ "minItems": 1,
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string",
114
+ "minLength": 1
115
+ }
116
+ }
117
+ ]
118
+ },
119
+ "_vars": {
120
+ "type": "object",
121
+ "propertyNames": {
122
+ "type": "string"
123
+ },
124
+ "additionalProperties": {
125
+ "type": "string"
126
+ },
127
+ "description": "The variables to set. They win over the output's own _vars; a later rule wins over an earlier one."
128
+ }
129
+ },
130
+ "required": [
131
+ "match",
132
+ "_vars"
133
+ ],
134
+ "additionalProperties": false
135
+ }
136
+ },
137
+ "files": {
138
+ "description": "Every file a build writes, listed while the config is built. Set by sous; anything written here is replaced.",
139
+ "type": "array",
140
+ "items": {
141
+ "type": "object",
142
+ "properties": {
143
+ "target": {
144
+ "type": "string"
145
+ },
146
+ "targetIndex": {
147
+ "type": "integer",
148
+ "minimum": 0,
149
+ "maximum": 9007199254740991
150
+ },
151
+ "source": {
152
+ "type": "string"
153
+ },
154
+ "output": {
155
+ "type": "integer",
156
+ "minimum": 0,
157
+ "maximum": 9007199254740991
158
+ },
159
+ "destination": {
160
+ "type": "string"
161
+ },
162
+ "harness": {
163
+ "type": "string"
164
+ },
165
+ "_vars": {
166
+ "type": "object",
167
+ "propertyNames": {
168
+ "type": "string"
169
+ },
170
+ "additionalProperties": {
171
+ "type": "string"
172
+ }
173
+ }
174
+ },
175
+ "required": [
176
+ "target",
177
+ "targetIndex",
178
+ "source",
179
+ "output",
180
+ "destination"
181
+ ],
182
+ "additionalProperties": false
183
+ }
184
+ },
185
+ "listing": {
186
+ "description": "What listing compilation.files found. Set by sous.",
187
+ "type": "object",
188
+ "properties": {
189
+ "targets": {
190
+ "type": "integer",
191
+ "minimum": 0,
192
+ "maximum": 9007199254740991
193
+ },
194
+ "problems": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "object",
198
+ "properties": {
199
+ "level": {
200
+ "type": "string",
201
+ "enum": [
202
+ "error",
203
+ "warning"
204
+ ]
205
+ },
206
+ "message": {
207
+ "type": "string"
208
+ },
209
+ "target": {
210
+ "type": "string"
211
+ },
212
+ "file": {
213
+ "type": "string"
214
+ },
215
+ "line": {
216
+ "type": "number"
217
+ },
218
+ "targetIndex": {
219
+ "type": "integer",
220
+ "minimum": 0,
221
+ "maximum": 9007199254740991
222
+ }
223
+ },
224
+ "required": [
225
+ "level",
226
+ "message"
227
+ ],
228
+ "additionalProperties": false
229
+ }
230
+ }
231
+ },
232
+ "required": [
233
+ "targets",
234
+ "problems"
235
+ ],
236
+ "additionalProperties": false
237
+ },
78
238
  "includeSourceComments": {
79
239
  "default": false,
80
240
  "type": "boolean"
@@ -153,22 +313,7 @@
153
313
  "type": "object",
154
314
  "properties": {
155
315
  "_if": {
156
- "type": "object",
157
- "propertyNames": {
158
- "type": "string"
159
- },
160
- "additionalProperties": {
161
- "type": "object",
162
- "properties": {
163
- "eq": {
164
- "type": "string"
165
- }
166
- },
167
- "required": [
168
- "eq"
169
- ],
170
- "additionalProperties": false
171
- }
316
+ "description": "Removed. Write the condition as a config expression on the output: { \"$if\": { \"expr\": \"...\", \"then\": { ...the output... } } }."
172
317
  },
173
318
  "_vars": {
174
319
  "type": "object",
@@ -190,6 +335,15 @@
190
335
  "items": {
191
336
  "type": "string"
192
337
  }
338
+ },
339
+ "harness": {
340
+ "description": "The harness this output belongs to (claude-code, codex). Templates read it as harness.id.",
341
+ "type": "string",
342
+ "minLength": 1
343
+ },
344
+ "backupExisting": {
345
+ "description": "When true, a file sous did not write at the destination is backed up, a warning is given, and it is overwritten, whatever compilation.overwriteUntracked says.",
346
+ "type": "boolean"
193
347
  }
194
348
  },
195
349
  "additionalProperties": false
@@ -205,6 +359,29 @@
205
359
  },
206
360
  "additionalProperties": false
207
361
  },
362
+ "editor": {
363
+ "description": "Edits to files Sous does not own (editor.edits), applied, recorded and undone by the editor.",
364
+ "type": "object",
365
+ "properties": {
366
+ "edits": {
367
+ "default": [],
368
+ "description": "The master list of edits to files Sous does not own: each entry names a file and one or more operations, an assertion or a silence. Sous applies them after the compiler, records them, and undoes the ones no longer declared.",
369
+ "type": "array",
370
+ "items": {
371
+ "type": "object",
372
+ "propertyNames": {
373
+ "type": "string"
374
+ },
375
+ "additionalProperties": {}
376
+ }
377
+ },
378
+ "historyFile": {
379
+ "description": "Where Sous records the edits it applied, so it can undo them. Default: <sousDir>/sous.edits.json (git-ignored).",
380
+ "type": "string"
381
+ }
382
+ },
383
+ "additionalProperties": false
384
+ },
208
385
  "intents": {
209
386
  "description": "Which plugin's intent wins when two add one name: intents.replace.\"<intent>\": \"<plugin>\".",
210
387
  "type": "object",
@@ -271,7 +448,7 @@
271
448
  "type": "string"
272
449
  },
273
450
  "plugins": {
274
- "description": "Which plugins load, which never load, and each plugin's own options (S1).",
451
+ "description": "Which plugins load, which never load, and each plugin's own options.",
275
452
  "type": "object",
276
453
  "properties": {
277
454
  "discover": {
@@ -335,7 +512,10 @@
335
512
  "type": "string"
336
513
  }
337
514
  },
338
- "additionalProperties": true
515
+ "required": [
516
+ "url"
517
+ ],
518
+ "additionalProperties": false
339
519
  }
340
520
  },
341
521
  "runtimeContext": {
@@ -412,7 +592,7 @@
412
592
  "properties": {
413
593
  "enabled": {
414
594
  "type": "boolean",
415
- "description": "False switches it off on this machine, keeping its pins."
595
+ "description": "False switches it off, keeping its pins, wherever the file that sets it applies: for everyone in a committed file, for one machine in a conf.d file kept out of git."
416
596
  },
417
597
  "range": {
418
598
  "type": "string",
@@ -431,7 +611,7 @@
431
611
  "type": "string"
432
612
  }
433
613
  },
434
- "additionalProperties": true
614
+ "additionalProperties": false
435
615
  }
436
616
  },
437
617
  "tools": {
@@ -515,6 +695,74 @@
515
695
  "recipes": {
516
696
  "type": "object",
517
697
  "properties": {
698
+ "contents": {
699
+ "description": "What each active recipe's manifest publishes, one entry per contents group, added by sous-plugin-recipes (read-only in practice).",
700
+ "type": "array",
701
+ "default": [],
702
+ "items": {
703
+ "type": "object",
704
+ "required": [
705
+ "recipe",
706
+ "dir",
707
+ "kind",
708
+ "include"
709
+ ],
710
+ "properties": {
711
+ "recipe": {
712
+ "type": "string"
713
+ },
714
+ "dir": {
715
+ "type": "string"
716
+ },
717
+ "kind": {
718
+ "type": "string"
719
+ },
720
+ "include": {
721
+ "type": "array"
722
+ },
723
+ "exclude": {
724
+ "type": "array",
725
+ "items": {
726
+ "type": "string"
727
+ }
728
+ }
729
+ }
730
+ }
731
+ },
732
+ "handlers": {
733
+ "description": "The handlers the active recipes' manifests list, one entry each.",
734
+ "type": "array",
735
+ "items": {
736
+ "type": "object",
737
+ "required": [
738
+ "recipe",
739
+ "purpose",
740
+ "file",
741
+ "handler"
742
+ ],
743
+ "properties": {
744
+ "recipe": {
745
+ "type": "string"
746
+ },
747
+ "purpose": {
748
+ "enum": [
749
+ "check",
750
+ "configure",
751
+ "beforeBuild",
752
+ "afterBuild",
753
+ "uninstall",
754
+ "migrate"
755
+ ]
756
+ },
757
+ "file": {
758
+ "type": "string"
759
+ },
760
+ "handler": {
761
+ "type": "string"
762
+ }
763
+ }
764
+ }
765
+ },
518
766
  "memories": {
519
767
  "description": "Which recipe memories memory targets and the #memories view take, and in what order.",
520
768
  "type": "object",