@zalom/plastic 2.0.0-alpha.27 → 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 (207) hide show
  1. package/PLASTIC.md +13 -139
  2. package/README.md +337 -133
  3. package/agents/plastic-enforcer.md +9 -10
  4. package/agents/plastic-executor.md +1 -1
  5. package/bin/crap +4 -0
  6. package/bin/lib/context_budget.rb +35 -1
  7. package/bin/lib/skill_census.rb +839 -0
  8. package/bin/plastic +6 -0
  9. package/bin/plastic-skill-census +114 -0
  10. package/bin/verify-change +345 -0
  11. package/deprecations.yml +1 -1
  12. package/{skills/agent-advisor/references → docs/help}/advisor-protocol.md +4 -7
  13. package/{skills/auto/references → docs/help}/agent-architecture.md +7 -7
  14. package/{skills/conventions/references → docs/help}/completion-and-done.md +1 -1
  15. package/{skills/auto/references → docs/help}/human-report-contract.md +17 -19
  16. package/{skills/conventions/references → docs/help}/roadmaps.md +2 -2
  17. package/{skills/tutorial/references → docs/help}/track-1-guided.md +8 -8
  18. package/{skills/tutorial/references → docs/help}/track-2-auto.md +5 -5
  19. package/{skills/tutorial/references → docs/help}/track-3-projects-and-roadmaps.md +24 -17
  20. package/package.json +3 -2
  21. package/scripts/append-ledger +2 -1
  22. package/scripts/dashboard.rb +10 -9
  23. package/scripts/day-summary +2 -1
  24. package/scripts/doctor.rb +48 -42
  25. package/scripts/end-intent +2 -8
  26. package/scripts/file-session-intent +2 -1
  27. package/scripts/hook-capture +4 -3
  28. package/scripts/hook-close +2 -1
  29. package/scripts/hook-record +3 -2
  30. package/scripts/hook-savepoint +3 -2
  31. package/scripts/hook-session-start +5 -4
  32. package/scripts/hook-stop +2 -1
  33. package/scripts/insight-append +1 -2
  34. package/scripts/install.rb +3 -1
  35. package/scripts/lib/active_delivery.rb +1 -1
  36. package/scripts/lib/arm.rb +2 -1
  37. package/scripts/lib/backup.rb +63 -0
  38. package/scripts/lib/cli/command.rb +85 -0
  39. package/scripts/lib/cli/commands/auto.rb +18 -0
  40. package/scripts/lib/cli/commands/auto_brief.rb +44 -0
  41. package/scripts/lib/cli/commands/auto_lock.rb +60 -0
  42. package/scripts/lib/cli/commands/auto_report.rb +50 -0
  43. package/scripts/lib/cli/commands/auto_take.rb +25 -0
  44. package/scripts/lib/cli/commands/backup.rb +43 -0
  45. package/scripts/lib/cli/commands/checkout.rb +25 -0
  46. package/scripts/lib/cli/commands/continue.rb +66 -0
  47. package/scripts/lib/cli/commands/doctor.rb +20 -0
  48. package/scripts/lib/cli/commands/feedback.rb +40 -0
  49. package/scripts/lib/cli/commands/help.rb +69 -0
  50. package/scripts/lib/cli/commands/hook.rb +32 -0
  51. package/scripts/lib/cli/commands/index.rb +23 -0
  52. package/scripts/lib/cli/commands/install.rb +21 -0
  53. package/scripts/lib/cli/commands/installer_verb.rb +37 -0
  54. package/scripts/lib/cli/commands/intent.rb +19 -0
  55. package/scripts/lib/cli/commands/intent_answer.rb +37 -0
  56. package/scripts/lib/cli/commands/intent_command.rb +53 -0
  57. package/scripts/lib/cli/commands/intent_end.rb +61 -0
  58. package/scripts/lib/cli/commands/intent_new.rb +62 -0
  59. package/scripts/lib/cli/commands/intent_note.rb +43 -0
  60. package/scripts/lib/cli/commands/intent_rule.rb +36 -0
  61. package/scripts/lib/cli/commands/intent_show.rb +25 -0
  62. package/scripts/lib/cli/commands/intent_spec.rb +44 -0
  63. package/scripts/lib/cli/commands/intent_step.rb +43 -0
  64. package/scripts/lib/cli/commands/intent_verify.rb +26 -0
  65. package/scripts/lib/cli/commands/migrate.rb +16 -0
  66. package/scripts/lib/cli/commands/migrate_stores.rb +31 -0
  67. package/scripts/lib/cli/commands/next.rb +49 -0
  68. package/scripts/lib/cli/commands/project.rb +19 -0
  69. package/scripts/lib/cli/commands/project_links.rb +42 -0
  70. package/scripts/lib/cli/commands/project_list.rb +20 -0
  71. package/scripts/lib/cli/commands/project_new.rb +72 -0
  72. package/scripts/lib/cli/commands/query.rb +31 -0
  73. package/scripts/lib/cli/commands/render.rb +25 -0
  74. package/scripts/lib/cli/commands/roadmap.rb +19 -0
  75. package/scripts/lib/cli/commands/roadmap_check.rb +44 -0
  76. package/scripts/lib/cli/commands/roadmap_log.rb +54 -0
  77. package/scripts/lib/cli/commands/roadmap_next.rb +34 -0
  78. package/scripts/lib/cli/commands/roadmap_show.rb +45 -0
  79. package/scripts/lib/cli/commands/rollback.rb +20 -0
  80. package/scripts/lib/cli/commands/search.rb +60 -0
  81. package/scripts/lib/cli/commands/session.rb +18 -0
  82. package/scripts/lib/cli/commands/session_commit.rb +42 -0
  83. package/scripts/lib/cli/commands/session_handoff.rb +34 -0
  84. package/scripts/lib/cli/commands/session_summary.rb +35 -0
  85. package/scripts/lib/cli/commands/status.rb +68 -0
  86. package/scripts/lib/cli/commands/subcommand_list.rb +36 -0
  87. package/scripts/lib/cli/commands/sync.rb +46 -0
  88. package/scripts/lib/cli/commands/uninstall.rb +20 -0
  89. package/scripts/lib/cli/commands/update.rb +20 -0
  90. package/scripts/lib/cli/commands/version.rb +53 -0
  91. package/scripts/lib/cli/frontier.rb +84 -0
  92. package/scripts/lib/cli/legacy.rb +50 -0
  93. package/scripts/lib/cli/output.rb +102 -0
  94. package/scripts/lib/cli/scope.rb +127 -0
  95. package/scripts/lib/cli/table.rb +64 -0
  96. package/scripts/lib/cli.rb +94 -0
  97. package/scripts/lib/compact_instructions.rb +8 -0
  98. package/scripts/lib/day_summary.rb +4 -3
  99. package/scripts/lib/doctor_core.rb +7 -32
  100. package/scripts/lib/doctor_session_ledger.rb +2 -1
  101. package/scripts/lib/feedback_report.rb +1 -1
  102. package/scripts/lib/graph_measure_models.rb +3 -1
  103. package/scripts/lib/index_entry.rb +9 -0
  104. package/scripts/lib/installer_core.rb +73 -19
  105. package/scripts/lib/intent_screen.rb +3 -3
  106. package/scripts/lib/lock.rb +2 -2
  107. package/scripts/lib/node_input.rb +3 -2
  108. package/scripts/lib/preflight.rb +2 -4
  109. package/scripts/lib/project_config.rb +2 -1
  110. package/scripts/lib/project_validator.rb +3 -2
  111. package/scripts/lib/qmd_sync.rb +8 -7
  112. package/scripts/lib/reference_archive.rb +45 -0
  113. package/scripts/lib/release_guard.rb +2 -0
  114. package/scripts/lib/report_screen.rb +4 -3
  115. package/scripts/lib/rlm/corpus.rb +13 -0
  116. package/scripts/lib/rlm/probe.rb +29 -0
  117. package/scripts/lib/rlm/query.rb +22 -0
  118. package/scripts/lib/roadmap_queue.rb +2 -2
  119. package/scripts/lib/roadmap_savepoint.rb +1 -1
  120. package/scripts/lib/runner_absorb.rb +3 -2
  121. package/scripts/lib/search_index.rb +55 -0
  122. package/scripts/lib/session_git.rb +4 -3
  123. package/scripts/lib/sqlite.rb +22 -0
  124. package/scripts/lib/store_discovery.rb +7 -6
  125. package/scripts/lib/store_layout.rb +54 -0
  126. package/scripts/lib/store_provisioning.rb +2 -1
  127. package/scripts/lib/store_sync.rb +85 -0
  128. package/scripts/lib/stores_move.rb +93 -0
  129. package/scripts/lib/verify_intent.rb +2 -7
  130. package/scripts/lib/version_number.rb +48 -0
  131. package/scripts/lib/work_graph.rb +59 -0
  132. package/scripts/lib/worktree.rb +3 -8
  133. package/scripts/lib/worktree_sweep.rb +3 -2
  134. package/scripts/link-suggest +2 -1
  135. package/scripts/migrate-to-global +1 -1
  136. package/scripts/new-intent +3 -12
  137. package/scripts/plastic-lock +3 -2
  138. package/scripts/promote-session-item +3 -2
  139. package/scripts/release-check +10 -5
  140. package/scripts/report-screen +1 -1
  141. package/scripts/session-commit +2 -1
  142. package/scripts/spawn-preamble +2 -2
  143. package/scripts/update.rb +25 -4
  144. package/scripts/write-handoff +2 -1
  145. package/templates/agents.md +6 -6
  146. package/templates/render.css +10 -0
  147. package/bin/plastic.js +0 -70
  148. package/skills/agent-advisor/SKILL.md +0 -84
  149. package/skills/auto/SKILL.md +0 -297
  150. package/skills/auto/evals/evals.json +0 -255
  151. package/skills/auto/references/end-tail.md +0 -64
  152. package/skills/conventions/SKILL.md +0 -29
  153. package/skills/dashboard/SKILL.md +0 -180
  154. package/skills/dashboard/evals/evals.json +0 -38
  155. package/skills/dashboard/references/classification.md +0 -22
  156. package/skills/dashboard/templates/dashboard-global.md +0 -20
  157. package/skills/dashboard/templates/dashboard-project.md +0 -19
  158. package/skills/direct/SKILL.md +0 -66
  159. package/skills/direct/references/request-signals.md +0 -59
  160. package/skills/doctor/SKILL.md +0 -305
  161. package/skills/doctor/report.md +0 -102
  162. package/skills/feedback/SKILL.md +0 -98
  163. package/skills/feedback/references/transport-and-privacy.md +0 -65
  164. package/skills/feedback/report.md +0 -36
  165. package/skills/install/SKILL.md +0 -215
  166. package/skills/intent-continuing/SKILL.md +0 -156
  167. package/skills/intent-continuing/references/board-fill.md +0 -52
  168. package/skills/intent-continuing/references/boarding-matrix.md +0 -35
  169. package/skills/intent-continuing/references/context-management.md +0 -28
  170. package/skills/intent-continuing/references/liveness-ranking.md +0 -57
  171. package/skills/intent-creating/SKILL.md +0 -89
  172. package/skills/intent-creating/evals/evals.json +0 -72
  173. package/skills/intent-creating/references/lifecycle.md +0 -81
  174. package/skills/intent-creating/references/wikilinks.md +0 -8
  175. package/skills/intent-ending/SKILL.md +0 -182
  176. package/skills/intent-ending/evals/evals.json +0 -74
  177. package/skills/intent-executing/SKILL.md +0 -87
  178. package/skills/intent-executing/evals/evals.json +0 -66
  179. package/skills/intent-executing/implementer-prompt.md +0 -47
  180. package/skills/intent-executing/spec-reviewer-prompt.md +0 -27
  181. package/skills/intent-speccing/SKILL.md +0 -136
  182. package/skills/intent-speccing/evals/evals.json +0 -126
  183. package/skills/intent-speccing/references/design-principles.md +0 -44
  184. package/skills/intent-speccing/references/per-section-fill-rules.md +0 -92
  185. package/skills/intent-speccing/references/self-verify-checklist.md +0 -37
  186. package/skills/project-creating/SKILL.md +0 -162
  187. package/skills/project-creating/references/hubs-projects.md +0 -55
  188. package/skills/project-creating/references/project-scaffolding.md +0 -97
  189. package/skills/releasing/SKILL.md +0 -376
  190. package/skills/releasing/references/deprecations.md +0 -60
  191. package/skills/releasing/references/promotion-and-tagging.md +0 -70
  192. package/skills/releasing/references/release-lines.md +0 -105
  193. package/skills/roadmap/SKILL.md +0 -90
  194. package/skills/roadmap/references/file-format.md +0 -134
  195. package/skills/roadmap/references/operations.md +0 -112
  196. package/skills/rollback/SKILL.md +0 -91
  197. package/skills/tutorial/SKILL.md +0 -66
  198. package/skills/tutorial/evals/evals.json +0 -186
  199. package/skills/uninstall/SKILL.md +0 -75
  200. package/skills/update/SKILL.md +0 -126
  201. /package/{skills/auto/references → docs/help}/agent-report-contract.md +0 -0
  202. /package/{skills/intent-executing → docs/help}/code-quality-reviewer-prompt.md +0 -0
  203. /package/{skills/conventions/references → docs/help}/knowledge-graph.md +0 -0
  204. /package/{skills/conventions/references → docs/help}/lifecycle-and-savepoints.md +0 -0
  205. /package/{skills/conventions/references → docs/help}/locks-and-worktrees.md +0 -0
  206. /package/{skills/conventions/references → docs/help}/maintenance-and-revisions.md +0 -0
  207. /package/{skills/intent-executing → docs/help}/plan-reviewer-prompt.md +0 -0
package/README.md CHANGED
@@ -1,204 +1,408 @@
1
- # Plastic
1
+ <h1 align="center">PLASTIC</h1>
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@zalom/plastic)](https://www.npmjs.com/package/@zalom/plastic)
4
- [![npm downloads](https://img.shields.io/npm/dm/@zalom/plastic)](https://www.npmjs.com/package/@zalom/plastic)
5
- [![license](https://img.shields.io/npm/l/@zalom/plastic)](LICENSE)
6
- [![CI](https://github.com/zalom/plastic/actions/workflows/test.yml/badge.svg)](https://github.com/zalom/plastic/actions/workflows/test.yml)
3
+ <p align="center">
4
+ <strong>One command that turns an intent into a durable, linked record of decisions, plans, delivery and outcomes</strong>
5
+ </p>
7
6
 
8
- ## Intent-based idea development system for AI-assisted work.
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@zalom/plastic"><img src="https://img.shields.io/npm/v/@zalom/plastic/alpha" alt="npm version"></a>
9
+ <a href="https://www.npmjs.com/package/@zalom/plastic"><img src="https://img.shields.io/npm/dm/@zalom/plastic" alt="npm downloads"></a>
10
+ <a href="https://github.com/zalom/plastic/actions/workflows/test.yml"><img src="https://github.com/zalom/plastic/actions/workflows/test.yml/badge.svg" alt="CI"></a>
11
+ <a href="https://github.com/zalom/plastic/releases"><img src="https://img.shields.io/github/v/release/zalom/plastic?include_prereleases" alt="Release"></a>
12
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/@zalom/plastic" alt="License: MIT"></a>
13
+ </p>
9
14
 
10
- > Plastic is a system that turns an intent, a vague goal or idea into a durable, linked record of discovery, decisions, delivery, and outcomes - it serves as a physical brain for your intents.
15
+ <p align="center">
16
+ <a href="#installation">Install</a> &bull;
17
+ <a href="#quick-start">Quick start</a> &bull;
18
+ <a href="#commands">Commands</a> &bull;
19
+ <a href="docs/guide/getting-started/troubleshooting.md">Troubleshooting</a> &bull;
20
+ <a href="docs/contributing/ARCHITECTURE.md">Architecture</a> &bull;
21
+ <a href="MANIFESTO.md">Manifesto</a>
22
+ </p>
11
23
 
12
- [[Install]](#start-in-60-seconds) [[See it work]](#built-with-plastic) [[Read the manifesto]](MANIFESTO.md)
24
+ ---
13
25
 
26
+ Plastic is an intent-based system for AI-assisted work. You do not always start with a task.
27
+ You start with an intent, such as "I want users who are locked out to recover access safely."
28
+ Plastic carries that intent through four stages, What, Why, How and Exec, and leaves a
29
+ readable record of how the idea became real.
14
30
 
15
- ## Why Plastic?
31
+ Plastic is named after neuroplasticity, the brain's ability to change as it learns.
16
32
 
17
- You do not always start with a task.
33
+ ## What Plastic does
18
34
 
19
- You start with an intent, something like:
35
+ Plastic keeps the shape of the work fixed and leaves the thinking to you and your agent.
20
36
 
21
- > “I want users who are locked out to recover access safely.”
37
+ | You want to | What Plastic does |
38
+ |-------------|-------------------|
39
+ | Start from a rough idea | Creates one intent directory with an id, a slug and a born-complete intent file |
40
+ | Keep the reasons | Records each ruling in the intent, then consolidates them into `spec.md` |
41
+ | Plan the work | Holds the plan as a graph of nodes, and names the next ready step |
42
+ | Resume tomorrow | Prints where a project stands and the next action in one line |
43
+ | Hand work to an agent team | Arms a delivery lock, briefs each role and reports the result |
44
+ | Close the work | Generates `outcome.md` from the record and moves the intent to Completed |
45
+ | Find an old decision | Searches every store, ranked, with one excerpt for each match |
46
+ | Run many projects | Keeps one store for each project, plus a global store, all in plain Markdown and Git |
47
+ | Steer a long delivery | Reads a roadmap as a graph and names the entry most worth continuing |
48
+ | Protect the record | Writes one archive of the three databases and the config |
22
49
 
23
- Plastic delivers this intent in successive stages: What -> Why -> How -> Exec.
50
+ Every result ends with a `next:` line and a `because:` line. The `--json` option prints the
51
+ same result as data with stable keys.
24
52
 
25
- The result is a readable, linked record of how an idea became real.
53
+ ## How the record is built
26
54
 
27
- **Plastic gives changing minds a durable way to develop ideas into work.**
55
+ Each intent is one directory. It carries the same small set of files at every stage.
28
56
 
29
- Plastic is named after neuroplasticity: the brain's amazing ability to change and adapt. It rewires itself as you learn new things, form memories, or heal from injuries. Instead of being fixed like a computer, your brain is more like clay. It constantly reshapes itself based on your experiences.
57
+ | Stage | Question | File on disk |
58
+ |-------|----------|--------------|
59
+ | What | What is the intention? | `{id}--slug.md` |
60
+ | Why | What context, evidence and decisions shape it? | `spec.md` |
61
+ | How | What is the plan? | `plan.md`, `checklist.md`, `actions/` |
62
+ | Exec | What was delivered? | `outcome.md` |
30
63
 
31
- ### What Plastic does?
64
+ The files are plain Markdown in a Git repository that you own. See
65
+ [the architecture](docs/architecture.md) for the full store layout.
32
66
 
33
- Plastic keeps the shape of the work stable - **deterministic** work system:
34
- - one durable intent
35
- - one visible lifecycle
36
- - one place for context, decisions, plans, and outcomes
37
- - links between the ideas that shaped the work and the ideas it creates
67
+ ## Installation
38
68
 
39
- Plastic leaves the human or AI model free to think - **non-deterministic** thinking system.
69
+ Plastic needs Ruby 3.0 or later. The npm path also needs Node.js 18 or later, because `npx`
70
+ fetches the package. After the install, the `plastic` command runs on Ruby alone.
40
71
 
41
- Plastic makes that thinking legible, resumable, and useful later.
72
+ ### npm (recommended)
42
73
 
43
- ## Who is Plastic for?
74
+ ```bash
75
+ npx -y @zalom/plastic install --claude
76
+ ```
77
+
78
+ Replace `--claude` with `--codex` for Codex CLI, or pass both flags.
79
+
80
+ ### Alpha channel
81
+
82
+ Plastic 2.0 is on the alpha channel.
83
+
84
+ ```bash
85
+ npx -y @zalom/plastic@alpha install --claude
86
+ ```
87
+
88
+ ### Quick install without npm
44
89
 
45
- **Plastic is built for an AI-native developer, technical founder, or
46
- independent builder who works across multiple sessions, has ideas before
47
- they have intents, and feels the cost of losing reasoning between agents,
48
- contexts, and days.**
90
+ ```bash
91
+ curl -fsSL https://raw.githubusercontent.com/zalom/plastic/main/install.sh | sh
92
+ plastic install --claude
93
+ ```
49
94
 
50
- ## What it solves?
95
+ `install.sh` always installs the latest stable release. To move an installed Plastic to
96
+ another channel, run `plastic update --beta` or `plastic update --alpha`. No stable release
97
+ carries the archive yet. Until the first one does, the script reports that and exits, and
98
+ npm is the way to install.
51
99
 
52
- It solves problems that builder already feels:
100
+ ### A clean Mac
53
101
 
54
- - "I want to keep a record of my work - what I worked on, why I worked on it, how it was built"
55
- - "I do not need another TODO list."
56
- - "I do not want my work trapped inside a chat."
57
- - "I want to explore without losing the decision trail."
58
- - "I want a better model or new agent to inherit the work, not restart it."
59
- - "I want my ideas to compound."
102
+ macOS ships Ruby 2.6, which is too old. Install a newer Ruby first:
60
103
 
61
- ## Start in 60 seconds
104
+ ```bash
105
+ curl https://mise.run | sh
106
+ mise use --global ruby@3.3
107
+ ```
62
108
 
63
- One command installs Plastic for your agent:
109
+ ### Verify the installation
64
110
 
65
111
  ```bash
66
- npx -y @zalom/plastic install --claude
112
+ plastic version # Prints the installed version and the file it came from
113
+ plastic doctor # Checks the install and the stores
67
114
  ```
68
115
 
69
- Then load the conventions and begin:
116
+ ## Quick start
70
117
 
71
118
  ```bash
72
- /clear
119
+ # 1. Install for your agent
120
+ npx -y @zalom/plastic@alpha install --claude # Claude Code
121
+ npx -y @zalom/plastic@alpha install --codex # Codex CLI
122
+ npx -y @zalom/plastic@alpha install --all # Every supported agent
123
+
124
+ # 2. See what is open
125
+ plastic status
126
+
127
+ # 3. Start an intent
128
+ plastic intent new "Add a --version flag"
73
129
 
74
- I would like to learn more about Plastic and how it works.
130
+ # 4. Ask what to do next, at any time
131
+ plastic next
75
132
  ```
76
133
 
77
- Describe what you want in plain words, like "add a `--version` flag." Plastic
78
- scaffolds the intent and walks it through What, Why, How, and Exec. For the
79
- full path, read [your first intent in 10 minutes](docs/guides/your-first-intent-in-10-minutes.md).
134
+ Restart your agent after the install. For the full path, read
135
+ [your first intent in 10 minutes](docs/guides/your-first-intent-in-10-minutes.md).
80
136
 
81
- ## How Plastic works?
137
+ ## How it works
82
138
 
83
- A task assumes you already know the work.
139
+ ```
140
+ You or your agent plastic ~/.plastic
141
+ ----------------- ------- ----------
142
+ plastic intent new "..." --> creates the intent --> store/12--slug/12--slug.md
143
+ plastic intent rule 12 --> records a ruling --> the intent file, then spec.md
144
+ plastic intent step 12 --> runs the next node --> graph.md, nodes/, savepoint.md
145
+ plastic intent end 12 --> generates the outcome --> outcome.md, INDEX.md
146
+
147
+ ^ |
148
+ | next: one command because: one reason |
149
+ +--------------------------------------------------------------+
150
+ ```
84
151
 
85
- An intent begins earlier:
86
- something you want to accomplish, explore, or understand.
152
+ Plastic follows four rules:
87
153
 
88
- Plastic helps you develop it until it becomes a decision,
89
- a plan, a delivery, and a reusable piece of project history.
154
+ 1. **Commands print state and rules.** The judgment stays with you and the agent.
155
+ 2. **The ledger is append-only.** `savepoint.md` holds one line for each event, so a new
156
+ session resumes from the last line.
157
+ 3. **Status is derived.** Plastic reads what is ready from the graph and the ledger.
158
+ 4. **Nothing leaves the machine.** Plastic makes no model call and sends none of your files anywhere.
90
159
 
91
- ### Register What and start with Why
160
+ ## Commands
92
161
 
93
- Plastic delivers all work through successive stages ->
162
+ ### Orientation
163
+ ```bash
164
+ plastic status # Active work in every store
165
+ plastic continue # Where this project stands and what runs next
166
+ plastic continue --project blog # The same, for a named project
167
+ plastic next # The next action in one line
168
+ plastic next --why # The next action, with the reasoning
169
+ ```
94
170
 
95
- | Stage | Meaning | Developed concept | On-disk artifact (evidence) |
96
- | ----- | ----------------------------------------------- | ------------------ | ---------------------------------------------- |
97
- | What | What is the intention? | Intent | {id}--slug.md |
98
- | Why | What context, evidence, and decisions shape it? | Specification | spec.md |
99
- | How | What is the plan? | Plan and checklist | plan.md, checklist.md, actions/ACTION_1.md ... ACTION_N.md |
100
- | Exec | What was actually delivered? | Outcome | outcome.md |
171
+ ### Intents
172
+ ```bash
173
+ plastic intent new "LINE" # Create an intent
174
+ plastic intent new "LINE" --parent 12 # Create a branch of intent 12
175
+ plastic intent show 12 # Print the state screen
176
+ plastic intent spec 12 # State screen, then the speccing rules
177
+ plastic intent rule 12 "TEXT" # Record a ruling in Insights
178
+ plastic intent note 12 "TEXT" # Append a savepoint note
179
+ plastic intent step 12 # Run the next ready step of the graph
180
+ plastic intent answer 12 --node n3 --decision "TEXT" # Answer a node that needs a decision
181
+ plastic intent verify 12 # Run the merge-gate checks
182
+ plastic intent end 12 --delivered --summary "TEXT" # Close as delivered
183
+ plastic intent end 12 --abandoned --summary "TEXT" # Close as abandoned
184
+ ```
101
185
 
102
- ## How to use Plastic
186
+ ### Projects
187
+ ```bash
188
+ plastic project list # Every store this machine holds
189
+ plastic project new blog --path ~/code/blog # Register and provision a project
190
+ plastic project links # Rebuild every Links section from frontmatter
191
+ ```
103
192
 
104
- Plastic organizes all work as intents. Each intent is one directory, and it carries the same
105
- small set of files at every stage.
193
+ ### Roadmaps
194
+ ```bash
195
+ plastic roadmap next # The roadmap most worth continuing
196
+ plastic roadmap show SLUG # The state screen of one roadmap
197
+ plastic roadmap check SLUG # Find cycles and dangling ids in the graph
198
+ plastic roadmap log SLUG EVENT "TEXT" # Append a line to the roadmap ledger
199
+ ```
106
200
 
107
- **The intent directory**
201
+ ### Auto teams
202
+ ```bash
203
+ plastic auto take 12 # Arm the delivery lock for this session
204
+ plastic auto brief 12 --role executor # Print the spawn preamble for one role
205
+ plastic auto report 12 # Completion report, then the review rules
206
+ plastic auto lock status 12 # Inspect the delivery lock
207
+ plastic auto lock fix 12 # Repair a broken lock
208
+ plastic auto lock release 12 # Release the lock
209
+ ```
108
210
 
109
- | File | What it holds |
110
- | ---- | -------------- |
111
- | `{id}--slug.md` | The intent itself: intent line, context, decisions |
112
- | `spec.md` | The Why, consolidated into one contract for the plan |
113
- | `plan.md`, `checklist.md`, `actions/` | The How: the plan and its execution registry |
114
- | `outcome.md` | The Exec record: what actually shipped |
211
+ ### Sessions
212
+ ```bash
213
+ plastic session summary # Open items and recent activity in the day ledger
214
+ plastic session commit "SUMMARY" # Commit one verified checklist item
215
+ plastic session handoff # Write this session's hand-off
216
+ ```
115
217
 
116
- See [`docs/architecture.md`](docs/architecture.md) for the full store layout, and
117
- [reading a delivered intent](docs/guides/reading-a-delivered-intent.md) for how to read a
118
- finished one fast.
218
+ ### Search
219
+ ```bash
220
+ plastic index # Rebuild the search index from every Markdown file
221
+ plastic search recovery flow # Ranked matches, one excerpt each
222
+ plastic search recovery --project blog --limit 5
223
+ plastic search --ask "Why did we drop the queue?" # Search with a whole question
224
+ plastic query "SELECT path FROM doc LIMIT 5" # One read-only SQL statement
225
+ ```
119
226
 
120
- **From idea to delivery, one line per stage**
227
+ ### Stores and databases
228
+ ```bash
229
+ plastic sync # Bring the store files and the three databases level
230
+ plastic sync --dry-run # Show what would change
231
+ plastic checkout # Restore missing store files from the databases
232
+ plastic backup # One archive of the three databases and the config
233
+ plastic backup --list # Name, size and date of each archive
234
+ plastic migrate stores --dry-run # Preview the move of every store under stores/
235
+ plastic migrate stores # Move them, behind a full copy of the home
236
+ plastic render FILE # Print one Markdown file as an HTML page
237
+ ```
121
238
 
122
- | Stage | What happens |
123
- | ----- | ------------- |
124
- | What | Describe the idea in plain words; Plastic scaffolds the intent |
125
- | Why | Explore it, one ruling at a time, then consolidate into `spec.md` |
126
- | How | Turn `spec.md` into `plan.md` and `checklist.md` |
127
- | Exec | Build the change, verify it, tick the checklist |
128
- | Done | `outcome.md` records what shipped; the index moves the intent to Completed |
239
+ ### Product
240
+ ```bash
241
+ plastic install --claude # Install into Claude Code
242
+ plastic install --reinstall --claude # Repair an install
243
+ plastic update # Next version on the current channel
244
+ plastic update --alpha # Move to the alpha channel
245
+ plastic rollback # List the versions this machine has run
246
+ plastic rollback --version 2.0.0-alpha.27
247
+ plastic uninstall --all # Remove Plastic from every agent. Your stores stay.
248
+ plastic doctor # Check the install and the stores
249
+ plastic doctor --core # The fast check that runs at session start
250
+ plastic version # The installed version
251
+ ```
129
252
 
130
- Walk this once in
131
- [your first intent in 10 minutes](docs/guides/your-first-intent-in-10-minutes.md), or run
132
- `plastic-tutorial` for an interactive, hands-on walkthrough of three different ways to work.
253
+ ### Help and feedback
254
+ ```bash
255
+ plastic help # All commands and help topics
256
+ plastic help intent end # The usage line of one command
257
+ plastic help roadmaps # One help topic
258
+ plastic feedback "TITLE" < report.md # Save a problem report and print a link that files it
259
+ ```
133
260
 
134
- **Commands, by family**
261
+ ## Global options
135
262
 
136
- | Family | Commands |
137
- | ------ | -------- |
138
- | Mode | `plastic-tutorial`, `plastic-auto` |
139
- | Intent | `plastic-intent-creating`, `plastic-intent-continuing`, `plastic-intent-speccing`, `plastic-intent-executing`, `plastic-intent-ending` |
140
- | Project and delivery | `plastic-project-creating`, `plastic-roadmap`, `plastic-releasing` |
141
- | Product | `plastic-install`, `plastic-update`, `plastic-uninstall`, `plastic-rollback`, `plastic-doctor` |
263
+ ```bash
264
+ --json # Print the result as data with stable keys
265
+ -h, --help # Print the usage line of the command
266
+ --project SLUG # On continue, next and search, name a project other than the current one
267
+ ```
142
268
 
143
- See [`docs/guides/index.md`](docs/guides/index.md) for task-oriented walkthroughs.
269
+ The installer commands do not take `--json`.
144
270
 
145
- The agent helps most at Why and How: turning a rough idea into rulings, and rulings into a
146
- plan a machine can build from exactly. Read
147
- [pick your mode](docs/guides/pick-your-mode.md) to decide how much of that to hand over.
271
+ ## Examples
148
272
 
149
- ## Compatibility and ownership
273
+ **Active work in every store:**
274
+ ```
275
+ $ plastic status
276
+ global 0 active
277
+ blog 1 active 14
278
+ shop 2 active 7, 9
279
+
280
+ next: plastic continue --project shop
281
+ because: the working directory is inside shop
282
+ ```
150
283
 
151
- - Native installers for Claude Code and Codex CLI, both from npm. Hermes is a packaging
152
- target for now. See [harness support](docs/reference/harness-adapters.md).
153
- - Plain Markdown plus Git. The work stays in files you own.
154
- - Personal stores by default.
155
- - Direct work in the session, a thinking conversation when the work needs one,
156
- or autonomous delivery by an agent team when you ask for it.
157
- - Two advisor agents ship for the hard problems: one-way doors, plans, adversarial
158
- review, deadlocks. Summon one deliberately, state the effort and the answer shape in the brief; nobody's
159
- main session is ever touched. Primary Advisor uses Fable at medium effort for normal
160
- consultation. Secondary Advisor uses Fable at high effort for explicit escalation.
161
- Choose the default at install, and switch it any time.
284
+ **The next action:**
285
+ ```
286
+ $ plastic next
287
+ next work 9 in Batch 2: checkout flow
162
288
 
163
- Plastic needs Ruby 3.0 or later and Node.js 18 or later. Most Linux systems already
164
- have a new enough Ruby. macOS ships Ruby 2.6, which is too old, so a clean Mac needs
165
- a newer one first:
289
+ next: read ~/.plastic/projects/shop/store/9--checkout-flow/plan.md
290
+ because: 9 is first on the frontier of the roadmap
291
+ ```
166
292
 
293
+ **The installed version:**
167
294
  ```
168
- curl https://mise.run | sh # only if mise is not installed yet
169
- mise use --global ruby@3.3
295
+ $ plastic version
296
+ version 2.0.0-alpha.28
297
+ source ~/.local/share/plastic/package.json
298
+
299
+ next: plastic status
300
+ because: the command line works, so read the work next
170
301
  ```
171
302
 
172
- The installer checks this before it does anything and tells you the same thing if the
173
- Ruby it finds is too old. Bun users can run `bunx` in place of `npx`; Bun is never
174
- required.
303
+ The slugs and ids in these examples are samples.
175
304
 
176
- ## Built with Plastic
305
+ ## Agent hooks
177
306
 
178
- Plastic is developed through Plastic.
307
+ The installer registers hooks in your agent. At session start a hook runs the fast doctor,
308
+ loads the conventions and prints the open items of the day. Each hook calls one launcher:
179
309
 
180
- The roadmap, intent history, plans, decisions, and outcomes
181
- behind releases are part of the repository, not a hidden process.
310
+ ```bash
311
+ plastic hook EVENT # The agent calls this, not you
312
+ ```
313
+
314
+ Run `plastic install --reinstall --claude` when hooks do not fire.
315
+
316
+ ## Supported AI tools
317
+
318
+ | Tool | Install | State |
319
+ |------|---------|-------|
320
+ | **Claude Code** | `plastic install --claude` | Supported |
321
+ | **Codex CLI** | `plastic install --codex` | Supported |
322
+ | **Hermes** | none | A packaging target only |
182
323
 
183
- [changelog](CHANGELOG.md).
324
+ The `plastic` command itself needs no agent. It runs in any shell with Ruby. See
325
+ [harness support](docs/reference/harness-adapters.md) for the detail on each agent.
326
+
327
+ Seven agents ship with Plastic: an enforcer that leads an auto team, an executor, three node
328
+ agents for work, verification and research, and two advisors for hard decisions.
329
+
330
+ ## Configuration
331
+
332
+ `~/.plastic/config.yml`:
333
+
334
+ ```yaml
335
+ project_roots: ~/.plastic/projects # Where Plastic looks for projects
336
+ stale_threshold_days: 3 # Age at which a future intent is shown for triage
337
+ context_offer_tokens: 150000 # Context size at which the agent offers to compact
338
+ context_insist_tokens: 250000 # Context size at which the agent insists
339
+ agent:
340
+ type: claude-code # The agent that runs Plastic
341
+ parallel_mode: agent-teams # agent-teams or linear
342
+ ```
343
+
344
+ Install-time choices:
345
+
346
+ ```bash
347
+ plastic install --claude --advisor secondary # Set the default advisor
348
+ plastic install --claude --no-advisor # Install no advisor agent
349
+ plastic install --claude --statusline plastic # Use the Plastic status line
350
+ ```
351
+
352
+ See the [configuration guide](docs/guide/getting-started/configuration.md) for every key and file.
353
+
354
+ ### Uninstall
355
+
356
+ ```bash
357
+ plastic uninstall --all # Remove hooks, agents and conventions from every agent
358
+ ```
359
+
360
+ Your stores under `~/.plastic` stay.
361
+
362
+ ## What changed in 2.0
363
+
364
+ Plastic 2.0 moves from prose skills to one command with direct results.
365
+
366
+ - **One `plastic` command.** More than 40 commands replace the skills. The package ships no skill directories.
367
+ - **Direct results.** Every command ends with `next:` and `because:`, and takes `--json`.
368
+ - **Plans are graphs.** An intent holds nodes and edges, and a ready set names what runs next.
369
+ - **A ledger with refusals.** Node transitions are appended to `savepoint.md`, and an invalid transition is refused.
370
+ - **Generated outcomes.** `outcome.md` is built from the graph, the nodes and the ledger at the close.
371
+ - **Roadmaps are graphs too.** `plastic roadmap check` finds cycles and dangling ids.
372
+ - **Search without a service.** One SQLite file holds a full-text index of every store.
373
+ - **Three databases.** `work_graph.db`, `knowledge_graph.db` and `references.db` hold the record, and the files are a checkout of it.
374
+ - **Backup and migrate.** One archive command, and a store move that runs behind a full copy of the home.
375
+ - **Two advisors, medium effort by default.** Summon the Primary Advisor or the Secondary Advisor on purpose.
376
+ - **Codex CLI as a second agent.** The same install, with OpenAI model ids for each role.
377
+ - **Publishing from branches.** A push to `alpha`, `beta` or `main` publishes to the matching npm channel with provenance.
378
+
379
+ The [changelog](CHANGELOG.md) holds one line for each release.
184
380
 
185
381
  ## Documentation
186
382
 
187
- - [`docs/architecture.md`](docs/architecture.md): system structure, the two
188
- processes, the store layout, and the full stage table.
189
- - [`docs/internals.md`](docs/internals.md): how Plastic stays deterministic
190
- and how the harness works.
191
- - [`docs/guides/`](docs/guides/index.md): task-oriented guides, from your
192
- first intent in 10 minutes to picking a delivery mode.
383
+ - **[INSTALL.md](INSTALL.md)**: every install path.
384
+ - **[docs/guide/](docs/guide/index.md)**: getting started with the `plastic` command.
385
+ - **[docs/guides/](docs/guides/index.md)**: task guides, from your first intent to picking a mode.
386
+ - **[docs/usage/](docs/usage/FEATURES.md)**: features, the audit guide and tracking.
387
+ - **[docs/architecture.md](docs/architecture.md)**: the structure, the store layout and the stage table.
388
+ - **[docs/internals.md](docs/internals.md)**: how Plastic stays deterministic.
389
+ - **[docs/contributing/](docs/contributing/ARCHITECTURE.md)**: the command architecture, the coding practices and the gates.
390
+
391
+ ## Privacy
392
+
393
+ Plastic runs on your machine. It makes no model call and sends none of your files anywhere.
394
+ Two things use the network: the update check hook and `plastic update`, which ask the npm
395
+ registry for the newest version. See [SECURITY.md](SECURITY.md) for every file the installer writes.
396
+
397
+ ## Built with Plastic
398
+
399
+ Plastic is developed through Plastic. The roadmap, the intents, the plans, the decisions and
400
+ the outcomes behind each release are part of the record.
193
401
 
194
- ## Conventions
402
+ ## Contributing
195
403
 
196
- The always-on core conventions live in `PLASTIC.md`, distributed to `~/.plastic/PLASTIC.md`
197
- and overwritten on every update. Deeper doctrine lives in the `plastic-conventions` skill,
198
- loaded on demand by the skills that need it. Project-specific rules live in `AGENTS.md`.
199
- Run `plastic-doctor` to check installation health; it compares files against
200
- the manifests, checks store state, and runs automatically after every update.
404
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
201
405
 
202
406
  ## License
203
407
 
204
- MIT
408
+ MIT. See [LICENSE](LICENSE).
@@ -32,15 +32,15 @@ deliberately; the auto pipeline never dispatches them.
32
32
  software and AI engineering concepts those rest on; a gap is a design finding to raise, not
33
33
  a word to coin.
34
34
  3. **Have the plan reviewed before code** - dispatch one adversarial plan reviewer on
35
- `plastic-intent-executing`'s `plan-reviewer-prompt.md`; merge every finding into the spec, the
36
- matrix, and the tests.
35
+ `plastic help plan-reviewer-prompt`; merge every finding into the spec, the matrix, and
36
+ the tests.
37
37
  4. **Dispatch one executor, tests first** - the executor commits the matrix's tests red, then
38
38
  builds, then drives the full suite green; you verify tick-versus-diff at the
39
39
  post-execution review and again before the merge. A mismatch is a review finding, not a
40
40
  cleanup you perform silently.
41
41
  5. **Review by risk** - dispatch the post-execution reviewer only when the auto skill's risk
42
42
  rule fires; otherwise the green suite is the review.
43
- 6. **Close** - `outcome.md`, then `plastic-intent-ending`, which releases the worktree, clears
43
+ 6. **Close** - `outcome.md`, then `plastic intent end`, which releases the worktree, clears
44
44
  the lock, points the session back at the day ledger, and reindexes last.
45
45
 
46
46
  **Dispatch-time model contract.** Each pinned agent carries its `model:` in frontmatter, and
@@ -55,7 +55,7 @@ dispatch call's model parameter, alongside the spawn-preamble live-state injecti
55
55
  1. Take the intent; record the rulings in `## Context` + `### Decisions`; write `spec.md`.
56
56
  2. Write `plan.md`, the action files with their matrix, and `checklist.md`; dispatch the plan
57
57
  reviewer; merge the review findings.
58
- 3. Dispatch the executor through `plastic-intent-executing` with the whole consolidated action
58
+ 3. Dispatch the executor through `plastic intent step` with the whole consolidated action
59
59
  pasted in; require the red commit before the code and a green suite after it. Sequential,
60
60
  one team per intent, on one branch when files are shared.
61
61
  4. Apply the risk rule; when it fires, dispatch the reviewer and re-dispatch the executor for
@@ -66,11 +66,10 @@ dispatch call's model parameter, alongside the spawn-preamble live-state injecti
66
66
 
67
67
  Once per delivery, at How with the plan and the matrix ready and before any code, brief the
68
68
  human in EM-to-CTO voice: impact first, the one risk that matters, then the call. In auto mode
69
- the briefing informs and does not wait. The shape lives in
70
- `skills/auto/references/human-report-contract.md`. This is separate from the intent 74 report
71
- contract (`skills/auto/references/agent-report-contract.md`), the internal structured handoff a
72
- dispatched agent sends back to you; you consume that report to write the human briefing, and
73
- the two never merge.
69
+ the briefing informs and does not wait. The shape lives in `plastic help
70
+ human-report-contract`. This is separate from the intent 74 report contract (`plastic help
71
+ agent-report-contract`), the internal structured handoff a dispatched agent sends back to you;
72
+ you consume that report to write the human briefing, and the two never merge.
74
73
 
75
74
  ## Constraints
76
75
 
@@ -79,5 +78,5 @@ the two never merge.
79
78
  `savepoint.md`, the diff), never from a hook you assume fired.
80
79
  - The plan reviewer and the post-execution reviewer are fresh agents, never you and never the
81
80
  executor.
82
- - Dispatch through `plastic-intent-executing`, Plastic's own engine. On a harness with no agent
81
+ - Dispatch through `plastic intent step`, Plastic's own engine. On a harness with no agent
83
82
  dispatch, walk the five steps yourself and say so in `## Insights`.
@@ -48,7 +48,7 @@ valid lifecycle artifacts. Honor it as your live state; do not re-derive or cont
48
48
  ## Completion Report
49
49
 
50
50
  END your turn with a structured completion report as your final message, per the spawn
51
- 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
52
52
  finish silently. Carry the common envelope (role, intent id, stage, status, artifacts written,
53
53
  verification, checklist deltas, deviations, blockers, insights) plus the executor payload:
54
54
 
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