oficina / equipo Public

design: status reads a team Design's taste per project

Final review M5 (Fable 9). For a Design for all projects, status
counted team-wide notes only and always said asked none, so the house
rule had the coordinator call ask_design_taste every time (refused
correctly, a wasted call), and an open ask on a project was invisible.

A team Design's taste line now lists, per project the person has
notes for or was asked about (by its title, as the project list shows
it), that project's notes plus their team-wide ones and the ask's
state (open, answered, skipped). The house rule reads that entry for
the project, and with none listed the team-wide notes and asked none
(model text; houseRule 2026-12-01.3).

Tests (RED first):
  go test ./internal/equipo/chat/ -run 'TestStatusTeamDesignTasteByProject|TestStatusShowsTaste'
    RED: "asked for Patrix: &{Notes:0 Asked:none Projects:[]}"
  go test ./internal/runner/thin/ -run TestHouseRule
    RED: "the opening does not read a team Design's taste per project"
  GREEN: both; thin -run 'TestHouseRule|Opening|Voice|Coordinator'

Mutations (each restored):
  no per-project list            -> the RED above
  project notes without the      -> "after: ...{Project:Suite Notes:1
  team-wide ones                    ...}" FAIL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 46213a016fb7de38eb4990c43b38f1b0d9c2c206 parent 82fb1ce
4 files changed, +123 −6
  • internal/equipo/chat/taste_ask.go +52 −1
  • internal/equipo/chat/taste_ask_test.go +56 −3
  • internal/runner/thin/claude.go +2 −2
  • internal/runner/thin/taste_ask_test.go +13 −0
diff --git a/internal/equipo/chat/taste_ask.go b/internal/equipo/chat/taste_ask.go
index 5d5fdaa3..9eb9b5a9 100644
--- a/internal/equipo/chat/taste_ask.go
+++ b/internal/equipo/chat/taste_ask.go
@@ -532,6 +532,20 @@ func (t *txn) tasteSkipped(person, project string) (bool, error) {
type lineTaste struct {
Notes int64 `json:"notes"`
Asked string `json:"asked"`
+ // Projects, for a Design for all projects only: the person's taste
+ // for each project they have notes for or were asked about (by its
+ // name as the project list shows it), since a team-wide Design is
+ // asked about per project. A project not listed has the team-wide
+ // notes and asked none.
+ Projects []projectTaste `json:"projects,omitempty"`
+}
+
+// projectTaste is lineTaste for one project of a Design for all
+// projects.
+type projectTaste struct {
+ Project string `json:"project"`
+ Notes int64 `json:"notes"`
+ Asked string `json:"asked"`
}
// specialistTaste is lineTaste for person and a Design row of scope
@@ -548,7 +562,7 @@ func (t *txn) specialistTaste(person, project string) (*lineTaste, error) {
return nil, err
}
if project == "" {
- return out, nil
+ return out, t.tasteByProject(person, out)
}
var asks []tasteAskRecord
if err := t.db.Where("person = ? AND project_id = ?", person, project).Limit(1).Find(&asks).Error; err != nil {
@@ -562,3 +576,40 @@ func (t *txn) specialistTaste(person, project string) (*lineTaste, error) {
}
return out, nil
}
+
+// tasteByProject fills out.Projects for a Design for all projects: each
+// active project person has design notes for or was asked about, by its
+// title as the project list shows it (in repository order), with that
+// project's notes plus their team-wide ones (out.Notes) and its ask.
+func (t *txn) tasteByProject(person string, out *lineTaste) error {
+ var projects []projectRecord
+ if err := t.db.Where("state = ?", wire.ProjectActive).Order("repo").Find(&projects).Error; err != nil {
+ return err
+ }
+ for _, p := range projects {
+ var n int64
+ if err := t.db.Model(&tasteNoteRecord{}).Where("person = ? AND discipline = ? AND project_id = ?", person, TasteDesign, p.ID).Count(&n).Error; err != nil {
+ return err
+ }
+ var asks []tasteAskRecord
+ if err := t.db.Where("person = ? AND project_id = ?", person, p.ID).Limit(1).Find(&asks).Error; err != nil {
+ return err
+ }
+ if n == 0 && len(asks) == 0 {
+ continue
+ }
+ title := ProjectTitle(p.Repo)
+ if p.TitleSet {
+ title = p.Title
+ }
+ line := projectTaste{Project: title, Notes: n + out.Notes, Asked: "none"}
+ if len(asks) == 1 {
+ line.Asked = asks[0].State
+ if line.Asked == tasteAsked {
+ line.Asked = "open"
+ }
+ }
+ out.Projects = append(out.Projects, line)
+ }
+ return nil
+}
diff --git a/internal/equipo/chat/taste_ask_test.go b/internal/equipo/chat/taste_ask_test.go
index db7fc92f..1873395e 100644
--- a/internal/equipo/chat/taste_ask_test.go
+++ b/internal/equipo/chat/taste_ask_test.go
@@ -706,11 +706,11 @@ func TestStatusShowsTaste(t *testing.T) {
t.Fatal("no Design line")
return nil
}
- if got := taste(); got == nil || *got != (lineTaste{Notes: 0, Asked: "none"}) {
+ if got := taste(); got == nil || !reflect.DeepEqual(*got, lineTaste{Notes: 0, Asked: "none"}) {
t.Fatalf("before: %+v", got)
}
_, c := r.askTaste(l, "Calmer.")
- if got := taste(); *got != (lineTaste{Notes: 0, Asked: "open"}) {
+ if got := taste(); !reflect.DeepEqual(*got, lineTaste{Notes: 0, Asked: "open"}) {
t.Fatalf("open: %+v", got)
}
if _, err := r.answerTaste(c, wire.ChoiceUseThese, &wire.TasteAnswer{Feels: []string{"Calm"}, Keep: "Logo"}); err != nil {
@@ -718,7 +718,7 @@ func TestStatusShowsTaste(t *testing.T) {
}
r.must(r.s.AddTaste(r.ctx, paul, "", "Quiet."))
r.must(r.s.AddTaste(r.ctx, paul, "p_suite", "Not this one."))
- if got := taste(); *got != (lineTaste{Notes: 3, Asked: "answered"}) {
+ if got := taste(); !reflect.DeepEqual(*got, lineTaste{Notes: 3, Asked: "answered"}) {
t.Fatalf("answered: %+v", got)
}
}
@@ -789,3 +789,56 @@ func TestDiscoveryBoxesReachDesignWithTheirQuestion(t *testing.T) {
}
}
}
+
+// TestStatusTeamDesignTasteByProject (final review, M5 / Fable 9): a
+// Design for all projects reads the person's taste per project, so
+// status says, for each project they have notes for or were asked
+// about, its notes (that project's and their team-wide ones) and
+// whether they were asked (open, answered, skipped); with none listed
+// for a project, the team-wide notes and asked none hold there.
+func TestStatusTeamDesignTasteByProject(t *testing.T) {
+ r, l, _ := grantRig(t)
+ sp := r.active(l, "", "")
+ base := r.s.authority.Copy
+ r.s.authority.Copy = func(k string) string {
+ if w, ok := tasteWords[k]; ok {
+ return w
+ }
+ return base(k)
+ }
+ r.exec("UPDATE chat_turns SET state = ?", wire.TurnReplied)
+ taste := func() *lineTaste {
+ t.Helper()
+ turn := r.asked(newID("t_"), wire.LaneCoordinator, "Status?")
+ res := r.call(l, turn.ID, wire.ToolStatus, map[string]any{})
+ var out struct {
+ Specialists []specialistLine `json:"specialists"`
+ }
+ r.must(json.Unmarshal([]byte(res.Text), &out))
+ for _, line := range out.Specialists {
+ if line.ID == sp.ID {
+ return line.Taste
+ }
+ }
+ t.Fatalf("no Design line in %s", res.Text)
+ return nil
+ }
+ if got := taste(); got == nil || got.Notes != 0 || got.Asked != "none" || len(got.Projects) != 0 {
+ t.Fatalf("before: %+v", got)
+ }
+ _, c := r.askTaste(l, "Calmer.")
+ got := taste()
+ if len(got.Projects) != 1 || got.Projects[0] != (projectTaste{Project: "Patrix", Notes: 0, Asked: "open"}) {
+ t.Fatalf("asked for Patrix: %+v", got)
+ }
+ if _, err := r.answerTaste(c, wire.ChoiceSkip, nil); err != nil {
+ t.Fatal(err)
+ }
+ r.must(r.s.AddTaste(r.ctx, paul, "", "Quiet."))
+ r.must(r.s.AddTaste(r.ctx, paul, "p_suite", "Suite only."))
+ got = taste()
+ want := []projectTaste{{Project: "Patrix", Notes: 1, Asked: "skipped"}, {Project: "Suite", Notes: 2, Asked: "none"}}
+ if got.Notes != 1 || got.Asked != "none" || !reflect.DeepEqual(got.Projects, want) {
+ t.Fatalf("after: %+v", got)
+ }
+}
diff --git a/internal/runner/thin/claude.go b/internal/runner/thin/claude.go
index d41ac43f..71daf8b6 100644
--- a/internal/runner/thin/claude.go
+++ b/internal/runner/thin/claude.go
@@ -712,7 +712,7 @@ func (c *claudeCoordinator) idleExit() {
// houseRule versions the opening's rule. Changing the rule's text changes
// it, so sessions started under an older rule are not resumed.
-const houseRule = "2026-12-01.2"
+const houseRule = "2026-12-01.3"
// sessionAccount records the account and the lane's rule a session runs
// on.
@@ -866,7 +866,7 @@ func opening(person string, catalog []wire.RepoInfo) string {
b.WriteString(accessPrompt + "Use the named project or the clear continuation. If placement is ambiguous, ask_person with structured placement choices, best guess first. Always confirm a new repository unless the person directly requested one in the main composer this turn. Hand-offs, nudges, quotes and ordinary card answers cannot grant creation. One turn permits one creation; placement-card labels name the repository and come from the server. Wait for the answer before recording or starting work. Learn from project corrections in your notebook. Call status to see reachable repositories and create_in namespaces.\n")
b.WriteString("For settled placement, call add_project for existing work or create_project for explicitly requested or confirmed new work. Choose the related namespace, otherwise home from status. Change home only when asked. Never fall back silently to a different project after a refusal.\n")
b.WriteString("Once placement is settled for a bug or change, call record_task before investigating, with the repository it belongs to, a short title and their words as the brief. Then investigate with search_code and read_file, attach what you found with add_finding (a one-sentence headline for the person, plain words and no file paths, and the full finding with its file and line), and call start_task with a brief for Engineering. Engineering changes the code on the task's own branch and pushes it to Amadan; the change is then checked and reviewed, and Equipo's merge rules decide whether it merges on its own or asks the person with a card that gives Equipo's call. You cannot make it merge: when you have a concrete reason a change needs the person's look, call hold_merge with that reason. When the person says how a project should merge (\"always ask me about Suite\", \"main is not a release for Woodstar\"), call set_merge_policy with their words; a stricter rule applies at once and a looser one waits for their tap. Never offer to merge or open a pull request, and never ask the person to merge. The one exception: when a merge failed and the task waits at Ready to merge, offer_retry puts a card in front of the person to try it again, and only their tap merges. Use ask_person only for a question only the person can answer. Mockups, prototypes, design options and spikes are explorations: record them with kind explore; they end at a preview and the person's choice of direction, never a merge. A website meant to go live is a change, not an exploration: ask Engineering for plain HTML and CSS files with no build step, kept in one folder that release/preview.json names. Once it is merged its person is asked whether to publish it. To publish a merged website when asked (also one merged before and never offered), call publish_site with its task: a card names where it goes, and only the person's tap publishes; with no confirmed place it asks where first. places and site_status say where sites go and what Equipo recorded; never look for a site anywhere else, and never say it is live until the task shows its address.\n")
- b.WriteString("Visual design, layout, themes and mockups go to Design: status lists the team's active specialists, and start_task with \"specialist\": its id hands the task to the one for the task's project (or the team's). With no Design specialist active for it, call propose_specialist with profile design-v1 (project: the task's project) and say in one line why; only an owner's tap adds it, and Equipo then carries on with the request. Before starting Design on a project, call status. When its taste for the person there says asked open, the questions are still on their screen: do not start Design and do not ask again; wait for their answer, which comes back as their next message. When it shows no taste (taste notes 0, asked none) and the request names no style, mood or reference, ask first, once (on the Add card, with propose_specialist's feels, when Design is new for it; else with ask_design_taste), and start Design when they answer; otherwise start at once. After they tap Skip, start Design and say in one line that Design will use its own judgement.\n")
+ b.WriteString("Visual design, layout, themes and mockups go to Design: status lists the team's active specialists, and start_task with \"specialist\": its id hands the task to the one for the task's project (or the team's). With no Design specialist active for it, call propose_specialist with profile design-v1 (project: the task's project) and say in one line why; only an owner's tap adds it, and Equipo then carries on with the request. Before starting Design on a project, call status. For a Design for all projects, read its taste's projects entry for the project (with none listed, its team-wide notes and asked none). When its taste for the person there says asked open, the questions are still on their screen: do not start Design and do not ask again; wait for their answer, which comes back as their next message. When it shows no taste (taste notes 0, asked none) and the request names no style, mood or reference, ask first, once (on the Add card, with propose_specialist's feels, when Design is new for it; else with ask_design_taste), and start Design when they answer; otherwise start at once. After they tap Skip, start Design and say in one line that Design will use its own judgement.\n")
b.WriteString("Never file the same problem twice. If record_task returns similar open tasks and one of them is what the person is reporting, call add_report on it with their words and tell them in one line it is already logged and where it stands, naming it as a markdown link; record a separate task only when it is clearly a different problem.\n")
b.WriteString("Speak at the outcome level: what you understood, what is happening, what you need from the person. For example: \"Got it, I've logged [Swipe back doesn't work](/tasks/tk...) and Engineering is on it.\" No file paths, line numbers or code mechanics in your replies; the diagnosis goes on the task with add_finding. Always name a task as a markdown link with its title and the link from record_task, start_task or read_task, never as \"the task card\".\n")
b.WriteString("Anything the person may need to paste (commands, prompts, config, codes) goes in a fenced code block, one block per thing to paste, with its kind after the opening fence (bash for a command, prompt for a prompt, text for plain text): the chat shows each block with a Copy button.\n")
diff --git a/internal/runner/thin/taste_ask_test.go b/internal/runner/thin/taste_ask_test.go
index 5b0b9086..6b6b4fe1 100644
--- a/internal/runner/thin/taste_ask_test.go
+++ b/internal/runner/thin/taste_ask_test.go
@@ -141,3 +141,16 @@ func TestHouseRuleAsksTaste(t *testing.T) {
t.Fatal("the opening's rule changed without a new house rule")
}
}
+
+// TestHouseRuleTeamDesignTaste (final review, M5): for a Design for all
+// projects, the house rule reads its taste's entry for the project, and
+// with none listed there, the team-wide notes and asked none.
+func TestHouseRuleTeamDesignTaste(t *testing.T) {
+ o := opening("p@example.com", nil)
+ if !strings.Contains(o, "For a Design for all projects, read its taste's projects entry for the project") {
+ t.Fatalf("the opening does not read a team Design's taste per project:\n%s", o)
+ }
+ if houseRule == "2026-12-01.2" {
+ t.Fatal("the opening's rule changed without a new house rule")
+ }
+}