| index b082a0ef..3a3ce5ce 100644 |
| --- a/docs/superpowers/plans/2026-11-30-design-feedback-1.md |
| +++ b/docs/superpowers/plans/2026-11-30-design-feedback-1.md |
| @@ -82,7 +82,7 @@ Order: 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14 (Task 7 uses Task 8's |
| - `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` |
| + - `func ValidOptions(opts []DesignOption) error` (unchanged rules, for reports below 39); `func ValidOptions39(opts []DesignOption) error`: `ValidOptions` plus every capture with a valid label and viewport, any number of options up to 4 (change tasks); and `func ValidExploreOptions(opts []DesignOption) error`: `ValidOptions39` plus 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` |
| @@ -90,7 +90,7 @@ Order: 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14 (Task 7 uses Task 8's |
| - Downgrade below 39: a dispatch whose `Profile` is `design-v1` is refused (`ErrProtocol`) whatever its optional fields, and so is any dispatch with `Taste`, `TasteSkipped`, `DesignAsk` or `ForgetRevision` set; a report's new option and capture fields are dropped. |
| - `DispatchCommand.ForgetRevision int64` (8.6: the runner resumes a saved session only at the same forget revision). |
| |
| -- [ ] **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` (a bare `design-v1` dispatch with no taste and no ask at 38 is `ErrProtocol`; one with `DesignAsk` too; report fields dropped at 38); `TestProtocolCurrent39`. |
| +- [ ] **Step 1: Write the failing tests**: `TestValidOptions39` (a one-option change passes with valid labels; a missing, 41-byte or markup label fails); `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` (a bare `design-v1` dispatch with no taste and no ask at 38 is `ErrProtocol`; one with `DesignAsk` too; 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. |
| @@ -106,9 +106,9 @@ Order: 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14 (Task 7 uses Task 8's |
| - Consumes: Task 1's types and `ValidExploreOptions`. |
| - Produces: `Attempt.Explore bool` and `Attempt.WorkPages func(ctx context.Context, pages []string) (missing []string, err error)`: takes a fresh workspace snapshot with the render tool's snapshot (pause, private index, tree object; `busy` on failure) and lists the pages without `<page>/index.html` as a regular file in that tree. Never an earlier render's export (`renderpage.Tool.accepted` deletes it). `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); `TestSubmitPageDeletedAfterRender` (render the page, delete its folder in the workspace, submit: refused), using the real snapshot, not a stub; `TestSubmitChangeNoMinimum` (a change step with 1 option passes). |
| +- [ ] **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); `TestSubmitPageDeletedAfterRender` (render the page, delete its folder in the workspace, submit: refused), using the real snapshot, not a stub; `TestSubmitChangeNoMinimum` (a change step with 1 labelled option passes; one with an unlabelled capture is refused). |
| - [ ] **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 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 `WorkPages` from the render tool's snapshot. Every protocol-39 submission is checked with `ValidOptions39`, explorations with `ValidExploreOptions`. |
| - [ ] **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`. |
| |
| @@ -170,9 +170,9 @@ Order: 1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14 (Task 7 uses Task 8's |
| - 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 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`); `TestFixRoundInheritsAsk` (Review asks for changes, and separately the option check starts a fix round: each fix step's dispatch carries the round's `DesignAsk`, and after a forget forces a fresh session the launch prompt still names the option and note). |
| - [ ] **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 3: Implement**; migration adds `steps.design_ask TEXT` (JSON). `fixRound` (`review.go:401`) copies the newest maker step's `DesignAsk` onto the fix step; Try again and a new More round replace it. |
| - [ ] **Step 4: Run**; PASS. |
| - [ ] **Step 5: Commit** `chat: Build, More like this and More options name an option`. |
| |
| @@ -227,15 +227,15 @@ Sequenced after Task 8. **Interfaces:** Consumes `t.writeTaste` (Task 8). |
| |
| **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 this one card-raising tool in the Add continuation, for the card's project only), `internal/runner/thin/mcp.go` (schema), the coordinator prompt's house rules, the card-answer path that builds `Answered` today (its message and person turn), `internal/equipo/templates/chat.html` (card), `internal/equipo/migrations/0125_design_feedback.sql` (`chat_taste_asks`), `internal/equipo/copy.go` |
| +- Modify: `internal/equipo/chat/tools.go` (dispatch, `status` gains `taste: {notes, asked}` per Design specialist), `internal/equipo/chat/specialists.go` (`propose_specialist` takes `feels`; the Add card shows the questions; Add writes the answers before `queueSpecialistAdded`), `internal/equipo/chat/projects.go` (`answerPrefix`: a taste card's answer carries the ask's stored words), `internal/runner/thin/mcp.go` (schema), the coordinator prompt's house rules, the card-answer path that builds `Answered` today (its message and person turn), `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 existing card answer's message and person turn. |
| -- 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)`. No new turn kind. |
| +- Produces: `func (t *txn) askDesignTaste(r turnRecord, project string, feels []string) (wire.ToolResult, error)` (person turns only, refused in every continuation); `func (t *txn) answerTaste(person string, c cardRecord, in wire.AnswerCard) (wire.Card, wire.Card, error)`; `func (t *txn) writeDiscovery(person, project, card string, in *wire.TasteAnswer) error` shared by the taste card and the Add card; `tasteAskRecord.Words` (the asking turn's messages, `addedWord` JSON). No new turn kind. |
| |
| -- [ ] **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 message, one turn; the second is a card conflict); `TestAnswerFramedBySource` (the turn's prompt frames typed boxes as the person's words and feels and Skip as choices among options others wrote); `TestSkipRecorded` (no notes, ask recorded skipped, next Design dispatch has `TasteSkipped`); `TestAskInAddContinuation` (allowed for the card's project, refused for another; the person's answer then runs an ordinary turn that can record and start the task with Design); `TestTasteCardRender` (feels as checkboxes, four boxes `maxlength=300`, Use these and Skip). |
| -- [ ] **Step 2: Run** `go test ./internal/equipo/... -run 'TestAskTaste|TestAnswer|TestSkip|TestAskInAdd|TestTasteCard'`; FAIL. |
| +- [ ] **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 message, one turn; the second is a card conflict); `TestAnswerFramedBySource` (the turn's prompt frames typed boxes as the person's words and feels and Skip as choices among options others wrote); `TestSkipRecorded` (no notes, ask recorded skipped, next Design dispatch has `TasteSkipped`); `TestAskRefusedInContinuation` (`ask_design_taste` in a `specialist_added` turn is refused); `TestAddCardWithAnswers` (Add with two feels and a box writes three notes, then the continuation is queued with its usual binding: another project, a second task and Engineering are still refused); `TestNotNowWritesNoTaste`; `TestAnswerCarriesRequest` (51 messages after the request, fresh coordinator session: the answer turn's prompt contains the original request under the person's label); `TestTasteCardRender` (feels as checkboxes, four boxes `maxlength=300`, Use these and Skip). |
| +- [ ] **Step 2: Run** `go test ./internal/equipo/... -run 'TestAskTaste|TestAnswer|TestSkip|TestAskRefused|TestAddCard|TestNotNow|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`. |
| @@ -280,6 +280,15 @@ to a step (Task 12); `dispatch_protocol` on steps (Task 4); protocol 39 |
| required for every Design dispatch and at start (Tasks 1, 9); page check |
| on a fresh snapshot (Task 2). |
| |
| +## Astra round 2: NOT READY (3 new findings and one open, all taken) |
| + |
| +The taste questions ride the Add card when Design is new, so the Add |
| +continuation keeps its binding and stored request, and `ask_design_taste` |
| +is refused in every continuation; a live-turn answer carries the ask's |
| +stored words (Task 10). Fix rounds inherit `DesignAsk` (Task 6). |
| +Protocol-39 capture labels are checked on change reports too (Tasks 1, |
| +2). |
| + |
| ## Reviews and the round limit |
| |
| Astra reviews the addendum and this plan (three rounds at most each), then |