@zalom/plastic 1.14.0 → 2.0.0-alpha.1

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 (190) hide show
  1. package/PLASTIC.md +101 -294
  2. package/README.md +5 -6
  3. package/agents/plastic-advisor.md +18 -17
  4. package/agents/plastic-enforcer.md +57 -69
  5. package/agents/plastic-executor.md +34 -20
  6. package/agents/plastic-faux-advisor.md +18 -18
  7. package/config_asks.yml +38 -0
  8. package/hooks/capture +4 -0
  9. package/hooks/check-update +12 -3
  10. package/hooks/close +5 -0
  11. package/hooks/hooks.json +9 -49
  12. package/hooks/record +4 -0
  13. package/package.json +3 -2
  14. package/scripts/agent-report +8 -9
  15. package/scripts/append-ledger +195 -0
  16. package/scripts/codex-hook +101 -95
  17. package/scripts/dashboard.rb +4 -4
  18. package/scripts/doctor.rb +106 -43
  19. package/scripts/end-intent +77 -76
  20. package/scripts/exec-worktree +11 -20
  21. package/scripts/file-session-intent +61 -0
  22. package/scripts/hook-capture +242 -0
  23. package/scripts/hook-close +34 -0
  24. package/scripts/hook-record +149 -0
  25. package/scripts/hook-session-start +95 -12
  26. package/scripts/install.rb +8 -6
  27. package/scripts/lib/agent_models.rb +1 -7
  28. package/scripts/lib/arm.rb +283 -0
  29. package/scripts/lib/backfill_intent.rb +316 -0
  30. package/scripts/lib/bridge.rb +24 -1597
  31. package/scripts/lib/doctor_core.rb +17 -88
  32. package/scripts/lib/doctor_session_ledger.rb +106 -0
  33. package/scripts/lib/exec_worktree.rb +14 -60
  34. package/scripts/lib/harness_text.rb +5 -4
  35. package/scripts/lib/hook_registry.rb +44 -107
  36. package/scripts/lib/insights.rb +3 -4
  37. package/scripts/lib/installer_core.rb +19 -30
  38. package/scripts/lib/lock.rb +6 -26
  39. package/scripts/lib/outcome_guard.rb +7 -5
  40. package/scripts/lib/project_validator.rb +30 -1
  41. package/scripts/lib/roadmap_queue.rb +3 -3
  42. package/scripts/lib/roadmap_savepoint.rb +1 -1
  43. package/scripts/lib/rule_catalog.rb +6 -3
  44. package/scripts/lib/savepoint.rb +320 -0
  45. package/scripts/lib/scaffold_intent.rb +13 -179
  46. package/scripts/lib/session_backfill.rb +184 -0
  47. package/scripts/lib/session_close.rb +84 -0
  48. package/scripts/lib/session_git.rb +469 -0
  49. package/scripts/lib/session_ledger.rb +497 -0
  50. package/scripts/lib/store_discovery.rb +1 -1
  51. package/scripts/lib/store_provisioning.rb +1 -1
  52. package/scripts/maintenance-run +7 -7
  53. package/scripts/new-intent +63 -4
  54. package/scripts/plastic-lock +94 -41
  55. package/scripts/promote-session-item +150 -0
  56. package/scripts/rebuild-graph +1 -1
  57. package/scripts/roadmap-next +2 -2
  58. package/scripts/rollback.rb +42 -3
  59. package/scripts/scaffold-intent +37 -63
  60. package/scripts/session-commit +116 -0
  61. package/scripts/spawn-preamble +5 -5
  62. package/scripts/update.rb +7 -3
  63. package/skills/agent-advisor/SKILL.md +3 -3
  64. package/skills/agent-advisor/references/advisor-protocol.md +20 -20
  65. package/skills/auto/SKILL.md +218 -317
  66. package/skills/auto/evals/evals.json +10 -10
  67. package/skills/auto/references/agent-architecture.md +102 -90
  68. package/skills/auto/references/agent-report-contract.md +4 -21
  69. package/skills/auto/references/end-tail.md +47 -53
  70. package/skills/auto/references/human-report-contract.md +8 -8
  71. package/skills/conventions/SKILL.md +1 -3
  72. package/skills/conventions/references/lifecycle-and-savepoints.md +35 -1
  73. package/skills/conventions/references/locks-and-worktrees.md +47 -55
  74. package/skills/conventions/references/maintenance-and-revisions.md +12 -12
  75. package/skills/dashboard/SKILL.md +1 -1
  76. package/skills/direct/SKILL.md +66 -0
  77. package/skills/direct/references/request-signals.md +59 -0
  78. package/skills/doctor/SKILL.md +58 -11
  79. package/skills/doctor/report.md +3 -1
  80. package/skills/install/SKILL.md +11 -9
  81. package/skills/intent-continuing/SKILL.md +131 -89
  82. package/skills/intent-continuing/references/boarding-matrix.md +34 -0
  83. package/skills/intent-continuing/references/context-management.md +2 -2
  84. package/skills/intent-creating/SKILL.md +2 -2
  85. package/skills/intent-creating/references/lifecycle.md +1 -1
  86. package/skills/intent-ending/SKILL.md +28 -37
  87. package/skills/intent-ending/evals/evals.json +4 -4
  88. package/skills/intent-executing/SKILL.md +12 -49
  89. package/skills/intent-executing/plan-reviewer-prompt.md +39 -0
  90. package/skills/intent-speccing/SKILL.md +108 -51
  91. package/skills/intent-speccing/evals/evals.json +5 -5
  92. package/skills/intent-speccing/references/per-section-fill-rules.md +4 -4
  93. package/skills/intent-speccing/references/self-verify-checklist.md +1 -2
  94. package/skills/project-creating/SKILL.md +1 -1
  95. package/skills/releasing/SKILL.md +7 -8
  96. package/skills/tutorial/SKILL.md +2 -2
  97. package/skills/tutorial/references/track-1-guided.md +16 -18
  98. package/skills/tutorial/references/track-2-auto.md +12 -13
  99. package/skills/tutorial/references/track-3-projects-and-roadmaps.md +2 -2
  100. package/templates/agents.md +4 -7
  101. package/templates/project.yml +7 -0
  102. package/templates/roadmap.md +1 -1
  103. package/templates/savepoint.md +2 -2
  104. package/templates/session-intent.md +29 -0
  105. package/agents/plastic-brainstorming.md +0 -48
  106. package/agents/plastic-future-intent-researcher.md +0 -35
  107. package/agents/plastic-intent-curator.md +0 -47
  108. package/agents/plastic-intent-discovery.md +0 -43
  109. package/agents/plastic-planner.md +0 -56
  110. package/agents/plastic-spec-specialist.md +0 -53
  111. package/hooks/auto-arm +0 -5
  112. package/hooks/bash-gate +0 -3
  113. package/hooks/continue +0 -31
  114. package/hooks/edit-gates +0 -3
  115. package/hooks/future-intent-check +0 -25
  116. package/hooks/gate-check +0 -12
  117. package/hooks/power-tools +0 -8
  118. package/scripts/hook-auto-arm +0 -51
  119. package/scripts/hook-bash-gate +0 -78
  120. package/scripts/hook-code-gate +0 -38
  121. package/scripts/hook-continue +0 -48
  122. package/scripts/hook-create-gate +0 -51
  123. package/scripts/hook-edit-gates +0 -58
  124. package/scripts/hook-future-intent-check +0 -90
  125. package/scripts/hook-gate-check +0 -169
  126. package/scripts/hook-links-gate +0 -54
  127. package/scripts/hook-lock-gate +0 -47
  128. package/scripts/hook-power-tools +0 -38
  129. package/scripts/hook-savepoint-pre +0 -32
  130. package/scripts/lib/codex_edit_gates.rb +0 -138
  131. package/scripts/lib/edit_gates.rb +0 -398
  132. package/scripts/lib/links_gate.rb +0 -140
  133. package/scripts/lib/qmd_hook.rb +0 -41
  134. package/scripts/lib/spec_header.rb +0 -83
  135. package/scripts/lib/start_intent.rb +0 -296
  136. package/scripts/start-intent +0 -89
  137. package/skills/_active-intent-gate.md +0 -26
  138. package/skills/auto/references/tiers.md +0 -100
  139. package/skills/continuing/SKILL.md +0 -34
  140. package/skills/continuing/evals/evals.json +0 -91
  141. package/skills/conventions/references/gates-and-enforcement.md +0 -53
  142. package/skills/conventions/references/tiers-and-dispatch.md +0 -135
  143. package/skills/doctor/references/gates-stuck-detection.md +0 -43
  144. package/skills/intent-brainstorming/SKILL.md +0 -118
  145. package/skills/intent-brainstorming/evals/evals.json +0 -67
  146. package/skills/intent-continuing/evals/evals.json +0 -145
  147. package/skills/intent-discovering/SKILL.md +0 -56
  148. package/skills/intent-grilling/SKILL.md +0 -108
  149. package/skills/intent-linking/SKILL.md +0 -128
  150. package/skills/intent-linking/evals/evals.json +0 -22
  151. package/skills/intent-linking/references/zettelkasten.md +0 -45
  152. package/skills/intent-locking/SKILL.md +0 -64
  153. package/skills/intent-planning/SKILL.md +0 -145
  154. package/skills/intent-planning/evals/evals.json +0 -81
  155. package/skills/intent-planning/references/plan-format.md +0 -130
  156. package/skills/intent-researching/SKILL.md +0 -123
  157. package/skills/intent-researching/evals/evals.json +0 -22
  158. package/skills/intent-savepoint/SKILL.md +0 -83
  159. package/skills/intent-savepoint/references/context-management.md +0 -32
  160. package/skills/intent-starting/SKILL.md +0 -151
  161. package/skills/intent-starting/evals/evals.json +0 -117
  162. package/skills/intent-starting/references/boarding-matrix.md +0 -35
  163. package/skills/project-continuing/SKILL.md +0 -119
  164. package/skills/project-continuing/evals/evals.json +0 -100
  165. package/skills/roadmap-continuing/SKILL.md +0 -89
  166. package/skills/roadmap-continuing/evals/evals.json +0 -82
  167. package/skills/skill-creating/SKILL.md +0 -75
  168. package/skills/skill-creating/evals/evals.json +0 -108
  169. package/skills/skill-creating/references/agents.md +0 -168
  170. package/skills/skill-creating/references/defaults-first.md +0 -23
  171. package/skills/skill-creating/references/evals.md +0 -41
  172. package/skills/skill-creating/references/hooks.md +0 -251
  173. package/skills/skill-creating/references/progressive-disclosure.md +0 -176
  174. package/skills/skill-creating/references/scripts.md +0 -166
  175. package/skills/skill-creating/references/skills.md +0 -169
  176. package/skills/skill-creating/scripts/scaffold.rb +0 -313
  177. package/skills/skill-evaluating/SKILL.md +0 -141
  178. package/skills/skill-evaluating/assets/eval-template.json +0 -12
  179. package/skills/skill-evaluating/evals/evals.json +0 -75
  180. package/skills/skill-evaluating/references/convention-checks.md +0 -76
  181. package/skills/skill-evaluating/references/eval-methodology.md +0 -154
  182. package/skills/store-curating/SKILL.md +0 -64
  183. package/skills/store-curating/evals/evals.json +0 -38
  184. package/skills/store-indexing/SKILL.md +0 -93
  185. package/skills/store-indexing/evals/evals.json +0 -22
  186. package/skills/store-indexing/references/zettelkasten-linking.md +0 -32
  187. package/skills/store-provisioning/SKILL.md +0 -55
  188. /package/skills/{project-continuing → intent-continuing}/references/board-fill.md +0 -0
  189. /package/skills/{roadmap-continuing → intent-continuing}/references/liveness-ranking.md +0 -0
  190. /package/skills/{intent-brainstorming → intent-speccing}/references/design-principles.md +0 -0
@@ -1,141 +0,0 @@
1
- ---
2
- name: plastic-skill-evaluating
3
- description: >
4
- Evaluate Plastic skills for correctness, convention compliance, and
5
- progressive disclosure. Use when testing whether a skill produces good
6
- outputs, verifying convention compliance after changes, running evals
7
- against skills or instructions, creating evals for a new or updated
8
- skill, checking if a description triggers correctly, or assessing
9
- whether a skill is still needed. Also use when the user says "evaluate",
10
- "test the skill", "run evals", "check conventions", or "write evals".
11
- user-invocable: true
12
- ---
13
-
14
- # Evaluating Skills
15
-
16
- Eval methodology for Plastic skills, based on
17
- [agentskills.io](https://agentskills.io/skill-creation/evaluating-skills)
18
- and [Anthropic's eval guide](https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents).
19
-
20
- ## Gotchas
21
-
22
- - Assertions written before observing output are almost always wrong — run
23
- the eval first, observe actual output, THEN write assertions
24
- - Near-miss negative test cases are the most valuable — prompts that share
25
- keywords with should-trigger cases but need a different skill entirely
26
- - Select the best skill iteration by validation pass rate, not the last one
27
- - Grade outcomes, not execution paths — if the agent solved the task via an
28
- unexpected route but produced correct output, that is a pass
29
- - Same skill can behave differently across agent frameworks — test on each
30
- target agent (Claude Code, Hermes, OpenClaw, Codex)
31
-
32
- ## Procedure
33
-
34
- ### Step 1: Choose eval scope
35
-
36
- Determine what you are evaluating:
37
-
38
- - **Description triggering** — does the agent activate the right skill for
39
- a given prompt? Tests the description field effectiveness.
40
- - **Output quality** — does the skill produce correct results when activated?
41
- Tests the skill body and references.
42
- - **Convention compliance** — does the output follow Plastic conventions?
43
- Read `references/convention-checks.md` for the full assertion library.
44
-
45
- Multiple scopes can apply to the same skill. Start with the scope that
46
- addresses your immediate concern, add others as needed.
47
-
48
- ### Step 2: Design test cases
49
-
50
- Create `evals/evals.json` in the skill being evaluated. Copy the starter
51
- template from `assets/eval-template.json` in this skill.
52
-
53
- **For description triggering:**
54
- - Write ~20 queries: 8-10 should-trigger, 8-10 should-not-trigger
55
- - Split 60/40 into train and validation sets (proportional mix in each)
56
- - Include near-miss negatives that share keywords but need a different skill
57
- - In `expected_output`, describe whether the skill should or should not activate
58
- and why
59
-
60
- **For output quality:**
61
- - Start with 2-3 test cases, expand after first results
62
- - Use realistic user prompts with varied phrasing, detail level, and formality
63
- - In `expected_output`, describe what correct output looks like — not exact text
64
- - Use `files` array for any input files the test needs
65
-
66
- **For convention compliance:**
67
- - Start with 2-3 test cases targeting specific convention areas
68
- - In `expected_output`, describe which conventions must be met
69
- - Read `references/convention-checks.md` for the full assertion library
70
-
71
- Leave `assertions` arrays empty. They are populated after Step 4.
72
-
73
- ### Step 3: Run paired evals
74
-
75
- Dispatch a subagent per test case to ensure clean context — no leakage
76
- between test runs. Run each case twice:
77
-
78
- 1. **With skill** — the skill is available and loaded
79
- 2. **Without skill** — the skill is not available (baseline comparison)
80
-
81
- The delta between with-skill and without-skill measures what the skill adds.
82
- If the delta is negligible, the skill may not be adding value for that case.
83
-
84
- Grade outcomes, not paths. An unexpected tool-call sequence that produces
85
- correct output is still a pass.
86
-
87
- ### Step 4: Write assertions after observing
88
-
89
- Review actual outputs from Step 3. Write specific, verifiable assertions
90
- based on what you observed — not what you expected beforehand.
91
-
92
- Choose the grader type that fits each assertion:
93
- - **Code-based** — structure, file existence, format validity, counts
94
- - **LLM-as-judge** — quality, completeness, tone, semantic correctness
95
- - **Human** — edge cases, calibration, judgment calls
96
-
97
- Read `references/eval-methodology.md` for the full grader taxonomy and
98
- LLM-judge calibration protocol.
99
-
100
- Good assertions are specific, verifiable, and countable:
101
- "Output includes at least 3 concrete recommendations."
102
-
103
- Weak assertions are vague: "Output is good."
104
- Brittle assertions use exact phrase matching.
105
-
106
- Require concrete evidence for PASS. No benefit of the doubt.
107
-
108
- ### Step 5: Grade and iterate
109
-
110
- Compute pass rates per test case and aggregate across the eval suite.
111
-
112
- Track two metrics separately:
113
- - **pass@k** — succeeded at least once in k trials (capability)
114
- - **pass^k** — succeeded every time in k trials (reliability)
115
-
116
- Read `references/eval-methodology.md` for formulas and interpretation.
117
-
118
- Three signal sources for skill improvement:
119
- 1. **Failed assertions** — specific gaps in the skill
120
- 2. **Human feedback** — broader quality issues not captured by assertions
121
- 3. **Execution transcripts** — reveals WHY things went wrong
122
-
123
- Feed all three plus the current SKILL.md to propose targeted changes.
124
- Iterate on the train set only. Check the validation set for generalization.
125
- 5 iterations is usually enough. If not improving after 5, the test cases
126
- themselves may be the problem — revisit Step 2.
127
-
128
- ### Step 6: Graduate and monitor
129
-
130
- Once a skill hits ~100% on capability evals (pass@k = 1.0 for 3+
131
- consecutive runs):
132
-
133
- 1. **Graduate** capability evals into regression tests — run them on every
134
- skill change to protect against backsliding
135
- 2. **Monitor** the with/without delta over time — if it shrinks to zero
136
- across 3+ runs, the model may have internalized the skill
137
- 3. **Retire** cautiously — archive the skill, do not delete. Re-test after
138
- model updates in case capabilities regress.
139
-
140
- Read `references/eval-methodology.md` for graduation criteria, retirement
141
- detection, and the three-layer eval taxonomy.
@@ -1,12 +0,0 @@
1
- {
2
- "skill_name": "",
3
- "evals": [
4
- {
5
- "id": 1,
6
- "prompt": "",
7
- "expected_output": "",
8
- "files": [],
9
- "assertions": []
10
- }
11
- ]
12
- }
@@ -1,75 +0,0 @@
1
- {
2
- "skill_name": "plastic-skill-evaluating",
3
- "evals": [
4
- {
5
- "id": 1,
6
- "prompt": "I want to evaluate whether my intent-creating skill follows Plastic conventions",
7
- "expected_output": "The skill should activate and guide the user through convention compliance evaluation: choose eval scope, design test cases using convention-checks reference, run paired evals, write assertions after observing.",
8
- "files": [],
9
- "assertions": []
10
- },
11
- {
12
- "id": 2,
13
- "prompt": "Run evals on the intent-brainstorming skill to see if the description triggers correctly",
14
- "expected_output": "The skill should activate and guide through description triggering evaluation: design ~20 queries with should-trigger and near-miss negatives, 60/40 train/validation split, compute trigger rates.",
15
- "files": [],
16
- "assertions": []
17
- },
18
- {
19
- "id": 3,
20
- "prompt": "Create evals for a new skill I just wrote for database migrations",
21
- "expected_output": "The skill should activate, help create evals/evals.json in the migration skill directory using the template, guide through choosing eval scope (likely output quality), and design initial test cases.",
22
- "files": [],
23
- "assertions": []
24
- },
25
- {
26
- "id": 4,
27
- "prompt": "Check if my SKILL.md is under the token budget and follows progressive disclosure",
28
- "expected_output": "The skill should activate and guide through convention compliance evaluation focused on progressive disclosure checks: body under 500 lines/5000 tokens, references have conditional triggers, description under 1024 chars.",
29
- "files": [],
30
- "assertions": []
31
- },
32
- {
33
- "id": 5,
34
- "prompt": "My skill's description isn't triggering on the right prompts, how do I fix it?",
35
- "expected_output": "The skill should activate and guide through description triggering evaluation: create should-trigger and should-not-trigger queries, run paired evals, measure trigger rate, iterate on description wording.",
36
- "files": [],
37
- "assertions": []
38
- },
39
- {
40
- "id": 6,
41
- "prompt": "Write unit tests for my Ruby model that validates email addresses",
42
- "expected_output": "The skill should NOT trigger. This is a code testing task, not a skill evaluation task. Near-miss negative — shares 'test' keyword but needs a different skill.",
43
- "files": [],
44
- "assertions": []
45
- },
46
- {
47
- "id": 7,
48
- "prompt": "Fix the bug in my login controller where sessions aren't persisting",
49
- "expected_output": "The skill should NOT trigger. This is a debugging task with no relation to skill evaluation.",
50
- "files": [],
51
- "assertions": []
52
- },
53
- {
54
- "id": 8,
55
- "prompt": "Review this pull request for code quality issues",
56
- "expected_output": "The skill should NOT trigger. Code review is different from skill evaluation. Near-miss negative — shares 'review/evaluate' concept.",
57
- "files": [],
58
- "assertions": []
59
- },
60
- {
61
- "id": 9,
62
- "prompt": "I updated my skill and want to make sure it still works correctly",
63
- "expected_output": "The skill should activate and guide through regression evaluation: run existing evals against the updated skill, compare pass rates with previous version, check for backsliding.",
64
- "files": [],
65
- "assertions": []
66
- },
67
- {
68
- "id": 10,
69
- "prompt": "How do I know if a skill is still needed or if the model has learned the behavior?",
70
- "expected_output": "The skill should activate and guide through skill retirement detection: monitor with/without delta over time, if delta approaches zero the model has internalized the skill.",
71
- "files": [],
72
- "assertions": []
73
- }
74
- ]
75
- }
@@ -1,76 +0,0 @@
1
- # Plastic Convention Checks
2
-
3
- Assertion library for convention compliance evals on Plastic skills.
4
- Load when running convention compliance evals on a Plastic skill.
5
-
6
- ## Directory Structure
7
-
8
- | Check | Pass criteria |
9
- |-------|--------------|
10
- | SKILL.md exists | File present at skill root |
11
- | Name matches directory | `name` in frontmatter equals directory name |
12
- | Standard directories only | Only scripts/, references/, assets/, evals/ at root level (all optional) |
13
- | References one level deep | No nested directories inside references/ |
14
- | No orphan files | Every file in the skill dir is referenced from SKILL.md or another skill file |
15
- | evals/ has evals.json | If evals/ exists, it contains evals.json |
16
-
17
- ## Frontmatter
18
-
19
- | Check | Pass criteria |
20
- |-------|--------------|
21
- | `name` present | Non-empty, 1-64 chars |
22
- | `name` format | Lowercase alphanumeric + hyphens, no leading/trailing/consecutive hyphens |
23
- | `name` matches dir | Exact match with skill directory name |
24
- | `description` present | Non-empty, 1-1024 chars |
25
- | `description` phrasing | Starts with imperative verb or "Use when" pattern |
26
- | `description` triggers | Mentions at least one trigger context ("Use when...") |
27
- | `description` edge cases | Includes at least one indirect trigger (user doesn't name the domain) |
28
- | No unknown required fields | Only uses fields from agentskills.io spec: name, description, license, compatibility, metadata, allowed-tools |
29
-
30
- ## Progressive Disclosure
31
-
32
- | Check | Pass criteria |
33
- |-------|--------------|
34
- | Body line count | SKILL.md body (excluding frontmatter) under 500 lines |
35
- | Body token count | SKILL.md body under 5000 tokens (estimate: lines * 10) |
36
- | Deep detail in references | Content exceeding activation budget lives in references/ |
37
- | Conditional reference triggers | Every reference file mentioned in SKILL.md has a "when" condition |
38
- | No generic references | No "see references/ for more" — each reference has specific load trigger |
39
- | Description token budget | Description stays under ~100 tokens for discovery stage |
40
-
41
- ## Content Quality
42
-
43
- | Check | Pass criteria |
44
- |-------|--------------|
45
- | Gotchas are concrete | Each gotcha is a specific correction, not general advice |
46
- | Gotchas positioned early | Gotchas section appears before or near the top of procedures |
47
- | Defaults, not menus | Skill picks one approach; alternatives mentioned briefly if at all |
48
- | Procedures over declarations | Instructions teach HOW to approach, not WHAT to produce |
49
- | Reasoning over rigid directives | Uses "Do X because Y" pattern, not "ALWAYS/NEVER" without rationale |
50
- | No redundant knowledge | Every instruction passes "would the agent get this wrong without it?" |
51
- | No explaining basics | Does not explain HTTP, JSON, what a migration is, etc. |
52
-
53
- ## Eval Quality (when evals/ exists)
54
-
55
- | Check | Pass criteria |
56
- |-------|--------------|
57
- | Standard format | evals.json follows agentskills.io eval structure |
58
- | Prompts are realistic | Each prompt reads like a real user message |
59
- | Varied phrasing | Prompts use different wording, detail levels, formality |
60
- | Near-miss negatives | At least 2 should-not-trigger cases that share keywords |
61
- | Expected output descriptive | expected_output describes success, not exact text |
62
- | Assertions (if populated) | Each assertion is specific, verifiable, and countable |
63
-
64
- ## Intent Structure (when evaluating intent compliance)
65
-
66
- | Check | Pass criteria |
67
- |-------|--------------|
68
- | Intent file exists | `{ID}--{slug}.md` present in intent directory |
69
- | Frontmatter complete | id, intent, sources, chain, created, author, tags present |
70
- | ID format correct | Follows Luhmann alternating: digits and letters alternate |
71
- | Directory name matches | `{ID}--{slug}` format, 3-5 word slug |
72
- | Lifecycle artifacts | Present artifacts match the intent's lifecycle stage |
73
- | spec.md gate | plan.md only exists if spec.md exists |
74
- | plan.md gate | checklist.md only exists if plan.md exists |
75
- | outcome.md gate | outcome.md only exists if all checklist items checked |
76
- | Insights append-only | `## Insights` section only grows, never shrinks |
@@ -1,154 +0,0 @@
1
- # Evaluation Methodology
2
-
3
- Load when choosing a grader type, interpreting pass rate results, or deciding
4
- whether to graduate or retire evals.
5
-
6
- Sources: agentskills.io, Anthropic eval engineering, Tessl eval framework,
7
- Philipp Schmid skill testing guide.
8
-
9
- ## Three-Tier Grader Taxonomy
10
-
11
- Layer graders like a Swiss cheese model — no single tier catches everything.
12
- Use the simplest grader that covers the assertion. Combine tiers for coverage.
13
-
14
- ### Code-Based Graders
15
-
16
- Best for structural and mechanical checks:
17
- - File existence and correct path
18
- - JSON/YAML validity
19
- - Line count, character count, token budget
20
- - Regex pattern matching (frontmatter fields, required sections)
21
- - Exit codes from bundled scripts
22
-
23
- Use as the default tier. Fast, deterministic, reproducible.
24
-
25
- ### LLM-as-Judge Graders
26
-
27
- Best for subjective quality and semantic checks:
28
- - "Does this description convey when to use the skill?"
29
- - "Are the gotchas concrete corrections, not general advice?"
30
- - "Does the output address the user's actual intent?"
31
-
32
- Calibration protocol:
33
- 1. Write a natural-language rubric (not binary pass/fail)
34
- 2. Run the judge on 10-15 cases where you already know the correct grade
35
- 3. Compare judge grades to your grades — adjust rubric until >80% agreement
36
- 4. Spot-check with human grading periodically (every 5th eval run)
37
-
38
- Rubric template:
39
- - PASS: [specific criteria with examples]
40
- - PARTIAL: [what partial credit looks like]
41
- - FAIL: [specific failure modes]
42
-
43
- ### Human Graders
44
-
45
- Best for edge cases and final calibration:
46
- - Novel failure modes the other tiers miss
47
- - Calibration set for LLM judges
48
- - Final sign-off on graduating evals to regression
49
-
50
- Use sparingly — human grading doesn't scale. Reserve for calibration
51
- and cases where code + LLM judges disagree.
52
-
53
- ## pass@k vs pass^k
54
-
55
- Two metrics that diverge dramatically. Always track both.
56
-
57
- ### pass@k — Capability
58
-
59
- "Did it succeed at least once in k trials?"
60
-
61
- Formula: pass@k = 1 - (1 - p)^k where p = single-trial pass rate
62
-
63
- Measures: Can the skill/agent do this at all?
64
-
65
- Example at p=0.7, k=10: pass@k = 97.2%
66
-
67
- Use when: evaluating whether a skill enables a new capability,
68
- initial development, deciding whether to invest more iteration.
69
-
70
- ### pass^k — Reliability
71
-
72
- "Did it succeed every time in k trials?"
73
-
74
- Formula: pass^k = p^k
75
-
76
- Measures: Will it always do this correctly?
77
-
78
- Example at p=0.7, k=10: pass^k = 2.8%
79
-
80
- Use when: evaluating production readiness, regression testing,
81
- deciding whether a skill is reliable enough to ship.
82
-
83
- ### Interpreting the Gap
84
-
85
- | pass@k | pass^k | Interpretation |
86
- |--------|--------|----------------|
87
- | High | High | Reliable — ready for production |
88
- | High | Low | Capable but flaky — needs iteration on consistency |
89
- | Low | Low | Not yet capable — needs fundamental skill improvement |
90
- | Low | High | Impossible (pass^k <= pass@k always) |
91
-
92
- Run k=3 minimum for meaningful results. k=5 for production decisions.
93
-
94
- ## Capability-to-Regression Graduation
95
-
96
- Track pass rates across iterations. When a capability eval consistently
97
- hits ~100% (pass@k=1.0 for 3+ consecutive runs):
98
-
99
- 1. Graduate the eval from "capability" to "regression"
100
- 2. Regression evals run on every skill change — they protect against backsliding
101
- 3. If a regression eval starts failing, the recent change broke something
102
- 4. Investigate the failing regression before iterating further
103
-
104
- Graduation is one-way. Once an eval is regression, it stays regression
105
- unless the underlying requirement changes.
106
-
107
- ## Skill Retirement Detection
108
-
109
- Monitor the with/without skill delta over time:
110
-
111
- 1. Run paired evals (with-skill vs without-skill) periodically
112
- 2. Compute the delta in pass rates
113
- 3. If delta shrinks to near-zero across 3+ consecutive runs:
114
- - The model has likely internalized the skill's knowledge
115
- - The skill may be ready for retirement
116
- 4. Before retiring: run one final full eval suite to confirm
117
- 5. Archive the skill (don't delete — may need to restore if model changes)
118
-
119
- Common cause of false retirement signals: model update changed capabilities.
120
- Re-test after model updates.
121
-
122
- ## Tessl Three-Layer Eval Taxonomy
123
-
124
- Three layers of increasing realism. Each catches failures the others miss.
125
-
126
- ### Layer 1: Skill Review (Structural Lint)
127
-
128
- Does the skill itself follow best practices?
129
- - SKILL.md structure (frontmatter, sections, length)
130
- - Description quality (imperative, user-intent, trigger keywords)
131
- - Reference organization (conditional triggers, one level deep)
132
- - Convention compliance (for Plastic skills, see convention-checks.md)
133
-
134
- Fast, cheap, runs without executing the skill.
135
-
136
- ### Layer 2: Task Evals (Synthetic)
137
-
138
- Does the skill improve agent output on synthetic tasks?
139
- - Paired with/without comparison
140
- - Controlled prompts with known-good expected outputs
141
- - Measures the delta the skill adds
142
-
143
- This is the core eval loop (Steps 2-5 in the SKILL.md procedure).
144
-
145
- ### Layer 3: Repo Evals (Real Codebase)
146
-
147
- Does the skill work correctly in a real project context?
148
- - Install the skill in a real repository
149
- - Run real tasks (not synthetic prompts)
150
- - Measure whether the agent uses the skill correctly in situ
151
-
152
- Most expensive, most realistic. Catches skills that pass synthetic tests
153
- but fail under real project complexity. Use for high-stakes skills
154
- or before shipping to users.
@@ -1,64 +0,0 @@
1
- ---
2
- name: plastic-store-curating
3
- description: |
4
- Use when completing or reviewing intents, reorganizing the index,
5
- or when the intent store needs maintenance. Examples:
6
- <example>Context: User has finished implementing a feature.
7
- user: "This intent is done, clean up the index"
8
- assistant: "I'll use the intent-curator to update the intent status and reorganize INDEX.md"
9
- <commentary>Intent lifecycle change triggers curator for index maintenance.</commentary></example>
10
- <example>Context: The intent store has grown and clusters need review.
11
- user: "Organize the intents"
12
- assistant: "I'll use the intent-curator to review clusters, flag orphans, and suggest connections"
13
- <commentary>Periodic maintenance of the Zettelkasten structure.</commentary></example>
14
- user-invocable: false
15
- ---
16
-
17
- # Intent Curator
18
-
19
- Dispatches to the `plastic-intent-curator` agent for intent store maintenance.
20
-
21
- ## When to Use
22
- - Completing or reviewing intents
23
- - Reorganizing INDEX.md
24
- - Cluster maintenance, orphan detection, link discovery
25
- - Batch status updates
26
-
27
- ## Workflow
28
-
29
- Invoke the `plastic-intent-curator` agent via the Agent tool with `subagent_type: "plastic-intent-curator"`. Pass the user's request as the prompt, including:
30
-
31
- 1. **What to do** - complete intent, reorganize, triage stale, etc.
32
- 2. **Which store** - global (`~/.plastic/`) or project (`.plastic/store/`)
33
- 3. **Which intents** - by ID or "all active"
34
-
35
- The agent handles:
36
- - Intent lifecycle management (status transitions, Outcome sections)
37
- - INDEX.md maintenance (Active/Future/Clusters/Completed/Abandoned sections)
38
- - Link discovery between related intents
39
- - Cluster management (create, merge, rename)
40
- - Orphan detection
41
-
42
- Read `../plastic-conventions/references/knowledge-graph.md` for the linking doctrine: tiers of
43
- influence, sources versus chain, and the `## Links` projection, before judging a link discovery or
44
- orphan finding. This path resolves relative to this skill's own installed directory.
45
-
46
- When an intent reaches a terminal state, moved to Completed OR Abandoned, do these things:
47
-
48
- 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).
49
- 2. Call `plastic-intent-ending` for the terminal-transition close (INDEX move, savepoint `Done` bookend, store commit, disarm, and the QMD reindex last): `ruby ~/.plastic/scripts/end-intent --store <store> --id <id> --disposition delivered|abandoned`, then follow that skill's own disarm and reindex steps. Never restate those one-liners here.
50
-
51
- After the agent completes, report what changed.
52
-
53
- ## Maintenance dispatch (intent 197)
54
-
55
- When invoked to fix a structural finding on an intent OTHER than one currently being delivered
56
- (for example, from `/plastic-doctor`'s fix-all routing), the `plastic-intent-curator` agent
57
- follows its own step 7: it detects (never acquires) the target's delivery lock, requires a
58
- clean working tree, and performs the fix on a fresh branch merged back to main as one closed
59
- operation, with an append-only `revisions.md` receipt in the same pass as the edit. See
60
- `agents/plastic-intent-curator.md` for the exact mechanics.
61
-
62
- Read `../plastic-conventions/references/maintenance-and-revisions.md` for WORK versus
63
- MAINTENANCE, the `revisions.md` move-and-record contract, and the violation-tag catalog before
64
- running a maintenance dispatch like this one.
@@ -1,38 +0,0 @@
1
- {
2
- "skill_name": "plastic-store-curating",
3
- "notes": "Intent 66a. Spec for the QMD-first discovery step in agents/plastic-intent-curator.md (locate a specific intent before grep/find; distinct from the completion-time reindex step). Runner is intent 76; spec only.",
4
- "evals": [
5
- {
6
- "id": 1,
7
- "scope": "behavior",
8
- "set": "validation",
9
- "prompt": "QMD is present. The user says: find and reclassify the intent about orphan detection.",
10
- "expected_output": "During discovery (How You Work), before scanning the store with grep/find to locate the intent, runs `ruby ~/.plastic/scripts/qmd-sync search \"orphan detection\"` to surface the candidate or related intents, then opens the authoritative intent file for the hit it acts on. This discovery step is distinct from the completion-time reindex step. No-op fallback to the full scan when QMD is absent.",
11
- "files": [],
12
- "assertions": [
13
- {
14
- "type": "human",
15
- "check": "qmd-sync search is run before grep/find during discovery; authoritative file opened for the hit; reindex step stays separate",
16
- "observed": "SKILL.md (or agent file) carries the QMD-first step: run qmd-sync search before grep/Read, then open the authoritative file; no-op fallback when QMD is absent",
17
- "result": "pass"
18
- }
19
- ]
20
- },
21
- {
22
- "id": 2,
23
- "scope": "behavior",
24
- "set": "validation",
25
- "prompt": "The user says: intent 26 (Completed) has a stale ## Links comment that contradicts its own real chain edge; fix it. Intent 26 is NOT the intent currently being delivered by this session.",
26
- "expected_output": "Before editing intent 26, checks its delivery lock freshness (plastic-lock status --intent-dir, reading lock_fresh) and defers if fresh; requires a clean store working tree; creates a fresh maintenance branch off main; makes the scoped edit AND appends a revisions.md receipt in the same pass, refusing the edit if the receipt cannot be written; stages only the changed paths (never git add -A); merges the branch back to main and deletes it before reporting done.",
27
- "files": [],
28
- "assertions": [
29
- {
30
- "type": "human",
31
- "check": "agent file states detect-only lock check, clean-tree precheck, branch-and-merge-back, and refuse-without-receipt as an unconditional sequence for maintenance on a non-current intent",
32
- "observed": "agents/plastic-intent-curator.md step 7 covers all five sub-steps (a-f) exactly as asked",
33
- "result": "pass"
34
- }
35
- ]
36
- }
37
- ]
38
- }
@@ -1,93 +0,0 @@
1
- ---
2
- name: plastic-store-indexing
3
- description: Use after creating, completing, or abandoning intents, when the user says "index" or "organize", or when INDEX.md needs maintenance. Curates the INDEX.md structure note.
4
- user-invocable: false
5
- ---
6
-
7
- # Managing the Index
8
-
9
- ## When to Use
10
- - After creating a new intent (automatic - part of intent-creating workflow)
11
- - After completing or abandoning an intent
12
- - User says "index", "organize", or "clean up"
13
- - Periodic maintenance when the store grows
14
-
15
- ## INDEX.md Structure
16
-
17
- INDEX.md is a Zettelkasten main structure note - the brain's entry point. It has five sections:
18
-
19
- ### Active
20
- Intents currently being worked on. Max 1-2 for focus.
21
- ```markdown
22
- ## Active
23
- - [1a2 — Design Plastic](store/1a2--design-plastic-state-system/1a2--design-plastic-state-system.md) — decision, human
24
- ```
25
-
26
- ### Future
27
- Intents parked for later. May be picked up by agents.
28
- ```markdown
29
- ## Future
30
- - [1b1 — Build Reddit KB](store/1b1--build-reddit-knowledge-base/1b1--build-reddit-knowledge-base.md) — implementation, human
31
- ```
32
-
33
- ### Clusters
34
- Topic-based groupings. Manually curated. Create a new cluster when 3+ intents share a topic.
35
- ```markdown
36
- ## Clusters
37
- ### Reddit Knowledge Base
38
- - [1a — Research](store/1a--research-reddit-saved-posts/1a--research-reddit-saved-posts.md)
39
- - [1a1 — Plan](store/1a1--plan-reddit-knowledge-base/1a1--plan-reddit-knowledge-base.md)
40
- ```
41
-
42
- ### Abandoned
43
- Intents ended without delivery. Links preserved, never deleted.
44
-
45
- ### Completed
46
- All completed intents with dates. Links preserved, never deleted.
47
-
48
- When you move an intent INTO Completed or Abandoned, do these things:
49
-
50
- 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).
51
- 2. Call `plastic-intent-ending` for the terminal-transition close (INDEX move, savepoint `Done` bookend, store commit, disarm, and the QMD reindex last): `ruby ~/.plastic/scripts/end-intent --store <store> --id <id> --disposition delivered|abandoned`, then follow that skill's own disarm and reindex steps. Never restate those one-liners here.
52
-
53
- ## Workflow
54
-
55
- QMD-first (when available): when you need to locate a specific intent (to reclassify, flag, or
56
- cluster it) rather than rebuild every section, before scanning the store with grep/Read run
57
- `ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to surface candidate or related intents, then
58
- open the authoritative intent file for any hit you act on. The command is a no-op when QMD is
59
- absent, so fall back to the directory scan below.
60
-
61
- ### Rebuild Sections
62
- Scan the active store's `store/` directory for intent files and rebuild each section:
63
-
64
- ```bash
65
- for dir in $STORE_ROOT/store/*/; do
66
- f=$(find "$dir" -maxdepth 1 -name "*.md" ! -name "spec.md" ! -name "plan.md" ! -name "checklist.md" ! -name "outcome.md" ! -name "savepoint.md" | head -1)
67
- [ -n "$f" ] && dirname_slug=$(basename "$dir") && ruby -e '
68
- data = File.read(ARGV[0]).split("---")[1]
69
- parsed = YAML.safe_load(data)
70
- puts "#{parsed["id"]}|#{parsed["intent"]}|#{ARGV[1]}"
71
- ' "$f" "$dirname_slug" 2>/dev/null
72
- done | sort -t'|' -k1
73
- ```
74
-
75
- ### Suggest Clusters
76
- When 3+ intents share tags but aren't in a cluster, suggest a new cluster heading.
77
-
78
- ### Flag Orphans
79
- Intents with no links (empty `sources`, empty `chain`, no `## Links` entries, not in any cluster) should be flagged for curation.
80
-
81
- Before reclassifying a structural finding outside routine indexing, read
82
- `../plastic-conventions/references/maintenance-and-revisions.md` for WORK versus MAINTENANCE, the
83
- `revisions.md` move-and-record contract, and the violation-tag catalog.
84
-
85
- REQUIRED BACKGROUND: intent-linking (for understanding connection types and Zettelkasten theory)
86
-
87
- Read `../plastic-conventions/references/knowledge-graph.md` for the linking doctrine: tiers of
88
- influence, sources versus chain, and the `## Links` projection. This path resolves relative to
89
- this skill's own installed directory.
90
-
91
- ## References
92
-
93
- - Read `references/zettelkasten-linking.md` for the three structural layers (Folgezettel, directed graph, tags) and how they map to INDEX.md organization