@scribe-platform/cli 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +28 -0
  2. package/dist/commands/proof.d.ts +5 -0
  3. package/dist/commands/proof.d.ts.map +1 -0
  4. package/dist/commands/proof.js +440 -0
  5. package/dist/commands/proof.js.map +1 -0
  6. package/dist/commands/prospect.d.ts.map +1 -1
  7. package/dist/commands/prospect.js +9 -0
  8. package/dist/commands/prospect.js.map +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +11 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/lib/client.d.ts +169 -0
  13. package/dist/lib/client.d.ts.map +1 -1
  14. package/dist/lib/client.js +77 -0
  15. package/dist/lib/client.js.map +1 -1
  16. package/dist/lib/proof-folder.d.ts +86 -0
  17. package/dist/lib/proof-folder.d.ts.map +1 -0
  18. package/dist/lib/proof-folder.js +226 -0
  19. package/dist/lib/proof-folder.js.map +1 -0
  20. package/dist/lib/proof-preview.d.ts +39 -0
  21. package/dist/lib/proof-preview.d.ts.map +1 -0
  22. package/dist/lib/proof-preview.js +318 -0
  23. package/dist/lib/proof-preview.js.map +1 -0
  24. package/dist/lib/proof-push.d.ts +42 -0
  25. package/dist/lib/proof-push.d.ts.map +1 -0
  26. package/dist/lib/proof-push.js +91 -0
  27. package/dist/lib/proof-push.js.map +1 -0
  28. package/package.json +5 -3
  29. package/runtime/proof.js +139 -0
  30. package/skills/scribe-site-builder/SKILL.md +69 -1
  31. package/skills/scribe-site-builder/recipes/README.md +10 -4
  32. package/skills/scribe-site-builder/recipes/collections.md +5 -0
  33. package/skills/scribe-site-builder/recipes/deploy.md +5 -0
  34. package/skills/scribe-site-builder/recipes/domains.md +5 -0
  35. package/skills/scribe-site-builder/recipes/forms.md +5 -0
  36. package/skills/scribe-site-builder/recipes/proofs.md +343 -0
  37. package/skills/scribe-site-builder/recipes/prospects.md +5 -0
  38. package/skills/scribe-site-builder/recipes/requests.md +5 -0
  39. package/skills/scribe-site-builder/recipes/schema.md +5 -0
@@ -0,0 +1,343 @@
1
+ # Recipe: proofs
2
+
3
+ > **The commands below are yours to run, not hers to read.** If she's asking
4
+ > what this is or how to do it, answer it the way *Who you're talking to* in
5
+ > [`../SKILL.md`](../SKILL.md) says to: what it is, what she'd say to get it,
6
+ > what's her call, and an offer to do it now.
7
+
8
+ A **Proof** is work the Agency sends a Client to look at — a board of logo
9
+ ideas, two colour schemes, a homepage mockup (RFC 0029). The Client opens a
10
+ link, reacts to the ideas with a thumbs up or down, comments, and approves or
11
+ asks for changes.
12
+ It replaces emailing a PDF and digging through the replies.
13
+
14
+ It is the mirror image of a Request, and conflating them is the mistake to
15
+ avoid:
16
+
17
+ | | Who starts it | Who owes the next move | Command |
18
+ |---|---|---|---|
19
+ | **Request** | the Client, asking for work | the Agency | `scribe request …` |
20
+ | **Proof** | the Agency, showing work | **the Client** | `scribe proof …` |
21
+
22
+ §6 and §10 are the parts to actually read. The rest is mechanics.
23
+
24
+ ## 0. If she asks "how do proofs work?"
25
+
26
+ She is asking what a proof *is* and what to say to get one — not for the
27
+ commands below. Answer in her language, roughly:
28
+
29
+ > A proof is a page you send a client so they can look at your work and tell
30
+ > you what they think — a board of logo ideas, two colour schemes, a new
31
+ > homepage. They get a link from Weaver Digital, give each idea a thumbs up or
32
+ > down, leave comments pinned to the spot they're talking about, and tap
33
+ > Approve or Request changes when they've decided. All of it comes back here,
34
+ > on that client's record, instead of in your email.
35
+ >
36
+ > You'd just ask me for it: *"make Acme six logo concepts from the brand notes
37
+ > in research/"*, then *"show me"* to see it exactly as the client will, then
38
+ > *"send it to Dana"*. Later: *"what did Acme say about the logos?"* and *"do
39
+ > three alternatives to the wheat one and drop the ones nobody liked, then
40
+ > send it"* — that goes out as version 2 on the same link, with version 1 one
41
+ > tap away.
42
+ >
43
+ > Two things are yours: I'll always check with you before anything is emailed,
44
+ > and a proof has to belong to a client, so I'll offer to add them as a
45
+ > prospect first if they're new.
46
+
47
+ Then offer to make one for a client she's actually working on. Don't list the
48
+ rounds, the folder layout, option ids or version rules unless she asks — she
49
+ finds those out by doing it once.
50
+
51
+ ## 1. Three rules that aren't negotiable
52
+
53
+ 1. **Never run `scribe proof send` without Ashley saying yes to that send.**
54
+ It emails a real person and freezes a version. Say who it is going to and
55
+ what the note says, then wait. Every other command here is reversible;
56
+ this one is not.
57
+ 2. **Never use Claude's Artifact tool for client review work.** If asked to
58
+ "send them an artifact", that means a Proof. An artifact lives on
59
+ claude.ai, is branded Claude, needs an account to open, and nothing it
60
+ collects reaches the client's record — which is the whole problem Proofs
61
+ exist to solve.
62
+ 3. **No Proof without a client.** A Proof belongs to a prospect or client. If
63
+ they don't exist yet, offer `scribe prospect create` first (see
64
+ [`prospects.md`](./prospects.md)).
65
+
66
+ ## 2. The folder
67
+
68
+ One folder per Proof, inside the client's folder:
69
+
70
+ ```
71
+ Acme Bakery/
72
+ research/
73
+ proofs/
74
+ logos/ ← one Proof
75
+ .scribe-proof.json ← written by `proof create`; links folder → Proof
76
+ index.html
77
+ images/
78
+ ```
79
+
80
+ `scribe proof create --client acme-bakery --title "Logo concepts" --dir proofs/logos`
81
+ makes the Proof and writes `.scribe-proof.json`. Every later command run
82
+ **inside that folder** needs no arguments — `scribe proof push`, not
83
+ `scribe proof push acme-bakery/logo-concepts`.
84
+
85
+ **The folder holds the latest version only.** Scribe keeps the history, so
86
+ never make `logos-v1/`, `logos-v2/` copies. To get an old one back:
87
+ `scribe proof pull --version 1 --dir <somewhere-new>`.
88
+
89
+ ## 3. The markup contract
90
+
91
+ Anything the Client should be able to react to or comment on gets
92
+ `data-proof-option`:
93
+
94
+ ```html
95
+ <figure data-proof-option="logo-5" data-proof-label="Bold serif, navy">
96
+ <img src="images/logo-5.svg" alt="">
97
+ </figure>
98
+ ```
99
+
100
+ - **`data-proof-option`** is the id. Letters, numbers, `-` and `_`, up to 64.
101
+ It is what feedback is recorded against, so `logo-5` means logo-5 in every
102
+ version it appears in. **Keep ids stable across versions** — renaming one
103
+ orphans its feedback.
104
+ - **`data-proof-label`** is what Ashley and the Client see next to it. Write
105
+ it for a human: "Bold serif, navy", not "Option 5".
106
+ - **`data-proof-from="logo-5"`** on a revision records what it came from, so
107
+ the console can group "logo-5 → 5a, 5b, 5c".
108
+
109
+ No script, import or stylesheet is needed for any of this. Scribe injects the
110
+ runtime that draws the **👍 / 👎** and **Comment** affordances.
111
+
112
+ **Give the main sections an `id`.** Pinned comments anchor to the nearest
113
+ element with an `id`, so `<section id="hero">` makes "the button under the
114
+ hero feels small" land on the hero rather than on a CSS path that moves.
115
+
116
+ ### Paths must be relative
117
+
118
+ `src="images/logo.svg"`, never `src="/images/logo.svg"`. A Proof is served
119
+ under a token prefix, so a root-absolute path 404s for the Client. `check`
120
+ refuses these, and that refusal is correct — fix the path rather than
121
+ passing `--force`.
122
+
123
+ ### No HTML at all
124
+
125
+ If the folder holds only images (or PDFs), skip the page entirely. Scribe
126
+ builds a gallery and names an Option after each file: `logo-5.png` →
127
+ `logo-5`. "Send Acme these four PNGs as menu-board options" needs no markup.
128
+
129
+ A hand-built page is still better when presentation matters — logos on a
130
+ mocked storefront, light and dark grounds. The gallery is the floor.
131
+
132
+ ## 4. The loop
133
+
134
+ ```
135
+ scribe proof check # what a push would refuse or warn about
136
+ scribe proof preview # open it locally, exactly as the client sees it
137
+ scribe proof push --note "…" # upload as the unsent draft. Sends nothing
138
+ scribe proof send # ← asks Ashley first. Emails the client
139
+ scribe proof show # status, versions, staff preview link
140
+ scribe proof link # the client's link; --rotate replaces it
141
+ ```
142
+
143
+ `preview` is a rehearsal: reactions, comments and pins all work, nothing is
144
+ saved and nobody is emailed. Run it before every push and offer Ashley the
145
+ URL.
146
+
147
+ One thing it will show you: **while a Proof is open for feedback, a click
148
+ anywhere on the work leaves a comment there** — the page's own links and
149
+ buttons don't fire, the same bargain Figma makes. So a Proof is one page of
150
+ work to talk about, not a clickable prototype; don't build one that needs
151
+ navigating, and don't tell Ashley a Client can click through it. Read-only
152
+ views (a closed Proof, an older version, the staff preview) behave like an
153
+ ordinary page again.
154
+
155
+ A **drag** rather than a click comments about a whole area: the box is drawn
156
+ out as it's pulled, and the comment remembers it as a fraction of whatever
157
+ element contains it, so it still covers the right thing after the page
158
+ reflows on a narrower screen. Hovering such a comment's pin outlines the area
159
+ again. That means a Proof wants real structure to hang those fractions off —
160
+ a page built out of one absolutely positioned layer gives every area the same
161
+ anchor, and the outlines drift together when the layout moves.
162
+
163
+ `push` replaces the single unsent draft each time, so tinkering doesn't burn
164
+ version numbers. **Only `send` creates a version the Client sees.** Push as
165
+ often as you like.
166
+
167
+ `check` before `push` — `push` runs it anyway, but reading the warnings
168
+ first is cheaper than a rejected upload.
169
+
170
+ ## 5. Sending
171
+
172
+ Confirm, then send:
173
+
174
+ > "This sends *Logo concepts v1* to Dana (dana@acme.test) with the note
175
+ > 'Six directions'. Send it?"
176
+
177
+ - No `--to` sends to the client's primary contact. `--to a@b.com c@d.com`
178
+ replaces that list and is remembered for next time.
179
+ - `--message "…"` overrides the push note for the email.
180
+ - A Client replying to the email reaches whoever sent it, not an unattended
181
+ mailbox.
182
+
183
+ If the client has no contact email, `send` fails **before** freezing
184
+ anything — fix the contact, or pass `--to`, then send again.
185
+
186
+ ## 6. The next round — the reason Proofs exist
187
+
188
+ **Read the feedback before changing anything:**
189
+
190
+ ```
191
+ scribe proof feedback # grouped by option: who reacted how, what they said
192
+ scribe proof feedback --json # same shape, for reading programmatically
193
+ scribe proof feedback --version 1 # an older version
194
+ ```
195
+
196
+ Then work the revision from what it actually says. Treat the new version as
197
+ **the current working set** — what's still genuinely in play — not an archive
198
+ of every option any version has ever shown. History isn't lost by leaving
199
+ something out: it's still sitting on its own version, and the Client (or
200
+ Ashley) can flip back to it with one tap, feedback and all (§2). So the
201
+ question for each option is "does the Client still need to be looking at
202
+ this?", not "did we ever show this?":
203
+
204
+ - An option **nobody reacted to and nobody mentioned** is a candidate to drop.
205
+ Dropping is normal — `check` reports dropped ids as one neutral line, not a
206
+ warning.
207
+ - An option with a **👍 and a comment** is the one to iterate on. Usually that
208
+ means the revision replaces it in the new version — mark it
209
+ `data-proof-from="<original>"` so the console shows the lineage — since the
210
+ Client already decided they liked the direction and is now just reacting to
211
+ the refinement. Keep both around instead if they genuinely still read as
212
+ two live contenders (two different directions both still being weighed,
213
+ say) rather than one superseded by the other.
214
+ - A **👎** is one worth asking about rather than guessing — a thumbs-down with
215
+ no words is still an answer, and worth Ashley's phone call. What she learns
216
+ decides whether it's dropped, revised, or (if the room's split) left in
217
+ for now.
218
+ - Push with a `--note` that says what changed in the Client's words ("Three
219
+ simpler takes on the one you liked"), because that note is what they read
220
+ in the email.
221
+
222
+ Then ask before sending, as always. The new version keeps the **same link**;
223
+ the Client lands on it with the older ones one tap away.
224
+
225
+ `scribe proof reply <event-id> "…"` answers one comment. The id is printed
226
+ beside every comment in `feedback`. The Client sees a reply the next time
227
+ they open the Proof — **Scribe never emails a reviewer**, because it only
228
+ ever asks their name. If a reply is urgent, tell Ashley to call.
229
+
230
+ A Client replies back by clicking the pin on the work itself, which opens the
231
+ thread with the box ready to type in — so a thread can run several turns
232
+ without a new version. Those replies come through `feedback` like any other
233
+ comment. The comment column beside the work is an index: clicking a row there
234
+ opens that thread on the work rather than answering in place.
235
+
236
+ Ashley can also reply by hand in the staff console, on the Proof's **Design**
237
+ tab, the same way — a pin, or a row in the column, opens the thread on the
238
+ work with a box to answer. Worth pointing her there when she wants to see the
239
+ thing being talked about while she answers, or when she's on a phone. The
240
+ **Feedback** tab answers in a list instead, grouped by idea. It is the same
241
+ event as `scribe proof reply` whichever she uses.
242
+
243
+ A **Reaction** is a comment that carries a thumb, which is why it reads in the
244
+ same list as everything else and takes replies the same way. One per Reviewer
245
+ per Option: a second thumb changes the first rather than adding to it, keeping
246
+ the words and the answers already under it. The badge on an Option is both
247
+ tools and marker — two thumbs and Comment until that Reviewer has used one,
248
+ then their own thumb with everyone's faces beside it, opening the whole list on
249
+ a click. A Reaction with an empty `body` is somebody who reacted without saying
250
+ why; report it as the answer it is rather than skipping it.
251
+
252
+ Whoever wrote a comment can **delete** it — the Client their own, Ashley her
253
+ own replies — from the thread on the work or from the column. Neither can
254
+ delete the other's. Clearing a Reaction (the same control, better named) takes
255
+ the thumb, the words and the replies together. Deleting the comment a thread
256
+ started with takes the whole thread with it, replies included, since a thread is one conversation and an
257
+ answer to a withdrawn question reads as noise.
258
+
259
+ A deleted comment leaves `feedback` entirely and leaves no event behind, so
260
+ never quote one back at Ashley as still outstanding, and don't be surprised
261
+ when a comment id from an earlier `feedback` run stops resolving — re-read the
262
+ feedback rather than assuming the proof changed underneath you.
263
+
264
+ ## 7. More than one person deciding
265
+
266
+ Owners forward the link to a business partner or spouse. That is supported and
267
+ usually good news: the second person types their own name and shows up as a
268
+ second reviewer, with their own reactions and comments.
269
+
270
+ What it means when reading `feedback`:
271
+
272
+ - **`👍` and `👎` list every reviewer who reacted that way**, so two people on
273
+ opposite sides of one option is a disagreement to surface *before* Ashley
274
+ calls, not during.
275
+ - **The status follows the most recent decision.** If one approves and the
276
+ other asks for changes, the Proof reads `changes-requested` — but both
277
+ decisions are listed, and the status is not the whole story. Say both.
278
+ - A new name appearing is worth mentioning once ("Marco's looked at it too"),
279
+ because it tells Ashley who is actually deciding.
280
+
281
+ Don't try to reconcile them. Report who said what and let Ashley decide.
282
+
283
+ ## 8. Working the queue
284
+
285
+ ```
286
+ scribe proof list # every Proof, most recently active first
287
+ scribe proof list --status changes-requested
288
+ scribe proof list --client acme-bakery
289
+ scribe proof list --unopened # sent 2+ days ago, never opened — call them
290
+ ```
291
+
292
+ In the browser, **Proofs** in the staff console has the same three views:
293
+ *Needs you*, *Waiting on client*, *Sent, not opened*. A due prospect in the
294
+ follow-up list also carries one line about a Proof waiting on them, so it is
295
+ in front of Ashley when she dials.
296
+
297
+ ## 9. Finishing, and housekeeping
298
+
299
+ ```
300
+ scribe proof close --reason "delivered" # stays readable on the same link forever
301
+ scribe proof reopen # carry on the same history with a new version
302
+ scribe proof link --rotate # the old URL stops working. Then send again
303
+ scribe proof link --expires 2026-12-31 # or "never" to clear it
304
+ ```
305
+
306
+ Close when the work is delivered. A closed Proof still opens, read-only, so a
307
+ Client hunting for "the logo we picked" next year finds it.
308
+
309
+ **A Proof can't be deleted from the CLI**, only closed — same as a prospect.
310
+ If one genuinely has to go, that's Dave.
311
+
312
+ ## 10. What to tell Ashley, and what not to
313
+
314
+ **Say:** who a send is going to, before sending. What the Client actually
315
+ said, in their words, before you change anything. That a link rotation
316
+ breaks the old URL.
317
+
318
+ **Don't say:** version numbers she didn't ask about, option ids as the
319
+ primary way of naming things (use the labels — "the wheat star one", not
320
+ "logo-5"), or anything about tokens, manifests or hashes. She asked for logo
321
+ ideas, not a build report.
322
+
323
+ **The one thing worth interrupting for:** a Client asked for changes, or
324
+ approved. That is the moment the work moves.
325
+
326
+ ## 11. Clients who already have a site
327
+
328
+ A Proof can be attached to one of the client's sites, and then asks them to
329
+ **sign in** with their normal Scribe login instead of typing a name:
330
+
331
+ ```
332
+ scribe proof create --client rods-auto --title "Homepage hero" --site rods-auto-body
333
+ ```
334
+
335
+ `--site` defaults the access mode to `sign-in`, and the Proof appears under
336
+ **Proofs** in that site's dashboard. If the person deciding has no login —
337
+ the owner's spouse, say — switch it:
338
+
339
+ ```
340
+ scribe proof link --access link
341
+ ```
342
+
343
+ Everything else is identical.
@@ -1,5 +1,10 @@
1
1
  # Recipe: prospects
2
2
 
3
+ > **The commands below are yours to run, not hers to read.** If she's asking
4
+ > what this is or how to do it, answer it the way *Who you're talking to* in
5
+ > [`../SKILL.md`](../SKILL.md) says to: what it is, what she'd say to get it,
6
+ > what's her call, and an offer to do it now.
7
+
3
8
  Ashley's calling pipeline lives in Scribe as Clients with `status: 'prospect'`.
4
9
  This recipe is about **recording and nurturing prospects she already has** —
5
10
  logging what happened on a call, scheduling the next touch, and moving one
@@ -1,5 +1,10 @@
1
1
  # Recipe: requests
2
2
 
3
+ > **The commands below are yours to run, not hers to read.** If she's asking
4
+ > what this is or how to do it, answer it the way *Who you're talking to* in
5
+ > [`../SKILL.md`](../SKILL.md) says to: what it is, what she'd say to get it,
6
+ > what's her call, and an offer to do it now.
7
+
3
8
  A **Request** is a Client asking the Agency to do work — a content change, a new
4
9
  page, a bug report, a question (RFC 0005). It is the mirror image of a
5
10
  submission, and conflating the two is the mistake to avoid:
@@ -1,5 +1,10 @@
1
1
  # Recipe: reading the schema
2
2
 
3
+ > **The commands below are yours to run, not hers to read.** If she's asking
4
+ > what this is or how to do it, answer it the way *Who you're talking to* in
5
+ > [`../SKILL.md`](../SKILL.md) says to: what it is, what she'd say to get it,
6
+ > what's her call, and an offer to do it now.
7
+
3
8
  `.scribe.yml` sits in the Site's repo root and is the contract between Scribe and
4
9
  the Site: it names the collections, their fields, where content lives, and which
5
10
  collections are forms. The admin keeps it current — editors change it through the