@zalom/plastic 1.0.0-alpha.3 → 1.0.0-alpha.31
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 +134 -469
- package/README.md +95 -58
- package/agents/future-intent-researcher.md +1 -1
- package/agents/intent-curator.md +1 -1
- package/bin/plastic.js +57 -0
- package/bin/test +28 -0
- package/deprecations.yml +1 -10
- package/hooks/auto-arm +5 -0
- package/hooks/bash-gate +3 -0
- package/hooks/check-update +12 -8
- package/hooks/code-gate +12 -0
- package/hooks/gate-check +3 -1
- package/hooks/hooks.json +25 -4
- package/hooks/statusline +50 -10
- package/package.json +2 -2
- package/scripts/dashboard.rb +680 -0
- package/scripts/doctor.rb +1227 -0
- package/scripts/hook-auto-arm +51 -0
- package/scripts/hook-bash-gate +41 -0
- package/scripts/hook-code-gate +27 -0
- package/scripts/hook-continue +15 -114
- package/scripts/hook-gate-check +30 -34
- package/scripts/hook-session-start +121 -31
- package/scripts/install.rb +91 -487
- package/scripts/lib/boot_banner.rb +28 -0
- package/scripts/lib/bridge.rb +358 -10
- package/scripts/lib/installer_core.rb +747 -0
- package/scripts/lib/intent_validator.rb +90 -0
- package/scripts/lib/qmd_sync.rb +159 -0
- package/scripts/lib/store_provisioning.rb +100 -0
- package/scripts/migrate-to-global +1 -1
- package/scripts/provision-project-store +53 -0
- package/scripts/qmd-sync +92 -0
- package/scripts/select-update-target +93 -0
- package/scripts/uninstall.rb +53 -0
- package/scripts/update.rb +164 -0
- package/scripts/validate-intent +54 -0
- package/scripts/versions.rb +141 -0
- package/skills/_active-intent-gate.md +26 -0
- package/skills/add-project-store/SKILL.md +54 -0
- package/skills/auto/SKILL.md +69 -9
- package/skills/auto/evals/evals.json +92 -0
- package/skills/auto/references/agent-architecture.md +60 -0
- package/skills/brainstorming/SKILL.md +143 -0
- package/skills/brainstorming-grill-me/SKILL.md +5 -5
- package/skills/continuing/SKILL.md +92 -82
- package/skills/continuing/evals/evals.json +136 -0
- package/skills/continuing/references/context-management.md +32 -0
- package/skills/creating-intent/SKILL.md +38 -9
- package/skills/creating-intent/references/lifecycle.md +74 -0
- package/skills/creating-intent/references/wikilinks.md +8 -0
- package/skills/creating-project/SKILL.md +40 -8
- package/skills/creating-project/references/hubs-projects.md +55 -0
- package/skills/dashboard/SKILL.md +121 -0
- package/skills/dashboard/templates/dashboard-global.md +31 -0
- package/skills/dashboard/templates/dashboard-project.md +40 -0
- package/skills/doctor/SKILL.md +159 -0
- package/skills/doctor/references/gates-stuck-detection.md +38 -0
- package/skills/doctor/report.md +100 -0
- package/skills/evaluating-skills/SKILL.md +140 -0
- package/skills/evaluating-skills/assets/eval-template.json +12 -0
- package/skills/evaluating-skills/evals/evals.json +75 -0
- package/skills/evaluating-skills/references/convention-checks.md +76 -0
- package/skills/evaluating-skills/references/eval-methodology.md +154 -0
- package/skills/executing-plan/SKILL.md +5 -3
- package/skills/install/SKILL.md +69 -8
- package/skills/intent-curator/SKILL.md +3 -3
- package/skills/linking-intents/SKILL.md +5 -1
- package/skills/linking-intents/references/zettelkasten.md +33 -0
- package/skills/managing-index/SKILL.md +5 -1
- package/skills/releasing/SKILL.md +119 -18
- package/skills/releasing/references/deprecations.md +60 -0
- package/skills/research/SKILL.md +114 -0
- package/skills/savepoint/SKILL.md +46 -37
- package/skills/savepoint/references/context-management.md +32 -0
- package/skills/uninstall/SKILL.md +39 -28
- package/skills/update/SKILL.md +41 -36
- package/skills/versions/SKILL.md +65 -0
- package/skills/writing-instructions/SKILL.md +159 -0
- package/skills/writing-instructions/references/agentskills-spec.md +135 -0
- package/skills/writing-plans/SKILL.md +183 -0
- package/templates/agents.md +16 -0
- package/templates/outcome.md +13 -0
- package/templates/project.yml +5 -0
- package/templates/savepoint.md +14 -13
- package/templates/spec.md +25 -0
- package/bin/install.js +0 -29
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
2
|
+
name: plastic-creating-intent
|
|
3
3
|
description: Use when new work begins, the user expresses a new goal, says "new intent", or no active intent exists for the current task. Creates intents in the global store (~/.plastic/store/) or in a project's store (~/.plastic/projects/{slug}/store/) depending on context.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -60,6 +60,16 @@ IDs are scoped to the store they live in. Use the correct store path:
|
|
|
60
60
|
"${CLAUDE_PLUGIN_ROOT}/scripts/folgezettel-id" "<STORE>" "<parent_id>"
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
**Branch vs root — decide before assigning the ID.** Having a "parent" in mind does
|
|
64
|
+
NOT automatically mean branch. Choose by meaning:
|
|
65
|
+
|
|
66
|
+
- **Branch (`14a`, `14b`)** — a sub-task, refinement, or direct continuation. It only
|
|
67
|
+
makes sense as part of the parent's work.
|
|
68
|
+
- **Root (`15`, `16`)** — an independent thought, even if inspired by another intent.
|
|
69
|
+
Capture the inspiration in `sources` (e.g., `sources: ["14"]`), not in the ID.
|
|
70
|
+
- **Rule of thumb:** if the intent could exist without its parent, make it a root and
|
|
71
|
+
set `sources`. Only branch when it genuinely cannot stand alone.
|
|
72
|
+
|
|
63
73
|
### 3. Determine Intent Properties
|
|
64
74
|
|
|
65
75
|
Ask or infer from context:
|
|
@@ -79,7 +89,17 @@ mkdir -p <STORE>/ID--slug
|
|
|
79
89
|
|
|
80
90
|
Write `{ID}--{slug}.md` using the intent template. For project intents, add the governing intent's ID to `sources` and add `[[global:ID]]` backlink in `## Links`.
|
|
81
91
|
|
|
82
|
-
### 5.
|
|
92
|
+
### 5. Self-Verify the Written Intent
|
|
93
|
+
|
|
94
|
+
Before announcing or committing, verify the just-written intent is born complete:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
"${CLAUDE_PLUGIN_ROOT}/scripts/validate-intent" "<STORE>/ID--slug"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
If it exits non-zero, read the stderr report, inject the missing field(s) into the `{ID}--{slug}.md` frontmatter (for example add `chain: []`) WITHOUT disturbing other frontmatter keys, and re-run `validate-intent` until it exits 0. Only then proceed to the remaining steps (project spawn, INDEX.md, commit, announce).
|
|
101
|
+
|
|
102
|
+
### 6. If Implementation Intent Spawns a Project
|
|
83
103
|
|
|
84
104
|
When the user says "start building" or the plan calls for a new project:
|
|
85
105
|
|
|
@@ -89,8 +109,6 @@ When the user says "start building" or the plan calls for a new project:
|
|
|
89
109
|
mkdir -p <project_root>/<slug>
|
|
90
110
|
cd <project_root>/<slug>
|
|
91
111
|
git init
|
|
92
|
-
mkdir -p ~/.plastic/projects/{slug}/store
|
|
93
|
-
touch ~/.plastic/projects/{slug}/store/.gitkeep
|
|
94
112
|
```
|
|
95
113
|
3. Copy `AGENTS.md` template from `${CLAUDE_PLUGIN_ROOT}/templates/agents.md`
|
|
96
114
|
4. Register in `~/.plastic/projects.yml`:
|
|
@@ -101,22 +119,33 @@ When the user says "start building" or the plan calls for a new project:
|
|
|
101
119
|
registered: <today>
|
|
102
120
|
status: active
|
|
103
121
|
```
|
|
104
|
-
5.
|
|
105
|
-
|
|
122
|
+
5. Provision the project store (the single source of truth for store creation;
|
|
123
|
+
runs after step 4 because the provisioner requires the project to be
|
|
124
|
+
registered):
|
|
125
|
+
```bash
|
|
126
|
+
ruby ~/.plastic/scripts/provision-project-store <slug>
|
|
127
|
+
```
|
|
128
|
+
6. Add `project-<slug>` to the intent's `tags` array
|
|
129
|
+
7. Auto-commit in both `~/.plastic/` and the new project
|
|
106
130
|
|
|
107
|
-
###
|
|
131
|
+
### 7. Update INDEX.md
|
|
108
132
|
|
|
109
133
|
- **Global intents:** update `~/.plastic/INDEX.md`
|
|
110
134
|
- **Project intents:** no global INDEX.md change (tactical intents are project-scoped)
|
|
111
135
|
|
|
112
136
|
Add to `## Active` (or `## Future`) and appropriate cluster.
|
|
113
137
|
|
|
114
|
-
###
|
|
138
|
+
### 8. Auto-commit
|
|
115
139
|
|
|
116
140
|
```bash
|
|
117
141
|
cd <store-root> && git add . && git commit -m "feat: create intent ID — [name]"
|
|
118
142
|
```
|
|
119
143
|
|
|
120
|
-
###
|
|
144
|
+
### 9. Announce
|
|
121
145
|
|
|
122
146
|
"Created intent ID — [name]. Placed in: [Active|Future]. Store: [global|project:<slug>|local]."
|
|
147
|
+
|
|
148
|
+
## References
|
|
149
|
+
|
|
150
|
+
- Read `references/lifecycle.md` for the full What→Why→How→Exec stage detail, filesystem-as-schema conventions, and creating-intent step-by-step
|
|
151
|
+
- Read `references/wikilinks.md` for the wikilink syntax table when adding `## Links` to intents
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Building an Intent — Full Lifecycle Detail
|
|
2
|
+
|
|
3
|
+
## What → `## Intent` section
|
|
4
|
+
|
|
5
|
+
The desire. One paragraph. What the human or agent wants.
|
|
6
|
+
This exists from the moment the intent is created.
|
|
7
|
+
|
|
8
|
+
**Deliverable:** `{ID}--{slug}.md`
|
|
9
|
+
|
|
10
|
+
## Why → `## Context` + `### Decisions` sections
|
|
11
|
+
|
|
12
|
+
Why this intent exists. Grows over time through brainstorming and exploration.
|
|
13
|
+
|
|
14
|
+
- **Context** — what we knew going in + what we decided along the way
|
|
15
|
+
- **Decisions** — main premises derived from Context plus decisions from brainstorming/grilling
|
|
16
|
+
- Decisions are Why-level: "status belongs on actions because multiple workstreams", not How-level: "use ACTION_N.md files"
|
|
17
|
+
|
|
18
|
+
**Deliverable:** `spec.md` (consolidated specification from Context + Decisions + brainstorming)
|
|
19
|
+
|
|
20
|
+
## How → Planning and preparation
|
|
21
|
+
|
|
22
|
+
Research decisions, create the implementation plan, define actions.
|
|
23
|
+
|
|
24
|
+
**Deliverable:** `plan.md` + `actions/` + `checklist.md` (execution registry with checkboxes covering all actions)
|
|
25
|
+
|
|
26
|
+
## Exec → Execute actions
|
|
27
|
+
|
|
28
|
+
Execute actions from the plan, track progress via checklist.
|
|
29
|
+
|
|
30
|
+
**Deliverable:** `outcome.md` (detailed result). `## Outcome` in intent.md = short summary written as last step.
|
|
31
|
+
|
|
32
|
+
## `## Insights` — Append-only work log
|
|
33
|
+
|
|
34
|
+
Captured throughout ALL stages. One-liner bullet points.
|
|
35
|
+
Never modified, only appended.
|
|
36
|
+
|
|
37
|
+
Tracks: stage transitions, decisions, shifts, blocks, cancellations, material for future intents.
|
|
38
|
+
This is how execution is tracked. When this intent completes, Insights
|
|
39
|
+
is where to look for what comes next. New intents spawned from Insights
|
|
40
|
+
appear in the `chain` field.
|
|
41
|
+
|
|
42
|
+
## `## Links`
|
|
43
|
+
|
|
44
|
+
Wikilinks for Obsidian graph navigation. Human-facing counterpart to the
|
|
45
|
+
frontmatter knowledge graph.
|
|
46
|
+
|
|
47
|
+
## Conventions — Filesystem as Schema
|
|
48
|
+
|
|
49
|
+
State is derived from what exists, not from what's declared.
|
|
50
|
+
|
|
51
|
+
| Convention | Signal |
|
|
52
|
+
|---|---|
|
|
53
|
+
| No `## Context` | Intent is fleeting (quick capture, non-actionable) |
|
|
54
|
+
| `## Context` has content | Intent is permanent (developed, actionable) |
|
|
55
|
+
| `## Outcome` has content | Intent is done |
|
|
56
|
+
| `## Insights` has `(autonomous)` entries | Intent is/was being delivered autonomously |
|
|
57
|
+
|
|
58
|
+
### Transitions
|
|
59
|
+
|
|
60
|
+
- Fleeting → permanent: add `## Context` (one-way, also makes it actionable)
|
|
61
|
+
- There is no separate "non-actionable → actionable" transition — permanence implies actionability
|
|
62
|
+
- Even research intents are actionable: the research itself is the action, the conclusion is the outcome
|
|
63
|
+
|
|
64
|
+
## Creating an Intent — Full Steps
|
|
65
|
+
|
|
66
|
+
1. Determine the target store: `~/.plastic/store/` for global intents (default), `~/.plastic/projects/{slug}/store/` for project intents
|
|
67
|
+
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>`
|
|
68
|
+
3. Create the intent directory in the chosen store (e.g., `ID--three-to-five-words`)
|
|
69
|
+
4. Create `{ID}--{slug}.md` with frontmatter (id, intent, sources, chain, created, author, tags)
|
|
70
|
+
5. Write `## Intent` — the What
|
|
71
|
+
6. Add remaining sections: `## Context`, `## Outcome`, `## Insights`, `## Links`
|
|
72
|
+
7. Update the appropriate `INDEX.md` — add to Active section and appropriate cluster
|
|
73
|
+
|
|
74
|
+
A fleeting intent can skip `## Context` — just `## Intent` and empty sections.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Wikilink Conventions
|
|
2
|
+
|
|
3
|
+
| Syntax | Meaning |
|
|
4
|
+
|--------|---------|
|
|
5
|
+
| `[[ID]]` | Link to intent in same store (e.g., `[[1a1]]`) |
|
|
6
|
+
| `[[ID\|display text]]` | Link with human-readable label |
|
|
7
|
+
| `[[global:ID]]` | Link to intent in `~/.plastic/store/` |
|
|
8
|
+
| `[[project-slug:ID]]` | Link to intent in `~/.plastic/projects/{slug}/store/` |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
2
|
+
name: plastic-creating-project
|
|
3
3
|
description: >-
|
|
4
4
|
Create a new project from an implementation intent. Sets up project directory,
|
|
5
|
-
git init, AGENTS.md with founding intent decisions, plastic
|
|
5
|
+
git init, AGENTS.md with founding intent decisions, plastic-install --local,
|
|
6
6
|
tactical mirror, projects.yml registration, and framework scaffolding.
|
|
7
7
|
Use when an implementation intent spawns a project, or manually by user.
|
|
8
8
|
---
|
|
@@ -31,9 +31,9 @@ cd <project_root>/<slug>
|
|
|
31
31
|
git init
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
### 3. Run `plastic
|
|
34
|
+
### 3. Run `plastic-install --local`
|
|
35
35
|
|
|
36
|
-
Invoke `plastic
|
|
36
|
+
Invoke `plastic-install --local` in the project directory. This creates:
|
|
37
37
|
```
|
|
38
38
|
.plastic/
|
|
39
39
|
├── store/
|
|
@@ -127,7 +127,24 @@ Read `~/.plastic/projects.yml` and add:
|
|
|
127
127
|
|
|
128
128
|
For Hub-spawned projects, `parent` references the primary founding intent.
|
|
129
129
|
|
|
130
|
-
### 7.
|
|
130
|
+
### 7. Provision the Project Store
|
|
131
|
+
|
|
132
|
+
The `provision-project-store` verb is the single source of truth for store
|
|
133
|
+
creation. Run it after the project is registered in step 6 (the provisioner
|
|
134
|
+
requires registration), and before the QMD step:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
ruby ~/.plastic/scripts/provision-project-store <slug>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This ensures `~/.plastic/projects/<slug>/store/` exists with `.gitkeep`, and
|
|
141
|
+
writes `INDEX.md` and `project.yml` only if missing. It is idempotent, so it is
|
|
142
|
+
safe even when the tactical mirror in step 5 already created the store directory.
|
|
143
|
+
Do not create the store with an inline `mkdir`; the provisioner is the only place
|
|
144
|
+
a store is made. For a project that is already registered but store-less, use the
|
|
145
|
+
`plastic-add-project-store` skill instead.
|
|
146
|
+
|
|
147
|
+
### 8. Mark Global Intent(s) Completed
|
|
131
148
|
|
|
132
149
|
For each founding intent:
|
|
133
150
|
|
|
@@ -137,7 +154,7 @@ For each founding intent:
|
|
|
137
154
|
3. Update `chain` to include `project-<slug>:1`
|
|
138
155
|
4. Move from `## Active` to `## Completed` in `~/.plastic/INDEX.md` (with today's date)
|
|
139
156
|
|
|
140
|
-
###
|
|
157
|
+
### 9. Framework Scaffolding
|
|
141
158
|
|
|
142
159
|
If decisions specify a framework, run the appropriate scaffolding command AFTER steps 3-4 (so scaffolding doesn't overwrite Plastic files or AGENTS.md):
|
|
143
160
|
|
|
@@ -150,17 +167,32 @@ If decisions specify a framework, run the appropriate scaffolding command AFTER
|
|
|
150
167
|
|
|
151
168
|
After scaffolding, verify AGENTS.md and `.plastic/` still exist. If scaffolding overwrote them, restore.
|
|
152
169
|
|
|
153
|
-
###
|
|
170
|
+
### 10. Auto-commit Both Stores
|
|
154
171
|
|
|
155
172
|
```bash
|
|
156
173
|
cd ~/.plastic && git add . && git commit -m "feat: spawn project <slug> from intent <ID>"
|
|
157
174
|
cd <project> && git add . && git commit -m "feat: initialize project from intent <ID>"
|
|
158
175
|
```
|
|
159
176
|
|
|
160
|
-
###
|
|
177
|
+
### 11. Register the project store with QMD (optional)
|
|
178
|
+
|
|
179
|
+
If QMD is installed, register the new project's store as a search collection:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
ruby ~/.plastic/scripts/qmd-sync register --store ~/.plastic/projects/<slug>/store
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`qmd-sync` no-ops when QMD is absent, so run it unconditionally. This adds the
|
|
186
|
+
`plastic-<slug>` collection and indexes it.
|
|
187
|
+
|
|
188
|
+
### 12. Announce
|
|
161
189
|
|
|
162
190
|
Log in `## Insights` of each founding intent:
|
|
163
191
|
> "Project `<slug>` created at `<path>`. Tactical mirror: `project-<slug>:1` (autonomous)"
|
|
164
192
|
|
|
165
193
|
Announce to user:
|
|
166
194
|
> "Project `<slug>` created at `<path>`. AGENTS.md populated with [N] decisions from [founding intent IDs]. Tactical mirror `1` is now the active intent in the project store."
|
|
195
|
+
|
|
196
|
+
## References
|
|
197
|
+
|
|
198
|
+
- Read `references/hubs-projects.md` for the full hub/project relationship model, project creation flow, and cross-linking conventions
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Hubs and Projects
|
|
2
|
+
|
|
3
|
+
## Hubs
|
|
4
|
+
|
|
5
|
+
A Hub is a cloud of intents around related topics. Hubs emerge naturally from
|
|
6
|
+
Folgezettel branching — intents that spawn in the same direction cluster.
|
|
7
|
+
|
|
8
|
+
- A Hub can spawn a Project. The Hub holds the founding ideas.
|
|
9
|
+
- A single intent can also spawn a Project.
|
|
10
|
+
- Hub-spawned projects revolve around different ideas around related topics.
|
|
11
|
+
- Intent-spawned projects revolve around the single founding intent.
|
|
12
|
+
- A Project is the deliverable outcome of one or more intents.
|
|
13
|
+
|
|
14
|
+
Hubs are represented as clusters in INDEX.md.
|
|
15
|
+
|
|
16
|
+
## Projects — Full Detail
|
|
17
|
+
|
|
18
|
+
A Project is a deliverable grouping of intents. Projects have two stores:
|
|
19
|
+
|
|
20
|
+
- **Global store** (`~/.plastic/store/`): strategic intents
|
|
21
|
+
- **Project store** (`~/.plastic/projects/{slug}/store/`): tactical intents
|
|
22
|
+
|
|
23
|
+
`projects.yml` maps project slugs to codebase paths:
|
|
24
|
+
```yaml
|
|
25
|
+
projects:
|
|
26
|
+
plastic:
|
|
27
|
+
path: "/path/to/plastic"
|
|
28
|
+
remote: "git@github.com:org/plastic.git"
|
|
29
|
+
registered: '2026-05-26'
|
|
30
|
+
status: active
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Config resolution: `~/.plastic/projects/{slug}/config.yml` overrides `~/.plastic/config.yml`.
|
|
34
|
+
|
|
35
|
+
Cross-linking: project intents reference global intents via `[[global:ID]]`. Global intents reference project intents via `[[project-slug:ID]]`.
|
|
36
|
+
|
|
37
|
+
## Privacy and Collaboration
|
|
38
|
+
|
|
39
|
+
**Plastic is personal.** All intent data lives under `~/.plastic/` — one location,
|
|
40
|
+
one git repo, never pushed. Each person has their own intent store.
|
|
41
|
+
|
|
42
|
+
Collaboration happens through pull requests and project conventions, not shared intents.
|
|
43
|
+
When an intent delivers something that changes how a project works, the decision gets
|
|
44
|
+
written into the project's shared files (README, docs, config). The intents themselves
|
|
45
|
+
are private working memory.
|
|
46
|
+
|
|
47
|
+
## Project Creation Flow
|
|
48
|
+
|
|
49
|
+
When an implementation intent spawns a project:
|
|
50
|
+
1. Determine project path from config `project_roots` or intent context
|
|
51
|
+
2. `gh repo create --private` (agent-created repos are always private by default)
|
|
52
|
+
3. Set up project directory, git init, AGENTS.md with founding intent decisions
|
|
53
|
+
4. Register in `projects.yml`
|
|
54
|
+
5. Create tactical mirror in project store
|
|
55
|
+
6. The global intent completes; the tactical mirror becomes the active intent
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-dashboard
|
|
3
|
+
description: Use when the user wants an overview of intents, asks "where are we", "what's next", "what should I work on", "show the dashboard", or invokes /plastic-dashboard. Renders a deterministic Value×Effort work cockpit as Markdown across the global store and all projects, and emits a machine-readable queue that auto mode consumes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dashboard — Plastic Work Cockpit
|
|
7
|
+
|
|
8
|
+
A deterministic overview of the intent store(s). It answers three questions at a glance:
|
|
9
|
+
**where we are** (recently worked), **where we go next** (a Value×Effort matrix), and
|
|
10
|
+
**how to conduct it** (a disposition per intent). The human-facing surface is **Markdown**,
|
|
11
|
+
because the user's UI renders Markdown natively but collapses raw tool-call stdout.
|
|
12
|
+
|
|
13
|
+
The script does all the data work. The agent fills a Markdown template from the script's
|
|
14
|
+
payload with near-zero reasoning and **presents the filled board in its reply**. Same store
|
|
15
|
+
state → byte-identical payload, regardless of model. Do NOT hand-summarize intents.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- User invokes `/plastic-dashboard`
|
|
20
|
+
- User asks "where are we", "what's next", "what should I work on", "show me the intents"
|
|
21
|
+
- `plastic-continuing` lands on the board on resume
|
|
22
|
+
- `plastic-auto` reads `--json` to choose the next dispatchable intent
|
|
23
|
+
|
|
24
|
+
## Procedure (the Markdown board — default human surface)
|
|
25
|
+
|
|
26
|
+
### Step 1 — Get the data payload
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ruby ~/.plastic/scripts/dashboard.rb [continue|project <slug>] --data
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- `continue` (default) → the **global** board payload (`mode: "global"`).
|
|
33
|
+
- `project <slug>` → that **project** board payload (`mode: "project"`).
|
|
34
|
+
|
|
35
|
+
The payload is read-only JSON. Global-board fields: `date`, `store_health`, `recently_worked`,
|
|
36
|
+
`matrix` (`quick_win`/`next_big`/`defer`/`triage`/`research`, each a list of `{line, bullet, ...}`),
|
|
37
|
+
`counts`, `projects`, `project_totals`. Project-board fields: `slug`, `store_health`,
|
|
38
|
+
`description`, `recently_worked`, `matrix`, `counts`, `active`, `future`.
|
|
39
|
+
|
|
40
|
+
Each board load runs the scoped store check (`doctor --store <scope>`): the global board runs
|
|
41
|
+
`--store global` and a project board runs `--store <slug>`. The result rides in the payload as
|
|
42
|
+
`store_health` (`{scope, status, summary, failing_checks}`). Surface it as a one-line
|
|
43
|
+
store-health note on the board (for example `store health: pass (3/3)` or
|
|
44
|
+
`store health: warn (orphaned_intents)`). It is non-fatal: a warn or fail is shown as data and
|
|
45
|
+
never blocks the board.
|
|
46
|
+
|
|
47
|
+
### Step 2 — Fill the matching template
|
|
48
|
+
|
|
49
|
+
Templates live in this skill's `templates/` directory:
|
|
50
|
+
`~/.claude/skills/plastic-dashboard/templates/dashboard-global.md` and
|
|
51
|
+
`dashboard-project.md`.
|
|
52
|
+
|
|
53
|
+
Fill mechanically — no rewriting, no re-sorting:
|
|
54
|
+
- `{{a.b.count}}` → the integer (e.g. `matrix.quick_win.count` = that list's length).
|
|
55
|
+
- `{{...lines}}` → join the list's `.line` strings with **real newlines** (one per line).
|
|
56
|
+
These lines are already glyph-led (the glyph is the bullet — never add `-`, never emit
|
|
57
|
+
`<br>`). If a matrix quadrant list is empty, render `_(none)_`.
|
|
58
|
+
- `projects.lines` → one line per project:
|
|
59
|
+
`- **{slug}** — {description} · active {active} · done {done} · future {future} · last accessed {last_accessed_at[0,10]}`.
|
|
60
|
+
- Scalars (`{{date}}`, `{{slug}}`, `{{description}}`) → substitute verbatim.
|
|
61
|
+
|
|
62
|
+
### Step 3 — Present it (mandatory, every invocation)
|
|
63
|
+
|
|
64
|
+
**Paste the filled Markdown into your reply.** This is non-optional: the board only reaches
|
|
65
|
+
the user when it is in the chat reply, not in tool-call stdout. Never describe the board
|
|
66
|
+
instead of showing it.
|
|
67
|
+
|
|
68
|
+
### Step 4 — Entry flow (the board is the menu)
|
|
69
|
+
|
|
70
|
+
The board lists everything; the user navigates by free prose (no capped picker):
|
|
71
|
+
- On the **global** board, the user replies with an **intent id** (work it), a **project
|
|
72
|
+
name** (re-run `project <slug> --data` and present that board), or **"new"** (start a new
|
|
73
|
+
intent in global via `plastic-creating-intent`).
|
|
74
|
+
- On a **project** board, the user replies with an **intent id**, or **"global"** to return.
|
|
75
|
+
|
|
76
|
+
## Auto-mode contract (`--json`)
|
|
77
|
+
|
|
78
|
+
`plastic-auto` consumes a separate machine-readable manifest (unchanged):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
ruby ~/.plastic/scripts/dashboard.rb [continue|project <slug>|all] --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{ "generated_for": "auto-mode", "scope": "<scope|all>",
|
|
86
|
+
"next_big_thing": "<id|null>",
|
|
87
|
+
"dispatchable_queue": [ {"id","scope","disposition","type","value","effort","flags","rank"} ],
|
|
88
|
+
"human_only": ["<id>", "..."] }
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Work `dispatchable_queue` in `rank` order (`defer`/`research`); leave `human_only` for the user.
|
|
92
|
+
|
|
93
|
+
## Text modes (terminal / legacy)
|
|
94
|
+
|
|
95
|
+
`dashboard.rb [continue|project <slug>|all]` with no flag still prints the ASCII cockpit for
|
|
96
|
+
a raw terminal. The Markdown board (`--data` + template) is the surface for the chat UI.
|
|
97
|
+
|
|
98
|
+
## How classification works (deterministic)
|
|
99
|
+
|
|
100
|
+
- **Effort** — small for `research`/`exploration`/`bugfix`, for already-scoped intents
|
|
101
|
+
(plan/checklist exists), or deep refinement branches; big otherwise.
|
|
102
|
+
- **Value → high** when any of: explicit `value: high`; a human-authored **root** intent; an
|
|
103
|
+
intent with a non-empty `chain`; or an intent that is a `source` of ≥1 other intent. Else low.
|
|
104
|
+
- **Flags** — `unblocked` only when a **future** intent has **all** its `sources` done;
|
|
105
|
+
`stale` only on future intents past the staleness threshold. Both kept low-noise by design.
|
|
106
|
+
- **Override** — a `value: high|low` frontmatter field always wins (pre-stamped data, never
|
|
107
|
+
model judgment at render time).
|
|
108
|
+
|
|
109
|
+
## Eval
|
|
110
|
+
|
|
111
|
+
The eval is the payload + golden snapshots: run the engine against the fixture store and
|
|
112
|
+
assert the `--data` payload shape/sorting/classification and the byte-identical `--json` +
|
|
113
|
+
text goldens in `test/fixtures/dashboard/`. See `test/dashboard_test.rb`. Drift without an
|
|
114
|
+
intentional change means the skill is broken.
|
|
115
|
+
|
|
116
|
+
## Notes
|
|
117
|
+
|
|
118
|
+
- Quadrant lists are **not** Markdown `-` bullets — the glyph is the bullet (the boards are
|
|
119
|
+
UI-only and may evolve, so they need not be valid Markdown lists). Never emit `<br>`.
|
|
120
|
+
- Clusters (Zettelkasten grouping in INDEX.md) are intentionally not rendered.
|
|
121
|
+
- Additive: changes no core lifecycle, gate, or cycle logic.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# 🧩 Plastic · Global Board — {{date}}
|
|
2
|
+
|
|
3
|
+
**Recently worked** · last 24h
|
|
4
|
+
{{recently_worked.lines}}
|
|
5
|
+
|
|
6
|
+
## Where we go next · Value × Effort *(global intents only)*
|
|
7
|
+
|
|
8
|
+
| | Small effort | Big effort |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| **High value** | ⚡ **Quick win** · {{matrix.quick_win.count}} | ★ **Next big thing** · {{matrix.next_big.count}} |
|
|
11
|
+
| **Low value** | → **Defer (agent)** · {{matrix.defer.count}} | ⚑ **Triage** · {{matrix.triage.count}} |
|
|
12
|
+
|
|
13
|
+
**⚡ Quick win** — small effort, high value
|
|
14
|
+
{{matrix.quick_win.lines}}
|
|
15
|
+
|
|
16
|
+
**★ Next big thing** — big effort, high value
|
|
17
|
+
{{matrix.next_big.lines}}
|
|
18
|
+
|
|
19
|
+
**→ Defer (agent)** — small effort, low value
|
|
20
|
+
{{matrix.defer.lines}}
|
|
21
|
+
|
|
22
|
+
**⚑ Triage** — big effort, low value
|
|
23
|
+
{{matrix.triage.lines}}
|
|
24
|
+
|
|
25
|
+
🔬 **Research → agent**
|
|
26
|
+
{{matrix.research.lines}}
|
|
27
|
+
|
|
28
|
+
## Projects · active {{project_totals.active}} · done {{project_totals.done}} · future {{project_totals.future}}
|
|
29
|
+
{{projects.lines}}
|
|
30
|
+
|
|
31
|
+
**What would you like to work on next?** (type an **intent id**, a **project name**, or anything **new** you'd like to start)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# 📦 {{slug}} · Project Board — {{date}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
**Recently worked** · last 24h
|
|
6
|
+
{{recently_worked.lines}}
|
|
7
|
+
|
|
8
|
+
## Where we go next · Value × Effort
|
|
9
|
+
|
|
10
|
+
| | Small effort | Big effort |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| **High value** | ⚡ **Quick win** · {{matrix.quick_win.count}} | ★ **Next big thing** · {{matrix.next_big.count}} |
|
|
13
|
+
| **Low value** | → **Defer (agent)** · {{matrix.defer.count}} | ⚑ **Triage** · {{matrix.triage.count}} |
|
|
14
|
+
|
|
15
|
+
**⚡ Quick win** — small effort, high value
|
|
16
|
+
{{matrix.quick_win.lines}}
|
|
17
|
+
|
|
18
|
+
**★ Next big thing** — big effort, high value
|
|
19
|
+
{{matrix.next_big.lines}}
|
|
20
|
+
|
|
21
|
+
**→ Defer (agent)** — small effort, low value
|
|
22
|
+
{{matrix.defer.lines}}
|
|
23
|
+
|
|
24
|
+
**⚑ Triage** — big effort, low value
|
|
25
|
+
{{matrix.triage.lines}}
|
|
26
|
+
|
|
27
|
+
🔬 **Research → agent**
|
|
28
|
+
{{matrix.research.lines}}
|
|
29
|
+
|
|
30
|
+
## Intents · active {{counts.active}} · done {{counts.done}} · future {{counts.future}}
|
|
31
|
+
|
|
32
|
+
**Active**
|
|
33
|
+
{{active.lines}}
|
|
34
|
+
|
|
35
|
+
**Future**
|
|
36
|
+
{{future.lines}}
|
|
37
|
+
|
|
38
|
+
**Legend** · ○ What ◔ Why ◑ How ◕ Exec ● Done · ⚡ quick win ★ big → defer ⚑ triage 🔬 research
|
|
39
|
+
|
|
40
|
+
**What would you like to work on next?** (type an **intent id**, or **global** to go back)
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-doctor
|
|
3
|
+
description: Use when diagnosing Plastic installation health, after updates, or when something seems broken. Runs checks and reports findings with fix options.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Doctor — Plastic Health Check
|
|
7
|
+
|
|
8
|
+
## Scopes
|
|
9
|
+
|
|
10
|
+
Doctor has three scopes. Pick the right one for the situation:
|
|
11
|
+
|
|
12
|
+
| Scope | Flag | When it runs | States |
|
|
13
|
+
|-------|------|--------------|--------|
|
|
14
|
+
| Core check | `--core` | SessionStart hook (automatic), also available on demand | Binary: pass or error |
|
|
15
|
+
| Store check | `--store [global\|<slug>]` | Dashboard load, `plastic-continuing` | Three-state: pass / warn / fail |
|
|
16
|
+
| Full check | (no flag) | After every update (automatic), or `/plastic-doctor` | Three-state: pass / warn / fail |
|
|
17
|
+
|
|
18
|
+
### `--core` (binary, manifest-backed)
|
|
19
|
+
|
|
20
|
+
Verifies that every core file is present and content-matches what the installed
|
|
21
|
+
version shipped. It checks two install manifests:
|
|
22
|
+
|
|
23
|
+
- `~/.plastic/manifest.json` (global manifest, covers PLASTIC.md and global scripts)
|
|
24
|
+
- `~/.claude/plastic/manifest.json` (agent-side manifest, covers agent scripts and hooks)
|
|
25
|
+
|
|
26
|
+
Each manifest maps a file path to its SHA256. The core check also confirms hooks
|
|
27
|
+
are registered, scripts are present and executable, and the installed version
|
|
28
|
+
matches. Result is binary: exit 0 on pass, non-zero on error. It never produces
|
|
29
|
+
warnings.
|
|
30
|
+
|
|
31
|
+
### `--store [global|<slug>]`
|
|
32
|
+
|
|
33
|
+
Checks store state: intents are well-formed, INDEX sections are present, conventions
|
|
34
|
+
are followed, and links are valid. Scope options:
|
|
35
|
+
|
|
36
|
+
- No argument: checks all stores (global and all projects)
|
|
37
|
+
- `global`: checks only the global store
|
|
38
|
+
- A project slug (e.g. `--store plastic`): checks only that project's store
|
|
39
|
+
|
|
40
|
+
Produces three-state results (pass / warn / fail) and is run per-scope at dashboard
|
|
41
|
+
load time: the global board uses `--store global`, a project board uses `--store <slug>`.
|
|
42
|
+
|
|
43
|
+
### Full doctor (no flag)
|
|
44
|
+
|
|
45
|
+
Runs core plus all store checks plus deprecation checks. This is what `/plastic-doctor`
|
|
46
|
+
invokes. It also runs automatically after every `plastic-update` (informational,
|
|
47
|
+
does not block or revert the update).
|
|
48
|
+
|
|
49
|
+
## When to Use
|
|
50
|
+
|
|
51
|
+
- User invokes `/plastic-doctor` (full check)
|
|
52
|
+
- After `plastic-update` completes (automatically, full check)
|
|
53
|
+
- When hooks aren't firing, skills aren't loading, or something seems broken
|
|
54
|
+
- When the user says "check plastic", "diagnose", "what's wrong with plastic"
|
|
55
|
+
|
|
56
|
+
## Procedure
|
|
57
|
+
|
|
58
|
+
### Step 1: Run the diagnostic script
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
ruby ~/.plastic/scripts/doctor.rb --agent claude
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Replace `claude` with the current agent type if known (`codex`, `hermes`).
|
|
65
|
+
|
|
66
|
+
Parse the JSON output from stdout. The script is read-only and never modifies
|
|
67
|
+
files. Errors go to stderr.
|
|
68
|
+
|
|
69
|
+
Exit codes indicate check results, not script failure:
|
|
70
|
+
- `0` — all checks passed
|
|
71
|
+
- `1` — warnings found
|
|
72
|
+
- `2` — failures found
|
|
73
|
+
|
|
74
|
+
All three exit codes mean the script ran successfully. Do not treat non-zero
|
|
75
|
+
as an error.
|
|
76
|
+
|
|
77
|
+
### Step 2: Determine overall status
|
|
78
|
+
|
|
79
|
+
Read the `status` field from the JSON root:
|
|
80
|
+
|
|
81
|
+
| Status | Meaning |
|
|
82
|
+
|--------|---------|
|
|
83
|
+
| `pass` | Everything is healthy |
|
|
84
|
+
| `warn` | Warnings found but Plastic works normally |
|
|
85
|
+
| `fail` | Blocking issues that prevent Plastic from operating |
|
|
86
|
+
|
|
87
|
+
### Step 3: Fill the report template
|
|
88
|
+
|
|
89
|
+
Read `report.md` from the same directory as this SKILL.md
|
|
90
|
+
(`~/.plastic/skills/doctor/report.md` at runtime, or the plugin source
|
|
91
|
+
`skills/doctor/report.md` during development).
|
|
92
|
+
|
|
93
|
+
Group checks by category. For each category, list the checks with their
|
|
94
|
+
status icon and message. If a check has `details`, list them as sub-items.
|
|
95
|
+
|
|
96
|
+
Present the filled template to the user.
|
|
97
|
+
|
|
98
|
+
### Step 4: Offer fixes (if applicable)
|
|
99
|
+
|
|
100
|
+
If any checks have `fixable: true` AND status is not `pass`:
|
|
101
|
+
|
|
102
|
+
1. Group fixable items by category
|
|
103
|
+
2. Show what each fix would do (from `fix_hint`)
|
|
104
|
+
3. Ask the user: **"Fix all / Select individually / Skip"**
|
|
105
|
+
|
|
106
|
+
If no fixable issues exist, skip this step.
|
|
107
|
+
|
|
108
|
+
### Step 5: Apply fixes
|
|
109
|
+
|
|
110
|
+
Use the `fix_hint` value to determine the correct action:
|
|
111
|
+
|
|
112
|
+
| Fix hint pattern | Agent action |
|
|
113
|
+
|---|---|
|
|
114
|
+
| "chmod +x on the listed files" | Run `chmod +x` on each file listed in `details` |
|
|
115
|
+
| "Create missing directory" | Run `mkdir -p` on the path |
|
|
116
|
+
| "Create INDEX.md with required sections" | Write INDEX.md with the 5 sections: Active, Future, Clusters, Abandoned, Completed |
|
|
117
|
+
| "Add missing entries to INDEX.md" | Add orphaned intents to the appropriate INDEX.md section |
|
|
118
|
+
| "Remove stale references from INDEX.md" | Edit INDEX.md to remove ghost references |
|
|
119
|
+
| "Inject the missing required frontmatter field(s)" | Edit the intent's `{ID}--{slug}.md` frontmatter to add the missing key (e.g. `chain: []`) without touching other keys |
|
|
120
|
+
| "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (or invoke the `plastic-add-project-store` skill) to create the missing store |
|
|
121
|
+
| "Re-run installer" | Run `npx @zalom/plastic@latest --agent` |
|
|
122
|
+
|
|
123
|
+
For fixes the agent cannot handle automatically, explain what the user needs
|
|
124
|
+
to do manually.
|
|
125
|
+
|
|
126
|
+
### Step 6: Verify
|
|
127
|
+
|
|
128
|
+
After applying fixes, re-run the diagnostic script:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
ruby ~/.plastic/scripts/doctor.rb --agent claude
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Show the updated results.
|
|
135
|
+
|
|
136
|
+
- If all checks pass: announce success.
|
|
137
|
+
- If issues remain: explain what is still wrong and what the user can do.
|
|
138
|
+
|
|
139
|
+
## Post-Update Mode
|
|
140
|
+
|
|
141
|
+
When invoked from `plastic-update` (not directly by the user):
|
|
142
|
+
|
|
143
|
+
1. Run the diagnostic script as in Step 1.
|
|
144
|
+
2. If all checks pass: show a single line — **"Health check: all clear."**
|
|
145
|
+
3. If issues are found: show the full report (Steps 3-6).
|
|
146
|
+
|
|
147
|
+
This keeps the update flow clean when nothing is wrong.
|
|
148
|
+
|
|
149
|
+
## Important Notes
|
|
150
|
+
|
|
151
|
+
- The script is **read-only**. It inspects but never modifies files.
|
|
152
|
+
All fixes are performed by the agent using standard tools.
|
|
153
|
+
- The script outputs JSON to stdout. Any diagnostic errors go to stderr.
|
|
154
|
+
- Non-zero exit codes mean "issues found", not "script crashed".
|
|
155
|
+
Always parse stdout regardless of exit code.
|
|
156
|
+
|
|
157
|
+
## References
|
|
158
|
+
|
|
159
|
+
- Read `references/gates-stuck-detection.md` for the full gate enforcement table, bridge file pattern, and stuck detection thresholds when diagnosing gate failures or stuck agents
|