@crouton-kit/crouter 0.3.17 → 0.3.19

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 (283) hide show
  1. package/dist/build-root.js +6 -0
  2. package/dist/builtin-memory/crouter-development/marketplaces.md +164 -0
  3. package/dist/builtin-memory/crouter-development/personas/base-prompt.md +58 -0
  4. package/dist/builtin-memory/crouter-development/personas/orchestrator-prompt.md +60 -0
  5. package/dist/builtin-memory/crouter-development/personas.md +117 -0
  6. package/dist/builtin-memory/crouter-development/plugins.md +163 -0
  7. package/dist/builtin-memory/design.md +60 -0
  8. package/dist/builtin-memory/development.md +116 -0
  9. package/dist/builtin-memory/planning.md +66 -0
  10. package/dist/builtin-memory/spec.md +99 -0
  11. package/dist/builtin-personas/design/{base.md → PERSONA.md} +4 -0
  12. package/dist/builtin-personas/design/orchestrator.md +1 -1
  13. package/dist/builtin-personas/developer/{base.md → PERSONA.md} +4 -0
  14. package/dist/builtin-personas/developer/orchestrator.md +1 -1
  15. package/dist/builtin-personas/explore/{base.md → PERSONA.md} +4 -0
  16. package/dist/builtin-personas/general/{base.md → PERSONA.md} +4 -0
  17. package/dist/builtin-personas/lifecycle/resident.md +1 -1
  18. package/dist/builtin-personas/lifecycle/terminal.md +5 -2
  19. package/dist/builtin-personas/orchestration-kernel.md +15 -24
  20. package/dist/builtin-personas/plan/{base.md → PERSONA.md} +4 -0
  21. package/dist/builtin-personas/plan/orchestrator.md +1 -1
  22. package/dist/builtin-personas/plan/reviewers/architecture-fit/{base.md → PERSONA.md} +1 -1
  23. package/dist/builtin-personas/plan/reviewers/code-smells/{base.md → PERSONA.md} +1 -1
  24. package/dist/builtin-personas/plan/reviewers/pattern-consistency/{base.md → PERSONA.md} +1 -1
  25. package/dist/builtin-personas/plan/reviewers/requirements-coverage/{base.md → PERSONA.md} +1 -1
  26. package/dist/builtin-personas/plan/reviewers/security/{base.md → PERSONA.md} +1 -1
  27. package/dist/builtin-personas/review/{base.md → PERSONA.md} +4 -0
  28. package/dist/builtin-personas/runtime-base.md +6 -3
  29. package/dist/builtin-personas/spec/{base.md → PERSONA.md} +4 -0
  30. package/dist/builtin-personas/spec/orchestrator.md +1 -1
  31. package/dist/builtin-personas/waiting.md +8 -0
  32. package/dist/builtin-skills/skills/crouter-development/personas/SKILL.md +24 -14
  33. package/dist/builtin-skills/skills/crouter-development/personas/base-prompt/SKILL.md +4 -4
  34. package/dist/builtin-skills/skills/crouter-development/personas/orchestrator-prompt/SKILL.md +1 -1
  35. package/dist/builtin-skills/skills/crouter-development/plugins/SKILL.md +2 -2
  36. package/dist/builtin-views/_lib/states.mjs +161 -0
  37. package/dist/builtin-views/canvas/client.mjs +303 -0
  38. package/dist/builtin-views/canvas/view.mjs +576 -0
  39. package/dist/builtin-views/git-pr/client.mjs +440 -0
  40. package/dist/builtin-views/git-pr/view.mjs +675 -0
  41. package/dist/builtin-views/inbox/_lib/render.mjs +177 -0
  42. package/dist/builtin-views/inbox/sources/gmail.mjs +965 -0
  43. package/dist/builtin-views/inbox/sources/linkedin.mjs +427 -0
  44. package/dist/builtin-views/inbox/view.mjs +889 -0
  45. package/dist/builtin-views/linkedin/client.mjs +610 -0
  46. package/dist/builtin-views/linkedin/view.mjs +1171 -0
  47. package/dist/clients/attach/attach-cmd.d.ts +2 -0
  48. package/dist/clients/attach/attach-cmd.js +354 -0
  49. package/dist/clients/attach/chat-view.d.ts +77 -0
  50. package/dist/clients/attach/chat-view.js +450 -0
  51. package/dist/clients/attach/clipboard-image.d.ts +16 -0
  52. package/dist/clients/attach/clipboard-image.js +113 -0
  53. package/dist/clients/attach/config-load.d.ts +31 -0
  54. package/dist/clients/attach/config-load.js +113 -0
  55. package/dist/clients/attach/extension-dialogs.d.ts +29 -0
  56. package/dist/clients/attach/extension-dialogs.js +101 -0
  57. package/dist/clients/attach/input-controller.d.ts +54 -0
  58. package/dist/clients/attach/input-controller.js +204 -0
  59. package/dist/clients/attach/slash-commands.d.ts +36 -0
  60. package/dist/clients/attach/slash-commands.js +200 -0
  61. package/dist/clients/attach/view-socket.d.ts +48 -0
  62. package/dist/clients/attach/view-socket.js +126 -0
  63. package/dist/commands/attention.js +3 -3
  64. package/dist/commands/canvas-prune.js +1 -1
  65. package/dist/commands/daemon.js +4 -3
  66. package/dist/commands/human/prompts.js +4 -10
  67. package/dist/commands/human/queue.js +43 -8
  68. package/dist/commands/human/shared.d.ts +28 -1
  69. package/dist/commands/human/shared.js +48 -10
  70. package/dist/commands/memory/find.d.ts +1 -0
  71. package/dist/commands/memory/find.js +180 -0
  72. package/dist/commands/memory/lint.d.ts +1 -0
  73. package/dist/commands/memory/lint.js +140 -0
  74. package/dist/commands/memory/list.d.ts +1 -0
  75. package/dist/commands/memory/list.js +79 -0
  76. package/dist/commands/memory/read.js +103 -0
  77. package/dist/commands/memory/shared.d.ts +30 -0
  78. package/dist/commands/memory/shared.js +122 -0
  79. package/dist/commands/memory/write.d.ts +1 -0
  80. package/dist/commands/memory/write.js +85 -0
  81. package/dist/commands/memory.d.ts +2 -0
  82. package/dist/commands/memory.js +27 -0
  83. package/dist/commands/node.d.ts +3 -2
  84. package/dist/commands/node.js +660 -65
  85. package/dist/commands/pkg/market-manage.js +1 -1
  86. package/dist/commands/push.js +6 -6
  87. package/dist/commands/revive.js +1 -1
  88. package/dist/commands/skill/author.js +1 -1
  89. package/dist/commands/skill/shared.d.ts +1 -8
  90. package/dist/commands/skill/shared.js +2 -55
  91. package/dist/commands/skill.js +9 -14
  92. package/dist/commands/sys/doctor.js +1 -1
  93. package/dist/commands/sys/update.js +1 -1
  94. package/dist/commands/view-cycle.d.ts +2 -0
  95. package/dist/commands/view-cycle.js +125 -0
  96. package/dist/commands/view-list.d.ts +2 -0
  97. package/dist/commands/view-list.js +66 -0
  98. package/dist/commands/view-new.d.ts +2 -0
  99. package/dist/commands/view-new.js +70 -0
  100. package/dist/commands/view-pick.d.ts +2 -0
  101. package/dist/commands/view-pick.js +119 -0
  102. package/dist/commands/view-run.d.ts +2 -0
  103. package/dist/commands/view-run.js +191 -0
  104. package/dist/commands/view.d.ts +2 -0
  105. package/dist/commands/view.js +29 -0
  106. package/dist/core/__tests__/broker-lifecycle.test.d.ts +1 -0
  107. package/dist/core/__tests__/broker-lifecycle.test.js +677 -0
  108. package/dist/core/__tests__/broker-sdk-wiring.test.d.ts +1 -0
  109. package/dist/core/__tests__/broker-sdk-wiring.test.js +166 -0
  110. package/dist/core/__tests__/cascade-close.test.js +12 -2
  111. package/dist/core/__tests__/child-death-wake.test.d.ts +1 -0
  112. package/dist/core/__tests__/child-death-wake.test.js +245 -0
  113. package/dist/core/__tests__/context-intro.test.js +76 -62
  114. package/dist/core/__tests__/daemon-boot.test.js +14 -5
  115. package/dist/core/__tests__/daemon-liveness.test.js +34 -9
  116. package/dist/core/__tests__/detach-focus.test.d.ts +1 -0
  117. package/dist/core/__tests__/detach-focus.test.js +206 -0
  118. package/dist/core/__tests__/draw-style.test.d.ts +1 -0
  119. package/dist/core/__tests__/draw-style.test.js +258 -0
  120. package/dist/core/__tests__/fixtures/c3-custom-provider-ext.d.ts +2 -0
  121. package/dist/core/__tests__/fixtures/c3-custom-provider-ext.js +18 -0
  122. package/dist/core/__tests__/fixtures/fake-engine.d.ts +138 -0
  123. package/dist/core/__tests__/fixtures/fake-engine.js +614 -0
  124. package/dist/core/__tests__/fixtures/fake-pi-host.js +1 -0
  125. package/dist/core/__tests__/flagship-lifecycle.test.js +7 -1
  126. package/dist/core/__tests__/frame-decoder-perf.test.d.ts +1 -0
  127. package/dist/core/__tests__/frame-decoder-perf.test.js +198 -0
  128. package/dist/core/__tests__/helpers/harness.d.ts +9 -0
  129. package/dist/core/__tests__/helpers/harness.js +111 -1
  130. package/dist/core/__tests__/home-session.test.js +41 -8
  131. package/dist/core/__tests__/human-new-window-regression.test.d.ts +1 -0
  132. package/dist/core/__tests__/human-new-window-regression.test.js +101 -0
  133. package/dist/core/__tests__/human-surface-target.test.d.ts +1 -0
  134. package/dist/core/__tests__/human-surface-target.test.js +98 -0
  135. package/dist/core/__tests__/kickoff.test.js +37 -3
  136. package/dist/core/__tests__/live-mutation.test.js +50 -33
  137. package/dist/core/__tests__/memory.test.js +23 -115
  138. package/dist/core/__tests__/persona-subkind.test.js +18 -15
  139. package/dist/core/__tests__/placement-focus.test.js +5 -0
  140. package/dist/core/__tests__/placement-teardown.test.js +54 -11
  141. package/dist/core/__tests__/relaunch.test.js +4 -3
  142. package/dist/core/__tests__/review-render-pane-regression.test.d.ts +1 -0
  143. package/dist/core/__tests__/review-render-pane-regression.test.js +133 -0
  144. package/dist/core/__tests__/spawn-root.test.js +10 -0
  145. package/dist/core/__tests__/spike-harness.test.js +1 -0
  146. package/dist/core/__tests__/wake-bearings.test.d.ts +1 -0
  147. package/dist/core/__tests__/wake-bearings.test.js +156 -0
  148. package/dist/core/__tests__/wake-origin.test.d.ts +1 -0
  149. package/dist/core/__tests__/wake-origin.test.js +110 -0
  150. package/dist/core/bootstrap.js +1 -1
  151. package/dist/core/canvas/browse/__tests__/render.test.js +1 -0
  152. package/dist/core/canvas/browse/app.js +24 -2
  153. package/dist/core/canvas/browse/model.d.ts +38 -2
  154. package/dist/core/canvas/browse/model.js +134 -10
  155. package/dist/core/canvas/browse/render.d.ts +6 -12
  156. package/dist/core/canvas/browse/render.js +72 -104
  157. package/dist/core/canvas/canvas.js +15 -22
  158. package/dist/core/canvas/db.js +46 -0
  159. package/dist/core/canvas/index.d.ts +1 -0
  160. package/dist/core/canvas/index.js +1 -0
  161. package/dist/core/canvas/paths.d.ts +4 -1
  162. package/dist/core/canvas/paths.js +10 -4
  163. package/dist/core/canvas/pid.d.ts +4 -0
  164. package/dist/core/canvas/pid.js +23 -0
  165. package/dist/core/canvas/render.d.ts +11 -2
  166. package/dist/core/canvas/render.js +69 -0
  167. package/dist/core/canvas/types.d.ts +85 -3
  168. package/dist/core/canvas/types.js +2 -2
  169. package/dist/core/canvas/wakeups.d.ts +76 -0
  170. package/dist/core/canvas/wakeups.js +185 -0
  171. package/dist/core/config.js +4 -1
  172. package/dist/core/frontmatter.js +37 -124
  173. package/dist/core/help.d.ts +6 -0
  174. package/dist/core/help.js +7 -0
  175. package/dist/core/memory-resolver.d.ts +49 -0
  176. package/dist/core/memory-resolver.js +141 -0
  177. package/dist/core/personas/index.d.ts +4 -3
  178. package/dist/core/personas/index.js +3 -2
  179. package/dist/core/personas/loader.d.ts +41 -16
  180. package/dist/core/personas/loader.js +133 -29
  181. package/dist/core/personas/resolve.d.ts +4 -4
  182. package/dist/core/personas/resolve.js +28 -16
  183. package/dist/core/predicate.d.ts +63 -0
  184. package/dist/core/predicate.js +189 -0
  185. package/dist/core/resolver.js +26 -5
  186. package/dist/core/runtime/bearings.d.ts +53 -12
  187. package/dist/core/runtime/bearings.js +132 -59
  188. package/dist/core/runtime/broker-cli.d.ts +1 -0
  189. package/dist/core/runtime/broker-cli.js +46 -0
  190. package/dist/core/runtime/broker-protocol.d.ts +332 -0
  191. package/dist/core/runtime/broker-protocol.js +153 -0
  192. package/dist/core/runtime/broker-sdk.d.ts +48 -0
  193. package/dist/core/runtime/broker-sdk.js +72 -0
  194. package/dist/core/runtime/broker.d.ts +55 -0
  195. package/dist/core/runtime/broker.js +1128 -0
  196. package/dist/core/runtime/close.js +35 -6
  197. package/dist/core/runtime/host.d.ts +53 -0
  198. package/dist/core/runtime/host.js +186 -0
  199. package/dist/core/runtime/kickoff.d.ts +2 -1
  200. package/dist/core/runtime/kickoff.js +91 -5
  201. package/dist/core/runtime/launch.d.ts +45 -2
  202. package/dist/core/runtime/launch.js +65 -2
  203. package/dist/core/runtime/lifecycle.js +23 -6
  204. package/dist/core/runtime/memory.d.ts +2 -42
  205. package/dist/core/runtime/memory.js +11 -162
  206. package/dist/core/runtime/nodes.d.ts +33 -0
  207. package/dist/core/runtime/nodes.js +59 -1
  208. package/dist/core/runtime/persona.js +21 -11
  209. package/dist/core/runtime/pi-vendored.d.ts +18 -0
  210. package/dist/core/runtime/pi-vendored.js +49 -0
  211. package/dist/core/runtime/placement.d.ts +42 -14
  212. package/dist/core/runtime/placement.js +228 -38
  213. package/dist/core/runtime/promote.d.ts +0 -6
  214. package/dist/core/runtime/promote.js +1 -12
  215. package/dist/core/runtime/{demote.d.ts → recycle.d.ts} +5 -5
  216. package/dist/core/runtime/{demote.js → recycle.js} +27 -11
  217. package/dist/core/runtime/reset.js +8 -6
  218. package/dist/core/runtime/revive.d.ts +2 -0
  219. package/dist/core/runtime/revive.js +34 -34
  220. package/dist/core/runtime/spawn.d.ts +19 -0
  221. package/dist/core/runtime/spawn.js +75 -22
  222. package/dist/core/runtime/stop-guard.d.ts +1 -1
  223. package/dist/core/runtime/stop-guard.js +6 -1
  224. package/dist/core/runtime/tmux-chrome.d.ts +1 -1
  225. package/dist/core/runtime/tmux-chrome.js +1 -1
  226. package/dist/core/runtime/tmux.d.ts +28 -0
  227. package/dist/core/runtime/tmux.js +80 -6
  228. package/dist/core/scope.d.ts +11 -0
  229. package/dist/core/scope.js +39 -0
  230. package/dist/core/spawn.d.ts +25 -1
  231. package/dist/core/spawn.js +72 -7
  232. package/dist/core/substrate/gate.d.ts +13 -0
  233. package/dist/core/substrate/gate.js +21 -0
  234. package/dist/core/substrate/index.d.ts +7 -0
  235. package/dist/core/substrate/index.js +18 -0
  236. package/dist/core/substrate/on-read.d.ts +14 -0
  237. package/dist/core/substrate/on-read.js +292 -0
  238. package/dist/core/substrate/render.d.ts +25 -0
  239. package/dist/core/substrate/render.js +256 -0
  240. package/dist/core/substrate/schema.d.ts +76 -0
  241. package/dist/core/substrate/schema.js +124 -0
  242. package/dist/core/substrate/session-cache.d.ts +30 -0
  243. package/dist/core/substrate/session-cache.js +77 -0
  244. package/dist/core/substrate/subject.d.ts +41 -0
  245. package/dist/core/substrate/subject.js +54 -0
  246. package/dist/core/tui/contract.d.ts +83 -0
  247. package/dist/core/tui/contract.js +8 -0
  248. package/dist/core/tui/draw.d.ts +96 -0
  249. package/dist/core/tui/draw.js +339 -0
  250. package/dist/core/tui/host.d.ts +29 -0
  251. package/dist/core/tui/host.js +379 -0
  252. package/dist/core/tui/loader.d.ts +16 -0
  253. package/dist/core/tui/loader.js +94 -0
  254. package/dist/core/{canvas/browse → tui}/terminal.js +7 -6
  255. package/dist/core/wake.d.ts +86 -0
  256. package/dist/core/wake.js +308 -0
  257. package/dist/daemon/crtrd.d.ts +29 -4
  258. package/dist/daemon/crtrd.js +662 -46
  259. package/dist/pi-extensions/__tests__/canvas-context-intro.test.d.ts +1 -0
  260. package/dist/pi-extensions/__tests__/canvas-context-intro.test.js +171 -0
  261. package/dist/pi-extensions/__tests__/canvas-stophook-agentend.test.js +19 -12
  262. package/dist/pi-extensions/canvas-commands.d.ts +3 -0
  263. package/dist/pi-extensions/canvas-commands.js +10 -0
  264. package/dist/pi-extensions/canvas-context-intro.d.ts +17 -0
  265. package/dist/pi-extensions/canvas-context-intro.js +55 -15
  266. package/dist/pi-extensions/canvas-doc-substrate.d.ts +44 -0
  267. package/dist/pi-extensions/canvas-doc-substrate.js +112 -0
  268. package/dist/pi-extensions/canvas-nav.d.ts +3 -0
  269. package/dist/pi-extensions/canvas-nav.js +145 -34
  270. package/dist/pi-extensions/canvas-stophook.js +17 -8
  271. package/dist/pi-extensions/canvas-view.d.ts +21 -0
  272. package/dist/pi-extensions/canvas-view.js +75 -0
  273. package/dist/prompts/skill.js +19 -26
  274. package/dist/prompts/view.d.ts +7 -0
  275. package/dist/prompts/view.js +101 -0
  276. package/dist/types.d.ts +4 -0
  277. package/dist/types.js +1 -0
  278. package/package.json +9 -4
  279. package/dist/commands/skill/find.d.ts +0 -4
  280. package/dist/commands/skill/find.js +0 -257
  281. package/dist/commands/skill/read.js +0 -91
  282. /package/dist/commands/{skill → memory}/read.d.ts +0 -0
  283. /package/dist/core/{canvas/browse → tui}/terminal.d.ts +0 -0
@@ -1,11 +1,14 @@
1
1
  import { defineRoot } from './core/command.js';
2
2
  import { registerSkill } from './commands/skill.js';
3
+ import { registerMemory } from './commands/memory.js';
3
4
  import { registerPkg } from './commands/pkg.js';
4
5
  import { registerHuman } from './commands/human.js';
5
6
  import { registerSys } from './commands/sys.js';
6
7
  import { registerPush, registerFeed } from './commands/push.js';
7
8
  import { registerNode } from './commands/node.js';
8
9
  import { registerCanvas } from './commands/canvas.js';
10
+ import { registerView } from './commands/view.js';
11
+ import { registerAttach } from './clients/attach/attach-cmd.js';
9
12
  /** Assemble the full crtr command tree. Root owns only the tagline; every
10
13
  * subtree declares its own root representation via its rootEntry, and every
11
14
  * branch assembles its child listing from the child defs (each child owns its
@@ -18,6 +21,7 @@ export function buildRoot() {
18
21
  globals: [],
19
22
  subtrees: [
20
23
  registerSkill(),
24
+ registerMemory(),
21
25
  registerPkg(),
22
26
  registerHuman(),
23
27
  registerSys(),
@@ -25,6 +29,8 @@ export function buildRoot() {
25
29
  registerPush(),
26
30
  registerFeed(),
27
31
  registerCanvas(),
32
+ registerView(),
33
+ registerAttach(),
28
34
  ],
29
35
  });
30
36
  }
@@ -0,0 +1,164 @@
1
+ ---
2
+ kind: skill
3
+ when: When a task relates to marketplaces
4
+ why: How to author a crtr marketplace — marketplace.json index, plugin entries,
5
+ symlink-based install, auto-bump CI, dual-publishing. Use when creating a
6
+ marketplace or contributing plugins to one.
7
+ short-form: How to author a crtr marketplace — marketplace.json index, plugin
8
+ entries, symlink-based install, auto-bump CI, dual-publishing. Use when
9
+ creating a marketplace or contributing plugins to one.
10
+ system-prompt-visibility: name
11
+ file-read-visibility: none
12
+ needs-refinement: true
13
+ ---
14
+
15
+ # Authoring crtr marketplaces
16
+
17
+ A **marketplace** is a git repo that indexes multiple plugins. Users register it once, then `crtr pkg market manage install --marketplace <mkt> --plugin <plugin>` symlinks any plugin from it. `crtr pkg market manage update --marketplace <mkt>` pulls updates for every installed plugin at once.
18
+
19
+ Audience: LLM agents creating a marketplace or adding plugins to an existing one.
20
+
21
+ ## When you need a marketplace (vs a single-plugin repo)
22
+
23
+ A solo plugin ships from any git URL via `crtr pkg plugin manage install <url> --scope user` — no marketplace needed.
24
+
25
+ Reach for a marketplace when:
26
+ - You want to publish ≥3 plugins under one brand or theme.
27
+ - Users should install selectively without cloning each plugin's repo.
28
+ - You want centralized version-bump automation across many plugins.
29
+
30
+ If you have one plugin, ship it standalone. Promote to a marketplace later.
31
+
32
+ ## Directory layout
33
+
34
+ ```
35
+ <marketplace-repo>/
36
+ ├── .crouter-marketplace/
37
+ │ └── marketplace.json # marketplace manifest — required
38
+ └── plugins/
39
+ ├── plugin-a/
40
+ │ ├── .crouter-plugin/plugin.json
41
+ │ └── skills/...
42
+ └── plugin-b/
43
+ └── ...
44
+ ```
45
+
46
+ Each entry under `plugins/` is a complete plugin (see [[crouter-development/plugins]]). The marketplace adds an index on top.
47
+
48
+ ## The manifest
49
+
50
+ `.crouter-marketplace/marketplace.json`:
51
+
52
+ ```json
53
+ {
54
+ "name": "my-marketplace",
55
+ "version": "0.3.0",
56
+ "owner": { "name": "Your Name", "email": "you@example.com" },
57
+ "plugins": [
58
+ {
59
+ "name": "plugin-a",
60
+ "version": "0.2.1",
61
+ "source": "https://github.com/<owner>/<repo>",
62
+ "description": "One sentence."
63
+ },
64
+ { "name": "plugin-b", "version": "0.1.0", "source": "…", "description": "…" }
65
+ ]
66
+ }
67
+ ```
68
+
69
+ | Field | Required | Notes |
70
+ |---|---|---|
71
+ | `name` | yes | Lowercase kebab. |
72
+ | `version` | yes | Semver. Bumps when any plugin bumps or when the marketplace manifest itself changes. |
73
+ | `owner` | optional | |
74
+ | `plugins` | yes | Array. Each entry: `name`, `version`, `source`, `description`. |
75
+
76
+ The `plugins[]` array IS the index — what's installable. A plugin on disk but not in the index won't resolve. A plugin in the index but missing from disk errors on install.
77
+
78
+ ## Install mechanics — symlinks, not clones
79
+
80
+ When a user runs `crtr pkg market manage install --marketplace my-marketplace --plugin plugin-a`:
81
+ 1. Crouter looks up `plugin-a` in the marketplace's manifest.
82
+ 2. **Symlinks** `<marketplace-clone>/plugins/plugin-a/` → `<user-scope>/plugins/plugin-a/`.
83
+ 3. Records the install in the scope config with `source_marketplace: my-marketplace`.
84
+
85
+ Therefore `crtr pkg market manage update --marketplace my-marketplace` (which does `git pull` in the marketplace clone) updates every installed plugin from it — no per-plugin re-install, no second clone.
86
+
87
+ ## Version-bump automation (recommended)
88
+
89
+ Bumping N plugin manifests + the index by hand is error-prone. The canonical pattern is a GitHub Actions workflow that bumps versions from commit subjects (conventional commits):
90
+
91
+ | Commit subject | Bump |
92
+ |---|---|
93
+ | `feat!: …` or `BREAKING CHANGE` in body | major |
94
+ | `feat: …` | minor |
95
+ | anything else (`fix:`, `chore:`, `docs:`, …) | patch |
96
+
97
+ Per commit:
98
+ - For each plugin folder touched, both `plugins/<name>/.crouter-plugin/plugin.json` and the matching entry in `marketplace.json` get bumped.
99
+ - Top-level `marketplace.json` version bumps when any plugin bumps OR the manifest itself was edited directly.
100
+ - Newly-added plugins are skipped — they keep the version you committed.
101
+ - Commits whose subject starts with `chore: release` are skipped to avoid loops.
102
+
103
+ If you adopt this: **never edit `version` fields by hand**. CI will overwrite. Document this in the marketplace's CLAUDE.md.
104
+
105
+ The crouter-official-marketplace repo's `.github/workflows/auto-bump.yml` is the reference implementation. Copy it.
106
+
107
+ ## Adding a plugin to a marketplace
108
+
109
+ ```bash
110
+ cd <marketplace-repo>
111
+
112
+ # Create the plugin (see [[crouter-development/plugins]] for plugin layout)
113
+ mkdir -p plugins/my-new-plugin/.crouter-plugin plugins/my-new-plugin/skills
114
+ $EDITOR plugins/my-new-plugin/.crouter-plugin/plugin.json
115
+
116
+ # Add at least one skill
117
+ crtr skill author scaffold my-new-plugin/first-skill --type playbook --description "Use when …"
118
+
119
+ # Add the plugin to the marketplace index
120
+ $EDITOR .crouter-marketplace/marketplace.json
121
+ # (append to plugins[] with name, initial version, source, description)
122
+
123
+ # Validate
124
+ crtr sys doctor
125
+
126
+ # Commit — CI bumps versions if you've wired up auto-bump
127
+ git add -A
128
+ git commit -m "feat: add my-new-plugin"
129
+ git push
130
+ ```
131
+
132
+ Existing users pick it up on their next `crtr pkg market manage update --marketplace <marketplace-name>` (or on the next auto-update tick if they've set `auto_update.content: "apply"`).
133
+
134
+ ## Updating an existing plugin
135
+
136
+ Edit content under `plugins/<name>/`. Commit with a conventional-commit subject. CI bumps the plugin manifest and the marketplace index entry together. No manual sync.
137
+
138
+ ## Removing a plugin
139
+
140
+ Delete the plugin's directory AND its entry in `marketplace.json` → `plugins[]`. Commit with `feat!: remove <plugin>` to signal a major bump (the marketplace's contract changed for anyone depending on that plugin).
141
+
142
+ ## Marketplace registration scopes
143
+
144
+ A marketplace itself registers per-scope:
145
+
146
+ | Scope | Path | Use case |
147
+ |---|---|---|
148
+ | user | `~/.crouter/marketplaces/<name>/` | Private to your machine — your personal subscriptions |
149
+ | project | `<project>/.crouter/marketplaces/<name>/` | Checked into the repo — anyone cloning gets the same marketplace pinned |
150
+
151
+ `crtr pkg market manage add --url <git-url> --scope user` is the default. Use `--scope project` when the marketplace is integral to how the repo expects to be developed.
152
+
153
+ ## Validation
154
+
155
+ `crtr sys doctor` checks marketplaces:
156
+ - `marketplace.json` is valid JSON.
157
+ - Every entry in `plugins[]` corresponds to a real directory under `plugins/`.
158
+ - Each plugin under `plugins/` passes plugin-level validation.
159
+
160
+ A plugin on disk but missing from the manifest is a **warning** (probably forgotten); a plugin in the manifest but missing on disk is an **error** (install would break).
161
+
162
+ ## Cross-publishing with Claude Code
163
+
164
+ Some marketplaces ship a parallel `.claude-plugin/` tree so plugins can load directly into Claude Code without crtr. Optional. Sync the two manifests if you adopt it.
@@ -0,0 +1,58 @@
1
+ ---
2
+ kind: skill
3
+ when: When a task relates to base prompt
4
+ why: How to write a base persona prompt (the mode=base PERSONA.md) — the system
5
+ prompt for a single-window worker node. Covers what a base persona is for,
6
+ what to put in it, the identity/deliverable/boundary/report shape, and the
7
+ voice to use. Use when writing or revising a <kind>/PERSONA.md.
8
+ short-form: How to write a base persona prompt (the mode=base PERSONA.md) — the
9
+ system prompt for a single-window worker node. Covers what a base persona is
10
+ for, what to put in it, the identity/deliverable/boundary/report shape, and
11
+ the voice to use. Use when writing or revising a <kind>/PERSONA.md.
12
+ system-prompt-visibility: name
13
+ file-read-visibility: none
14
+ needs-refinement: true
15
+ ---
16
+
17
+ # Writing a base persona prompt
18
+
19
+ `PERSONA.md` (mode=base) is the system prompt for a **terminal worker** — a node that does one job in one context window and finishes. Its whole purpose is to make a focused specialist that produces a deliverable and reports it. This skill is the philosophy of what belongs in a base persona; for file mechanics and frontmatter, see `[[crouter-development/personas]]`.
20
+
21
+ Audience: LLM agents writing a `<kind>/PERSONA.md`.
22
+
23
+ ## What a base persona is for
24
+
25
+ A base worker **does the work itself and ends.** It is not a manager. The persona points a fresh, capable model at one kind of task and makes it produce the right artifact without supervision. Everything in the body serves that: who it is, what good output looks like, what's out of bounds, and how it hands the result back.
26
+
27
+ A base persona is a **system prompt**, not a task. Write the durable role — the identity and standards that hold for *every* task of this kind — and let the spawn-time prompt carry the specific task. Never bake one task's details into the persona.
28
+
29
+ ## The four things to put in it
30
+
31
+ In order. Most base personas are 1–3 short paragraphs total.
32
+
33
+ 1. **Identity — one line, second person.** Open `"You are a <role> agent."` This is a system-prompt identity declaration; `"You are X"` is correct here (it would be wrong in a task prompt). Name the role sharply — "fast codebase exploration agent", "code review agent" — so the model knows which hat it wears.
34
+
35
+ 2. **The deliverable and its shape.** State *what good output is*, not a step-by-step procedure. Name the artifact and its structure: design names its sections, review names its severity tiers, explore demands `file:line` citations. You set the target the model steers toward — describe the target, not a checklist of moves to reach it. Fix the *what*; delegate the *how* to the model's judgment.
36
+
37
+ 3. **The boundaries that keep it in its lane.** One or two constraints that carve this kind out from its neighbors: explore is "read-only — do not modify"; design and plan "do not implement"; developer "throw errors early, no silent fallbacks". These earn their negative framing because the model has a real prior toward crossing the line — a design agent *will* start writing code if you don't fence it off. Keep them to genuine lane boundaries; don't pile on don'ts the model wouldn't trip over anyway.
38
+
39
+ 4. **The report.** Close by stating the deliverable is reported via `crtr push final` — the one runtime rule worth reinforcing in the body, because stopping without it is the most common worker failure. Everything else in the protocol (delegating, the feed, escalating) is already prepended by `runtime-base.md`; do not re-teach it.
40
+
41
+ ## Keep it shallow
42
+
43
+ A base worker may spawn a helper or two for a targeted sub-task, but most of the work must be its own. If a kind's job routinely needs broad fan-out, it isn't a base worker — it's an orchestrator (`[[crouter-development/personas/orchestrator-prompt]]`). The base persona should make a do-er, not a delegator; say so explicitly when the kind is tempting to over-delegate (developer: "keep the delegation shallow").
44
+
45
+ ## Voice
46
+
47
+ - **Second person + imperative.** "You are X." "Answer the question." "Do not modify files." Direct instruction for a direct worker.
48
+ - **Positive framing for standards.** Describe the output you want, not a list of failures to avoid — "quote concrete `file:line` references" beats "don't be vague".
49
+ - **Reserve hard rules.** CAPS / MUST only for the genuine non-negotiable — usually the finish rule and the lane boundary. If everything is critical, nothing is.
50
+ - **Density.** This loads as the system prompt on *every* spawn of the kind. No preamble, no fluff — every line is the identity, the deliverable, a boundary, or the report.
51
+
52
+ ## Failure modes
53
+
54
+ - **Procedure instead of target.** A numbered how-to ages badly and fights the model's judgment. State the deliverable's shape; let it choose the path.
55
+ - **Restating runtime-base.** Re-teaching delegation/feed/escalation duplicates the prepended protocol and drifts out of sync. Reference only `push final`, as the deliverable.
56
+ - **Task leakage.** Specifics of one task baked into the persona make every future spawn wear yesterday's job. Keep the body to the durable role.
57
+ - **No report close.** A base persona that never names `crtr push final` produces workers that go quiet and get re-prompted. Always close on the deliverable.
58
+ - **A manager in worker's clothing.** If the body spends more ink on delegation than on doing, you've written an orchestrator — split it.
@@ -0,0 +1,60 @@
1
+ ---
2
+ kind: skill
3
+ when: When a task relates to orchestrator prompt
4
+ why: How to write an orchestrator persona prompt (orchestrator.md) — the system
5
+ prompt for a resident coordinator node. Covers the kernel-vs-kind split, what
6
+ belongs in the per-kind body, naming the child pipeline, the roadmapSkill
7
+ pointer, and the @include rule. Use when writing or revising a
8
+ <kind>/orchestrator.md.
9
+ short-form: How to write an orchestrator persona prompt (orchestrator.md) — the
10
+ system prompt for a resident coordinator node. Covers the kernel-vs-kind
11
+ split, what belongs in the per-kind body, naming the child pipeline, the
12
+ roadmapSkill pointer, and the @include rule. Use when writing or revising a
13
+ <kind>/orchestrator.md.
14
+ system-prompt-visibility: name
15
+ file-read-visibility: none
16
+ needs-refinement: true
17
+ ---
18
+
19
+ # Writing an orchestrator persona prompt
20
+
21
+ `orchestrator.md` is the system prompt for a **resident coordinator** — a long-lived node that owns a goal too large for one window and delivers it by decomposing, delegating, integrating, and surviving context refreshes. This skill is the philosophy of what belongs in an orchestrator persona; for file mechanics and frontmatter, see `[[crouter-development/personas]]`.
22
+
23
+ Audience: LLM agents writing a `<kind>/orchestrator.md`.
24
+
25
+ ## The one rule that shapes everything: kernel vs kind
26
+
27
+ Every orchestrator persona ends with `@include orchestration-kernel.md`. The kernel already teaches the **universal orchestrator protocol** — the wake loop, the roadmap structure and discipline, long-term memory, working in phases, delegating outcomes, steering what comes back, engaging the human, and the pre-finish checklist. It is long and complete.
28
+
29
+ So your `orchestrator.md` body carries **only the delta** — what is specific to this kind. If a line you're about to write is true of orchestrators in general, the kernel already says it; cut it. Subtract before you add: the body is usually 1–3 short paragraphs *on top of* the kernel, not a re-derivation of how to orchestrate.
30
+
31
+ ## What the per-kind body puts in
32
+
33
+ 1. **Identity — the kind's ownership.** Open `"You are a **<kind> orchestrator** — …"` and say what this kind *owns*: a feature-sized goal (developer), a specification effort (spec), a review surface (review), a research question (explore). Bold the role. One sentence on what "owning it" means here.
34
+
35
+ 2. **The child kinds it drives, and the pipeline.** Name the specialists this orchestrator delegates to and the order it runs them: developer drives `explore → spec → plan → developer → review` as a "spec → plan → implement → review → fix → validate" pipeline; spec runs `SHAPE → DESIGN → REQUIREMENTS` stages; review fans `review` children across units. The flow is the kind's signature — make it explicit so delegation isn't ad hoc.
36
+
37
+ 3. **A pointer to the methodology skill — don't inline it.** Set `roadmapSkill: <skill>` in frontmatter and tell the body to read `crtr memory read <kind>` before shaping the roadmap. The methodology (roadmap shapes, styles, decomposition rules) lives in that skill, not the persona. The persona points; the skill teaches.
38
+
39
+ 4. **The kind's quality bar.** State the domain-specific exit criteria the kernel can't: developer's "implementation is done when provably correct against the spec, review done when a non-implementer cleared all Major/Critical findings, validation done end-to-end in the real runtime." This is where you set the ceiling for *this* kind of work.
40
+
41
+ 5. **What integration means here.** Every orchestrator's deliverable is the *synthesis*, never the child transcripts — but say what synthesis looks like for this kind: explore reconciles findings into one architecture answer; review deduplicates and severity-normalises into one verdict; design verifies every contract is honored on both sides. "Integrate, don't concatenate," made concrete.
42
+
43
+ ## The recurring sizing rule
44
+
45
+ When a unit is itself too big for one window, the orchestrator creates that child **directly as `--mode orchestrator`**, not a base worker it counts on to self-promote. This appears in nearly every orchestrator persona because it's domain-flavored — *which* child kind gets promoted differs by orchestrator. State it for yours; a node born an orchestrator is strictly more capable than one hoping to become one.
46
+
47
+ ## Voice
48
+
49
+ - **Second person identity, then operations.** "You are a **developer orchestrator**…" then "Run the build as a delegation pipeline…".
50
+ - **Positive, concrete framing.** Name the pipeline and the exit criteria; don't enumerate things not to do. The one earned negative is the load-bearing boundary — "never by writing the code yourself" — which counters a real model prior to just do the work.
51
+ - **Reserve hard rules** for genuine non-negotiables (the no-self-execution boundary, the no-self-promotion sizing rule). Density matters: this loads on every revive.
52
+ - **End with the include.** `@include orchestration-kernel.md` on its own line, last. Without it the orchestrator boots with no protocol and cannot run the loop.
53
+
54
+ ## Failure modes
55
+
56
+ - **Re-teaching the kernel.** Re-explaining the wake loop, roadmap sections, yielding, or memory duplicates the kernel and drifts. If it's universal, delete it.
57
+ - **Missing `@include`.** No kernel = no loop, no roadmap discipline, no finish checklist. Always include it, last.
58
+ - **Inlining the methodology.** Roadmap shapes belong in the `roadmapSkill`, not the persona. Point at it.
59
+ - **No named pipeline.** An orchestrator that doesn't name its child kinds and their order produces scattershot delegation. The flow is the value.
60
+ - **Forgetting the no-self-execution rule.** Without an explicit boundary, the model drifts into doing the work itself and exhausts its context with the goal half-met — the exact failure orchestrators exist to avoid.
@@ -0,0 +1,117 @@
1
+ ---
2
+ kind: skill
3
+ when: When a task relates to personas
4
+ why: How to define a custom node kind (persona) for crtr — the
5
+ PERSONA.md/orchestrator files, the frontmatter contract (incl. whenToUse),
6
+ nested sub-personas, scope resolution and overrides, and how to write the
7
+ prose. Use when adding a new `--kind`, overriding a builtin agent, or
8
+ debugging persona resolution.
9
+ short-form: How to define a custom node kind (persona) for crtr — the
10
+ PERSONA.md/orchestrator files, the frontmatter contract (incl. whenToUse),
11
+ nested sub-personas, scope resolution and overrides, and how to write the
12
+ prose. Use when adding a new `--kind`, overriding a builtin agent, or
13
+ debugging persona resolution.
14
+ system-prompt-visibility: name
15
+ file-read-visibility: none
16
+ needs-refinement: true
17
+ ---
18
+
19
+ # Authoring crtr personas (custom node kinds)
20
+
21
+ A **persona** is what `--kind` resolves to: the markdown that becomes a node's system prompt plus the launch knobs (model/tools/extensions/lifecycle). Defining one adds a new spawnable agent type to the canvas.
22
+
23
+ Audience: LLM agents creating or overriding a crtr node kind.
24
+
25
+ ## When to add a kind (vs reuse a builtin)
26
+
27
+ Builtins cover the common shapes: `explore spec design plan developer review general`.
28
+
29
+ - **Reuse a builtin** when the work fits one. Don't fork `developer` to tweak one sentence.
30
+ - **Add a kind** for a recurring specialist with its own deliverable + reporting contract that no builtin matches — e.g. `researcher`, `migration`, `release`.
31
+ - **Override a builtin** by creating a same-named dir at user/project scope — it *shadows* the builtin (precedence below), it doesn't edit the shipped file.
32
+
33
+ Never edit `src/builtin-personas/` for a local need — that ships to everyone. Override at scope instead.
34
+
35
+ ## Layout
36
+
37
+ ```
38
+ <root>/personas/
39
+ ├── <kind>/
40
+ │ ├── PERSONA.md # worker persona (mode=base)
41
+ │ ├── orchestrator.md # orchestrator persona (mode=orchestrator) — optional
42
+ │ └── <sub>/PERSONA.md # nested sub-persona — kind string `<kind>/<sub>` (any depth)
43
+ ├── orchestration-kernel.md # shared; @include-d by orchestrator files
44
+ └── runtime-base.md # shared; prepended to EVERY persona automatically
45
+ ```
46
+
47
+ The role-body file is **`PERSONA.md`** (not `base.md` — that layout was retired). A kind exists once `<kind>/` holds a `PERSONA.md` **or** `orchestrator.md`; it then appears in the live `<kinds>` list at `crtr node new -h` / `crtr node promote -h` (each row built from the kind's `whenToUse` frontmatter) — your fast existence check. Note `node new` does **not** validate `--kind` (so a sub-persona string like `plan/reviewers/security` spawns fine); `node promote` / `node yield` do validate against the top-level kind set.
48
+
49
+ ## Scope + precedence
50
+
51
+ Resolution is **project > user > builtin**, resolved per file:
52
+
53
+ | Scope | Path |
54
+ |---|---|
55
+ | project | `<project>/.crouter/personas/<kind>/` — checked into the repo |
56
+ | user | `~/.crouter/personas/<kind>/` — personal, all your projects |
57
+ | builtin | ships with the CLI |
58
+
59
+ Personas are **scope-root content, not plugin content** — they don't ship via plugins or marketplaces (the loader only searches `<scope>/personas/`). To share a kind, commit it to a repo's `.crouter/personas/` (project) or copy it into `~/.crouter/personas/` (user).
60
+
61
+ ## The two files
62
+
63
+ **`PERSONA.md`** — the worker (mode=base). Second person. State scope → method → deliverable, and end by reporting via `crtr push final`. Default lifecycle `terminal` (finishes in one window). → how to write one: `[[crouter-development/personas/base-prompt]]`.
64
+
65
+ **`orchestrator.md`** — the owner that delegates to children and never does the work itself. Name the child kinds it drives and set per-phase exit criteria. **Must end with `@include orchestration-kernel.md`** — the loader inlines it; without it the orchestrator boots with no fan-out protocol. Default lifecycle `resident`. → how to write one: `[[crouter-development/personas/orchestrator-prompt]]`.
66
+
67
+ If a kind has only `PERSONA.md`, `--mode orchestrator` composes `PERSONA.md body + kernel` and forces `resident` — so write `orchestrator.md` only when the worker and owner prose genuinely differ.
68
+
69
+ ## Frontmatter contract
70
+
71
+ YAML frontmatter on either file supplies launch knobs; the body is the system prompt.
72
+
73
+ | Field | Type | Effect |
74
+ |---|---|---|
75
+ | `lifecycle` | `terminal`\|`resident` | terminal = finishes + reaps; resident = interactive/long-lived. Defaults: base→terminal, orchestrator→resident. |
76
+ | `model` | string | pi model override (normalized). Omit to inherit the default. |
77
+ | `tools` | string[] | pi tool allowlist. Omit for all tools. |
78
+ | `extensions` | string[] | pi extensions, **added after** the always-on canvas extensions. |
79
+ | `skills` | string[] | skills attached at launch. |
80
+ | `roadmapSkill` | string | orchestrator only — a skill whose body is injected as roadmap-shaping guidance when the node runs as an orchestrator. |
81
+ | `whenToUse` | string | on a `<kind>/PERSONA.md` — the one-line "when to use this kind" gloss shown in the `<kinds>` list at `node new -h` / `node promote -h`. |
82
+ | `availableTo` | string[] \| `*` | sub-persona only — which kinds see it in their spawn menu. Default: its top-level ancestor kind. `*` / `all` = every kind. |
83
+
84
+ `resolve()` never throws: a missing/empty persona falls back to `"You are a <kind> agent…"` defaults, so a node always boots. `runtime-base.md` (the push/finish/delegate/feed/ask protocol) is prepended to every persona — **don't restate it in the body.**
85
+
86
+ ## @include
87
+
88
+ `@include <filename>` inlines another persona-root file, resolved through the same project>user>builtin chain. Used for `orchestration-kernel.md`; drop an `orchestration-kernel.md` at user/project scope to change orchestrator protocol fleet-wide.
89
+
90
+ ## Sub-personas
91
+
92
+ A **sub-persona** is a specialist nested under a kind — any descendant dir (any depth) that holds a `PERSONA.md`, e.g. `plan/reviewers/security/PERSONA.md`. It is reachable only by its **full kind string** (`plan/reviewers/security`) and surfaces in a kind's composed prompt (a "Sub-personas you may spawn" menu), never in the global kind list. Intermediate dirs without a `PERSONA.md` (e.g. `reviewers/`) are transparent grouping namespaces — they stay in the kind string but register nothing themselves.
93
+
94
+ Visibility is its `availableTo` frontmatter: omit it and the sub-persona is visible only to its top-level ancestor kind (so `plan/reviewers/*` show up only for `plan`); set `availableTo: [plan, developer]` to surface it in those kinds; set `availableTo: "*"` for every kind. Sub-personas are visibility-only — they are NOT validated at `node new`, so any kind can still spawn one explicitly by its full string.
95
+
96
+ ## Dev loop
97
+
98
+ ```bash
99
+ mkdir -p ~/.crouter/personas/researcher
100
+ $EDITOR ~/.crouter/personas/researcher/PERSONA.md # whenToUse frontmatter + prose
101
+ crtr node new -h # confirm `researcher` now appears in the <kinds> list
102
+ crtr node new --kind researcher "map the auth flow" # spawn it
103
+ ```
104
+
105
+ No scaffold command — create the dir + files by hand. Copy a builtin (`explore/PERSONA.md`, `developer/orchestrator.md`) as a starting template.
106
+
107
+ ## Failure modes
108
+
109
+ - **Orchestrator with no `@include orchestration-kernel.md`** — boots without the fan-out protocol; can't delegate. Always include it.
110
+ - **Restating runtime-base** — the push/finish/delegate protocol is already prepended. Duplicating it wastes context and drifts out of sync.
111
+ - **`lifecycle: resident` on a worker `PERSONA.md`** — the node never finishes. Reserve `resident` for interactive/long-lived kinds.
112
+ - **Editing `src/builtin-personas/` for a local need** — ships to everyone. Override at user/project scope.
113
+ - **Kind not listed after creating the dir** — neither `PERSONA.md` nor `orchestrator.md` is present, or the filename is wrong (it must be exactly `PERSONA.md` — `base.md` no longer registers a kind). The dir alone doesn't register a kind.
114
+
115
+ ## Related
116
+
117
+ `[[crouter-development/plugins]]` packages *skills* for distribution — personas are distributed differently (committed to a scope's `personas/`), so a kind is never part of a plugin.
@@ -0,0 +1,163 @@
1
+ ---
2
+ kind: skill
3
+ when: When a task relates to plugins
4
+ why: How to author a crtr plugin — plugin.json manifest, directory layout,
5
+ scopes, install mechanics, versioning. Use when creating a new plugin,
6
+ packaging skills for distribution, or debugging install/resolution.
7
+ short-form: How to author a crtr plugin — plugin.json manifest, directory
8
+ layout, scopes, install mechanics, versioning. Use when creating a new plugin,
9
+ packaging skills for distribution, or debugging install/resolution.
10
+ system-prompt-visibility: name
11
+ file-read-visibility: none
12
+ needs-refinement: true
13
+ ---
14
+
15
+ # Authoring crtr plugins
16
+
17
+ A **plugin** is a directory shipping skills (and, in future, other artifact types like commands and hooks). Plugins are how you package skills for sharing across machines, projects, and people.
18
+
19
+ Audience: LLM agents creating or maintaining a crtr plugin.
20
+
21
+ ## When you need a plugin (vs scope-owned skills)
22
+
23
+ Scope-owned skills live at `~/.crouter/skills/` (user) or `<project>/.crouter/skills/` (project). They're personal and per-machine/per-repo.
24
+
25
+ Reach for a **plugin** when:
26
+ - You want to share skills across multiple projects or with other people.
27
+ - You want versioning + update mechanics (`crtr pkg plugin manage update --name <name>`).
28
+ - You want a marketplace to index the work — see [[crouter-development/marketplaces]].
29
+
30
+ If it's a one-off note for yourself, scope-owned skills are simpler. Promote to a plugin later.
31
+
32
+ ## Directory layout
33
+
34
+ ```
35
+ <plugin-name>/
36
+ ├── .crouter-plugin/
37
+ │ └── plugin.json # manifest — required
38
+ └── skills/
39
+ └── <skill-name>/
40
+ └── SKILL.md
41
+ ```
42
+
43
+ The `<plugin-name>` directory IS the plugin. The manifest's `name` field must match the directory name (install renames if needed). Future artifact types (`commands/`, `hooks/`, etc.) will be sibling dirs to `skills/`.
44
+
45
+ ## The manifest
46
+
47
+ `.crouter-plugin/plugin.json`:
48
+
49
+ ```json
50
+ {
51
+ "name": "my-plugin",
52
+ "version": "0.1.0",
53
+ "description": "One sentence — shown in `crtr pkg plugin inspect list`.",
54
+ "source": "https://github.com/<owner>/<repo>",
55
+ "owner": {
56
+ "name": "Your Name",
57
+ "email": "you@example.com"
58
+ }
59
+ }
60
+ ```
61
+
62
+ | Field | Required | Notes |
63
+ |---|---|---|
64
+ | `name` | yes | Must match the directory name. Lowercase kebab. |
65
+ | `version` | yes | Semver. Marketplace CI may bump automatically — see marketplaces skill. |
66
+ | `description` | yes | One sentence. |
67
+ | `source` | recommended | Git URL where the plugin lives. Used by `crtr pkg plugin manage update --name <name>`. |
68
+ | `owner` | optional | Author info. |
69
+
70
+ ## Scopes
71
+
72
+ A plugin can live in either scope:
73
+
74
+ | Scope | Path | Use case |
75
+ |---|---|---|
76
+ | user | `~/.crouter/plugins/<name>/` | Personal, available in all your projects |
77
+ | project | `<project>/.crouter/plugins/<name>/` | Pinned to a specific repo — checked in or vendored |
78
+
79
+ Project-scope plugins outrank user-scope on resolution. Both outrank marketplace-installed plugins. The builtin `crtr` plugin (ships with the CLI) sits at the bottom.
80
+
81
+ ## Install mechanics
82
+
83
+ Three ways a plugin lands in a scope:
84
+
85
+ 1. **From a git URL** (`crtr pkg plugin manage install <url> --scope user`):
86
+ - Clones into `<scope>/plugins/<name>/` using the manifest's name.
87
+ - `crtr pkg plugin manage update --name <name>` does `git pull`.
88
+ - Independent of any marketplace.
89
+
90
+ 2. **From a marketplace** (`crtr pkg market manage install --marketplace <mkt> --plugin <name>`):
91
+ - **Symlinks** the marketplace's `plugins/<name>/` into `<scope>/plugins/<name>/`.
92
+ - `crtr pkg market manage update --marketplace <mkt>` pulls updates for every installed plugin from that marketplace.
93
+ - See [[crouter-development/marketplaces]].
94
+
95
+ 3. **Authored in place** (you're writing the plugin in a working repo):
96
+ - Symlink for tight dev loop: `ln -s $(pwd) ~/.crouter/plugins/<name>`.
97
+ - Or `crtr pkg plugin manage install file://$(pwd) --scope project` to clone-install.
98
+
99
+ ## Local development loop
100
+
101
+ ```bash
102
+ # Scaffold dir + manifest + first skill
103
+ mkdir -p my-plugin/.crouter-plugin my-plugin/skills
104
+ $EDITOR my-plugin/.crouter-plugin/plugin.json # write the manifest
105
+ cd my-plugin
106
+ crtr skill author scaffold my-plugin/my-first-skill --type playbook --description "Use when …"
107
+
108
+ # Symlink for fast iteration — no clone, edits land immediately
109
+ ln -s $(pwd) ~/.crouter/plugins/my-plugin
110
+
111
+ # Verify
112
+ crtr pkg plugin inspect list # my-plugin appears
113
+ crtr pkg plugin inspect show my-plugin # lists its skills
114
+ crtr memory list --plugin my-plugin # just my-plugin's skills
115
+ crtr sys doctor # validates manifest + every skill
116
+ ```
117
+
118
+ When ready to share: push to a git remote; anyone can `crtr pkg plugin manage install <url> --scope user`.
119
+
120
+ ## Versioning
121
+
122
+ Standard semver:
123
+
124
+ | Change | Bump |
125
+ |---|---|
126
+ | Typo, wording polish | patch (0.1.0 → 0.1.1) |
127
+ | New skill, new section, new example | minor (0.1.0 → 0.2.0) |
128
+ | Removed skill, renamed skill, changed manifest schema | major (0.1.0 → 1.0.0) |
129
+
130
+ `crtr pkg plugin manage update --name <name>` reads the new version after pulling and updates the local config. Plugins published through a marketplace may have their `version` field bumped automatically by CI — see [[crouter-development/marketplaces]].
131
+
132
+ ## Enable/disable
133
+
134
+ `crtr pkg plugin manage disable <name>` flips the per-scope config without removing files. Disabled plugins are hidden from `crtr memory list` and don't resolve via `crtr memory read <name>`. Re-enable with `crtr pkg plugin manage enable <name>`.
135
+
136
+ Individual skills inside an enabled plugin can also be disabled: `crtr skill state disable <plugin>/<skill>`.
137
+
138
+ ## What goes in a plugin
139
+
140
+ Good plugin scope:
141
+ - A coherent set of related skills (3–15 typical) sharing a theme.
142
+ - All skills serve the same user persona or workflow.
143
+ - Versioned together — a bump means a bump for the whole set.
144
+
145
+ Bad plugin scope:
146
+ - One mega-plugin with every skill you've ever written. Hard to install selectively, hard to version.
147
+ - A plugin per single skill. No value-add over scope-owned skills.
148
+
149
+ ## Cross-plugin etiquette
150
+
151
+ If your skill conceptually depends on another plugin's skill, link via `## Related` with `` `<plugin>/<skill>` ``. Don't fork content; link it.
152
+
153
+ ## Validation
154
+
155
+ `crtr sys doctor` checks every plugin:
156
+ - Manifest exists and is valid JSON.
157
+ - Manifest `name` matches the directory name.
158
+ - Every skill under `skills/` passes the skill-validation contract (frontmatter parses, `name` matches dir path, `type` in enum). Run `crtr skill author guide` for the authoring workflow + SKILL.md format reference.
159
+ - Sibling artifact dirs (`commands/`, `hooks/`, etc.) — validated by their respective specs as those land.
160
+
161
+ ## Cross-publishing with Claude Code
162
+
163
+ Some plugins also publish a `.claude-plugin/` manifest alongside `.crouter-plugin/` so they can be loaded directly into Claude Code without going through crtr. Optional. Only worth doing when your skills/commands meaningfully stand alone in the Claude Code surface. Keep manifests in sync if you do.