@zalom/plastic 1.0.0-alpha.10 → 1.0.0-alpha.11

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.
package/PLASTIC.md CHANGED
@@ -4,24 +4,21 @@
4
4
  > plugin is updated. Do not modify — your changes will be lost.
5
5
  > For project-specific rules, use `AGENTS.md` instead.
6
6
 
7
-
8
7
  ## What is an Intent
9
8
 
10
- An intent is a directory in the store containing `{ID}--{slug}.md` and optional supporting files.
9
+ A directory in the store containing `{ID}--{slug}.md` and optional supporting files.
11
10
  It represents a desire — something a human or agent wants to accomplish, explore, or understand.
12
- Intents are atomic thoughts that need to be developed.
13
11
 
14
12
  ```
15
13
  store/
16
14
  ID--three-to-five-words/
17
- {ID}--{slug}.md # required — the intent itself (e.g., 1a1--design-plastic.md)
18
- spec.md # optional — consolidated specification (Why deliverable)
19
- plan.md # optional — implementation plan (How deliverable)
20
- checklist.md # optional — execution registry with checkboxes (How deliverable)
21
- outcome.md # optional — detailed result (Exec deliverable)
22
- actions/ # optional — makes the intent actionable
23
- ACTION_1.md
24
- savepoint.md # optional — session state for resuming
15
+ {ID}--{slug}.md # required — the intent itself
16
+ spec.md # optional — specification (Why deliverable)
17
+ plan.md # optional — implementation plan (How deliverable)
18
+ checklist.md # optional — execution registry (How deliverable)
19
+ outcome.md # optional — detailed result (Exec deliverable)
20
+ actions/ # optional — individual work items
21
+ savepoint.md # optional — session state for resume
25
22
  ```
26
23
 
27
24
  ## Frontmatter
@@ -32,503 +29,137 @@ Identity and knowledge graph only. Nothing operational.
32
29
  ---
33
30
  id: "4a1"
34
31
  intent: "Short description of the desire"
35
- sources: ["4a"] # backward links — what influenced this intent's creation
36
- chain: ["4a1a", "4a1b"] # forward links — what this intent spawned
32
+ sources: ["4a"] # backward links — what influenced this
33
+ chain: ["4a1a"] # forward links — what this spawned
37
34
  created: 2026-05-29
38
35
  author: human # human | agent-name
39
36
  tags: [plastic, architecture]
40
37
  ---
41
38
  ```
42
39
 
43
- - `sources` and `chain` form the double-linked knowledge graph
44
- - `sources` = what fed into this intent (parents, inspirations, prerequisites)
45
- - `chain` = what this intent produced (children, follow-ups, spin-offs)
46
- - IDs use Folgezettel format — the same identifier used in wikilinks and filenames
47
- - No other fields. Everything else is derived from conventions.
40
+ - `sources` + `chain` form the double-linked knowledge graph (Folgezettel)
41
+ - IDs use Luhmann's alternating convention: `1` `1a` `1a1` → `1a1a`
42
+ - Multiple branches increment: `1a`, `1b`, `1c`
48
43
 
49
44
  ## Two Processes
50
45
 
51
- Plastic has two nested processes:
52
-
53
46
  | Process | Scope | Type | Actor |
54
47
  |---|---|---|---|
55
48
  | **Build → Observe → Repeat** | The system | Continuous loop | Coordinator |
56
49
  | **What → Why → How → Exec** | One intent | Finite lifecycle | Agent |
57
50
 
58
- **Build Observe Repeat** is the Coordinator's heartbeat:
59
- - **Build** — dispatch an intent to an Agent
60
- - **Observe** — review results, read Insights, assess what spawns next
61
- - **Repeat** — create new intents from Insights, dispatch again
62
-
63
- **What Why How Exec** is what happens inside each dispatched intent (see Building an Intent below).
64
-
65
- The connection point: an intent's **## Insights** (captured throughout all stages) feeds into the Coordinator's **Observe** phase, which triggers a new **Build**. The B→O→R loop never ends; the W→W→H→E lifecycle does.
66
-
67
- ## Building an Intent The What→Why→How→Exec Lifecycle
68
-
69
- Every intent progresses through four stages. Each stage has a deliverable.
70
-
71
- ### What `## Intent` section
72
-
73
- The desire. One paragraph. What the human or agent wants.
74
- This exists from the moment the intent is created.
75
-
76
- **Deliverable:** `{ID}--{slug}.md`
77
-
78
- ### Why `## Context` + `### Decisions` sections
79
-
80
- Why this intent exists. Grows over time through brainstorming and exploration.
81
-
82
- - **Context** what we knew going in + what we decided along the way
83
- - **Decisions** main premises derived from Context plus decisions from brainstorming/grilling
84
- - Decisions are Why-level: "status belongs on actions because multiple workstreams", not How-level: "use ACTION_N.md files"
85
-
86
- **Deliverable:** `spec.md` (consolidated specification from Context + Decisions + brainstorming)
87
-
88
- ### How Planning and preparation
89
-
90
- Research decisions, create the implementation plan, define actions.
91
-
92
- **Deliverable:** `plan.md` + `actions/` + `checklist.md` (execution registry with checkboxes covering all actions)
93
-
94
- ### Exec → Execute actions
95
-
96
- Execute actions from the plan, track progress via checklist.
97
-
98
- **Deliverable:** `outcome.md` (detailed result). `## Outcome` in intent.md = short summary written as last step.
99
-
100
- ### ## Insights — Append-only work log
101
-
102
- Captured throughout ALL stages. One-liner bullet points.
103
- Never modified, only appended.
104
-
105
- Tracks: stage transitions, decisions, shifts, blocks, cancellations, material for future intents.
106
- This is how execution is tracked. When this intent completes, Insights
107
- is where to look for what comes next. New intents spawned from Insights
108
- appear in the `chain` field.
109
-
110
- ### ## Links
111
-
112
- Wikilinks for Obsidian graph navigation. Human-facing counterpart to the
113
- frontmatter knowledge graph.
114
-
115
- ## Conventions — Filesystem as Schema
116
-
117
- State is derived from what exists, not from what's declared.
118
-
119
- | Convention | Signal |
120
- |---|---|
121
- | No `## Context` | Intent is fleeting (quick capture, non-actionable) |
122
- | `## Context` has content | Intent is permanent (developed, actionable) |
123
- | `## Outcome` has content | Intent is done |
124
- | `## Insights` has `(autonomous)` entries | Intent is/was being delivered autonomously |
125
-
126
- ### Transitions
127
-
128
- - Fleeting → permanent: add `## Context` (one-way, also makes it actionable)
129
- - There is no separate "non-actionable → actionable" transition — permanence implies actionability
130
- - Even research intents are actionable: the research itself is the action, the conclusion is the outcome
131
-
132
- ### Actions
133
-
134
- When an intent becomes permanent, it is actionable. Create `actions/` with:
135
- - `ACTION_N.md` — individual work items, each self-contained with all resources and context from plan.md
136
- - `CHECKLIST.md` — execution registry tracking progress; serves as the savepoint of execution
137
-
138
- Status lives on actions, not on the intent. An intent can have multiple
139
- parallel workstreams.
51
+ BOR is the Coordinator's heartbeat. W→W→H→E is what happens inside each intent.
52
+ The connection: an intent's `## Insights` feeds the Coordinator's Observe phase.
53
+
54
+ ## Lifecycle Stages
55
+
56
+ | Stage | Section | Deliverable | Detail |
57
+ |-------|---------|-------------|--------|
58
+ | **What** | `## Intent` | `{ID}--{slug}.md` | `plastic:creating-intent` |
59
+ | **Why** | `## Context` + Decisions | `spec.md` | `plastic:brainstorming` |
60
+ | **How** | Planning | `plan.md` + `actions/` + `checklist.md` | `plastic:writing-plans` |
61
+ | **Exec** | Execution | `outcome.md` | `plastic:executing-plan` |
62
+
63
+ `## Insights` — append-only work log captured throughout ALL stages.
64
+ For full lifecycle detail, the skills in the Detail column have references/.
65
+
66
+ ## Gotchas
67
+
68
+ - **Artifacts go in the intent directory.** Never create `docs/plans/`,
69
+ `docs/specs/`, `researches/`, or similar. All meta-artifacts go in
70
+ `~/.plastic/store/ID--slug/` or the project store equivalent.
71
+ - **Code goes in the project. Everything else goes in the intent.**
72
+ Plans, specs, checklists, savepoints — all in the intent directory.
73
+ - **The global store is never pushed.** `~/.plastic/` is git-tracked locally
74
+ but contains sensitive data. Never push to a remote.
75
+ - **Agent-created repos are private by default.** Use `gh repo create --private`.
76
+ - **State is derived from what exists.** No `## Context` = fleeting intent.
77
+ `## Context` exists = permanent/actionable. `## Outcome` exists = done.
78
+ - **Status lives on actions, not intents.** An intent can have parallel workstreams.
79
+ - **`outcome.md` = done.** Presence signals completion. Don't write it until
80
+ checklist is fully checked.
81
+ - **Delegation overrides external skill defaults.** When delegating to
82
+ brainstorming, writing-plans, etc., Plastic's directory rules override
83
+ their default output paths.
140
84
 
141
85
  ## State System
142
86
 
143
- Global mode (default):
144
-
145
- ```
146
- ~/.plastic/ # Global intent store
147
- ├── AGENTS.md # This file — conventions contract
148
- ├── config.yml # User preferences
149
- ├── projects.yml # Project slug → path registry
150
- ├── INDEX.md # Brain's entry point
151
- └── store/
152
- └── ID--three-to-five-words/ # One directory per strategic intent
153
- ├── {ID}--{slug}.md # The intent (always present, e.g., 1a1--design-plastic.md)
154
- ├── spec.md # Consolidated specification (optional — Why deliverable)
155
- ├── plan.md # Implementation plan (optional — How deliverable)
156
- ├── checklist.md # Execution registry with checkboxes (optional — How deliverable)
157
- ├── outcome.md # Detailed result (optional — Exec deliverable)
158
- └── savepoint.md # Session state for resume (optional)
159
- ```
160
-
161
- Per-project store (centralized under `~/.plastic/projects/`):
162
-
163
87
  ```
164
- ~/.plastic/projects/
165
- └── {slug}/ # One directory per registered project
166
- ├── store/ # Project-scoped intents
167
- └── INDEX.md # Project-scoped index
88
+ ~/.plastic/ # Global intent store (git, never pushed)
89
+ ├── INDEX.md # Structure note (clusters by meaning)
90
+ ├── config.yml # User preferences
91
+ ├── projects.yml # Project slug → path registry
92
+ └── store/ # Strategic intents
93
+ └── ID--slug/
94
+ └── {ID}--{slug}.md
95
+
96
+ ~/.plastic/projects/{slug}/ # Project-scoped store
97
+ ├── INDEX.md # Project-scoped index
98
+ ├── AGENTS.md # Project stack defaults
99
+ └── store/ # Tactical intents
100
+ └── ID--slug/
168
101
  ```
169
102
 
170
- Project stores are derived from `projects.yml` the path is always `~/.plastic/projects/{slug}/store/`.
171
- No files are placed in the project's code directory. The SessionStart hook detects the project
172
- by matching CWD against `projects.yml` and loads the appropriate store automatically.
173
-
174
- ### Privacy and Collaboration
175
-
176
- **Plastic is personal.** All intent data lives under `~/.plastic/` — one location, one git repo, never pushed. Each person has their own intent store with their own thought evolution. No files are placed in project directories.
177
-
178
- Collaboration happens through pull requests and project conventions, not shared intents. When an intent delivers something that changes how a project works, the decision gets written into the project's shared files (README, docs, config). The intents themselves are private working memory.
179
-
180
- Project config (`~/.plastic/projects/{slug}/config.yml`) overrides global config (`~/.plastic/config.yml`). Both are private.
181
-
182
- ### Directory Naming — Folgezettel
183
-
184
- Format: `ID--three-to-five-words` — applies to all stores.
185
- - `ID` — Folgezettel identifier using Luhmann's alternating convention
186
- - `--` — separator
187
- - `three-to-five-words` — human-readable slug (3-5 words max)
188
-
189
- Folgezettel IDs encode lineage:
190
- - Root intents: sequential numbers (`1`, `2`, `3`...)
191
- - Branches alternate letters and numbers: `1` → `1a` → `1a1` → `1a1a` → ...
192
- - Multiple branches from the same parent increment: `1a`, `1b`, `1c` or `1a1`, `1a2`, `1a3`
193
- - IDs are assigned at creation time and never change
194
-
195
- ### Intent Filename
103
+ Project stores derived from `projects.yml`. No files placed in project code
104
+ directories. SessionStart hook detects project by matching CWD.
196
105
 
197
- The intent file is named `{ID}--{slug}.md` matching the directory name.
198
- Wikilinks use the ID only (`[[1a1]]`) and resolve via Obsidian alias or search.
106
+ **Privacy:** Plastic is personal. All intent data under `~/.plastic/`. Each
107
+ person has their own store. Collaboration through PRs, not shared intents.
199
108
 
200
- Examples:
201
- - Directory `1a1--design-plastic-state-system/` contains `1a1--design-plastic-state-system.md`
202
- - Directory `4a1b--lifecycle-file-mapping/` contains `4a1b--lifecycle-file-mapping.md`
109
+ ## Directory Naming
203
110
 
204
- ### Wikilink Conventions
111
+ Format: `ID--three-to-five-words` (all stores).
205
112
 
206
- | Syntax | Meaning |
207
- |--------|---------|
208
- | `[[ID]]` | Link to intent in same store (e.g., `[[1a1]]`) |
209
- | `[[ID\|display text]]` | Link with human-readable label (e.g., `[[1a1\|Design Plastic]]`) |
210
- | `[[global:ID]]` | Link to intent in `~/.plastic/store/` |
211
- | `[[project-slug:ID]]` | Link to intent in `~/.plastic/projects/{slug}/store/` |
113
+ - Root intents: sequential numbers (`1`, `2`, `3`)
114
+ - Branches alternate: `1` → `1a` → `1a1` → `1a1a`
115
+ - Intent file matches directory: `1a1--slug/1a1--slug.md`
116
+ - Next ID: `"${CLAUDE_PLUGIN_ROOT}/scripts/folgezettel-id" <parent_id> <store_path>`
212
117
 
213
- ### Authorship
118
+ ## INDEX.md
214
119
 
215
- Intents can be created by humans or AI agents (`author` field): `human`, `claude-code`, `hermes`, `openclaw`, or any agent identifier.
216
-
217
- ## INDEX.md — Structure Note
218
-
219
- INDEX.md is a Zettelkasten structure note, not a table of contents.
220
- It clusters intents by meaning, not by date or status.
120
+ A Zettelkasten structure note, not a table of contents. Clusters by meaning.
221
121
 
222
122
  Sections: `## Active`, `## Future`, `## Clusters`, `## Abandoned`, `## Completed`.
223
123
 
224
- ## Creating an Intent
225
-
226
- 1. Determine the target store: `~/.plastic/store/` for global intents (default), `~/.plastic/projects/{slug}/store/` for project intents
227
- 2. Determine the Folgezettel ID: If root (no parent), find highest root number +1. If branch, run `"${CLAUDE_PLUGIN_ROOT}/scripts/folgezettel-id" <parent_id> <store_path>`
228
- 3. Create the intent directory in the chosen store (e.g., `ID--three-to-five-words`)
229
- 4. Create `{ID}--{slug}.md` with frontmatter (id, intent, sources, chain, created, author, tags)
230
- 5. Write `## Intent` — the What
231
- 6. Add remaining sections: `## Context`, `## Outcome`, `## Insights`, `## Links`
232
- 7. Update the appropriate `INDEX.md` — add to Active section and appropriate cluster
233
-
234
- A fleeting intent can skip `## Context` — just `## Intent` and empty sections.
235
-
236
- ## Progressing an Intent
237
-
238
- 1. **What → Why:** Brainstorm, explore, grill. Add Context + Decisions to `## Context`. Write `spec.md`.
239
- - **Autonomous handoff:** When Why is complete, human can invoke `plastic:auto` to hand off How and Exec to the agent. The agent completes any remaining Why gaps through self-directed research, then proceeds through How and Exec autonomously.
240
- 2. **Why → How:** Research decisions, plan. Write `plan.md`, create `actions/`, write `checklist.md`.
241
- 3. **How → Exec:** Execute actions, update `checklist.md`. When all done, write `outcome.md`.
242
- 4. **Throughout:** Capture observations in `## Insights` (append-only). These spark future intents.
243
- 5. **Completing:** Write `## Outcome` summary in intent.md. Spawn follow-up intents from `## Insights`, update `chain`.
244
-
245
- ## Context Management (Start-Save-Continue)
246
-
247
- ### Save Point
248
- Triggered by PreCompact hook or manually:
249
- 1. Find active intent(s) from `~/.plastic/INDEX.md`
250
- 2. Update active intent's `checklist.md` (check off completed items)
251
- 3. Update active intent's `savepoint.md` (in-progress, next steps, blockers, discoveries)
252
- 4. Add observations to `## Insights`
253
- 5. Update INDEX.md
254
- 6. Commit: `cd ~/.plastic && git add . && git commit -m "chore: savepoint — [intent name]"`
255
- 7. Notify user to `/clear`
256
-
257
- ### Continue
258
- Triggered by UserPromptSubmit hook when user says "continue". Priority order:
259
-
260
- **1. Active intents first (resume work):**
261
- 1. Read INDEX.md → find active intent(s)
262
- 2. Read active intent's `intent.md` → what and why
263
- 3. Read active intent's `savepoint.md` → where we left off
264
- 4. Read active intent's `checklist.md` → what's next
265
- 5. Announce: intent name, current state, next step, blockers
266
- 6. Resume
267
-
268
- **2. No active intents → offer future intents:**
269
- 1. List all future intents from INDEX.md
270
- 2. Present them as options
271
- 3. When user picks one, move to Active in INDEX.md
272
-
273
- **3. Stale future intents (untouched 3+ days) → triage:**
274
- - **activate** — start working on it now
275
- - **abandon** — mark as abandoned
276
- - **defer to agent** — implement, research, or ideate
124
+ For index maintenance, use `plastic:managing-index`.
277
125
 
278
126
  ## Rules for Skills
279
127
 
280
- ALL work flows through intents. No skill, agent, or workflow creates directories, specs, plans, or artifacts outside the intent system.
281
-
282
- 1. **Before starting any work**, check INDEX.md for the active intent. If none exists, create one first.
283
- 2. **Never create** `docs/superpowers/specs/`, `docs/plans/`, `researches/`, or similar directories. All artifacts go into the active intent's directory.
284
- 3. **When a skill produces output** (spec, plan, checklist), write it inside the active intent's directory.
285
- 4. **When a skill completes**, capture observations in `## Insights`.
286
- 5. **When work is done**, write `outcome.md` and `## Outcome` summary in intent.md (presence of `outcome.md` = done). Update INDEX.md.
287
- 6. **Researches are intents.** No separate folder.
288
-
289
- ### Delegation to External Skills
290
-
291
- When Plastic delegates to an external skill, **Plastic's directory rules OVERRIDE the external skill's defaults:**
292
-
293
- - Plans save to `~/.plastic/store/ID--slug/plan.md` (not `docs/superpowers/plans/`)
294
- - Specs save to `~/.plastic/store/ID--slug/spec.md` (not `docs/superpowers/specs/`)
295
- - Code files go in the project tree; meta-artifacts go in the intent directory
296
-
297
- **The rule is simple:** code goes in the project. Plans, specs, checklists, savepoints, and all meta-artifacts go in the intent directory. No exceptions.
298
-
299
- ## Hubs
300
-
301
- A Hub is a cloud of intents around related topics. Hubs emerge naturally from
302
- Folgezettel branching — intents that spawn in the same direction (same concept,
303
- new ideas, new features) cluster into a Hub.
304
-
305
- - A Hub can spawn a Project. The Hub holds the founding ideas.
306
- - A single intent can also spawn a Project (Intent-spawned vs Hub-spawned).
307
- - Hub-spawned projects revolve around different ideas/features around related topics.
308
- - Intent-spawned projects revolve around the single founding intent.
309
- - A Project is the result of ideation — the deliverable outcome of one or more intents.
310
-
311
- Hubs are represented as clusters in INDEX.md.
312
-
313
- ## Projects
314
-
315
- A Project is a deliverable grouping of intents — a hub that connects related work into something that can be delivered. Projects have two stores, both under `~/.plastic/`:
316
-
317
- - **Global store** (`~/.plastic/store/`): strategic intents — ideas, research, explorations that span multiple projects or don't belong to any project.
318
- - **Project store** (`~/.plastic/projects/{slug}/store/`): project-scoped intents — implementation, actions, execution, delivery artifacts.
319
-
320
- No files are placed in project code directories. The SessionStart hook detects the project by matching CWD against `projects.yml` and loads the appropriate store.
128
+ ALL work flows through intents.
321
129
 
322
- `projects.yml` maps project slugs to codebase paths:
323
- ```yaml
324
- projects:
325
- plastic:
326
- path: "/path/to/plastic"
327
- remote: "git@github.com:org/plastic.git"
328
- registered: '2026-05-26'
329
- status: active
330
- ```
331
-
332
- The project store path is always derived: `~/.plastic/projects/{slug}/store/`. No explicit store path in `projects.yml`.
333
-
334
- Config resolution: `~/.plastic/projects/{slug}/config.yml` overrides `~/.plastic/config.yml`.
335
-
336
- Cross-linking: project intents reference global intents via `[[global:ID]]`. Global intents reference project intents via `[[project-slug:ID]]`.
337
-
338
- ## Agent Architecture
339
-
340
- ### Main Orchestrator
341
-
342
- The Main Orchestrator manages the global store (Main Knowledge Base). It:
343
- - Recognizes, creates, updates, and groups intents
344
- - Spawns Project Orchestrators for registered projects
345
- - Receives contributions back from Project Orchestrators
346
- - Is the only agent that runs in a loop (continuous Build→Observe→Repeat)
347
-
348
- ### Project Orchestrators
349
-
350
- Project Orchestrators manage project stores (Project Knowledge Bases). They:
351
- - Care about intents and execution within their project
352
- - Spawn teams to develop and execute intents
353
- - Contribute back to the Main Orchestrator when new intents are born
354
- that could enrich the Main Knowledge Base
355
-
356
- The Main Orchestrator and Project Orchestrators can be any agent platform: Claude Code, Hermes, OpenClaw.
357
- Agents and sub-agents can also be any platform.
358
-
359
- Two modes:
360
- - **Human-driven:** Human chats with Main Orchestrator, creates intents, brainstorms, then Main Orchestrator dispatches Project Orchestrators and Agents for execution.
361
- - **Autonomous:** Human gives Main Orchestrator a starting intent with defined outcomes. Main Orchestrator runs the full cycle — Agents do the lifecycle (What→Why→How→Exec), Main Orchestrator reviews Insights, spawns next intents, dispatches again. Human is the boss but doesn't need to be in the loop for every decision.
362
-
363
- Rules:
364
- - 1 Main Orchestrator : 1 Global Store (`~/.plastic/`)
365
- - 1 Main Orchestrator : N Project Orchestrators
366
- - 1 Project Orchestrator : 1 Project Store
367
- - 1 Agent : 1 Intent (exclusive assignment)
368
- - 1 Agent : N Sub-agents (for parallel Actions within an intent)
369
-
370
- When "work on Project X":
371
- 1. Read `projects.yml` → find project path
372
- 2. Load global config (defaults)
373
- 3. Load project config (overrides)
374
- 4. Load global INDEX.md → find hub intents tagged `project-<name>`
375
- 5. Load project `.plastic/INDEX.md` → tactical intents
376
- 6. Coordinator has full picture, dispatches Agent teams
377
-
378
- The Coordinator runs **Build → Observe → Repeat**:
379
- 1. **Build** — dispatch intent to an Agent
380
- 2. **Observe** — Agent completes, Coordinator reads ## Insights and ## Outcome
381
- 3. **Repeat** — spawn new intents from Insights, update chain, dispatch next
382
-
383
- Each Agent runs **What → Why → How → Exec** on its assigned intent:
384
- 1. Receives intent from Coordinator
385
- 2. Handles full lifecycle: What→Why→How→Exec
386
- 3. Can spawn sub-agents for parallel Actions
387
- 4. When done: notifies Coordinator (triggers Observe phase)
388
-
389
- ### Autonomous Delivery
390
-
391
- Human owns What and Why for human-initiated intents. Agent assists (research,
392
- exploration) but human drives until handoff. When Why is complete — or human
393
- triggers `plastic:auto` — the agent takes over How and Exec autonomously.
394
-
395
- - **Safe-by-default:** Agent always prefers non-destructive routes (rename vs
396
- delete, additive migrations, backups before changes). Destructive actions on
397
- existing projects require human approval unless `--skip-permissions` is set.
398
- - **One agent per intent.** Agent follows the full W→W→H→E lifecycle.
399
- - **Notification only on:** finish or hard stop (blocked on destructive action,
400
- unresolvable error). No progress reports — `## Insights` tracks everything.
401
- - **Greenfield autonomy:** During initial project creation, all decisions are
402
- non-destructive (nothing to destroy). Agent has full autonomy for greenfield choices.
403
- - **Autonomous decisions** are logged in `## Insights` with `(autonomous)` marker.
404
-
405
- ## Hook Enforcement
406
-
407
- Hooks are the convention enforcement layer. The agent reads PLASTIC.md for understanding; hooks enforce it.
408
-
409
- ### Bridge File Pattern
410
-
411
- `/tmp/plastic-{session}.json` is the hot cache; the filesystem is the authority.
412
- SessionStart rebuilds the bridge file from the filesystem — the bridge is always disposable.
413
-
414
- ### Gate Taxonomy
415
-
416
- | Gate type | Purpose |
417
- |---|---|
418
- | **Pre-flight** | Prerequisites exist? (e.g., spec.md before plan.md) |
419
- | **Revision** | New info invalidated prior work? (e.g., Context changed after spec.md was written) |
420
- | **Escalation** | Blocked items surface to user (e.g., unresolved decision needed) |
421
- | **Abort** | Inconsistent state detected (e.g., outcome.md exists but checklist incomplete) |
422
-
423
- ### Transition Table
424
-
425
- | Transition | Trigger |
426
- |---|---|
427
- | What → Why | `spec.md` written |
428
- | Why → How | `plan.md` + `actions/` + `checklist.md` written (the triplet) |
429
- | How → Exec | `checklist.md` has items to execute |
430
- | Exec → Done | `outcome.md` written |
431
-
432
- ### Gate Enforcement
433
-
434
- | Gate | Blocked action | Required prerequisite |
435
- |---|---|---|
436
- | Pre-flight | Cannot write `plan.md` | `spec.md` must exist |
437
- | Pre-flight | Cannot create `actions/` | `spec.md` must exist |
438
- | Pre-flight | Cannot write `outcome.md` | `checklist.md` must exist with all items checked |
439
- | Revision | Cannot proceed to Exec | Context changed after spec.md — re-derive spec |
440
- | Abort | Cannot complete intent | `outcome.md` exists but checklist has unchecked items |
130
+ 1. Before starting work, check INDEX.md for active intent. If none, create one.
131
+ 2. Skill output (spec, plan, checklist) goes in the intent directory.
132
+ 3. On completion, capture observations in `## Insights`.
133
+ 4. When done, write `outcome.md` + `## Outcome` summary. Update INDEX.md.
134
+ 5. Researches are intents. No separate folder.
441
135
 
442
- Hard blocking — hooks exit with code 2 when gates fail.
136
+ ## Transition Gates
443
137
 
444
- ## Stuck Detection
445
-
446
- | Condition | Threshold | Action |
447
- |---|---|---|
448
- | Consecutive gate failures | 3+ | Warning |
449
- | Consecutive gate failures | 5+ | Force savepoint + escalate to user |
450
- | No activity | 5+ min | Warning |
451
- | No activity | 10+ min | Force savepoint + escalate to user |
452
- | Context pressure | 80% | Warning |
453
- | Context pressure | 90% | Force savepoint |
454
-
455
- Token tracking is done via transcript parsing — Claude Code hooks do not expose token counts directly.
456
-
457
- ## Zettelkasten Structure
458
-
459
- Plastic implements three Zettelkasten structures:
460
-
461
- | Structure | Implementation | Purpose |
138
+ | Transition | Trigger | Gate |
462
139
  |---|---|---|
463
- | Folgezettel (linked list) | `sources` + `chain` in frontmatter | Sequential provenance what led here, what spawned from here |
464
- | Directed graph (web of notes) | `## Links` with wikilinks | Obsidian graph navigation, human-facing connections |
465
- | Tag-based taxonomy | `tags` in frontmatter | Grouping by topic and project membership (`project-<name>`) |
466
-
467
- INDEX.md is a structure note (hub), not a table of contents. It clusters intents by meaning. Project hubs in INDEX.md represent deliverable groupings.
468
-
469
- ## Dual-Mode
470
-
471
- This store works in two modes without modification:
472
- - **Obsidian** (human, offline) browse, link, write markdown
473
- - **Programmatic** (any agent) — read/write via filesystem operations
474
-
475
- No special tooling required for either mode.
476
-
477
- ## Git Rules
478
-
479
- The global store (`~/.plastic/`) is tracked with git locally but **never pushed
480
- to a remote**. It contains sensitive data (intents, decisions, project context).
481
-
482
- - `~/.plastic/`: git tracked, **never push**
483
- - Project repos: push only when the user explicitly confirms
484
- - Agent-created repos: **private by default**. When an agent creates a GitHub
485
- repository (e.g., for a new project), it must be private unless the user
486
- explicitly requests public. Use `gh repo create --private`.
487
-
488
- ## Deprecation Process
489
-
490
- When removing a feature, changing a convention, or making a breaking change:
491
-
492
- 1. Add entry to `deprecations.yml` in the Plastic source root
493
- 2. Set appropriate severity: `info` (awareness), `warning` (action needed), `critical` (urgent)
494
- 3. Provide clear migration steps — never deprecate without telling the user what to do
495
- 4. Set `removal` version at least 2 minor versions ahead (warning) or 1 minor (info)
496
- 5. The SessionStart hook displays active deprecations automatically
497
- 6. Remove the feature AND the deprecation entry together in the removal version
498
-
499
- ### Severity Levels
500
-
501
- | Severity | When to use | Dismissable? |
502
- |----------|-------------|--------------|
503
- | `info` | Awareness of upcoming change | Yes |
504
- | `warning` | Action needed before removal | Yes (re-shown at removal version) |
505
- | `critical` | Urgent/security-related removal | Never |
506
-
507
- ### deprecations.yml Schema
508
-
509
- ```yaml
510
- deprecations:
511
- - id: unique-slug
512
- severity: info | warning | critical
513
- summary: "One-line description"
514
- migration_steps:
515
- - "Step 1"
516
- - "Step 2"
517
- introduced: "0.9.0"
518
- removal: "1.0.0"
519
- link: "optional URL"
520
- ```
521
-
522
- ### Dismissal
523
-
524
- Users dismiss deprecations by adding the id to `deprecations_dismissed` in `config.yml`:
525
-
526
- ```yaml
527
- deprecations_dismissed:
528
- - some-deprecated-feature
529
- ```
530
-
531
- Critical deprecations and final-version warnings ignore dismissal.
532
-
533
- ## Agent-Specific Files
534
-
140
+ | What Why | `spec.md` written | — |
141
+ | Why How | `plan.md` + `actions/` + `checklist.md` | `spec.md` must exist |
142
+ | How Exec | Checklist has items | Plan triplet must exist |
143
+ | Exec → Done | `outcome.md` written | All checklist items checked |
144
+
145
+ Hard blocking — hooks exit code 2 on gate failure.
146
+
147
+ ## Skills Reference
148
+
149
+ Detailed conventions live inside the skills that use them, not in this file.
150
+
151
+ | Topic | Skill | References in skill |
152
+ |-------|-------|-------------------|
153
+ | Creating intents, lifecycle | `plastic:creating-intent` | lifecycle, wikilinks |
154
+ | Brainstorming, spec writing | `plastic:brainstorming` | — |
155
+ | Planning, actions | `plastic:writing-plans` | — |
156
+ | Execution, delivery | `plastic:executing-plan` | |
157
+ | Autonomous delivery | `plastic:auto` | agent architecture |
158
+ | Save/restore state | `plastic:savepoint`, `plastic:continuing` | context management |
159
+ | Knowledge graph, linking | `plastic:linking-intents` | zettelkasten, wikilinks |
160
+ | Projects, hubs | `plastic:creating-project` | hubs, project stores |
161
+ | Index maintenance | `plastic:managing-index` | |
162
+ | Releases, deprecations | `plastic:releasing` | deprecation process |
163
+ | Health diagnostics | `plastic:doctor` | gate enforcement, stuck detection |
164
+ | Writing agent instructions | `plastic:writing-instructions` | agentskills.io spec |
165
+ | Evaluating skills, evals | `plastic:evaluating-skills` | eval methodology, convention checks |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zalom/plastic",
3
- "version": "1.0.0-alpha.10",
3
+ "version": "1.0.0-alpha.11",
4
4
  "description": "Intent-driven idea development system for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -139,3 +139,7 @@ If the agent gets stuck (can't resolve a gap, dependency is missing, tests fail
139
139
  2. Write `savepoint.md` with current state
140
140
  3. Notify user: "Blocked on intent [ID] — [name]: [description]. Savepoint written."
141
141
  4. **STOP.** Do not attempt workarounds that could leave the project in a broken state.
142
+
143
+ ## References
144
+
145
+ - Read `references/agent-architecture.md` for the full agent hierarchy (Main Orchestrator, Project Orchestrators, coordination loop) when dispatching agents or understanding autonomous delivery scope