@zalom/plastic 1.0.0-alpha.9 → 1.0.0-beta.2

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 (99) hide show
  1. package/PLASTIC.md +163 -469
  2. package/README.md +95 -58
  3. package/agents/plastic-brainstorming.md +37 -0
  4. package/agents/plastic-enforcer.md +36 -0
  5. package/agents/plastic-executor.md +37 -0
  6. package/agents/{future-intent-researcher.md → plastic-future-intent-researcher.md} +1 -1
  7. package/agents/{intent-curator.md → plastic-intent-curator.md} +1 -1
  8. package/agents/plastic-planner.md +37 -0
  9. package/agents/plastic-spec-specialist.md +37 -0
  10. package/bin/plastic.js +57 -0
  11. package/bin/test +28 -0
  12. package/deprecations.yml +1 -10
  13. package/hooks/auto-arm +5 -0
  14. package/hooks/bash-gate +3 -0
  15. package/hooks/check-update +12 -8
  16. package/hooks/code-gate +12 -0
  17. package/hooks/create-gate +3 -0
  18. package/hooks/gate-check +3 -1
  19. package/hooks/hooks.json +52 -0
  20. package/hooks/qmd-search +8 -0
  21. package/package.json +2 -2
  22. package/scripts/dashboard.rb +687 -0
  23. package/scripts/doctor.rb +1054 -628
  24. package/scripts/hook-auto-arm +51 -0
  25. package/scripts/hook-bash-gate +41 -0
  26. package/scripts/hook-code-gate +27 -0
  27. package/scripts/hook-continue +15 -114
  28. package/scripts/hook-create-gate +59 -0
  29. package/scripts/hook-gate-check +47 -32
  30. package/scripts/hook-qmd-search +44 -0
  31. package/scripts/hook-session-start +106 -38
  32. package/scripts/install.rb +91 -529
  33. package/scripts/lib/boot_banner.rb +28 -0
  34. package/scripts/lib/bridge.rb +404 -19
  35. package/scripts/lib/installer_core.rb +807 -0
  36. package/scripts/lib/intent_validator.rb +235 -0
  37. package/scripts/lib/qmd_hook.rb +44 -0
  38. package/scripts/lib/qmd_sync.rb +209 -0
  39. package/scripts/lib/store_provisioning.rb +100 -0
  40. package/scripts/migrate-to-global +1 -1
  41. package/scripts/new-intent +226 -0
  42. package/scripts/provision-project-store +53 -0
  43. package/scripts/qmd-sync +92 -0
  44. package/scripts/select-update-target +93 -0
  45. package/scripts/spawn-preamble +121 -0
  46. package/scripts/uninstall.rb +53 -0
  47. package/scripts/update.rb +164 -0
  48. package/scripts/validate-intent +54 -0
  49. package/scripts/versions.rb +141 -0
  50. package/skills/_active-intent-gate.md +1 -1
  51. package/skills/add-project-store/SKILL.md +54 -0
  52. package/skills/auto/SKILL.md +77 -7
  53. package/skills/auto/evals/evals.json +207 -0
  54. package/skills/auto/references/agent-architecture.md +135 -0
  55. package/skills/brainstorming/SKILL.md +9 -9
  56. package/skills/brainstorming-grill-me/SKILL.md +6 -6
  57. package/skills/continuing/SKILL.md +92 -82
  58. package/skills/continuing/evals/evals.json +136 -0
  59. package/skills/continuing/references/context-management.md +32 -0
  60. package/skills/creating-intent/SKILL.md +74 -36
  61. package/skills/creating-intent/evals/evals.json +56 -0
  62. package/skills/creating-intent/references/lifecycle.md +76 -0
  63. package/skills/creating-intent/references/wikilinks.md +8 -0
  64. package/skills/creating-project/SKILL.md +40 -8
  65. package/skills/creating-project/references/hubs-projects.md +55 -0
  66. package/skills/dashboard/SKILL.md +121 -0
  67. package/skills/dashboard/templates/dashboard-global.md +31 -0
  68. package/skills/dashboard/templates/dashboard-project.md +40 -0
  69. package/skills/doctor/SKILL.md +51 -4
  70. package/skills/doctor/references/gates-stuck-detection.md +38 -0
  71. package/skills/doctor/report.md +4 -0
  72. package/skills/evaluating-skills/SKILL.md +140 -0
  73. package/skills/evaluating-skills/assets/eval-template.json +12 -0
  74. package/skills/evaluating-skills/evals/evals.json +75 -0
  75. package/skills/evaluating-skills/references/convention-checks.md +76 -0
  76. package/skills/evaluating-skills/references/eval-methodology.md +154 -0
  77. package/skills/executing-plan/SKILL.md +5 -3
  78. package/skills/install/SKILL.md +69 -8
  79. package/skills/intent-curator/SKILL.md +3 -3
  80. package/skills/linking-intents/SKILL.md +16 -7
  81. package/skills/linking-intents/references/zettelkasten.md +38 -0
  82. package/skills/managing-index/SKILL.md +5 -1
  83. package/skills/managing-index/references/zettelkasten-linking.md +1 -1
  84. package/skills/releasing/SKILL.md +80 -23
  85. package/skills/releasing/references/deprecations.md +60 -0
  86. package/skills/research/SKILL.md +2 -2
  87. package/skills/savepoint/SKILL.md +46 -37
  88. package/skills/savepoint/references/context-management.md +32 -0
  89. package/skills/uninstall/SKILL.md +39 -28
  90. package/skills/update/SKILL.md +41 -44
  91. package/skills/versions/SKILL.md +65 -0
  92. package/skills/writing-instructions/SKILL.md +159 -0
  93. package/skills/writing-instructions/references/agentskills-spec.md +135 -0
  94. package/skills/writing-plans/SKILL.md +5 -5
  95. package/templates/agents.md +7 -7
  96. package/templates/outcome.md +13 -0
  97. package/templates/savepoint.md +14 -13
  98. package/templates/spec.md +25 -0
  99. package/bin/install.js +0 -29
@@ -0,0 +1,135 @@
1
+ # agentskills.io Full Reference
2
+
3
+ Source: https://agentskills.io (all sections, verified June 2026)
4
+
5
+ ## Specification Details
6
+
7
+ ### Frontmatter Fields
8
+
9
+ | Field | Required | Constraints |
10
+ |-------|----------|-------------|
11
+ | name | Yes | 1-64 chars. Lowercase alphanumeric + hyphens. No leading/trailing/consecutive hyphens. Must match directory name. |
12
+ | description | Yes | 1-1024 chars. Non-empty. What + when. |
13
+ | license | No | Short — name or filename reference |
14
+ | compatibility | No | 1-500 chars. Environment requirements only when needed. |
15
+ | metadata | No | String→string map. Use unique key names. |
16
+ | allowed-tools | No | Space-separated. Experimental. |
17
+
18
+ ### Progressive Disclosure Token Budgets
19
+
20
+ - Discovery: ~100 tokens per skill (name + description only)
21
+ - Activation: <5000 tokens / <500 lines recommended for SKILL.md body
22
+ - Execution: Unbounded — files in scripts/, references/, assets/ load as needed
23
+
24
+ ### File References
25
+
26
+ - Use relative paths from skill root
27
+ - Keep one level deep from SKILL.md
28
+ - Agent resolves paths automatically
29
+
30
+ ## Description Optimization
31
+
32
+ ### Evaluation Methodology
33
+
34
+ 1. Create ~20 eval queries (8-10 should-trigger, 8-10 should-not)
35
+ 2. Split 60/40 train/validation (proportional mix in each)
36
+ 3. Run each query 3 times, compute trigger rate
37
+ 4. Pass threshold: 0.5
38
+ 5. Near-miss negatives are most valuable (share keywords, need different thing)
39
+ 6. Iterate on train set only, validate on held-out set
40
+ 7. Select best by validation pass rate, not last iteration
41
+ 8. 5 iterations usually sufficient
42
+
43
+ ### Description Anti-patterns
44
+
45
+ - "Helps with PDFs" — too vague, no trigger context
46
+ - "Process CSV files" — no when/why, no user-intent focus
47
+ - Implementation details instead of user intent
48
+ - Missing edge case triggers (user doesn't name the domain)
49
+
50
+ ## Instruction Best Practices
51
+
52
+ ### Gotchas — Highest-Value Content
53
+
54
+ Concrete corrections, not general advice:
55
+
56
+ ```markdown
57
+ ## Gotchas
58
+ - The `users` table uses soft deletes. Queries must include
59
+ `WHERE deleted_at IS NULL`.
60
+ - User ID is `user_id` in DB, `uid` in auth, `accountId` in billing.
61
+ All three refer to the same value.
62
+ - The `/health` endpoint returns 200 even if DB is down. Use `/ready`.
63
+ ```
64
+
65
+ ### Calibrating Control
66
+
67
+ Prescriptive when:
68
+ - Operations are fragile
69
+ - Consistency matters
70
+ - Specific sequence must be followed
71
+
72
+ Flexible when:
73
+ - Multiple approaches are valid
74
+ - Task tolerates variation
75
+ - Explaining WHY is more effective than rigid rules
76
+
77
+ ### Instruction Patterns
78
+
79
+ 1. **Validation loops**: Do work → validate → fix → repeat
80
+ 2. **Plan-validate-execute**: Create plan → validate vs source of truth → execute
81
+ 3. **Checklists**: Track progress, enforce dependencies, validation gates
82
+ 4. **Bundled scripts**: If agent reinvents same logic each run, bundle it
83
+ 5. **Templates**: Concrete output structures > prose descriptions
84
+
85
+ ## Script Design
86
+
87
+ ### Hard Requirements
88
+ - No interactive prompts (hard requirement — agents hang indefinitely)
89
+ - All input via flags, env vars, or stdin
90
+
91
+ ### Agent-Friendly Design
92
+ - --help as primary interface documentation
93
+ - Helpful error messages: what wrong + what expected + what to try
94
+ - Structured output (JSON/CSV/TSV), data on stdout, diagnostics on stderr
95
+ - Idempotent operations (agents may retry)
96
+ - Dry-run for destructive operations
97
+ - Meaningful exit codes documented in --help
98
+ - Output size control: default to summaries, support --offset pagination
99
+ - Agent harnesses truncate at 10-30K characters
100
+
101
+ ## Evaluation Framework
102
+
103
+ ### Test Case Structure
104
+ ```json
105
+ {
106
+ "skill_name": "name",
107
+ "evals": [{
108
+ "id": 1,
109
+ "prompt": "realistic user message",
110
+ "expected_output": "what success looks like",
111
+ "files": ["evals/files/input.csv"],
112
+ "assertions": ["specific, verifiable checks"]
113
+ }]
114
+ }
115
+ ```
116
+
117
+ ### Running Evals
118
+ - With-skill vs without-skill (or previous version) comparison
119
+ - Clean context per run (subagents or separate sessions)
120
+ - Capture timing: total_tokens, duration_ms
121
+ - Start with 2-3 test cases, expand after first results
122
+
123
+ ### Assertion Quality
124
+ Good: Programmatically verifiable, specific, countable
125
+ Weak: Vague ("the output is good")
126
+ Brittle: Exact phrase matching
127
+
128
+ Principle: Require concrete evidence for PASS. No benefit of the doubt.
129
+
130
+ ### Iteration Loop
131
+ 1. Run evals → grade assertions → aggregate benchmarks
132
+ 2. Identify failures (assertions, human feedback, execution transcripts)
133
+ 3. Feed all three + SKILL.md to LLM for proposed changes
134
+ 4. Apply changes → re-run → compare
135
+ 5. Stop when consistently empty feedback or no meaningful improvement
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: plastic:writing-plans
2
+ name: plastic-writing-plans
3
3
  description: "Write implementation plans from a spec. Produces plan.md, checklist.md, and actions/ in the active intent directory."
4
4
  ---
5
5
 
@@ -18,9 +18,9 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
18
18
  Before proceeding, resolve the active intent:
19
19
 
20
20
  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/`.
21
- 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"
21
+ 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"
22
22
  3. **Resolve intent directory:** `{store}/store/{id}--{slug}/`
23
- 4. **Read spec:** Load `{intent_dir}/spec.md`. If no spec exists → refuse: "No spec found. Run /plastic:brainstorming first."
23
+ 4. **Read spec:** Load `{intent_dir}/spec.md`. If no spec exists → refuse: "No spec found. Run /plastic-brainstorming first."
24
24
 
25
25
  All artifacts go to the intent directory. Never write to external paths.
26
26
 
@@ -55,7 +55,7 @@ This structure informs the task decomposition. Each task should produce self-con
55
55
  ```markdown
56
56
  # [Feature Name] Implementation Plan
57
57
 
58
- > **For agentic workers:** Use `plastic:executing-plan` to implement this plan task-by-task.
58
+ > **For agentic workers:** Use `plastic-executing-plan` to implement this plan task-by-task.
59
59
 
60
60
  **Goal:** [One sentence describing what this builds]
61
61
 
@@ -180,4 +180,4 @@ cd {store_root} && git add . && git commit -m "docs: plan for intent {id} — {n
180
180
 
181
181
  ## Execution Handoff
182
182
 
183
- Plan complete. Invoke `plastic:executing-plan` to begin execution.
183
+ Plan complete. Invoke `plastic-executing-plan` to begin execution.
@@ -47,13 +47,13 @@ Plastic has its own lifecycle skills. When a Plastic skill exists for the curren
47
47
 
48
48
  | Phase | Skill | Produces |
49
49
  |-------|-------|----------|
50
- | What | `plastic:creating-intent` | Intent file |
51
- | Why | `plastic:brainstorming` | `spec.md` |
52
- | Why | `plastic:research` | `resources/*.md` |
53
- | Why | `plastic:brainstorming-grill-me` | Deep interrogation |
54
- | How | `plastic:writing-plans` | `plan.md`, `checklist.md`, `actions/` |
55
- | Exec | `plastic:executing-plan` | Code + `outcome.md` |
56
- | Done | `plastic:intent-curator` | Lifecycle transition |
50
+ | What | `plastic-creating-intent` | Intent file |
51
+ | Why | `plastic-brainstorming` | `spec.md` |
52
+ | Why | `plastic-research` | `resources/*.md` |
53
+ | Why | `plastic-brainstorming-grill-me` | Deep interrogation |
54
+ | How | `plastic-writing-plans` | `plan.md`, `checklist.md`, `actions/` |
55
+ | Exec | `plastic-executing-plan` | Code + `outcome.md` |
56
+ | Done | `plastic-intent-curator` | Lifecycle transition |
57
57
 
58
58
  **Artifact convention:** ALL lifecycle artifacts go to the active intent directory (`store/{id}--{slug}/`). Never write specs to `docs/superpowers/specs/` or plans to `docs/superpowers/plans/`.
59
59
 
@@ -0,0 +1,13 @@
1
+ # Outcome: <intent name>
2
+
3
+ ## Summary
4
+ (what was delivered)
5
+
6
+ ## Delivered
7
+ - ...
8
+
9
+ ## Verification
10
+ - <acceptance criterion> — verified by ... → result
11
+
12
+ ## Follow-ups
13
+ None
@@ -1,13 +1,14 @@
1
- # Savepoint
2
-
3
- ## Last Updated
4
- {{DATE}} — Session #{{N}}
5
-
6
- ## In Progress
7
- - ...
8
-
9
- ## Blockers
10
- None
11
-
12
- ## Key Discoveries This Session
13
- - ...
1
+ # Deterministic cycle-step ledger, written automatically by the gate hook.
2
+ # One line per lifecycle milestone, append-only, newest at the bottom:
3
+ #
4
+ # {UTC-iso8601} {Stage} {milestone}
5
+ #
6
+ # Example:
7
+ # 2026-06-16T14:02:00Z What ID--slug.md
8
+ # 2026-06-16T14:20:00Z Why spec.md created
9
+ # 2026-06-16T15:10:00Z How plan.md created
10
+ # 2026-06-16T15:11:00Z How checklist.md created
11
+ # 2026-06-16T16:40:00Z Exec outcome.md created
12
+ #
13
+ # This file is sugar on top of the conventions, not a source of truth. It is
14
+ # rebuildable from files-on-disk via Bridge.rebuild_savepoint. Do not hand-edit.
@@ -0,0 +1,25 @@
1
+ # Spec: <intent name>
2
+
3
+ ## Problem
4
+ (the problem, stated as a problem, not a solution)
5
+
6
+ ## Goals
7
+ - ...
8
+
9
+ ## Non-Goals
10
+ - ...
11
+
12
+ ## Approach
13
+ (the chosen approach, in prose)
14
+
15
+ ## Alternatives Considered
16
+ - <alternative> — not chosen because ...
17
+
18
+ ## Decisions
19
+ - ...
20
+
21
+ ## Acceptance Criteria
22
+ - [ ] ...
23
+
24
+ ## Open Questions
25
+ None
package/bin/install.js DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // Thin shim — npx entry point that delegates to the Ruby installer.
4
- // All logic lives in scripts/install.rb. JS is only the distribution mechanism.
5
-
6
- import { execFileSync } from 'node:child_process'
7
- import { resolve } from 'node:path'
8
- import { existsSync } from 'node:fs'
9
-
10
- const packageRoot = new URL('..', import.meta.url).pathname
11
- const installer = resolve(packageRoot, 'scripts', 'install.rb')
12
-
13
- if (!existsSync(installer)) {
14
- console.error('Error: scripts/install.rb not found in package.')
15
- process.exit(1)
16
- }
17
-
18
- try {
19
- execFileSync('ruby', [installer, ...process.argv.slice(2)], {
20
- stdio: 'inherit',
21
- env: { ...process.env, PLASTIC_PACKAGE_ROOT: packageRoot },
22
- })
23
- } catch (err) {
24
- if (err.status) process.exit(err.status)
25
- console.error('Error: Ruby is required to install Plastic.')
26
- console.error(' macOS: Ruby is pre-installed')
27
- console.error(' Linux: sudo apt install ruby / dnf install ruby')
28
- process.exit(1)
29
- }