@zalom/plastic 1.0.0-alpha.11 → 1.0.0-alpha.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,87 +1,70 @@
1
1
  # Plastic
2
2
 
3
- > Intent-driven state management for AI coding sessions.
4
- > Named after **neuroplasticity** — adaptive, malleable, dynamic, resilient.
3
+ > **Alpha software.** Expect breaking changes between releases.
4
+ > Install: `npx @zalom/plastic@alpha --claude`
5
5
 
6
- ## What Is This?
6
+ Intent-driven idea development system for AI coding agents. Named after
7
+ **neuroplasticity** — adaptive, malleable, dynamic, resilient.
7
8
 
8
- Plastic implements two nested processes: **Build Observe Repeat** (Coordinator's continuous loop) and **What → Why → How → Next** (intent's finite lifecycle). Zettelkasten-inspired linking connects intents. All project state lives in `.plastic/`. Everything is an intent.
9
+ Plastic thinks in **intents**, not tasks. An intent is a desire something
10
+ you want to accomplish, explore, or understand. Intents are atomic thoughts
11
+ that get developed through two nested processes.
9
12
 
10
- ## Installation
13
+ ## The Two Cycles
11
14
 
12
- ### 1. Register the marketplace
15
+ **Coordinator loop (B→O→R):** Brainstorm → Organize → Review. The human and
16
+ agent explore ideas, structure them into intents, and validate the results.
17
+ This loop runs continuously across sessions.
13
18
 
14
- In Claude Code, run:
15
- ```
16
- /plugin marketplace add zalom/plastic
17
- ```
19
+ **Intent lifecycle (W→W→H→E):** Why → What → How → Execute. Each intent moves
20
+ from motivation through specification, planning, to delivery. Intents produce
21
+ artifacts: `spec.md`, `plan.md`, `checklist.md`, `outcome.md`.
18
22
 
19
- ### 2. Install the plugin
23
+ ## Install
20
24
 
21
- In Claude Code, run:
22
- ```
23
- /plugin add plastic@plastic
24
- ```
25
+ Plastic requires Ruby (pre-installed on macOS/Linux) and Node.js 18+.
25
26
 
26
- ### 3. Initialize in your project
27
+ ```bash
28
+ # Alpha (current — active development)
29
+ npx @zalom/plastic@alpha --claude
27
30
 
28
- In Claude Code, run:
29
- ```
30
- /plastic:install
31
+ # Beta (when available — API-stable, bug hunting)
32
+ npx @zalom/plastic@beta --claude
33
+
34
+ # Stable (when available — general use)
35
+ npx @zalom/plastic --claude
31
36
  ```
32
37
 
33
- ## Global vs Local
38
+ Replace `--claude` with `--codex` for Codex CLI, `--hermes` for Hermes, or
39
+ `--all` for all supported agents.
34
40
 
35
- **Global (recommended):** Plastic stores all intents at `~/.plastic/`. Projects spawned by implementation intents get their own `.plastic/store/` for tactical intents.
41
+ ### Updating
36
42
 
37
- ```
38
- /plastic:install
39
- ```
40
-
41
- **Local (testing):** Intents stored per-project in `.plastic/`. Useful for trying Plastic in a single project.
43
+ From within your agent, say "update plastic" or run:
42
44
 
43
- ```
44
- /plastic:install --local
45
+ ```bash
46
+ npx @zalom/plastic@alpha --claude
45
47
  ```
46
48
 
47
- ## Prerequisites
49
+ The `plastic:update` command shows available versions across all channels and
50
+ lets you choose which to install.
48
51
 
49
- Plastic hooks use Ruby for intent ID generation. Ruby is pre-installed on macOS/Linux. On Windows, use WSL or install Ruby from https://rubyinstaller.org/.
52
+ ## Quick Start
50
53
 
51
- ## Directory Structure
52
-
53
- ```
54
- .plastic/
55
- ├── AGENTS.md # Conventions contract for all agents
56
- ├── config.yml # Plugin configuration
57
- ├── INDEX.md # Brain's entry point
58
- └── store/
59
- └── ID--three-to-five-words/
60
- ├── {ID}--{slug}.md # Always present (e.g., 1a1--design-plastic.md)
61
- ├── spec.md # Optional (brainstorming output)
62
- ├── plan.md # Optional (implementation plan)
63
- ├── checklist.md # Optional (progress tracking)
64
- └── savepoint.md # Optional (session state)
65
- ```
54
+ After installation, run `/clear` to load Plastic conventions, then:
66
55
 
67
- ## Skills
56
+ 1. Say "new intent" or run `/plastic:creating-intent` to create your first intent
57
+ 2. Describe what you want to accomplish
58
+ 3. Use `/plastic:brainstorming` to explore the design
59
+ 4. Use `/plastic:writing-plans` to create an implementation plan
60
+ 5. Use `/plastic:executing-plan` to deliver it
68
61
 
69
- | Skill | Purpose |
70
- |-------|---------|
71
- | `install` | Initialize `.plastic/` in a new project |
72
- | `creating-intent` | Create a new intent with directory, hash, and INDEX.md entry |
73
- | `savepoint` | Save active intent state before context reset |
74
- | `continuing` | Resume from savepoint after `/clear` |
75
- | `linking-intents` | Connect intents via Zettelkasten links |
76
- | `managing-index` | Curate INDEX.md structure note |
77
- | `executing-plan` | Execute plans via subagent-driven (default) or inline mode |
62
+ Or say "auto" to let the agent handle the full lifecycle autonomously.
78
63
 
79
- ## Agents
64
+ ## Conventions
80
65
 
81
- | Agent | Purpose |
82
- |-------|---------|
83
- | `intent-curator` | Maintains INDEX.md health, suggests links |
84
- | `future-intent-researcher` | Researches parked future intents |
66
+ All conventions live in `AGENTS.md`, distributed to `~/.plastic/AGENTS.md`
67
+ during installation. Run `plastic:doctor` to check installation health.
85
68
 
86
69
  ## License
87
70
 
package/deprecations.yml CHANGED
@@ -13,10 +13,10 @@
13
13
 
14
14
  deprecations:
15
15
  - id: cc-plugin-to-npx
16
- severity: info
16
+ severity: warning
17
17
  summary: "Plastic distribution is moving from Claude Code plugin to npx install"
18
18
  migration_steps:
19
- - "Install new distribution: npx @zalom/plastic@latest"
19
+ - "Install new distribution: npx @zalom/plastic@alpha --claude"
20
20
  - "Verify: check that ~/.plastic/ is intact and hooks work"
21
21
  - "Remove old plugin: /plugin remove plastic"
22
22
  introduced: "1.0.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zalom/plastic",
3
- "version": "1.0.0-alpha.11",
3
+ "version": "1.0.0-alpha.12",
4
4
  "description": "Intent-driven idea development system for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -3,7 +3,7 @@
3
3
  # frozen_string_literal: true
4
4
 
5
5
  # Plastic installer — runs via npx shim or directly.
6
- # Usage: ruby scripts/install.rb [--claude] [--codex] [--hermes] [--all] [--uninstall] [--force] [--help]
6
+ # Usage: ruby scripts/install.rb [--claude] [--codex] [--hermes] [--all] [--alpha] [--beta] [--latest] [--uninstall] [--force] [--help]
7
7
 
8
8
  require "json"
9
9
  require "yaml"
@@ -71,7 +71,7 @@ end
71
71
  # --- Flag parsing ---
72
72
 
73
73
  def parse_flags(argv)
74
- flags = { agents: [], force: false, uninstall: false, help: false }
74
+ flags = { agents: [], force: false, uninstall: false, help: false, channel: "latest" }
75
75
 
76
76
  argv.each do |arg|
77
77
  case arg
@@ -79,6 +79,9 @@ def parse_flags(argv)
79
79
  when "--force" then flags[:force] = true
80
80
  when "--uninstall" then flags[:uninstall] = true
81
81
  when "--help", "-h" then flags[:help] = true
82
+ when "--alpha" then flags[:channel] = "alpha"
83
+ when "--beta" then flags[:channel] = "beta"
84
+ when "--latest" then flags[:channel] = "latest"
82
85
  else
83
86
  agent = AGENTS.find { |a| a[:flag] == arg }
84
87
  flags[:agents] << agent[:key] if agent
@@ -115,22 +118,30 @@ def show_help
115
118
  plastic - Intent-driven idea development system
116
119
 
117
120
  Usage:
118
- npx @zalom/plastic@latest [options]
121
+ npx @zalom/plastic [options]
119
122
 
120
- Options:
123
+ Agent options:
121
124
  --claude Install for Claude Code
122
125
  --codex Install for Codex CLI
123
126
  --hermes Install for Hermes
124
127
  --all Install for all supported agents
128
+
129
+ Channel options:
130
+ --latest Install from stable channel (default)
131
+ --beta Install from beta channel
132
+ --alpha Install from alpha channel
133
+
134
+ Other options:
125
135
  --force Overwrite existing files without prompting
126
136
  --uninstall Remove Plastic from agent directories
127
137
  -h, --help Show this help
128
138
 
129
139
  Examples:
130
- npx @zalom/plastic@latest Interactive agent selection
131
- npx @zalom/plastic@latest --claude Install for Claude Code only
132
- npx @zalom/plastic@latest --all Install for all agents
133
- npx @zalom/plastic@latest --uninstall Remove from agent directories
140
+ npx @zalom/plastic --claude Install stable for Claude Code
141
+ npx @zalom/plastic@alpha --claude Install alpha for Claude Code
142
+ npx @zalom/plastic@beta --claude Install beta for Claude Code
143
+ npx @zalom/plastic --all Install stable for all agents
144
+ npx @zalom/plastic --uninstall Remove from agent directories
134
145
 
135
146
  HELP
136
147
  end
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: doctor
2
+ name: plastic:doctor
3
3
  description: Use when diagnosing Plastic installation health, after updates, or when something seems broken. Runs checks and reports findings with fix options.
4
4
  ---
5
5
 
@@ -1,10 +1,34 @@
1
1
  ---
2
2
  name: plastic:install
3
- description: Use when initializing Plastic globally (~/.plastic/) or locally in a project. Global install is recommended — creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.
3
+ description: Use when initializing Plastic globally (~/.plastic/) or locally in a project. Accepts channel flags (--alpha, --beta, --latest) to select release channel. Default is --latest (stable). Global install is recommended — creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.
4
4
  ---
5
5
 
6
6
  # Install Plastic
7
7
 
8
+ ## Channel Flags
9
+
10
+ | Flag | Behavior |
11
+ |------|----------|
12
+ | `--latest` | Install from stable channel (default) |
13
+ | `--beta` | Install from beta channel |
14
+ | `--alpha` | Install from alpha channel |
15
+
16
+ When invoked from within Claude Code (re-install or channel switch), the skill
17
+ runs the appropriate npx command:
18
+
19
+ ```bash
20
+ # Stable (default)
21
+ npx @zalom/plastic --claude
22
+
23
+ # Beta
24
+ npx @zalom/plastic@beta --claude
25
+
26
+ # Alpha
27
+ npx @zalom/plastic@alpha --claude
28
+ ```
29
+
30
+ The installed version and channel are recorded in `~/.plastic/VERSION`.
31
+
8
32
  ## Modes
9
33
 
10
34
  ### Global Install (default, recommended)
@@ -140,16 +140,24 @@ For the first release (no previous tag), write notes manually with `--notes "...
140
140
 
141
141
  #### `npm_publish`
142
142
 
143
- Publish the package to npm:
143
+ Publish the package to npm with the appropriate dist-tag:
144
144
 
145
145
  ```bash
146
- # For pre-release versions (0.x.y, or version contains -alpha/-beta/-rc):
146
+ # Alpha pre-release (version contains -alpha):
147
147
  npm publish --access public --tag alpha
148
148
 
149
- # For stable versions (>= 1.0.0, no pre-release suffix):
149
+ # Beta pre-release (version contains -beta):
150
+ npm publish --access public --tag beta
151
+
152
+ # Stable release (no pre-release suffix, >= 1.0.0):
150
153
  npm publish --access public
151
154
  ```
152
155
 
156
+ The dist-tag is derived from the version string in `package.json`:
157
+ - Contains `-alpha` → `--tag alpha`
158
+ - Contains `-beta` → `--tag beta`
159
+ - No pre-release suffix → no `--tag` flag (publishes to `latest`)
160
+
153
161
  #### Other values
154
162
 
155
163
  If `on_green` contains an action not listed above, log it:
@@ -184,6 +192,24 @@ A release IS a delivery. The active intent that drove this work must be complete
184
192
  - **Version files** — driven by project.yml; all listed files must always match
185
193
  - **Branch cleanup** — delete merged feature branches: `git branch -d <branch>`
186
194
 
195
+ ## Promotion
196
+
197
+ To promote a release across channels, use `--promote`:
198
+
199
+ ```bash
200
+ plastic:releasing --promote beta # promotes current alpha → beta
201
+ plastic:releasing --promote stable # promotes current beta → stable
202
+ ```
203
+
204
+ **Promotion rules:**
205
+ - Linear only: alpha → beta → stable. Cannot skip channels.
206
+ - `--promote beta`: reads version from `package.json`, changes `-alpha.N` suffix
207
+ to `-beta.1`, publishes with `--tag beta`.
208
+ - `--promote stable`: reads version from `package.json`, strips pre-release suffix
209
+ entirely (e.g., `1.0.0-beta.3` → `1.0.0`), publishes to `latest`.
210
+ - Version files are bumped and committed as in a normal release.
211
+ - An annotated tag is created for the promoted version.
212
+
187
213
  ## Retroactive Tagging
188
214
 
189
215
  For repos without prior tags, tag historical releases:
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: update
3
- description: Use when updating Plastic after a plugin update, or when the user says "update plastic". Runs the npx installer to sync core files and re-register agent adapters.
2
+ name: plastic:update
3
+ description: Use when updating Plastic. Queries npm for available versions across all channels, presents options interactively, or accepts --alpha/--beta/--latest flags for direct update.
4
4
  ---
5
5
 
6
6
  # Update Plastic
@@ -10,43 +10,98 @@ description: Use when updating Plastic after a plugin update, or when the user s
10
10
  - Statusline shows "Plastic update available"
11
11
  - After a version bump notification
12
12
 
13
+ ## Flags
14
+
15
+ | Flag | Behavior |
16
+ |------|----------|
17
+ | `--alpha` | Update to latest alpha, skip interactive prompt |
18
+ | `--beta` | Update to latest beta, skip interactive prompt |
19
+ | `--latest` | Update to latest stable, skip interactive prompt |
20
+
21
+ No flag = interactive mode (show all available versions).
22
+
13
23
  ## Prerequisites
14
24
 
15
25
  Global install must exist (`~/.plastic/INDEX.md` present). If not, tell the
16
- user to run `npx @zalom/plastic@latest` first.
26
+ user to run `npx @zalom/plastic@alpha --claude` first.
17
27
 
18
28
  ## Procedure
19
29
 
20
- ### Step 1: Verify global install exists
30
+ ### Step 1: Read current version
31
+
32
+ ```bash
33
+ cat ~/.plastic/VERSION
34
+ ```
35
+
36
+ Parse the version string to determine the current channel:
37
+ - Contains `-alpha` → alpha channel
38
+ - Contains `-beta` → beta channel
39
+ - No pre-release suffix → stable/latest channel
40
+
41
+ ### Step 2: Query npm for available versions
21
42
 
22
43
  ```bash
23
- if [ ! -f ~/.plastic/INDEX.md ]; then
24
- echo "No global install found. Run: npx @zalom/plastic@latest"
25
- exit
26
- fi
44
+ npm view @zalom/plastic dist-tags --json
45
+ ```
46
+
47
+ This returns a JSON object like:
48
+ ```json
49
+ {
50
+ "latest": "0.0.1",
51
+ "alpha": "1.0.0-alpha.14",
52
+ "beta": "1.0.0-beta.2"
53
+ }
54
+ ```
55
+
56
+ A missing dist-tag means no release exists on that channel.
57
+
58
+ ### Step 3: Present options or act on flag
59
+
60
+ **If a channel flag was provided** (`--alpha`, `--beta`, `--latest`):
61
+
62
+ Skip the interactive prompt. Install the flagged channel directly. Go to Step 4.
63
+
64
+ **If no flag (interactive mode):**
65
+
66
+ Present the available updates to the user:
67
+
27
68
  ```
69
+ Currently installed: 1.0.0-alpha.11 (alpha channel)
28
70
 
29
- ### Step 2: Run the installer
71
+ Available updates:
72
+ alpha: 1.0.0-alpha.14 ← your channel
73
+ beta: 1.0.0-beta.2
74
+ stable: (no stable release yet)
75
+
76
+ Which channel do you want to install?
77
+ ```
78
+
79
+ Use AskUserQuestion with the available channels as options. Mark the user's
80
+ current channel with "← your channel". If a dist-tag points to the same
81
+ version as currently installed, show "(up to date)" instead of the version.
82
+ If a dist-tag doesn't exist, show "(no release yet)".
83
+
84
+ Wait for user selection.
85
+
86
+ ### Step 4: Run the installer
30
87
 
31
88
  ```bash
32
- npx @zalom/plastic@latest --claude
89
+ npx @zalom/plastic@{selected-tag} --claude
33
90
  ```
34
91
 
35
- This re-runs the installer which:
36
- - Downloads the latest version from npm
37
- - Syncs core files (PLASTIC.md, scripts, hooks) to ~/.plastic/
38
- - Re-registers hooks and skills into Claude Code's ~/.claude/
39
- - Preserves all user data (INDEX.md, config.yml, projects.yml, store/)
92
+ Replace `{selected-tag}` with `alpha`, `beta`, or `latest` based on the
93
+ user's selection or the flag provided. Replace `--claude` with the appropriate
94
+ agent flag(s) detect current agents from `~/.claude/`, `~/.agents/`,
95
+ `~/.hermes/` directories.
40
96
 
41
- ### Step 3: Announce key changes
97
+ ### Step 5: Announce key changes
42
98
 
43
99
  After the installer completes, read `~/.plastic/PLASTIC.md` and announce any
44
- convention changes that affect the current session. This corrects the agent's
45
- in-context understanding without needing /clear.
100
+ convention changes that affect the current session.
46
101
 
47
102
  Format:
48
103
  ```
49
- Plastic updated to vX.Y.Z.
104
+ Plastic updated to vX.Y.Z (channel).
50
105
 
51
106
  Key changes in this version:
52
107
  - [list notable convention changes if any]
@@ -54,24 +109,22 @@ Key changes in this version:
54
109
  Recommendation: run /clear for a clean session with all new conventions loaded.
55
110
  ```
56
111
 
57
- ### Step 4: Run health check
112
+ ### Step 6: Run health check
58
113
 
59
114
  Invoke `plastic:doctor` to verify the installation is healthy after the update.
60
115
 
61
116
  If all checks pass, show: **"Health check: all clear."**
62
117
 
63
- If issues are found, show the full doctor report and offer to fix any fixable items.
118
+ If issues are found, show the full doctor report and offer to fix.
64
119
 
65
- ### Step 5: Commit
120
+ ### Step 7: Commit
66
121
 
67
122
  ```bash
68
- cd ~/.plastic && git add PLASTIC.md scripts/ AGENTS.md VERSION 2>/dev/null && git commit -m "chore: update Plastic core files" --allow-empty
123
+ cd ~/.plastic && git add PLASTIC.md scripts/ AGENTS.md VERSION 2>/dev/null && git commit -m "chore: update Plastic to $(cat ~/.plastic/VERSION)" --allow-empty
69
124
  ```
70
125
 
71
- ### Step 6: Clear update cache
126
+ ### Step 8: Clear update cache
72
127
 
73
128
  ```bash
74
129
  rm -f ~/.plastic/.cache/update-check.json
75
130
  ```
76
-
77
- This removes the statusline warning since the update is now applied.