@sous-io/sous 0.1.1 → 0.2.1

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.
Files changed (205) hide show
  1. package/README.md +115 -35
  2. package/bin/run.js +10 -1
  3. package/docs/markdown/README.md +27 -0
  4. package/docs/markdown/_sidebar.md +18 -0
  5. package/docs/markdown/commands.md +308 -0
  6. package/docs/markdown/config-discovery.md +74 -0
  7. package/docs/markdown/config-inspection.md +69 -0
  8. package/docs/markdown/config-layers.md +92 -0
  9. package/docs/markdown/config-variables.md +79 -0
  10. package/docs/markdown/configuration.md +71 -0
  11. package/docs/markdown/design-principles.md +59 -0
  12. package/docs/markdown/repositories-authoring.md +409 -0
  13. package/docs/markdown/repositories-consuming.md +580 -0
  14. package/docs/markdown/repositories-file-formats.md +1084 -0
  15. package/docs/markdown/repositories-variables.md +387 -0
  16. package/docs/markdown/repositories.md +303 -0
  17. package/docs/markdown/skill-categories.md +58 -0
  18. package/package.json +72 -8
  19. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/SKILL.tpl.md +20 -20
  20. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/examples/about-something.md +2 -2
  21. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/examples/do-something.md +1 -1
  22. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/references/advanced-patterns.md +6 -6
  23. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/references/commands.md +5 -5
  24. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/references/frontmatter.md +3 -3
  25. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-liquid-templates/SKILL.tpl.md +40 -25
  26. package/recipes/core/sous-skills/skills/about-sous/SKILL.tpl.md +70 -0
  27. package/recipes/core/sous-skills/skills/about-sous-configuration/SKILL.tpl.md +75 -0
  28. package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/create-skill/SKILL.tpl.md +8 -9
  29. package/recipes/core/sous-skills/sous.recipe.yaml +45 -0
  30. package/sous.config.schema.json +337 -0
  31. package/src/base-command.ts +220 -67
  32. package/src/commands/build.ts +150 -73
  33. package/src/commands/clear.ts +23 -15
  34. package/src/commands/compile.ts +74 -16
  35. package/src/commands/config/get.ts +110 -0
  36. package/src/commands/config/show.ts +32 -0
  37. package/src/commands/config/validate.ts +53 -0
  38. package/src/commands/help.ts +46 -0
  39. package/src/commands/launch.ts +36 -14
  40. package/src/commands/lock/rebuild.ts +241 -0
  41. package/src/commands/lock/show.ts +115 -0
  42. package/src/commands/namespace/list.ts +117 -0
  43. package/src/commands/namespace/show.ts +110 -0
  44. package/src/commands/prune.ts +3 -11
  45. package/src/commands/recipe/list.ts +95 -0
  46. package/src/commands/recipe/show.ts +301 -0
  47. package/src/commands/repo/add.ts +145 -0
  48. package/src/commands/repo/gc.ts +172 -0
  49. package/src/commands/repo/init.ts +136 -0
  50. package/src/commands/repo/link.ts +500 -0
  51. package/src/commands/repo/list.ts +179 -0
  52. package/src/commands/repo/release.ts +625 -0
  53. package/src/commands/repo/remove.ts +193 -0
  54. package/src/commands/repo/search.ts +189 -0
  55. package/src/commands/repo/submit.ts +133 -0
  56. package/src/commands/repo/unlink.ts +147 -0
  57. package/src/commands/subscription/add.ts +285 -0
  58. package/src/commands/subscription/list.ts +129 -0
  59. package/src/commands/subscription/remove.ts +181 -0
  60. package/src/commands/vars/ask.ts +374 -0
  61. package/src/commands/vars/index.ts +79 -0
  62. package/src/commands/vars/list.ts +67 -0
  63. package/src/commands/vars/show.ts +77 -0
  64. package/src/config-command.ts +30 -0
  65. package/src/lib/build-service.ts +206 -54
  66. package/src/lib/config-discovery.ts +220 -27
  67. package/src/lib/config-inspect.ts +145 -0
  68. package/src/lib/config-kernel.mjs +377 -0
  69. package/src/lib/config-schema.ts +361 -0
  70. package/src/lib/env-file.ts +328 -0
  71. package/src/lib/env-local.ts +18 -1
  72. package/src/lib/errors.ts +32 -0
  73. package/src/lib/include-resolver.ts +108 -15
  74. package/src/lib/interactive.ts +165 -0
  75. package/src/lib/markdown-compiler.ts +118 -37
  76. package/src/lib/package-info.ts +25 -0
  77. package/src/lib/pid-service.ts +32 -21
  78. package/src/lib/refs/find.ts +589 -0
  79. package/src/lib/refs/index.ts +12 -0
  80. package/src/lib/refs/pick.ts +147 -0
  81. package/src/lib/refs/scopes.ts +61 -0
  82. package/src/lib/repos/catalog-display.ts +116 -0
  83. package/src/lib/repos/catalog-inputs.ts +160 -0
  84. package/src/lib/repos/catalog.ts +722 -0
  85. package/src/lib/repos/core-recipe.ts +105 -0
  86. package/src/lib/repos/defaults.ts +175 -0
  87. package/src/lib/repos/formats/common.ts +389 -0
  88. package/src/lib/repos/formats/index-file.ts +215 -0
  89. package/src/lib/repos/formats/links-map.ts +96 -0
  90. package/src/lib/repos/formats/lockfile.ts +167 -0
  91. package/src/lib/repos/formats/patterns.ts +57 -0
  92. package/src/lib/repos/formats/recipe-manifest.ts +395 -0
  93. package/src/lib/repos/formats/repo-manifest.ts +88 -0
  94. package/src/lib/repos/formats/store-entry.ts +84 -0
  95. package/src/lib/repos/freshness.ts +208 -0
  96. package/src/lib/repos/git-clone.ts +312 -0
  97. package/src/lib/repos/identity.ts +89 -0
  98. package/src/lib/repos/index.ts +58 -0
  99. package/src/lib/repos/links.ts +353 -0
  100. package/src/lib/repos/load-manifest.ts +236 -0
  101. package/src/lib/repos/lock-service.ts +453 -0
  102. package/src/lib/repos/locked-namespace-resolver.ts +90 -0
  103. package/src/lib/repos/locked-recipes.ts +254 -0
  104. package/src/lib/repos/managed-layer.ts +422 -0
  105. package/src/lib/repos/namespace-resolver.ts +370 -0
  106. package/src/lib/repos/providers/base.ts +206 -0
  107. package/src/lib/repos/providers/git.ts +233 -0
  108. package/src/lib/repos/providers/github.ts +294 -0
  109. package/src/lib/repos/providers/gitlab.ts +263 -0
  110. package/src/lib/repos/providers/http.ts +102 -0
  111. package/src/lib/repos/providers/index-cache.ts +382 -0
  112. package/src/lib/repos/providers/index.ts +106 -0
  113. package/src/lib/repos/providers/local.ts +391 -0
  114. package/src/lib/repos/providers/provider.ts +401 -0
  115. package/src/lib/repos/recipe-config-layers.ts +287 -0
  116. package/src/lib/repos/recipe-targets.ts +223 -0
  117. package/src/lib/repos/ref-search.ts +46 -0
  118. package/src/lib/repos/ref.ts +513 -0
  119. package/src/lib/repos/reference-report.ts +122 -0
  120. package/src/lib/repos/release/bump.ts +161 -0
  121. package/src/lib/repos/release/git-state.ts +305 -0
  122. package/src/lib/repos/release/index-builder.ts +635 -0
  123. package/src/lib/repos/release/index.ts +16 -0
  124. package/src/lib/repos/release/plan.ts +512 -0
  125. package/src/lib/repos/release/submit-service.ts +496 -0
  126. package/src/lib/repos/release/tags.ts +243 -0
  127. package/src/lib/repos/release/validate.ts +463 -0
  128. package/src/lib/repos/resolver.ts +789 -0
  129. package/src/lib/repos/scaffold/index.ts +238 -0
  130. package/src/lib/repos/scaffold/templates.ts +415 -0
  131. package/src/lib/repos/seed.ts +414 -0
  132. package/src/lib/repos/store/contract.ts +64 -0
  133. package/src/lib/repos/store/hash.ts +114 -0
  134. package/src/lib/repos/store/recipe-store.ts +599 -0
  135. package/src/lib/repos/store/settings.ts +58 -0
  136. package/src/lib/repos/subscription-service.ts +2678 -0
  137. package/src/lib/repos/trust.ts +447 -0
  138. package/src/lib/settings.ts +546 -189
  139. package/src/lib/sous-home.ts +104 -0
  140. package/src/lib/state.ts +52 -20
  141. package/src/lib/vars/ask.ts +1152 -0
  142. package/src/lib/vars/definition-source.ts +252 -0
  143. package/src/lib/vars/display.ts +233 -0
  144. package/src/lib/vars/index.ts +18 -0
  145. package/src/lib/vars/ladder.ts +282 -0
  146. package/src/lib/vars/mappings.ts +265 -0
  147. package/src/lib/vars/names.ts +94 -0
  148. package/src/lib/vars/preanswers.ts +395 -0
  149. package/src/lib/vars/question-plan.ts +218 -0
  150. package/src/lib/vars/report.ts +228 -0
  151. package/src/lib/vars/safe-regex.ts +235 -0
  152. package/src/lib/vars/validate.ts +312 -0
  153. package/src/lib/watch-loop.ts +148 -0
  154. package/src/templating/init-liquid-engine.ts +58 -16
  155. package/src/utils/choice-prompt.ts +143 -0
  156. package/src/utils/command-errors.ts +186 -0
  157. package/src/utils/command-help.ts +45 -0
  158. package/src/utils/confirm-prompt.ts +110 -0
  159. package/src/utils/flags.ts +153 -0
  160. package/src/utils/formatting.ts +540 -55
  161. package/src/utils/prompts.ts +35 -1
  162. package/src/utils/sous-directory.ts +245 -0
  163. package/src/utils/table.ts +603 -0
  164. package/src/utils/value-prompt.ts +119 -0
  165. package/shared-prompts/_partials/resume-task.md +0 -51
  166. package/shared-prompts/_partials/sub-agent-delegation.md +0 -32
  167. package/shared-prompts/_partials/update-task-file.md +0 -52
  168. package/shared-prompts/memories/automated-browser-tasks/INDEX.tpl.md +0 -52
  169. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/SKILL.tpl.md +0 -102
  170. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/examples/auth-failure-handling.mjs +0 -81
  171. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/examples/chained-workflow.mjs +0 -126
  172. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/examples/simple-fetch.mjs +0 -92
  173. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/references/architecture.md +0 -61
  174. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/references/auth-and-sessions.md +0 -65
  175. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/references/ctx-api.md +0 -96
  176. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/references/installation.md +0 -104
  177. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/references/script-conventions.md +0 -243
  178. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/chrome-state.mjs +0 -148
  179. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/debug.mjs +0 -383
  180. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/debug.spec.mjs +0 -267
  181. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/eslint.config.mjs +0 -56
  182. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/harness.mjs +0 -169
  183. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/keyring.mjs +0 -59
  184. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/logger.mjs +0 -25
  185. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/params.mjs +0 -140
  186. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/run.mjs +0 -140
  187. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/settings.tpl.mjs +0 -1
  188. package/shared-prompts/skills/automated-browser-tasks/about-automated-browser-tasks/scripts/utils.mjs +0 -185
  189. package/shared-prompts/skills/automated-browser-tasks/create-automated-browser-task/SKILL.tpl.md +0 -52
  190. package/shared-prompts/skills/automated-browser-tasks/running-automated-browser-tasks/SKILL.tpl.md +0 -59
  191. package/shared-prompts/skills/automated-browser-tasks/update-automated-browser-task/SKILL.tpl.md +0 -47
  192. package/shared-prompts/skills/control-flow/approve/SKILL.tpl.md +0 -26
  193. package/shared-prompts/skills/control-flow/opine/SKILL.tpl.md +0 -58
  194. package/shared-prompts/skills/control-flow/repeat/SKILL.tpl.md +0 -27
  195. package/shared-prompts/skills/control-flow/research/SKILL.tpl.md +0 -34
  196. package/shared-prompts/skills/sous-skills/about-sous/SKILL.tpl.md +0 -51
  197. package/shared-prompts/skills/task-files/about-task-files/SKILL.tpl.md +0 -122
  198. package/shared-prompts/skills/task-files/continue-task-in-new-branch/SKILL.tpl.md +0 -80
  199. package/shared-prompts/skills/task-files/go/SKILL.tpl.md +0 -14
  200. package/shared-prompts/skills/task-files/resume-task/SKILL.tpl.md +0 -13
  201. package/shared-prompts/skills/task-files/start-task/SKILL.tpl.md +0 -93
  202. package/shared-prompts/skills/task-files/update/SKILL.tpl.md +0 -14
  203. package/shared-prompts/skills/task-files/update-task-file/SKILL.tpl.md +0 -13
  204. /package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-agent-skills/references/substitutions.md +0 -0
  205. /package/{shared-prompts/skills/sous-skills → recipes/core/sous-skills/skills}/about-liquid-templates/references/liquid-filters.md +0 -0
@@ -3,7 +3,7 @@
3
3
  ## Dynamic Context Injection
4
4
 
5
5
  The `` !`command` `` syntax runs a shell command before skill content is sent to Claude.
6
- The output replaces the placeholder — Claude receives the rendered result, not the command.
6
+ The output replaces the placeholder; Claude receives the rendered result, not the command.
7
7
 
8
8
  ```yaml
9
9
  ---
@@ -44,16 +44,16 @@ Research $ARGUMENTS thoroughly:
44
44
  ```
45
45
 
46
46
  The `agent` field selects the subagent configuration:
47
- - `Explore` — read-only tools optimized for codebase exploration
48
- - `Plan` — planning-oriented execution
49
- - `general-purpose` — default; full tool access
47
+ - `Explore`: read-only tools optimized for codebase exploration
48
+ - `Plan`: planning-oriented execution
49
+ - `general-purpose`: default, full tool access
50
50
  - Any custom agent defined in `.claude/agents/`
51
51
 
52
52
  Results are summarized and returned to the main conversation.
53
53
 
54
54
  > Only use `context: fork` for skills with explicit task instructions. Skills containing
55
55
  > only reference guidelines (e.g. "use these conventions") will return without meaningful
56
- > output — the subagent has no actionable task.
56
+ > output; the subagent has no actionable task.
57
57
 
58
58
  ## Restricting Tool Access (`allowed-tools`)
59
59
 
@@ -76,7 +76,7 @@ and reference them from the skill body so Claude knows when to load them.
76
76
  ```
77
77
  my-skill/
78
78
  ├── SKILL.md # Overview, navigation, fundamental instructions
79
- ├── references/ # Deep-dive docs — loaded when needed, not always
79
+ ├── references/ # Deep-dive docs: loaded when needed, not always
80
80
  │ └── api-spec.md
81
81
  ├── examples/ # Example outputs showing expected format
82
82
  └── scripts/ # Executable scripts; referenced via $CLAUDE_SKILL_DIR
@@ -6,13 +6,13 @@ user-initiated workflow. The user explicitly triggers it with `/skill-name`.
6
6
  ## Key Properties
7
7
 
8
8
  - Set `disable-model-invocation: true`. This removes the skill from Claude's context
9
- entirely — it loads only when the user invokes it. See `frontmatter.md` for the
9
+ entirely; it loads only when the user invokes it. See `frontmatter.md` for the
10
10
  invocation matrix.
11
11
  - Because the model never sees the description, write it for humans, not for Claude.
12
- It appears in the `/` autocomplete menu. Plain, informative language is appropriate —
12
+ It appears in the `/` autocomplete menu. Plain, informative language is appropriate;
13
13
  strong trigger language ("YOU MUST") is unnecessary and out of place.
14
14
  - Commands do not require an `# Abstract` section. Include one only if useful context
15
- is genuinely needed. Headings are optional in general — use them only if the content
15
+ is genuinely needed. Headings are optional in general; use them only if the content
16
16
  is complex enough to warrant structure.
17
17
 
18
18
  ## Arguments
@@ -21,7 +21,7 @@ Commands often accept arguments (e.g. `/deploy staging`). When they do:
21
21
 
22
22
  1. Use `$ARGUMENTS` (or `$0`, `$1`, etc.) in the skill body where the arguments should
23
23
  be substituted. See `substitutions.md` for full syntax.
24
- 2. Add an `argument-hint` field to frontmatter — it appears in autocomplete next to the
24
+ 2. Add an `argument-hint` field to frontmatter; it appears in autocomplete next to the
25
25
  command name.
26
26
 
27
27
  ```yaml
@@ -42,5 +42,5 @@ appends them automatically as `ARGUMENTS: <value>`.
42
42
 
43
43
  Not every command needs `disable-model-invocation: true`. If it makes sense for Claude
44
44
  to invoke the command autonomously on the user's behalf (e.g. a lightweight helper with
45
- no side effects), omit the flag. Use judgement — the defining question is whether the
45
+ no side effects), omit the flag. Use judgement; the defining question is whether the
46
46
  action should require explicit user intent.
@@ -8,11 +8,11 @@ All fields are optional, though `description` is strongly recommended.
8
8
  | `name` | Slash-command name. Lowercase letters, numbers, hyphens (max 64 chars). Defaults to directory name. |
9
9
  | `description` | When to invoke this skill. Used by Claude for auto-invocation. Falls back to first paragraph of content. |
10
10
  | `argument-hint` | Hint shown in autocomplete. Example: `[issue-number]` or `[filename] [format]`. |
11
- | `disable-model-invocation` | `true` — user-only invocation. Description removed from Claude's context entirely. Use for side-effect workflows. Default: `false`. |
12
- | `user-invocable` | `false` — hides from `/` menu; only Claude can invoke. Use for background knowledge. Default: `true`. |
11
+ | `disable-model-invocation` | `true`: user-only invocation. Description removed from Claude's context entirely. Use for side-effect workflows. Default: `false`. |
12
+ | `user-invocable` | `false`: hides from `/` menu; only Claude can invoke. Use for background knowledge. Default: `true`. |
13
13
  | `allowed-tools` | Tools Claude may use without per-use approval when this skill is active. Example: `Read, Grep, Glob`. |
14
14
  | `model` | Model to use when this skill is active. |
15
- | `context` | `fork` — run the skill in an isolated subagent. Skill content becomes the subagent prompt. |
15
+ | `context` | `fork`: run the skill in an isolated subagent. Skill content becomes the subagent prompt. |
16
16
  | `agent` | Subagent type when `context: fork` is set. Options: `Explore`, `Plan`, `general-purpose`, or any custom agent in `.claude/agents/`. Defaults to `general-purpose`. |
17
17
  | `hooks` | Hooks scoped to this skill's lifecycle. |
18
18
 
@@ -22,15 +22,15 @@ at compile time. The `.tpl.` segment is stripped from the output filename.
22
22
  | `config.tpl.sh` | Yes | `config.sh` |
23
23
  | `README.md` | No | `README.md` |
24
24
 
25
- **`SKILL.md` for any skill compiled by sous must always be `SKILL.tpl.md`** — the
25
+ **`SKILL.md` for any skill compiled by sous must always be `SKILL.tpl.md`**; the
26
26
  required `## Source for this Skill` footer cannot be rendered without LiquidJS
27
27
  processing. See `about-agent-skills` for the full rule.
28
28
 
29
29
  For all other files, use `.tpl.` only when the file genuinely needs variable
30
- substitution, partials, or conditionals. Static files are copied verbatim — faster
31
- and safer.
30
+ substitution, partials, or conditionals. Static files are copied verbatim (faster
31
+ and safer).
32
32
 
33
- ## Two Syntaxes — Do Not Mix
33
+ ## Two Syntaxes: Do Not Mix
34
34
 
35
35
  Sous uses two different variable syntaxes at two different stages. Using the wrong one in
36
36
  the wrong place silently produces the literal text instead of a value.
@@ -92,9 +92,9 @@ Include another file at render time (path **relative to the template file's dire
92
92
  {% endraw %}
93
93
 
94
94
  `render` resolves paths relative to the template file. For files outside that tree, use
95
- a path **alias** (`@~sous-shared/...`, `@~project/...`, or a user-defined alias) or a
96
- `@`-prefixed `${var}` path — the same alias resolution as `@include` (see below) works in
97
- `render` too.
95
+ a recipe reference (`@~<namespace>/<recipe>/...`), a path **alias** (`@~project/...`, or a
96
+ user-defined alias) or a `@`-prefixed `${var}` path; the same resolution as `@include`
97
+ (see below) works in `render` too.
98
98
 
99
99
  To prevent template sequences from being processed in a code example, wrap the block in
100
100
  `raw` / `endraw` tag blocks. These blocks cannot be nested: the first `endraw`
@@ -119,7 +119,7 @@ filter name shows up only as missing or unfiltered output.
119
119
  ### Gotcha: `@include` fires inside fenced code blocks
120
120
 
121
121
  The `@include` processor runs on the raw file content *before* LiquidJS and has no
122
- markdown awareness whatsoever — it matches any line that is nothing but an `@`-prefixed
122
+ markdown awareness whatsoever; it matches any line that is nothing but an `@`-prefixed
123
123
  `.md` path. A fenced code block does not protect it: an `@path.md` line inside triple
124
124
  backticks is still executed and replaced with the file's content. There is no escape
125
125
  syntax. To show an `@`-path as an example, put something else on the line (indent it,
@@ -130,20 +130,35 @@ prefix it with a word, or wrap it in backticks inline).
130
130
  A `@`-path may be any of:
131
131
 
132
132
  - **Relative** to the including file: `@sections/intro.md` (traverse up with `../`).
133
- - **Variable-substituted**: `@${sousRootPath}/shared-prompts/x.md` — `${var}` is
133
+ - **Variable-substituted**: `@${projectRoot}/prompts/x.md`; `${var}` is
134
134
  substituted before resolving; if the result is absolute it is used directly.
135
135
  - **Aliased**: `@<alias>/rest.md`, where the first segment names a registered alias.
136
136
 
137
- ### Path aliases
137
+ ### Recipe references and path aliases
138
138
 
139
- The first path segment, up to the first `/` or `:` (both separators work — `@a/b.md`
140
- ≡ `@a:b.md`), is matched against the alias registry. Built-in aliases are reserved and
141
- always begin with `~`:
139
+ The first path segment, up to the first `/` or `:` (both separators work, so `@a/b.md`
140
+ is the same as `@a:b.md`), is matched first against the alias registry and then, when it begins with
141
+ `~`, against the recipe namespaces this project or recipe can address.
142
+
143
+ The normal way to reach a file that another recipe publishes is a **recipe reference**,
144
+ written `@~<namespace>/<recipe>/<path inside that recipe>`:
145
+
146
+ - `@~workflow/task-files/_partials/resume-task.md` → the file `_partials/resume-task.md`
147
+ inside the recipe `workflow/task-files`, at the version this project has pinned.
148
+
149
+ Scoping is deliberate. A file inside a recipe may address that recipe itself plus the
150
+ recipes it declares under `depends` or `subscribes`; a file in the project's own templates
151
+ may address the project's subscriptions. Anything else is an error naming what was missing,
152
+ so a reference can never quietly pick up a recipe nobody asked for.
153
+
154
+ Built-in **aliases** are reserved, always begin with `~`, and are consulted before recipe
155
+ namespaces. There is exactly one:
142
156
 
143
- - `@~sous-shared/...` → the Sous CLI's `shared-prompts` directory (skills, memories,
144
- `_partials`, etc.). Example: `@~sous-shared/_partials/resume-task.md`.
145
157
  - `@~project/...` → the consuming project's root.
146
158
 
159
+ Everything else sous once shipped inside its own package is published as a recipe now, so
160
+ a recipe reference is what reaches it.
161
+
147
162
  Projects register their own aliases in settings via an `_aliases` block (root and/or
148
163
  project level); names may **not** start with `~` (reserved). An alias value is a string
149
164
  or an array of strings (each may use `${var}`):
@@ -159,23 +174,23 @@ wins**; if none exist, the build errors listing every path tried:
159
174
 
160
175
  1. Each base of the matched alias, in order (project `_aliases` are tried before root,
161
176
  before built-in bases of the same name).
162
- 2. The path resolved **relative to the including file** — using the *full* path
177
+ 2. The path resolved **relative to the including file**, using the *full* path
163
178
  including the alias segment. So an alias miss can fall through to a real relative
164
179
  directory of the same name, letting an alias **augment** a local directory.
165
180
 
166
181
  ## Custom Tags
167
182
 
168
- **`showVars`** — dumps all variables currently in scope as a fenced JSON block.
183
+ **`showVars`**: dumps all variables currently in scope as a fenced JSON block.
169
184
  Useful during development to see exactly what variables are available at a given point
170
185
  in a template. Remove before finalizing.
171
186
 
172
- **`getFiles`** — globs files under a root directory and assigns the resulting array to a
187
+ **`getFiles`**: globs files under a root directory and assigns the resulting array to a
173
188
  template variable. It renders nothing; present the results yourself with a `for` loop.
174
189
  Each entry has `path`, `dir`, `relPath`, and `name`. `include`/`exclude` take
175
190
  comma-separated glob patterns matched relative to `root`, and attribute values may be
176
191
  quoted strings or scope variables. The optional `import="<exportName>"` dynamically
177
192
  imports each file and attaches that export to the entry (files that fail to import, or
178
- that lack the export, are dropped) — this is how a manifest of scripts reads its own
193
+ that lack the export, are dropped); this is how a manifest of scripts reads its own
179
194
  metadata:
180
195
 
181
196
  {% raw %}
@@ -188,7 +203,7 @@ metadata:
188
203
  ```
189
204
  {% endraw %}
190
205
 
191
- **`listFiles`** — the convenience counterpart to `getFiles`: it globs and renders a
206
+ **`listFiles`**: the convenience counterpart to `getFiles`: it globs and renders a
192
207
  markdown bullet list of file names inline, with no loop needed. Add `relative="true"` to
193
208
  render paths relative to the root instead of bare file names:
194
209
 
@@ -198,7 +213,7 @@ render paths relative to the root instead of bare file names:
198
213
  ```
199
214
  {% endraw %}
200
215
 
201
- **`exportScalarVarsJs`** — emits every in-scope scalar variable (string, finite number,
216
+ **`exportScalarVarsJs`**: emits every in-scope scalar variable (string, finite number,
202
217
  boolean) as an ES module default export, keys sorted. Objects, arrays, `null` and
203
218
  non-finite numbers are skipped. Use it to compile a settings module that runtime code
204
219
  imports, rather than re-deriving project configuration:
@@ -211,7 +226,7 @@ imports, rather than re-deriving project configuration:
211
226
 
212
227
  ## Custom Filters
213
228
 
214
- **`bulletList`** — converts an array variable to a markdown bullet list:
229
+ **`bulletList`**: converts an array variable to a markdown bullet list:
215
230
 
216
231
  {% raw %}
217
232
  ```
@@ -231,7 +246,7 @@ Given a non-array value, `bulletList` returns it as a plain string with no bulle
231
246
  ## Authoring Guidelines
232
247
 
233
248
  Templates (`.tpl.*` files) must be **maximally reusable**. A well-written template
234
- can be copied between projects or shared across teams without edits — only the
249
+ can be copied between projects or shared across teams without edits; only the
235
250
  project's variables change.
236
251
 
237
252
  **Rules:**
@@ -244,7 +259,7 @@ project's variables change.
244
259
  a variable is set, wrap it in {% raw %}`{% if varName %} ... {% endif %}`{% endraw %} so the
245
260
  block disappears cleanly for projects that don't define it.
246
261
  3. **Prefer derived variables over raw values.** Example: `ticketPrefix` is derived
247
- from `jiraProjectKey` — templates use `ticketPrefix` so they stay correct if the
262
+ from `jiraProjectKey`; templates use `ticketPrefix` so they stay correct if the
248
263
  key changes.
249
264
  4. **Test portability mentally.** Before finalizing a template, ask: "If I compiled
250
265
  this for a different project with different settings, would the output still make
@@ -252,7 +267,7 @@ project's variables change.
252
267
 
253
268
  ## Reference Files
254
269
 
255
- - [liquid-filters.md](references/liquid-filters.md) — complete standard LiquidJS filter catalogue (string, array, number, date, default)
270
+ - [liquid-filters.md](references/liquid-filters.md): complete standard LiquidJS filter catalogue (string, array, number, date, default)
256
271
 
257
272
  ## Available Variables
258
273
 
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: about-sous
3
+ description: >
4
+ YOU MUST load this skill when you cannot edit a file in this project, are asked why
5
+ a file keeps reverting, need to know where the source of truth for any managed file
6
+ lives, or need to understand what this project's configuration system is.
7
+ user-invocable: false
8
+ ---
9
+
10
+ # About Sous
11
+
12
+ Sous (`sous`) is a CLI tool that compiles markdown templates and manages output files
13
+ for AI coding agents. It reads a central configuration, resolves variables, and
14
+ copies or renders files to their destinations in this project.
15
+
16
+ ## Files You Must Never Edit
17
+
18
+ Sous manages certain files in this project by compiling them from a central source.
19
+ **You must never edit these directly.** Your changes will be silently overwritten the
20
+ next time Sous runs:
21
+
22
+ - `.claude/`: Claude Code configuration, skills, and instructions
23
+ - `.codex/`: Codex configuration and skills
24
+ - `AGENTS.md` and `CLAUDE.md`: agent instruction files
25
+ - Any file you did not create yourself in a designated source directory
26
+
27
+ If you need to change something in one of these files, the change must be made at the
28
+ source, in the central configuration this project uses with Sous.
29
+
30
+ ## Where Your Skills Live
31
+
32
+ Skills for this project live at `{{ skillsRoot }}`. That is the source directory Sous
33
+ compiles from. Create and edit skills there, never in `.claude/skills/` or
34
+ `.codex/skills/` directly.
35
+
36
+ YOU MUST load `create-skill` when creating a new skill for this project.
37
+
38
+ YOU MUST load `about-sous-configuration` when creating or editing the project's sous
39
+ config (`sous.config.*`, `conf.d/` layers), defining or debugging config variables, or
40
+ diagnosing a ConfigError.
41
+
42
+ ## Sous's Shared Recipes
43
+
44
+ The `about-sous`, `about-sous-configuration`, `about-agent-skills` and
45
+ `about-liquid-templates` skills you are reading come from the `core/sous-skills` recipe,
46
+ published by the official sous recipe repository (https://github.com/sous-io/sous-recipes).
47
+ A copy of that recipe also ships inside the installed sous package, where it seeds the
48
+ machine-wide store so a fresh, offline install still has these skills.
49
+
50
+ Edit them only in the recipe repository, where they are the sources. Never edit a compiled
51
+ copy of them inside a consuming project; that copy is build output and is overwritten on
52
+ the next sous run.
53
+
54
+ ## Sous's Own Documentation
55
+
56
+ Sous's full documentation ships inside the installed package as plain markdown
57
+ at `{{ sousRootPath }}/docs/markdown/`. Read `_sidebar.md` there first; it is
58
+ the index of what exists. When you need to understand a sous feature beyond
59
+ what the skills cover, read these files before guessing or searching the web:
60
+ they match the INSTALLED version of sous, unlike the online copy
61
+ (https://sous-io.github.io/sous/markdown/#/), which tracks the latest release.
62
+ The reference content is still being written; the index shows what exists so
63
+ far.
64
+
65
+ ## Source for this Skill
66
+
67
+ This skill was pulled from the `sous` project's "shared skills" library. It was compiled from a template and
68
+ the output file should not be edited directly.
69
+
70
+ - Source Path: {{ sousTemplatePath }}
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: about-sous-configuration
3
+ description: >
4
+ YOU MUST load this skill when creating or editing a sous config file (sous.config.* or a
5
+ conf.d layer), defining or debugging ${var} config variables, deciding where a setting
6
+ belongs, using SOUS_* env vars or --sous-* flags, or when sous fails to load with a
7
+ ConfigError.
8
+ user-invocable: false
9
+ license: Apache-2.0
10
+ compatibility:
11
+ - claude
12
+ - codex
13
+ metadata:
14
+ version: 2.0.0
15
+ tags: [sous, configuration]
16
+ ---
17
+
18
+ # About Sous Configuration
19
+
20
+ Sous reads one configuration per project from the project's `.sous/` directory: exactly ONE
21
+ primary config (`sous.config.js|mjs|json|yaml`), optionally extended by `conf.d/` drop-in
22
+ layers that deep-merge over it. One config describes one project; every setting lives at the
23
+ top level of a single flat object. There is no user-level config and no multi-project map.
24
+ Configs use `${var}` syntax, resolved by a fixpoint loop (declaration order never matters);
25
+ `sous*`-prefixed variable names are reserved auto-vars.
26
+
27
+ ## This Project's Configuration
28
+
29
+ Resolved at compile time for the project this skill was compiled into:
30
+
31
+ - Primary config: `{{ sousConfigPath }}`
32
+ - Discovered `.sous/` directory: `{{ sousDir }}`
33
+ - Drop-in layer directory: `{{ sousConfDir }}`
34
+
35
+ ## The Documentation Is the Reference
36
+
37
+ The full configuration reference ships inside the installed sous package as plain markdown.
38
+ Read these files for anything beyond this page; do not guess and do not search the web:
39
+
40
+ - `{{ sousRootPath }}/docs/markdown/configuration.md`: the config file, its shape, composition
41
+ - `{{ sousRootPath }}/docs/markdown/config-discovery.md`: how sous finds the config; flag/env
42
+ precedence; env-file layering; discovery errors
43
+ - `{{ sousRootPath }}/docs/markdown/config-layers.md`: merge semantics; the JS `configure()`
44
+ contract; the builder API; the managed 5xx layer band
45
+ - `{{ sousRootPath }}/docs/markdown/config-variables.md`: the scope chain; auto-vars; fixpoint
46
+ resolution; error anatomy; `stateFilePath`/`pidFilePath`
47
+ - `{{ sousRootPath }}/docs/markdown/config-inspection.md`: the validation pipeline; the JSON
48
+ Schema artifact; the `sous config` commands
49
+
50
+ These files match the INSTALLED sous version. The same content is published at
51
+ https://sous-io.github.io/sous/markdown/#/configuration, which tracks the latest release;
52
+ prefer the on-disk copies.
53
+
54
+ ## Rules
55
+
56
+ - After editing any config file, run `sous config validate`: it runs schema validation plus
57
+ full variable resolution, surfacing cycles and undefined `${refs}`. Use
58
+ `sous config get <path> --layers` to see which file set a value.
59
+ - Hand-written config belongs in the primary file or your own `conf.d/` layers. Never
60
+ hand-edit `conf.d/500-*` through `conf.d/599-*`; that band is reserved for layers the sous
61
+ CLI writes.
62
+ - Any config problem halts sous with a ConfigError naming the offending file; fix the named
63
+ file rather than working around it.
64
+ - Configs use `${var}`; template files use LiquidJS double-brace syntax. The two resolve at
65
+ different stages and must not be mixed. YOU MUST load `about-liquid-templates` when writing
66
+ or editing `.tpl.` files.
67
+ - YOU MUST load `about-sous` for which files in the project are compiled outputs that must
68
+ never be edited directly.
69
+
70
+ ## Source for this Skill
71
+
72
+ This skill was pulled from the `sous` project's "shared skills" library. It was compiled from a template and
73
+ the output file should not be edited directly.
74
+
75
+ - Source Path: {{ sousTemplatePath }}
@@ -9,7 +9,7 @@ description: >
9
9
  The agent performing this work MUST load `about-agent-skills` for skill structure,
10
10
  frontmatter, and architecture principles.
11
11
 
12
- Skills for this project live at `{{ skillsRoot }}`. Create new skills there — not in
12
+ Skills for this project live at `{{ skillsRoot }}`. Create new skills there, not in
13
13
  `.claude/skills/` or `.codex/skills/` directly (those are managed automatically and
14
14
  must not be edited).
15
15
 
@@ -30,7 +30,7 @@ what is already there before creating anything: a directory holding `SKILL.md` /
30
30
  subdirectories that each contain a skill means you are looking at bundles, so add the skill
31
31
  to the bundle it belongs to. When a new skill genuinely needs a new bundle, create the
32
32
  bundle directory and add a matching `entryGlob` target in the config of every project that
33
- should receive it — a bundle with no `entryGlob` is never compiled anywhere.
33
+ should receive it; a bundle with no `entryGlob` is never compiled anywhere.
34
34
 
35
35
  ### 2. Write `SKILL.tpl.md`
36
36
 
@@ -54,16 +54,16 @@ metadata:
54
54
 
55
55
  ### 3. Add supporting files (if needed)
56
56
 
57
- - `references/` — supplementary documentation loaded on demand
58
- - `scripts/` — executable scripts the skill uses
59
- - `examples/` — example outputs
57
+ - `references/`: supplementary documentation loaded on demand
58
+ - `scripts/`: executable scripts the skill uses
59
+ - `examples/`: example outputs
60
60
 
61
- Reference all supporting files from `SKILL.md` — the agent will not discover them
61
+ Reference all supporting files from `SKILL.md`; the agent will not discover them
62
62
  otherwise.
63
63
 
64
64
  ### 4. Name the main file `SKILL.tpl.md` and add the source footer
65
65
 
66
- Skills in `{{ skillsRoot }}` are compiled and distributed — the main skill file must
66
+ Skills in `{{ skillsRoot }}` are compiled and distributed; the main skill file must
67
67
  always be named `SKILL.tpl.md`, not `SKILL.md`. No exceptions, and specifically **not even
68
68
  when the skill body contains no variables at all**: the mandatory `## Source for this Skill`
69
69
  footer itself contains a template variable, so every skill needs a LiquidJS render pass by
@@ -93,8 +93,7 @@ Once the files exist in `{{ skillsRoot }}`, distribution is handled automaticall
93
93
 
94
94
  ### 6. Write the body for whoever executes it
95
95
 
96
- Per the sub-agent delegation pattern
97
- (`~sous-shared/_partials/sub-agent-delegation.md`), a skill's steps may run in a delegated
96
+ Per the sub-agent delegation pattern, a skill's steps may run in a delegated
98
97
  sub-agent with fresh context. Mark which steps are delegated and which are
99
98
  orchestrator-only (anything needing the user or this conversation's contents), and
100
99
  phrase skill-loading requirements as "The agent performing this work MUST load `x`".
@@ -0,0 +1,45 @@
1
+ # core/sous-skills
2
+ #
3
+ # SPECIAL: this recipe's source of truth stays inside the sous npm package, where
4
+ # it seeds the machine-wide store on first run so a fresh, offline setup works.
5
+ # The release pipeline pushes a copy here, versioned to match the sous
6
+ # application version. That copy is machine-written distribution output.
7
+ #
8
+ # Because it is the offline seed, this recipe declares NO dependencies. Nothing
9
+ # it ships may point at a recipe that has to be fetched.
10
+ formatVersion: 1
11
+
12
+ namespace: core
13
+ name: sous-skills
14
+ version: 0.2.1
15
+
16
+ description: >-
17
+ The skills that teach an agent what sous is and how it works: which files sous
18
+ owns and must never be hand-edited, how a sous configuration is written and
19
+ debugged, the .tpl. template convention and LiquidJS syntax, what an agent
20
+ skill is, and how to create one.
21
+
22
+ contents:
23
+ - kind: skills
24
+ include:
25
+ - skills/**/*
26
+
27
+ variables:
28
+ - name: skillsRoot
29
+ env: SKILLS_ROOT
30
+ type: path
31
+ prompt: Where should this project's own skills be kept?
32
+ description: >-
33
+ This recipe teaches agents to write skills of their own, and a skill's
34
+ source is not the compiled copy sous builds into the agent directories.
35
+ This setting says where those sources are kept: the create-skill skill
36
+ writes new skills there, and the about-sous and about-agent-skills skills
37
+ point agents at it when they go looking. The default keeps them in a
38
+ prompts directory at the project root, but any path works, either relative
39
+ to the project root or absolute.
40
+ example: prompts/skills
41
+ default: prompts/skills
42
+ required: true
43
+ scope: shared
44
+ validate:
45
+ minLength: 1