@celsoft/coordinator 0.0.0 → 0.1.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/CHANGELOG.md +11 -0
- package/README.md +107 -0
- package/THIRD_PARTY_NOTICES.md +2005 -0
- package/agents/console.md +20 -0
- package/agents/free.md +110 -0
- package/build/0-JP6XL6LB.js +17 -0
- package/build/1-A52YZWNS.js +17 -0
- package/build/2-CLH2NM6F.js +32 -0
- package/build/3-4N467IB6.js +45 -0
- package/build/4-WL5H4LUW.js +29 -0
- package/build/_layout.svelte-KPUSX7LQ.js +27 -0
- package/build/_page.svelte-22H56UR6.js +7972 -0
- package/build/_page.svelte-CVWUNRQC.js +135 -0
- package/build/_page.svelte-LTZXBHMT.js +57 -0
- package/build/_server.ts-3KVBYN6P.js +20 -0
- package/build/_server.ts-3POPKVEM.js +47 -0
- package/build/_server.ts-5735T2V5.js +31 -0
- package/build/_server.ts-5VXGNWV2.js +38 -0
- package/build/_server.ts-645KP7WP.js +42 -0
- package/build/_server.ts-A3AA24Z2.js +28 -0
- package/build/_server.ts-CITUOEM6.js +58 -0
- package/build/_server.ts-I7HMTPOA.js +25 -0
- package/build/_server.ts-M5BQ4LLX.js +30 -0
- package/build/_server.ts-OB4O27HF.js +683 -0
- package/build/_server.ts-OJT7HE7M.js +15 -0
- package/build/_server.ts-OYGWVLZM.js +12 -0
- package/build/_server.ts-T75UVMQP.js +38 -0
- package/build/_server.ts-WYZYNHUZ.js +28 -0
- package/build/_server.ts-Z26EB47B.js +486 -0
- package/build/chunk-4CIG53L5.js +33 -0
- package/build/chunk-BJTJS3XY.js +338 -0
- package/build/chunk-F2CNWJZM.js +14 -0
- package/build/chunk-HGYE3UTU.js +416 -0
- package/build/chunk-KAYW2W7H.js +1311 -0
- package/build/chunk-LFP3UPCM.js +10 -0
- package/build/chunk-M44JEFEH.js +62 -0
- package/build/chunk-MC5AGLMY.js +39 -0
- package/build/chunk-NCZ77J5E.js +19798 -0
- package/build/chunk-NVNLDPUJ.js +2122 -0
- package/build/chunk-PDCON4KS.js +494 -0
- package/build/chunk-Q4OQNY5M.js +25 -0
- package/build/chunk-QCUOR2U5.js +75 -0
- package/build/chunk-R6RYZZWA.js +46 -0
- package/build/chunk-SOJTASZC.js +51 -0
- package/build/chunk-SU26PJVX.js +410 -0
- package/build/chunk-U5BSBG4R.js +506 -0
- package/build/chunk-UEKOZGRO.js +37 -0
- package/build/chunk-W6EFUWJ2.js +9 -0
- package/build/chunk-WOPREK6Q.js +117 -0
- package/build/chunk-WWJ3F4QS.js +127 -0
- package/build/chunk-ZGZJEEE3.js +1091 -0
- package/build/client/_app/immutable/assets/0.BGa5ZNDM.css +1 -0
- package/build/client/_app/immutable/chunks/BUrrLYDt.js +2 -0
- package/build/client/_app/immutable/chunks/BgFr_EyZ.js +4 -0
- package/build/client/_app/immutable/chunks/Bjy-W4x2.js +82 -0
- package/build/client/_app/immutable/chunks/C8qZab0y.js +56 -0
- package/build/client/_app/immutable/chunks/C90fLsA5.js +4 -0
- package/build/client/_app/immutable/chunks/CRzLMJPS.js +1 -0
- package/build/client/_app/immutable/chunks/DLT1iIlz.js +2 -0
- package/build/client/_app/immutable/chunks/pIrVVOVY.js +2 -0
- package/build/client/_app/immutable/entry/app.0DERehLW.js +3 -0
- package/build/client/_app/immutable/entry/payload.DSmR2FwN.js +2 -0
- package/build/client/_app/immutable/entry/start.B7srFiqh.js +3 -0
- package/build/client/_app/immutable/nodes/0.aD9vJoxR.js +2 -0
- package/build/client/_app/immutable/nodes/1.Br4FL91i.js +2 -0
- package/build/client/_app/immutable/nodes/2.vl6OYfu3.js +8 -0
- package/build/client/_app/immutable/nodes/3.VYqJOLAF.js +2 -0
- package/build/client/_app/immutable/nodes/4.jF9UVlFN.js +2 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/apple-touch-icon.png +0 -0
- package/build/client/favicon.ico +0 -0
- package/build/client/favicon.svg +48 -0
- package/build/client/icon-192.png +0 -0
- package/build/client/icon-512.png +0 -0
- package/build/client/icon-maskable-512.png +0 -0
- package/build/client/icon.svg +44 -0
- package/build/client/manifest.webmanifest +15 -0
- package/build/error.svelte-JXZDY65F.js +51 -0
- package/build/handler.js +716 -0
- package/build/hooks.server-34IMHRKC.js +43 -0
- package/build/instance-NP3FJIWW.js +2967 -0
- package/client/client.mjs +28 -0
- package/client/hooks.mjs +7 -0
- package/client/register.mjs +5 -0
- package/dist/cli.js +62826 -0
- package/dist/port.js +36691 -0
- package/package.json +20 -1
- package/skills/agents/.claude-plugin/plugin.json +5 -0
- package/skills/agents/hooks/hooks.json +1 -0
- package/skills/agents/hooks/register.ts +57 -0
- package/skills/agents/skills/bus-work/SKILL.md +66 -0
- package/skills/agents/skills/plan/SKILL.md +98 -0
- package/skills/console/.claude-plugin/plugin.json +5 -0
- package/skills/console/hooks/hooks.json +1 -0
- package/skills/console/hooks/register.ts +10 -0
- package/skills/console/skills/bus/SKILL.md +61 -0
- package/skills/default/.claude-plugin/plugin.json +5 -0
- package/skills/default/skills/git-workflow/SKILL.md +294 -0
- package/skills/default/skills/git-workflow/mise-tasks/_lib.sh +107 -0
- package/skills/default/skills/git-workflow/mise-tasks/clone +36 -0
- package/skills/default/skills/git-workflow/mise-tasks/repo-list +8 -0
- package/skills/default/skills/git-workflow/mise-tasks/unpushed +26 -0
- package/skills/default/skills/git-workflow/mise-tasks/worktree-add +60 -0
- package/skills/default/skills/github/SKILL.md +208 -0
- package/skills/default/skills/github/scripts/gh-org +196 -0
- package/skills/default/skills/plan-page/SKILL.md +300 -0
- package/skills/default/skills/plan-page/assets/index.html +854 -0
- package/skills/default/skills/plan-page/scripts/inline +46 -0
- package/skills/default/skills/plan-page/scripts/stage +26 -0
- package/skills/default/skills/secrets/SKILL.md +134 -0
- package/skills/default/skills/secrets/scripts/secrets-check +87 -0
- package/skills/default/skills/writing-style/SKILL.md +45 -0
- package/skills/extra/.claude-plugin/plugin.json +5 -0
- package/skills/extra/skills/artifacts/SKILL.md +52 -0
- package/skills/extra/skills/github-actions/SKILL.md +78 -0
- package/skills/extra/skills/github-actions/scan +32 -0
- package/skills/extra/skills/markdown-review/SKILL.md +70 -0
- package/skills/extra/skills/markdown-review/assets/index.html +201 -0
- package/skills/extra/skills/markdown-review/scripts/stage +36 -0
- package/skills/extra/skills/mise-usage/SKILL.md +155 -0
- package/skills/extra/skills/plugin-authoring/SKILL.md +317 -0
- package/skills/extra/skills/project-conventions/SKILL.md +64 -0
- package/skills/extra/skills/questions/SKILL.md +156 -0
- package/skills/extra/skills/questions/assets/index.html +376 -0
- package/skills/extra/skills/questions/scripts/stage +26 -0
- package/skills/extra/skills/serve/SKILL.md +165 -0
- package/skills/extra/skills/serve/scripts/serve +268 -0
- package/skills/extra/skills/serve/scripts/server.py +345 -0
- package/skills/extra/skills/skill-dependencies/SKILL.md +65 -0
- package/skills/extra/skills/skill-maintenance/SKILL.md +101 -0
- package/skills/extra/skills/ticketing/SKILL.md +125 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-page
|
|
3
|
+
description: "How to make a plan page, the page the plan skill requires (a document of its issue on the coordinator's bus, else a Claude artifact): a plan that reveals a design in order of importance, its approach, then its data model and mockups, then only what they leave unclear, revisited as planning goes back and forth, with a live, clickable mockup of any UI it changes, built from the repo's real UI code. Plans are written as data, plan.json, and published with this skill's renderer. Read it with the plan skill whenever you publish a plan."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan page
|
|
7
|
+
|
|
8
|
+
The `plan` skill says every change gets a plan the user approves, published as a page: on the
|
|
9
|
+
coordinator's bus, one of its issue's documents; elsewhere, a Claude artifact. This skill is how that
|
|
10
|
+
page is made: what a good plan says, and the page that shows it.
|
|
11
|
+
|
|
12
|
+
## How a plan is built
|
|
13
|
+
|
|
14
|
+
A plan reveals a design carefully. Whoever has a clear idea of the work lays it out in order of
|
|
15
|
+
importance, getting each part right before spending words on the parts after it. The order is a
|
|
16
|
+
priority, not a gate: planning goes back and forth, and when details show an earlier part is wrong,
|
|
17
|
+
fix that part first, then return to the details. No template fixes the sections: the work decides
|
|
18
|
+
them.
|
|
19
|
+
|
|
20
|
+
1. **The approach first:** the title and gist state the approach, the working theory of how to do
|
|
21
|
+
the work. It stays a theory: rewrite it whenever something learned changes it, and revise
|
|
22
|
+
what rests on it to match.
|
|
23
|
+
2. **Then what is not working:** today's behavior, each line saying what it costs or breaks. Leave
|
|
24
|
+
it out when the approach already makes it plain.
|
|
25
|
+
3. **Then the proof:** the data model, the mockups, or both, whichever the work needs. They are
|
|
26
|
+
authoritative: every other part stays inside the boundaries they set, and when something does not
|
|
27
|
+
work inside them, change them rather than writing an exception around them. When the work
|
|
28
|
+
changes the data model, it comes first, since everything else rests on it. Get these right before the
|
|
29
|
+
details, and revisit them whenever the details show they are wrong.
|
|
30
|
+
4. **Then only what is still unclear:** a behavior the data model and mockups do not make plain.
|
|
31
|
+
No section after the proof is required; stopping at the mockups is right when they say it all.
|
|
32
|
+
5. **Never what the user will get:** a good design shows its own result, so a section describing
|
|
33
|
+
it only repeats the design.
|
|
34
|
+
|
|
35
|
+
The smallest plan is the approach and one mockup, such as for a rename or a layout change.
|
|
36
|
+
|
|
37
|
+
## Rules, then exceptions
|
|
38
|
+
|
|
39
|
+
Every section, whatever it is for, states a few simple rules first, then the exceptions, each an edge
|
|
40
|
+
case of the rule it bends, the way a journey shows its main line and folds its edges. Never write a
|
|
41
|
+
table or grid that mixes rules and exceptions into one heuristic for the reader to work out. A design
|
|
42
|
+
that needs many exceptions is a design to rethink, not to tabulate.
|
|
43
|
+
|
|
44
|
+
## The data model
|
|
45
|
+
|
|
46
|
+
What "data model" means depends on the work. Show only the kinds the work changes, usually one or two,
|
|
47
|
+
each in its one form, so the same kind always looks the same. Show only what is new or changed, in
|
|
48
|
+
plain words, and leave out what a reader would assume; never a JSON or database schema.
|
|
49
|
+
|
|
50
|
+
1. **Folder structure:** a tree, one nested line per folder or file the change adds or moves, its
|
|
51
|
+
name in code and a few words on what it holds.
|
|
52
|
+
2. **Where data lives:** one labelled line per place (a machine, a repo, memory, a service), saying
|
|
53
|
+
what is kept there and how it changes.
|
|
54
|
+
3. **How things relate,** stored or in memory: a `diagram`, boxes for the things and an arrow for
|
|
55
|
+
each relationship, labelled with what it is and how many (`holds many`, `refers to by name`,
|
|
56
|
+
`read from`).
|
|
57
|
+
4. **Data types:** one labelled line per type, its fields nested under it in plain words (`a list
|
|
58
|
+
of orgs and repos`), only the fields the change is about.
|
|
59
|
+
5. **States:** a `diagram` of the states and what moves a record between them.
|
|
60
|
+
|
|
61
|
+
Each form gives its rules first, then its exceptions: a tree's layout, then a short line under the
|
|
62
|
+
folder an exception bends; a diagram's boxes and arrows that always hold, then each exception a
|
|
63
|
+
dashed box or arrow (`exception: true`) with its note; a list's lines, then a last `Exceptions` line
|
|
64
|
+
with the cases nested under it. Mark what is new or changed.
|
|
65
|
+
|
|
66
|
+
## Terms
|
|
67
|
+
|
|
68
|
+
1. **One term per idea:** use exactly the same term for an idea every time; no synonyms, short
|
|
69
|
+
forms, or new wording for variety.
|
|
70
|
+
2. **The repo's terms as written:** where the repo defines a term (its `CLAUDE.md` or design
|
|
71
|
+
docs), use it, and never define it again; restating what the reader knows hides what is new.
|
|
72
|
+
3. **Define only what is new or changing:** a new term once, where first used, marked new; a
|
|
73
|
+
changed term marked changed, saying only what changes. A shipped new term goes into the repo's
|
|
74
|
+
terms with the work.
|
|
75
|
+
4. **Bold is for terms:** bold only an official term, the repo's or one the plan defines
|
|
76
|
+
(`**Profile**`), and write a word that modifies it in italics (`**Profile** *kept in a Repo*`,
|
|
77
|
+
`*shared* **Event Handler**`), so each term stands clear of its modifiers. Nothing else is bold.
|
|
78
|
+
5. **Capitalized:** a term for a defined thing has every word capitalized wherever it appears,
|
|
79
|
+
prose included (`Event Handler`, `Skill Group`, `Repo`), even where the repo writes it otherwise;
|
|
80
|
+
ad hoc wording stays lowercase. Ad hoc wording is fine; the case tells the reader which is which.
|
|
81
|
+
6. **Everywhere the same:** the mockups, diagrams, and captions use the plan's terms exactly as the
|
|
82
|
+
plan writes them, capitals included; a mockup's own wording that differs is changed to match,
|
|
83
|
+
never left for the reader to reconcile.
|
|
84
|
+
7. **Check:** before publishing, every noun is a term the repo defines, a term the plan defines as
|
|
85
|
+
new, or plain English.
|
|
86
|
+
|
|
87
|
+
## Write less
|
|
88
|
+
|
|
89
|
+
1. **Plain words:** one sentence per line, no dashes, and the user's own style rules wherever they
|
|
90
|
+
have some.
|
|
91
|
+
2. **Short sections:** a few lines each; cut any line that restates what the plan already shows.
|
|
92
|
+
3. **Terms where used:** say what a term means in the line that first uses it, never in a glossary.
|
|
93
|
+
4. **Fold** what the user can approve without.
|
|
94
|
+
5. **Publish early:** publish as soon as the first parts are right, before the rest exists, and
|
|
95
|
+
republish as the plan changes.
|
|
96
|
+
|
|
97
|
+
## Questions
|
|
98
|
+
|
|
99
|
+
A Questions section holds only what the `plan` skill's Questions allow: specific issues that came up
|
|
100
|
+
on a path the user already chose. When the user settles one, fold the answer into the part of the
|
|
101
|
+
plan it changes and remove the question; the section shrinks until it is gone. A plan is how the
|
|
102
|
+
work will be, never a history: no record of what was decided, asked, or ruled out.
|
|
103
|
+
|
|
104
|
+
## Tools earn their place
|
|
105
|
+
|
|
106
|
+
The journey, mockups, screenshots, nesting, and term rows are aids: use one when it shows what prose
|
|
107
|
+
cannot.
|
|
108
|
+
|
|
109
|
+
1. **Journey:** when the work moves between places (Web Page, an agent's session, GitHub) or
|
|
110
|
+
branches; a short sequence in one place reads better as labelled lines, one per step.
|
|
111
|
+
2. **Mockups and screenshots:** whenever the work changes something a person sees (see Mockups).
|
|
112
|
+
3. **Nesting:** when a line has parts, options, cases, fields, or a folder's contents.
|
|
113
|
+
4. **Term rows:** when several new ideas are best taught side by side.
|
|
114
|
+
|
|
115
|
+
## Check before publishing
|
|
116
|
+
|
|
117
|
+
Read the plan top down, as the user will, and ask:
|
|
118
|
+
|
|
119
|
+
1. **Stop here:** read alone, is the approach a correct picture of the work?
|
|
120
|
+
2. **Order:** does the data model come before anything that leans on it, and the proof before
|
|
121
|
+
anything written after it?
|
|
122
|
+
3. **Rules first:** does every section give its rules before its exceptions, with no table of both?
|
|
123
|
+
4. **Earned:** does every section and line say something the plan does not already show?
|
|
124
|
+
5. **Terms:** is every term the repo's own or defined here as new, used the same way throughout?
|
|
125
|
+
|
|
126
|
+
Fix what fails, then publish.
|
|
127
|
+
|
|
128
|
+
## The page
|
|
129
|
+
|
|
130
|
+
A plan is a page made of two files, published as a document (or an artifact):
|
|
131
|
+
|
|
132
|
+
1. **`index.html`:** this skill's `assets/index.html`, the renderer. Change it only here.
|
|
133
|
+
2. **`plan.json`:** the plan, which you write and rewrite.
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"title": "Agent approval gates",
|
|
138
|
+
"eyebrow": "acme/api#agent-approval-gates",
|
|
139
|
+
"status": "Waiting for your approval",
|
|
140
|
+
"gist": "Gated agents stop and ask you before they build or land, on a prompt in their own session.",
|
|
141
|
+
"marks": {
|
|
142
|
+
"in": { "icon": "check", "color": "ok", "label": "In scope" }
|
|
143
|
+
},
|
|
144
|
+
"sections": [
|
|
145
|
+
{
|
|
146
|
+
"title": "What is not working",
|
|
147
|
+
"summary": "The lines below as one true sentence: what a reader knows if they stop here.",
|
|
148
|
+
"lines": [
|
|
149
|
+
{ "label": "Plan", "text": "The agent builds as soon as it reads its task, so a wrong approach costs a whole build.", "lines": [] },
|
|
150
|
+
{ "mark": "in", "text": "A plain line, led by its mark's icon, or a bullet without one." }
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{ "title": "Choices", "summary": "...", "fold": true, "lines": [] }
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
1. **Gist:** `gist` is the approach, a string or a list of up to three strings, drawn large under the title.
|
|
159
|
+
2. **Fold:** `fold: true` on a section shows its heading and summary, with its lines and journey
|
|
160
|
+
behind a toggle; `more` replaces the toggle's text. Fold what the user can approve without.
|
|
161
|
+
3. **Summaries:** every section has a `summary`, one sentence saying what its lines add up to,
|
|
162
|
+
true on its own. Whenever a line changes, rewrite its summary to match.
|
|
163
|
+
4. **Text:** plain text, plus `` `code` ``, `**bold**` for terms, and `*italics*` for their modifiers
|
|
164
|
+
(see Terms). Labels are set apart by color, not bold.
|
|
165
|
+
5. **Nesting:** a line's own `lines` show one step further in with a rule down their left.
|
|
166
|
+
6. **Marks:** a line may name a `mark`, drawn as a colored icon before its text, such as in scope,
|
|
167
|
+
out of scope, or a constraint, instead of words like "In:". Define every mark in `marks`: an
|
|
168
|
+
`icon` (`check`, `x`, `shield`, `alert`, `question`, `dot`, `arrow`, `link`, `file`, `layers`,
|
|
169
|
+
`plus`, `sparkle`, `book`, `pencil`), a `color` (`ok`, `bad`, `warn`, `info`, `muted`), and a
|
|
170
|
+
`label`; the section shows their legend. Mark every line of a section or none.
|
|
171
|
+
7. **Labels:** a short `label` (one to three words, sentence case) where it helps a line scan,
|
|
172
|
+
such as choices and questions; the text says the rest without restating it.
|
|
173
|
+
8. **Terms:** a line with `term` shows as three columns, its mark, the term, and its meaning, in
|
|
174
|
+
every word capitalized (`Closing Issue`, `Message [Type]`). Mark terms `new`, `changed`, or `existing` when
|
|
175
|
+
that helps: `plus`/`ok`, `pencil`/`warn`, `book`/`muted`, and removed `x`/`bad`; never `sparkle` for new.
|
|
176
|
+
9. **Files:** a plan says what the user gets, never which files change; a line with `files` (paths
|
|
177
|
+
beside `text`) is for the rare plan where a file is the point. Once they approve, say in chat in
|
|
178
|
+
a few lines which layers and files you expect to touch, then build.
|
|
179
|
+
10. **Diagram:** a line's `diagram` draws boxes in rows, top to bottom, with labelled arrows:
|
|
180
|
+
`{ "nodes": [{ "id", "label", "note"?, "row"?, "new"?, "exception"? }], "edges": [{ "from", "to",
|
|
181
|
+
"label", "exception"? }] }`. A node's row is its `row`, else one below whatever points to it;
|
|
182
|
+
an arrow between boxes in one row runs sideways. `exception: true` draws it dashed.
|
|
183
|
+
11. **Header:** `status` is one line saying what the user is asked to do. Mark the
|
|
184
|
+
section of questions they must answer with `"ask": true`; the header adds its count and a link.
|
|
185
|
+
|
|
186
|
+
## Journey
|
|
187
|
+
|
|
188
|
+
A section's `journey` draws a swimlane: one lane per place the user moves between, steps running down
|
|
189
|
+
in order, each a card in its place's lane.
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
"journey": {
|
|
193
|
+
"places": [{ "id": "web", "name": "Web Page", "icon": "globe" }],
|
|
194
|
+
"steps": [{
|
|
195
|
+
"id": "plan", "title": "Plan", "place": "session", "who": "Agent",
|
|
196
|
+
"via": "the agent reads, then",
|
|
197
|
+
"does": "Stops on an approval prompt with its approach.",
|
|
198
|
+
"sees": "Approve, Change, or type a reply.",
|
|
199
|
+
"edges": [{ "title": "Free agent", "text": "Skips this prompt.", "rejoin": "build" }]
|
|
200
|
+
}]
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
1. **Main line:** the steps are the path that usually happens; a step headline is a verb.
|
|
205
|
+
2. **Places:** two to four lanes; icons `globe`, `phone`, `terminal`, `chat`, or any mark icon.
|
|
206
|
+
3. **Cards:** `who` acts, `does` is one plain sentence, `sees` is what the user sees; no internals.
|
|
207
|
+
4. **Hops:** `via` labels the move into a step, most of all when the place changes.
|
|
208
|
+
5. **Branches:** an edge folds under the step it leaves from, with `rejoin` naming the step it
|
|
209
|
+
returns to, or `null` when it ends there.
|
|
210
|
+
6. **Edge cases:** when the journey's edges do not make them plain, a folded section after it
|
|
211
|
+
covers what can go wrong: failure, retry, concurrency, permission, restart, and partial state, each with what the user
|
|
212
|
+
sees and how it recovers. There is no cap; leave out only what cannot happen.
|
|
213
|
+
|
|
214
|
+
## Mockups
|
|
215
|
+
|
|
216
|
+
Any plan whose work changes something a person sees shows the change as a live mockup: the repo's
|
|
217
|
+
real UI, run on mock data, built into one HTML file the plan page frames, so the user clicks through
|
|
218
|
+
what they approve instead of reading about it.
|
|
219
|
+
|
|
220
|
+
1. **Real code:** build the mockup from the repo's own UI, edited in the worktree to show the
|
|
221
|
+
change, or written with the design system's kit where the UI does not exist yet. Write it as
|
|
222
|
+
real, reusable code: iterating during the plan is cheap, and that code becomes the build.
|
|
223
|
+
Keep the edits in a commit on a side branch (`<track>-mockup`) so the build starts from them;
|
|
224
|
+
the plan's branch stays untouched until the user approves.
|
|
225
|
+
2. **Mock at the network:** answer the page's requests (its `fetch` calls, a socket) from mock
|
|
226
|
+
data, never by changing a component to take it. Actions need no answers by default, since the
|
|
227
|
+
flow can be assumed; answer one only when the plan is about the response itself, such as a
|
|
228
|
+
validation message or a specific behavior.
|
|
229
|
+
3. **One per starting page:** a mockup covers a change and everything reached from it by
|
|
230
|
+
clicking, such as a new button's dialog or the page it opens. Make a second mockup only for a
|
|
231
|
+
change that starts on a different page, so the same page never shows twice.
|
|
232
|
+
4. **One file:** inline the built page's scripts and styles with this skill's
|
|
233
|
+
`scripts/inline <page.html> <out.html>`, and save it under `mockups/` beside `plan.json`.
|
|
234
|
+
5. **Each repo's recipe:** look at how the repo's UI is built and take the cheapest way that
|
|
235
|
+
fits, then write the recipe in the repo's `CLAUDE.md` so the next plan follows it:
|
|
236
|
+
1. **Bundled app** (Svelte, React, Vue on Vite or similar): build the app's real entry with a
|
|
237
|
+
small stub that answers its requests from a JSON file, then inline the build, such as a
|
|
238
|
+
repo task `mockups/build <out.html>` that the repo's `CLAUDE.md` names.
|
|
239
|
+
2. **Server pages:** render the real template on mock data, save the page, and inline it;
|
|
240
|
+
clicks do what its own scripts do.
|
|
241
|
+
3. **Not practical** (a terminal, a native app, UI that cannot draw without a live service):
|
|
242
|
+
use screenshots of the proposed screen instead (see Screenshots).
|
|
243
|
+
6. **Where:** on the line of the step that teaches the change, its `mockups` a list of
|
|
244
|
+
`{ "src": "mockups/<name>.html", "kind": "after", "caption", "width": "phone" | "desktop" }`.
|
|
245
|
+
`src` may carry the page's own route (`mockups/page.html#i=...`) to open on the changed screen;
|
|
246
|
+
`width` is where it starts. Each is drawn in a frame with Phone (390px), Desktop (1280px,
|
|
247
|
+
scaled to the column), and Full size, and is commentable on its own.
|
|
248
|
+
7. **A set:** put every screen of one change on one line, each with a short `label` (the screen)
|
|
249
|
+
and `text` (what to try there); the page shows them settings-style, a list of screens beside
|
|
250
|
+
the one chosen, so the user switches between them instead of scrolling a series. Full size opens
|
|
251
|
+
the whole set in the window, its list beside the screen, Desktop at the window's real width.
|
|
252
|
+
|
|
253
|
+
## Screenshots
|
|
254
|
+
|
|
255
|
+
A plan shows only what is proposed, never the screen as it is now: the user knows their own app. A
|
|
256
|
+
screenshot is the fallback for a change where no live mockup is practical.
|
|
257
|
+
|
|
258
|
+
1. **What:** the changed screen as proposed: a static copy using the app's own stylesheet, or the
|
|
259
|
+
real page edited in place and undone before building.
|
|
260
|
+
2. **Widths:** phone and desktop where the layout differs.
|
|
261
|
+
3. **Taking them:** Playwright in Chrome, or whatever the repo already drives its page with; save
|
|
262
|
+
each as a PNG under `screens/` beside `plan.json`.
|
|
263
|
+
4. **Where:** on the line of the step that teaches the change, its `screens` a list of
|
|
264
|
+
`{ "src": "screens/<name>.png", "kind": "after", "caption" }`, each tappable full size and
|
|
265
|
+
commentable on its own.
|
|
266
|
+
|
|
267
|
+
## Comments
|
|
268
|
+
|
|
269
|
+
A document has no comment threads yet; the user comments in chat or on the issue. In an artifact,
|
|
270
|
+
comments are the artifact's own threads; the page builds no comment UI of its own. In comment mode a tap on any line comments on it. The page anchors threads itself
|
|
271
|
+
(`customAnchors`): a labelled line to `line:<section>/<label>`, so it survives reordering; a
|
|
272
|
+
journey step to `step:<id>`; a screenshot to `screen:<src>`; a mockup to `mockup:<src>`; any other line by its place on the
|
|
273
|
+
page. Going to a thread on a folded line opens its fold. A thread whose line is gone is left
|
|
274
|
+
unplaced, in the shell's comment list.
|
|
275
|
+
|
|
276
|
+
## Publish
|
|
277
|
+
|
|
278
|
+
1. **Stage:** run this skill's `scripts/stage <out-dir>`, with `<out-dir>` a folder for this plan
|
|
279
|
+
in the session's scratch directory. It prints the `PAGE` and `PLAN` paths.
|
|
280
|
+
2. **Write** the plan into `plan.json`, then run Check before publishing.
|
|
281
|
+
3. **Publish as a document** on the bus: put each screenshot under `screens/` and each mockup under
|
|
282
|
+
`mockups/` in the stage folder, beside `index.html` and `plan.json`, and send `doc_publish` with
|
|
283
|
+
the issue, a name for this plan (`store-design`), its title, and `path` the stage folder. The
|
|
284
|
+
reply gives the link and the folder the version was kept in. The renderer reads `plan.json` beside
|
|
285
|
+
it, and the coordinator frames the page under a live header of the issue and its approval.
|
|
286
|
+
**Off the bus, publish an artifact** with the Artifact tool: `file_path` the `PAGE` path, `files`
|
|
287
|
+
`{"plan.json": "<PLAN path>"}` plus each screenshot as `"screens/<name>.png": "<its path>"`
|
|
288
|
+
and each mockup as `"mockups/<name>.html": "<its path>"`,
|
|
289
|
+
and on the first publish only `capabilities` `{"comments": {"customAnchors": true}}` and
|
|
290
|
+
`icon` `checklist`.
|
|
291
|
+
4. **Link:** give the user the link; for an artifact, also say Done, tell Claude sends the comments
|
|
292
|
+
to you.
|
|
293
|
+
5. **Record and ask:** record the link and ask for approval as the `plan` skill says.
|
|
294
|
+
6. **Another plan:** stage a fresh folder and publish under a new name (a document) or without
|
|
295
|
+
`url` (an artifact), so a new plan gets its own link.
|
|
296
|
+
7. **Later sessions:** to revise a document, copy the `folder` that `issues` lists for it into a
|
|
297
|
+
fresh stage folder, revise `plan.json`, and publish under the same name. To revise an artifact
|
|
298
|
+
after `/clear` or a resume, read the artifact, fetch
|
|
299
|
+
`plan.json` with `path: "plan.json"`, stage into a fresh folder, put the fetched `plan.json`
|
|
300
|
+
there, and publish with the artifact's `url`.
|