@zalom/plastic 1.0.0-alpha.2 → 1.0.0-alpha.20
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 +128 -473
- package/README.md +90 -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 +7 -6
- package/hooks/auto-arm +5 -0
- package/hooks/bash-gate +3 -0
- package/hooks/check-update +12 -8
- package/hooks/code-gate +10 -0
- package/hooks/hooks.json +25 -4
- package/hooks/statusline +50 -10
- package/package.json +2 -2
- package/scripts/dashboard.rb +480 -0
- package/scripts/doctor.rb +950 -0
- package/scripts/hook-auto-arm +52 -0
- package/scripts/hook-bash-gate +53 -0
- package/scripts/hook-code-gate +39 -0
- package/scripts/hook-continue +15 -114
- package/scripts/hook-gate-check +19 -4
- package/scripts/hook-session-start +76 -31
- package/scripts/install.rb +91 -480
- package/scripts/lib/bridge.rb +255 -0
- package/scripts/lib/installer_core.rb +760 -0
- package/scripts/migrate-to-global +1 -1
- package/scripts/select-update-target +93 -0
- package/scripts/uninstall.rb +53 -0
- package/scripts/update.rb +142 -0
- package/scripts/versions.rb +141 -0
- package/skills/_active-intent-gate.md +26 -0
- package/skills/auto/SKILL.md +62 -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 +20 -4
- package/skills/continuing/references/context-management.md +32 -0
- package/skills/creating-intent/SKILL.md +16 -1
- package/skills/creating-intent/references/lifecycle.md +74 -0
- package/skills/creating-intent/references/wikilinks.md +8 -0
- package/skills/creating-project/SKILL.md +8 -4
- package/skills/creating-project/references/hubs-projects.md +55 -0
- package/skills/dashboard/SKILL.md +92 -0
- package/skills/doctor/SKILL.md +116 -0
- package/skills/doctor/references/gates-stuck-detection.md +38 -0
- package/skills/doctor/report.md +96 -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 +3 -3
- package/skills/install/SKILL.md +56 -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 +44 -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
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Agent Architecture
|
|
2
|
+
|
|
3
|
+
## Main Orchestrator
|
|
4
|
+
|
|
5
|
+
The Main Orchestrator manages the global store (Main Knowledge Base). It:
|
|
6
|
+
- Recognizes, creates, updates, and groups intents
|
|
7
|
+
- Spawns Project Orchestrators for registered projects
|
|
8
|
+
- Receives contributions back from Project Orchestrators
|
|
9
|
+
- Is the only agent that runs in a loop (continuous Build→Observe→Repeat)
|
|
10
|
+
|
|
11
|
+
## Project Orchestrators
|
|
12
|
+
|
|
13
|
+
Project Orchestrators manage project stores (Project Knowledge Bases). They:
|
|
14
|
+
- Care about intents and execution within their project
|
|
15
|
+
- Spawn teams to develop and execute intents
|
|
16
|
+
- Contribute back to the Main Orchestrator when new intents are born
|
|
17
|
+
that could enrich the Main Knowledge Base
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
- 1 Main Orchestrator : 1 Global Store (`~/.plastic/`)
|
|
21
|
+
- 1 Main Orchestrator : N Project Orchestrators
|
|
22
|
+
- 1 Project Orchestrator : 1 Project Store
|
|
23
|
+
- 1 Agent : 1 Intent (exclusive assignment)
|
|
24
|
+
- 1 Agent : N Sub-agents (for parallel Actions within an intent)
|
|
25
|
+
|
|
26
|
+
## Two Modes
|
|
27
|
+
|
|
28
|
+
- **Human-driven:** Human chats with Main Orchestrator, creates intents,
|
|
29
|
+
brainstorms, then Main Orchestrator dispatches Project Orchestrators and
|
|
30
|
+
Agents for execution.
|
|
31
|
+
- **Autonomous:** Human gives Main Orchestrator a starting intent with defined
|
|
32
|
+
outcomes. Main Orchestrator runs the full cycle — Agents do the lifecycle
|
|
33
|
+
(What→Why→How→Exec), Main Orchestrator reviews Insights, spawns next intents,
|
|
34
|
+
dispatches again.
|
|
35
|
+
|
|
36
|
+
## Autonomous Delivery
|
|
37
|
+
|
|
38
|
+
Human owns What and Why for human-initiated intents. Agent assists (research,
|
|
39
|
+
exploration) but human drives until handoff. When Why is complete — or human
|
|
40
|
+
triggers `plastic-auto` — the agent takes over How and Exec autonomously.
|
|
41
|
+
|
|
42
|
+
- **Safe-by-default:** Agent always prefers non-destructive routes (rename vs
|
|
43
|
+
delete, additive migrations, backups before changes). Destructive actions on
|
|
44
|
+
existing projects require human approval unless `--skip-permissions` is set.
|
|
45
|
+
- **One agent per intent.** Agent follows the full W→W→H→E lifecycle.
|
|
46
|
+
- **Notification only on:** finish or hard stop (blocked on destructive action,
|
|
47
|
+
unresolvable error). No progress reports — `## Insights` tracks everything.
|
|
48
|
+
- **Greenfield autonomy:** During initial project creation, all decisions are
|
|
49
|
+
non-destructive (nothing to destroy). Agent has full autonomy for greenfield choices.
|
|
50
|
+
- **Autonomous decisions** are logged in `## Insights` with `(autonomous)` marker.
|
|
51
|
+
|
|
52
|
+
## Coordinator Loop
|
|
53
|
+
|
|
54
|
+
When "work on Project X":
|
|
55
|
+
1. Read `projects.yml` → find project path
|
|
56
|
+
2. Load global config (defaults)
|
|
57
|
+
3. Load project config (overrides)
|
|
58
|
+
4. Load global INDEX.md → find hub intents tagged `project-<name>`
|
|
59
|
+
5. Load project INDEX.md → tactical intents
|
|
60
|
+
6. Coordinator has full picture, dispatches Agent teams
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plastic-brainstorming
|
|
3
|
+
description: "Explore intent requirements and design before implementation. Produces spec.md in the active intent directory."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming Ideas Into Designs
|
|
7
|
+
|
|
8
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
9
|
+
|
|
10
|
+
Announce: "I'm using the brainstorming skill to explore the design for intent {id} — {name}."
|
|
11
|
+
|
|
12
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
13
|
+
|
|
14
|
+
<HARD-GATE>
|
|
15
|
+
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
16
|
+
</HARD-GATE>
|
|
17
|
+
|
|
18
|
+
## Active Intent Gate
|
|
19
|
+
|
|
20
|
+
Before proceeding, resolve the active intent:
|
|
21
|
+
|
|
22
|
+
1. **Detect store:** Read `~/.plastic/projects.yml`, match CWD against registered project paths. If match → project store at `~/.plastic/projects/{slug}/store/`. If no match → global store at `~/.plastic/store/`.
|
|
23
|
+
2. **Find active intent:** Read `INDEX.md` from the detected store. Look under `## Active`. If exactly one → use it. If multiple → ask which. If none → refuse: "No active intent. Create one first with /plastic-creating-intent"
|
|
24
|
+
3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
|
|
25
|
+
|
|
26
|
+
All artifacts go to the intent directory. Never write to external paths.
|
|
27
|
+
|
|
28
|
+
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
|
29
|
+
|
|
30
|
+
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
31
|
+
|
|
32
|
+
## Checklist
|
|
33
|
+
|
|
34
|
+
You MUST create a task for each of these items and complete them in order:
|
|
35
|
+
|
|
36
|
+
1. **Explore project context** — check files, docs, recent commits, read active intent
|
|
37
|
+
2. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
|
38
|
+
3. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
39
|
+
4. **Present design** — in sections scaled to their complexity, get user approval after each section
|
|
40
|
+
5. **Write spec** — save to `{intent_dir}/spec.md` and commit to store repo
|
|
41
|
+
6. **Spec self-review** — placeholder scan, consistency, scope, ambiguity
|
|
42
|
+
7. **User reviews written spec** — ask user to review before proceeding
|
|
43
|
+
8. **Transition to planning** — invoke `plastic-writing-plans`
|
|
44
|
+
|
|
45
|
+
## Process Flow
|
|
46
|
+
|
|
47
|
+
```dot
|
|
48
|
+
digraph brainstorming {
|
|
49
|
+
"Explore project context" [shape=box];
|
|
50
|
+
"Ask clarifying questions" [shape=box];
|
|
51
|
+
"Propose 2-3 approaches" [shape=box];
|
|
52
|
+
"Present design sections" [shape=box];
|
|
53
|
+
"User approves design?" [shape=diamond];
|
|
54
|
+
"Write spec" [shape=box];
|
|
55
|
+
"Spec self-review\n(fix inline)" [shape=box];
|
|
56
|
+
"User reviews spec?" [shape=diamond];
|
|
57
|
+
"Invoke plastic-writing-plans" [shape=doublecircle];
|
|
58
|
+
|
|
59
|
+
"Explore project context" -> "Ask clarifying questions";
|
|
60
|
+
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
61
|
+
"Propose 2-3 approaches" -> "Present design sections";
|
|
62
|
+
"Present design sections" -> "User approves design?";
|
|
63
|
+
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
64
|
+
"User approves design?" -> "Write spec" [label="yes"];
|
|
65
|
+
"Write spec" -> "Spec self-review\n(fix inline)";
|
|
66
|
+
"Spec self-review\n(fix inline)" -> "User reviews spec?";
|
|
67
|
+
"User reviews spec?" -> "Write spec" [label="changes requested"];
|
|
68
|
+
"User reviews spec?" -> "Invoke plastic-writing-plans" [label="approved"];
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**The terminal state is invoking `plastic-writing-plans`.** Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is `plastic-writing-plans`.
|
|
73
|
+
|
|
74
|
+
## The Process
|
|
75
|
+
|
|
76
|
+
**Understanding the idea:**
|
|
77
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
78
|
+
- Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
|
|
79
|
+
- If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
|
|
80
|
+
- For appropriately-scoped projects, ask questions one at a time to refine the idea
|
|
81
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
82
|
+
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
83
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
84
|
+
|
|
85
|
+
**Exploring approaches:**
|
|
86
|
+
- Propose 2-3 different approaches with trade-offs
|
|
87
|
+
- Present options conversationally with your recommendation and reasoning
|
|
88
|
+
- Lead with your recommended option and explain why
|
|
89
|
+
|
|
90
|
+
**Presenting the design:**
|
|
91
|
+
- Once you believe you understand what you're building, present the design
|
|
92
|
+
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
|
93
|
+
- Ask after each section whether it looks right so far
|
|
94
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
95
|
+
- Be ready to go back and clarify if something doesn't make sense
|
|
96
|
+
|
|
97
|
+
**Design for isolation and clarity:**
|
|
98
|
+
- Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
|
|
99
|
+
- For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
|
|
100
|
+
- Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
|
|
101
|
+
- Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
|
|
102
|
+
|
|
103
|
+
**Working in existing codebases:**
|
|
104
|
+
- Explore the current structure before proposing changes. Follow existing patterns.
|
|
105
|
+
- Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
|
|
106
|
+
- Don't propose unrelated refactoring. Stay focused on what serves the current goal.
|
|
107
|
+
|
|
108
|
+
## After the Design
|
|
109
|
+
**Documentation:**
|
|
110
|
+
- Write the validated design (spec) to `{intent_dir}/spec.md` using the `${CLAUDE_PLUGIN_ROOT}/templates/spec.md` form
|
|
111
|
+
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
|
112
|
+
- Commit to the store repo:
|
|
113
|
+
```
|
|
114
|
+
cd {store_root} && git add . && git commit -m "docs: spec for intent {id} — {name}"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Spec Self-Review:**
|
|
118
|
+
After writing the spec document, look at it with fresh eyes:
|
|
119
|
+
1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
|
|
120
|
+
2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
|
|
121
|
+
3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
|
|
122
|
+
4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
|
|
123
|
+
|
|
124
|
+
Fix any issues inline. No need to re-review — just fix and move on.
|
|
125
|
+
|
|
126
|
+
**User Review Gate:**
|
|
127
|
+
After the spec review loop passes, ask the user to review the written spec before proceeding:
|
|
128
|
+
> "Spec written and committed to `{intent_dir}/spec.md`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
|
|
129
|
+
|
|
130
|
+
Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
|
|
131
|
+
|
|
132
|
+
**Implementation:**
|
|
133
|
+
- Invoke `plastic-writing-plans` to create the implementation plan
|
|
134
|
+
- Do NOT invoke any other skill. `plastic-writing-plans` is the next step.
|
|
135
|
+
|
|
136
|
+
## Key Principles
|
|
137
|
+
|
|
138
|
+
- **One question at a time** - Don't overwhelm with multiple questions
|
|
139
|
+
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
140
|
+
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
141
|
+
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
142
|
+
- **Incremental validation** - Present design, get approval before moving on
|
|
143
|
+
- **Be flexible** - Go back and clarify when something doesn't make sense
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
2
|
+
name: plastic-brainstorming-grill-me
|
|
3
3
|
description: >-
|
|
4
4
|
Deep brainstorming that interviews the user relentlessly about a plan or design until reaching shared understanding.
|
|
5
5
|
Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
|
|
@@ -83,18 +83,18 @@ If ALL items pass, offer autonomous delivery:
|
|
|
83
83
|
>
|
|
84
84
|
> Want to grill more, or should I go autonomous?"
|
|
85
85
|
|
|
86
|
-
- If human says go → invoke `plastic
|
|
86
|
+
- If human says go → invoke `plastic-auto`
|
|
87
87
|
- If human says grill more → continue grilling (reset to step 2)
|
|
88
88
|
- If human says neither (wants to drive manually) → proceed as before (offer planning)
|
|
89
89
|
|
|
90
90
|
This offer replaces the final question in Close Out ("Ready to plan implementation, or do you want another pass?"). The new options are:
|
|
91
|
-
1. Go autonomous (`plastic
|
|
91
|
+
1. Go autonomous (`plastic-auto`)
|
|
92
92
|
2. Grill more (continue interrogation)
|
|
93
93
|
3. Plan manually (invoke `superpowers:writing-plans` or proceed with human-driven planning)
|
|
94
94
|
|
|
95
95
|
## Relationship to superpowers:brainstorming
|
|
96
96
|
|
|
97
|
-
| | superpowers:brainstorming | plastic
|
|
97
|
+
| | superpowers:brainstorming | plastic-brainstorming-grill-me |
|
|
98
98
|
|---|---|---|
|
|
99
99
|
| Speed | Quick (5-10 min) | Thorough (20-45 min) |
|
|
100
100
|
| Depth | Surface-level exploration | Exhaustive decision tree |
|
|
@@ -102,4 +102,4 @@ This offer replaces the final question in Close Out ("Ready to plan implementati
|
|
|
102
102
|
| Output | Initial spec | Battle-tested spec with all branches resolved |
|
|
103
103
|
| Style | Collaborative, exploratory | Interrogative, relentless |
|
|
104
104
|
|
|
105
|
-
Use `superpowers:brainstorming` to generate ideas. Use `plastic
|
|
105
|
+
Use `superpowers:brainstorming` to generate ideas. Use `plastic-brainstorming-grill-me` to pressure-test them.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: plastic
|
|
2
|
+
name: plastic-continuing
|
|
3
3
|
description: Use when the user says "continue" after a /clear, or when resuming work in a new session. Reads intent state from global store (~/.plastic/) or local store, offers active intents first, then future intents, and surfaces stale intents for triage.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -14,10 +14,22 @@ description: Use when the user says "continue" after a /clear, or when resuming
|
|
|
14
14
|
|
|
15
15
|
1. Check `~/.plastic/INDEX.md` → global mode
|
|
16
16
|
2.
|
|
17
|
-
3. If neither exists → announce "No Plastic store found. Run /plastic
|
|
17
|
+
3. If neither exists → announce "No Plastic store found. Run /plastic-install."
|
|
18
18
|
|
|
19
19
|
## Workflow
|
|
20
20
|
|
|
21
|
+
### 0. Render the dashboard (overview)
|
|
22
|
+
For the "where are we / what's next" overview, run the deterministic dashboard and show
|
|
23
|
+
its output verbatim instead of hand-summarizing intents:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ruby ~/.plastic/scripts/dashboard.rb continue
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This is the uniform, model-agnostic cockpit (active + last touched, then the Value×Effort
|
|
30
|
+
matrix). Then continue with the steps below to actually resume a specific intent. See the
|
|
31
|
+
`plastic-dashboard` skill for how to read the matrix.
|
|
32
|
+
|
|
21
33
|
### 1. Read INDEX.md
|
|
22
34
|
Read the INDEX.md from the active store. Extract intents under `## Active` and `## Future`.
|
|
23
35
|
|
|
@@ -68,7 +80,7 @@ Last autonomous action: [last (autonomous) insight entry]
|
|
|
68
80
|
Next step: [from checklist or savepoint]
|
|
69
81
|
```
|
|
70
82
|
|
|
71
|
-
**Then:** Continue autonomous execution by invoking `plastic
|
|
83
|
+
**Then:** Continue autonomous execution by invoking `plastic-auto`. The auto skill will pick up from the current lifecycle stage (it reads filesystem state to determine where to resume).
|
|
72
84
|
|
|
73
85
|
If NOT found — resume normally as described in step 3.
|
|
74
86
|
|
|
@@ -91,7 +103,7 @@ Stale future intents (no action taken):
|
|
|
91
103
|
- implement: agent builds it
|
|
92
104
|
- research: agent investigates feasibility
|
|
93
105
|
- ideate: agent explores the problem space
|
|
94
|
-
d) Auto — go fully autonomous (invokes plastic
|
|
106
|
+
d) Auto — go fully autonomous (invokes plastic-auto — agent delivers the intent end-to-end)
|
|
95
107
|
```
|
|
96
108
|
|
|
97
109
|
Auto-commit all triage changes.
|
|
@@ -102,3 +114,7 @@ Auto-commit all triage changes.
|
|
|
102
114
|
2. **Project context** — if in a registered project, show governing intent + tactical intents
|
|
103
115
|
3. **Stale future intents** — surface for triage
|
|
104
116
|
4. **Fresh future intents** — offer as next work
|
|
117
|
+
|
|
118
|
+
## References
|
|
119
|
+
|
|
120
|
+
- Read `references/context-management.md` for the full save/continue protocol when resuming from a savepoint or when the resume flow needs debugging
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Context Management (Start-Save-Continue)
|
|
2
|
+
|
|
3
|
+
## Save Point
|
|
4
|
+
Triggered by PreCompact hook or manually:
|
|
5
|
+
1. Find active intent(s) from `~/.plastic/INDEX.md`
|
|
6
|
+
2. Update active intent's `checklist.md` (check off completed items)
|
|
7
|
+
3. Update active intent's `savepoint.md` (in-progress, next steps, blockers, discoveries)
|
|
8
|
+
4. Add observations to `## Insights`
|
|
9
|
+
5. Update INDEX.md
|
|
10
|
+
6. Commit: `cd ~/.plastic && git add . && git commit -m "chore: savepoint — [intent name]"`
|
|
11
|
+
7. Notify user to `/clear`
|
|
12
|
+
|
|
13
|
+
## Continue
|
|
14
|
+
Triggered by UserPromptSubmit hook when user says "continue". Priority order:
|
|
15
|
+
|
|
16
|
+
**1. Active intents first (resume work):**
|
|
17
|
+
1. Read INDEX.md → find active intent(s)
|
|
18
|
+
2. Read active intent's `intent.md` → what and why
|
|
19
|
+
3. Read active intent's `savepoint.md` → where we left off
|
|
20
|
+
4. Read active intent's `checklist.md` → what's next
|
|
21
|
+
5. Announce: intent name, current state, next step, blockers
|
|
22
|
+
6. Resume
|
|
23
|
+
|
|
24
|
+
**2. No active intents → offer future intents:**
|
|
25
|
+
1. List all future intents from INDEX.md
|
|
26
|
+
2. Present them as options
|
|
27
|
+
3. When user picks one, move to Active in INDEX.md
|
|
28
|
+
|
|
29
|
+
**3. Stale future intents (untouched 3+ days) → triage:**
|
|
30
|
+
- **activate** — start working on it now
|
|
31
|
+
- **abandon** — mark as abandoned
|
|
32
|
+
- **defer to agent** — implement, research, or ideate
|
|
@@ -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:
|
|
@@ -120,3 +130,8 @@ cd <store-root> && git add . && git commit -m "feat: create intent ID — [name]
|
|
|
120
130
|
### 8. Announce
|
|
121
131
|
|
|
122
132
|
"Created intent ID — [name]. Placed in: [Active|Future]. Store: [global|project:<slug>|local]."
|
|
133
|
+
|
|
134
|
+
## References
|
|
135
|
+
|
|
136
|
+
- Read `references/lifecycle.md` for the full What→Why→How→Exec stage detail, filesystem-as-schema conventions, and creating-intent step-by-step
|
|
137
|
+
- 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/
|
|
@@ -164,3 +164,7 @@ Log in `## Insights` of each founding intent:
|
|
|
164
164
|
|
|
165
165
|
Announce to user:
|
|
166
166
|
> "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."
|
|
167
|
+
|
|
168
|
+
## References
|
|
169
|
+
|
|
170
|
+
- 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,92 @@
|
|
|
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 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, template-driven overview of the intent store(s). It answers three
|
|
9
|
+
questions at a glance — **where we are** (active + last touched), **where we go next**
|
|
10
|
+
(a Value×Effort matrix), and **how to conduct it** (a disposition verb per intent) — and
|
|
11
|
+
emits a JSON manifest that `plastic-auto` reads to pick the next dispatchable intent.
|
|
12
|
+
|
|
13
|
+
The script does the rendering. The LLM is **never** in the rendering path: same store
|
|
14
|
+
state → byte-identical output, regardless of model. Do not hand-summarize intents when
|
|
15
|
+
this skill applies — run the script and show its output verbatim.
|
|
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` embeds the `continue` view on resume
|
|
22
|
+
- `plastic-auto` reads `--json` to choose the next dispatchable intent
|
|
23
|
+
|
|
24
|
+
## Procedure
|
|
25
|
+
|
|
26
|
+
### Step 1 — Run the script
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ruby ~/.plastic/scripts/dashboard.rb [continue|project <slug>|all] [--json]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
| Mode | Shows |
|
|
33
|
+
|------|-------|
|
|
34
|
+
| `continue` (default) | Cross-scope: active + last touched, then the Value×Effort matrix for all scopes |
|
|
35
|
+
| `project <slug>` | One project: active line + its Value×Effort matrix |
|
|
36
|
+
| `all` | Per-scope roll-up summary |
|
|
37
|
+
| `--json` | The auto-mode manifest (any mode); machine-readable, not for humans |
|
|
38
|
+
|
|
39
|
+
The script is **read-only**. Print its stdout verbatim — do not reformat, re-sort, or
|
|
40
|
+
re-summarize. That is what keeps the output uniform.
|
|
41
|
+
|
|
42
|
+
### Step 2 — Read the matrix
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
small effort big effort
|
|
46
|
+
high value QUICK WIN ★ NEXT BIG THING
|
|
47
|
+
low value DEFER → agent TRIAGE / question
|
|
48
|
+
(type=research/exploration → RESEARCH band, regardless of quadrant)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Disposition verbs: `▸ drive` (human leads), `⇢ defer` (agent knocks off),
|
|
52
|
+
`⊙ research` (research/explore agent), `⚑ triage` (human review / maybe abandon).
|
|
53
|
+
Flags: `⇡ unblocked` (a dependency just completed), `(Nd)` stale age.
|
|
54
|
+
|
|
55
|
+
### Step 3 — Act on it
|
|
56
|
+
|
|
57
|
+
- **★ Next big thing** and `▸ drive` / `⚑ triage` items → the human leads (brainstorm → plan → exec).
|
|
58
|
+
- `⇢ defer` and `⊙ research` items → dispatchable to agents.
|
|
59
|
+
- In auto mode, read `--json` and work `dispatchable_queue` in `rank` order; leave
|
|
60
|
+
`human_only` for the user.
|
|
61
|
+
|
|
62
|
+
## JSON contract
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{ "generated_for": "auto-mode", "scope": "<scope|all>",
|
|
66
|
+
"next_big_thing": "<id|null>",
|
|
67
|
+
"dispatchable_queue": [ {"id","scope","disposition","type","value","effort","flags","rank"} ],
|
|
68
|
+
"human_only": ["<id>", "..."] }
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## How classification works (deterministic)
|
|
72
|
+
|
|
73
|
+
- **Effort** — small for `research`/`exploration`/`bugfix`, for already-scoped intents
|
|
74
|
+
(plan/checklist exists), or deep refinement branches; big otherwise.
|
|
75
|
+
- **Value** — high only for an explicit `value: high` frontmatter field, or a
|
|
76
|
+
human-authored root intent that has spawned follow-on work (`chain` non-empty); low otherwise.
|
|
77
|
+
- **Override** — a `value: high|normal|low` field in an intent's frontmatter wins. This is
|
|
78
|
+
the only place model judgment enters, and only as pre-stamped data (never at render time).
|
|
79
|
+
|
|
80
|
+
## Eval
|
|
81
|
+
|
|
82
|
+
This skill's eval is **render the template**: run the engine against the test fixture
|
|
83
|
+
store and assert byte-identical text + JSON output against the golden snapshots in
|
|
84
|
+
`test/fixtures/dashboard/`. See `test/dashboard_test.rb`. If output drifts from the
|
|
85
|
+
golden files without an intentional template change, the skill is broken.
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- Clusters (Zettelkasten grouping in INDEX.md) are intentionally **not** rendered — they
|
|
90
|
+
are orthogonal to "what to work on next."
|
|
91
|
+
- Glyphs are monochrome Unicode (no emoji); they render in standard terminal emulators.
|
|
92
|
+
- This is additive: it changes no core lifecycle, gate, or cycle logic.
|