@zalom/plastic 1.14.1 → 2.0.0-alpha.10
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/PLASTIC.md +101 -294
- package/README.md +5 -6
- package/agents/plastic-advisor.md +18 -17
- package/agents/plastic-enforcer.md +57 -69
- package/agents/plastic-executor.md +34 -20
- package/agents/plastic-faux-advisor.md +18 -18
- package/bin/lib/context_budget.rb +453 -0
- package/bin/plastic-bench +78 -0
- package/config_asks.yml +38 -0
- package/hooks/capture +4 -0
- package/hooks/close +5 -0
- package/hooks/hooks.json +14 -42
- package/hooks/message-display +81 -0
- package/hooks/record +4 -0
- package/hooks/savepoint +5 -5
- package/package.json +3 -2
- package/scripts/agent-report +15 -10
- package/scripts/append-ledger +208 -0
- package/scripts/codex-hook +78 -90
- package/scripts/dashboard.rb +43 -14
- package/scripts/day-summary +53 -0
- package/scripts/doctor.rb +269 -43
- package/scripts/end-intent +170 -76
- package/scripts/exec-worktree +11 -20
- package/scripts/file-session-intent +61 -0
- package/scripts/hook-capture +255 -0
- package/scripts/hook-close +36 -0
- package/scripts/hook-message-display +74 -0
- package/scripts/hook-record +157 -0
- package/scripts/hook-savepoint +45 -0
- package/scripts/hook-session-start +128 -12
- package/scripts/install.rb +8 -6
- package/scripts/intent-screen +77 -0
- package/scripts/lib/agent_models.rb +1 -7
- package/scripts/lib/arm.rb +308 -0
- package/scripts/lib/backfill_intent.rb +316 -0
- package/scripts/lib/bridge.rb +24 -1597
- package/scripts/lib/compact_instructions.rb +56 -0
- package/scripts/lib/day_summary.rb +211 -0
- package/scripts/lib/doctor_core.rb +66 -88
- package/scripts/lib/doctor_session_ledger.rb +158 -0
- package/scripts/lib/exec_worktree.rb +14 -60
- package/scripts/lib/handoff.rb +184 -0
- package/scripts/lib/harness_text.rb +5 -4
- package/scripts/lib/hook_registry.rb +57 -106
- package/scripts/lib/insights.rb +3 -4
- package/scripts/lib/installer_core.rb +136 -41
- package/scripts/lib/intent_screen.rb +309 -0
- package/scripts/lib/intent_screen_ansi.rb +262 -0
- package/scripts/lib/lock.rb +6 -26
- package/scripts/lib/message_display.rb +290 -0
- package/scripts/lib/outcome_guard.rb +7 -5
- package/scripts/lib/project_validator.rb +30 -1
- package/scripts/lib/report_screen.rb +648 -0
- package/scripts/lib/roadmap_queue.rb +3 -3
- package/scripts/lib/roadmap_savepoint.rb +1 -1
- package/scripts/lib/rule_catalog.rb +6 -3
- package/scripts/lib/savepoint.rb +334 -0
- package/scripts/lib/scaffold_intent.rb +13 -179
- package/scripts/lib/screen_paint.rb +276 -0
- package/scripts/lib/session_backfill.rb +184 -0
- package/scripts/lib/session_close.rb +104 -0
- package/scripts/lib/session_git.rb +500 -0
- package/scripts/lib/session_ledger.rb +621 -0
- package/scripts/lib/store_discovery.rb +1 -1
- package/scripts/lib/store_provisioning.rb +1 -1
- package/scripts/maintenance-run +7 -7
- package/scripts/new-intent +63 -4
- package/scripts/plastic-lock +101 -41
- package/scripts/promote-session-item +150 -0
- package/scripts/read-config +3 -0
- package/scripts/rebuild-graph +1 -1
- package/scripts/report-screen +120 -0
- package/scripts/roadmap-next +2 -2
- package/scripts/rollback.rb +48 -3
- package/scripts/savepoint-note +67 -0
- package/scripts/scaffold-intent +37 -63
- package/scripts/session-commit +116 -0
- package/scripts/spawn-preamble +14 -7
- package/scripts/update.rb +7 -3
- package/scripts/write-handoff +60 -0
- package/skills/agent-advisor/SKILL.md +3 -3
- package/skills/agent-advisor/references/advisor-protocol.md +20 -20
- package/skills/auto/SKILL.md +223 -317
- package/skills/auto/evals/evals.json +10 -10
- package/skills/auto/references/agent-architecture.md +102 -90
- package/skills/auto/references/agent-report-contract.md +4 -21
- package/skills/auto/references/end-tail.md +47 -53
- package/skills/auto/references/human-report-contract.md +62 -56
- package/skills/conventions/SKILL.md +1 -3
- package/skills/conventions/references/lifecycle-and-savepoints.md +35 -1
- package/skills/conventions/references/locks-and-worktrees.md +62 -58
- package/skills/conventions/references/maintenance-and-revisions.md +12 -12
- package/skills/dashboard/SKILL.md +1 -1
- package/skills/direct/SKILL.md +66 -0
- package/skills/direct/references/request-signals.md +59 -0
- package/skills/doctor/SKILL.md +58 -11
- package/skills/doctor/report.md +3 -1
- package/skills/install/SKILL.md +11 -9
- package/skills/intent-continuing/SKILL.md +142 -91
- package/skills/intent-continuing/references/boarding-matrix.md +34 -0
- package/skills/intent-continuing/references/context-management.md +3 -3
- package/skills/intent-creating/SKILL.md +2 -2
- package/skills/intent-creating/references/lifecycle.md +1 -1
- package/skills/intent-ending/SKILL.md +34 -37
- package/skills/intent-ending/evals/evals.json +4 -4
- package/skills/intent-executing/SKILL.md +15 -46
- package/skills/intent-executing/plan-reviewer-prompt.md +39 -0
- package/skills/intent-speccing/SKILL.md +108 -51
- package/skills/intent-speccing/evals/evals.json +5 -5
- package/skills/intent-speccing/references/per-section-fill-rules.md +4 -4
- package/skills/intent-speccing/references/self-verify-checklist.md +1 -2
- package/skills/project-creating/SKILL.md +1 -1
- package/skills/releasing/SKILL.md +7 -8
- package/skills/tutorial/SKILL.md +2 -2
- package/skills/tutorial/references/track-1-guided.md +16 -18
- package/skills/tutorial/references/track-2-auto.md +12 -13
- package/skills/tutorial/references/track-3-projects-and-roadmaps.md +2 -2
- package/templates/agents.md +4 -7
- package/templates/config.yml +5 -0
- package/templates/intent-screen.md +17 -0
- package/templates/outcome.md +14 -1
- package/templates/project.yml +7 -0
- package/templates/report-state.md +11 -0
- package/templates/roadmap.md +1 -1
- package/templates/savepoint.md +2 -2
- package/templates/session-intent.md +29 -0
- package/agents/plastic-brainstorming.md +0 -48
- package/agents/plastic-future-intent-researcher.md +0 -35
- package/agents/plastic-intent-curator.md +0 -47
- package/agents/plastic-intent-discovery.md +0 -43
- package/agents/plastic-planner.md +0 -56
- package/agents/plastic-spec-specialist.md +0 -53
- package/hooks/auto-arm +0 -5
- package/hooks/bash-gate +0 -3
- package/hooks/continue +0 -31
- package/hooks/edit-gates +0 -3
- package/hooks/future-intent-check +0 -25
- package/hooks/gate-check +0 -12
- package/hooks/power-tools +0 -8
- package/scripts/hook-auto-arm +0 -51
- package/scripts/hook-bash-gate +0 -78
- package/scripts/hook-code-gate +0 -38
- package/scripts/hook-continue +0 -48
- package/scripts/hook-create-gate +0 -51
- package/scripts/hook-edit-gates +0 -58
- package/scripts/hook-future-intent-check +0 -90
- package/scripts/hook-gate-check +0 -169
- package/scripts/hook-links-gate +0 -54
- package/scripts/hook-lock-gate +0 -47
- package/scripts/hook-power-tools +0 -38
- package/scripts/hook-savepoint-pre +0 -32
- package/scripts/lib/codex_edit_gates.rb +0 -138
- package/scripts/lib/edit_gates.rb +0 -398
- package/scripts/lib/links_gate.rb +0 -140
- package/scripts/lib/qmd_hook.rb +0 -41
- package/scripts/lib/spec_header.rb +0 -83
- package/scripts/lib/start_intent.rb +0 -296
- package/scripts/start-intent +0 -89
- package/skills/_active-intent-gate.md +0 -26
- package/skills/auto/references/tiers.md +0 -100
- package/skills/continuing/SKILL.md +0 -34
- package/skills/continuing/evals/evals.json +0 -91
- package/skills/conventions/references/gates-and-enforcement.md +0 -53
- package/skills/conventions/references/tiers-and-dispatch.md +0 -135
- package/skills/doctor/references/gates-stuck-detection.md +0 -43
- package/skills/intent-brainstorming/SKILL.md +0 -118
- package/skills/intent-brainstorming/evals/evals.json +0 -67
- package/skills/intent-continuing/evals/evals.json +0 -145
- package/skills/intent-discovering/SKILL.md +0 -56
- package/skills/intent-grilling/SKILL.md +0 -108
- package/skills/intent-linking/SKILL.md +0 -128
- package/skills/intent-linking/evals/evals.json +0 -22
- package/skills/intent-linking/references/zettelkasten.md +0 -45
- package/skills/intent-locking/SKILL.md +0 -64
- package/skills/intent-planning/SKILL.md +0 -145
- package/skills/intent-planning/evals/evals.json +0 -81
- package/skills/intent-planning/references/plan-format.md +0 -130
- package/skills/intent-researching/SKILL.md +0 -123
- package/skills/intent-researching/evals/evals.json +0 -22
- package/skills/intent-savepoint/SKILL.md +0 -83
- package/skills/intent-savepoint/references/context-management.md +0 -32
- package/skills/intent-starting/SKILL.md +0 -151
- package/skills/intent-starting/evals/evals.json +0 -117
- package/skills/intent-starting/references/boarding-matrix.md +0 -35
- package/skills/project-continuing/SKILL.md +0 -119
- package/skills/project-continuing/evals/evals.json +0 -100
- package/skills/roadmap-continuing/SKILL.md +0 -89
- package/skills/roadmap-continuing/evals/evals.json +0 -82
- package/skills/skill-creating/SKILL.md +0 -75
- package/skills/skill-creating/evals/evals.json +0 -108
- package/skills/skill-creating/references/agents.md +0 -168
- package/skills/skill-creating/references/defaults-first.md +0 -23
- package/skills/skill-creating/references/evals.md +0 -41
- package/skills/skill-creating/references/hooks.md +0 -251
- package/skills/skill-creating/references/progressive-disclosure.md +0 -176
- package/skills/skill-creating/references/scripts.md +0 -166
- package/skills/skill-creating/references/skills.md +0 -169
- package/skills/skill-creating/scripts/scaffold.rb +0 -313
- package/skills/skill-evaluating/SKILL.md +0 -141
- package/skills/skill-evaluating/assets/eval-template.json +0 -12
- package/skills/skill-evaluating/evals/evals.json +0 -75
- package/skills/skill-evaluating/references/convention-checks.md +0 -76
- package/skills/skill-evaluating/references/eval-methodology.md +0 -154
- package/skills/store-curating/SKILL.md +0 -64
- package/skills/store-curating/evals/evals.json +0 -38
- package/skills/store-indexing/SKILL.md +0 -93
- package/skills/store-indexing/evals/evals.json +0 -22
- package/skills/store-indexing/references/zettelkasten-linking.md +0 -32
- package/skills/store-provisioning/SKILL.md +0 -55
- /package/skills/{project-continuing → intent-continuing}/references/board-fill.md +0 -0
- /package/skills/{roadmap-continuing → intent-continuing}/references/liveness-ranking.md +0 -0
- /package/skills/{intent-brainstorming → intent-speccing}/references/design-principles.md +0 -0
package/skills/doctor/SKILL.md
CHANGED
|
@@ -13,7 +13,7 @@ Doctor has three scopes. Pick the right one for the situation:
|
|
|
13
13
|
| Scope | Flag | When it runs | States |
|
|
14
14
|
|-------|------|--------------|--------|
|
|
15
15
|
| Core check | `--core` | SessionStart hook (automatic), also available on demand | Binary: pass or error |
|
|
16
|
-
| Store check | `--store [global\|<slug>]` | Dashboard load, `plastic-
|
|
16
|
+
| Store check | `--store [global\|<slug>]` | Dashboard load, the project route of `plastic-intent-continuing` | Three-state: pass / warn / fail |
|
|
17
17
|
| Full check | (no flag) | After every update (automatic), or `/plastic-doctor` | Three-state: pass / warn / fail |
|
|
18
18
|
|
|
19
19
|
### `--core` (binary, operational-readiness only)
|
|
@@ -51,8 +51,12 @@ Each manifest maps a file path to its SHA256.
|
|
|
51
51
|
|
|
52
52
|
Checks the operations Plastic itself depends on in one store: QMD search reachability (scoped
|
|
53
53
|
to that store's own collection; global uses `plastic-global`, a project slug uses
|
|
54
|
-
`plastic-<slug>`), sources/chain resolution, cross-store resolution, INDEX parsing,
|
|
55
|
-
projection
|
|
54
|
+
`plastic-<slug>`), sources/chain resolution, cross-store resolution, INDEX parsing, links
|
|
55
|
+
projection, done signals (including `backfilled_complete`: a terminal intent still missing a
|
|
56
|
+
real spec.md, plan.md, or action file), and, for the global store only, the session ledger
|
|
57
|
+
(`orphaned_session_tmp`: a `.tmp/<session>/` directory whose heartbeat is older than 24
|
|
58
|
+
hours; `day_ledger_shape`: a `.sessions/` entry that is not a `YYYYMMDD` day directory with
|
|
59
|
+
its `<day>.md`). A project slug also checks tool readiness (Serena, Enola): each is a pass whether
|
|
56
60
|
present or absent, present naming it available, absent noting it as an optional integration
|
|
57
61
|
never installed by doctor. Scope options:
|
|
58
62
|
|
|
@@ -86,10 +90,6 @@ per-project finding**; that is `--store <slug>`'s job (see above). This is what
|
|
|
86
90
|
- When hooks aren't firing, skills aren't loading, or something seems broken
|
|
87
91
|
- When the user says "check plastic", "diagnose", "what's wrong with plastic"
|
|
88
92
|
|
|
89
|
-
Read `../plastic-conventions/references/gates-and-enforcement.md` for the transition-gate
|
|
90
|
-
mechanics, the audited escape, and gate logging before diagnosing a stuck or misbehaving gate.
|
|
91
|
-
This path resolves relative to this skill's own installed directory.
|
|
92
|
-
|
|
93
93
|
## Procedure
|
|
94
94
|
|
|
95
95
|
### Step 1: Run the diagnostic script
|
|
@@ -159,10 +159,13 @@ Use the `fix_hint` value to determine the correct action:
|
|
|
159
159
|
| "Add missing entries to INDEX.md" | Add orphaned intents to the appropriate INDEX.md section |
|
|
160
160
|
| "Remove stale references from INDEX.md" | Edit INDEX.md to remove ghost references |
|
|
161
161
|
| "Inject the missing required frontmatter field(s)" | Edit the intent's `{ID}--{slug}.md` frontmatter to add the missing key (e.g. `chain: []`) without touching other keys |
|
|
162
|
-
| "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (
|
|
162
|
+
| "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (see Provisioning a project store below) to create the missing store |
|
|
163
163
|
| "Re-run installer" | Run `npx -y @zalom/plastic@<channel> install --claude` (or `--codex`/`--hermes`/`--all` for that agent; channel: -alpha->@alpha, -beta->@beta, else @latest) |
|
|
164
164
|
| "Run the Plastic installer to bootstrap the store" | Run `npx -y @zalom/plastic@<channel> install --claude` (or `--codex`/`--hermes`/`--all`; channel: -alpha->@alpha, -beta->@beta, else @latest) to restore the global store's plastic_home directory or INDEX.md |
|
|
165
|
-
| "
|
|
165
|
+
| "Relocate ... revisions.md ..." | Relocate the flagged section or ref into the intent's `revisions.md` via move-and-record (one dated, `[rule: <tag>]`-tagged entry per item), per plastic-conventions > references/maintenance-and-revisions.md. For a missing required section, restore or reproject it instead. |
|
|
166
|
+
| "Write the missing documents from the record via `scaffold-intent backfill ...`" | Run `ruby ~/.plastic/scripts/scaffold-intent backfill --store <store> --id <id> --disposition <delivered\|abandoned>` for each listed intent; it fills only missing or placeholder files and never touches real content |
|
|
167
|
+
| "Remove each listed .tmp/<session>/ directory after confirming that session is gone" | For each listed directory, confirm no live session uses it (a live session rewrites its heartbeat on every prompt and edit), then remove that directory by hand; never remove an unlisted one |
|
|
168
|
+
| "For a day directory missing its <day>.md, run `file-session-intent --day <day> ...`" | Run `ruby ~/.plastic/scripts/file-session-intent --day <day> --carry-to <today> --store <store>` for the named day; rename or remove an entry that is not a `YYYYMMDD` day directory |
|
|
166
169
|
| "Run scripts/project-links ... PRESERVES ... --drop-unbacked-links" | Run `ruby ~/.plastic/scripts/maintenance-run --tool project-links --intent <id> --apply` for the one flagged id (never run bare `project-links` against a real store outside the rare owner-approved batch exception, D2) |
|
|
167
170
|
|
|
168
171
|
For fixes the agent cannot handle automatically, explain what the user needs
|
|
@@ -247,6 +250,50 @@ removes exactly the dead rows through the same writer and commit, but holds back
|
|
|
247
250
|
intent dir carries a fresh lock or has not gone terminal yet (nothing to suppress there yet),
|
|
248
251
|
naming both as kept.
|
|
249
252
|
|
|
250
|
-
##
|
|
253
|
+
## Locks (auto teams only)
|
|
254
|
+
|
|
255
|
+
Locks exist for auto teams: a `delivery.lock` file in the intent directory names the owning
|
|
256
|
+
session, and the `record` hook refreshes its mtime on every edit (the lease heartbeat; stale
|
|
257
|
+
means older than the TTL). Direct work takes no lock. When a lock reads held by a session
|
|
258
|
+
that is gone, when work resumes after a crash, reboot, or `/tmp` wipe, or when the user says
|
|
259
|
+
"fix the lock", "who holds the lock", or "reclaim the lock", use the CLI (intent 304 folded
|
|
260
|
+
the former locking skill here):
|
|
261
|
+
|
|
262
|
+
| Verb | What it does | When |
|
|
263
|
+
|---|---|---|
|
|
264
|
+
| `who` | Owner, heartbeat, claims, delegates, from durable files only | Safe inspection; needs `--intent-dir` |
|
|
265
|
+
| `status` | Lock file, freshness, the derived worktree, whether this session's pointer names the intent, claims | Always safe; run first |
|
|
266
|
+
| `fix` | Idempotent repair from disk truth for this session; never touches a fresh foreign lock | Interrupted work, corrupt state, `/tmp` wiped |
|
|
267
|
+
| `release` | The owner clears the lock | Ending or abandoning an auto delivery |
|
|
268
|
+
| `reclaim` | Explicit takeover of a stale lock; appends an audit line to `savepoint.md` | The owner is gone and the lease expired |
|
|
269
|
+
| `delegate` | The owner registers a subagent session, or marks it `finished` or `failed` | Auto-team orchestration |
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
ruby ~/.plastic/scripts/plastic-lock status --intent-dir <store>/<id>--<slug>
|
|
273
|
+
ruby ~/.plastic/scripts/plastic-lock who --intent-dir <store>/<id>--<slug>
|
|
274
|
+
ruby ~/.plastic/scripts/plastic-lock fix --intent-dir <store>/<id>--<slug>
|
|
275
|
+
ruby ~/.plastic/scripts/plastic-lock reclaim --intent-dir <store>/<id>--<slug>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
`fix` exits non-zero when another session holds a fresh lock: back off, `status` shows the
|
|
279
|
+
owner. `reclaim` refuses a fresh lock; every takeover is audited. The lock file's mtime is the
|
|
280
|
+
sole freshness truth. Never delete a lock file by hand. Read
|
|
281
|
+
`../plastic-conventions/references/locks-and-worktrees.md` when a lock question goes beyond
|
|
282
|
+
these verbs (claims, worktrees, the station ledger).
|
|
283
|
+
|
|
284
|
+
## Provisioning a project store
|
|
285
|
+
|
|
286
|
+
When a project is registered in `~/.plastic/projects.yml` but has no store on disk (doctor
|
|
287
|
+
reports `project_store_dir`), provision it (intent 304 folded the former provisioning skill
|
|
288
|
+
here). The slug is the project's key under `projects`; an unregistered slug exits non-zero and
|
|
289
|
+
creates nothing, and this procedure never edits `projects.yml`.
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
ruby ~/.plastic/scripts/provision-project-store <slug>
|
|
293
|
+
ruby ~/.plastic/scripts/qmd-sync register --store ~/.plastic/projects/<slug>/store
|
|
294
|
+
```
|
|
251
295
|
|
|
252
|
-
|
|
296
|
+
The provisioner is pure filesystem and idempotent: it creates
|
|
297
|
+
`~/.plastic/projects/<slug>/store/` with `.gitkeep`, writes `INDEX.md` and `project.yml` only
|
|
298
|
+
when missing, and never clobbers. The QMD registration is a separate, optional step that
|
|
299
|
+
no-ops when QMD is absent. New projects are provisioned by `plastic-project-creating`, not here.
|
package/skills/doctor/report.md
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
core_files -> "Core Files"
|
|
19
19
|
project_stores -> "Project Stores"
|
|
20
20
|
deprecations -> "Deprecations"
|
|
21
|
+
done_signals -> "Done Signals"
|
|
22
|
+
session_ledger -> "Session Ledger" (global store only)
|
|
21
23
|
4. For each check within a category, emit one line with the status icon
|
|
22
24
|
and the check message. If the check has non-empty details, list them
|
|
23
25
|
as indented sub-items.
|
|
@@ -59,7 +61,7 @@ Checked at: {{timestamp}}
|
|
|
59
61
|
- [PASS] Claude Code adapter registered
|
|
60
62
|
- [FAIL] 2 hook scripts not executable
|
|
61
63
|
- ~/.claude/hooks/plastic-session-start
|
|
62
|
-
- ~/.claude/hooks/plastic-
|
|
64
|
+
- ~/.claude/hooks/plastic-record
|
|
63
65
|
|
|
64
66
|
<!-- =====================================================================
|
|
65
67
|
Repeat the above pattern for each category found in the checks array.
|
package/skills/install/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plastic-install
|
|
3
|
-
description: 'Use when initializing Plastic globally (~/.plastic/) or locally in a project, or to re-install/repair a broken installation.
|
|
3
|
+
description: 'Use when initializing Plastic globally (~/.plastic/) or locally in a project, or to re-install/repair a broken installation. The package pin selects the channel (@latest, @beta, @alpha; the channel flags were removed in 2.0). First install defaults to @latest (stable); reinstalls match the already-installed channel. Global install is recommended: it creates the global intent store as a git-backed repository. Local install creates .plastic/ in the current project for testing.'
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -16,8 +16,10 @@ user-invocable: true
|
|
|
16
16
|
|
|
17
17
|
If Plastic is installed, derive `<channel>` from `~/.plastic/VERSION`: a version containing
|
|
18
18
|
`-alpha` means `@alpha`, `-beta` means `@beta`, otherwise `@latest`. If not installed
|
|
19
|
-
(first install), default to `@latest`.
|
|
20
|
-
|
|
19
|
+
(first install), default to `@latest`. To change channel, pin the package instead of
|
|
20
|
+
passing a flag: `npx -y @zalom/plastic@alpha install --claude` (or a version such as
|
|
21
|
+
`@2.0.0-alpha.1`); the `--alpha`, `--beta`, and `--latest` flags were removed in 2.0
|
|
22
|
+
(intent 310) because they never selected a package.
|
|
21
23
|
|
|
22
24
|
## Re-install / repair
|
|
23
25
|
|
|
@@ -31,13 +33,13 @@ npx -y @zalom/plastic@<channel> install --reinstall --claude
|
|
|
31
33
|
|
|
32
34
|
Then **run `/plastic-doctor`** and report what it found.
|
|
33
35
|
|
|
34
|
-
##
|
|
36
|
+
## Channels
|
|
35
37
|
|
|
36
|
-
|
|
|
37
|
-
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
38
|
+
| Package | Channel |
|
|
39
|
+
|---------|---------|
|
|
40
|
+
| `@zalom/plastic@latest` | stable (default on a first install) |
|
|
41
|
+
| `@zalom/plastic@beta` | beta |
|
|
42
|
+
| `@zalom/plastic@alpha` | alpha; `npx -y @zalom/plastic@alpha install --claude` is the 2.0 alpha path |
|
|
41
43
|
|
|
42
44
|
When invoked from within Claude Code (re-install or channel switch), the skill
|
|
43
45
|
runs the appropriate npx command:
|
|
@@ -1,103 +1,154 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plastic-intent-continuing
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
The front door for resuming work. Use when the user says "continue", "resume", "pick up
|
|
5
|
+
where we left off", "where was I", "what should I work on", names a specific intent to
|
|
6
|
+
resume (by id or description, or `--intent {id}`), or names a roadmap or delivery batch to
|
|
7
|
+
resume (`--roadmap {slug}`, "where is the roadmap", "where did that batch land"). Presents
|
|
8
|
+
state and resumes at the last delivered stage; it never asks auto or guided, never boots
|
|
9
|
+
(the SessionStart hook owns boot), and never drives work autonomously (plastic-auto does).
|
|
10
|
+
Absorbs the former continuing, project-continuing, and roadmap-continuing skills and the
|
|
11
|
+
read half of the former intent-starting skill (intent 304).
|
|
10
12
|
user-invocable: true
|
|
11
13
|
---
|
|
12
14
|
|
|
13
|
-
# Continuing
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
**Boot is not this skill's job.**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
15
|
+
# Continuing: the front door for resuming work
|
|
16
|
+
|
|
17
|
+
One skill with three routes. It reads state and presents it; the work itself continues in
|
|
18
|
+
whatever mode the session is in (direct by default, `plastic-auto` when the owner says auto).
|
|
19
|
+
There is no lock to take and no mode to ask here: locks exist only for auto teams, and the
|
|
20
|
+
mode is the owner's word, not a question this skill puts.
|
|
21
|
+
|
|
22
|
+
**Boot is not this skill's job.** `hook-session-start` runs on every session start: the core
|
|
23
|
+
health check (`doctor --core`), `PLASTIC.md` and store or project state, the
|
|
24
|
+
`Plastic Core loaded - v{version}` banner. By the time this skill runs, core is loaded and
|
|
25
|
+
healthy or the banner already warned.
|
|
26
|
+
|
|
27
|
+
## Route
|
|
28
|
+
|
|
29
|
+
| Args or context | Route |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `--intent {id}`, or the user names one specific intent to resume (by id or description) | Intent route (below) |
|
|
32
|
+
| `--roadmap {slug}`, or the user asks to continue or resume a roadmap or delivery batch | Roadmap route (below) |
|
|
33
|
+
| bare "continue", "resume", "what should I work on", or no target (the default) | Project route (below) |
|
|
34
|
+
|
|
35
|
+
State the chosen route in one line before doing anything ("Landing on the project board: no
|
|
36
|
+
specific intent or roadmap named.").
|
|
37
|
+
|
|
38
|
+
## Determine store
|
|
39
|
+
|
|
40
|
+
1. A project store under `~/.plastic/projects/{slug}/` whose registered path in
|
|
41
|
+
`~/.plastic/projects.yml` matches the working directory means project mode; the
|
|
42
|
+
SessionStart hook already detected this, the slug scopes the reads below.
|
|
43
|
+
2. Otherwise the global store, `~/.plastic/store/`.
|
|
44
|
+
3. Neither exists: announce "No Plastic store found. Run /plastic-install." and stop.
|
|
45
|
+
|
|
46
|
+
## Project route: land on the board
|
|
47
|
+
|
|
48
|
+
Land on the Markdown board through the `plastic-dashboard` skill; rendering belongs there.
|
|
49
|
+
Run the data payload and fill the matching template:
|
|
50
|
+
- project loaded: `ruby ~/.plastic/scripts/dashboard.rb project <slug> --data`
|
|
51
|
+
- otherwise (the global fallback): `ruby ~/.plastic/scripts/dashboard.rb continue --data`
|
|
52
|
+
|
|
53
|
+
Fill the template from `plastic-dashboard`'s `templates/` and present the filled Markdown in
|
|
54
|
+
your reply, every time: tool-call stdout and hook context are invisible to the user. Read
|
|
55
|
+
`references/board-fill.md` for the fill mechanics and the store-health line when filling the
|
|
56
|
+
board. The board load runs the scoped store check (`doctor --store <scope>`); its result
|
|
57
|
+
arrives in the payload as `store_health` and is shown as one line of data, never a blocker.
|
|
58
|
+
|
|
59
|
+
Priority order on the board: active intents first, then project context (governing plus
|
|
60
|
+
tactical intents in a registered project), then stale future intents for triage, then fresh
|
|
61
|
+
future intents as next work. A future intent older than `stale_threshold_days` (default 3) is
|
|
62
|
+
surfaced for triage without action: activate, abandon, or leave. Activating moves it to
|
|
63
|
+
`## Active` in `INDEX.md` and auto-commits. The board's ranked next-work order is computed by
|
|
64
|
+
`dashboard.rb`; cite the rule names only (Effort, Value, Flags, Override, Caps) and read
|
|
65
|
+
`plastic-dashboard`'s `references/classification.md` for their definitions.
|
|
66
|
+
|
|
67
|
+
When the tier root (the directory holding `INDEX.md`) has a mid-flight roadmap
|
|
68
|
+
(`ruby ~/.plastic/scripts/roadmap-next --roadmaps-dir <root>/roadmaps` reports a `state`
|
|
69
|
+
other than `none`), say so in one line and offer the roadmap route; the board still presents
|
|
70
|
+
project state and stops.
|
|
71
|
+
|
|
72
|
+
Then stop: "here is the state, what next?". Do not start executing work. When the user names
|
|
73
|
+
an intent, take the intent route.
|
|
74
|
+
|
|
75
|
+
## Intent route: resume one intent from its ledger
|
|
76
|
+
|
|
77
|
+
QMD-first when the intent is named by description: run
|
|
78
|
+
`ruby ~/.plastic/scripts/qmd-sync search "<terms>"` to find the candidate, then open the
|
|
79
|
+
authoritative intent file. The command is a no-op when QMD is absent; fall back to
|
|
80
|
+
`INDEX.md`.
|
|
81
|
+
|
|
82
|
+
If the intent is terminal (`## Completed` or `## Abandoned` in `INDEX.md`): print the
|
|
83
|
+
intent screen (Status shows the terminal section, Next is empty), summarize its
|
|
84
|
+
`outcome.md`, and ask what is next; never reopen it.
|
|
85
|
+
|
|
86
|
+
For a live intent's directory:
|
|
87
|
+
|
|
88
|
+
1. **Read `savepoint.md` first.** It is a deterministic, append-only ledger, one line per
|
|
89
|
+
event, newest at the bottom: `{utc-iso8601} {Stage} {milestone}`. Classify the stage
|
|
90
|
+
from the last line alone (the table in `references/boarding-matrix.md`, read when
|
|
91
|
+
classifying), then verify only that line's artifact is real (sentinel-aware:
|
|
92
|
+
`Savepoint.stage_file_present?`). Do not re-probe every lifecycle file.
|
|
93
|
+
2. **Stale ledger.** When the last line disagrees with the files on disk, rebuild the ledger from
|
|
94
|
+
disk and note the correction. A rebuilt ledger is the file-landing skeleton, which still
|
|
95
|
+
pins the stage:
|
|
78
96
|
```bash
|
|
79
|
-
ruby -r ~/.plastic/scripts/lib/
|
|
97
|
+
ruby -r ~/.plastic/scripts/lib/savepoint -e 'Savepoint.rebuild_savepoint("<intent_dir>")'
|
|
80
98
|
```
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
3. **Read the hand-off.** The newest `~/.plastic/store/.sessions/<day>/handoff--*.md` (today,
|
|
100
|
+
else the newest prior day) is the prior session's own account of where things stand; read
|
|
101
|
+
it after the ledger, never instead of it.
|
|
102
|
+
4. **Derive the next step:** the first unchecked item in `checklist.md` when it exists, else
|
|
103
|
+
the next thing the stage needs (see the matrix). The newest `## Insights` entry supplies
|
|
104
|
+
the human-readable context; an entry marked `(autonomous)` means an auto team was
|
|
105
|
+
delivering it, so say so and offer to hand back to `plastic-auto`.
|
|
106
|
+
5. **Print the report screen as the first thing in the reply, then continue at that stage.**
|
|
107
|
+
The screen must open the message with nothing before it. On Claude Code, a fail-open
|
|
108
|
+
`MessageDisplay` hook recognizes a reply that opens this way and substitutes a styled ANSI
|
|
109
|
+
rendering for it there; the transcript and every other harness keep exactly this plain
|
|
110
|
+
form. For "where are we" on one named intent, run
|
|
111
|
+
`ruby ~/.plastic/scripts/report-screen state <intent_dir>` and print its output as it is:
|
|
112
|
+
the title, the field table, the `Changed` row, and the Steps table come from the record,
|
|
113
|
+
never by eye. For "where are we" with no intent named, run
|
|
114
|
+
`ruby ~/.plastic/scripts/report-screen state --all <store_root>` for the roster across every
|
|
115
|
+
in-delivery intent. Route "why did X take so long" to
|
|
116
|
+
`ruby ~/.plastic/scripts/report-screen delay <intent_dir>` instead - every verb prints the
|
|
117
|
+
same plain screen on any harness, painted only where the harness supports it, with no
|
|
118
|
+
branching on harness name. Under the `state` screen
|
|
119
|
+
write **What this means** as two to four bullets in plain words (what the intent is for,
|
|
120
|
+
what has landed, what is left, any defect named by step), then close with **needs input:**
|
|
121
|
+
naming the first open step. Then continue the work in the
|
|
122
|
+
session's current mode. In auto mode the running team already holds the delivery lock; if a
|
|
123
|
+
lock is held by a session that is gone, the `plastic-doctor` skill's lock section repairs or
|
|
124
|
+
reclaims it.
|
|
125
|
+
|
|
126
|
+
## Roadmap route: resume the mid-flight roadmap
|
|
127
|
+
|
|
128
|
+
1. Resolve the tier root (project or global) and run the shared reader in which mode:
|
|
129
|
+
```bash
|
|
130
|
+
ruby ~/.plastic/scripts/roadmap-next --roadmaps-dir <root>/roadmaps --which
|
|
94
131
|
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
132
|
+
Read `state` and the winning `roadmap`. A `tie` lists `tie_candidates` to present side by
|
|
133
|
+
side and let the user pick; never pick silently. The reader ranks liveness the way
|
|
134
|
+
`references/liveness-ranking.md` describes (read it when a ranking needs explaining): a
|
|
135
|
+
`delivering` or `blocked` entry wins, else the newest ledger or `## Log` timestamp.
|
|
136
|
+
`roadmaps/<slug>.savepoint.md` is a derived signal read here, never a status field;
|
|
137
|
+
`INDEX.md` stays the sole status writer.
|
|
138
|
+
2. **Present state:** the roadmap's `## Goal`, the current batch with each entry's mirrored
|
|
139
|
+
status, the ledger's newest line beside the newest `## Log` line. Read
|
|
140
|
+
`../plastic-conventions/references/roadmaps.md` for the file format and the status-mirror
|
|
141
|
+
rule when a roadmap file needs interpreting.
|
|
142
|
+
3. Then continue with the next dispatchable entry in the session's mode: direct work on it,
|
|
143
|
+
or `plastic-auto` when the owner says auto. The coordinator that drives a batch appends
|
|
144
|
+
to `roadmaps/<slug>.savepoint.md` at its dispatch, merge, park, and handoff points with
|
|
145
|
+
`ruby ~/.plastic/scripts/roadmap-savepoint append`; this skill only reads it.
|
|
99
146
|
|
|
100
147
|
## References
|
|
101
148
|
|
|
102
|
-
|
|
103
|
-
|
|
149
|
+
| Trigger | Read |
|
|
150
|
+
|---|---|
|
|
151
|
+
| Filling the board on the project route | `references/board-fill.md` |
|
|
152
|
+
| Classifying the stage from the ledger's last line | `references/boarding-matrix.md` |
|
|
153
|
+
| Explaining why one roadmap ranked above another | `references/liveness-ranking.md` |
|
|
154
|
+
| Saving or restoring context across a long session, or debugging a resume | `references/context-management.md` |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Boarding matrix: which stage a resume lands at
|
|
2
|
+
|
|
3
|
+
The stage is derived from `savepoint.md`'s last line plus the real artifacts on disk.
|
|
4
|
+
Classify from the last line alone, then verify only that line's artifact is real
|
|
5
|
+
(sentinel-aware). When the ledger is stale, rebuild it from disk and note it.
|
|
6
|
+
|
|
7
|
+
| savepoint last line | latest delivered | lands at | continue with |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `What {id}--{slug}.md` (born) | What | **Why** | the thinking conversation (`plastic-intent-speccing`) or direct work |
|
|
10
|
+
| `Why started` (spec still sentinel) | What | **Why** | continue the conversation; rulings land as insights |
|
|
11
|
+
| `Why spec.md created` | Why | **How** | the action files, `plan.md`, `checklist.md` |
|
|
12
|
+
| `How started` / `How plan.md created` | (How in progress) | **How** | finish `plan.md` and `checklist.md` |
|
|
13
|
+
| `How checklist.md created` / `Exec started` | How | **Exec** | do the work, check off the checklist |
|
|
14
|
+
| `Exec outcome.md created` | Exec | **ready to complete** | the ending procedure (`plastic-intent-ending`) |
|
|
15
|
+
| `Done delivered` / `Done abandoned` | terminal | **report only** | immutable; ask what is next |
|
|
16
|
+
|
|
17
|
+
## Per-stage behaviour (what "continue" means)
|
|
18
|
+
|
|
19
|
+
- **Why**: continue the conversation, or run the work directly when the request is already
|
|
20
|
+
clear; every ruling is recorded as it lands.
|
|
21
|
+
- **How**: write or finish the action files, `plan.md`, and `checklist.md`.
|
|
22
|
+
- **Exec**: verify what is delivered, then continue (or restart) the delivery or research.
|
|
23
|
+
The first unchecked `checklist.md` item is the next step; the newest `## Insights` entry
|
|
24
|
+
supplies the context.
|
|
25
|
+
- **ready to complete**: `outcome.md` is real; run the ending procedure.
|
|
26
|
+
- **Done**: terminal. Report the outcome, ask what is next. Never reopen; `INDEX.md` is
|
|
27
|
+
authoritative.
|
|
28
|
+
|
|
29
|
+
## Notes
|
|
30
|
+
|
|
31
|
+
- A Plastic 1.x ledger may carry a `Tier <letter>` line under the `Why spec.md created` line
|
|
32
|
+
(the intent tier was removed in 2.0, intent 304). It is inert: skip it when classifying.
|
|
33
|
+
- An `## Insights` entry marked `(autonomous)` means an auto team was delivering the intent;
|
|
34
|
+
say so and offer to hand back to `plastic-auto`.
|
|
@@ -19,10 +19,10 @@ step looks stale):
|
|
|
19
19
|
(see `SKILL.md`'s `## Conditional Ledger-Resume` for the full state table).
|
|
20
20
|
2. Confirm the artifact that line implies (`plan.md`, `checklist.md`, `outcome.md`, ...) is
|
|
21
21
|
present and non-empty on disk.
|
|
22
|
-
3. If the two disagree, the ledger
|
|
23
|
-
`ruby -r ~/.plastic/scripts/lib/
|
|
22
|
+
3. If the two disagree, the ledger is stale: rebuild it rather than hand-editing:
|
|
23
|
+
`ruby -r ~/.plastic/scripts/lib/savepoint -e 'Savepoint.rebuild_savepoint("<intent_dir>")'`
|
|
24
24
|
4. Re-read the rebuilt last line and re-derive the next step from `checklist.md`'s first
|
|
25
25
|
unchecked item.
|
|
26
26
|
|
|
27
27
|
The general "land on the board / priority order / stale future intents" flow now lives in
|
|
28
|
-
`plastic-
|
|
28
|
+
`plastic-intent-continuing`; this file no longer duplicates it.
|
|
@@ -12,7 +12,7 @@ user-invocable: true
|
|
|
12
12
|
- User explicitly says "new intent" or "create intent"
|
|
13
13
|
- An agent discovers work needed during implementation
|
|
14
14
|
|
|
15
|
-
## Determine
|
|
15
|
+
## Determine the store
|
|
16
16
|
|
|
17
17
|
**Global intent** (strategic): created when working outside a registered project, or when the user expresses a high-level goal. Stored in `~/.plastic/store/`.
|
|
18
18
|
|
|
@@ -79,7 +79,7 @@ rule and the tool.
|
|
|
79
79
|
frontmatter edge and reproject. Links are decided by context influence (a `chain` edge has a high
|
|
80
80
|
bar: the candidate's context must materially help deliver this intent), not by shared files or a
|
|
81
81
|
similarity score. To gather candidates with their context and record an edge, use the
|
|
82
|
-
`
|
|
82
|
+
`scripts/link-suggest` and `scripts/project-links`.
|
|
83
83
|
|
|
84
84
|
Read `../plastic-conventions/references/knowledge-graph.md` for the full linking doctrine: the
|
|
85
85
|
tiers of influence, sources versus chain, and how the `## Links` projection is derived. This path
|
|
@@ -78,4 +78,4 @@ State is derived from what exists, not from what's declared.
|
|
|
78
78
|
|
|
79
79
|
The intent file is born complete with all five sanctioned `##` sections; the lifecycle files (`spec.md`/`plan.md`/`checklist.md`/`outcome.md`) are sentinel placeholders that read as "stage not reached" until an agent fills them and deletes the `<!-- plastic:placeholder -->` first line.
|
|
80
80
|
|
|
81
|
-
Always scaffold through `new-intent` (or this skill). Never hand-author intent files:
|
|
81
|
+
Always scaffold through `new-intent` (or this skill). Never hand-author intent files: `new-intent` validates the file it writes (`scripts/validate-intent`) and `end-intent` checks it again at close, and hand-authoring is the bypass this contract is designed to remove.
|