@zalom/plastic 2.0.0-alpha.26 → 2.0.0-alpha.28

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 (224) hide show
  1. package/PLASTIC.md +13 -139
  2. package/README.md +337 -133
  3. package/agents/plastic-enforcer.md +12 -12
  4. package/agents/plastic-executor.md +2 -1
  5. package/agents/plastic-node-research.md +4 -2
  6. package/agents/plastic-node-verify.md +1 -0
  7. package/agents/plastic-node-work.md +1 -0
  8. package/agents/{plastic-advisor.md → plastic-primary-advisor.md} +6 -8
  9. package/agents/{plastic-faux-advisor.md → plastic-secondary-advisor.md} +9 -12
  10. package/bin/crap +4 -0
  11. package/bin/lib/context_budget.rb +35 -1
  12. package/bin/lib/skill_census.rb +839 -0
  13. package/bin/plastic +6 -0
  14. package/bin/plastic-skill-census +114 -0
  15. package/bin/verify-change +345 -0
  16. package/config_asks.yml +4 -4
  17. package/deprecations.yml +1 -1
  18. package/{skills/agent-advisor/references → docs/help}/advisor-protocol.md +19 -24
  19. package/{skills/auto/references → docs/help}/agent-architecture.md +7 -7
  20. package/{skills/conventions/references → docs/help}/completion-and-done.md +1 -1
  21. package/{skills/auto/references → docs/help}/human-report-contract.md +17 -19
  22. package/{skills/conventions/references → docs/help}/roadmaps.md +2 -2
  23. package/{skills/tutorial/references → docs/help}/track-1-guided.md +8 -8
  24. package/{skills/tutorial/references → docs/help}/track-2-auto.md +5 -5
  25. package/{skills/tutorial/references → docs/help}/track-3-projects-and-roadmaps.md +24 -17
  26. package/package.json +3 -2
  27. package/scripts/append-ledger +2 -1
  28. package/scripts/dashboard.rb +10 -9
  29. package/scripts/day-summary +2 -1
  30. package/scripts/doctor.rb +57 -49
  31. package/scripts/end-intent +2 -8
  32. package/scripts/file-session-intent +2 -1
  33. package/scripts/hook-capture +4 -3
  34. package/scripts/hook-close +2 -1
  35. package/scripts/hook-record +3 -2
  36. package/scripts/hook-savepoint +3 -2
  37. package/scripts/hook-session-start +5 -4
  38. package/scripts/hook-stop +2 -1
  39. package/scripts/insight-append +1 -2
  40. package/scripts/install.rb +7 -5
  41. package/scripts/lib/action_graph_shim.rb +3 -1
  42. package/scripts/lib/active_delivery.rb +1 -1
  43. package/scripts/lib/agent_models.rb +44 -26
  44. package/scripts/lib/arm.rb +2 -1
  45. package/scripts/lib/backup.rb +63 -0
  46. package/scripts/lib/cli/command.rb +85 -0
  47. package/scripts/lib/cli/commands/auto.rb +18 -0
  48. package/scripts/lib/cli/commands/auto_brief.rb +44 -0
  49. package/scripts/lib/cli/commands/auto_lock.rb +60 -0
  50. package/scripts/lib/cli/commands/auto_report.rb +50 -0
  51. package/scripts/lib/cli/commands/auto_take.rb +25 -0
  52. package/scripts/lib/cli/commands/backup.rb +43 -0
  53. package/scripts/lib/cli/commands/checkout.rb +25 -0
  54. package/scripts/lib/cli/commands/continue.rb +66 -0
  55. package/scripts/lib/cli/commands/doctor.rb +20 -0
  56. package/scripts/lib/cli/commands/feedback.rb +40 -0
  57. package/scripts/lib/cli/commands/help.rb +69 -0
  58. package/scripts/lib/cli/commands/hook.rb +32 -0
  59. package/scripts/lib/cli/commands/index.rb +23 -0
  60. package/scripts/lib/cli/commands/install.rb +21 -0
  61. package/scripts/lib/cli/commands/installer_verb.rb +37 -0
  62. package/scripts/lib/cli/commands/intent.rb +19 -0
  63. package/scripts/lib/cli/commands/intent_answer.rb +37 -0
  64. package/scripts/lib/cli/commands/intent_command.rb +53 -0
  65. package/scripts/lib/cli/commands/intent_end.rb +61 -0
  66. package/scripts/lib/cli/commands/intent_new.rb +62 -0
  67. package/scripts/lib/cli/commands/intent_note.rb +43 -0
  68. package/scripts/lib/cli/commands/intent_rule.rb +36 -0
  69. package/scripts/lib/cli/commands/intent_show.rb +25 -0
  70. package/scripts/lib/cli/commands/intent_spec.rb +44 -0
  71. package/scripts/lib/cli/commands/intent_step.rb +43 -0
  72. package/scripts/lib/cli/commands/intent_verify.rb +26 -0
  73. package/scripts/lib/cli/commands/migrate.rb +16 -0
  74. package/scripts/lib/cli/commands/migrate_stores.rb +31 -0
  75. package/scripts/lib/cli/commands/next.rb +49 -0
  76. package/scripts/lib/cli/commands/project.rb +19 -0
  77. package/scripts/lib/cli/commands/project_links.rb +42 -0
  78. package/scripts/lib/cli/commands/project_list.rb +20 -0
  79. package/scripts/lib/cli/commands/project_new.rb +72 -0
  80. package/scripts/lib/cli/commands/query.rb +31 -0
  81. package/scripts/lib/cli/commands/render.rb +25 -0
  82. package/scripts/lib/cli/commands/roadmap.rb +19 -0
  83. package/scripts/lib/cli/commands/roadmap_check.rb +44 -0
  84. package/scripts/lib/cli/commands/roadmap_log.rb +54 -0
  85. package/scripts/lib/cli/commands/roadmap_next.rb +34 -0
  86. package/scripts/lib/cli/commands/roadmap_show.rb +45 -0
  87. package/scripts/lib/cli/commands/rollback.rb +20 -0
  88. package/scripts/lib/cli/commands/search.rb +60 -0
  89. package/scripts/lib/cli/commands/session.rb +18 -0
  90. package/scripts/lib/cli/commands/session_commit.rb +42 -0
  91. package/scripts/lib/cli/commands/session_handoff.rb +34 -0
  92. package/scripts/lib/cli/commands/session_summary.rb +35 -0
  93. package/scripts/lib/cli/commands/status.rb +68 -0
  94. package/scripts/lib/cli/commands/subcommand_list.rb +36 -0
  95. package/scripts/lib/cli/commands/sync.rb +46 -0
  96. package/scripts/lib/cli/commands/uninstall.rb +20 -0
  97. package/scripts/lib/cli/commands/update.rb +20 -0
  98. package/scripts/lib/cli/commands/version.rb +53 -0
  99. package/scripts/lib/cli/frontier.rb +84 -0
  100. package/scripts/lib/cli/legacy.rb +50 -0
  101. package/scripts/lib/cli/output.rb +102 -0
  102. package/scripts/lib/cli/scope.rb +127 -0
  103. package/scripts/lib/cli/table.rb +64 -0
  104. package/scripts/lib/cli.rb +94 -0
  105. package/scripts/lib/codex_adapter.rb +5 -4
  106. package/scripts/lib/compact_instructions.rb +8 -0
  107. package/scripts/lib/day_summary.rb +4 -3
  108. package/scripts/lib/doctor_core.rb +7 -32
  109. package/scripts/lib/doctor_session_ledger.rb +2 -1
  110. package/scripts/lib/feedback_report.rb +1 -1
  111. package/scripts/lib/graph_measure_models.rb +4 -2
  112. package/scripts/lib/index_entry.rb +9 -0
  113. package/scripts/lib/installer_core.rb +175 -56
  114. package/scripts/lib/intent_screen.rb +3 -3
  115. package/scripts/lib/lock.rb +2 -2
  116. package/scripts/lib/node_file.rb +22 -2
  117. package/scripts/lib/node_input.rb +11 -6
  118. package/scripts/lib/node_return.rb +8 -3
  119. package/scripts/lib/preflight.rb +2 -4
  120. package/scripts/lib/project_config.rb +2 -1
  121. package/scripts/lib/project_validator.rb +3 -2
  122. package/scripts/lib/qmd_sync.rb +8 -7
  123. package/scripts/lib/reference_archive.rb +45 -0
  124. package/scripts/lib/release_guard.rb +2 -0
  125. package/scripts/lib/report_screen.rb +4 -3
  126. package/scripts/lib/rlm/corpus.rb +13 -0
  127. package/scripts/lib/rlm/probe.rb +29 -0
  128. package/scripts/lib/rlm/query.rb +22 -0
  129. package/scripts/lib/roadmap_queue.rb +2 -2
  130. package/scripts/lib/roadmap_savepoint.rb +1 -1
  131. package/scripts/lib/runner_absorb.rb +59 -2
  132. package/scripts/lib/runner_dispatch.rb +12 -8
  133. package/scripts/lib/runner_policy.rb +28 -10
  134. package/scripts/lib/search_index.rb +55 -0
  135. package/scripts/lib/session_git.rb +4 -3
  136. package/scripts/lib/sqlite.rb +22 -0
  137. package/scripts/lib/store_discovery.rb +7 -6
  138. package/scripts/lib/store_layout.rb +54 -0
  139. package/scripts/lib/store_provisioning.rb +2 -1
  140. package/scripts/lib/store_sync.rb +85 -0
  141. package/scripts/lib/stores_move.rb +93 -0
  142. package/scripts/lib/verify_intent.rb +2 -7
  143. package/scripts/lib/version_number.rb +48 -0
  144. package/scripts/lib/work_graph.rb +59 -0
  145. package/scripts/lib/worktree.rb +3 -8
  146. package/scripts/lib/worktree_sweep.rb +3 -2
  147. package/scripts/link-suggest +2 -1
  148. package/scripts/migrate-to-global +1 -1
  149. package/scripts/new-intent +3 -12
  150. package/scripts/node-run +2 -1
  151. package/scripts/plastic-lock +3 -2
  152. package/scripts/promote-session-item +3 -2
  153. package/scripts/read-config +44 -6
  154. package/scripts/release-check +10 -5
  155. package/scripts/report-screen +1 -1
  156. package/scripts/session-commit +2 -1
  157. package/scripts/spawn-preamble +2 -2
  158. package/scripts/update.rb +25 -4
  159. package/scripts/write-handoff +2 -1
  160. package/templates/agents.md +6 -6
  161. package/templates/config.yml +13 -6
  162. package/templates/node-research.md +4 -2
  163. package/templates/render.css +10 -0
  164. package/bin/plastic.js +0 -70
  165. package/skills/agent-advisor/SKILL.md +0 -92
  166. package/skills/auto/SKILL.md +0 -297
  167. package/skills/auto/evals/evals.json +0 -255
  168. package/skills/auto/references/end-tail.md +0 -64
  169. package/skills/conventions/SKILL.md +0 -29
  170. package/skills/dashboard/SKILL.md +0 -180
  171. package/skills/dashboard/evals/evals.json +0 -38
  172. package/skills/dashboard/references/classification.md +0 -22
  173. package/skills/dashboard/templates/dashboard-global.md +0 -20
  174. package/skills/dashboard/templates/dashboard-project.md +0 -19
  175. package/skills/direct/SKILL.md +0 -66
  176. package/skills/direct/references/request-signals.md +0 -59
  177. package/skills/doctor/SKILL.md +0 -305
  178. package/skills/doctor/report.md +0 -102
  179. package/skills/feedback/SKILL.md +0 -98
  180. package/skills/feedback/references/transport-and-privacy.md +0 -65
  181. package/skills/feedback/report.md +0 -36
  182. package/skills/install/SKILL.md +0 -217
  183. package/skills/intent-continuing/SKILL.md +0 -156
  184. package/skills/intent-continuing/references/board-fill.md +0 -52
  185. package/skills/intent-continuing/references/boarding-matrix.md +0 -35
  186. package/skills/intent-continuing/references/context-management.md +0 -28
  187. package/skills/intent-continuing/references/liveness-ranking.md +0 -57
  188. package/skills/intent-creating/SKILL.md +0 -89
  189. package/skills/intent-creating/evals/evals.json +0 -72
  190. package/skills/intent-creating/references/lifecycle.md +0 -81
  191. package/skills/intent-creating/references/wikilinks.md +0 -8
  192. package/skills/intent-ending/SKILL.md +0 -182
  193. package/skills/intent-ending/evals/evals.json +0 -74
  194. package/skills/intent-executing/SKILL.md +0 -87
  195. package/skills/intent-executing/evals/evals.json +0 -66
  196. package/skills/intent-executing/implementer-prompt.md +0 -47
  197. package/skills/intent-executing/spec-reviewer-prompt.md +0 -27
  198. package/skills/intent-speccing/SKILL.md +0 -136
  199. package/skills/intent-speccing/evals/evals.json +0 -126
  200. package/skills/intent-speccing/references/design-principles.md +0 -44
  201. package/skills/intent-speccing/references/per-section-fill-rules.md +0 -92
  202. package/skills/intent-speccing/references/self-verify-checklist.md +0 -37
  203. package/skills/project-creating/SKILL.md +0 -162
  204. package/skills/project-creating/references/hubs-projects.md +0 -55
  205. package/skills/project-creating/references/project-scaffolding.md +0 -97
  206. package/skills/releasing/SKILL.md +0 -376
  207. package/skills/releasing/references/deprecations.md +0 -60
  208. package/skills/releasing/references/promotion-and-tagging.md +0 -70
  209. package/skills/releasing/references/release-lines.md +0 -105
  210. package/skills/roadmap/SKILL.md +0 -90
  211. package/skills/roadmap/references/file-format.md +0 -134
  212. package/skills/roadmap/references/operations.md +0 -112
  213. package/skills/rollback/SKILL.md +0 -91
  214. package/skills/tutorial/SKILL.md +0 -66
  215. package/skills/tutorial/evals/evals.json +0 -186
  216. package/skills/uninstall/SKILL.md +0 -75
  217. package/skills/update/SKILL.md +0 -126
  218. /package/{skills/auto/references → docs/help}/agent-report-contract.md +0 -0
  219. /package/{skills/intent-executing → docs/help}/code-quality-reviewer-prompt.md +0 -0
  220. /package/{skills/conventions/references → docs/help}/knowledge-graph.md +0 -0
  221. /package/{skills/conventions/references → docs/help}/lifecycle-and-savepoints.md +0 -0
  222. /package/{skills/conventions/references → docs/help}/locks-and-worktrees.md +0 -0
  223. /package/{skills/conventions/references → docs/help}/maintenance-and-revisions.md +0 -0
  224. /package/{skills/intent-executing → docs/help}/plan-reviewer-prompt.md +0 -0
@@ -11,6 +11,7 @@ tools:
11
11
  - Glob
12
12
  - Grep
13
13
  model: sonnet
14
+ effort: medium
14
15
  ---
15
16
 
16
17
  You are one node in Plastic's node-graph runner: one node input in, one YAML return out, no diff.
@@ -21,8 +22,9 @@ Code's `tools:` field grants or withholds a whole tool name, never a command pat
21
22
  is a write whatever command it runs. `Read`, `Glob`, and `Grep` are enough to read every file the
22
23
  node input points at.
23
24
 
24
- A research node produces no diff. Put what you found in your return's `findings`, never in a code
25
- change.
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.
26
28
 
27
29
  End your turn with exactly one YAML document, the return the dispatch line names, nothing else
28
30
  around it.
@@ -10,6 +10,7 @@ tools:
10
10
  - Glob
11
11
  - Grep
12
12
  model: opus
13
+ effort: medium
13
14
  ---
14
15
 
15
16
  You are one node in Plastic's node-graph runner: one node input in, one YAML return out, no diff.
@@ -13,6 +13,7 @@ tools:
13
13
  - Glob
14
14
  - Grep
15
15
  model: sonnet
16
+ effort: medium
16
17
  ---
17
18
 
18
19
  You are one node in Plastic's node-graph runner: one node input in, your files and your commit and
@@ -1,13 +1,12 @@
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
11
  effort: medium
13
12
  ---
@@ -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
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
@@ -36,7 +36,14 @@ module ContextBudget
36
36
  # Not a ruling: a 313 ratchet over the measured 16,537, so
37
37
  # the second-largest per-boot cost cannot regrow unwatched.
38
38
  # Lower it as the catalog shrinks; never raise it.
39
- CEILINGS = { core: 8_192, boot: 15_000, boot_plus_catalog: 17_500 }.freeze
39
+ # standing every byte a session carries before it does any work:
40
+ # the core block, the boot injection, the skill catalog
41
+ # and the agent catalog. Intent 363 ratchet, not a
42
+ # ruling. It is the measured number plus a little, and it
43
+ # only ever moves down, once per skill family removed.
44
+ # Family 5 (intent 372: auto, direct, agent-advisor,
45
+ # releasing) freed 1,503 bytes, taking it to 3,788.
46
+ CEILINGS = { core: 8_192, boot: 15_000, boot_plus_catalog: 17_500, standing: 3_788 }.freeze
40
47
 
41
48
  # The doctrine working set (boot + _decision-tables.md + the median skill body)
42
49
  # is reported against this target, never enforced: its median term steps by
@@ -97,6 +104,27 @@ module ContextBudget
97
104
  end
98
105
  end
99
106
 
107
+ def self.agent_paths(repo:)
108
+ Dir.glob(File.join(repo, "agents", "*.md")).sort
109
+ end
110
+
111
+ # The agent catalog is the skill catalog's twin: the harness lists every agent's
112
+ # name and description to the top-level session, whether or not one is ever
113
+ # dispatched. Same YAML read as skill_catalog_bytes, for the same reason.
114
+ def self.agent_catalog_bytes(repo:)
115
+ agent_paths(repo: repo).sum { |path| agent_entry(path).bytesize }
116
+ end
117
+
118
+ def self.agent_catalog_text(repo:)
119
+ agent_paths(repo: repo).map { |path| agent_entry(path) }.join
120
+ end
121
+
122
+ def self.agent_entry(path)
123
+ frontmatter, = split_skill(File.read(path))
124
+ data = YAML.safe_load(frontmatter.to_s, permitted_classes: [Date, Time], aliases: true) || {}
125
+ "#{data["name"]}#{data["description"]}"
126
+ end
127
+
100
128
  def self.skill_body_sizes(repo:)
101
129
  skill_paths(repo: repo).map do |path|
102
130
  _frontmatter, body = split_skill(File.read(path))
@@ -345,11 +373,13 @@ def self.build_rows(fixture:, repo:, context:)
345
373
  core = measure(File.read(File.join(fixture.plastic_home, "PLASTIC.md")))
346
374
  boot_measurement = measure(context)
347
375
  catalog = measure(skill_catalog_text(repo: repo))
376
+ agents = measure(agent_catalog_text(repo: repo))
348
377
  bodies = skill_body_sizes(repo: repo)
349
378
  median_body = median(bodies)
350
379
  fragment = fragment_bytes(repo: repo)
351
380
 
352
381
  combined = boot_measurement.bytes + catalog.bytes
382
+ standing = core.bytes + boot_measurement.bytes + catalog.bytes + agents.bytes
353
383
  working_set = boot_measurement.bytes + fragment + median_body
354
384
 
355
385
  # tokens(w) is a word count of a real body, so the rows that are arithmetic
@@ -361,8 +391,12 @@ def self.build_rows(fixture:, repo:, context:)
361
391
  tokens: boot_measurement.tokens, ceiling: CEILINGS[:boot]),
362
392
  row(:skill_catalog, "skill catalog (#{bodies.length} name + description values)",
363
393
  catalog.bytes, tokens: catalog.tokens),
394
+ row(:agent_catalog, "agent catalog (#{agent_paths(repo: repo).length} name + description values)",
395
+ agents.bytes, tokens: agents.tokens),
364
396
  row(:boot_plus_catalog, "boot injection + skill catalog", combined,
365
397
  ceiling: CEILINGS[:boot_plus_catalog]),
398
+ row(:standing, "standing surface (core + boot + both catalogs)", standing,
399
+ ceiling: CEILINGS[:standing]),
366
400
  row(:median_skill_body, "median skill body (of #{bodies.length})", median_body),
367
401
  row(:working_set, "doctrine working set (boot + fragment + median body)",
368
402
  working_set, target: WORKING_SET_TARGET),