| new file mode 100644 |
| index 00000000..4e04053b |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-11-30-design-feedback-1.md |
| @@ -0,0 +1,282 @@ |
| +# Design feedback 1 Implementation Plan |
| + |
| +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. |
| + |
| +**Goal:** Fix the direction card's two bugs (per-option choice, capture |
| +labels), require 3 or 4 described options, ask a few taste questions |
| +before the first options and keep the answers as taste notes, add More |
| +options and More like this, and link each option to its live preview. |
| + |
| +**Architecture:** Protocol 39 carries the new report fields (direction, |
| +page, capture labels and render facts), the taste notes and the round |
| +request on a Design dispatch. The instance validates options before |
| +Review, stores taste notes with a notebook revision checked at start, and |
| +renders per-option actions on the web card and task page. Live mockups |
| +reuse the preview wrapper with an option deep link. |
| + |
| +**Tech Stack:** Go (`CGO_ENABLED=0`), GORM on SQLite, Go templates, the |
| +thin runner's MCP tools, bubblewrap renderer (unchanged). |
| + |
| +**Spec:** `docs/superpowers/specs/2026-11-28-dynamic-specialists.md`, |
| +section 8 (revision 3.3) on top of sections 0 to 7 (revision 3.2, |
| +approved). Branch `design-feedback-1`, rebased onto main after |
| +`specialist-labels` merges; no code before that merge. |
| + |
| +## Global Constraints |
| + |
| +- `MinDesignOptions = 3`, `MaxDesignOptions = 4`, `MaxDesignCaptures = 12`, 1 to 3 captures per option in an exploration. |
| +- `direction`: 1 to 500 bytes of plain text; capture `label`: plain-label rules (`validOptionName`), at most 40 bytes; feel labels: plain-label rules, at most 30 bytes, at most 5; discovery boxes: at most 300 characters each. |
| +- Taste in a prompt: at most 60 notes, 300 characters each, 6 KiB, project notes first then newest. |
| +- Protocol 39 `ProtocolDesignFeedback`; migration `0125_design_feedback.sql`, additive. |
| +- Model text is never the person's words; every note is quoted under a label naming its source (AGENTS.md rules 1 and 3). |
| +- The Design sandbox has no network; preview gates are unchanged. |
| +- App strings only in `internal/equipo/copy.go`, marked pending (`scripts/copy-status.py pending`). Plain words, no em dashes, no exclamation marks. |
| +- Section 8.8 is Paul's: this plan assumes the recommendation (a pack edit keeps `design-v1`, each step records its pack digest). If he keeps the rule, Task 3 instead adds `design-v2` and an Update card per Design row. |
| + |
| +## Review Focus |
| + |
| +1. A card answered after a newer round arrived (stale `option.step`, or an index past the kept options) must conflict, never build the wrong option. Task 6 tests it. |
| +2. A Design exploration whose model never calls `submit_candidate`, or calls it with 2 options, must reach a fix round with Equipo's feedback, not Review and not a silent empty card. Task 4 tests it. |
| +3. Forget during a queued Design step: the step must not start with the forgotten note. Task 9 tests it. |
| +4. A discovery card answered twice (double tap, retry) writes its notes and continuation once. Task 10 tests it. |
| +5. `?option=` on the preview route with a forged page, a negative index, or a candidate that is not the deployed one returns 404. Task 12 tests it. |
| + |
| +## Facts the plan rests on (main 1755d03a) |
| + |
| +- Protocol is 38 (`ProtocolDesign`, `internal/wire/runners.go:254`); the next migration is 0125 (`internal/equipo/migrations/0124_step_renders.sql`). Whoever lands second renumbers. Several tests pin `ProtocolCurrent` (`grep -rn 'ProtocolCurrent' internal/wire/*_test.go`). |
| +- `wire.ValidOptions` (`internal/wire/design.go:261`) allows 0 to 4 options; `DesignCapture` has `ID`, `SHA256`, `TreeDigest`. The runner's `submit_candidate` schema is `internal/runner/thin/mcp.go:243`; the runner validates in `designstep.(*Attempt).submit` (`designstep.go:151`) and records captures in `keep` from `renderpage.Capture`, which has `Page render.Page` (path, viewport, full page). |
| +- The instance keeps options in `design_captures.go` (`:194`), reads them with `candidateDesign` (`:298`). `galleryOf` (`internal/equipo/design_views.go:36`) builds the gallery; captions are `work.captures.tree.<tree>`. |
| +- The direction card: `raiseDirection`, `answerDirection`, `buildThisOne` in `internal/equipo/chat/explore.go`; web card `internal/equipo/templates/chat.html:15`; task page `decision` and `design-gallery` in `templates/work_parts.html`; `work_views.go:788-810`. |
| +- `AnswerCard` is `internal/wire/api.go:419`. `personActed` (`design_routing.go:166`) resets `DesignRuns` on a card answer; `designGate` holds at `DesignRunLimit`. |
| +- `boundDispatch` (`grants.go:147`) fills a maker dispatch; `bindingHolds` (`grants.go:166`) is the start-time grant check. |
| +- The Design prompt is `designPrompt` and `designRules` in `internal/runner/thin/design_step.go:349-395`; the pack is pinned by digest in `internal/specialist/menu.go:107`. |
| +- The Add continuation is `internal/equipo/chat/specialist_added.go` (turn kind `wire.TurnSpecialistAdded`, `specialistTurnRecord`). |
| +- The preview wrapper is `internal/equipo/preview_wrapper.go`; `previewWrapper` accepts only a root URL. |
| +- The coordinator's `ask_person` and tool dispatch are in `internal/equipo/chat/tools.go` (`askPerson` `:977`, `status` `:765`); its MCP schema list is `internal/runner/thin/mcp.go:202`. |
| +- Design's page is `teamPage` in `internal/equipo/team_panel.go:80`. |
| + |
| +## Rules for every task |
| + |
| +Tests first: write the failing test, run it, see it fail for the right |
| +reason, then the code, then a mutation check for each guard (break it, see |
| +its test fail, restore). The commit body records the test command, the |
| +failure seen, and each mutation and result. Targeted |
| +`go test ./internal/<pkg>/... -run TestX` while working; `make ci` once at |
| +the end. `CGO_ENABLED=0`, Go caches at their defaults, scratch in on-disk |
| +`$TMPDIR` via `mktemp -d`, servers on 127.0.0.1. Never create, remove or |
| +prune worktrees; never merge, push main or deploy. Commit subjects under |
| +80 characters, trailer `Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>`. |
| +Order: 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14 (Task 7 uses Task 8's |
| +`writeTaste`). |
| + |
| +--- |
| + |
| +### Task 1: Protocol 39 and the wire |
| + |
| +**Files:** |
| +- Modify: `internal/wire/design.go`, `internal/wire/runners.go`, `internal/wire/tasks.go` (dispatch fields), `internal/wire/api.go` (`AnswerCard`), `internal/wire/explore.go` (choices, `TaskDirection`), `internal/wire/frames.go` (`ToolAskDesignTaste`, `ConverseTools`) |
| +- Test: `internal/wire/design_feedback_test.go`; update the `ProtocolCurrent` pins |
| + |
| +**Interfaces:** |
| +- Produces: |
| + - `const Protocol39 = 39; ProtocolDesignFeedback = Protocol39; ProtocolCurrent = ProtocolDesignFeedback` |
| + - `const MinDesignOptions = 3; MaxCapturesPerOption = 3; MaxDirection = 500; MaxCaptureLabel = 40; MaxFeel = 30; MaxFeels = 5; MaxTasteBox = 300` |
| + - `DesignOption{Name, Direction, Page string; Captures []DesignCapture}`; `DesignCapture{ID, SHA256, TreeDigest, Label, Viewport, Path string; FullPage bool}`; same new fields on `StepDesignOption` (`Direction`, `Page`) and `StepCapture` (`Label`, `Viewport`, `Path`, `FullPage`) |
| + - `func ValidOptions(opts []DesignOption) error` (unchanged rules) and `func ValidExploreOptions(opts []DesignOption) error`: 3 to 4 options, each a valid `Direction` (1 to `MaxDirection` bytes, valid UTF-8, no control or format characters), a `Page` matching `^[a-z0-9]+(-[a-z0-9]+)*$` (at most 60 bytes, unique), 1 to `MaxCapturesPerOption` captures each with a valid label and a viewport in `phone|tablet|desktop` |
| + - `TasteNote{ID, Source, Scope, Body, Question, Date string}` (`Source`: `words` or `choice`; `Scope`: `project` or `team`); `DispatchCommand.Taste []TasteNote`, `TasteRevision int64`, `TasteSkipped bool`, `DesignAsk *DesignAsk` |
| + - `DesignAsk{Kind string; Option *StepDesignOption; Current []StepDesignOption; Note string}` with `DesignAskMore = "more"`, `DesignAskLike = "like"` |
| + - `AnswerCard.Option *OptionRef`, `OptionRef{Step string; Index int}`; `ChoiceMore = "more"`, `ChoiceLike = "like"`; `TaskDirection.Rounds []DirectionRound` (`DirectionRound{Step string; Candidate string; Options []StepDesignOption; Live bool}`), `TaskDirection.PreviewRefused bool` |
| + - `CardDesignTaste = "design_taste"`, `ChoiceUseThese = "use"`, `ChoiceSkip = "skip"`; `AnswerCard.Taste *TasteAnswer` (`Feels []string; Other, Like, Avoid, Keep string`) |
| +- Downgrade below 39: a dispatch with `Taste`, `TasteSkipped` or `DesignAsk` set is refused (`ErrProtocol`); a report's new option and capture fields are dropped. |
| + |
| +- [ ] **Step 1: Write the failing tests**: `TestValidExploreOptions` (2 options refused, 5 refused, empty direction refused, 501-byte direction refused, a `` in direction refused, duplicate page refused, `Page: "../x"` refused, 4 captures on one option refused, missing label refused, 3 valid options pass); `TestDowngradeDesignFeedback` (dispatch with `DesignAsk` at 38 is `ErrProtocol`; report fields dropped at 38); `TestProtocolCurrent39`. |
| +- [ ] **Step 2: Run** `go test ./internal/wire/ -run 'TestValidExploreOptions|TestDowngradeDesignFeedback|TestProtocolCurrent39'`; expect compile failures, then FAIL. |
| +- [ ] **Step 3: Implement** the types and functions above; bump every `ProtocolCurrent` pin. |
| +- [ ] **Step 4: Run** `go test ./internal/wire/...`; PASS. |
| +- [ ] **Step 5: Commit** `wire: protocol 39 for Design feedback (options, taste, asks)`. |
| + |
| +### Task 2: The runner records capture facts and checks submit_candidate |
| + |
| +**Files:** |
| +- Modify: `internal/runner/designstep/designstep.go`, `internal/runner/thin/mcp.go:243`, `internal/runner/thin/design_step.go` |
| +- Test: `internal/runner/designstep/designstep_feedback_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 1's types and `ValidExploreOptions`. |
| +- Produces: `Attempt.Explore bool` and `Attempt.WorkPage func(page string) bool` (true when `<page>/index.html` exists in the step's latest work export); `keep` stores `Viewport`, `Path`, `FullPage` from `renderpage.Capture.Page`. |
| + |
| +- [ ] **Step 1: Failing tests**: `TestSubmitExploreNeedsThree` (2 options: tool error text contains `3 or 4 options` and nothing is recorded); `TestSubmitCaptureFactsFromRender` (the recorded capture's viewport and path equal the render call's, whatever the model sends); `TestSubmitPageMustExist` (a page with no `index.html` refused, text names the page); `TestSubmitChangeNoMinimum` (a change step with 1 option passes). |
| +- [ ] **Step 2: Run** `go test ./internal/runner/designstep/ -run 'TestSubmit'`; FAIL. |
| +- [ ] **Step 3: Implement.** The schema gains `direction`, `page` and captures as `{"file","label"}` objects; the fixed refusal texts name the broken rule. The thin runner sets `Explore` from the dispatch and `WorkPage` from the render export. |
| +- [ ] **Step 4: Run** the same tests plus `go test ./internal/runner/thin/ -run 'Design'`; PASS. |
| +- [ ] **Step 5: Commit** `runner: label captures from the render; Design submits 3 or 4 options`. |
| + |
| +### Task 3: The pack and the prompt |
| + |
| +**Files:** |
| +- Modify: `internal/specialist/packs/design-v1.md`, `internal/specialist/menu.go:107` (digest), `internal/runner/thin/design_step.go` (`designPrompt`, `designRules`) |
| +- Test: `internal/specialist/design_test.go`, `internal/runner/thin/design_prompt_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 1's `DispatchCommand.Taste`, `TasteSkipped`, `DesignAsk`. |
| +- Produces: `func tastePrompt(person string, notes []wire.TasteNote, skipped bool) string` and `func askPrompt(a *wire.DesignAsk) string` in `design_step.go`; each step's report records `PackDigest string`. |
| + |
| +- [ ] **Step 1: Failing tests**: `TestPackAsksThreeOrFour` (pack contains "three or four" and not "Two committed options"); `TestTastePromptQuotesSources` (a `words` note is quoted under "<person>'s own words", a `choice` note under "<person>'s choice among options Equipo's coordinator wrote", text passed through `wire.QuotedData`); `TestAskPromptLike` (`like` names the option and its direction as Design's words and the note as the person's); `TestSkippedSaysDefaults`. |
| +- [ ] **Step 2: Run** `go test ./internal/specialist/ ./internal/runner/thin/ -run 'TestPack|TestTastePrompt|TestAskPrompt|TestSkipped'`; FAIL. |
| +- [ ] **Step 3: Implement** the pack edits of spec 8.3 (sections 2 and 6, a new "Taste notes" section, a "More rounds" paragraph: keep earlier folders, new names), the new digest, the prompt lines, and `designRules`' `submit_candidate` shape. |
| +- [ ] **Step 4: Run** the tests; PASS. |
| +- [ ] **Step 5: Commit** `design: pack asks for 3 or 4 described options; prompt carries taste`. |
| + |
| +### Task 4: The instance keeps the new fields and checks options before Review |
| + |
| +**Files:** |
| +- Modify: `internal/equipo/chat/design_captures.go`, `internal/equipo/chat/explore.go` (`advanceExplore`), `internal/equipo/chat/review.go` (`fixRound` feedback source) |
| +- Test: `internal/equipo/chat/design_feedback_options_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 1. |
| +- Produces: `func (t *txn) designOptionsShort(p progress) (bool, error)` (true for a Design exploration attempt done with no options passing `ValidExploreOptions`); `designFeedbackOptions` fixed feedback text. |
| + |
| +- [ ] **Step 1: Failing tests**: `TestExploreTwoOptionsFixRound` (an approved-shaped Design attempt with 2 options gets a fix round carrying `designFeedbackOptions`, no Review step); `TestExploreNoSubmitFixRound`; `TestExploreShortAtMaxFixRounds` (at `MaxFixRounds` the task needs `NeedsFixRounds`); `TestOldReportStillShown` (a protocol-38 report with 2 options and no directions is shown, no fix round, since its step predates 39); `TestKeptCaptureFacts` (label, viewport, path, full page reach `StepCapture`). |
| +- [ ] **Step 2: Run** `go test ./internal/equipo/chat/ -run 'TestExplore|TestOldReportStillShown|TestKeptCaptureFacts'`; FAIL. |
| +- [ ] **Step 3: Implement.** The check runs in `advanceExplore` before `judge`, only for steps dispatched at 39 or above (the step's recorded protocol). |
| +- [ ] **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `chat: a Design exploration needs 3 or 4 options before Review`. |
| + |
| +### Task 5: Captions, directions and per-option buttons |
| + |
| +**Files:** |
| +- Modify: `internal/equipo/design_views.go`, `internal/equipo/templates/work_parts.html` (`design-gallery`, `decision`), `internal/equipo/templates/chat.html:15`, `internal/equipo/chat_page.go`, `internal/equipo/work_views.go:788-810`, `internal/equipo/static/equipo.css`, `internal/equipo/copy.go` |
| +- Test: `internal/equipo/design_views_test.go`, `internal/equipo/direction_card_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 1 (`StepCapture` fields, `DirectionRound`), Task 6's answer form fields `option_step` and `option_index`. |
| +- Produces: `designOptionView{Label, Direction, Step string; Index int; Live string; Captures []designCaptureView}`; `designCaptureView.Caption`; `galleryOf(taskID string, rounds []wire.DirectionRound, open bool, cardID string, revision int64) *designGallery`. |
| + |
| +- [ ] **Step 1: Failing tests**: `TestCaptionLabelViewport` ("Dashboard, desktop"; full page adds ", full page"); `TestCaptionOldReport` (no label, viewport known: "Desktop"; nothing known: "Mockup"); `TestCardPerOptionBuild` (rendered card has one form per option with `choice=build`, `option_step`, `option_index`, and no `<details data-direction-build>`); `TestCardMoreButtons` (More like this per option, More options once); `TestDirectionShown` (direction text escaped, under the option name); `TestTaskPageRounds` (two rounds, newest first, each option with Build). |
| +- [ ] **Step 2: Run** `go test ./internal/equipo/ -run 'TestCaption|TestCard|TestDirectionShown|TestTaskPageRounds'`; FAIL. |
| +- [ ] **Step 3: Implement.** New strings pending in `copy.go` (`work.captures.caption`, `work.captures.full_page`, `work.captures.viewport.<v>`, `chat.card.more`, `chat.card.like`, `work.captures.earlier`). |
| +- [ ] **Step 4: Run**; PASS. Render the card in a browser on 127.0.0.1 at phone and desktop width; record the screenshots' paths in the commit body. |
| +- [ ] **Step 5: Commit** `web: one Build per option, labelled captures, directions shown`. |
| + |
| +### Task 6: Answers: option, More options, More like this |
| + |
| +**Files:** |
| +- Modify: `internal/equipo/chat/explore.go` (`answerDirection`, `buildThisOne`, `directionView`), `internal/equipo/chat/tasks.go` (`stepRecord.DesignAsk`), `internal/equipo/chat/grants.go` (`boundDispatch` carries `DesignAsk`), `internal/equipo/chat_http.go` or the card answer handler (form fields), `internal/equipo/migrations/0125_design_feedback.sql` (steps `design_ask`) |
| +- Test: `internal/equipo/chat/direction_options_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 1 (`OptionRef`, `ChoiceMore`, `ChoiceLike`, `DesignAsk`). |
| +- Produces: `func (t *txn) keptOption(k taskRecord, ref wire.OptionRef) (stepRecord, wire.StepDesignOption, error)` (the step is a done maker step of `k` with kept options and a Review approve on its candidate; else `ErrCardConflict`); `func (t *txn) designRounds(k taskRecord, steps []stepRecord) ([]wire.DirectionRound, error)`. |
| + |
| +- [ ] **Step 1: Failing tests**: `TestBuildOptionOneTap` (no note, option 2: new task brief contains "option 2" and the name inside Design's quote label, not under the person's name); `TestBuildEarlierRound` (brief names the earlier round's candidate SHA); `TestBuildStaleOption` (index 5, a step of another task, a step with no approve: `ErrCardConflict`); `TestBuildNoteOnlyOldClient` (note, no option, 2 options: accepted); `TestMoreStartsRound` (`more`: a maker step from the current candidate with `DesignAsk{Kind:"more", Current: …}`; `DesignRuns` reset by `personActed`); `TestLikeNeedsOption`; `TestRoundsCountAgainstLimit` (after a `like`, three attempts then the fourth is held with `design_limit`). |
| +- [ ] **Step 2: Run** `go test ./internal/equipo/chat/ -run 'TestBuild|TestMore|TestLike|TestRoundsCount'`; FAIL. |
| +- [ ] **Step 3: Implement**; migration adds `steps.design_ask TEXT` (JSON). |
| +- [ ] **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `chat: Build, More like this and More options name an option`. |
| + |
| +### Task 7: Choice notes from Build and More like this |
| + |
| +**Files:** |
| +- Modify: `internal/equipo/chat/explore.go`, `internal/equipo/chat/taste.go` (Task 8) |
| +- Test: `internal/equipo/chat/taste_choices_test.go` |
| + |
| +Sequenced after Task 8. **Interfaces:** Consumes `t.writeTaste` (Task 8). |
| + |
| +- [ ] **Step 1: Failing test** `TestBuildWritesChoiceNote` (one `choice` note for the creator, project scope, body names the option and its direction as Design's words; a retried answer writes none); `TestLikeWritesChoiceNote`. |
| +- [ ] **Step 2: Run**; FAIL. **Step 3: Implement.** **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `chat: building or asking for more of an option teaches taste`. |
| + |
| +### Task 8: The taste notebook and Design's page |
| + |
| +**Files:** |
| +- Create: `internal/equipo/chat/taste.go` |
| +- Modify: `internal/equipo/migrations/0125_design_feedback.sql`, `internal/equipo/chat/store.go` (models), `internal/equipo/team_panel.go`, `internal/equipo/templates/` (Design page section), `internal/equipo/app.go` (routes), `internal/equipo/copy.go` |
| +- Test: `internal/equipo/chat/taste_test.go`, `internal/equipo/team_taste_test.go` |
| + |
| +**Interfaces:** |
| +- Produces: |
| + - `tasteNoteRecord{ID, Person, Discipline, ProjectID, Source, Body, Question, TaskID, CardID string; CreatedAt time.Time}` (table `chat_taste_notes`); `tasteBookRecord{Person, Discipline string; Revision int64}` (`chat_taste_books`) |
| + - `func (t *txn) writeTaste(person, project, source, body, question, task, card string) error` (bumps the revision, appends audit `taste.write` with note id and source only) |
| + - `func (s *Store) Taste(ctx, person string) ([]wire.TasteNote, int64, error)`; `AddTaste(ctx, person, project, text string) error`; `ForgetTaste(ctx, person, id string) error`; `ForgetAllTaste(ctx, person string) error` |
| + - routes `POST /team/{specialist}/taste`, `POST /team/{specialist}/taste/{id}/forget`, `POST /team/{specialist}/taste/forget` |
| + |
| +- [ ] **Step 1: Failing tests**: `TestTasteOnlyOwnerSees` (another member's page shows none of mine); `TestForgetDeletesAndAudits` (row gone, revision bumped, audit has no text); `TestAddTasteBounds` (301 characters refused, empty refused); `TestRemovedMemberTasteUnused`; `TestTastePageCount` ("Design knows 3 things about your taste"). |
| +- [ ] **Step 2: Run** `go test ./internal/equipo/... -run 'TestTaste|TestForget|TestAddTaste|TestRemovedMemberTaste'`; FAIL. |
| +- [ ] **Step 3: Implement**; actor from the verified session; roster checked in the write transaction. |
| +- [ ] **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `chat: taste notebook with add and forget on Design's page`. |
| + |
| +### Task 9: Taste in the dispatch and the stale-revision check |
| + |
| +**Files:** |
| +- Modify: `internal/equipo/chat/grants.go` (`boundDispatch`, `bindingHolds` caller), `internal/equipo/chat/runners.go` (start authorization), `internal/equipo/chat/design_routing.go` (`designCause`: runner below 39 waits as `design_runner_old`) |
| +- Test: `internal/equipo/chat/taste_dispatch_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 8's records. |
| +- Produces: `func (t *txn) tasteFor(person, project string) ([]wire.TasteNote, int64, bool, error)` (notes, revision, skipped); `stepRecord.TasteRevision int64` (migration column). |
| + |
| +- [ ] **Step 1: Failing tests**: `TestTasteOrderAndCaps` (61 notes: 60 sent, project first then newest, total under 6 KiB); `TestForgetRefusesQueuedStart` (dispatched at revision 4, forget makes 5, start refused, re-dispatched with 5 and without the note); `TestForgetFreshSession` (resume refused after a forget, fresh session); `TestOldRunnerWaits` (runner at 38: `design_runner_old`). |
| +- [ ] **Step 2: Run**; FAIL. **Step 3: Implement.** **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `chat: Design steps carry the creator's taste, refreshed after a forget`. |
| + |
| +### Task 10: Discovery: ask_design_taste, its card and continuation |
| + |
| +**Files:** |
| +- Create: `internal/equipo/chat/taste_ask.go` |
| +- Modify: `internal/equipo/chat/tools.go` (dispatch, `status` gains `taste: {notes, asked}` per Design specialist), `internal/equipo/chat/specialist_added.go` (allow the tool in the Add continuation for its project), `internal/runner/thin/mcp.go` (schema), the coordinator prompt's house rules, `internal/equipo/templates/chat.html` (card), `internal/equipo/migrations/0125_design_feedback.sql` (`chat_taste_asks`), `internal/equipo/copy.go` |
| +- Test: `internal/equipo/chat/taste_ask_test.go`, `internal/equipo/taste_card_test.go` |
| + |
| +**Interfaces:** |
| +- Consumes: Task 8 `writeTaste`; the continuation machinery of `specialist_added.go`. |
| +- Produces: `func (t *txn) askDesignTaste(r turnRecord, project string, feels []string) (wire.ToolResult, error)`; `func (t *txn) answerTaste(person string, c cardRecord, in wire.AnswerCard) (wire.Card, wire.Card, error)`; turn kind `wire.TurnDesignTaste`. |
| + |
| +- [ ] **Step 1: Failing tests**: `TestAskTasteOnce` (second ask for the same person and project: refused text says start Design now); `TestAskTasteRefusedWithNotes`; `TestAskTasteFeelsBounds` (6 feels, a 31-byte feel, markup: refused); `TestAnswerWritesNotes` (two feels: two `choice` notes with Equipo's question; three boxes: three `words` notes); `TestAnswerOnce` (double tap: one set of notes, one continuation); `TestSkipQueuesDefaults` (no notes, ask recorded skipped, continuation opening says skipped, next Design dispatch has `TasteSkipped`); `TestContinuationBound` (records one task in the card's project, starts it only with Design); `TestAskInAddContinuation`; `TestTasteCardRender` (feels as checkboxes, four boxes `maxlength=300`, Use these and Skip). |
| +- [ ] **Step 2: Run** `go test ./internal/equipo/... -run 'TestAskTaste|TestAnswer|TestSkip|TestContinuationBound|TestTasteCard'`; FAIL. |
| +- [ ] **Step 3: Implement.** The house rule text: before starting Design, call `status`; with no taste and no style, mood or reference in the request, ask; else start. |
| +- [ ] **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `chat: Design asks a few taste questions once per project`. |
| + |
| +### Task 11: (folded) native |
| + |
| +Native keeps Build with a note; `TaskDetails.swift` ignores unknown keys. A test in `native/apple/Tests/EquipoKitTests/TaskDetailModelTests.swift` decodes a fixture with the new fields. **Commit** `native: decode Design feedback fields without change`. |
| + |
| +### Task 12: Open live per option, and the refused-preview line |
| + |
| +**Files:** |
| +- Modify: `internal/equipo/preview_wrapper.go`, `internal/equipo/chat/explore.go` (`directionView`: `Live`, `PreviewRefused`), `internal/equipo/design_views.go`, templates, `internal/equipo/copy.go` |
| +- Test: `internal/equipo/preview_option_test.go` |
| + |
| +**Interfaces:** |
| +- Produces: `func previewWrapper(raw string, unsafe bool, page string) (string, string, error)` (page "" or a valid page; iframe src is root + page + "/"). |
| + |
| +- [ ] **Step 1: Failing tests**: `TestPreviewOptionFrames` (`?option=2` frames `https://eq-x.example/writing-desk/`, CSP origin unchanged); `TestPreviewOptionForged` (`option=-1`, `option=9`, `option=abc`, an option of an older round: 404); `TestOpenLiveOnlyDeployed` (no deployed preview: no link); `TestHeaderRefusedLine` (`preview_header_missing`: card shows `work.preview.host_outdated`). |
| +- [ ] **Step 2: Run**; FAIL. **Step 3: Implement.** **Step 4: Run**; PASS. |
| +- [ ] **Step 5: Commit** `web: Open live per option through the preview wrapper`. |
| + |
| +### Task 13: Copy |
| + |
| +Every new string is in `copy.go`, marked pending. Card titles and buttons |
| +go to Paul through the controller: the discovery card's title and its four |
| +questions, Use these, Skip, Build this one (per option), More like this, |
| +More options, Open live. Everything else goes to Luna as delegated. Apply |
| +results verbatim with the house markers. `make copy-release-check` passes. |
| + |
| +### Task 14: Whole-branch review and gate |
| + |
| +Astra reviews the branch (`codex exec -m gpt-6-astra -c model_reasoning_effort="high" … </dev/null`), three rounds at most; `make ci` once; push; CI green; report "say merge". |
| + |
| +## Reviews and the round limit |
| + |
| +Astra reviews the addendum and this plan (three rounds at most each), then |
| +each task. A P1 in round three means cut scope and go to Paul through the |
| +controller. |
| + |
| +## Verification and handoff |
| + |
| +`make ci` green locally once and on amadan CI. The finish line, after a |
| +release (Paul's): he asks for a design task on a project with no taste, |
| +answers or skips the questions, sees 3 or 4 labelled options with their |
| +directions, taps Build this one on one, and More like this on another. |
| +Open live appears once CARLOS's devbox share serves `_headers` (spec 8.5). |