oficina / equipo Public

spec: Copy training and in-place review (rev 1)

Paul's 2026-11-30 ask: a Copy reviewer he can train with drills, and
in-place text edits and comments on a task's preview. Spec only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d6b1efd304bbc2481fb2b97de3da08d943b6b24a parent ea3022b
1 file changed, +710 −0
  • docs/superpowers/specs/2026-11-30-copy-trainer-and-in-place-review.md +710 −0
diff --git a/docs/superpowers/specs/2026-11-30-copy-trainer-and-in-place-review.md b/docs/superpowers/specs/2026-11-30-copy-trainer-and-in-place-review.md
new file mode 100644
index 00000000..284d87fe
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-30-copy-trainer-and-in-place-review.md
@@ -0,0 +1,710 @@
+# Copy training and in-place review
+
+Status: revision 1, 2026-11-30, drafted by Claude (Opus 5.5) on
+`copy-trainer-spec` from main ea3022bd. Nothing is built. Astra review
+pending. Mockups: section 9.
+
+Paul, 2026-11-30: "I'd also love there to be a copy review tool within
+Equipo that does something that one of the sessions on here discussed but
+we never built ... it would be a copy reviewer that I could train. At any
+point I could decide to opt in to training it and it would give me strings
+that I could rewrite, or a choice of a few ways of phrasing something and I
+would choose. It would potentially also have a version of the copy review
+tool we've built on here via agent-skills? The ability to overlay any web UI
+and let me edit in place, or make comments on a UI in place so that it
+would tweak and rebuild live."
+
+Two features:
+
+- **A. Copy training.** Opt-in drills on the person's real strings. Each
+ answer becomes one of their Copy notes.
+- **B. In-place review.** On a task's preview, the person edits text where
+ it sits, or comments on any element. Copy or Design changes the task's
+ branch, and the page refreshes.
+
+## 0. What exists today
+
+- **Copy** (spec 2026-11-13) runs only on projects where an owner turned on
+ "Copy can accept on my behalf". In contract mode (`.equipo/copy.json`) it
+ reviews changed strings in one structured call, and the runner applies
+ and accepts them through base-pinned scripts. Generic mode only flags.
+- **What teaches Copy.** Only the delegating owner's own edits on a task
+ card (`EditCopyWording`, `copy_edit.go`) and imported copy-review results
+ (`ImportCopyReview`). Both write `copy_feedback` rows (project, owner,
+ key, before, after, reason). `copyNotes` feeds Copy at most 40 of them,
+ 6 KiB. No page shows or forgets them; that UI was deferred. Forge diffs
+ never teach.
+- **Design's taste notes** (dynamic specialists 8.6, on branch
+ `design-feedback-1`, not built). The spec defines `chat_taste_notes`
+ (person, discipline, project or "" for all, source `words` or `choice`),
+ a notebook revision bumped by every write and forget, and a page that
+ leads with "Design knows N things about your taste" and offers Forget,
+ Forget everything and Add a note.
+- **The preview wrapper** (`preview_wrapper.go`). `/tasks/{id}/preview`
+ frames the deployed preview (a devbox share, or a public temporary place)
+ from its own origin: `sandbox="allow-scripts allow-same-origin"`, and a
+ wrapper CSP of `default-src 'none'; frame-src <preview origin>`. The
+ wrapper runs no script. The preview is cross-origin, so nothing in the
+ wrapper can read or touch it. Previews deploy after Review.
+- **The renderer** (dynamic specialists section 3, live since 27d50e7f).
+ A pinned headless Chromium on Linux runners, in a sandbox with no
+ network, renders a static tree (the base or a workspace snapshot).
+ Rendering a running app (`.equipo/render.json`) is slice 3 of that spec
+ and is not built.
+- **The copy-review skill** on docs-t1 (agent-skills). Agents put strings
+ in `strings.json`, build a scriptless preview with `data-copy` bindings,
+ and Paul edits in place beside the page. Inline Reroll asks a sandboxed
+ drafter for a fresh take. The result's hand edits are the taste signal.
+ The preview is same-origin with the review page, so the page's own
+ controller can reach into it. The preview runs nothing because of its
+ CSP, `script-src 'none'`.
+- **The rail.** Copy has a sidebar row and a page (`/team/copy`). Needs you
+ holds only work that is waiting on the person.
+
+## A. Copy training
+
+### A1. Who, and turning it on
+
+Training is for owners in v1, because Copy only ever works for an owner
+(question 1). On Copy's page, an owner sees a **Train Copy** block with
+**Start** (5 drills) and a switch, **Offer me drills**.
+
+- **Start** works any time, with the switch on or off. Opting in at any
+ moment is this button.
+- **Offer me drills** (off by default) lets Equipo prepare one session a
+ day and show it on Copy's sidebar row (A4).
+- **Stop** is the same switch. Turning it off deletes any prepared session
+ that hasn't started, so it costs nothing more. A session already started
+ can be finished or left. Notes stay until the person forgets them.
+
+The switch is per person and stored with a revision, like Copy's
+delegation. Removing a member, or changing their role away from owner,
+stops their offers and their sessions at once, and their notes stop
+reaching Copy.
+
+### A2. The drills
+
+A session is 5 drills: 3 picks and 2 rewrites, about two minutes. Each
+drill shows the string's project, where it appears, and a capture of that
+spot when one exists (B makes these; A works without them).
+
+**Pick the best phrasing.** Two to four phrasings, which differ on one
+**axis** only. Equipo's list of axes is fixed in code, so the model can't
+invent one:
+
+| Axis | What changes |
+|---|---|
+| Length | Fewer or more words, same meaning |
+| Formality | Casual to formal |
+| Warmth | Neutral to friendly |
+| Directness | Hedged to plain ("You may want to" vs "Do") |
+| Person | "You", "we", or neither |
+| Specificity | General to concrete (counts, names, times) |
+| Label form | Verb first ("Save changes") vs noun ("Changes") |
+| Sentence form | Fragment vs full sentence, with or without a full stop |
+
+One of the options is the app's current wording. Which one stays hidden
+until the pick (question 5). Copy writes the others in the prep call (A3),
+placed along the axis, such as shortest to longest. The instance checks what
+it can check: options are distinct; placeholders are the same multiset as
+the current string; each option fits the string's length limit when the
+contract gives one; the project's house rules hold where they can be checked
+mechanically (no em dashes and no exclamation marks for Equipo). For
+Length, word counts must rise in order. Any other axis is Copy's claim and
+is labelled as Copy's.
+
+The person taps one option, or **None of these** to open a box and write
+their own. **Skip** records nothing. After the pick, the drill reveals two
+things:
+
+- which option the app uses now;
+- whether Copy guessed the pick. Copy records its guess in the prep call,
+ before the person sees the drill, and it is never shown in advance.
+
+**Rewrite this.** The current string, its context, its placeholders as
+locked chips, and a box. Three ways to answer:
+
+- **Use mine** saves the typed text, with an optional "Why" line;
+- **It's fine as is** records that they kept it;
+- **Skip** records nothing.
+
+**Neither kind of drill changes the repository.** Changing a string found
+in a drill comes later, from the apply path that B builds (question 6).
+
+### A3. Where drills come from
+
+Drill strings come from the person's own projects, and only from projects
+with a copy contract in v1. Generic extraction picks up technical strings,
+which Paul has asked not to review (question 7).
+
+A **drill prep job** runs on the project's primary runner, the same way as
+Copy's other runner work:
+
+1. It runs the contract's `extract` at the default branch's tip, using the
+ contract and scripts as they are at that commit. It applies the same
+ containment, input and output bounds, and timeout as a Copy pass.
+2. It picks candidate strings deterministically, from the extracted ones
+ and the instance's exclusion list:
+ - **Excluded:** strings that are pending in an open task; strings whose
+ current text came from this person's own edit or import; strings
+ drilled for this person in the last 90 days; strings under 2 or over
+ 300 bytes; strings that are only placeholders.
+ - **Preferred, in order:** strings that changed on the default branch in
+ the last 30 days; strings Copy flagged as "Wording to check"; then a
+ spread across kinds (button, heading, error, empty state, help), using
+ the contract's optional `kind`.
+3. It makes one structured model call, in Copy's empty model workspace,
+ that writes the phrasings, the axis and the guess for the 3 pick drills.
+ It also writes a one-line "where it appears" for any string whose
+ contract context is only its key (true of Equipo today).
+ - **Inputs:** the strings, quoted as repository content; the house
+ rules section of AGENTS.md from that commit; and the person's current
+ Copy notes (A5), so that the drills probe what Copy doesn't know yet.
+ - **Output:** `{"version":1,"drills":[{"key","axis","options":[...],"current":i,"guess":j,"where"}]}`.
+ Everything the model writes is stored as Copy's words.
+ - **Validation:** the runner and the instance both check the output
+ strictly (A2). A drill that fails is dropped. A session needs at least
+ 4 valid drills; with fewer, the session is not offered and the error is
+ kept on the job.
+4. The instance stores the session for that person, bound to the project,
+ the commit and the job.
+
+**Cost.** The prep call runs on the person's own connections and shows in
+Usage as "Copy training". It uses Copy's model ceiling (cheap or standard,
+no fallback above it) and is limited to 16,384 tokens per call, 4 calls per
+person per day. It does not use the housekeeping ledger, so training never
+competes with Copy's repairs. Offers prepare at most one session a day.
+**Another 5** prepares another on the person's tap, up to the daily cap.
+
+### A4. When drills are offered
+
+Drills never appear in Needs you, notifications, push, email or the
+conversation. Needs you is for work that is waiting on the person, and a
+drill never is.
+
+- **With Offer me drills on** and a session ready, Copy's sidebar row
+ shows "5 drills" in place of "idle" while Copy is idle. Copy's page leads
+ with the Train block. That is the whole offer.
+- **Backing off.** If three offered sessions in a row expire unstarted
+ (each lasts 3 days), offers pause for 14 days, and Copy's page says so.
+ Start still works.
+- **Asking for it.** When the person asks the coordinator to train Copy,
+ it answers with a link to Copy's page. No new tool is needed.
+
+### A5. What an answer records
+
+Answers use the evidence classes that already exist (AGENTS.md: model text
+is never the person's words; a tapped option is a choice among model text).
+
+| Answer | Stored as | Default scope |
+|---|---|---|
+| Use mine / None of these + text | **Their words**: a `copy_feedback` row, origin `training`, before = current text at the drill's commit, after = typed text, reason = Why | The drill's project |
+| Pick | **Their choice**: a `chat_taste_notes` row, discipline `copy`, source `choice`: the axis (Equipo's words), each option (Copy's words, or "the app's wording" for the current one), the chosen index | All their projects |
+| It's fine as is | **Their choice**: kept the current wording, quoted as the app's wording | The drill's project |
+| None of these | Also a choice: rejected Copy's options | All their projects |
+| Add a note (Copy's page) | **Their words**: a `chat_taste_notes` row, source `words` | Their pick |
+
+The rules:
+
+- **Answers are the person's.** An answer is written in the transaction of
+ the person's authenticated tap. The actor comes from the session. The
+ drill must belong to that person and be unanswered, and the roster and
+ owner role are checked again in that transaction.
+- **A second tap is a no-op.** The answer's identity is the drill id.
+- **Rewrites skip delegation.** Training rows don't need delegation on
+ their project (today's `CanLearn` requires it for task edits), because
+ they are the person's notes, not Copy's work. They reach Copy only where
+ Copy runs for that person (A6).
+- **Bounds.** Typed text is at most 300 bytes, Why at most 200, and a note
+ at most 300.
+- **Audit.** Each answer appends an audit row with the actor, drill id and
+ answer kind, never the text.
+
+A rewrite is project-scoped because wording belongs to its product. Picks
+are about taste, which travels (question 3).
+
+### A6. How training changes Copy
+
+**What Copy proposes.** Every Copy pass on a project includes the
+delegating owner's notes, each quoted under a label naming its source
+(AGENTS.md rule 3): "Paul's own words, typed in a drill on 30 Nov" or
+"Paul's choice among phrasings Copy wrote, differing in length". The notes
+are ordered this project's first, then all projects, newest first:
+
+- words, meaning edits, imports, rewrites and typed notes: at most 40 and
+ 6 KiB, as today;
+- choices: at most 20 and 2 KiB, each rendered as "chose A over B and C
+ (axis)";
+- typed rules from Add a note: at most 10 and 1 KiB.
+
+That is 9 KiB in all, under the 12 KiB notebook ceiling. The plan
+re-measures the Copy baseline fixture with a full notebook against the
+32,768-token pass limit. If it doesn't fit, the oldest choices are dropped
+first.
+
+**Precedence, stated in the prompt.**
+
+1. The project's house rules at the trusted base;
+2. the owner's explicit instruction on the current task;
+3. their words;
+4. their choices;
+5. Copy's defaults.
+
+Within a class, newer wins. When Copy goes against a note, it says so in
+the string's flag.
+
+**What Copy accepts.** Training does not change Copy's authority. Notes
+never grant, widen or skip acceptance. Copy accepts only with delegation,
+a matching server record and the exact text hash. Notes never override
+placeholders, the owner's exact wording on a task, or house rules. Copy
+may flag fewer strings once it knows the person, but no rule depends on
+that.
+
+**How well Copy knows you.** Copy's page shows how often Copy guessed the
+person's pick in their last 20 picks ("Copy guessed 14 of your last 20
+picks"). Equipo counts it from records, so it is a measure, not a claim.
+It is shown for information only in v1 (question 2).
+
+### A7. Seeing, correcting, forgetting
+
+Copy's page shares the taste-notes page with Design (8.6). One template
+partial, `taste_notes`, takes a discipline. Whichever spec builds first
+builds `chat_taste_notes` and the partial; this one adds discipline `copy`.
+
+- **State first.** The page leads with "Copy knows 34 things about your
+ writing". Under it are chips counting each source (Your edits, Your
+ picks, Your rewrites, Your notes, Imported) and the guess rate.
+- **The notes.** Each row shows its source chip, its text, its project or
+ "All projects", its date, and **Forget**. Words show as before → after.
+ Picks show the chosen phrasing with the others struck through, and the
+ axis. Filtering by source uses the chips. **Forget everything** clears
+ the Copy notebook, and **Add a note** writes a rule.
+- **Copy's existing rows** (task edits and imports) appear here too, and
+ become forgettable for the first time.
+- **Forgetting** deletes the row and bumps the person's Copy notebook
+ revision. A Copy dispatch records the revision it used. The start
+ authorization refuses a stale one and dispatches again with a rebuilt
+ brief, as 8.6 does for Design. Copy is a structured call with no saved
+ session, so there is no resume to fence.
+- **Audit.** Each forget appends an audit row with the actor, note id and
+ source kind.
+- **Privacy.** Only the person sees their notes.
+
+### A8. Wire and storage (A)
+
+- **Protocol.** The next free protocol (40 if `design-feedback-1` lands
+ first) adds the drill prep job. A runner below it never gets one. The job
+ binds person, project, commit, the training switch's revision and the
+ notebook revision. The instance refuses a job result whose bindings have
+ moved.
+- **Migrations, additive:**
+ - `copy_training` (person, offers on, revision, paused until);
+ - `copy_drill_sessions` (id, person, project, commit, job, state, created,
+ expires);
+ - `copy_drills` (session, index, kind, key, current text, where, axis,
+ options, current index, guess, answer kind, answer, answered at);
+ - `chat_taste_notes` gains discipline `copy` (or is created here);
+ - a Copy notebook revision per person;
+ - the `copy_feedback` origin `training`.
+- **Contract.** The contract's `extract` output gains an optional `kind`
+ for each string. Equipo's `copy-contract.py` sets it from the key prefix
+ and the comment after the copy.go marker.
+
+## B. In-place review
+
+### B1. What the person sees
+
+The preview wrapper gains a three-way switch above the frame: **Live**,
+**Edit text**, **Comment**.
+
+- **Live** is today's frame.
+- **Edit text** and **Comment** show a **review copy** of one page (B2),
+ with a page picker and a viewport picker (phone, tablet, desktop).
+ - **Pages.** The picker lists the preview's pages: the HTML files in the
+ exported preview, and the pages `.equipo/render.json` names once
+ running-app renders exist. Opening from a Design option's Open live
+ starts on that option's page.
+ - **Editing.** Every piece of text that maps to a source string (B3) gets
+ a faint outline. Tapping one opens the editor: a side panel on desktop,
+ a bottom sheet on a phone, laid out like the copy-review skill's. The
+ page updates as the person types. Changes collect in a tray ("3
+ changes") with **Apply**. The tray autosaves on the instance, so a
+ reload or a move to another device loses nothing.
+ - **Commenting.** Tapping any element, or dragging a box, pins a comment.
+ Comments collect in the same tray with **Send**.
+ - **Refresh.** After Apply or Send, the tray shows each item's progress.
+ The review copy refreshes when the branch has the change (B5).
+
+Only the task's creator gets Edit text and Comment in v1. Everyone else who
+can see the task sees Live and nothing more. A preview opened through a
+preview pass (the cookie grant) is Live only.
+
+### B2. Why a review copy, and how it is made
+
+**Why not the live frame.** The live preview runs on another origin, so the
+wrapper cannot see its text or where the person tapped. Getting at it would
+mean running Equipo code inside the preview: an injected script, or a
+bridge that talks to the wrapper with `postMessage`. Either way untrusted
+content gets to tell the wrapper which string an element is, and to watch
+what the person types. So the overlay never touches the live preview.
+
+**The review copy** is a frozen, scriptless copy of one page, made by the
+runner's renderer from the task's current candidate and served from
+Equipo's own origin. It works the way the copy-review skill's preview does,
+with stronger walls.
+
+1. **Request.** The person taps Edit text or Comment, picks a page and a
+ viewport, and the instance asks the task's primary runner for a review
+ copy (a runner job, not a model step).
+2. **Render.** The runner renders the page with `render_page`'s rules (the
+ candidate tree, the renderer sandbox with no network, gitleaks before
+ any render), then serialises the loaded document:
+ - scripts, frames, objects, embeds, `base`, refresh tags and every `on*`
+ attribute are removed;
+ - links keep their text but lose `href`;
+ - forms lose `action`;
+ - every stylesheet, font and image is inlined as a `data:` URL, up to
+ 4 MiB for the whole copy. An image over that limit becomes an empty
+ box of the same size.
+
+ It also returns the **text map**: an Equipo id on each text-bearing
+ element or attribute (`alt`, `placeholder`, `title`, `aria-label`, a
+ button's `value`), with the text and its mapping (B3). It returns a
+ capture of the page too.
+3. **Check.** The instance parses the copy again with an allowlist
+ sanitiser in Go. It keeps only known elements and attributes, accepts
+ only `data:` URLs (including in CSS and `srcset`), and enforces the
+ size limits. Anything it can't parse is refused, never passed through.
+ It stores the copy as a task file, bound to task, candidate, attempt,
+ page and viewport.
+4. **Serve.** `GET /tasks/{id}/review/{copy}` sends the copy with this CSP:
+ `default-src 'none'; img-src data:; font-src data:; style-src
+ 'unsafe-inline'; script-src 'none'; form-action 'none'; base-uri 'none';
+ frame-ancestors 'self'; sandbox allow-same-origin`. It also sends
+ `nosniff` and `no-store`. It is readable only by members who can see the
+ task, through a signed-in session.
+5. **Overlay.** The wrapper's new script, `review-overlay.js`, is an Equipo
+ static file under the wrapper's CSP (`script-src 'self'`). It frames the
+ copy as `sandbox="allow-same-origin"`. Because the copy is same-origin
+ and runs nothing, the overlay can reach into it to:
+ - draw outlines;
+ - keep it inert (no navigation, and Enter and Space don't trigger
+ anything);
+ - select text, and show the edit as it is typed.
+
+ This is the copy-review controller, ported. copy-review found that iOS
+ Safari won't deliver events into a same-origin sandboxed frame without
+ `allow-scripts`. The plan proves the combination with the WebKit tests;
+ whichever one it needs, `script-src 'none'` and the response's CSP
+ sandbox keep scripts off.
+
+The review copy is a snapshot. Menus, hovers and states that need script
+don't appear in it. The live tab still has them, and Comment on Live
+(question 8) is later work.
+
+### B3. From an element to its source string
+
+Each element in the text map gets one of four mappings. The editor shows
+which one applies.
+
+1. **Marked (exact).** The app marks its strings when it is rendered for
+ review. The contract gains an optional `mark`, an environment variable
+ the render's serve command runs with. With it set, the app wraps each
+ string's output in private-use characters that carry the string's index
+ (U+E000 *n* U+E001 text U+E002), as in-context translation editors do.
+ This changes no markup, so attributes are covered too. Equipo's
+ `copyText` does this under `EQUIPO_COPY_MARKS=1`. The runner strips the
+ marks before the copy is served.
+
+ The page is untrusted, so the instance accepts a mark only when both
+ hold:
+ - the key is in the candidate's extraction (base-pinned scripts, run at
+ the candidate);
+ - the element's text equals that key's value once its placeholders are
+ filled.
+
+ Otherwise the element falls to method 2.
+2. **Matched (exact).** The element's text matches exactly one extracted
+ string, with placeholders matched as wildcards. Generic projects use the
+ generic literal extraction (Go, JS, TS, JSX, TSX, JSON, HTML templates),
+ which gives the literal's file and byte range. When the text matches
+ several strings, the editor lists them with their context, and the
+ person picks one. Copy-review's lesson applies: changing a string used
+ in several places changes all of them, so the editor says when a
+ contract string is shared.
+3. **Located (agent).** No extracted string matches, as with text built in
+ a template, or another app's file type. The edit becomes a request to
+ the task's maker (Engineering or Design): "change this text from X to Y
+ on page P". It carries the person's exact words, the element's selector
+ and its text quoted as page content. After the change, the runner
+ renders the page again and checks that the element now shows exactly
+ the person's text. The tray shows **Changed** or **Couldn't confirm**.
+4. **Not in the code.** Text that comes from the app's data (a CMS post, a
+ seed). The maker reports `not_in_code` with the place it found it, and
+ the editor says so. v1 edits code only.
+
+Strings with markup inside (bold, links) and text inside an SVG can't be
+edited in v1; the editor offers Comment instead.
+
+### B4. Who applies a change, and what it means
+
+**Text edits are the person's words.** Apply sends the batch (at most 50
+strings) as one change on the task's branch, which becomes one new
+candidate:
+
+- **Marked or matched strings** are applied by the runner, with no model:
+ - a contract project goes through the contract's base-pinned `apply`;
+ - a generic project gets an exact replacement of the literal's byte
+ range, escaped for its language. Only Go, JS, TS and HTML text are
+ supported. Other kinds fall to Located.
+
+ Tests change only through the contract's exact old-to-new literal rule,
+ as Copy already does. In a generic project, a test that asserts the old
+ text fails Checks and goes to the normal repair path.
+- **Located edits** are one maker step carrying all the located items.
+- **Placeholders** show as locked chips. The instance refuses a text whose
+ placeholder multiset differs.
+- **Teaching.** Every marked or matched edit is also a Copy note in the
+ person's words (origin `in-place`), the same as a task-card edit.
+ Located edits teach too, once confirmed.
+
+**Acceptance.** In a contract project, an owner's own typed text for a key
+is accepted copy. The person typed it, and the copy rules exist to make
+sure a person has reviewed every string. In the Apply transaction the
+instance writes a **person acceptance** record (actor, key, exact text
+hash, candidate). The runner invokes `accept` for the keys whose final hash
+matches that record, as it does for Copy's records, with the marker
+`ACCEPTED BY <name> (in place, <date>)`. A member's edit is applied but
+stays pending for Copy or an owner (question 4). Nothing here weakens the
+release gate. Pending text still blocks a release.
+
+**Ask Copy** (slice B1b). The editor has an instructions box and **Ask
+Copy**, like copy-review's Reroll. Copy returns 2 or 3 phrasings in one
+structured call that carries the string, its neighbours on the page and
+the person's notes. Copy's phrasings are its words:
+- picking one is a choice, which teaches as a pick does;
+- editing one makes it the person's words.
+
+Ask Copy runs only on a tap, on the person's connections, at most 30 times
+an hour.
+
+**Comments are the person's words to the maker.** Send makes one maker
+round on the task, addressed by the person with two chips:
+- **Look** goes to Design when Design is active for the project, otherwise
+ to Engineering;
+- **Wording** goes to Copy. In contract mode Copy proposes new text for the
+ mapped key, which comes back to the tray as a choice, never as an
+ applied change.
+
+Each comment carries:
+- the page, viewport and element selector;
+- the element's text, quoted as page content;
+- a crop of the region from the capture.
+
+Comment rounds count against the maker's run limit and fix rounds as Try
+again does. The person's Send is the person acting, as in 8.4. When the
+round ends, each comment shows **Done?** with **Resolve** and **Reopen**.
+Reopen sends it again with the person's added words.
+
+### B5. Rebuild and refresh
+
+After a batch lands on the branch:
+1. The runner renders the same page and viewport again from the new
+ candidate (static export, or the running app once render.json exists);
+2. it makes a new review copy;
+3. the overlay swaps it in.
+
+The tray shows "Updated 20 s ago", and **Before / After** switches between
+the two copies.
+
+Live updates on its own schedule: a new candidate means fresh Checks and
+Review, then the preview deploys as today. The switch shows "Live is
+behind: updating after review" until then.
+
+The tray reports progress per item, from records the instance holds:
+- for edits: Saved, Applying, Applied, Couldn't apply (with the reason);
+- for comments: Sent, Working, Done?.
+
+A task that is merging, done or cancelled offers no Edit text or Comment.
+An edit to a task that was ready to merge sends it back to review, and the
+switch says so before Apply.
+
+### B6. Security
+
+- **Where code runs.** The overlay runs in the wrapper as Equipo's own
+ script. Nothing from the preview runs alongside it. The review copy runs
+ nothing, enforced three ways:
+ - the allowlist sanitiser;
+ - `script-src 'none'`;
+ - the response's CSP sandbox without `allow-scripts`.
+
+ It loads nothing either: every resource is a `data:` URL, so there are no
+ beacons, tracking pixels or CSS that sends data out.
+- **Same origin.** The copy sits on Equipo's origin. With no script and no
+ forms it can't read cookies or the DOM, and it can't post. Equipo's GET
+ routes don't change state. Links have no targets, and the sandbox grants
+ no navigation or popups.
+- **Fake controls.** A page can draw a fake Equipo button inside the copy.
+ Real controls live only outside the frame, in the wrapper, and a tap
+ inside the copy only selects text. The frame is labelled "Review copy.
+ Nothing on it works."
+- **Text is data.** Element text, selectors and marks are page content.
+ They are quoted and labelled whenever they reach a model, and they never
+ grant anything. Mappings are verified against the trusted extraction
+ (B3).
+- **Who.** Edit and Comment need a signed-in session; preview passes are
+ Live only. The actor always comes from the session. Every POST checks
+ CSRF. The roster, role and task creator are checked again in each write
+ transaction. Only the creator can apply, and only an owner's text can be
+ accepted.
+- **A person taps first** (AGENTS.md rule 4). Every request starts with the
+ person's own tap:
+ - a review copy (and before it reaches their browser, it passes the
+ deterministic checks: sanitiser, limits, gitleaks);
+ - a model call (Ask Copy, comments, located edits);
+ - a branch change (Apply, Send).
+
+ Typing only autosaves the tray on the instance. Publishing the branch
+ goes through `AuthorizePublication` as every maker does.
+- **Limits.** One render at a time per runner (renderer rules); 30 review
+ copies per person per hour; 50 edits and 20 comments per batch; comments
+ at most 1,000 bytes.
+- **Audit.** Each review copy made, apply, send, resolve and reopen is
+ audited with the actor and ids, never the text.
+
+### B7. What comes from the copy-review skill
+
+**Ported**, and rewritten as Go and Equipo static JS:
+- the preview controller: sanitise, find bindings, draw markers, keep the
+ page inert (including Enter and Space), select several ids on one
+ element, update text as it is typed;
+- `preview-check`'s rule that bound text must equal its string, and that
+ bindings can't nest, which becomes B3's mark check;
+- the editor's layout: side panel, bottom sheet, locked placeholders;
+- the autosaved draft with a generation, so a page showing old strings
+ can't apply;
+- Reroll's prompt shape for Ask Copy: voice rules, the nearby strings, and
+ the person's hand edits as taste ("a demonstrated preference outranks a
+ described one");
+- `snapshot.mjs`'s way of inlining assets, now run in the renderer;
+- the frame-escape guard: when the frame leaves the review copy, detach and
+ bounce back, a bounded number of times.
+
+**New**:
+- the review-copy job, its serialiser and text map;
+- marks;
+- the Go sanitiser and the copy's CSP;
+- mapping against contract and generic extraction;
+- runner-applied exact replacement;
+- person acceptance;
+- comments with anchors and crops, and their routing;
+- the refresh loop;
+- the wrapper's switch.
+
+**Not taken**: the skill's always-on app and its file layout, the reroll
+jail, `serve.sh` and its tailnet serving. Equipo has its own runners,
+connections and origin.
+
+## C. The copy-review skill and Equipo
+
+They do different jobs today:
+- **The skill** is a drafting gate for any agent in any repository on
+ docs-t1. Copy is written into `strings.json` and reviewed before it
+ enters files.
+- **Equipo's Copy** reviews strings inside Equipo's task pipeline.
+
+The import (`/conversation/settings/copy`) already carries the skill's hand
+edits into Copy's notes.
+
+**Recommendation:** keep the skill as it is, and later make it a client of
+Equipo for Equipo projects. Do this after B1 has been used for a few weeks:
+
+1. **Submit to Equipo.** `copy-review submit --equipo <project>` sends
+ `strings.json` and the preview through a scoped agent token on the
+ person API. Equipo shows it as an in-place review on a review copy made
+ from the preview folder, through the same sanitiser and CSP. The result
+ goes back to the agent in today's `result.json` shape. Edits teach Copy
+ directly, with no import step.
+2. **Shared taste.** The skill's Reroll reads the person's Copy notes
+ through the person API, so taste is shared both ways.
+
+The skill stays on its own for repositories outside Equipo and for agents
+that have no Equipo token. It is not deprecated.
+
+## D. Slices
+
+1. **A: Copy training (M).** The drill prep job, sessions and drills, the
+ answers as notes, the switch and the sidebar offer, Copy's page through
+ the shared `taste_notes` partial (it builds `chat_taste_notes` if 8.6
+ hasn't), Forget and the revision fence, notes in Copy's prompt, the
+ guess rate.
+
+ Witness on staging, then production: Paul starts a session on Equipo's
+ strings and answers 5 drills. Copy's page shows the new notes and the
+ guess. He forgets one. The next Copy pass's dispatch carries the new
+ revision and quotes the notes.
+2. **B1: In-place text edits (L).** The review-copy job, the sanitiser and
+ CSP, the wrapper's switch, marks (with Equipo's `copyText`), matching,
+ the tray, Apply through the runner, person acceptance, the refresh.
+ Static previews come first. Equipo's own pages need running-app renders
+ (dynamic specialists slice 3), so B1 either follows that slice or lands
+ with it.
+
+ Witness: on a Design exploration, Paul edits a heading in place and taps
+ Apply. The review copy refreshes with his words, and the branch has one
+ commit with his text and his acceptance. Then the same on an Equipo
+ settings page, once render.json exists.
+3. **B1b (S).** Ask Copy in the editor, and **Change it in the app** on a
+ drill rewrite (question 6), reusing B1's apply path on a new task.
+4. **B2: Comments (M).** Pins and boxes, Look and Wording, crops, maker
+ rounds, Done? with Resolve and Reopen, and Located edits.
+5. **C (S to M, later).** The skill as an Equipo client.
+
+Every slice:
+- adds a protocol and additive migrations;
+- puts its strings in `copy.go`, marked pending for copy review;
+- gets a UX pass in the mockup kit first.
+
+Native clients keep Live only, and drills come to native after the web
+version has settled.
+
+## E. Questions for Paul
+
+1. **Owners only for training in v1?** Copy works only for owners, so a
+ member's notes would change nothing yet. *Recommend:* yes. Members come
+ later, if Copy starts using a task creator's notes for suggestions.
+2. **Should the guess rate change anything?** For example, fewer flags
+ once Copy guesses well. *Recommend:* show it only, for now, and decide
+ once there are a few weeks of numbers.
+3. **Default scope.** *Recommend:* picks and kept-as-is answers apply to
+ all your projects, and rewrites to their own project. You can forget any
+ of them.
+4. **Your typed text accepted without Copy.** In a contract project, an
+ owner's in-place edit is marked accepted by them, and a member's stays
+ pending. *Recommend:* yes.
+5. **Blind picks.** The current wording is hidden among the options until
+ you pick. *Recommend:* yes. It keeps the choice about the words rather
+ than about what's already there.
+6. **Changing a string from a drill.** *Recommend:* in B1b, a **Change it in
+ the app** tap on a rewrite. It starts a small task with your words,
+ through B1's apply path. Not in A, which never touches a repository.
+7. **Generic projects in drills.** Their extraction picks up technical
+ strings. *Recommend:* contract projects only, until there is a way to
+ filter those strings out.
+8. **Commenting on the live page.** States that need script (menus, open
+ dialogs) can't be reached in a review copy. *Recommend:* later. A
+ comment on Live would carry only a capture and the person's words, with
+ no element mapping.
+
+## 9. Mockups
+
+At 390 and 1280 wide, light and dark, from Equipo's own `tokens.css`,
+`theme.css` and `equipo.css`:
+
+1. Copy's page: what Copy knows, the Train block, the notes with Forget.
+2. A pick drill, before the pick, and after it with the reveal.
+3. A rewrite drill.
+4. Edit text on a review copy: the outlines, the editor, the tray.
+5. Comment on a review copy: pins, the Look and Wording chips, the tray.
+
+Shared at: (link added once shared).