Skip to content

MC-81: a design can propose follow-up tasks, created when it is approved - #11

Merged
mmhy2003 merged 13 commits into
developfrom
megoo/MC-81-brainstorm-design-can-propose-follow-up
Nov 19, 2026
Merged

mmhy2003 merged 13 commits into
developfrom
megoo/MC-81-brainstorm-design-can-propose-follow-up

Conversation

@mmhy2003

Copy link
Copy Markdown
Owner

MC-81: a design can propose follow-up tasks, created when it is approved

Why

During Brainstorm/Design, the person and the agent often agree to split the work into phases. The current task takes one phase, and nothing records the others on the board, so they get lost. Workflow runs can't create tasks, and they still can't after this change.

What changed

  • Design documents carry follow-up tasks. submit_design takes follow_ups: [{title, type, description_md}] (up to 10). Each design version holds its own full list, and get_document returns it. A new JSONB column holds the list (migration b215d4e16f2d).

  • Review in the approval view. A new Follow-up tasks block shows the proposals of the version being reviewed. The person can untick, edit or add tasks there, and the list is sent with Approve. If the version proposes follow-ups, an approval without a list is refused (follow_ups_required), so a stale tab can't create tasks the person hasn't seen.

  • Created on approval. Each ticked task is created:

    • unassigned, in the project's first column, and in the originating task's epic if it has one;
    • with a relates link to the originating task;
    • with a backlink in its description to the originating task and the approved design.

    Each creation records a follow_up_created event on the originating task, with the approver as the actor. Rejected or superseded versions create nothing.

  • Scope note. On approval, the system appends a scope note to the originating task's description that names the follow-up tasks. It's recorded as a normal description_md change. The person's own text is never rewritten. A later approval replaces the note the system wrote before. Agents get no new permission.

  • Chat rounds are supported too. Their backlink points to the chat, and they get no link and no epic.

  • The brainstorm and revision instructions describe follow-ups. The mockup panel points to the review, and the thread shows the follow-ups that were created.

How it was tested

  • Backend pytest -n auto: 2078 passed.
  • Frontend tsc --noEmit, eslint on the changed files, and Vitest: 1305 passed.
  • Alembic upgrade, downgrade and upgrade again on a scratch database: clean.
  • Playwright on a freshly built stack: 49 of 51 passed. That includes the new end-to-end test, where a design's follow-up tasks are reviewed and created on approval.
    • freestyle.spec.ts failed once and passed when run again (flaky).
    • Failure from develop: mobile.spec.ts "every page fits a phone" fails because /settings/notifications is 315px wide at a 280px screen. The cause is the button row in SoundSetting.tsx, which came from 83a649a and is already on develop. This PR doesn't touch it, and it should be fixed in a separate task.

🤖 Generated with Claude Code

mmhy2003 and others added 13 commits November 19, 2026 15:13
… note (MC-81)

A design version carries the follow-up tasks it proposes for later phases,
and the scope note its approval writes into the task's description. Both
columns default to empty, so existing documents propose nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent can now pass a list of follow-up tasks for the later phases with a
design. A new module, app/workflow/follow_ups.py, checks that list (at most 10
entries, story/task/bug only, title and description limits) and the reviewed
list a person will send with the approval. documents.submit stores the cleaned
list on the design version; a revision without the argument proposes none, and
a plan refuses a non-empty list with follow_ups_forbidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns them (MC-81)

The brainstorm agent can now pass the tasks for the later phases with its
design through an optional follow_ups argument on submit_design, both for
runner-driven runs and connect-only agents. The tool returns how many were
stored, so an agent notices when a revision leaves the list out, and
get_document shows each version's list. Workflow runs still cannot call
create_task; a test keeps that gate in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (MC-81)

The person now sends the reviewed follow-up list with a design approval, and
each ticked entry becomes a task: unassigned, in the project's first
before-work column, in the originating task's epic if it has one, with a
backlink to the task and its approved design at the end of the description.
Each one gets a relates link and a follow_up_created event on the originating
task, recorded for the approver. The approved version keeps the reviewed list
with the created tasks' ids.

The list is checked before anything is written, an approval of a design that
proposes follow-ups without a list is refused (follow_ups_required), and a
failure while creating undoes the whole approval. Rejections and plans ignore
the list. The scope note comes in the next step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (MC-81)

After a split, the task's description still describes the whole job, so later
runs and reviewers could treat the other phases as missing work. Approving a
design that creates follow-up tasks now writes a scope note ("phase 1 of N")
linking every follow-up task and the approved design. A second approval
replaces the note an earlier one wrote if it is still unedited, otherwise
appends a new one. The change goes through update_task, so it is recorded as a
normal description_md change by the approver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chat (MC-81)

A chat round is not on the board, so linking its follow-up tasks to it or
putting them in an epic makes no sense. When the approved design belongs to a
chat round, the follow-ups are created as ordinary board tasks with no epic
and no relates link, their description ends with the "From chat" line that
freestyle chats already use, and the scope note's design link points at the
chat. The follow_up_created event is still recorded on the round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oval creates them (MC-81)

The design approval view needs to show what a version proposes, what an
approval created, what earlier approvals created and where the tasks would
go. The document list now counts each version's follow-ups, and a document
returns its follow-ups (created or not, with the task's key while it still
exists), the tasks earlier approved design versions created, and for a
submitted design the column and epic approving it would use. A plan lists
none of these.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…up tasks (MC-81)

The agent can now pass follow_ups to submit_design. The brainstorm text gets a
"Follow-up tasks" section: the list is used only when the person agreed to a split,
the full list goes with every submission, and nothing is created before approval.
The revision text tells the agent to pass the updated list again when it resubmits.
The new SHA-256 of each text is appended to its default history, so databases that
still have the default texts upgrade to them.

The KB trimming test's prompt budget now follows the length of the brainstorm
text, so a longer methodology no longer pushes the task description out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tasks (MC-81)

The design approval view needs to show the follow-up tasks a design proposes
and let the person untick, edit, add or remove them before approving. The new
FollowUps component draws that block in review mode, and as plain text with
"created"/"not created" and task links on other versions. It also names the
tasks earlier approved designs created.

The API types are regenerated for the new document fields. Two backend schemas
are named FollowUpRef, so the workflow one is aliased by its qualified name.
The error texts for invalid_follow_ups, follow_ups_forbidden and
follow_ups_required are added too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sends them with Approve (MC-81)

A design now shows its Follow-up tasks block between the design text and
the comment. Someone who can decide reviews the rows (untick, edit, add),
sees what approving creates and where, and the reviewed list goes with the
approval. A ticked row without a title blocks Approve. Rejections and plans
send no follow-ups. The KB test's design fixture gains the new fields the
API always returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he thread shows created follow-ups (MC-81)

Approval must carry the follow-up list the person reviewed, so when the
pending design proposes follow-ups the mockup panel no longer approves
directly: it shows "Review follow-up tasks (n)", which scrolls to the
design document where the review and Approve live. Designs without
follow-ups approve from the panel as before.

The activity thread renders follow_up_created events as "created
follow-up KEY: title" with the key linking to the new task, and
describeEvent gives the same plain-text summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roval (MC-81)

The workflow end-to-end test now has the fake agent propose two follow-up
tasks with its design. The person unticks one, adds another and approves;
the test checks the thread rows, that the two ticked tasks exist unassigned
and top-level in the first column (Backlog), that the unticked one was not
created, and that the scope note and the backlink end the descriptions.
Plan subtasks and the probe task shift to WFL-4/5 and WFL-6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmhy2003
mmhy2003 merged commit 54c3ec2 into develop Nov 19, 2026
12 checks passed
@mmhy2003
mmhy2003 deleted the megoo/MC-81-brainstorm-design-can-propose-follow-up branch November 19, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant