@zalom/plastic 1.0.0-beta.8 → 1.0.0
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-reference.md +133 -0
- package/PLASTIC.md +407 -84
- package/README.md +99 -82
- package/agents/plastic-brainstorming.md +12 -9
- package/agents/plastic-enforcer.md +52 -12
- package/agents/plastic-executor.md +10 -10
- package/agents/plastic-future-intent-researcher.md +4 -8
- package/agents/plastic-intent-curator.md +12 -14
- package/agents/plastic-intent-discovery.md +35 -0
- package/agents/plastic-planner.md +15 -10
- package/agents/plastic-spec-specialist.md +15 -10
- package/bin/plastic.js +7 -3
- package/hooks/code-gate +10 -1
- package/hooks/hooks.json +28 -3
- package/hooks/lock-gate +21 -0
- package/hooks/retrieval-gate +10 -0
- package/hooks/savepoint-pre +10 -0
- package/hooks/statusline +48 -6
- package/package.json +2 -1
- package/scripts/agent-report +21 -0
- package/scripts/dashboard.rb +98 -23
- package/scripts/doctor.rb +404 -5
- package/scripts/hook-auto-arm +1 -1
- package/scripts/hook-bash-gate +22 -4
- package/scripts/hook-code-gate +11 -6
- package/scripts/hook-continue +17 -0
- package/scripts/hook-create-gate +45 -9
- package/scripts/hook-gate-check +24 -23
- package/scripts/hook-lock-gate +83 -0
- package/scripts/hook-retrieval-gate +148 -0
- package/scripts/hook-savepoint-pre +32 -0
- package/scripts/hook-session-start +1 -1
- package/scripts/insight-append +51 -0
- package/scripts/install.rb +44 -7
- package/scripts/lib/agent_models.rb +43 -0
- package/scripts/lib/bridge.rb +924 -84
- package/scripts/lib/dashboard_banner.rb +42 -0
- package/scripts/lib/frontmatter_writer.rb +130 -0
- package/scripts/lib/graph_rebuild.rb +328 -0
- package/scripts/lib/hook_registry.rb +95 -0
- package/scripts/lib/insights.rb +86 -0
- package/scripts/lib/installer_core.rb +104 -60
- package/scripts/lib/link_suggestions.rb +319 -0
- package/scripts/lib/links_projection.rb +160 -0
- package/scripts/lib/links_section.rb +207 -0
- package/scripts/lib/lock.rb +375 -0
- package/scripts/lib/power_tools.rb +22 -21
- package/scripts/lib/preflight.rb +79 -0
- package/scripts/lib/qmd_sync.rb +15 -0
- package/scripts/lib/retrieval_gate.rb +211 -0
- package/scripts/lib/worktree.rb +384 -0
- package/scripts/link-suggest +213 -0
- package/scripts/new-intent +138 -29
- package/scripts/plastic-lock +164 -0
- package/scripts/project-links +287 -0
- package/scripts/read-config +4 -0
- package/scripts/rebuild-graph +244 -0
- package/scripts/spawn-preamble +11 -3
- package/scripts/update.rb +16 -7
- package/skills/auto/SKILL.md +126 -19
- package/skills/auto/references/agent-architecture.md +7 -4
- package/skills/auto/references/agent-report-contract.md +36 -1
- package/skills/auto/references/end-tail.md +56 -0
- package/skills/auto/references/human-report-contract.md +55 -0
- package/skills/auto/references/tiers.md +77 -0
- package/skills/brainstorming/SKILL.md +7 -34
- package/skills/brainstorming/references/design-principles.md +49 -0
- package/skills/continuing/SKILL.md +26 -7
- package/skills/creating-intent/SKILL.md +13 -28
- package/skills/creating-intent/references/lifecycle.md +9 -4
- package/skills/creating-project/SKILL.md +11 -74
- package/skills/creating-project/references/project-scaffolding.md +97 -0
- package/skills/creating-skills/SKILL.md +65 -0
- package/skills/creating-skills/evals/evals.json +108 -0
- package/skills/creating-skills/references/agents.md +168 -0
- package/skills/creating-skills/references/evals.md +41 -0
- package/skills/creating-skills/references/hooks.md +248 -0
- package/skills/creating-skills/references/progressive-disclosure.md +176 -0
- package/skills/creating-skills/references/scripts.md +166 -0
- package/skills/creating-skills/references/skills.md +165 -0
- package/skills/creating-skills/scripts/scaffold.rb +313 -0
- package/skills/dashboard/SKILL.md +13 -11
- package/skills/dashboard/references/classification.md +22 -0
- package/skills/doctor/SKILL.md +10 -7
- package/skills/executing-plan/SKILL.md +4 -4
- package/skills/humanizer/SKILL.md +39 -0
- package/skills/humanizer/evals/evals.json +70 -0
- package/skills/humanizer/references/always-on-snippet.md +9 -0
- package/skills/humanizer/references/examples.md +48 -0
- package/skills/install/SKILL.md +75 -84
- package/skills/intent-curator/SKILL.md +5 -1
- package/skills/intent-discovery/SKILL.md +47 -0
- package/skills/intent-starting/SKILL.md +130 -0
- package/skills/intent-starting/evals/evals.json +117 -0
- package/skills/intent-starting/references/boarding-matrix.md +35 -0
- package/skills/linking-intents/SKILL.md +48 -12
- package/skills/linking-intents/references/zettelkasten.md +7 -0
- package/skills/lock/SKILL.md +41 -0
- package/skills/managing-index/SKILL.md +6 -0
- package/skills/managing-index/references/zettelkasten-linking.md +6 -1
- package/skills/releasing/SKILL.md +44 -29
- package/skills/releasing/references/promotion-and-tagging.md +60 -0
- package/skills/roadmap/SKILL.md +51 -0
- package/skills/roadmap/references/file-format.md +91 -0
- package/skills/roadmap/references/operations.md +78 -0
- package/skills/uninstall/SKILL.md +29 -11
- package/skills/update/SKILL.md +34 -23
- package/skills/versions/SKILL.md +27 -12
- package/skills/writing-plans/SKILL.md +10 -88
- package/skills/writing-plans/references/plan-format.md +102 -0
- package/templates/config.yml +8 -0
- package/templates/outcome.md +3 -0
- package/templates/revisions.md +58 -0
- package/templates/roadmap.md +30 -0
- package/skills/writing-instructions/SKILL.md +0 -159
- package/skills/writing-instructions/references/agentskills-spec.md +0 -135
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# How Classification Works (Deterministic)
|
|
2
|
+
|
|
3
|
+
The script (`dashboard.rb`) computes Effort/Value/Flags/Override/Caps deterministically;
|
|
4
|
+
the agent never re-derives them. Read this to explain or debug a quadrant assignment.
|
|
5
|
+
|
|
6
|
+
- **Effort** — small for `research`/`exploration`/`bugfix`, for already-scoped intents
|
|
7
|
+
(plan/checklist exists), or a **branch id** (folgezettel depth ≥ 2, e.g. `4a`, `12b3`); big
|
|
8
|
+
otherwise. A root id (a bare number) is always depth 1, so it is never demoted by this rule.
|
|
9
|
+
- **Value → high** when any of: explicit `value: high`; a human-authored **root** intent; or
|
|
10
|
+
an intent that is a `source` of ≥1 other intent (it has spawned follow-on work). A purely
|
|
11
|
+
relational `chain` entry alone is **not** a value signal (intent 68) — else low.
|
|
12
|
+
- **Flags** — `unblocked` only when a **future** intent has **all** its `sources` done AND at
|
|
13
|
+
least one source's completion date is strictly later than the intent's own `created` date (a
|
|
14
|
+
genuine wait, not a birth-time default); `in-progress` only when the savepoint ledger shows
|
|
15
|
+
real post-birth activity, not just the creation stamp; `stale` only on future intents past
|
|
16
|
+
the staleness threshold. All three kept low-noise by design.
|
|
17
|
+
- **Override** — a `value: high|low` frontmatter field always wins (pre-stamped data, never
|
|
18
|
+
model judgment at render time).
|
|
19
|
+
- **Caps** — quadrant lists and the project board's `active`/`future` lists are capped at 8
|
|
20
|
+
entries plus a trailing "+N more" line; each entry's text is truncated to 120 characters
|
|
21
|
+
with a trailing ellipsis. Applies to the Markdown board only (the ASCII renderer has its own
|
|
22
|
+
separate `CELL_CAP`).
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: plastic-doctor
|
|
|
3
3
|
description: Use when diagnosing Plastic installation health, after updates, or when something seems broken. Runs checks and reports findings with fix options.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Doctor
|
|
6
|
+
# Doctor: Plastic Health Check
|
|
7
7
|
|
|
8
8
|
## Scopes
|
|
9
9
|
|
|
@@ -67,9 +67,9 @@ Parse the JSON output from stdout. The script is read-only and never modifies
|
|
|
67
67
|
files. Errors go to stderr.
|
|
68
68
|
|
|
69
69
|
Exit codes indicate check results, not script failure:
|
|
70
|
-
- `0
|
|
71
|
-
- `1
|
|
72
|
-
- `2
|
|
70
|
+
- `0`: all checks passed
|
|
71
|
+
- `1`: warnings found
|
|
72
|
+
- `2`: failures found
|
|
73
73
|
|
|
74
74
|
All three exit codes mean the script ran successfully. Do not treat non-zero
|
|
75
75
|
as an error.
|
|
@@ -118,10 +118,13 @@ Use the `fix_hint` value to determine the correct action:
|
|
|
118
118
|
| "Remove stale references from INDEX.md" | Edit INDEX.md to remove ghost references |
|
|
119
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
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
|
|
121
|
+
| "Re-run installer" | Run `npx -y @zalom/plastic@<channel> install --agent <agent>` (channel: -alpha->@alpha, -beta->@beta, else @latest) |
|
|
122
|
+
| "Dispatch plastic-intent-curator ... revisions.md ..." | Invoke the `plastic-intent-curator` (or the agent) to relocate the flagged section or ref into the intent's `revisions.md` via move-and-record (one dated, `[rule: <tag>]`-tagged entry per item), per PLASTIC.md > Structural maintenance and revisions.md. For a missing required section, restore or reproject it instead. |
|
|
122
123
|
|
|
123
124
|
For fixes the agent cannot handle automatically, explain what the user needs
|
|
124
|
-
to do manually.
|
|
125
|
+
to do manually. The `revisions.md` remedy is curator-applied (a move-and-record
|
|
126
|
+
relocation, not a mechanical edit) and stays human-gated by the Step 4
|
|
127
|
+
Fix / Select / Skip prompt.
|
|
125
128
|
|
|
126
129
|
### Step 6: Verify
|
|
127
130
|
|
|
@@ -141,7 +144,7 @@ Show the updated results.
|
|
|
141
144
|
When invoked from `plastic-update` (not directly by the user):
|
|
142
145
|
|
|
143
146
|
1. Run the diagnostic script as in Step 1.
|
|
144
|
-
2. If all checks pass
|
|
147
|
+
2. If all checks pass, show a single line: **"Health check: all clear."**
|
|
145
148
|
3. If issues are found: show the full report (Steps 3-6).
|
|
146
149
|
|
|
147
150
|
This keeps the update flow clean when nothing is wrong.
|
|
@@ -70,12 +70,12 @@ After all tasks complete, dispatch a final reviewer for the entire implementatio
|
|
|
70
70
|
### Step 4: Update Intent and Complete
|
|
71
71
|
Capture observations in `## Insights`. When ALL checklist items are checked:
|
|
72
72
|
|
|
73
|
-
1. Write `outcome.md` with detailed results in the intent directory, using the `${CLAUDE_PLUGIN_ROOT}/templates/outcome.md` form
|
|
73
|
+
1. Write `outcome.md` with detailed results in the intent directory, using the `${CLAUDE_PLUGIN_ROOT}/templates/outcome.md` form. Set the frontmatter `disposition: delivered` (the delivered terminal). `outcome.md` is mandatory at every terminal and self-declares its disposition (canonical done-marker in PLASTIC.md).
|
|
74
74
|
2. Write `## Outcome` summary in the intent file (1-2 sentences)
|
|
75
75
|
3. Move intent from `## Active` to `## Completed` in INDEX.md (with today's date)
|
|
76
76
|
4. Update cluster entries to show `_(completed)_`
|
|
77
77
|
5. Auto-commit: `cd <store-root> && git add . && git commit -m "feat: complete intent <ID> — <name>"`
|
|
78
|
-
6.
|
|
78
|
+
6. QMD reindex LAST (canonical End tail). As the final End-tail step, after the terminal move and any disarm, ALWAYS refresh the QMD search index for this store (no-op when QMD is absent), running in the background so it never blocks the turn: `ruby ~/.plastic/scripts/qmd-sync reindex --store <store-root> --async`. Completion is the lifecycle event that keeps the search index fresh, and the reindex runs last so the index never references a bridge or lock that is about to disappear (see PLASTIC.md `## Delivery Isolation and the Single-Owner Lock`).
|
|
79
79
|
|
|
80
80
|
**This is NOT optional.** An intent with all checklist items done but no Outcome is a broken state. Complete the intent immediately — do not leave it for later.
|
|
81
81
|
|
|
@@ -96,12 +96,12 @@ For each task:
|
|
|
96
96
|
### Step 3: Update Intent and Complete
|
|
97
97
|
Capture observations in `## Insights`. When ALL checklist items are checked:
|
|
98
98
|
|
|
99
|
-
1. Write `outcome.md` with detailed results in the intent directory, using the `${CLAUDE_PLUGIN_ROOT}/templates/outcome.md` form
|
|
99
|
+
1. Write `outcome.md` with detailed results in the intent directory, using the `${CLAUDE_PLUGIN_ROOT}/templates/outcome.md` form. Set the frontmatter `disposition: delivered` (the delivered terminal). `outcome.md` is mandatory at every terminal and self-declares its disposition (canonical done-marker in PLASTIC.md).
|
|
100
100
|
2. Write `## Outcome` summary in the intent file (1-2 sentences)
|
|
101
101
|
3. Move intent from `## Active` to `## Completed` in INDEX.md (with today's date)
|
|
102
102
|
4. Update cluster entries to show `_(completed)_`
|
|
103
103
|
5. Auto-commit: `cd <store-root> && git add . && git commit -m "feat: complete intent <ID> — <name>"`
|
|
104
|
-
6.
|
|
104
|
+
6. QMD reindex LAST (canonical End tail). As the final End-tail step, after the terminal move and any disarm, ALWAYS refresh the QMD search index for this store (no-op when QMD is absent), running in the background so it never blocks the turn: `ruby ~/.plastic/scripts/qmd-sync reindex --store <store-root> --async`. Completion is the lifecycle event that keeps the search index fresh, and the reindex runs last so the index never references a bridge or lock that is about to disappear (see PLASTIC.md `## Delivery Isolation and the Single-Owner Lock`).
|
|
105
105
|
|
|
106
106
|
**This is NOT optional.** Complete the intent immediately when work is done.
|
|
107
107
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-humanizer
|
|
3
|
+
description: Use to clean authored prose so it reads human and clutter-free. Removes AI tells and slop from a document, spec, outcome, README, report, or release note. Use when the user says "humanize", "de-slop", "remove the AI tells", or "clean up the wording". For documents, not for every chat reply, and not for code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Humanizer
|
|
7
|
+
|
|
8
|
+
Make writing read like a person wrote it: plain, direct, low-clutter. Run this as a pass over authored prose (specs, outcomes, README, reports). Do not run it on code or on every chat turn.
|
|
9
|
+
|
|
10
|
+
## Lead (house style)
|
|
11
|
+
Reframe your answers and any questions you have for me like you are speaking to a well-educated non-English native person. Reduce slang, and rarely used words and terms in the general communication. And cut all the fancy words from explanations. Technical terms and concepts are fine and need no gloss.
|
|
12
|
+
|
|
13
|
+
## Voice
|
|
14
|
+
Answer like a busy bartender or a senior support engineer who has seen almost every ticket. Help fast, give the fix first, earn the tip.
|
|
15
|
+
|
|
16
|
+
## Job 1 - remove these surface tells
|
|
17
|
+
1. Em-dashes and en-dashes - use a comma or a full stop.
|
|
18
|
+
2. "Not X but Y" (and "it's not just X, it's Y").
|
|
19
|
+
3. Rule of three - three items only for rhythm.
|
|
20
|
+
4. Hype / AI words - delve, robust, comprehensive, seamless, leverage, crucial, unlock, landscape.
|
|
21
|
+
5. Filler openers / signposting - "It's worth noting", "It's important to", "Let's dive in".
|
|
22
|
+
6. Hedging pile-up - might, could, perhaps, generally, when not needed.
|
|
23
|
+
7. Sycophancy - "Great question", "You're absolutely right".
|
|
24
|
+
8. Over-bolding - bold only what carries weight.
|
|
25
|
+
|
|
26
|
+
## Job 2 - fix the structure
|
|
27
|
+
- Lead with the one main point.
|
|
28
|
+
- Cut sentences that only restate.
|
|
29
|
+
- Pick concrete words over abstract ones.
|
|
30
|
+
- Match the user's voice when samples of their writing exist.
|
|
31
|
+
|
|
32
|
+
## Process
|
|
33
|
+
Write, check once against the rules above, then send. On documents, run this pass last.
|
|
34
|
+
|
|
35
|
+
## Length
|
|
36
|
+
Keep it short. If a sentence does not help the reader, cut it.
|
|
37
|
+
|
|
38
|
+
## More
|
|
39
|
+
For before/after examples, read `references/examples.md`. To make the house style always-on in chat, see `references/always-on-snippet.md`. The full 33-pattern catalog and the research behind this skill live in intent 92's `resources/`. They are background and are not loaded here.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "plastic-humanizer",
|
|
3
|
+
"notes": "Intent 92. Cleans authored prose: removes 8 surface tells and applies structural levers (one point, cut restatement, concrete words, match voice). Triggers on document-cleanup asks, not on code. Runner is intent 76; assertions are human for now.",
|
|
4
|
+
"evals": [
|
|
5
|
+
{
|
|
6
|
+
"id": 1,
|
|
7
|
+
"scope": "trigger",
|
|
8
|
+
"set": "validation",
|
|
9
|
+
"prompt": "Humanize this README - it reads like AI wrote it.",
|
|
10
|
+
"expected_output": "Selects plastic-humanizer and runs the cleanup pass over the document.",
|
|
11
|
+
"files": [],
|
|
12
|
+
"assertions": [
|
|
13
|
+
{
|
|
14
|
+
"type": "human",
|
|
15
|
+
"check": "plastic-humanizer is selected for a document-cleanup request",
|
|
16
|
+
"observed": "description triggers on 'humanize' / 'reads like AI' for a document",
|
|
17
|
+
"result": "pass"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": 2,
|
|
23
|
+
"scope": "trigger",
|
|
24
|
+
"set": "validation",
|
|
25
|
+
"prompt": "Clean up the wording in this spec.",
|
|
26
|
+
"expected_output": "Selects plastic-humanizer and cleans the spec prose.",
|
|
27
|
+
"files": [],
|
|
28
|
+
"assertions": [
|
|
29
|
+
{
|
|
30
|
+
"type": "human",
|
|
31
|
+
"check": "plastic-humanizer is selected for 'clean up the wording'",
|
|
32
|
+
"observed": "description triggers on 'clean up the wording'",
|
|
33
|
+
"result": "pass"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": 3,
|
|
39
|
+
"scope": "non-trigger",
|
|
40
|
+
"set": "validation",
|
|
41
|
+
"prompt": "Fix the failing test in foo.rb.",
|
|
42
|
+
"expected_output": "Does NOT select plastic-humanizer; this is a code task, not prose cleanup.",
|
|
43
|
+
"files": [],
|
|
44
|
+
"assertions": [
|
|
45
|
+
{
|
|
46
|
+
"type": "human",
|
|
47
|
+
"check": "plastic-humanizer is not selected for a code task",
|
|
48
|
+
"observed": "description scopes the skill to documents, not code",
|
|
49
|
+
"result": "pass"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": 4,
|
|
55
|
+
"scope": "output",
|
|
56
|
+
"set": "validation",
|
|
57
|
+
"prompt": "Given a slop sample: 'It's worth noting that this is not just a fix, but a comprehensive, robust, and seamless improvement that will unlock real value.' Humanize it.",
|
|
58
|
+
"expected_output": "Cleaned text has no em-dashes and none of the 8 tells, leads with one point, and drops restatement. For example: 'This fix makes X faster.'",
|
|
59
|
+
"files": [],
|
|
60
|
+
"assertions": [
|
|
61
|
+
{
|
|
62
|
+
"type": "human",
|
|
63
|
+
"check": "output drops the 8 tells, leads with one point, cuts restatement",
|
|
64
|
+
"observed": "no em-dashes; no 'not X but Y'; no rule-of-three; no hype words; no filler opener; one load-bearing point",
|
|
65
|
+
"result": "pass"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Always-on chat style (copy-paste)
|
|
2
|
+
|
|
3
|
+
Paste this into your global `CLAUDE.md` (applies to all projects) or a project `AGENTS.md` (one project). It keeps the chat style on at near-zero cost. The full cleanup for documents is the `plastic-humanizer` skill.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Reframe your answers and any questions like you are speaking to a well-educated person who is not a native English speaker. Reduce slang and rarely used words. Cut fancy words from explanations. Technical terms and concepts are fine.
|
|
7
|
+
|
|
8
|
+
Answer like a busy bartender or a senior support engineer who has seen almost every ticket: help fast, give the fix first, earn the tip.
|
|
9
|
+
```
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Examples - before and after
|
|
2
|
+
|
|
3
|
+
Each pair shows a tell or a slop pattern, then the fix.
|
|
4
|
+
|
|
5
|
+
## 1. Em-dash
|
|
6
|
+
Before: The release is ready - we just need sign-off.
|
|
7
|
+
After: The release is ready. We just need sign-off.
|
|
8
|
+
Why: Use a full stop or comma, not an em-dash.
|
|
9
|
+
|
|
10
|
+
## 2. "Not X but Y"
|
|
11
|
+
Before: This is not just a config change, it's a rethink of the flow.
|
|
12
|
+
After: This change reworks the flow.
|
|
13
|
+
Why: State the point directly.
|
|
14
|
+
|
|
15
|
+
## 3. Rule of three
|
|
16
|
+
Before: The tool is fast, robust, and powerful.
|
|
17
|
+
After: The tool is fast.
|
|
18
|
+
Why: Drop the list-for-rhythm; keep the claim you can back.
|
|
19
|
+
|
|
20
|
+
## 4. Hype / AI word
|
|
21
|
+
Before: We leverage a comprehensive caching layer to unlock performance.
|
|
22
|
+
After: We cache results to make it faster.
|
|
23
|
+
Why: Plain verbs and nouns.
|
|
24
|
+
|
|
25
|
+
## 5. Filler opener / signposting
|
|
26
|
+
Before: It's worth noting that the cache expires after five minutes.
|
|
27
|
+
After: The cache expires after five minutes.
|
|
28
|
+
Why: Say the thing; skip the runway.
|
|
29
|
+
|
|
30
|
+
## 6. Hedging pile-up
|
|
31
|
+
Before: This might possibly help reduce cost in some cases, generally.
|
|
32
|
+
After: This reduces cost.
|
|
33
|
+
Why: One clear claim. Add a caveat only if it is real.
|
|
34
|
+
|
|
35
|
+
## 7. Sycophancy
|
|
36
|
+
Before: Great question! That's a really insightful point. Here's the answer.
|
|
37
|
+
After: Here's the answer.
|
|
38
|
+
Why: Drop the praise; answer.
|
|
39
|
+
|
|
40
|
+
## 8. Structural fix (the mush)
|
|
41
|
+
Before: There are several important considerations to keep in mind when thinking about how best to approach the broad and multifaceted topic of caching, each of which carries its own trade-offs.
|
|
42
|
+
After: Cache reads, not writes. Reads repeat; writes do not.
|
|
43
|
+
Why: One load-bearing point. Cut the restatement and the abstract throat-clearing.
|
|
44
|
+
|
|
45
|
+
## 9. Over-bolding
|
|
46
|
+
Before: **Note:** the cache **expires** after **five minutes**, so **always** check it.
|
|
47
|
+
After: The cache expires after five minutes, so check it first.
|
|
48
|
+
Why: Bold nothing here; the sentence carries itself.
|
package/skills/install/SKILL.md
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plastic-install
|
|
3
|
-
description: Use when initializing Plastic globally (~/.plastic/) or locally in a project, or to re-install/repair a broken installation. Accepts channel flags (--alpha, --beta, --latest) to select release channel.
|
|
3
|
+
description: Use when initializing Plastic globally (~/.plastic/) or locally in a project, or to re-install/repair a broken installation. Accepts channel flags (--alpha, --beta, --latest) to select release channel. First install defaults to --beta; reinstalls match the already-installed channel. Global install is recommended: it creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Install Plastic
|
|
7
7
|
|
|
8
|
-
> **Recommended path:** for a first install, run `npx @zalom/plastic@
|
|
9
|
-
> in your shell (or `bunx @zalom/plastic@
|
|
8
|
+
> **Recommended path:** for a first install, run `npx -y @zalom/plastic@beta install --claude`
|
|
9
|
+
> in your shell (or `bunx -y @zalom/plastic@beta install --claude` if you use Bun). This skill
|
|
10
10
|
> exists to **re-install or repair** an existing setup from inside the agent, and to
|
|
11
11
|
> drive interactive global configuration. Whenever this skill performs an install or
|
|
12
12
|
> re-install, it **runs `/plastic-doctor` afterward** and reports the result.
|
|
13
13
|
|
|
14
|
+
## Channel rule
|
|
15
|
+
|
|
16
|
+
If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
|
|
17
|
+
`-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed
|
|
18
|
+
(first install), default to `@beta`. The user can always override with
|
|
19
|
+
`--alpha` / `--beta` / `--latest`.
|
|
20
|
+
|
|
14
21
|
## Re-install / repair
|
|
15
22
|
|
|
16
23
|
If Plastic is already installed but something is broken (skills missing, hooks not
|
|
17
|
-
firing, leftover legacy plugin), re-run the installer
|
|
24
|
+
firing, leftover legacy plugin), re-run the installer, it is idempotent, prunes
|
|
18
25
|
files that no longer ship, and removes any legacy plugin/marketplace layout:
|
|
19
26
|
|
|
20
27
|
```bash
|
|
21
|
-
npx @zalom/plastic
|
|
28
|
+
npx -y @zalom/plastic@<channel> install --reinstall --claude
|
|
22
29
|
```
|
|
23
30
|
|
|
24
31
|
Then **run `/plastic-doctor`** and report what it found.
|
|
@@ -27,22 +34,22 @@ Then **run `/plastic-doctor`** and report what it found.
|
|
|
27
34
|
|
|
28
35
|
| Flag | Behavior |
|
|
29
36
|
|------|----------|
|
|
30
|
-
| `--latest` | Install from stable channel
|
|
31
|
-
| `--beta` | Install from beta channel |
|
|
32
|
-
| `--alpha` | Install from alpha channel |
|
|
37
|
+
| `--latest` | Install from the stable channel |
|
|
38
|
+
| `--beta` | Install from the beta channel (default on a first install) |
|
|
39
|
+
| `--alpha` | Install from the alpha channel |
|
|
33
40
|
|
|
34
41
|
When invoked from within Claude Code (re-install or channel switch), the skill
|
|
35
42
|
runs the appropriate npx command:
|
|
36
43
|
|
|
37
44
|
```bash
|
|
38
|
-
# Stable
|
|
39
|
-
npx @zalom/plastic install --claude
|
|
45
|
+
# Stable
|
|
46
|
+
npx -y @zalom/plastic@latest install --claude
|
|
40
47
|
|
|
41
|
-
# Beta
|
|
42
|
-
npx @zalom/plastic@beta install --claude
|
|
48
|
+
# Beta (default on a first install)
|
|
49
|
+
npx -y @zalom/plastic@beta install --claude
|
|
43
50
|
|
|
44
51
|
# Alpha
|
|
45
|
-
npx @zalom/plastic@alpha install --claude
|
|
52
|
+
npx -y @zalom/plastic@alpha install --claude
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
The installed version and channel are recorded in `~/.plastic/VERSION`.
|
|
@@ -55,105 +62,80 @@ Run `/plastic-install` with no arguments.
|
|
|
55
62
|
|
|
56
63
|
#### Procedure
|
|
57
64
|
|
|
58
|
-
**Step 1:
|
|
59
|
-
|
|
60
|
-
Check if `~/.plastic/INDEX.md` exists.
|
|
61
|
-
- If yes: announce "Plastic is already installed at ~/.plastic/. Run `/plastic-update` to sync core files."
|
|
62
|
-
- If no: proceed with fresh install.
|
|
65
|
+
**Step 1: Run the installer**
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
Check if `~/.plastic/VERSION` exists.
|
|
68
|
+
- If yes: announce "Plastic is already installed at ~/.plastic/. Run `/plastic-update` to
|
|
69
|
+
sync core files, or use the re-install command above to repair in place."
|
|
70
|
+
- If no: run the fresh install command (default `@beta`, or the channel the user named):
|
|
65
71
|
|
|
66
72
|
```bash
|
|
67
|
-
|
|
73
|
+
npx -y @zalom/plastic@beta install --claude
|
|
68
74
|
```
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- `
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
This single command, via `install.rb` (`bootstrap` + `distribute`), creates `store/`,
|
|
77
|
+
`projects/`, `config.yml`, `projects.yml`, `INDEX.md`, and `AGENTS.md` under `~/.plastic/`,
|
|
78
|
+
and copies the utility scripts (`folgezettel-id`, `read-config`, and the rest of
|
|
79
|
+
`scripts/`). This skill does none of that itself; it wraps the command with the
|
|
80
|
+
interactive steps the CLI does not yet own, plus reporting and a doctor pass.
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
# Plastic — Agent Instructions
|
|
82
|
+
**Statusline**
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
|
|
84
|
+
On install, if an existing statusline is already configured, Plastic asks whether to
|
|
85
|
+
keep it or switch to Plastic's (interactive sessions only). The choice is honored via
|
|
86
|
+
`--statusline keep` or `--statusline plastic`, which skips the prompt. Non-interactive
|
|
87
|
+
sessions (no tty) default to keeping the user's line: nothing is silently overwritten.
|
|
88
|
+
A fresh system with no statusline configured gets Plastic's line with no prompt.
|
|
82
89
|
|
|
83
|
-
|
|
84
|
-
may add content below.
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
```
|
|
90
|
+
**Step 2: Initialize git (retained)**
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
Only if `~/.plastic/.git` is absent (a fresh bootstrap does not init git):
|
|
90
93
|
|
|
91
|
-
Initialize git:
|
|
92
94
|
```bash
|
|
93
95
|
cd ~/.plastic && git init && git add . && git commit -m "chore: initialize Plastic global intent store"
|
|
94
96
|
```
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
Retained here because the CLI does not git-init the store yet (follow-up).
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
mkdir -p ~/.plastic/scripts
|
|
100
|
-
cp "${CLAUDE_PLUGIN_ROOT}/scripts/folgezettel-id" ~/.plastic/scripts/folgezettel-id
|
|
101
|
-
cp "${CLAUDE_PLUGIN_ROOT}/scripts/read-config" ~/.plastic/scripts/read-config
|
|
102
|
-
chmod +x ~/.plastic/scripts/folgezettel-id ~/.plastic/scripts/read-config
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
This ensures project agents can generate hashes via `~/.plastic/scripts/folgezettel-id` without depending on a specific agent's plugin cache path.
|
|
106
|
-
|
|
107
|
-
**Step 2c: Detect agent type and set preferences**
|
|
100
|
+
**Step 3: Personalize config (retained)**
|
|
108
101
|
|
|
109
102
|
Detect which agent is running:
|
|
110
|
-
- If `CLAUDE_CODE` env var is set or we're running inside Claude Code
|
|
111
|
-
- If `HERMES_HOME` env var is set
|
|
112
|
-
- Otherwise
|
|
103
|
+
- If `CLAUDE_CODE` env var is set or we're running inside Claude Code -> `agent.type: claude-code`
|
|
104
|
+
- If `HERMES_HOME` env var is set -> `agent.type: hermes`
|
|
105
|
+
- Otherwise -> ask the user: "Which AI agent are you using? (claude-code / hermes / other)"
|
|
113
106
|
|
|
114
107
|
Ask the user:
|
|
115
|
-
> "Enable Agent Teams? (experimental
|
|
116
|
-
> - Yes
|
|
117
|
-
> - No
|
|
118
|
-
|
|
119
|
-
Update `~/.plastic/config.yml` with detected/chosen values using `read-config --migrate` first to ensure v3 schema, then write the agent-specific values.
|
|
120
|
-
|
|
121
|
-
Auto-commit the config change.
|
|
122
|
-
|
|
123
|
-
**Step 2d: Configure GitHub and push preferences**
|
|
108
|
+
> "Enable Agent Teams? (experimental: parallel project work with teammates)"
|
|
109
|
+
> - Yes -> set `parallel_mode: agent-teams`
|
|
110
|
+
> - No -> set `parallel_mode: linear` (subagents only)
|
|
124
111
|
|
|
125
112
|
Inform the user:
|
|
126
|
-
> "Plastic agents can create GitHub repositories for new projects.
|
|
127
|
-
>
|
|
128
|
-
>
|
|
113
|
+
> "Plastic agents can create GitHub repositories for new projects. By default, all
|
|
114
|
+
> agent-created repos are **private**. Your global intent store (~/.plastic/) is never
|
|
115
|
+
> pushed, it stays local-only."
|
|
129
116
|
|
|
130
117
|
Ask the user:
|
|
131
118
|
> "Default visibility for agent-created repos?"
|
|
132
|
-
> - Private (recommended)
|
|
133
|
-
> - Public
|
|
134
|
-
|
|
119
|
+
> - Private (recommended) -> set `github.default_visibility: private`
|
|
120
|
+
> - Public -> set `github.default_visibility: public`
|
|
121
|
+
>
|
|
135
122
|
> "Allow agents to push to GitHub without asking?"
|
|
136
|
-
> - No (recommended)
|
|
137
|
-
> - Yes
|
|
138
|
-
|
|
139
|
-
Update `config.yml` with chosen values. Auto-commit.
|
|
140
|
-
|
|
141
|
-
**Step 3: Configure project roots**
|
|
142
|
-
|
|
143
|
-
Ask the user:
|
|
123
|
+
> - No (recommended) -> set `github.auto_push: false`
|
|
124
|
+
> - Yes -> set `github.auto_push: true`
|
|
125
|
+
>
|
|
144
126
|
> "Where do you keep your projects? Default: ~/.plastic/projects/"
|
|
145
127
|
> "Add additional roots? (e.g., ~/apps/personal/, ~/apps/companies/)"
|
|
146
128
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
129
|
+
Write each answer via `read-config --migrate` first (ensures the v3 schema), then the
|
|
130
|
+
chosen values; auto-commit each change. Retained here because the CLI writes only
|
|
131
|
+
hardcoded defaults, so these interactive choices stay in the skill.
|
|
150
132
|
|
|
151
133
|
**Step 4: Verify with doctor**
|
|
152
134
|
|
|
153
135
|
Run `/plastic-doctor` and report the result. Resolve any fixable findings before
|
|
154
136
|
announcing success.
|
|
155
137
|
|
|
156
|
-
**Step 5: Register stores with QMD (
|
|
138
|
+
**Step 5: Register stores with QMD (retained)**
|
|
157
139
|
|
|
158
140
|
QMD is an optional search layer. If it is installed, register the Plastic stores so
|
|
159
141
|
they are searchable:
|
|
@@ -165,19 +147,27 @@ ruby ~/.plastic/scripts/qmd-sync detect && ruby ~/.plastic/scripts/qmd-sync regi
|
|
|
165
147
|
`qmd-sync` no-ops cleanly when QMD is absent, so this is safe to run unconditionally.
|
|
166
148
|
It registers `plastic-global` and every project store from `projects.yml`, then indexes
|
|
167
149
|
them. Report what was registered, or that QMD was not detected and the step was skipped.
|
|
150
|
+
Retained here because the CLI does not register at install time (follow-up).
|
|
151
|
+
|
|
152
|
+
**Step 6: Report + announce**
|
|
168
153
|
|
|
169
|
-
|
|
154
|
+
```
|
|
155
|
+
Plastic install (<channel>)
|
|
156
|
+
Command: npx -y @zalom/plastic@<channel> install --claude <flags>
|
|
157
|
+
Version: none -> <installed>
|
|
158
|
+
Doctor: <summary or "all clear">
|
|
159
|
+
```
|
|
170
160
|
|
|
171
|
-
|
|
172
|
-
> Create your first intent with `/plastic-creating-intent`."
|
|
161
|
+
Then: "Read `docs/guides/your-first-intent-in-10-minutes.md` for your first intent, start to finish."
|
|
173
162
|
|
|
174
163
|
### Local Install (testing/legacy)
|
|
175
164
|
|
|
176
|
-
Run `/plastic-install --local`.
|
|
165
|
+
Run `/plastic-install --local`. `install.rb` has no `--local` verb, so this mode is
|
|
166
|
+
genuinely skill-owned.
|
|
177
167
|
|
|
178
168
|
#### Procedure
|
|
179
169
|
|
|
180
|
-
**Step 1:** Check if `.plastic/` exists in CWD
|
|
170
|
+
**Step 1:** Check if `.plastic/` exists in CWD, if so, warn and exit.
|
|
181
171
|
|
|
182
172
|
**Step 2:** Create `.plastic/` in CWD:
|
|
183
173
|
- `config.yml` from templates
|
|
@@ -192,4 +182,5 @@ Run `/plastic-install --local`.
|
|
|
192
182
|
|
|
193
183
|
**Step 4:** Commit in project: `git add .plastic/ && git commit -m "chore: initialize Plastic local store"`
|
|
194
184
|
|
|
195
|
-
**Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider
|
|
185
|
+
**Step 5:** Announce: "Plastic initialized locally. This is a testing/legacy mode. Consider
|
|
186
|
+
`/plastic-install` for global mode."
|
|
@@ -38,6 +38,10 @@ The agent handles:
|
|
|
38
38
|
- Cluster management (create, merge, rename)
|
|
39
39
|
- Orphan detection
|
|
40
40
|
|
|
41
|
-
When an intent reaches a terminal state — moved to Completed OR Abandoned —
|
|
41
|
+
When an intent reaches a terminal state — moved to Completed OR Abandoned — do these things as the closing act of the transfer, in the canonical End-tail order (see PLASTIC.md `## Delivery Isolation and the Single-Owner Lock`):
|
|
42
|
+
|
|
43
|
+
1. Author a real `outcome.md` in the intent directory from `~/.plastic/templates/outcome.md`, with the frontmatter `disposition: delivered` for a completed intent or `disposition: abandoned` for an abandoned one. `outcome.md` is MANDATORY at every terminal, delivered and abandoned alike: on abandon it records the abandonment reason and replaces the scaffolded placeholder sentinel (never leave `outcome.md` a placeholder at a terminal).
|
|
44
|
+
2. Stamp the terminal savepoint bookend (intent 81), so the ledger's last line records the disposition: `ruby -r ~/.plastic/scripts/lib/bridge -e 'Bridge.append_terminal_savepoint("<intent_dir>", "delivered")'` (use `"abandoned"` for an abandoned intent). Idempotent.
|
|
45
|
+
3. Refresh the QMD index for the affected store LAST, after the terminal move and savepoint (no-op when QMD absent), running in the background so it never blocks: `ruby ~/.plastic/scripts/qmd-sync reindex --store <store-root> --async`.
|
|
42
46
|
|
|
43
47
|
After the agent completes, report what changed.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-intent-discovery
|
|
3
|
+
description: >-
|
|
4
|
+
What-stage context deposit at intent activation: run QMD discovery over the
|
|
5
|
+
intent's chain/sources and related parked intents, and write findings to
|
|
6
|
+
resources/discovery--<slug>.md for the Why stage to consume. Use when an intent
|
|
7
|
+
is activated (moved from Future to Active), after the lock is armed, under it,
|
|
8
|
+
and before Why begins. Never writes the intent file itself.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Intent Discovery — What-stage context deposit
|
|
12
|
+
|
|
13
|
+
Announce: "Discovering context for intent [ID] — [name]."
|
|
14
|
+
|
|
15
|
+
Runs once, at intent activation, after the lock is armed and before Why. It gathers what is
|
|
16
|
+
already known so Why does not start cold, and deposits it as a resource the
|
|
17
|
+
Why-stage brainstorming agent reads.
|
|
18
|
+
|
|
19
|
+
## When it fires
|
|
20
|
+
Inside `plastic-intent-starting`, right after the bridge is armed, under the
|
|
21
|
+
lock. Dispatched as the `plastic-intent-discovery` background agent.
|
|
22
|
+
|
|
23
|
+
## What it does
|
|
24
|
+
1. **Read the intent's links.** Load the activating intent file's `chain` and
|
|
25
|
+
`sources` frontmatter fields.
|
|
26
|
+
2. **QMD-first discovery.** Search the Plastic stores with
|
|
27
|
+
`scripts/qmd-sync search "<terms>"` (or the `qmd` skill), scoped to the
|
|
28
|
+
relevant `plastic-*` collections, across completed predecessor work named in
|
|
29
|
+
`chain`/`sources` and any related parked/future intents in INDEX.md. Fall back
|
|
30
|
+
to ripgrep over the stores only when QMD is absent.
|
|
31
|
+
3. **Deposit, never author.** Write findings to
|
|
32
|
+
`resources/discovery--<slug>.md` in the intent directory ONLY. Do not write
|
|
33
|
+
the intent file, spec.md, or any lifecycle deliverable. The lock-owner-only
|
|
34
|
+
write rule stays intact; the Why-stage `plastic-brainstorming` agent reads the
|
|
35
|
+
deposit and enriches `## Context`.
|
|
36
|
+
|
|
37
|
+
## Stage coverage
|
|
38
|
+
This is the What-stage agent in the one-agent-per-stage table (What:
|
|
39
|
+
intent-discovery, Why: brainstorming + spec-specialist, How: planner, Exec:
|
|
40
|
+
executor, Done: intent-curator).
|
|
41
|
+
|
|
42
|
+
## Boundaries
|
|
43
|
+
- Single output: `resources/discovery--<slug>.md`.
|
|
44
|
+
- Does not ACQUIRE the delivery lock itself; it runs under the lock the
|
|
45
|
+
orchestrator armed, as the owner session (inherited session id), and is not
|
|
46
|
+
blocked by it.
|
|
47
|
+
- Advisory input to Why, not a gate.
|