@zalom/plastic 1.7.1 → 1.9.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.
- package/PLASTIC.md +75 -535
- package/README.md +3 -2
- package/agents/plastic-intent-curator.md +2 -2
- package/deprecations.yml +10 -2
- package/hooks/{links-gate → edit-gates} +1 -1
- package/hooks/hooks.json +4 -44
- package/hooks/power-tools +8 -0
- package/package.json +1 -2
- package/scripts/codex-hook +17 -22
- package/scripts/doctor.rb +688 -186
- package/scripts/end-intent +65 -22
- package/scripts/hook-code-gate +13 -28
- package/scripts/hook-create-gate +10 -57
- package/scripts/hook-edit-gates +58 -0
- package/scripts/hook-links-gate +8 -31
- package/scripts/hook-lock-gate +13 -58
- package/scripts/hook-power-tools +38 -0
- package/scripts/hook-savepoint-pre +8 -11
- package/scripts/lib/bridge.rb +2 -2
- package/scripts/lib/edit_gates.rb +342 -0
- package/scripts/lib/hook_registry.rb +61 -29
- package/scripts/lib/installer_core.rb +100 -18
- package/scripts/lib/outcome_guard.rb +38 -0
- package/scripts/lib/qmd_hook.rb +21 -41
- package/scripts/lib/qmd_sync.rb +0 -15
- package/scripts/lib/revisions_writer.rb +1 -1
- package/scripts/maintenance-run +56 -2
- package/scripts/restore-intent-v1 +16 -11
- package/skills/auto/SKILL.md +15 -4
- package/skills/auto/evals/evals.json +2 -2
- package/skills/conventions/SKILL.md +31 -0
- package/skills/conventions/references/completion-and-done.md +40 -0
- package/skills/conventions/references/gates-and-enforcement.md +23 -0
- package/skills/conventions/references/knowledge-graph.md +47 -0
- package/skills/conventions/references/lifecycle-and-savepoints.md +11 -0
- package/skills/conventions/references/locks-and-worktrees.md +113 -0
- package/skills/conventions/references/maintenance-and-revisions.md +170 -0
- package/skills/conventions/references/roadmaps.md +44 -0
- package/skills/conventions/references/tiers-and-dispatch.md +134 -0
- package/skills/doctor/SKILL.md +59 -19
- package/skills/intent-brainstorming/SKILL.md +4 -0
- package/skills/intent-continuing/SKILL.md +4 -0
- package/skills/intent-creating/SKILL.md +7 -2
- package/skills/intent-ending/SKILL.md +20 -6
- package/skills/intent-executing/SKILL.md +10 -0
- package/skills/intent-linking/SKILL.md +4 -0
- package/skills/intent-locking/SKILL.md +4 -0
- package/skills/intent-planning/SKILL.md +7 -0
- package/skills/intent-savepoint/SKILL.md +4 -0
- package/skills/intent-speccing/SKILL.md +4 -0
- package/skills/intent-starting/SKILL.md +10 -0
- package/skills/project-creating/references/project-scaffolding.md +2 -2
- package/skills/roadmap/SKILL.md +4 -0
- package/skills/roadmap-continuing/SKILL.md +4 -0
- package/skills/skill-creating/SKILL.md +3 -0
- package/skills/skill-creating/references/defaults-first.md +23 -0
- package/skills/skill-creating/references/hooks.md +4 -1
- package/skills/store-curating/SKILL.md +8 -0
- package/skills/store-indexing/SKILL.md +8 -0
- package/skills/tutorial/references/track-2-auto.md +2 -3
- package/templates/agents.md +8 -0
- package/PLASTIC-reference.md +0 -138
- package/hooks/code-gate +0 -27
- package/hooks/create-gate +0 -3
- package/hooks/lock-gate +0 -21
- package/hooks/qmd-search +0 -8
- package/hooks/retrieval-gate +0 -10
- package/hooks/savepoint-pre +0 -10
- package/scripts/hook-qmd-search +0 -44
- package/scripts/hook-retrieval-gate +0 -148
- package/scripts/lib/legacy_bookend_amnesty.rb +0 -35
- package/scripts/lib/retrieval_gate.rb +0 -211
package/skills/doctor/SKILL.md
CHANGED
|
@@ -16,36 +16,67 @@ Doctor has three scopes. Pick the right one for the situation:
|
|
|
16
16
|
| Store check | `--store [global\|<slug>]` | Dashboard load, `plastic-project-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
|
-
### `--core` (binary,
|
|
19
|
+
### `--core` (binary, operational-readiness only)
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Checks ONLY that Plastic is loaded and ready for work: agent registration (skills,
|
|
22
|
+
subagents, hooks/harnesses present and registered), core files (manifest-backed
|
|
23
|
+
presence/hash checks, excluding `agent_model_drift`, which is a non-boot
|
|
24
|
+
config-honoring check, never run at core), manifest sync (global + agent manifest
|
|
25
|
+
SHA256), every registered project's path resolving to a real, existing directory,
|
|
26
|
+
and the global store being reachable (`INDEX.md` present; no orphan/ghost content
|
|
27
|
+
scanning). Result is binary: exit 0 on pass, non-zero on error. It never produces
|
|
28
|
+
warnings, and it never scans store content.
|
|
29
|
+
|
|
30
|
+
It checks two install manifests as part of core files and manifest sync:
|
|
23
31
|
|
|
24
32
|
- `~/.plastic/manifest.json` (global manifest, covers PLASTIC.md and global scripts)
|
|
25
33
|
- `~/.claude/plastic/manifest.json` (agent-side manifest, covers agent scripts and hooks)
|
|
26
34
|
|
|
27
|
-
Each manifest maps a file path to its SHA256.
|
|
28
|
-
are registered, scripts are present and executable, and the installed version
|
|
29
|
-
matches. Result is binary: exit 0 on pass, non-zero on error. It never produces
|
|
30
|
-
warnings.
|
|
35
|
+
Each manifest maps a file path to its SHA256.
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
**On failure**, the report states this guided route, in order:
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
1. Run `plastic doctor --fix` (the Fix all / Select individually / Skip router from
|
|
40
|
+
Step 4-5 below).
|
|
41
|
+
2. If that does not resolve it, roll back to the last known-good version via
|
|
42
|
+
`plastic-rollback` (restores from the local, append-only `versions.json` ledger of
|
|
43
|
+
versions actually run).
|
|
44
|
+
3. Optionally report the issue via the feedback command (`scripts/feedback-report`,
|
|
45
|
+
backing the `plastic-feedback` skill), which composes a local report plus a
|
|
46
|
+
prefilled GitHub issue URL and never holds a credential or contacts GitHub
|
|
47
|
+
directly.
|
|
36
48
|
|
|
37
|
-
|
|
38
|
-
- `global`: checks only the global store
|
|
39
|
-
- A project slug (e.g. `--store plastic`): checks only that project's store
|
|
49
|
+
### `--store [global|<slug>]`
|
|
40
50
|
|
|
41
|
-
|
|
42
|
-
|
|
51
|
+
Checks the operations Plastic itself depends on in one store: QMD search reachability (scoped
|
|
52
|
+
to that store's own collection; global uses `plastic-global`, a project slug uses
|
|
53
|
+
`plastic-<slug>`), sources/chain resolution, cross-store resolution, INDEX parsing, and links
|
|
54
|
+
projection. A project slug also checks tool readiness (Serena, Enola): each is a pass whether
|
|
55
|
+
present or absent, present naming it available, absent noting it as an optional integration
|
|
56
|
+
never installed by doctor. Scope options:
|
|
57
|
+
|
|
58
|
+
- No argument (`:all`): checks all stores (global and all project stores), QMD reachability
|
|
59
|
+
unscoped across every collection.
|
|
60
|
+
- `global`: checks only the global store, QMD scoped to `plastic-global`, no tool-readiness
|
|
61
|
+
checks (code-navigation tools have no meaning against the global store).
|
|
62
|
+
- A project slug (e.g. `--store plastic`): checks only that project's store, QMD scoped to
|
|
63
|
+
`plastic-<slug>`, plus Serena/Enola readiness for that project.
|
|
64
|
+
|
|
65
|
+
Produces three-state results (pass / warn / fail) and is run per-scope at dashboard load time:
|
|
66
|
+
the global board uses `--store global`, a project board uses `--store <slug>`. **This IS the
|
|
67
|
+
load-time full project check** named by 219's doctrine: no separate mechanism exists or is
|
|
68
|
+
needed, since a project slug's scan already carries every per-project finding scoped to that
|
|
69
|
+
project alone.
|
|
43
70
|
|
|
44
71
|
### Full doctor (no flag)
|
|
45
72
|
|
|
46
|
-
Runs
|
|
47
|
-
|
|
48
|
-
|
|
73
|
+
Runs the install-wide surface: agent registration, core files (including config-honoring
|
|
74
|
+
drift), manifest sync is core-only and not part of this run, deprecation checks, config-ask
|
|
75
|
+
checks, install-integrity checks, skill-lint (advisory), QMD reachability (unscoped, every
|
|
76
|
+
collection), and the global store's own conventions/done-signals content. **Never carries a
|
|
77
|
+
per-project finding**; that is `--store <slug>`'s job (see above). This is what
|
|
78
|
+
`/plastic-doctor` invokes, and it also runs automatically after every `plastic-update`
|
|
79
|
+
(informational, does not block or revert the update).
|
|
49
80
|
|
|
50
81
|
## When to Use
|
|
51
82
|
|
|
@@ -54,6 +85,10 @@ does not block or revert the update).
|
|
|
54
85
|
- When hooks aren't firing, skills aren't loading, or something seems broken
|
|
55
86
|
- When the user says "check plastic", "diagnose", "what's wrong with plastic"
|
|
56
87
|
|
|
88
|
+
Read `../plastic-conventions/references/gates-and-enforcement.md` for the transition-gate
|
|
89
|
+
mechanics, the audited escape, and gate logging before diagnosing a stuck or misbehaving gate.
|
|
90
|
+
This path resolves relative to this skill's own installed directory.
|
|
91
|
+
|
|
57
92
|
## Procedure
|
|
58
93
|
|
|
59
94
|
### Step 1: Run the diagnostic script
|
|
@@ -125,7 +160,8 @@ Use the `fix_hint` value to determine the correct action:
|
|
|
125
160
|
| "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 |
|
|
126
161
|
| "Run: provision-project-store {slug}" | Run `provision-project-store <slug>` (or invoke the `plastic-store-provisioning` skill) to create the missing store |
|
|
127
162
|
| "Re-run installer" | Run `npx -y @zalom/plastic@<channel> install --agent <agent>` (channel: -alpha->@alpha, -beta->@beta, else @latest) |
|
|
128
|
-
| "
|
|
163
|
+
| "Run the Plastic installer to bootstrap the store" | Run `npx -y @zalom/plastic@<channel> install --agent <agent>` (channel: -alpha->@alpha, -beta->@beta, else @latest) to restore the global store's plastic_home directory or INDEX.md |
|
|
164
|
+
| "Dispatch plastic-store-curating ... revisions.md ..." | Invoke the `plastic-store-curating` (or the agent) to 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. |
|
|
129
165
|
| "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) |
|
|
130
166
|
|
|
131
167
|
For fixes the agent cannot handle automatically, explain what the user needs
|
|
@@ -133,6 +169,10 @@ to do manually. The `revisions.md` remedy is curator-applied (a move-and-record
|
|
|
133
169
|
relocation, not a mechanical edit) and stays human-gated by the Step 4
|
|
134
170
|
Fix / Select / Skip prompt.
|
|
135
171
|
|
|
172
|
+
Read `../plastic-conventions/references/maintenance-and-revisions.md` for WORK versus
|
|
173
|
+
MAINTENANCE, the `revisions.md` move-and-record contract, and the violation-tag catalog behind
|
|
174
|
+
the `revisions.md` remedy above.
|
|
175
|
+
|
|
136
176
|
### Step 6: Verify
|
|
137
177
|
|
|
138
178
|
After applying fixes, re-run the diagnostic script:
|
|
@@ -106,6 +106,10 @@ Do not author spec.md here.
|
|
|
106
106
|
- **Produces:** the enriched Why (`## Context`, `### Decisions`, one `## Insights` entry per ruling).
|
|
107
107
|
- **Next:** /plastic-intent-speccing consolidates the enriched Why into spec.md.
|
|
108
108
|
|
|
109
|
+
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
110
|
+
report-home contract this handoff relies on. This path resolves relative to this skill's own
|
|
111
|
+
installed directory.
|
|
112
|
+
|
|
109
113
|
## Key Principles
|
|
110
114
|
|
|
111
115
|
- **One question at a time** - Don't overwhelm with multiple questions
|
|
@@ -47,6 +47,10 @@ scanning the store with grep/Read run `ruby ~/.plastic/scripts/qmd-sync search "
|
|
|
47
47
|
surface the candidate intent, then open the authoritative intent file for the hit you resume. The
|
|
48
48
|
command is a no-op when QMD is absent, so fall back to the existing INDEX.md / file scan.
|
|
49
49
|
|
|
50
|
+
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
51
|
+
report-home contract behind the resume below. This path resolves relative to this skill's own
|
|
52
|
+
installed directory.
|
|
53
|
+
|
|
50
54
|
For that intent's directory:
|
|
51
55
|
|
|
52
56
|
1. **Read `savepoint.md` FIRST (intent 81).** It is a deterministic, append-only ledger
|
|
@@ -71,8 +71,9 @@ Having a "parent" in mind does NOT automatically mean branch. Choose by meaning:
|
|
|
71
71
|
|
|
72
72
|
When a branch intent exists because a late ruling arrived AFTER its parent was already
|
|
73
73
|
completed (the owner's late-ruling rule), the parent is restored to v1 via
|
|
74
|
-
`scripts/restore-intent-v1`, never by a hand-run `git checkout`/revert. See
|
|
75
|
-
|
|
74
|
+
`scripts/restore-intent-v1`, never by a hand-run `git checkout`/revert. See
|
|
75
|
+
`plastic-conventions > references/maintenance-and-revisions.md`, WORK vs MAINTENANCE, for the
|
|
76
|
+
rule and the tool.
|
|
76
77
|
|
|
77
78
|
`## Links` is a DERIVED view of `sources`/`chain`. Never hand-write a `## Links` line; add the
|
|
78
79
|
frontmatter edge and reproject. Links are decided by context influence (a `chain` edge has a high
|
|
@@ -80,6 +81,10 @@ bar: the candidate's context must materially help deliver this intent), not by s
|
|
|
80
81
|
similarity score. To gather candidates with their context and record an edge, use the
|
|
81
82
|
`plastic-intent-linking` skill and `scripts/link-suggest`.
|
|
82
83
|
|
|
84
|
+
Read `../plastic-conventions/references/knowledge-graph.md` for the full linking doctrine: the
|
|
85
|
+
tiers of influence, sources versus chain, and how the `## Links` projection is derived. This path
|
|
86
|
+
resolves relative to this skill's own installed directory.
|
|
87
|
+
|
|
83
88
|
### 3. Determine Intent Properties
|
|
84
89
|
|
|
85
90
|
Ask or infer from context:
|
|
@@ -15,6 +15,10 @@ curator path, and releasing all call this skill (or its backing script,
|
|
|
15
15
|
prose three times. `abandoned` is the SAME procedure as `delivered`, not a
|
|
16
16
|
failure branch: only outcome.md content and the INDEX section differ.
|
|
17
17
|
|
|
18
|
+
Read `../plastic-conventions/references/completion-and-done.md` for what "intent done" means and
|
|
19
|
+
the End-stage tail behind the steps below. This path resolves relative to this skill's own
|
|
20
|
+
installed directory.
|
|
21
|
+
|
|
18
22
|
## The 8 steps (0-7)
|
|
19
23
|
|
|
20
24
|
| # | Step | Who does it |
|
|
@@ -52,9 +56,18 @@ for orchestrator-owned or completion-tracking items.
|
|
|
52
56
|
the gate.
|
|
53
57
|
2. Confirm every acceptance criterion in spec.md is verifiable (tests pass,
|
|
54
58
|
or the manual check described in its HOW line was actually run).
|
|
55
|
-
3.
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
3. The structure gate (intent 222) now enforces this: `scripts/end-intent`
|
|
60
|
+
refuses with exit 6 and names the exact unchecked box (or any other
|
|
61
|
+
structural gap: intent-file validity, lifecycle-artifact presence,
|
|
62
|
+
`## Links` projection). On a refusal, fix via the OWNING tool, never a
|
|
63
|
+
hand edit of the check's own output:
|
|
64
|
+
- checklist/outcome content - finish it yourself, the same as before.
|
|
65
|
+
- links projection - `scripts/project-links --intent <id> --apply` via
|
|
66
|
+
`maintenance-run`.
|
|
67
|
+
- a savepoint issue - advisory only (WARN, never blocks): run
|
|
68
|
+
`plastic-intent-savepoint` to rebuild via `Bridge.rebuild_savepoint` if
|
|
69
|
+
you want it clean, but it never refuses the close on its own.
|
|
70
|
+
Then re-run `scripts/end-intent`.
|
|
58
71
|
|
|
59
72
|
### Step 1-5. Run `scripts/end-intent`
|
|
60
73
|
|
|
@@ -78,9 +91,10 @@ ruby ~/.plastic/scripts/end-intent \
|
|
|
78
91
|
--index-note "<rich Completed/Abandoned entry description>"
|
|
79
92
|
```
|
|
80
93
|
|
|
81
|
-
This does all of steps 1-5 in order: guards outcome.md (
|
|
82
|
-
still-placeholder
|
|
83
|
-
|
|
94
|
+
This does all of steps 1-5 in order: guards outcome.md (a missing or
|
|
95
|
+
still-placeholder file is caught by the structure gate first and exits 6; a
|
|
96
|
+
wrong-disposition file exits 2; either way it authors nothing), stamps the
|
|
97
|
+
intent file's `## Outcome` section, moves the INDEX.md
|
|
84
98
|
line from `## Active` to `## Completed` or `## Abandoned` (dated today,
|
|
85
99
|
idempotent, accepting either a real em dash or a plain hyphen as the id/
|
|
86
100
|
title separator on read while always emitting the real em dash on write)
|
|
@@ -25,6 +25,10 @@ After syncing, verify the plan's target files exist at the paths plan.md names.
|
|
|
25
25
|
If a named file or directory is missing (renamed or removed upstream), stop and
|
|
26
26
|
report it rather than editing a stale path.
|
|
27
27
|
|
|
28
|
+
Read `../plastic-conventions/references/locks-and-worktrees.md` for delivery isolation: the
|
|
29
|
+
single-owner lock, claims, worktrees, solo mode, and the station ledger, before touching the
|
|
30
|
+
worktree above. This path resolves relative to this skill's own installed directory.
|
|
31
|
+
|
|
28
32
|
## Mode Selection
|
|
29
33
|
|
|
30
34
|
### Check for superpowers first
|
|
@@ -138,6 +142,9 @@ the changed file, the installed output) rather than restating the intended
|
|
|
138
142
|
change. Never present an unverified claim to the owner. If verification
|
|
139
143
|
fails, fix it before the gate, not after.
|
|
140
144
|
|
|
145
|
+
Read `../plastic-conventions/references/gates-and-enforcement.md` for the transition-gate
|
|
146
|
+
mechanics, the audited escape, and gate logging behind every owner gate named here.
|
|
147
|
+
|
|
141
148
|
## Methods report (audits and sweeps)
|
|
142
149
|
|
|
143
150
|
When the work is an audit or a sweep (checking many files or many instances of
|
|
@@ -166,6 +173,9 @@ persisting each ruling with `--stage Exec`.
|
|
|
166
173
|
- **Produces:** code changes, a ticked checklist, and (for audits or sweeps) a methods report in `resources/`.
|
|
167
174
|
- **Next:** intent-ending owns `outcome.md` (see intent 161). This skill's own Update-Intent-and-Complete step above is unchanged by this note.
|
|
168
175
|
|
|
176
|
+
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
177
|
+
report-home contract this handoff relies on.
|
|
178
|
+
|
|
169
179
|
## Model Selection for Subagents
|
|
170
180
|
|
|
171
181
|
Match model to task complexity:
|
|
@@ -26,6 +26,10 @@ Two distinct steps, do not conflate them:
|
|
|
26
26
|
|
|
27
27
|
## The three tiers (by context influence)
|
|
28
28
|
|
|
29
|
+
Read `../plastic-conventions/references/knowledge-graph.md` for the full linking doctrine behind
|
|
30
|
+
these tiers, the sources-versus-chain distinction, and the `## Links` projection. This path
|
|
31
|
+
resolves relative to this skill's own installed directory.
|
|
32
|
+
|
|
29
33
|
- **sources:** the foundational context that shaped this intent's CREATION (a split, an idea born
|
|
30
34
|
during development, a merge). Earns an edge. Decided by origin, never inferred.
|
|
31
35
|
- **chain:** the context that materially helps DELIVER this intent. HIGH bar: only the genuinely
|
|
@@ -12,6 +12,10 @@ session-keyed, liveness is a lease (the owner's hooks refresh the file mtime;
|
|
|
12
12
|
stale means the heartbeat is older than the TTL). The /tmp bridge is only a
|
|
13
13
|
cache; the lock file wins every disagreement.
|
|
14
14
|
|
|
15
|
+
Read `../plastic-conventions/references/locks-and-worktrees.md` for delivery isolation in full:
|
|
16
|
+
the single-owner lock, claims, worktrees, solo mode, and the station ledger behind every verb
|
|
17
|
+
below. This path resolves relative to this skill's own installed directory.
|
|
18
|
+
|
|
15
19
|
## Verbs
|
|
16
20
|
|
|
17
21
|
Run from the project (the intent resolves from this session's bridge), or pass
|
|
@@ -31,6 +31,10 @@ If the spec covers multiple independent subsystems, it should have been broken i
|
|
|
31
31
|
|
|
32
32
|
## Tier shapes
|
|
33
33
|
|
|
34
|
+
Read `../plastic-conventions/references/tiers-and-dispatch.md` for tier sizing and the
|
|
35
|
+
stage-to-agent dispatch rules behind this section. This path resolves relative to this skill's own
|
|
36
|
+
installed directory.
|
|
37
|
+
|
|
34
38
|
Read the spec's stamped `Tier:` line (written by intent-speccing) and pick the action shape it calls for. Every tier produces at least one REAL action file in `actions/`; the tier only changes how many:
|
|
35
39
|
|
|
36
40
|
- **S or M (default):** write ONE consolidated `actions/ACTION_1.md` that carries the whole ordered delivery (the steps plus the exact changes). `plan.md` still holds the overall map and `checklist.md` still mirrors the task list. You may split into a few action files when that reads cleaner, but one real action file is the floor.
|
|
@@ -121,6 +125,9 @@ When collecting owner rulings for `[ORCHESTRATOR]` hard-gate items, read
|
|
|
121
125
|
- **Produces:** `plan.md`, `checklist.md`, and at least one real `actions/ACTION_N.md` (every tier; one consolidated file at S/M, one per task at L).
|
|
122
126
|
- **Next:** /plastic-intent-executing.
|
|
123
127
|
|
|
128
|
+
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
129
|
+
report-home contract this handoff relies on.
|
|
130
|
+
|
|
124
131
|
## Git Commit
|
|
125
132
|
|
|
126
133
|
After writing all artifacts (plan.md, checklist.md, and the actions/ACTION_N.md files), commit to the store:
|
|
@@ -22,6 +22,10 @@ It is **sugar on top of the conventions**, not a source of truth. The gate hook
|
|
|
22
22
|
nothing to save by hand. State is always derivable from files-on-disk; the ledger just lets
|
|
23
23
|
a resuming agent read the cycle's succession from one glance (last line = where we are).
|
|
24
24
|
|
|
25
|
+
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
26
|
+
report-home contract that this ledger feeds. This path resolves relative to this skill's own
|
|
27
|
+
installed directory.
|
|
28
|
+
|
|
25
29
|
## When to Use
|
|
26
30
|
- A PreCompact hook fires, or the user says "save" / "savepoint": verify the ledger is current.
|
|
27
31
|
- Resuming an intent: read the ledger to learn the cycle's succession quickly.
|
|
@@ -47,6 +47,10 @@ not the Transition Gates table row). Writing `plan.md` is what opens the code ga
|
|
|
47
47
|
writing `plan.md` is not this skill's job, that is `plastic-intent-planning`. State this to the user
|
|
48
48
|
at step 6 so the handoff at step 8 is expected, not a surprise.
|
|
49
49
|
|
|
50
|
+
Read `../plastic-conventions/references/lifecycle-and-savepoints.md` for the subagent
|
|
51
|
+
report-home contract behind this handoff. This path resolves relative to this skill's own
|
|
52
|
+
installed directory.
|
|
53
|
+
|
|
50
54
|
## Tier stamp (step 3, convention only)
|
|
51
55
|
|
|
52
56
|
Write `Tier: S|M|L` as the literal first line of the file, above the `# Spec:` heading. This line
|
|
@@ -32,6 +32,10 @@ The lock is non-negotiable and comes before any mutating work. The ACTION-3 lock
|
|
|
32
32
|
enforces it: without a held lock, mutating writes to this active intent's dir are denied with
|
|
33
33
|
"run /plastic-intent-starting to lock and begin".
|
|
34
34
|
|
|
35
|
+
Read `../plastic-conventions/references/locks-and-worktrees.md` for delivery isolation: the
|
|
36
|
+
single-owner lock, claims, worktrees, solo mode, and the station ledger behind everything below.
|
|
37
|
+
This path resolves relative to this skill's own installed directory.
|
|
38
|
+
|
|
35
39
|
1. **Ensure the intent is in INDEX `## Active`.** If it sits in `## Future`, activate it
|
|
36
40
|
(move it to `## Active`, auto-commit) before arming. Creation precedes activation, so a
|
|
37
41
|
brand-new What intent is activated here, then locked.
|
|
@@ -106,12 +110,18 @@ Never re-ask at a later station.
|
|
|
106
110
|
- **auto** → `arm_auto` (lock + auto), then hand off to `plastic-auto`. The auto branch's
|
|
107
111
|
only remaining job is the handoff; `plastic-auto` runs the cycle from here.
|
|
108
112
|
|
|
113
|
+
Read `../plastic-conventions/references/tiers-and-dispatch.md` for tier sizing and the
|
|
114
|
+
stage-to-agent dispatch rules behind the auto branch above.
|
|
115
|
+
|
|
109
116
|
## Board at the latest delivered station
|
|
110
117
|
|
|
111
118
|
The station is derived from `savepoint.md` last line + real artifacts on disk. See
|
|
112
119
|
`references/boarding-matrix.md` for the full table (last line → latest delivered → boards at →
|
|
113
120
|
continue with) and the per-station notes. Summary of what "continue" means per station:
|
|
114
121
|
|
|
122
|
+
Read `../plastic-conventions/references/gates-and-enforcement.md` for the transition-gate
|
|
123
|
+
mechanics, the audited escape, and gate logging that govern moving between the stations below.
|
|
124
|
+
|
|
115
125
|
- **What** → do what What requires (106-expanded), then brainstorm → `spec.md`.
|
|
116
126
|
- **Why** → continue brainstorming → `spec.md`.
|
|
117
127
|
- **How** → continue `plan.md` + `actions/` + `checklist.md`.
|
|
@@ -17,8 +17,8 @@ Create `AGENTS.md` in the project root with:
|
|
|
17
17
|
```markdown
|
|
18
18
|
# <Project Name> — Agent Instructions
|
|
19
19
|
|
|
20
|
-
Read `PLASTIC.md` in `~/.plastic
|
|
21
|
-
Follow it exactly.
|
|
20
|
+
Read `PLASTIC.md` in `~/.plastic/` for the core conventions; deeper doctrine lives in
|
|
21
|
+
the `plastic-conventions` skill's chapters. Follow it exactly.
|
|
22
22
|
|
|
23
23
|
This file is the operating contract for this project. Any agent entering
|
|
24
24
|
this project reads this file first.
|
package/skills/roadmap/SKILL.md
CHANGED
|
@@ -43,6 +43,10 @@ See `references/file-format.md` for the exact entry-line shape, status vocabular
|
|
|
43
43
|
format, and a worked example. See `references/operations.md` for step-by-step mechanics of each
|
|
44
44
|
verb above.
|
|
45
45
|
|
|
46
|
+
Read `../plastic-conventions/references/roadmaps.md` for the roadmap file format, batch
|
|
47
|
+
semantics, and the status-mirror rule that this skill's own file-format reference builds on. This
|
|
48
|
+
path resolves relative to this skill's own installed directory.
|
|
49
|
+
|
|
46
50
|
## Notes
|
|
47
51
|
|
|
48
52
|
- File location and the four-section shape are identical across tiers; do not invent a different
|
|
@@ -45,6 +45,10 @@ roadmap handoff had to be resumed by hand, carried as a free-prose note in `171`
|
|
|
45
45
|
4. A genuine tie (two candidates equally live) is presented to the user and resolved by the
|
|
46
46
|
single ask below, not silently picked.
|
|
47
47
|
|
|
48
|
+
Read `../plastic-conventions/references/roadmaps.md` for the roadmap file format, batch
|
|
49
|
+
semantics, and the status-mirror rule behind the candidates gathered above. This path resolves
|
|
50
|
+
relative to this skill's own installed directory.
|
|
51
|
+
|
|
48
52
|
## Present state
|
|
49
53
|
|
|
50
54
|
Present the chosen roadmap's `## Goal`, the current batch with each entry's mirrored status, the
|
|
@@ -49,6 +49,9 @@ routes each authoring task to the reference that holds the depth.
|
|
|
49
49
|
| Deciding script versus prose, or writing a script | `references/scripts.md` |
|
|
50
50
|
| Building evals for a skill | `references/evals.md` |
|
|
51
51
|
|
|
52
|
+
Read `references/defaults-first.md` before naming an external skill as a default, for the
|
|
53
|
+
Plastic-first, delegate-by-exception rule.
|
|
54
|
+
|
|
52
55
|
## Shrink context, or let a skill self-improve
|
|
53
56
|
|
|
54
57
|
- When prompts or tool output blow the context budget, open `references/hooks.md` (E7) for
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Defaults First
|
|
2
|
+
|
|
3
|
+
This chapter holds the Plastic-first, delegate-by-exception rule for naming an external skill as a default.
|
|
4
|
+
|
|
5
|
+
### Defaults-First
|
|
6
|
+
|
|
7
|
+
Plastic stands on its own. Skills and agents use Plastic's own defaults; an
|
|
8
|
+
external skill (for example `superpowers:*`) is opt-in, never load-bearing.
|
|
9
|
+
|
|
10
|
+
- **Default to Plastic, delegate by exception.** Name the Plastic-native path as
|
|
11
|
+
the default. Delegate to an external skill only when (a) it is available in the
|
|
12
|
+
harness, or (b) the user explicitly asks for it. A user without that plugin must
|
|
13
|
+
still get the core behavior.
|
|
14
|
+
- **Phrase external skills as enhancements.** Write "use Plastic's native X by
|
|
15
|
+
default; if `superpowers:<skill>` is available, or the user prefers it, delegate
|
|
16
|
+
to it" never "delegate to `superpowers:<skill>`" as the only path.
|
|
17
|
+
- **Optional dependencies detect then degrade.** `qmd` is the reference shape:
|
|
18
|
+
`scripts/lib/qmd_sync.rb` detects the binary first and every verb no-ops cleanly
|
|
19
|
+
when it is absent (see `scripts/qmd-sync`). Optional CLIs and MCP servers follow
|
|
20
|
+
the same detect-then-skip pattern, so a missing tool never crashes a session.
|
|
21
|
+
- **Legitimate hard dependencies are exempt.** Ruby, Node, git, and POSIX tools are
|
|
22
|
+
the cost of running Plastic, not silent coupling. The principle targets accidental
|
|
23
|
+
dependence on external skills doing work Plastic should do itself.
|
|
@@ -77,7 +77,10 @@ Notes that change the choice of event: [E2]
|
|
|
77
77
|
- PreCompact fires before the runtime compacts the conversation. Use it to write a savepoint
|
|
78
78
|
while the full context still exists.
|
|
79
79
|
|
|
80
|
-
Plastic ships working instances of each: `scripts/hook-
|
|
80
|
+
Plastic ships working instances of each: `hooks/edit-gates` -> `scripts/hook-edit-gates`
|
|
81
|
+
(PreToolUse, the merged dispatcher that runs code-gate, lock-gate, savepoint-pre, links-gate,
|
|
82
|
+
and create-gate in one process; each gate's own logic lives in `scripts/lib/edit_gates.rb`
|
|
83
|
+
and is also reachable through the standalone `scripts/hook-code-gate` CLI wrapper),
|
|
81
84
|
`scripts/hook-session-start` (SessionStart boot and inject), `scripts/hook-savepoint-pre`
|
|
82
85
|
(PreCompact savepoint). Read one before authoring a new hook of the same shape.
|
|
83
86
|
|
|
@@ -39,6 +39,10 @@ The agent handles:
|
|
|
39
39
|
- Cluster management (create, merge, rename)
|
|
40
40
|
- Orphan detection
|
|
41
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
|
+
|
|
42
46
|
When an intent reaches a terminal state, moved to Completed OR Abandoned, do these things:
|
|
43
47
|
|
|
44
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).
|
|
@@ -54,3 +58,7 @@ follows its own step 7: it detects (never acquires) the target's delivery lock,
|
|
|
54
58
|
clean working tree, and performs the fix on a fresh branch merged back to main as one closed
|
|
55
59
|
operation, with an append-only `revisions.md` receipt in the same pass as the edit. See
|
|
56
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.
|
|
@@ -75,8 +75,16 @@ When 3+ intents share tags but aren't in a cluster, suggest a new cluster headin
|
|
|
75
75
|
### Flag Orphans
|
|
76
76
|
Intents with no links (empty `sources`, empty `chain`, no `## Links` entries, not in any cluster) should be flagged for curation.
|
|
77
77
|
|
|
78
|
+
Before reclassifying a structural finding outside routine indexing, read
|
|
79
|
+
`../plastic-conventions/references/maintenance-and-revisions.md` for WORK versus MAINTENANCE, the
|
|
80
|
+
`revisions.md` move-and-record contract, and the violation-tag catalog.
|
|
81
|
+
|
|
78
82
|
REQUIRED BACKGROUND: intent-linking (for understanding connection types and Zettelkasten theory)
|
|
79
83
|
|
|
84
|
+
Read `../plastic-conventions/references/knowledge-graph.md` for the linking doctrine: tiers of
|
|
85
|
+
influence, sources versus chain, and the `## Links` projection. This path resolves relative to
|
|
86
|
+
this skill's own installed directory.
|
|
87
|
+
|
|
80
88
|
## References
|
|
81
89
|
|
|
82
90
|
- Read `references/zettelkasten-linking.md` for the three structural layers (Folgezettel, directed graph, tags) and how they map to INDEX.md organization
|
|
@@ -56,10 +56,9 @@ Checkpoint: name one thing auto will always stop and ask about, rather than deci
|
|
|
56
56
|
No new command. Auto still honors every hard gate a guided session would hit: the delivery
|
|
57
57
|
lock (one owner at a time), the code gate (shut until `plan.md` and `checklist.md` exist),
|
|
58
58
|
and the create gate (intents only come from the tool that makes them, never hand-authored).
|
|
59
|
-
One gate, retrieval, is advisory only and never blocks anything; it just adds a note.
|
|
60
59
|
|
|
61
|
-
Checkpoint: read one gate message from the run so far and
|
|
62
|
-
|
|
60
|
+
Checkpoint: read one gate message from the run so far and name which of the three gates it
|
|
61
|
+
came from.
|
|
63
62
|
|
|
64
63
|
### 4. Reading the per-stage reports
|
|
65
64
|
|
package/templates/agents.md
CHANGED
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
You are working on this project as part of a strategic intent. Your governing intent is tracked in the global Plastic store at `~/.plastic/store/`.
|
|
9
9
|
|
|
10
|
+
## Tools
|
|
11
|
+
|
|
12
|
+
Plastic detects the tools it can use to work faster on this project: QMD (search this
|
|
13
|
+
project's intent store instead of grep), and Serena or Enola (symbolic code navigation
|
|
14
|
+
instead of grep). None is required. Whichever are present, their readiness is checked every
|
|
15
|
+
time this project loads (`doctor --store <slug>`), so working through Plastic on this project
|
|
16
|
+
means preferring a detected tool's own search or navigation over a generic file scan.
|
|
17
|
+
|
|
10
18
|
## How to Work
|
|
11
19
|
|
|
12
20
|
1. **Check active tactical intents** in `.plastic/store/` — these are your current tasks
|