@zalom/plastic 2.0.0-alpha.9 → 2.0.2

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 (326) hide show
  1. package/PLASTIC.md +13 -136
  2. package/README.md +357 -133
  3. package/agents/plastic-enforcer.md +21 -16
  4. package/agents/plastic-executor.md +15 -4
  5. package/agents/plastic-node-research.md +30 -0
  6. package/agents/plastic-node-verify.md +28 -0
  7. package/agents/plastic-node-work.md +33 -0
  8. package/agents/{plastic-advisor.md → plastic-primary-advisor.md} +7 -9
  9. package/agents/{plastic-faux-advisor.md → plastic-secondary-advisor.md} +9 -12
  10. package/assets/plastic-logo.svg +1 -0
  11. package/bin/crap +4 -0
  12. package/bin/lib/context_budget.rb +43 -6
  13. package/bin/lib/skill_census.rb +839 -0
  14. package/bin/plastic +8 -0
  15. package/bin/plastic-skill-census +114 -0
  16. package/bin/test +24 -4
  17. package/bin/verify-change +345 -0
  18. package/config_asks.yml +4 -4
  19. package/deprecations.yml +1 -1
  20. package/{skills/agent-advisor/references → docs/help}/advisor-protocol.md +19 -24
  21. package/{skills/auto/references → docs/help}/agent-architecture.md +16 -14
  22. package/docs/help/completion-and-done.md +53 -0
  23. package/docs/help/human-report-contract.md +152 -0
  24. package/{skills/conventions/references → docs/help}/knowledge-graph.md +9 -0
  25. package/{skills/conventions/references → docs/help}/locks-and-worktrees.md +11 -13
  26. package/{skills/conventions/references → docs/help}/maintenance-and-revisions.md +1 -1
  27. package/{skills/conventions/references → docs/help}/roadmaps.md +5 -4
  28. package/{skills/tutorial/references → docs/help}/track-1-guided.md +28 -47
  29. package/{skills/tutorial/references → docs/help}/track-2-auto.md +8 -8
  30. package/{skills/tutorial/references → docs/help}/track-3-projects-and-roadmaps.md +24 -17
  31. package/hooks/call-budget +4 -0
  32. package/hooks/hooks.json +24 -0
  33. package/hooks/message-display +55 -2
  34. package/hooks/session-start +5 -1
  35. package/hooks/statusline +32 -27
  36. package/hooks/stop +5 -0
  37. package/package.json +5 -3
  38. package/scripts/append-ledger +2 -1
  39. package/scripts/dashboard.rb +267 -16
  40. package/scripts/day-summary +2 -1
  41. package/scripts/doctor.rb +680 -39
  42. package/scripts/end-intent +378 -56
  43. package/scripts/exec-worktree +5 -5
  44. package/scripts/file-session-intent +2 -1
  45. package/scripts/graph-measure +249 -0
  46. package/scripts/hook-call-budget +222 -0
  47. package/scripts/hook-capture +24 -123
  48. package/scripts/hook-close +2 -1
  49. package/scripts/hook-message-display +7 -0
  50. package/scripts/hook-record +24 -16
  51. package/scripts/hook-savepoint +27 -3
  52. package/scripts/hook-session-start +359 -321
  53. package/scripts/hook-stop +58 -0
  54. package/scripts/index-projection +74 -0
  55. package/scripts/insight-append +17 -4
  56. package/scripts/install.rb +9 -7
  57. package/scripts/lib/action_graph_shim.rb +279 -0
  58. package/scripts/lib/active_delivery.rb +105 -0
  59. package/scripts/lib/agent_models.rb +63 -25
  60. package/scripts/lib/arm.rb +74 -91
  61. package/scripts/lib/atomic_write.rb +31 -0
  62. package/scripts/lib/backup.rb +65 -0
  63. package/scripts/lib/cli/command.rb +92 -0
  64. package/scripts/lib/cli/commands/auto.rb +18 -0
  65. package/scripts/lib/cli/commands/auto_brief.rb +44 -0
  66. package/scripts/lib/cli/commands/auto_lock.rb +111 -0
  67. package/scripts/lib/cli/commands/auto_report.rb +50 -0
  68. package/scripts/lib/cli/commands/auto_take.rb +68 -0
  69. package/scripts/lib/cli/commands/backup.rb +43 -0
  70. package/scripts/lib/cli/commands/checkout.rb +25 -0
  71. package/scripts/lib/cli/commands/continue.rb +66 -0
  72. package/scripts/lib/cli/commands/doctor.rb +81 -0
  73. package/scripts/lib/cli/commands/feedback.rb +40 -0
  74. package/scripts/lib/cli/commands/help.rb +69 -0
  75. package/scripts/lib/cli/commands/hook.rb +32 -0
  76. package/scripts/lib/cli/commands/index.rb +23 -0
  77. package/scripts/lib/cli/commands/install.rb +21 -0
  78. package/scripts/lib/cli/commands/installer_verb.rb +37 -0
  79. package/scripts/lib/cli/commands/intent.rb +19 -0
  80. package/scripts/lib/cli/commands/intent_answer.rb +37 -0
  81. package/scripts/lib/cli/commands/intent_command.rb +58 -0
  82. package/scripts/lib/cli/commands/intent_end.rb +75 -0
  83. package/scripts/lib/cli/commands/intent_new.rb +62 -0
  84. package/scripts/lib/cli/commands/intent_note.rb +43 -0
  85. package/scripts/lib/cli/commands/intent_rule.rb +36 -0
  86. package/scripts/lib/cli/commands/intent_show.rb +32 -0
  87. package/scripts/lib/cli/commands/intent_spec.rb +44 -0
  88. package/scripts/lib/cli/commands/intent_step.rb +79 -0
  89. package/scripts/lib/cli/commands/intent_verify.rb +26 -0
  90. package/scripts/lib/cli/commands/migrate.rb +16 -0
  91. package/scripts/lib/cli/commands/migrate_stores.rb +31 -0
  92. package/scripts/lib/cli/commands/next.rb +54 -0
  93. package/scripts/lib/cli/commands/project.rb +19 -0
  94. package/scripts/lib/cli/commands/project_links.rb +46 -0
  95. package/scripts/lib/cli/commands/project_list.rb +20 -0
  96. package/scripts/lib/cli/commands/project_new.rb +95 -0
  97. package/scripts/lib/cli/commands/query.rb +31 -0
  98. package/scripts/lib/cli/commands/render.rb +35 -0
  99. package/scripts/lib/cli/commands/roadmap.rb +19 -0
  100. package/scripts/lib/cli/commands/roadmap_check.rb +54 -0
  101. package/scripts/lib/cli/commands/roadmap_log.rb +54 -0
  102. package/scripts/lib/cli/commands/roadmap_migrate.rb +53 -0
  103. package/scripts/lib/cli/commands/roadmap_next.rb +77 -0
  104. package/scripts/lib/cli/commands/roadmap_show.rb +65 -0
  105. package/scripts/lib/cli/commands/rollback.rb +20 -0
  106. package/scripts/lib/cli/commands/search.rb +60 -0
  107. package/scripts/lib/cli/commands/session.rb +18 -0
  108. package/scripts/lib/cli/commands/session_commit.rb +42 -0
  109. package/scripts/lib/cli/commands/session_handoff.rb +34 -0
  110. package/scripts/lib/cli/commands/session_summary.rb +35 -0
  111. package/scripts/lib/cli/commands/status.rb +68 -0
  112. package/scripts/lib/cli/commands/subcommand_list.rb +36 -0
  113. package/scripts/lib/cli/commands/sync.rb +55 -0
  114. package/scripts/lib/cli/commands/uninstall.rb +20 -0
  115. package/scripts/lib/cli/commands/update.rb +20 -0
  116. package/scripts/lib/cli/commands/version.rb +53 -0
  117. package/scripts/lib/cli/frontier.rb +86 -0
  118. package/scripts/lib/cli/intent_progress.rb +36 -0
  119. package/scripts/lib/cli/legacy.rb +80 -0
  120. package/scripts/lib/cli/output.rb +137 -0
  121. package/scripts/lib/cli/scope.rb +134 -0
  122. package/scripts/lib/cli/table.rb +65 -0
  123. package/scripts/lib/cli.rb +94 -0
  124. package/scripts/lib/codex_adapter.rb +198 -0
  125. package/scripts/lib/compact_instructions.rb +13 -5
  126. package/scripts/lib/core_integrity.rb +71 -0
  127. package/scripts/lib/dashboard_screen.rb +40 -0
  128. package/scripts/lib/data_boundary.rb +132 -0
  129. package/scripts/lib/day_summary.rb +23 -14
  130. package/scripts/lib/doctor_core.rb +114 -38
  131. package/scripts/lib/doctor_session_ledger.rb +5 -53
  132. package/scripts/lib/engine_permissions.rb +88 -0
  133. package/scripts/lib/exec_worktree.rb +24 -21
  134. package/scripts/lib/feedback_report.rb +1 -1
  135. package/scripts/lib/graph_edges.rb +137 -0
  136. package/scripts/lib/graph_file.rb +246 -0
  137. package/scripts/lib/graph_measure.rb +645 -0
  138. package/scripts/lib/graph_measure_budget.rb +409 -0
  139. package/scripts/lib/graph_measure_cohorts.rb +487 -0
  140. package/scripts/lib/graph_measure_models.rb +413 -0
  141. package/scripts/lib/graph_measure_report.rb +532 -0
  142. package/scripts/lib/graph_tree.rb +98 -0
  143. package/scripts/lib/guarded_append.rb +155 -0
  144. package/scripts/lib/handoff.rb +40 -13
  145. package/scripts/lib/harness_adapter.rb +184 -0
  146. package/scripts/lib/hook_registry.rb +27 -3
  147. package/scripts/lib/hook_replay.rb +235 -0
  148. package/scripts/lib/index_entry.rb +62 -0
  149. package/scripts/lib/index_projection.rb +201 -0
  150. package/scripts/lib/insights.rb +1 -1
  151. package/scripts/lib/installer_core.rb +543 -71
  152. package/scripts/lib/intent_screen.rb +4 -4
  153. package/scripts/lib/intent_screen_ansi.rb +73 -12
  154. package/scripts/lib/intent_validator.rb +2 -2
  155. package/scripts/lib/lock.rb +10 -11
  156. package/scripts/lib/message_display.rb +350 -54
  157. package/scripts/lib/meter_watch.rb +185 -0
  158. package/scripts/lib/node_file.rb +234 -0
  159. package/scripts/lib/node_ids.rb +99 -0
  160. package/scripts/lib/node_input.rb +921 -0
  161. package/scripts/lib/node_input_compatibility.rb +62 -0
  162. package/scripts/lib/node_ledger.rb +386 -0
  163. package/scripts/lib/node_progress.rb +153 -0
  164. package/scripts/lib/node_return.rb +204 -0
  165. package/scripts/lib/node_worktree.rb +337 -0
  166. package/scripts/lib/outcome_report.rb +440 -0
  167. package/scripts/lib/preflight.rb +4 -6
  168. package/scripts/lib/project_config.rb +46 -0
  169. package/scripts/lib/project_validator.rb +3 -2
  170. package/scripts/lib/qmd_sync.rb +8 -7
  171. package/scripts/lib/ready_set.rb +462 -0
  172. package/scripts/lib/reference_archive.rb +45 -0
  173. package/scripts/lib/release_guard.rb +18 -0
  174. package/scripts/lib/report_screen.rb +1371 -47
  175. package/scripts/lib/rlm/corpus.rb +13 -0
  176. package/scripts/lib/rlm/probe.rb +29 -0
  177. package/scripts/lib/rlm/query.rb +22 -0
  178. package/scripts/lib/roadmap_graph.rb +210 -0
  179. package/scripts/lib/roadmap_migration.rb +95 -0
  180. package/scripts/lib/roadmap_queue.rb +170 -12
  181. package/scripts/lib/roadmap_render.rb +150 -0
  182. package/scripts/lib/roadmap_savepoint.rb +64 -14
  183. package/scripts/lib/runner_absorb.rb +703 -0
  184. package/scripts/lib/runner_answer.rb +206 -0
  185. package/scripts/lib/runner_core.rb +194 -0
  186. package/scripts/lib/runner_dispatch.rb +526 -0
  187. package/scripts/lib/runner_policy.rb +191 -0
  188. package/scripts/lib/runner_proposals.rb +275 -0
  189. package/scripts/lib/runner_rewind.rb +201 -0
  190. package/scripts/lib/runner_sweep.rb +231 -0
  191. package/scripts/lib/runner_until_empty.rb +252 -0
  192. package/scripts/lib/runner_watch.rb +389 -0
  193. package/scripts/lib/savepoint.rb +141 -19
  194. package/scripts/lib/scaffold_intent.rb +6 -3
  195. package/scripts/lib/screen_paint.rb +365 -28
  196. package/scripts/lib/screens/dashboard.rb +20 -0
  197. package/scripts/lib/screens/plan.rb +18 -0
  198. package/scripts/lib/screens/roadmap.rb +15 -0
  199. package/scripts/lib/search_index.rb +55 -0
  200. package/scripts/lib/session_close.rb +30 -28
  201. package/scripts/lib/session_git.rb +67 -19
  202. package/scripts/lib/session_ledger.rb +48 -4
  203. package/scripts/lib/session_usage.rb +190 -0
  204. package/scripts/lib/sqlite.rb +22 -0
  205. package/scripts/lib/stop_gate.rb +95 -0
  206. package/scripts/lib/store_discovery.rb +7 -6
  207. package/scripts/lib/store_layout.rb +54 -0
  208. package/scripts/lib/store_provisioning.rb +2 -1
  209. package/scripts/lib/store_sync.rb +85 -0
  210. package/scripts/lib/stores_move.rb +93 -0
  211. package/scripts/lib/untouched_scaffold.rb +51 -0
  212. package/scripts/lib/verify_intent.rb +36 -8
  213. package/scripts/lib/version_number.rb +48 -0
  214. package/scripts/lib/work_graph.rb +59 -0
  215. package/scripts/lib/work_graph_validator.rb +201 -0
  216. package/scripts/lib/worktree.rb +27 -32
  217. package/scripts/lib/worktree_sweep.rb +6 -5
  218. package/scripts/link-suggest +2 -1
  219. package/scripts/meter-watch +57 -0
  220. package/scripts/migrate-to-global +1 -1
  221. package/scripts/new-intent +4 -13
  222. package/scripts/node-input +92 -0
  223. package/scripts/node-run +225 -0
  224. package/scripts/node-transition +291 -0
  225. package/scripts/outcome-report +74 -0
  226. package/scripts/plastic-lock +65 -60
  227. package/scripts/project-links +6 -21
  228. package/scripts/promote-session-item +3 -2
  229. package/scripts/read-config +53 -9
  230. package/scripts/ready-set +126 -0
  231. package/scripts/release-check +123 -0
  232. package/scripts/report-screen +177 -16
  233. package/scripts/roadmap-graph +125 -0
  234. package/scripts/roadmap-savepoint +7 -0
  235. package/scripts/rollback.rb +5 -1
  236. package/scripts/runner +581 -0
  237. package/scripts/savepoint-note +11 -9
  238. package/scripts/session-commit +2 -1
  239. package/scripts/session-usage +56 -0
  240. package/scripts/skill-lint +115 -6
  241. package/scripts/spawn-preamble +2 -2
  242. package/scripts/update.rb +31 -4
  243. package/scripts/validate-work-graph +39 -0
  244. package/scripts/verify-intent +3 -2
  245. package/scripts/write-handoff +2 -1
  246. package/templates/agents.md +7 -7
  247. package/templates/config.yml +16 -9
  248. package/templates/dashboard-screen.md +22 -0
  249. package/templates/display-fixture.md +21 -0
  250. package/templates/graph.md +16 -0
  251. package/templates/index.md +1 -1
  252. package/templates/intent-screen.md +1 -1
  253. package/templates/node-decision.md +11 -0
  254. package/templates/node-research.md +13 -0
  255. package/templates/node-verify.md +13 -0
  256. package/templates/node-work.md +22 -0
  257. package/templates/outcome.md +8 -3
  258. package/templates/project.yml +1 -1
  259. package/templates/render.css +10 -0
  260. package/templates/report-plan.md +15 -0
  261. package/templates/report-roadmap-delivered.md +10 -0
  262. package/templates/report-roadmap-plan.md +9 -0
  263. package/templates/report-roadmap-state.md +9 -0
  264. package/templates/report-state.md +1 -1
  265. package/templates/roadmap.md +13 -0
  266. package/bin/plastic.js +0 -70
  267. package/scripts/lib/bridge.rb +0 -116
  268. package/skills/agent-advisor/SKILL.md +0 -92
  269. package/skills/auto/SKILL.md +0 -296
  270. package/skills/auto/evals/evals.json +0 -255
  271. package/skills/auto/references/end-tail.md +0 -66
  272. package/skills/auto/references/human-report-contract.md +0 -78
  273. package/skills/conventions/SKILL.md +0 -29
  274. package/skills/conventions/references/completion-and-done.md +0 -43
  275. package/skills/dashboard/SKILL.md +0 -169
  276. package/skills/dashboard/evals/evals.json +0 -38
  277. package/skills/dashboard/references/classification.md +0 -22
  278. package/skills/dashboard/templates/dashboard-global.md +0 -20
  279. package/skills/dashboard/templates/dashboard-project.md +0 -19
  280. package/skills/direct/SKILL.md +0 -66
  281. package/skills/direct/references/request-signals.md +0 -59
  282. package/skills/doctor/SKILL.md +0 -299
  283. package/skills/doctor/report.md +0 -102
  284. package/skills/feedback/SKILL.md +0 -98
  285. package/skills/feedback/references/transport-and-privacy.md +0 -65
  286. package/skills/feedback/report.md +0 -36
  287. package/skills/install/SKILL.md +0 -217
  288. package/skills/intent-continuing/SKILL.md +0 -154
  289. package/skills/intent-continuing/references/board-fill.md +0 -43
  290. package/skills/intent-continuing/references/boarding-matrix.md +0 -34
  291. package/skills/intent-continuing/references/context-management.md +0 -28
  292. package/skills/intent-continuing/references/liveness-ranking.md +0 -57
  293. package/skills/intent-creating/SKILL.md +0 -164
  294. package/skills/intent-creating/evals/evals.json +0 -72
  295. package/skills/intent-creating/references/lifecycle.md +0 -81
  296. package/skills/intent-creating/references/wikilinks.md +0 -8
  297. package/skills/intent-ending/SKILL.md +0 -176
  298. package/skills/intent-ending/evals/evals.json +0 -74
  299. package/skills/intent-executing/SKILL.md +0 -170
  300. package/skills/intent-executing/evals/evals.json +0 -66
  301. package/skills/intent-executing/implementer-prompt.md +0 -42
  302. package/skills/intent-executing/spec-reviewer-prompt.md +0 -27
  303. package/skills/intent-speccing/SKILL.md +0 -130
  304. package/skills/intent-speccing/evals/evals.json +0 -126
  305. package/skills/intent-speccing/references/design-principles.md +0 -44
  306. package/skills/intent-speccing/references/per-section-fill-rules.md +0 -92
  307. package/skills/intent-speccing/references/self-verify-checklist.md +0 -37
  308. package/skills/project-creating/SKILL.md +0 -162
  309. package/skills/project-creating/references/hubs-projects.md +0 -55
  310. package/skills/project-creating/references/project-scaffolding.md +0 -97
  311. package/skills/releasing/SKILL.md +0 -337
  312. package/skills/releasing/references/deprecations.md +0 -60
  313. package/skills/releasing/references/promotion-and-tagging.md +0 -66
  314. package/skills/releasing/references/release-lines.md +0 -105
  315. package/skills/roadmap/SKILL.md +0 -64
  316. package/skills/roadmap/references/file-format.md +0 -124
  317. package/skills/roadmap/references/operations.md +0 -112
  318. package/skills/rollback/SKILL.md +0 -91
  319. package/skills/tutorial/SKILL.md +0 -65
  320. package/skills/tutorial/evals/evals.json +0 -186
  321. package/skills/uninstall/SKILL.md +0 -75
  322. package/skills/update/SKILL.md +0 -126
  323. /package/{skills/auto/references → docs/help}/agent-report-contract.md +0 -0
  324. /package/{skills/intent-executing → docs/help}/code-quality-reviewer-prompt.md +0 -0
  325. /package/{skills/conventions/references → docs/help}/lifecycle-and-savepoints.md +0 -0
  326. /package/{skills/intent-executing → docs/help}/plan-reviewer-prompt.md +0 -0
@@ -4,6 +4,7 @@ description: |
4
4
  Use for the Exec stage in auto mode: commit the plan's tests red, implement
5
5
  the actions, check off the checklist, and drive the test suite green.
6
6
  model: sonnet
7
+ effort: medium
7
8
  ---
8
9
 
9
10
  You are the Plastic Executor. You own the Exec stage of the What->Why->How->Exec cycle.
@@ -20,7 +21,11 @@ valid lifecycle artifacts. Honor it as your live state; do not re-derive or cont
20
21
  any other change.
21
22
  2. **Implement the actions** - make the code changes for each action in order, inside the
22
23
  worktree the preamble names.
23
- 3. **Track progress** - check off `checklist.md` items as they complete.
24
+ 3. **Tick with the commit** - commit after each logical unit of work, and in the same step
25
+ tick the checklist item that unit lands: mark its box `[x]` and move the line to
26
+ `## Completed`, then append the savepoint `Commit` line
27
+ (`scripts/savepoint-note <intent_dir> --kind Commit --text "<sha> <what it proves>"`). A
28
+ commit without its tick is incomplete.
24
29
  4. **Record insights** - capture durable discoveries and report them in the `insights:` field;
25
30
  persist each to `## Insights` via the `insight-append` helper
26
31
  (`scripts/insight-append <intent_dir> <text> --stage Exec --author "plastic-executor (autonomous)"`),
@@ -33,7 +38,8 @@ valid lifecycle artifacts. Honor it as your live state; do not re-derive or cont
33
38
  real `ACTION_N.md` with its failure-mode matrix, pasted in by the lead. Execute the action
34
39
  files in order.
35
40
  2. Write the matrix's tests; commit red.
36
- 3. Work one action at a time, preferring safe, non-destructive routes.
41
+ 3. Work one action at a time, ticking its checklist item in the same commit that lands it
42
+ (box marked, line moved); prefer safe, non-destructive routes.
37
43
  4. Run the full suite, iterate to zero failures and zero errors; commit green.
38
44
  5. Produce (output handoff): the code changes, a checked-off `checklist.md`, and `## Insights`.
39
45
  6. Report (see `## Completion Report`); the lead applies the risk rule and may dispatch a
@@ -42,11 +48,12 @@ valid lifecycle artifacts. Honor it as your live state; do not re-derive or cont
42
48
  ## Completion Report
43
49
 
44
50
  END your turn with a structured completion report as your final message, per the spawn
45
- preamble's `REPORT_CONTRACT` and `skills/auto/references/agent-report-contract.md`. Do not
51
+ preamble's `REPORT_CONTRACT` and `plastic help agent-report-contract`. Do not
46
52
  finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written,
47
53
  verification, checklist deltas, deviations, blockers, insights) plus the executor payload:
48
54
 
49
- - Actions implemented this turn, mapped to checklist items checked off (checked / total)
55
+ - Actions implemented this turn, mapped to checklist items checked off (checked / total);
56
+ checked / total must equal the items whose commits exist
50
57
  - A summary of the code changed (files and the shape of the change)
51
58
  - Test result: the red commit's failing count, then the full-suite command and its pass / fail
52
59
  counts
@@ -59,3 +66,7 @@ verification, checklist deltas, deviations, blockers, insights) plus the executo
59
66
  - Safe-by-default: rename instead of drop, additive migrations, backups before destructive steps
60
67
  - One action at a time; do not batch unrelated changes into one step
61
68
  - Do not claim done until the full suite is green; show the final summary
69
+ - Every test, file, and symbol you name comes from the same concept family: graph engineering,
70
+ the Plastic concepts coined on top of it, and the software and AI engineering concepts those
71
+ rest on; a name from outside that stack is refused, and a gap is a design finding to raise,
72
+ not a word to coin
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: plastic-node-research
3
+ description: |
4
+ Dispatched for a research node by Plastic's node-graph runner. Given the
5
+ node input path the dispatch line names, research the question it names by
6
+ reading the repository, and reply with the YAML return the dispatch line
7
+ names. Read-only: no Bash, no edit. Never spawned outside a runner
8
+ dispatch.
9
+ tools:
10
+ - Read
11
+ - Glob
12
+ - Grep
13
+ model: sonnet
14
+ effort: medium
15
+ ---
16
+
17
+ You are one node in Plastic's node-graph runner: one node input in, one YAML return out, no diff.
18
+
19
+ Read the node input the dispatch line names; it is your whole input. Research the question it names
20
+ by reading the repository, never by running it. This role carries no `Bash`, because Claude
21
+ Code's `tools:` field grants or withholds a whole tool name, never a command pattern, and a shell
22
+ is a write whatever command it runs. `Read`, `Glob`, and `Grep` are enough to read every file the
23
+ node input points at.
24
+
25
+ A research node produces no diff. Put short discoveries in `findings`. When the node input declares
26
+ `report:`, put the complete Markdown report in the return's `report` field. The runner writes that
27
+ declared intent resource after validation; you never edit it or any project file yourself.
28
+
29
+ End your turn with exactly one YAML document, the return the dispatch line names, nothing else
30
+ around it.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: plastic-node-verify
3
+ description: |
4
+ Dispatched for a verify node by Plastic's node-graph runner. Given the
5
+ node input path the dispatch line names, check the work it names by reading
6
+ the repository, and reply with the YAML return the dispatch line names.
7
+ Read-only: no Bash, no edit. Never spawned outside a runner dispatch.
8
+ tools:
9
+ - Read
10
+ - Glob
11
+ - Grep
12
+ model: opus
13
+ effort: medium
14
+ ---
15
+
16
+ You are one node in Plastic's node-graph runner: one node input in, one YAML return out, no diff.
17
+
18
+ Read the node input the dispatch line names; it is your whole input. Verify what it asks you to
19
+ verify by reading the repository, never by running it. This role carries no `Bash`, because
20
+ Claude Code's `tools:` field grants or withholds a whole tool name, never a command pattern, and
21
+ a shell is a write whatever command it runs. `Read`, `Glob`, and `Grep` are enough to read every
22
+ file the node input points at.
23
+
24
+ A verify node produces no diff. If verifying the work would require changing a file, that is not
25
+ this role's job: say so in your return instead of reaching for a tool that could make the change.
26
+
27
+ End your turn with exactly one YAML document, the return the dispatch line names, nothing else
28
+ around it.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: plastic-node-work
3
+ description: |
4
+ Dispatched for a work node by Plastic's node-graph runner. Given the node input
5
+ path the dispatch line names, make the node's code changes inside the node
6
+ worktree, commit them there, and reply with the YAML return the dispatch
7
+ line names. Never spawned outside a runner dispatch.
8
+ tools:
9
+ - Read
10
+ - Write
11
+ - Edit
12
+ - Bash
13
+ - Glob
14
+ - Grep
15
+ model: sonnet
16
+ effort: medium
17
+ ---
18
+
19
+ You are one node in Plastic's node-graph runner: one node input in, your files and your commit and
20
+ one YAML return out.
21
+
22
+ Read the node input the dispatch line names; it is your whole input. Make the changes it asks for,
23
+ inside the worktree it names, and commit them there. Touch no file outside the node input's `files:`
24
+ list, write to no other node's worktree, and write no ledger line yourself: the runner's own
25
+ gates read your commit and your return, never your word.
26
+
27
+ This `tools:` allowlist is a guardrail on tool names, not a sandbox on what `Bash` can do once
28
+ granted. A shell can read, write, and reach the network the same as any of the other tools here,
29
+ so `ruby -e File.write(...)` or a stray `curl` walks straight through it. The diff-scope check at
30
+ `done` is the real backstop for what your commit is allowed to touch, not this list.
31
+
32
+ End your turn with exactly one YAML document, the return the dispatch line names, nothing else
33
+ around it.
@@ -1,15 +1,14 @@
1
1
  ---
2
- name: plastic-advisor
2
+ name: plastic-primary-advisor
3
3
  description: |
4
- The real advisor: expensive, consultation-only, dispatched deliberately by
5
- the user or main session for the hardest reasoning, never by the auto
6
- pipeline. State an EFFORT line in the brief (low, medium, high, xhigh, or max) and
7
- the shape you need: a verdict plus the biggest risk for one bounded
4
+ The Primary Advisor: consultation-only, dispatched deliberately by
5
+ the user or main session for normal expensive reasoning, never by the auto
6
+ pipeline. State the shape you need: a verdict plus the biggest risk for one bounded
8
7
  decision; a stepped plan plus a risk map for a plan or plan review; rival
9
8
  approaches and kill criteria for architecture, one-way doors, or deadlocks. Model is set by config
10
- (agents.models.claude.plastic-advisor); fable is the shipped default.
9
+ (agents.models.claude.plastic-primary-advisor); fable is the shipped default.
11
10
  model: fable
12
- effort: xhigh
11
+ effort: medium
13
12
  ---
14
13
 
15
14
  You are the advisor, consulted for expensive reasoning per the shipped Advisor
@@ -17,8 +16,7 @@ Protocol, whatever model is running you today. The caller pays premium rates
17
16
  for this consultation, so every sentence you return must earn its cost.
18
17
 
19
18
  **Your world is the brief.** The caller sends a natural-prose briefing that should
20
- cover: the goal and the decision the answer feeds, an EFFORT line (low, medium,
21
- high, xhigh, or max), the answer shape it needs, up to three questions, the
19
+ cover: the goal and the decision the answer feeds, the answer shape it needs, up to three questions, the
22
20
  caller's own candidate answer, evidence labeled verified/inferred/assumed, what
23
21
  was tried and how it failed, hard constraints, one-way doors, and the expected
24
22
  answer shape. Do not explore the repository or the web; if a load-bearing piece
@@ -1,16 +1,14 @@
1
1
  ---
2
- name: plastic-faux-advisor
2
+ name: plastic-secondary-advisor
3
3
  description: |
4
- The imitation advisor: an ordinary model carrying the frontier reasoning
5
- discipline below, so it reasons like the real advisor at a fraction of the
6
- cost. Consultation-only, dispatched deliberately by the user or main
7
- session, never by the auto pipeline. State an EFFORT line in the brief (low, medium, high, xhigh, or max) and
8
- the shape you need: a verdict plus the biggest risk for one bounded
4
+ The Secondary Advisor: an explicit escalation for difficult reasoning.
5
+ Consultation-only, dispatched deliberately by the user or main
6
+ session, never by the auto pipeline. State the shape you need: a verdict plus the biggest risk for one bounded
9
7
  decision; a stepped plan plus a risk map for a plan or plan review; rival
10
- approaches and kill criteria for architecture, one-way doors, or deadlocks. Model is set by config (agents.models.claude.plastic-faux-advisor);
11
- opus is the shipped default and the cheaper of the two advisors.
12
- model: opus
13
- effort: max
8
+ approaches and kill criteria for architecture, one-way doors, or deadlocks. Model is set by config (agents.models.claude.plastic-secondary-advisor);
9
+ fable is the shipped default.
10
+ model: fable
11
+ effort: high
14
12
  ---
15
13
 
16
14
  You are the advisor, consulted for expensive reasoning per the shipped Advisor
@@ -20,8 +18,7 @@ Operating Manual below is how you reach that bar: read it as your own working
20
18
  method, not as background reading.
21
19
 
22
20
  **Your world is the brief.** The caller sends a natural-prose briefing that should
23
- cover: the goal and the decision the answer feeds, an EFFORT line (low, medium,
24
- high, xhigh, or max), the answer shape it needs, up to three questions, the
21
+ cover: the goal and the decision the answer feeds, the answer shape it needs, up to three questions, the
25
22
  caller's own candidate answer, evidence labeled verified/inferred/assumed, what
26
23
  was tried and how it failed, hard constraints, one-way doors, and the expected
27
24
  answer shape. Do not explore the repository or the web; if a load-bearing piece
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1085.4" height="350" viewBox="0 0 1085.4 350" role="img" aria-labelledby="title"><title id="title">Plastic</title><g fill="#347FC4"><g id="letter-P" transform="translate(18.00,18.68) scale(0.84)"><g transform="translate(-5,-5)"><path d="M0 0 C0.81 -0 1.61 -0.01 2.44 -0.01 C3.32 -0.01 4.2 -0.01 5.11 -0.01 C5.58 -0.01 5.58 -0.01 7.95 -0.02 C11.11 -0.03 14.26 -0.03 17.41 -0.03 C19.67 -0.03 21.93 -0.04 24.19 -0.04 C30.33 -0.06 36.48 -0.06 42.63 -0.07 C46.47 -0.07 50.31 -0.08 54.16 -0.08 C64.81 -0.09 75.47 -0.1 86.13 -0.11 C86.81 -0.11 87.49 -0.11 88.19 -0.11 C88.88 -0.11 89.56 -0.11 90.27 -0.11 C91.65 -0.11 93.04 -0.11 94.42 -0.11 C95.11 -0.11 95.8 -0.11 96.5 -0.11 C107.61 -0.11 118.71 -0.13 129.82 -0.15 C141.24 -0.18 152.66 -0.19 164.08 -0.19 C170.48 -0.19 176.89 -0.2 183.29 -0.22 C189.33 -0.23 195.36 -0.23 201.4 -0.23 C203.6 -0.23 205.8 -0.23 208.01 -0.24 C242.76 -0.39 273.29 9.29 298.55 33.8 C299.66 34.87 300.81 35.92 301.96 36.97 C324.35 57.72 334.1 90.93 336.16 120.37 C336.96 148.5 327.4 175.09 308.93 196.13 C308.2 196.96 307.47 197.79 306.72 198.65 C286.57 220.04 257.39 231.3 228.39 232.41 C223.39 232.53 218.4 232.55 213.4 232.54 C210.1 232.54 206.8 232.55 203.49 232.57 C195.31 232.61 187.12 232.62 178.93 232.64 C171.97 232.65 165.01 232.67 158.05 232.71 C154.82 232.72 151.59 232.72 148.36 232.72 C133.52 232.76 121.73 233.94 108.93 242.13 C108.28 242.54 107.64 242.94 106.97 243.36 C98.4 249.67 92.92 261.89 90.93 272.13 C90.45 277.51 90.51 282.92 90.52 288.32 C90.53 291.03 90.51 293.75 90.49 296.47 C90.45 303.21 90.44 309.95 90.43 316.69 C90.42 322.4 90.39 328.12 90.35 333.83 C90.34 336.5 90.34 339.16 90.35 341.83 C90.34 343.47 90.33 345.12 90.32 346.76 C90.32 347.49 90.33 348.23 90.34 348.98 C90.26 355.58 88.59 361.88 84.12 366.94 C83.66 367.49 83.2 368.03 82.73 368.59 C77.07 373.46 71.53 373.73 64.35 373.53 C58.37 372.83 55.27 370.81 51.38 366.35 C47.77 360.73 47.53 354.94 47.31 348.47 C47.27 347.51 47.24 346.56 47.2 345.57 C46.77 333.28 46.78 320.99 46.81 308.69 C46.81 308.08 46.81 308.08 46.81 304.98 C46.83 296.69 46.87 288.41 46.93 280.13 C46.94 279.67 46.94 279.67 46.95 277.36 C47.19 245.48 47.19 245.48 51.93 231.13 C52.17 230.42 52.4 229.71 52.64 228.97 C56.37 218.1 61.7 209.03 68.93 200.13 C69.66 199.23 70.4 198.32 71.15 197.39 C88.32 177.4 110.96 166.95 136.93 164.13 C144.12 163.64 151.33 163.71 158.53 163.73 C160.55 163.73 162.57 163.73 164.59 163.72 C168.78 163.72 172.97 163.73 177.16 163.74 C182.51 163.76 187.87 163.75 193.22 163.73 C197.37 163.72 201.52 163.72 205.67 163.73 C207.65 163.73 209.62 163.73 211.6 163.72 C214.35 163.71 217.11 163.73 219.86 163.74 C220.67 163.74 221.47 163.73 222.3 163.72 C228.49 163.79 234.26 164.8 239.08 169 C239.35 169.33 239.35 169.33 240.74 171.01 C246.83 177.47 254.61 180.73 263.46 181.2 C273.24 180.92 281.65 177.66 288.93 171.13 C290.92 168.22 290.92 168.22 292.68 165.07 C292.98 164.55 292.98 164.55 294.48 161.91 C298.17 154.85 297.89 145.38 296.47 137.62 C295.79 135.64 294.98 133.95 293.93 132.13 C293.51 131.37 293.08 130.62 292.64 129.83 C287.88 122.04 282.51 117.97 273.67 115.64 C264.89 114.01 256.69 114.46 248.93 119.13 C246.28 121.3 243.8 123.58 241.32 125.94 C235.78 131.02 230.39 134.24 222.78 134.27 C221.95 134.27 221.13 134.28 220.29 134.29 C219.4 134.29 218.5 134.29 217.58 134.29 C217.11 134.29 217.11 134.29 214.71 134.3 C212.66 134.32 210.6 134.32 208.54 134.33 C205.27 134.34 201.99 134.36 198.72 134.38 C189.41 134.45 180.1 134.5 170.79 134.53 C165.1 134.55 159.4 134.59 153.7 134.63 C151.55 134.65 149.39 134.66 147.23 134.66 C110.04 134.72 81.52 144.74 54.37 170.57 C53.57 171.41 52.76 172.26 51.93 173.13 C51.29 173.78 50.65 174.43 49.99 175.09 C29.97 196.09 18.59 225.67 18.66 254.54 C18.66 255.08 18.66 255.08 18.64 257.78 C18.63 260.08 18.63 262.38 18.63 264.68 C18.62 268.33 18.61 271.97 18.59 275.62 C18.53 285.97 18.5 296.33 18.48 306.69 C18.46 313.04 18.43 319.4 18.39 325.75 C18.38 328.17 18.37 330.58 18.37 332.99 C18.37 336.36 18.35 339.74 18.33 343.11 C18.34 344.1 18.34 345.08 18.35 346.1 C18.27 353.72 16.95 359.98 12.81 366.44 C8.05 370.89 2.92 373.29 -3.63 373.63 C-10.23 373.28 -15.06 370.56 -19.44 365.69 C-23.54 360.76 -24.32 356.24 -24.34 349.9 C-24.34 349.54 -24.34 349.54 -24.35 347.73 C-24.36 345.33 -24.36 342.93 -24.36 340.53 C-24.36 338.81 -24.37 337.09 -24.38 335.37 C-24.4 330.7 -24.4 326.02 -24.4 321.35 C-24.4 318.43 -24.41 315.51 -24.41 312.58 C-24.43 302.39 -24.44 292.19 -24.44 282 C-24.44 272.5 -24.46 263 -24.49 253.51 C-24.52 245.35 -24.53 237.19 -24.53 229.03 C-24.53 224.16 -24.53 219.29 -24.55 214.42 C-24.57 209.84 -24.57 205.25 -24.56 200.67 C-24.55 198.99 -24.56 197.31 -24.57 195.64 C-24.64 185.75 -24.51 178.46 -17.88 170.51 C-12.43 165.9 -6.45 162.33 -0.26 158.82 C17.07 148.8 31.04 135.2 42.87 119.19 C58.79 97.77 78.34 83.76 105.17 79.63 C120.92 77.53 136.93 77.97 152.78 78 C156.26 78.01 159.74 78 163.21 78 C166.58 77.99 169.94 78 173.31 78 C173.92 78 173.92 78 177.05 77.99 C195.74 78.04 195.74 78.04 204.02 84.85 C211.21 90.65 216.95 93.76 226.35 93.41 C235.96 92.37 243.65 88.51 249.74 80.94 C254.32 73.89 255.59 65.95 254.51 57.71 C253.62 53.75 252.09 50.53 249.93 47.13 C249.66 46.7 249.66 46.7 248.31 44.51 C242.06 38.26 234.19 34.28 225.34 34.07 C215.8 34.5 208.36 38.27 201.5 44.8 C197.27 48.39 193.22 48.42 187.84 48.4 C187.43 48.41 187.43 48.41 185.37 48.42 C183.61 48.43 181.84 48.43 180.07 48.44 C177.25 48.44 174.43 48.46 171.61 48.48 C163.59 48.53 155.56 48.56 147.54 48.59 C142.63 48.6 137.72 48.63 132.8 48.67 C130.95 48.68 129.1 48.69 127.25 48.69 C117.13 48.69 107.24 49.15 97.2 50.49 C96.31 50.61 95.42 50.73 94.51 50.85 C71.23 54.25 49.38 65.44 33.42 82.73 C31.93 84.13 31.93 84.13 29.93 84.13 C29.25 85.46 28.59 86.79 27.93 88.13 C26.57 89.87 25.17 91.57 23.74 93.26 C20.79 96.81 18.01 100.37 15.43 104.19 C8.45 114.35 -0.99 126.02 -13.07 130.13 C-16.82 130.69 -16.82 130.69 -20.07 130.13 C-22.51 128 -23.88 126.24 -24.44 123 C-24.59 120.32 -24.61 117.66 -24.59 114.98 C-24.59 113.96 -24.6 112.94 -24.61 111.88 C-24.62 108.51 -24.61 105.14 -24.6 101.77 C-24.6 99.42 -24.61 97.08 -24.61 94.73 C-24.62 89.81 -24.61 84.88 -24.59 79.96 C-24.57 73.66 -24.58 67.37 -24.6 61.07 C-24.62 56.22 -24.61 51.37 -24.6 46.52 C-24.6 44.2 -24.6 41.88 -24.61 39.56 C-24.62 36.31 -24.61 33.06 -24.59 29.8 C-24.59 28.85 -24.6 27.9 -24.61 26.92 C-24.51 19.28 -22.64 13.27 -17.76 7.32 C-12.34 2.91 -7.09 0.01 0 0 Z " transform="translate(29.0679349899292,4.868572235107422)"/></g></g><g id="letter-l" transform="translate(340.40,91.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C1.26 -0.02 2.52 -0.04 3.81 -0.06 C15.45 -0.05 15.45 -0.05 20 4.44 C22.76 8.32 22.28 12.75 22.26 17.31 C22.26 17.77 22.26 17.77 22.27 20.06 C22.28 23.1 22.28 26.15 22.27 29.19 C22.28 31.37 22.28 33.55 22.29 35.73 C22.3 41.66 22.3 47.58 22.3 53.51 C22.3 58.45 22.31 63.39 22.31 68.34 C22.32 80.66 22.32 92.99 22.31 105.31 C22.31 115.35 22.32 125.39 22.34 135.43 C22.36 147.09 22.37 158.75 22.36 170.4 C22.36 176.58 22.36 182.75 22.38 188.92 C22.39 194.72 22.39 200.52 22.38 206.32 C22.37 208.46 22.38 210.59 22.38 212.72 C22.39 215.62 22.39 218.53 22.37 221.44 C22.38 222.28 22.39 223.13 22.4 224 C22.35 228.65 21.99 231.65 19 235.44 C15.15 238.47 12.17 238.82 7.34 238.84 C6.71 238.84 6.71 238.84 3.5 238.85 C2.18 238.84 0.86 238.82 -0.5 238.81 C-1.82 238.82 -3.14 238.84 -4.5 238.85 C-5.77 238.84 -7.04 238.84 -8.34 238.84 C-9.5 238.83 -10.66 238.83 -11.85 238.83 C-16.31 238.28 -18.83 236.92 -21.62 233.39 C-23.52 229.33 -23.42 225.87 -23.38 221.44 C-23.38 220.99 -23.38 220.99 -23.4 218.69 C-23.41 215.65 -23.4 212.61 -23.39 209.57 C-23.39 207.39 -23.4 205.21 -23.4 203.03 C-23.42 197.11 -23.41 191.19 -23.4 185.27 C-23.4 179.07 -23.4 172.88 -23.41 166.69 C-23.41 155.62 -23.4 144.55 -23.39 133.49 C-23.37 123.45 -23.38 113.42 -23.39 103.39 C-23.41 91.74 -23.41 80.08 -23.4 68.43 C-23.4 62.26 -23.4 56.09 -23.41 49.93 C-23.42 44.13 -23.41 38.33 -23.39 32.53 C-23.39 30.4 -23.39 28.27 -23.4 26.14 C-23.41 23.24 -23.4 20.34 -23.38 17.43 C-23.39 16.59 -23.39 15.74 -23.4 14.87 C-23.35 10.24 -23.02 7.18 -20 3.44 C-13.64 -0.64 -7.31 -0.04 0 0 Z " transform="translate(28,4.5625)"/></g></g><g id="letter-a" transform="translate(399.40,159.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C-0.1 -1.03 -0.21 -2.06 -0.31 -3.12 C0.1 -8.2 1.46 -9.46 5 -13 C9.29 -15.14 14.94 -14.31 19.69 -14.35 C21.1 -14.37 22.51 -14.39 23.92 -14.43 C25.95 -14.49 27.98 -14.51 30.02 -14.52 C31.24 -14.54 32.46 -14.56 33.71 -14.58 C37.97 -13.83 39.35 -12.36 42 -9 C43.85 -5.21 44.25 -2.17 44.26 2.02 C44.27 3.23 44.27 4.44 44.28 5.68 C44.28 7 44.28 8.32 44.27 9.68 C44.28 11.08 44.28 12.49 44.29 13.9 C44.3 17.72 44.3 21.54 44.3 25.35 C44.3 28.54 44.31 31.74 44.31 34.93 C44.32 42.46 44.32 49.99 44.32 57.52 C44.31 65.28 44.32 73.04 44.34 80.8 C44.36 87.47 44.37 94.13 44.36 100.8 C44.36 104.78 44.36 108.76 44.38 112.74 C44.39 116.49 44.39 120.23 44.38 123.98 C44.37 126 44.38 128.02 44.4 130.05 C44.36 136.43 44.25 141.42 41 147 C35.59 152.07 29.22 151.22 22.25 151.25 C21.18 151.27 20.1 151.29 19 151.31 C12.9 151.34 8.33 151.09 3 148 C-0.1 143.61 -0.11 140.25 0 135 C-0.79 135.58 -1.58 136.16 -2.39 136.76 C-20.55 149.9 -40.83 156.83 -63.35 153.67 C-84.97 150 -103.31 140.25 -116.56 122.44 C-131.64 99.82 -136.96 73.21 -131.87 46.33 C-130.01 38.05 -127.04 30.48 -123 23 C-122.77 22.56 -122.77 22.56 -121.6 20.33 C-110.89 1.2 -93.13 -10.18 -72.62 -16.44 C-46.77 -23.07 -20.57 -16.79 0 0 Z M-77.86 35.28 C-83.9 42.94 -88.12 52.24 -89 62 C-89.07 62.77 -89.14 63.55 -89.21 64.34 C-89.79 77.95 -85.59 90.73 -77 101.19 C-70.85 107.74 -62.04 113.41 -52.88 114.18 C-38.45 114.57 -27.27 113.93 -16 104 C-15.39 103.49 -14.79 102.97 -14.16 102.45 C-4.44 93.57 -0.95 81.89 0.28 69.09 C0.75 55.6 -3.99 43.08 -13.12 33.19 C-22.59 24.31 -34.53 20.43 -47.36 20.75 C-59.57 21.91 -69.41 26.41 -77.86 35.28 Z " transform="translate(138,24)"/></g></g><g id="letter-s" transform="translate(590.40,159.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C12.6 -0.52 26.49 1.98 37.97 7.16 C38.73 7.49 39.48 7.82 40.27 8.16 C44.1 9.95 47.46 11.64 49.97 15.16 C51.63 21.45 50.25 24.84 47.28 30.28 C46.93 30.97 46.58 31.66 46.21 32.37 C40.95 42.44 40.95 42.44 36.23 44.15 C31.94 44.16 28.76 42.92 24.84 41.28 C17.78 38.44 12.24 36.96 4.59 36.91 C3.85 36.89 3.11 36.87 2.34 36.84 C-2.53 36.81 -5.81 37.48 -10.03 40.16 C-12.85 43.41 -13.95 45.36 -14.41 49.66 C-14.03 53.18 -13.53 55.94 -12.03 59.16 C-10.25 60.19 -10.25 60.19 -8.03 61.16 C-7.3 61.49 -6.57 61.82 -5.82 62.16 C0.15 64.73 6.17 66.93 12.32 69.01 C29.86 74.95 47.06 81.06 56.09 98.53 C56.77 100.05 57.39 101.6 57.97 103.16 C58.33 104.03 58.69 104.91 59.06 105.81 C62.11 117.06 61.33 131.81 55.97 142.16 C47.72 156 35.62 165.7 20.02 169.88 C13.73 171.46 7.47 172.88 0.97 173.16 C0.12 173.21 -0.73 173.26 -1.61 173.31 C-21.4 173.96 -44.91 168.36 -60.03 155.16 C-61.5 152.22 -61.38 150.46 -61.03 147.16 C-59.71 143.94 -58.02 140.98 -56.28 137.97 C-55.84 137.16 -55.39 136.36 -54.94 135.53 C-52.69 131.54 -50.94 128.69 -47.03 126.16 C-40.38 125.18 -34.72 128.69 -29.04 131.66 C-21.28 135.52 -13.91 136.44 -5.34 136.59 C-4.55 136.62 -3.75 136.64 -2.93 136.66 C2.82 136.64 7.16 135.36 11.97 132.16 C16.27 127.75 16.43 123.72 16.5 117.84 C15.8 114.32 14.46 112.71 11.97 110.16 C4.96 105.48 -3.14 103.03 -11.09 100.47 C-22.68 96.71 -33.95 92.54 -43.03 84.16 C-43.66 83.6 -44.3 83.05 -44.95 82.48 C-53.15 74.89 -56.64 66.19 -57.25 55.2 C-57.69 40.46 -54.99 28.9 -44.77 17.68 C-32.56 5.95 -16.56 1.27 0 0 Z " transform="translate(66.03125,4.84375)"/></g></g><g id="letter-t" transform="translate(726.40,116.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C2.08 -0 4.16 -0.04 6.24 -0.08 C7.57 -0.08 8.91 -0.09 10.24 -0.09 C11.45 -0.1 12.66 -0.11 13.9 -0.12 C18.02 0.48 20.12 1.68 23.29 4.37 C25.98 8.69 25.54 13.46 25.48 18.39 C25.48 19.25 25.48 20.11 25.47 20.99 C25.46 23.72 25.44 26.45 25.41 29.18 C25.4 31.04 25.39 32.9 25.38 34.75 C25.36 39.29 25.33 43.83 25.29 48.37 C26.23 48.35 27.17 48.33 28.14 48.31 C31.66 48.24 35.17 48.19 38.68 48.15 C40.2 48.13 41.72 48.1 43.24 48.07 C45.42 48.02 47.61 48 49.8 47.98 C50.45 47.97 50.45 47.97 53.78 47.92 C57.88 48.45 59.44 49.43 62.29 52.37 C65.29 56.89 64.69 62.01 64.72 67.25 C64.74 67.74 64.74 67.74 64.82 70.22 C64.88 78.31 64.88 78.31 61.95 82 C57.78 85.72 54.62 85.49 49.21 85.47 C48.87 85.47 48.87 85.47 47.14 85.46 C44.96 85.46 42.78 85.45 40.6 85.43 C39.12 85.43 37.64 85.42 36.16 85.42 C32.53 85.41 28.91 85.39 25.29 85.37 C25.35 95.57 25.42 105.76 25.52 115.96 C25.57 120.7 25.61 125.43 25.63 130.17 C25.66 134.74 25.7 139.31 25.75 143.88 C25.77 145.62 25.78 147.36 25.78 149.11 C25.79 151.55 25.82 153.99 25.85 156.44 C25.85 157.15 25.85 157.87 25.85 158.61 C25.95 163.92 27.18 168.01 30.75 172.02 C35.08 175.45 38 176.55 43.44 176.36 C44.21 176.35 44.99 176.33 45.79 176.31 C47.41 176.27 49.03 176.22 50.64 176.16 C55.35 176.07 58.53 176.19 62.29 179.37 C65.17 184.05 64.65 188.91 64.66 194.25 C64.69 195.23 64.71 196.21 64.74 197.22 C64.76 203.08 64.43 206.85 60.29 211.37 C50.07 218.42 31.33 216.27 19.6 214.31 C6.49 211.34 -4.42 204.64 -11.71 193.25 C-19.69 178.63 -20.16 163.34 -20.01 147.09 C-20 145.3 -20 143.5 -19.99 141.71 C-19.98 137.05 -19.95 132.39 -19.92 127.72 C-19.89 122.94 -19.88 118.16 -19.86 113.38 C-19.83 104.04 -19.78 94.71 -19.71 85.37 C-20 85.38 -20 85.38 -21.45 85.45 C-24.08 85.55 -26.71 85.62 -29.34 85.68 C-30.24 85.72 -31.15 85.77 -32.08 85.81 C-36.57 85.89 -39.72 85.89 -43.3 82.98 C-47.72 78.21 -46.97 73.87 -47.03 67.62 C-47.06 66.63 -47.08 65.64 -47.11 64.62 C-47.17 58.53 -46.83 54.97 -42.71 50.37 C-39.64 48.32 -38.78 48.1 -35.26 47.96 C-34.42 47.92 -33.57 47.88 -32.7 47.84 C-31.82 47.81 -30.93 47.78 -30.03 47.75 C-29.58 47.73 -29.58 47.73 -27.32 47.63 C-25.12 47.53 -22.92 47.45 -20.71 47.37 C-20.7 46.22 -20.7 45.07 -20.69 43.89 C-20.65 39.6 -20.58 35.32 -20.51 31.04 C-20.48 29.19 -20.46 27.34 -20.44 25.49 C-20.42 22.82 -20.37 20.15 -20.32 17.49 C-20.32 16.67 -20.32 15.84 -20.32 15 C-20.19 9.68 -19.25 6.58 -15.71 2.37 C-10.91 -0.83 -5.65 -0 0 0 Z " transform="translate(51.714111328125,4.62939453125)"/></g></g><g id="letter-i" transform="translate(853.40,164.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C2.09 -0.02 4.18 -0.06 6.27 -0.11 C7.61 -0.12 8.94 -0.12 10.28 -0.13 C10.89 -0.14 10.89 -0.14 13.96 -0.17 C18.07 0.39 20.18 1.66 23.36 4.3 C25.51 7.6 25.61 10.34 25.62 14.23 C25.63 15.45 25.64 16.66 25.64 17.92 C25.64 19.26 25.64 20.6 25.64 21.95 C25.64 23.37 25.65 24.78 25.65 26.2 C25.66 30.05 25.67 33.9 25.66 37.75 C25.66 40.97 25.67 44.18 25.67 47.4 C25.68 54.99 25.68 62.57 25.68 70.16 C25.67 77.98 25.68 85.81 25.7 93.63 C25.72 100.35 25.73 107.07 25.72 113.79 C25.72 117.8 25.73 121.81 25.74 125.82 C25.75 129.6 25.75 133.37 25.74 137.15 C25.73 138.53 25.74 139.91 25.75 141.3 C25.83 156.18 25.83 156.18 20.36 162.67 C16.28 165.99 11.8 165.45 6.8 165.42 C5.99 165.42 5.18 165.41 4.34 165.41 C-12.96 165.25 -12.96 165.25 -17.64 161.3 C-19.81 157.92 -19.9 155.12 -19.91 151.16 C-19.92 149.9 -19.93 148.64 -19.94 147.34 C-19.94 145.95 -19.94 144.56 -19.95 143.17 C-19.95 141.7 -19.96 140.23 -19.97 138.76 C-19.99 134.77 -20 130.79 -20.01 126.8 C-20.01 124.31 -20.02 121.81 -20.02 119.32 C-20.05 110.63 -20.06 101.93 -20.06 93.24 C-20.07 85.13 -20.1 77.03 -20.14 68.93 C-20.17 61.97 -20.19 55.01 -20.19 48.05 C-20.19 43.9 -20.2 39.74 -20.23 35.59 C-20.25 31.68 -20.26 27.77 -20.24 23.86 C-20.24 22.43 -20.25 21 -20.26 19.56 C-20.39 7.39 -20.39 7.39 -17.23 3.46 C-12.05 -0.87 -6.45 0.04 0 0 Z " transform="translate(24.638671875,4.704833984375)"/></g></g><g id="letter-dot" transform="translate(850.40,91.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C6.13 3.79 11.16 8.07 13.03 15.26 C13.8 22.46 14.37 30.18 10.42 36.55 C4.79 43.48 -1.31 47.44 -10.22 48.54 C-17.9 48.87 -24.34 46.9 -30.28 42.01 C-36.42 36.06 -38.36 31.94 -38.53 23.38 C-38.45 15.47 -36.7 10.27 -31.32 4.49 C-22.52 -3.7 -10.78 -5.59 0 0 Z " transform="translate(42.96875,7.7421875)"/></g></g><g id="letter-c" transform="translate(913.40,159.00) scale(1)"><g transform="translate(-5,-5)"><path d="M0 0 C4.05 3.78 6.19 6.98 6.62 12.62 C3.75 21.24 -6.46 31.29 -14.62 35.38 C-17.47 35.91 -18.88 36.09 -21.62 35.38 C-24.21 33.56 -26.55 31.54 -28.95 29.48 C-39.71 21.02 -52.37 19.48 -65.62 20.38 C-75.89 22.13 -86.02 26.24 -92.41 34.75 C-94.29 37.56 -95.99 40.42 -97.62 43.38 C-98.06 44.15 -98.5 44.93 -98.96 45.73 C-103.83 56.29 -103.73 72.74 -100 83.69 C-99.26 85.28 -98.47 86.84 -97.62 88.38 C-97.19 89.24 -96.75 90.1 -96.3 91 C-90.75 101.21 -82.28 107.75 -71.15 111.12 C-57.02 114.35 -42.97 112.01 -30.62 104.38 C-29.04 103.15 -27.48 101.9 -25.94 100.62 C-22.16 97.61 -19.64 95.92 -14.62 96.38 C-6.92 100.29 0.64 108.28 5.38 115.38 C5.81 119.81 5.86 122.33 4 126.38 C-9.87 142.22 -32.04 150.79 -52.62 152.38 C-78.46 153.96 -101.64 147.43 -121.88 131.12 C-137.91 116.19 -147.11 95.54 -148.07 73.79 C-148.44 60.67 -148.5 47.76 -143.62 35.38 C-143.32 34.49 -143.02 33.61 -142.71 32.7 C-135.55 12.77 -120.64 -2.65 -101.8 -11.89 C-68.79 -27.32 -28.22 -23.25 0 0 Z " transform="translate(152.625,25.625)"/></g></g></g></svg>
package/bin/crap ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../tools/crap"
3
+
4
+ exit Crap::CLI.new(ARGV, root: Dir.pwd).run
@@ -8,6 +8,7 @@ require "open3"
8
8
  require "rbconfig"
9
9
  require "tmpdir"
10
10
  require "yaml"
11
+ require_relative "../../scripts/lib/store_layout"
11
12
 
12
13
  # ContextBudget (intent 313): the measurement behind Plastic's two ruled context
13
14
  # numbers. Intent 296 ruled the core block under 8,192 bytes and the whole
@@ -36,7 +37,16 @@ module ContextBudget
36
37
  # Not a ruling: a 313 ratchet over the measured 16,537, so
37
38
  # the second-largest per-boot cost cannot regrow unwatched.
38
39
  # Lower it as the catalog shrinks; never raise it.
39
- CEILINGS = { core: 8_192, boot: 15_000, boot_plus_catalog: 17_500 }.freeze
40
+ # standing every byte a session carries before it does any work:
41
+ # the core block, the boot injection, the skill catalog
42
+ # and the agent catalog. Intent 363 ratchet, not a
43
+ # ruling. It is the measured number plus a little, and it
44
+ # only ever moves down, once per skill family removed.
45
+ # Family 5 (intent 372: auto, direct, agent-advisor,
46
+ # releasing) freed 1,503 bytes, taking it to 3,788.
47
+ # Intent 381 retired a deprecation notice whose removal
48
+ # had already shipped, freeing 180, taking it to 3,608.
49
+ CEILINGS = { core: 8_192, boot: 15_000, boot_plus_catalog: 17_500, standing: 3_608 }.freeze
40
50
 
41
51
  # The doctrine working set (boot + _decision-tables.md + the median skill body)
42
52
  # is reported against this target, never enforced: its median term steps by
@@ -87,7 +97,7 @@ module ContextBudget
87
97
 
88
98
  # What the harness loads at boot: every skill's name and description VALUES,
89
99
  # YAML-parsed. Not the raw frontmatter (that would count the keys and the
90
- # operational fields), and not a line regex (that would truncate a folded
100
+ # operational fields), and not a line regex (that would truncate a flattened
91
101
  # description at its first line).
92
102
  def self.skill_catalog_bytes(repo:)
93
103
  skill_paths(repo: repo).sum do |path|
@@ -97,6 +107,27 @@ module ContextBudget
97
107
  end
98
108
  end
99
109
 
110
+ def self.agent_paths(repo:)
111
+ Dir.glob(File.join(repo, "agents", "*.md")).sort
112
+ end
113
+
114
+ # The agent catalog is the skill catalog's twin: the harness lists every agent's
115
+ # name and description to the top-level session, whether or not one is ever
116
+ # dispatched. Same YAML read as skill_catalog_bytes, for the same reason.
117
+ def self.agent_catalog_bytes(repo:)
118
+ agent_paths(repo: repo).sum { |path| agent_entry(path).bytesize }
119
+ end
120
+
121
+ def self.agent_catalog_text(repo:)
122
+ agent_paths(repo: repo).map { |path| agent_entry(path) }.join
123
+ end
124
+
125
+ def self.agent_entry(path)
126
+ frontmatter, = split_skill(File.read(path))
127
+ data = YAML.safe_load(frontmatter.to_s, permitted_classes: [Date, Time], aliases: true) || {}
128
+ "#{data["name"]}#{data["description"]}"
129
+ end
130
+
100
131
  def self.skill_body_sizes(repo:)
101
132
  skill_paths(repo: repo).map do |path|
102
133
  _frontmatter, body = split_skill(File.read(path))
@@ -144,7 +175,7 @@ module ContextBudget
144
175
  write_project_store(plastic_home: plastic_home, project_dir: project_dir, today: today)
145
176
 
146
177
  Fixture.new(home: home, plastic_home: plastic_home,
147
- index: File.join(plastic_home, "INDEX.md"), project_dir: project_dir)
178
+ index: File.join(Plastic::StoreLayout.global_root(plastic_home), "INDEX.md"), project_dir: project_dir)
148
179
  end
149
180
 
150
181
  def self.install_into(home:, plastic_home:, repo:)
@@ -162,12 +193,12 @@ module ContextBudget
162
193
  # packaging_no_store_ids_test.rb flags any shipped literal carrying five or
163
194
  # more digit-leading tokens, and bin/ is inside package.json's files set.
164
195
  def self.write_global_store(plastic_home:, today:)
165
- store = File.join(plastic_home, "store")
196
+ store = Plastic::StoreLayout.global_store(plastic_home)
166
197
  write_intent(store, "0001", "a-global-intent-in-flight", 1, today)
167
198
  write_intent(store, "0002", "a-parked-global-intent", FIXTURE_STALE_DAYS, today)
168
199
  write_intent(store, "0003", "another-parked-global-intent", FIXTURE_STALE_DAYS, today)
169
200
 
170
- File.write(File.join(plastic_home, "INDEX.md"), <<~MD)
201
+ File.write(File.join(Plastic::StoreLayout.global_root(plastic_home), "INDEX.md"), <<~MD)
171
202
  # Index
172
203
 
173
204
  ## Active
@@ -180,7 +211,7 @@ module ContextBudget
180
211
  end
181
212
 
182
213
  def self.write_project_store(plastic_home:, project_dir:, today:)
183
- project_root = File.join(plastic_home, "projects", "fixture")
214
+ project_root = Plastic::StoreLayout.project_root(plastic_home, "fixture")
184
215
  store = File.join(project_root, "store")
185
216
  write_intent(store, "0100", "a-project-intent-in-flight", 1, today)
186
217
  write_intent(store, "0101", "a-parked-project-intent", FIXTURE_STALE_DAYS, today)
@@ -345,11 +376,13 @@ def self.build_rows(fixture:, repo:, context:)
345
376
  core = measure(File.read(File.join(fixture.plastic_home, "PLASTIC.md")))
346
377
  boot_measurement = measure(context)
347
378
  catalog = measure(skill_catalog_text(repo: repo))
379
+ agents = measure(agent_catalog_text(repo: repo))
348
380
  bodies = skill_body_sizes(repo: repo)
349
381
  median_body = median(bodies)
350
382
  fragment = fragment_bytes(repo: repo)
351
383
 
352
384
  combined = boot_measurement.bytes + catalog.bytes
385
+ standing = core.bytes + boot_measurement.bytes + catalog.bytes + agents.bytes
353
386
  working_set = boot_measurement.bytes + fragment + median_body
354
387
 
355
388
  # tokens(w) is a word count of a real body, so the rows that are arithmetic
@@ -361,8 +394,12 @@ def self.build_rows(fixture:, repo:, context:)
361
394
  tokens: boot_measurement.tokens, ceiling: CEILINGS[:boot]),
362
395
  row(:skill_catalog, "skill catalog (#{bodies.length} name + description values)",
363
396
  catalog.bytes, tokens: catalog.tokens),
397
+ row(:agent_catalog, "agent catalog (#{agent_paths(repo: repo).length} name + description values)",
398
+ agents.bytes, tokens: agents.tokens),
364
399
  row(:boot_plus_catalog, "boot injection + skill catalog", combined,
365
400
  ceiling: CEILINGS[:boot_plus_catalog]),
401
+ row(:standing, "standing surface (core + boot + both catalogs)", standing,
402
+ ceiling: CEILINGS[:standing]),
366
403
  row(:median_skill_body, "median skill body (of #{bodies.length})", median_body),
367
404
  row(:working_set, "doctrine working set (boot + fragment + median body)",
368
405
  working_set, target: WORKING_SET_TARGET),