@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.
Files changed (116) hide show
  1. package/PLASTIC-reference.md +133 -0
  2. package/PLASTIC.md +407 -84
  3. package/README.md +99 -82
  4. package/agents/plastic-brainstorming.md +12 -9
  5. package/agents/plastic-enforcer.md +52 -12
  6. package/agents/plastic-executor.md +10 -10
  7. package/agents/plastic-future-intent-researcher.md +4 -8
  8. package/agents/plastic-intent-curator.md +12 -14
  9. package/agents/plastic-intent-discovery.md +35 -0
  10. package/agents/plastic-planner.md +15 -10
  11. package/agents/plastic-spec-specialist.md +15 -10
  12. package/bin/plastic.js +7 -3
  13. package/hooks/code-gate +10 -1
  14. package/hooks/hooks.json +28 -3
  15. package/hooks/lock-gate +21 -0
  16. package/hooks/retrieval-gate +10 -0
  17. package/hooks/savepoint-pre +10 -0
  18. package/hooks/statusline +48 -6
  19. package/package.json +2 -1
  20. package/scripts/agent-report +21 -0
  21. package/scripts/dashboard.rb +98 -23
  22. package/scripts/doctor.rb +404 -5
  23. package/scripts/hook-auto-arm +1 -1
  24. package/scripts/hook-bash-gate +22 -4
  25. package/scripts/hook-code-gate +11 -6
  26. package/scripts/hook-continue +17 -0
  27. package/scripts/hook-create-gate +45 -9
  28. package/scripts/hook-gate-check +24 -23
  29. package/scripts/hook-lock-gate +83 -0
  30. package/scripts/hook-retrieval-gate +148 -0
  31. package/scripts/hook-savepoint-pre +32 -0
  32. package/scripts/hook-session-start +1 -1
  33. package/scripts/insight-append +51 -0
  34. package/scripts/install.rb +44 -7
  35. package/scripts/lib/agent_models.rb +43 -0
  36. package/scripts/lib/bridge.rb +924 -84
  37. package/scripts/lib/dashboard_banner.rb +42 -0
  38. package/scripts/lib/frontmatter_writer.rb +130 -0
  39. package/scripts/lib/graph_rebuild.rb +328 -0
  40. package/scripts/lib/hook_registry.rb +95 -0
  41. package/scripts/lib/insights.rb +86 -0
  42. package/scripts/lib/installer_core.rb +104 -60
  43. package/scripts/lib/link_suggestions.rb +319 -0
  44. package/scripts/lib/links_projection.rb +160 -0
  45. package/scripts/lib/links_section.rb +207 -0
  46. package/scripts/lib/lock.rb +375 -0
  47. package/scripts/lib/power_tools.rb +22 -21
  48. package/scripts/lib/preflight.rb +79 -0
  49. package/scripts/lib/qmd_sync.rb +15 -0
  50. package/scripts/lib/retrieval_gate.rb +211 -0
  51. package/scripts/lib/worktree.rb +384 -0
  52. package/scripts/link-suggest +213 -0
  53. package/scripts/new-intent +138 -29
  54. package/scripts/plastic-lock +164 -0
  55. package/scripts/project-links +287 -0
  56. package/scripts/read-config +4 -0
  57. package/scripts/rebuild-graph +244 -0
  58. package/scripts/spawn-preamble +11 -3
  59. package/scripts/update.rb +16 -7
  60. package/skills/auto/SKILL.md +126 -19
  61. package/skills/auto/references/agent-architecture.md +7 -4
  62. package/skills/auto/references/agent-report-contract.md +36 -1
  63. package/skills/auto/references/end-tail.md +56 -0
  64. package/skills/auto/references/human-report-contract.md +55 -0
  65. package/skills/auto/references/tiers.md +77 -0
  66. package/skills/brainstorming/SKILL.md +7 -34
  67. package/skills/brainstorming/references/design-principles.md +49 -0
  68. package/skills/continuing/SKILL.md +26 -7
  69. package/skills/creating-intent/SKILL.md +13 -28
  70. package/skills/creating-intent/references/lifecycle.md +9 -4
  71. package/skills/creating-project/SKILL.md +11 -74
  72. package/skills/creating-project/references/project-scaffolding.md +97 -0
  73. package/skills/creating-skills/SKILL.md +65 -0
  74. package/skills/creating-skills/evals/evals.json +108 -0
  75. package/skills/creating-skills/references/agents.md +168 -0
  76. package/skills/creating-skills/references/evals.md +41 -0
  77. package/skills/creating-skills/references/hooks.md +248 -0
  78. package/skills/creating-skills/references/progressive-disclosure.md +176 -0
  79. package/skills/creating-skills/references/scripts.md +166 -0
  80. package/skills/creating-skills/references/skills.md +165 -0
  81. package/skills/creating-skills/scripts/scaffold.rb +313 -0
  82. package/skills/dashboard/SKILL.md +13 -11
  83. package/skills/dashboard/references/classification.md +22 -0
  84. package/skills/doctor/SKILL.md +10 -7
  85. package/skills/executing-plan/SKILL.md +4 -4
  86. package/skills/humanizer/SKILL.md +39 -0
  87. package/skills/humanizer/evals/evals.json +70 -0
  88. package/skills/humanizer/references/always-on-snippet.md +9 -0
  89. package/skills/humanizer/references/examples.md +48 -0
  90. package/skills/install/SKILL.md +75 -84
  91. package/skills/intent-curator/SKILL.md +5 -1
  92. package/skills/intent-discovery/SKILL.md +47 -0
  93. package/skills/intent-starting/SKILL.md +130 -0
  94. package/skills/intent-starting/evals/evals.json +117 -0
  95. package/skills/intent-starting/references/boarding-matrix.md +35 -0
  96. package/skills/linking-intents/SKILL.md +48 -12
  97. package/skills/linking-intents/references/zettelkasten.md +7 -0
  98. package/skills/lock/SKILL.md +41 -0
  99. package/skills/managing-index/SKILL.md +6 -0
  100. package/skills/managing-index/references/zettelkasten-linking.md +6 -1
  101. package/skills/releasing/SKILL.md +44 -29
  102. package/skills/releasing/references/promotion-and-tagging.md +60 -0
  103. package/skills/roadmap/SKILL.md +51 -0
  104. package/skills/roadmap/references/file-format.md +91 -0
  105. package/skills/roadmap/references/operations.md +78 -0
  106. package/skills/uninstall/SKILL.md +29 -11
  107. package/skills/update/SKILL.md +34 -23
  108. package/skills/versions/SKILL.md +27 -12
  109. package/skills/writing-plans/SKILL.md +10 -88
  110. package/skills/writing-plans/references/plan-format.md +102 -0
  111. package/templates/config.yml +8 -0
  112. package/templates/outcome.md +3 -0
  113. package/templates/revisions.md +58 -0
  114. package/templates/roadmap.md +30 -0
  115. package/skills/writing-instructions/SKILL.md +0 -159
  116. package/skills/writing-instructions/references/agentskills-spec.md +0 -135
@@ -0,0 +1,49 @@
1
+ # Design Principles: Unit Boundaries and Existing Codebases
2
+
3
+ General good-developer guidance behind two parts of the Process: how to design for
4
+ isolation and clarity, and how to behave in an existing codebase. Also holds the
5
+ Process Flow diagram (the same ordered flow the Checklist already states as numbered
6
+ steps).
7
+
8
+ ## Design for isolation and clarity
9
+
10
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
11
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
12
+ - 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.
13
+ - 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.
14
+
15
+ ## Working in existing codebases
16
+
17
+ - Explore the current structure before proposing changes. Follow existing patterns.
18
+ - 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.
19
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
20
+
21
+ ## Process Flow (diagram)
22
+
23
+ The Checklist above already states this ordered flow as numbered steps 1-8; this
24
+ diagram is the same flow in a visual form.
25
+
26
+ ```dot
27
+ digraph brainstorming {
28
+ "Explore project context" [shape=box];
29
+ "Ask clarifying questions" [shape=box];
30
+ "Propose 2-3 approaches" [shape=box];
31
+ "Present design sections" [shape=box];
32
+ "User approves design?" [shape=diamond];
33
+ "Write spec" [shape=box];
34
+ "Spec self-review\n(fix inline)" [shape=box];
35
+ "User reviews spec?" [shape=diamond];
36
+ "Invoke plastic-writing-plans" [shape=doublecircle];
37
+
38
+ "Explore project context" -> "Ask clarifying questions";
39
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
40
+ "Propose 2-3 approaches" -> "Present design sections";
41
+ "Present design sections" -> "User approves design?";
42
+ "User approves design?" -> "Present design sections" [label="no, revise"];
43
+ "User approves design?" -> "Write spec" [label="yes"];
44
+ "Write spec" -> "Spec self-review\n(fix inline)";
45
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
46
+ "User reviews spec?" -> "Write spec" [label="changes requested"];
47
+ "User reviews spec?" -> "Invoke plastic-writing-plans" [label="approved"];
48
+ }
49
+ ```
@@ -38,7 +38,11 @@ here — run the data payload and fill + present the matching template:
38
38
  - Otherwise → `ruby ~/.plastic/scripts/dashboard.rb continue --data`
39
39
 
40
40
  Fill the matching template from this skill's `templates/` and **present the filled Markdown
41
- in your reply** (every time). See `plastic-dashboard` for the fill rules and entry flow.
41
+ in your reply** (every time, non-optional). If the reply does not contain the filled Markdown,
42
+ the user sees nothing — tool-call stdout and hook `additionalContext` are both invisible to
43
+ them. `hook-continue` also emits a one-line `systemMessage` summary as a hook-owned fallback;
44
+ treat it as a floor only, never as a substitute for presenting the full board here. See
45
+ `plastic-dashboard` for the fill rules and entry flow.
42
46
 
43
47
  The board load runs the scoped store check on every load (`doctor --store <scope>`): the
44
48
  global board runs `--store global` and a project board runs `--store <slug>`. The result
@@ -63,13 +67,28 @@ command is a no-op when QMD is absent, so fall back to the existing INDEX.md / f
63
67
 
64
68
  For that intent's directory:
65
69
 
66
- 1. **Read `savepoint.md`.** It is a deterministic, append-only stage ledger (one line per
67
- milestone, newest at the bottom): `{utc-iso8601} {Stage} {milestone}`. The **last line =
68
- current stage**.
69
- 2. **Verify the stage file.** Confirm the file the ledger names exists and is non-empty
70
- (ledger `How plan.md created` → `plan.md` must be present and non-empty).
70
+ 1. **Read `savepoint.md` FIRST (intent 81).** It is a deterministic, append-only ledger
71
+ (one line per event, newest at the bottom): `{utc-iso8601} {Stage} {milestone}`. Classify
72
+ the state from the **last line** alone, then verify ONLY that line's artifact. The bookends
73
+ are fixed: first line `What created`, last line either a cycle position or
74
+ `Done delivered|abandoned`.
75
+
76
+ | Last line | State | Verify only |
77
+ |---|---|---|
78
+ | `What {id}--{slug}.md` | born / parked | intent file exists |
79
+ | `Why started` | Why entered, no spec yet | spec.md not yet real; continue Why |
80
+ | `Why spec.md created` | Why done | spec.md present; continue to How |
81
+ | `How started` / `How plan.md created` | How in progress | plan.md; continue How |
82
+ | `How checklist.md created` / `Exec started` | ready for / in Exec | plan.md + checklist.md present; continue Exec |
83
+ | `Exec outcome.md created` | Exec done | outcome.md present; ready to complete |
84
+ | `Done delivered` / `Done abandoned` | terminal | do NOT cycle-resume; INDEX is authoritative |
85
+
86
+ 2. **Verify the stage file.** Confirm only the last line's artifact exists and is non-empty
87
+ (ledger `How plan.md created` → `plan.md` must be present and non-empty). Do not re-probe
88
+ every lifecycle file.
71
89
  3. **Drift handling.** If the ledger's last line disagrees with files-on-disk, rebuild the
72
- ledger from filesystem state and note the correction:
90
+ ledger from filesystem state and note the correction. A rebuilt ledger is the file-landing
91
+ skeleton (no `started`/`Done` lines), which still pins cycle position:
73
92
  ```bash
74
93
  ruby -r ~/.plastic/scripts/lib/bridge -e 'Bridge.rebuild_savepoint("<intent_dir>")'
75
94
  ```
@@ -62,12 +62,18 @@ Having a "parent" in mind does NOT automatically mean branch. Choose by meaning:
62
62
  direct-ascendant provenance (D1).
63
63
  - **Merely related to / inspired by another intent** (it did NOT come out of that
64
64
  intent's lifecycle): carry NO `--sources`. Record the relation on the PREDECESSOR's
65
- `chain` instead, and mirror it as a `[[id]]` wikilink in `## Links` (the
66
- related-but-not-spawned rule).
65
+ `chain` instead (the related-but-not-spawned rule); the `## Links` section follows
66
+ from that edge, you do not write it by hand.
67
67
  - **Rule of thumb:** if the intent could exist without its parent, make it a root; only set
68
68
  `--sources` when it was genuinely created from / emerged from that intent's lifecycle.
69
69
  Topic similarity alone is not a `sources` edge.
70
70
 
71
+ `## Links` is a DERIVED view of `sources`/`chain`. Never hand-write a `## Links` line; add the
72
+ frontmatter edge and reproject. Links are decided by context influence (a `chain` edge has a high
73
+ bar: the candidate's context must materially help deliver this intent), not by shared files or a
74
+ similarity score. To gather candidates with their context and record an edge, use the
75
+ `plastic-linking-intents` skill and `scripts/link-suggest`.
76
+
71
77
  ### 3. Determine Intent Properties
72
78
 
73
79
  Ask or infer from context:
@@ -118,32 +124,11 @@ cleanly, and do not work around the failure by hand-writing the files.
118
124
 
119
125
  ### 6. If Implementation Intent Spawns a Project
120
126
 
121
- When the user says "start building" or the plan calls for a new project:
122
-
123
- 1. Determine project slug from intent name
124
- 2. Create project directory in first `project_roots` path (from `~/.plastic/config.yml`):
125
- ```bash
126
- mkdir -p <project_root>/<slug>
127
- cd <project_root>/<slug>
128
- git init
129
- ```
130
- 3. Copy `AGENTS.md` template from `${CLAUDE_PLUGIN_ROOT}/templates/agents.md`
131
- 4. Register in `~/.plastic/projects.yml`:
132
- ```yaml
133
- <slug>:
134
- path: <full-path>
135
- parent: "ID"
136
- registered: <today>
137
- status: active
138
- ```
139
- 5. Provision the project store (the single source of truth for store creation;
140
- runs after step 4 because the provisioner requires the project to be
141
- registered):
142
- ```bash
143
- ruby ~/.plastic/scripts/provision-project-store <slug>
144
- ```
145
- 6. Add `project-<slug>` to the intent's `tags` array
146
- 7. Auto-commit in both `~/.plastic/` and the new project
127
+ When the user says "start building" or the plan calls for a new project, invoke the
128
+ `plastic-creating-project` skill; it owns project directory creation, AGENTS.md
129
+ population, projects.yml registration, store provisioning, and the auto-commit of
130
+ both stores. Add `project-<slug>` to this intent's `tags` array either before
131
+ invoking it or as part of that skill's handoff.
147
132
 
148
133
  ### 7. Update INDEX.md
149
134
 
@@ -42,10 +42,15 @@ field.
42
42
 
43
43
  ## `## Links`
44
44
 
45
- The human-readable projection of the local knowledge graph: all `sources`
46
- first (top, named), then all `chain` (named), as `[[id]]` wikilinks plus a
47
- short label. Counterpart to the frontmatter `sources` / `chain` edges, for
48
- Obsidian graph navigation.
45
+ The human-readable projection of the local knowledge graph, mirroring the
46
+ frontmatter exactly. Each entry is `- [[id--slug|<target's full intent: text>]]`,
47
+ a clickable `id--slug` wikilink target with the target intent's full `intent:`
48
+ text as the label (cross-store targets render
49
+ `- [[store:id--slug|<target's full intent: text>]]`). Ordering is mandatory: all
50
+ `sources` first (top), then all `chain`, frontmatter order preserved within each
51
+ group. Sources never appear at the end. No source/chain tags, no sub-grouping. An
52
+ intent with empty `sources` and `chain` carries the empty-state comment. Counterpart
53
+ to the frontmatter `sources` / `chain` edges, for Obsidian graph navigation.
49
54
 
50
55
  ## Conventions — Filesystem as Schema
51
56
 
@@ -43,89 +43,25 @@ Invoke `plastic-install --local` in the project directory. This creates:
43
43
 
44
44
  ### 4. Populate AGENTS.md
45
45
 
46
- Create `AGENTS.md` in the project root with:
47
-
48
- ```markdown
49
- # <Project Name> — Agent Instructions
50
-
51
- Read `PLASTIC.md` in `~/.plastic/`. It contains all Plastic conventions.
52
- Follow it exactly.
53
-
54
- This file is the operating contract for this project. Any agent entering
55
- this project reads this file first.
56
-
57
- ## Global Store
58
-
59
- Location: `~/.plastic/`
60
- Governing intent(s): <list of founding intent IDs with descriptions>
61
-
62
- ## Decisions
63
-
64
- <Copy ALL decisions from founding intent(s)' `## Context > ### Decisions`>
65
-
66
- Each decision should include:
67
- - The decision itself
68
- - The rationale (why this choice)
69
- - Date decided
70
-
71
- ## Project-Specific Rules
72
-
73
- <Any rules derived from the decisions — e.g., "Use Minitest, not RSpec",
74
- "37signals methodology", "sqlite-vec for vector storage">
75
- ```
46
+ Create `AGENTS.md` in the project root from the skeleton in
47
+ `references/project-scaffolding.md` ("AGENTS.md skeleton"): read it now and fill in
48
+ the project name, governing intent IDs, decisions, and project-specific rules.
76
49
 
77
50
  ### 5. Create Tactical Mirror
78
51
 
79
- Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`:
52
+ Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`
53
+ using the frontmatter, sections, and INDEX.md line in `references/project-scaffolding.md`
54
+ ("Tactical mirror intent"), including the Hub multi-intent variant if there is more
55
+ than one founding intent.
80
56
 
81
57
  **Directory:** `~/.plastic/projects/{slug}/store/1--{slug}/`
82
58
  **File:** `~/.plastic/projects/{slug}/store/1--{slug}/1--{slug}.md`
83
59
 
84
- ```yaml
85
- ---
86
- id: '1'
87
- intent: "<same description as founding intent>"
88
- sources: ["global:<founding_intent_ID>"]
89
- chain: []
90
- created: <today>
91
- author: <same as founding intent author>
92
- tags: [<relevant tags>]
93
- ---
94
- ```
95
-
96
- Sections:
97
- - `## Intent` — same as founding intent
98
- - `## Context` — carry forward relevant Context and Decisions
99
- - `## Outcome` — (pending)
100
- - `## Insights` — empty
101
- - `## Links` — `[[global:<founding_intent_ID>|<founding intent name>]]`
102
-
103
- Update the project's `~/.plastic/projects/{slug}/INDEX.md`:
104
- ```markdown
105
- # Index
106
-
107
- ## Active
108
- - [1 — <intent name>](store/1--<slug>/1.md) — implementation, from: global:<ID>
109
- ```
110
-
111
- **For multi-intent spawning (Hub):**
112
- - `sources`: `["global:<id1>", "global:<id2>", ...]` — all founding intents
113
- - All founding intents' decisions merge into AGENTS.md
114
- - Context carries forward from all founding intents
115
-
116
60
  ### 6. Register in projects.yml
117
61
 
118
- Read `~/.plastic/projects.yml` and add:
119
-
120
- ```yaml
121
- <slug>:
122
- path: <full-path>
123
- parent: "<founding_intent_ID>"
124
- registered: <today>
125
- status: active
126
- ```
127
-
128
- For Hub-spawned projects, `parent` references the primary founding intent.
62
+ Read `~/.plastic/projects.yml` and add the entry shown in
63
+ `references/project-scaffolding.md` ("projects.yml registration block"). For
64
+ Hub-spawned projects, `parent` references the primary founding intent.
129
65
 
130
66
  ### 7. Provision the Project Store
131
67
 
@@ -195,4 +131,5 @@ Announce to user:
195
131
 
196
132
  ## References
197
133
 
134
+ - Read `references/project-scaffolding.md` before steps 4-6, for the AGENTS.md skeleton, the tactical mirror intent format, and the projects.yml registration block
198
135
  - Read `references/hubs-projects.md` for the full hub/project relationship model, project creation flow, and cross-linking conventions
@@ -0,0 +1,97 @@
1
+ # Project Scaffolding Templates
2
+
3
+ Full templates for the artifacts created while spawning a project: the AGENTS.md
4
+ skeleton (Workflow step 4), the tactical mirror intent (step 5), and the
5
+ projects.yml registration block (step 6).
6
+
7
+ ## Table of Contents
8
+
9
+ - [AGENTS.md skeleton (step 4)](#agentsmd-skeleton-step-4)
10
+ - [Tactical mirror intent (step 5)](#tactical-mirror-intent-step-5)
11
+ - [projects.yml registration block (step 6)](#projectsyml-registration-block-step-6)
12
+
13
+ ## AGENTS.md skeleton (step 4)
14
+
15
+ Create `AGENTS.md` in the project root with:
16
+
17
+ ```markdown
18
+ # <Project Name> — Agent Instructions
19
+
20
+ Read `PLASTIC.md` in `~/.plastic/`. It contains all Plastic conventions.
21
+ Follow it exactly.
22
+
23
+ This file is the operating contract for this project. Any agent entering
24
+ this project reads this file first.
25
+
26
+ ## Global Store
27
+
28
+ Location: `~/.plastic/`
29
+ Governing intent(s): <list of founding intent IDs with descriptions>
30
+
31
+ ## Decisions
32
+
33
+ <Copy ALL decisions from founding intent(s)' `## Context > ### Decisions`>
34
+
35
+ Each decision should include:
36
+ - The decision itself
37
+ - The rationale (why this choice)
38
+ - Date decided
39
+
40
+ ## Project-Specific Rules
41
+
42
+ <Any rules derived from the decisions — e.g., "Use Minitest, not RSpec",
43
+ "37signals methodology", "sqlite-vec for vector storage">
44
+ ```
45
+
46
+ ## Tactical mirror intent (step 5)
47
+
48
+ Create the first intent in the project's store at `~/.plastic/projects/{slug}/store/`:
49
+
50
+ **Directory:** `~/.plastic/projects/{slug}/store/1--{slug}/`
51
+ **File:** `~/.plastic/projects/{slug}/store/1--{slug}/1--{slug}.md`
52
+
53
+ ```yaml
54
+ ---
55
+ id: '1'
56
+ intent: "<same description as founding intent>"
57
+ sources: ["global:<founding_intent_ID>"]
58
+ chain: []
59
+ created: <today>
60
+ author: <same as founding intent author>
61
+ tags: [<relevant tags>]
62
+ ---
63
+ ```
64
+
65
+ Sections:
66
+ - `## Intent` — same as founding intent
67
+ - `## Context` — carry forward relevant Context and Decisions
68
+ - `## Outcome` — (pending)
69
+ - `## Insights` — empty
70
+ - `## Links` — `[[global:<founding_intent_ID>|<founding intent name>]]`
71
+
72
+ Update the project's `~/.plastic/projects/{slug}/INDEX.md`:
73
+ ```markdown
74
+ # Index
75
+
76
+ ## Active
77
+ - [1 — <intent name>](store/1--<slug>/1.md) — implementation, from: global:<ID>
78
+ ```
79
+
80
+ **For multi-intent spawning (Hub):**
81
+ - `sources`: `["global:<id1>", "global:<id2>", ...]` — all founding intents
82
+ - All founding intents' decisions merge into AGENTS.md
83
+ - Context carries forward from all founding intents
84
+
85
+ ## projects.yml registration block (step 6)
86
+
87
+ Read `~/.plastic/projects.yml` and add:
88
+
89
+ ```yaml
90
+ <slug>:
91
+ path: <full-path>
92
+ parent: "<founding_intent_ID>"
93
+ registered: <today>
94
+ status: active
95
+ ```
96
+
97
+ For Hub-spawned projects, `parent` references the primary founding intent.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: plastic-creating-skills
3
+ description: >
4
+ Author or revise a Plastic skill, a subagent or Agent role file, or a
5
+ lifecycle hook with progressive disclosure. Use when creating or editing a
6
+ SKILL.md, writing a description or frontmatter, designing the slim body,
7
+ building references, evals, or scripts, or scaffolding a new skill. Also use
8
+ when a skill is too big or over its token budget, when prompts are bloated,
9
+ when an agent keeps missing a step or ignoring instructions, or when the user
10
+ says "progressive disclosure", "write a skill", "thin router", "split into
11
+ references", or "make this slim".
12
+ ---
13
+
14
+ # Creating Skills
15
+
16
+ Author skills, agents, and hooks as thin routers over deep references. This
17
+ body carries the rules that must stay correct without opening anything, then
18
+ routes each authoring task to the reference that holds the depth.
19
+
20
+ ## Rules (must be right even if no reference is opened)
21
+
22
+ - Three load levels, hard budgets: metadata around 100 tokens (always loaded),
23
+ body under 5000 tokens and under 500 lines (loaded on trigger), references on
24
+ demand. Keep the body well under budget, not at the ceiling.
25
+ - Progressive disclosure first: the body routes, the references hold the depth.
26
+ Any deep how-to in the body belongs in a reference instead.
27
+ - Description states WHEN to use, not the workflow. Write it in third person,
28
+ front-load concrete trigger keywords, and include at least one indirect
29
+ trigger (a request that never names the domain). Never summarize the steps.
30
+ - Bind every reference link to an observable trigger condition. Never leave a
31
+ bare pointer to a reference.
32
+ - References stay one level deep. Any reference over 100 lines opens with a
33
+ table of contents.
34
+ - Build at least three evals before writing extensive docs.
35
+ - Match determinism to fragility: a deterministic script for fragile or
36
+ repeated mechanical steps, prose for judgment calls.
37
+ - Imperative voice, no second person. No em-dashes or en-dashes in any shipped
38
+ skill or doc (use commas, periods, parentheses, colons).
39
+
40
+ ## Route the authoring task to its reference
41
+
42
+ | Authoring task | Open |
43
+ |---|---|
44
+ | Starting any authoring task: load the load-level model and the thin-router pattern first | `references/progressive-disclosure.md` |
45
+ | Authoring an Agent Skill (frontmatter, description, slim body, voice) | `references/skills.md` |
46
+ | Authoring a subagent or Agent role file | `references/agents.md` |
47
+ | Authoring a lifecycle hook | `references/hooks.md` |
48
+ | Deciding script versus prose, or writing a script | `references/scripts.md` |
49
+ | Building evals for a skill | `references/evals.md` |
50
+
51
+ ## Shrink context, or let a skill self-improve
52
+
53
+ - When prompts or tool output blow the context budget, open `references/hooks.md` (E7) for
54
+ the global token levers: a PostToolUse hook that trims noisy tool output before it enters
55
+ context, and Programmatic Tool Calling that keeps looped tool results in code, not context.
56
+ - When a skill should learn from its own real runs, open `references/hooks.md` (E8) for the
57
+ propose-only Stop or SubagentStop loop (transcript to proposed edits to human approval to
58
+ git, effort-gated). The dedicated skill is the future `improving-skills` skill.
59
+
60
+ ## Scaffolder and evals
61
+
62
+ - To start a new skill, agent, or hook from a born-slim file, run
63
+ `scripts/scaffold.rb`.
64
+ - To design, run, and grade evals in depth (paired runs, assertions after
65
+ observing, pass rates), use the `plastic-evaluating-skills` skill.
@@ -0,0 +1,108 @@
1
+ {
2
+ "skill_name": "plastic-creating-skills",
3
+ "evals": [
4
+ {
5
+ "id": 1,
6
+ "prompt": "I want to author a new Plastic skill, how should I structure it?",
7
+ "expected_output": "The skill should activate. This is a direct authoring request that names the domain. Guide the user through progressive disclosure: metadata around 100 tokens, a slim body under 5000 tokens and 500 lines that routes, and references on demand. Point to references/skills.md for frontmatter, description, and voice, and route load-level questions through references/progressive-disclosure.md first.",
8
+ "files": [],
9
+ "assertions": [
10
+ "The skill activates (direct authoring request that names the domain).",
11
+ "The response routes to references rather than dumping deep how-to inline.",
12
+ "The response states the load-level budgets (around 100 token metadata, body under 5000 tokens and 500 lines)."
13
+ ]
14
+ },
15
+ {
16
+ "id": 2,
17
+ "prompt": "The agent keeps ignoring my instructions and the file is huge, help me restructure it",
18
+ "expected_output": "The skill should activate. This is an indirect trigger that never names skills or progressive disclosure, but the symptoms (bloated file, agent missing or skipping steps) are exactly the over-budget body case the skill covers. Guide toward splitting the body into references, keeping the body a thin router, and binding each reference to an observable trigger condition.",
19
+ "files": [],
20
+ "assertions": [
21
+ "The skill activates on the indirect trigger (no skill or progressive-disclosure keyword in the prompt).",
22
+ "The response guides toward splitting the body into references and keeping a thin router."
23
+ ]
24
+ },
25
+ {
26
+ "id": 3,
27
+ "prompt": "Scaffold a new lifecycle hook for Plastic",
28
+ "expected_output": "The skill should activate. Authoring a lifecycle hook is in scope. Route to references/hooks.md and offer scripts/scaffold.rb to start the hook from a born-slim file.",
29
+ "files": [],
30
+ "assertions": [
31
+ "The skill activates (authoring a lifecycle hook is in scope).",
32
+ "The response routes to references/hooks.md and offers scripts/scaffold.rb."
33
+ ]
34
+ },
35
+ {
36
+ "id": 4,
37
+ "prompt": "Our prompts are bloated and we keep blowing the context budget",
38
+ "expected_output": "The skill should activate. This is an indirect trigger: the user describes bloated prompts and a context budget problem without naming skills. The skill restructures instructions into a thin router over deep references with hard load-level budgets, which is the fix for this symptom.",
39
+ "files": [],
40
+ "assertions": [
41
+ "The skill activates on the indirect context-budget trigger (no skill keyword in the prompt).",
42
+ "The response treats the fix as a thin router over deep references with hard load-level budgets."
43
+ ]
44
+ },
45
+ {
46
+ "id": 5,
47
+ "prompt": "Run the evals on my skill and check the pass rate",
48
+ "expected_output": "The skill should NOT trigger. Running evals and reading pass rates is the job of plastic-evaluating-skills, not authoring. Near-miss negative: shares the words 'skill' and 'evals' but the operation is grading an existing skill, not creating or revising one.",
49
+ "files": [],
50
+ "assertions": [
51
+ "The skill does not activate (running and grading evals is plastic-evaluating-skills, not authoring)."
52
+ ]
53
+ },
54
+ {
55
+ "id": 6,
56
+ "prompt": "Create a new intent for the dashboard work",
57
+ "expected_output": "The skill should NOT trigger. Creating an intent is plastic-creating-intent. Near-miss negative: shares the verb 'create' but the object is an intent, not a skill, agent, or hook.",
58
+ "files": [],
59
+ "assertions": [
60
+ "The skill does not activate (creating an intent is plastic-creating-intent)."
61
+ ]
62
+ },
63
+ {
64
+ "id": 7,
65
+ "prompt": "I keep losing every team fight because of a skill issue in this game, any tips?",
66
+ "expected_output": "The skill should NOT trigger. This is a gaming question with no relation to authoring instructions. Near-miss negative: shares the word 'skill' in an unrelated sense.",
67
+ "files": [],
68
+ "assertions": [
69
+ "The skill does not activate (gaming question, unrelated sense of 'skill')."
70
+ ]
71
+ },
72
+ {
73
+ "id": 8,
74
+ "prompt": "Write unit tests for my Ruby model that validates email addresses",
75
+ "expected_output": "The skill should NOT trigger. Writing test code is a Ruby testing task. Near-miss negative: shares 'write' and 'test' but has nothing to do with authoring a skill, agent, or hook.",
76
+ "files": [],
77
+ "assertions": [
78
+ "The skill does not activate (writing test code is a Ruby testing task, not authoring a skill)."
79
+ ]
80
+ },
81
+ {
82
+ "id": 9,
83
+ "prompt": "Author a slim SKILL.md for a PDF-extraction skill",
84
+ "expected_output": "Activation is assumed for this output-quality case. Correct output is a SKILL.md whose frontmatter description is third person, front-loads concrete trigger keywords, states WHEN to use rather than the workflow, and includes at least one indirect trigger. The body stays under 5000 tokens and under 500 lines and routes to references rather than carrying deep how-to. Each reference link names an observable trigger condition with no bare pointer like 'see references/'. References stay one level deep, and no string contains an em-dash or en-dash.",
85
+ "files": [],
86
+ "assertions": [
87
+ "The frontmatter description is written in the third person (no 'you' or 'I').",
88
+ "The description front-loads concrete trigger keywords in its opening clause.",
89
+ "The description includes at least one indirect trigger (a symptom phrasing that never names PDF extraction or skills).",
90
+ "The body is under 5000 tokens and under 500 lines.",
91
+ "Every reference link is bound to an observable trigger condition (no bare pointer such as 'see references/').",
92
+ "References stay one level deep (no reference points to a deeper reference).",
93
+ "No string in the SKILL.md or its references contains an em-dash or en-dash."
94
+ ]
95
+ },
96
+ {
97
+ "id": 10,
98
+ "prompt": "Make this subagent role file slim, the description is vague and the body is too long",
99
+ "expected_output": "The skill should activate. Authoring or revising a subagent or Agent role file is in scope, and the symptoms (vague description, over-long body) are the progressive-disclosure case. Route to references/agents.md, tighten the description to state WHEN, and move depth into references. Output should keep the body under budget and use no em-dashes.",
100
+ "files": [],
101
+ "assertions": [
102
+ "The skill activates (revising a subagent or Agent role file is in scope).",
103
+ "The response routes to references/agents.md and tightens the description to state WHEN.",
104
+ "The proposed output keeps the body under budget and uses no em-dash or en-dash."
105
+ ]
106
+ }
107
+ ]
108
+ }