@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,133 @@
1
+ # Plastic - Reference
2
+
3
+ > **This file is maintained by Plastic.** It will be overwritten when the
4
+ > plugin is updated. It holds reference material: read it on demand, it is
5
+ > not injected at session start.
6
+
7
+ ### Structural maintenance and revisions.md
8
+
9
+ When a delivered intent accumulates structural junk (an unsanctioned section, a stray file, a
10
+ frontmatter edge to an intent that no longer exists), the intent-curator relocates it into
11
+ `revisions.md` instead of reopening the work. Each entry is a versioned, dated header
12
+ (`## Revision vN - YYYY-MM-DD-HH:MM`) plus `Why` (one sentence naming the broken rule, ending
13
+ with `[rule: <tag>]`), `Prior location`, and either `Content held` (the verbatim removed
14
+ content) or, for a frontmatter edit, a one-line `Change` (before and after). A stray file has
15
+ its full content embedded and the original is deleted.
16
+
17
+ Violation tags (starter set, free-text tags allowed):
18
+ - `unsanctioned-section`: a top-level section the sanctioned-section rule now rejects
19
+ - `phantom-section`: a section referenced but not present or not sanctioned
20
+ - `stray-file`: a file that does not belong in the intent directory
21
+ - `dangling-ref`: a link or reference to something that no longer exists
22
+ - `broken-chain`: a chain frontmatter edge to an intent that no longer exists
23
+ - `broken-source`: a sources frontmatter edge to an intent that no longer exists
24
+ - `misplaced-content`: content that belongs in a different artifact or section
25
+
26
+ ## Two Processes
27
+
28
+ | Process | Scope | Type | Actor |
29
+ |---|---|---|---|
30
+ | **Build → Observe → Repeat** | The system | Continuous loop | Coordinator |
31
+ | **What → Why → How → Exec** | One intent | Finite lifecycle | Agent |
32
+
33
+ B→O→R is the Coordinator's heartbeat. W→W→H→E is what happens inside each intent.
34
+ The connection: an intent's `## Insights` feeds the Coordinator's Observe phase.
35
+
36
+ ## Defaults-First
37
+
38
+ Plastic stands on its own. Skills and agents use Plastic's own defaults; an
39
+ external skill (for example `superpowers:*`) is opt-in, never load-bearing.
40
+
41
+ - **Default to Plastic, delegate by exception.** Name the Plastic-native path as
42
+ the default. Delegate to an external skill only when (a) it is available in the
43
+ harness, or (b) the user explicitly asks for it. A user without that plugin must
44
+ still get the core behavior.
45
+ - **Phrase external skills as enhancements.** Write "use Plastic's native X by
46
+ default; if `superpowers:<skill>` is available, or the user prefers it, delegate
47
+ to it" never "delegate to `superpowers:<skill>`" as the only path.
48
+ - **Optional dependencies detect then degrade.** `qmd` is the reference shape:
49
+ `scripts/lib/qmd_sync.rb` detects the binary first and every verb no-ops cleanly
50
+ when it is absent (see `scripts/qmd-sync`). Optional CLIs and MCP servers follow
51
+ the same detect-then-skip pattern, so a missing tool never crashes a session.
52
+ - **Legitimate hard dependencies are exempt.** Ruby, Node, git, and POSIX tools are
53
+ the cost of running Plastic, not silent coupling. The principle targets accidental
54
+ dependence on external skills doing work Plastic should do itself.
55
+
56
+ ## Roadmaps
57
+
58
+ Roadmaps exist for planned parallel delivery of intents in a coherent and organized way. A roadmap
59
+ is a named, ordered, delivery-side collection of intents: the delivery-side counterpart to a
60
+ release (completion-side, tracked in `CHANGELOG.md`). Use `plastic-roadmap` to create, order,
61
+ close, and consume one.
62
+
63
+ File location: `roadmaps/{slug}.md`, a sibling of `INDEX.md`, wherever `INDEX.md` lives, never
64
+ inside `store/` (store holds intent directories, not project artifacts). For a project that is its
65
+ root, `~/.plastic/projects/{slug}/roadmaps/`, beside `project.yml`; for the global tier it is
66
+ `~/.plastic/roadmaps/`, beside `~/.plastic/INDEX.md`. `roadmaps/` lists only live (open or
67
+ in-flight) roadmaps: once a roadmap's goal is reached, it moves to `roadmaps/archived/{slug}.md`,
68
+ a sibling subdirectory scaffolded once with a `.gitkeep`.
69
+
70
+ A roadmap file has four sections, in order: a title/meta header, `## Goal`, `## Waves`, and an
71
+ append-only dated `## Log`. `## Goal` is a checkable prose condition read by a human or agent, not
72
+ an executable checker. `## Waves` holds ordered waves; entries inside a wave are parallel-safe,
73
+ waves run sequentially, top to bottom.
74
+
75
+ Each wave entry carries a status token (`queued`/`delivering`/`delivered`/`abandoned`/`blocked`)
76
+ that mirrors that intent's status in `INDEX.md`. `INDEX.md` is the single writer of intent status;
77
+ on any conflict INDEX wins and the roadmap entry is corrected to match.
78
+
79
+ **Human-comprehension surface.** A roadmap is also written to be read cold. Wave entries render as
80
+ checkboxes (checked once delivered, unchecked otherwise) next to the status token, and each `## Log`
81
+ line is one plain-language sentence, starting `YYYY-MM-DD HH:MM UTC`, written the way an
82
+ engineering manager would brief a non-expert executive: what shipped and why it matters, no jargon
83
+ or codenames, ending with a link
84
+ to that intent's `outcome.md`. The log points at the detail instead of repeating it, so a person
85
+ opening the file with no other context can tell what shipped, what is running now, and what is
86
+ next in under a minute.
87
+
88
+ **Relationship to loop engineering (intent 69).** A roadmap is the planning half of the work; the
89
+ loop is its runtime. Waves lay out the parallelism plan: what can run together, and in what order.
90
+ Loop engineering (intent 69, not yet delivered) is expected to consume that plan and supply the
91
+ running parts, the heartbeat, how many dispatches run at once, checking the goal, and resuming
92
+ after a stop. This section only states the relationship and points to intent 69 as the future
93
+ consumer; it does not change intent 69's own design.
94
+
95
+ ## Context-economy measurement buckets (84a)
96
+
97
+ Intent 84 defines three buckets for sibling 84a to audit against; 84 does not run the audit.
98
+
99
+ - (a) gate-hook prose tokens: the per-transition narration emitted by the gate hook.
100
+ - (b) main-loop store-read tokens: tokens the main agent spends reading or grepping the store
101
+ in the transcript.
102
+ - (c) authored-section sizes: sizes of authored artifacts (INDEX entries and the like).
103
+
104
+ ## Deprecation Process
105
+
106
+ Deprecations live in `deprecations.yml` and are shown at SessionStart. While Plastic is
107
+ pre-1.0, a satisfied deprecation (its migration is already done on installed machines) may be
108
+ removed immediately instead of waiting for its declared `removal` version. From `1.0.0` on,
109
+ the steady-state grace rule applies (removal at least two minors ahead). For the full process,
110
+ severity levels, and the pre-1.0 exception, see the `plastic-releasing` skill.
111
+
112
+ ## Skills Reference
113
+
114
+ Detailed conventions live inside the skills that use them, not in this file.
115
+
116
+ | Topic | Skill | References in skill |
117
+ |-------|-------|-------------------|
118
+ | Creating intents, lifecycle | `plastic-creating-intent` | lifecycle, wikilinks |
119
+ | Brainstorming, spec writing | `plastic-brainstorming` | — |
120
+ | Planning, actions | `plastic-writing-plans` | — |
121
+ | Execution, delivery | `plastic-executing-plan` | — |
122
+ | Autonomous delivery | `plastic-auto` | agent architecture |
123
+ | Save/restore state | `plastic-savepoint`, `plastic-continuing` | context management |
124
+ | Knowledge graph, linking | `plastic-linking-intents` | zettelkasten, wikilinks |
125
+ | Projects, hubs | `plastic-creating-project` | hubs, project stores |
126
+ | Provision a project store | `plastic-add-project-store` | project stores |
127
+ | Index maintenance | `plastic-managing-index` | — |
128
+ | Releases, deprecations | `plastic-releasing` | deprecation process |
129
+ | Health diagnostics | `plastic-doctor` | three scopes: `--core` (binary install-integrity check, runs on SessionStart), `--store [global\|<slug>]` (per-store check, runs on dashboard load), no flag = full check (runs after every update); gate enforcement, stuck detection |
130
+ | Authoring skills, agents, hooks | `plastic-creating-skills` | progressive disclosure, agentskills.io spec |
131
+ | Evaluating skills, evals | `plastic-evaluating-skills` | eval methodology, convention checks |
132
+ | Create, order, and consume a roadmap of intents | `plastic-roadmap` | file format, operations |
133
+