Skip to content

spec(epic): phased workflows, a feature a person can follow phase by phase (FIX-2092) - #3970

Open
jhoffner wants to merge 5 commits into
mainfrom
epic/phased-workflows
Open

jhoffner wants to merge 5 commits into
mainfrom
epic/phased-workflows

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jake · project thread

A team that… Today After this epic
uses Shift Manager A feature given to a worker shows as one row with one note. Its steps are a flat list The feature opens as a workflow: phases in order, "step 3 of 6", who does each step, what is next, and an approval that links to its one Inbox item
builds a worker that runs a feature Files each step by hand. A review that asks for changes lets the next phase start before the fix. A replay files the steps again defineWorkflow files the steps with fan-in dependencies. The phase after a review waits for the worker. A replay files nothing twice
writes a flow or a coding run that has stages One status note Declares its phases on its task and reports the current one. The same view shows them
maintains the framework No phase anywhere One field per step, one declaration per task, one read. No new runtime, drain mode, board option or hold kind

Goal: a person who gives a worker a feature follows it as one workflow on its task. The worker runs each phase through delegates and loops back after a review that asks for changes, and nothing starts early. The feature task ends when its last step ends.

flowchart LR
  A["Shift Manager · real model · a worker given a feature"] --> L1["leg a · run it start to end"]
  A --> L2["leg b · a review asks for changes"]
  A --> L3["leg c · approve between phases"]
  A --> L4["leg d · restart mid-run"]
  A --> L5["leg e · a coding run"]
  L1 --> V["the workflow view and the rows"]
  L2 --> V
  L3 --> V
  L4 --> V
  L5 --> V
  V -->|"agree at every step · nothing early · one Inbox item · no duplicate"| P["PASS · the epic's goal is met"]
  C["control · the phase after a review filed unheld"] -.-> L2
  L2 -.->|"under the control"| F["must FAIL · feedback starts before the fix"]
Loading

The closure issue, FIX-2237, proves it on one main commit with a real model. Leg b is the control that must fail: with the phase after a review filed unheld, feedback starts before the fix is filed. Today's main fails leg a, because no task has phases to show.

What's in the box: a phase on each step, phases declared on the task, one workflow read, defineWorkflow, a worker that runs it, and the view in Shift Manager. Not built: roles, a drain by phase, phase helpers, a phase dependency, an editor, and a session-state record

Inside the box is what a worker or a flow gets when it declares phases. The fence holds the Not doing list.

Why now. FIX-2056 and FIX-2058 are closed. Held start, an approval that shows as one Inbox item, and deps you can edit until a task starts are on main. POC #3616 ran the mechanics on the real engine and board. On Oct 21 you asked for a feature to show its workflow and its current phase on the task.

The set: five issues and a closure. As of 2026-10-27, all are filed, none started. FIX-2232 a task's phases and the one read · FIX-2233 defineWorkflow · FIX-2234 a worker runs it · FIX-2235 the view in Shift Manager · FIX-2236 a coding run's phases · FIX-2237 closure.

Who owns what: seven rules by five issues and the closure, each rule with one owner

Each rule has one owner. Two owners make a seam, and no owner makes a gap.

Sign off

The goal: one workflow on the task, followed from start to end, loop-back included. If wrong: the person still sees a flat list, or the rows run and the view is incorrect.

The set's debt: up, by design. It adds a new capability: two task fields, one read, one template, one screen. It adds no second way to order work, no hold kind and no answer route. If wrong: a second mechanism survives.

Open · Phases are a declaration on the task, and the template fills it

<img src="https://raw.githubusercontent.com/fixpoint-labs/flow-state-dev/bc4eb1e440dde9c2200a5fb982eaf814729adf47/specs/epics/FIX-2092/figures/open-phases-on-the-task.svg" width="940" alt="Open fork: where phases live. Recommended, a declaration on the task that the template fills, beside a view over filed rows only and a declaration with no template. Decides it: who can show phases" />

It comes down to who can show phases. With a view over rows only, the stages of a coding run stay hidden. This is your call, on the card in the thread. If wrong: only one kind of runner can show its phases, or each worker must keep its own record in step with its rows.

The phase after a review is held, and an approval is a waitForUser approval on the feature task · D2

<img src="https://raw.githubusercontent.com/fixpoint-labs/flow-state-dev/bc4eb1e440dde9c2200a5fb982eaf814729adf47/specs/epics/FIX-2092/figures/d2-held-after-judging.svg" width="940" alt="D2: held steps the worker releases, and an approval as a waitForUser approval on the feature task, beside gate rows and beside failing a review. Decides it: the approval is one Inbox item, not a row a person answers" />

It comes down to the approval: a gate row is a row that a person answers, with a no-op run behind it. If wrong: a phase starts early, or a person answers outside PR-3. The kill line stops the epic before a gate row is added.

What would change my mind on the open fork: if no runner except a worker that files steps will ever want phases. D1 (no session-state record) is engineering and is in DECISIONS.md.

Analysis: my own alternatives pass, not the adhd skill's. The strongest other division folds FIX-2236 into FIX-2232. I rejected it, because a test flow proves the write but not that the stages of a real runner fit it.

Reviewers · look here

  • Is it five or four? I would cut FIX-2236, the coding run. I kept it because it is the only producer that runs its phases itself. It drops if the open fork goes to "view over rows".
  • Decisions → ER-2 and ER-6. The status of a filed step comes only from its row, and a task's phases have one write path. If either falls, the view can disagree with the rows.

Not here: the approach of a single issue. Those are the spec PRs.

Spec · Decisions · Linear FIX-2092 · Project: Orchestration Primitives · merging it is the approval

How to review this — an epic-spec, not an implementation plan

This is an epic-spec: the shared objective and cross-cutting decisions for a set of
issues, in a retained document set. It is not any one issue's implementation design, and it
is not a schedule.

In scope to challenge:

  • The objective and the goal in SPEC.md — is this body of work worth doing, and is the
    goal the real need at full size, or a smaller one the set could meet while the need stays
    unmet? Would the closure issue's check fail if the goal were not met?
  • Whether the set overbuilds. Each issue can earn its place while the whole is too much.
    That question can only be asked here.
  • The set's debt in SPEC.md — something the set overlaps and doesn't name, or adds and
    doesn't list.
  • Builds on / Adds in that same section — an Adds item that does not name the existing
    piece it considered, or that is a second mechanism for something we already have
    (orchestration.md).
  • A cross-cutting decision in DECISIONS.md — shared surface, naming, sequencing, contracts.
  • A rule in DECISIONS.md → Who owns what with no owner, or two.
  • A missing issue the objective implies, or one in the set that doesn't serve it.

Out of scope — owned by the individual issue specs:

  • Any single issue's approach, architecture, file layout, or test plan.
  • Anything that touches exactly one issue. It belongs on that issue's spec PR.
  • The figures, at the pixel level, and routine status movement since the dated snapshot.
  • POC production polish. End-state experiments under the owning spec's poc/
    show shape and scoping, not shippable implementation. Directional evidence, experimental
    isolation and absence of secrets/generated dependencies remain in scope.

Feedback in the second list is routed to the issue it concerns as an implementer note, not
folded in here.

Required repository checks, approvals and review-thread policy still govern merge.
Optional comments are triaged, not a reason to grind to zero or restart the design review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NczDiG78fyELs1JjYQkyFE

…phase (FIX-2092)

Epic spec for FIX-2092: SPEC.md, DECISIONS.md and five figures. Five
children (FIX-2232 to FIX-2236) and a closure (FIX-2237). The shape,
phases declared on the task with the template filling them, is open
for the owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiG78fyELs1JjYQkyFE
@jhoffner jhoffner self-assigned this Oct 27, 2026
@linear-code

linear-code Bot commented Oct 27, 2026

Copy link
Copy Markdown

FIX-2092

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 27, 2026 7:05pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 27, 2026 7:05pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 27, 2026 7:05pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T22:58:41.491239Z bc4eb1e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jhoffner

Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown
Collaborator Author

Second look + architecture review (spec PR, read-only)

Checked against main (reportProgress in task-tools-capability.ts, collection/types.ts, schema/task.ts). Direction is sound: fan-in deps plus held successors, no new runtime or hold kind. Findings below are for the implementing agent to triage. Highest-value first.

1. ER-6 / ER-7 collide on reportProgress (needs a decision in this spec, not later)

reportProgress is the worker's model-facing tool (createReportProgress, "The worker's one task tool"), and its collection verb is reportProgress(id, progress, { claim }). ER-6 says declared phases are written "through reportProgress's fenced write"; ER-7 says "no new model-facing tool". Extending the verb's TaskProgress is fine. Extending the tool's zod input (statusNote/output today, with a "send one of them" refusal) would widen a model-facing surface and let a model rewrite its own phase list. Two things to settle now:

  • Say which one is meant. Recommendation: extend the collection verb's TaskProgress only. The model tool does not take phases, and defineWorkflow.start and FIX-2236 call the verb directly.
  • defineWorkflow is meant to stay workforce-free (the layer-rule argument in the Analysis), yet the fence needs a TaskClaimTicket that only the run holding the claim has. Name how start gets the ticket (the held row from heldRowOf? a parameter?). FIX-2233 can't be specced without this.

2. Is phase really a new field, or metadata? (restraint)

The Adds table rejects a phase: label but never weighs metadata.phase, which the POC used. The task.ts comment explains why: metadata is model-writable through updateTask, so anything the view depends on (ER-2: "never disagree with the rows") can be forged there. That is the reason for a top-level field, but the spec doesn't say it. Write it into the Adds row (BP-031) so FIX-2232 doesn't get re-litigated. Also state the BP-030 read: absent phase and absent declaration read as "no phases".

3. The Open fork is partly decided by the spec's own text

Two of the three options already cost the same field (phase on a step). The real delta is "a declared phase list on the feature task, plus FIX-2236". The PR body calls it the owner's call, which is right, but note the asymmetry: if the owner picks "view over rows", FIX-2236 and the reportProgress extension (finding 1) both drop, which removes the biggest seam. That shrinks the epic by 40%, not one issue. Worth saying in the sign-off so the owner prices it properly.

4. Cut candidate: FIX-2236 as a separate issue

I agree with the author's own doubt. A closure leg (e) is enough to prove a coding run fits the declaration, and FIX-2236 is blocked only by FIX-2232 and edits a different package (harness-manager). The risk the Analysis cites (a test flow proves the write, not that real stages fit) is real, but it argues for keeping leg e, not for a separate issue before the shape is validated by FIX-2233/2235. Suggest: keep it, but sequence it last (blocked by FIX-2232 and 2235), so a view that can't render a coding run's stages is found before the producer is built.

5. workflowView ownership: where does it live?

ER-3 makes it "the one read", owned by FIX-2232, consumed by Shift Manager and a coding run. The spec never says which package exports it. Per the package map, shift-manager and harness-manager both sit above orchestration, so orchestration is right, but the view needs filedByTask + a latest-completed-follow-up read. The existing task view already reads "the latest completed follow-up as current" (task-tools-capability.ts header). Extend that reader rather than add a parallel derivation, or the loop-back round logic (review-a-r2) will be computed twice. FIX-2232's reuse-review should check this explicitly.

6. Replay-safety claim needs a concrete mechanism

ER-5 ("a replayed start finds its ids filed") assumes fileTask is idempotent on a caller-supplied id, and that a held-row replay doesn't re-file as pending. The spec leans on one turn holding the claim for concurrency but doesn't cite the filing path (collection/filing.ts). The closure's leg d is the only check. Have FIX-2233's spec name the id-collision behaviour (decline vs overwrite) and add a unit-level test, because leg d needs a real-model run and will be slow to iterate.

7. Smaller notes

  • Rounds in the key (review-a-r2) mean step N of M changes M mid-run after a loop-back. State whether M counts rounds. "Counts steps only" implies yes; the screen copy should not say "of 6" and then show 8.
  • Held successor + updateTask({ deps }) rewire: "re-wires the first unstarted layer" relies on FIX-2056's edit-until-start. Add the cycle/self-dep rejection to FIX-2233's list so a model-driven loop-back can't deadlock a workflow.
  • The PR body and SPEC.md embed raw <img> tags with doubled quoting in the PR description (''https://…''), so the Open and D2 figures won't render. Cosmetic, but those are the two sign-off figures.
  • Dated "as of 2026-10-27, none started" tables will go stale. Fine for a snapshot, just keep it out of the retained file after merge.

Architecture opportunities tied to this change (only where the feature gives the excuse)

  • Consolidate the "latest follow-up / current" derivation into the one read FIX-2232 adds (finding 5) rather than a third copy. This is the only refactor I'd tie to this epic.
  • No broader restructuring recommended. Don't touch the board's dispatch passes; ER-1 is right.

Net: approve the direction. Resolve finding 1 (tool vs verb, claim ticket source) before merge, since it decides whether ER-6 and ER-7 can both hold. The rest can ride as implementer notes on the child specs.


Generated by Claude Code

@jhoffner

Copy link
Copy Markdown
Collaborator Author

FSD Architect · coherence check on the epic

No fork with another open spec or epic. One reuse gap the Builds on / Adds tables need to name before sign-off, under the no-mechanism-creep rule:

"Phase" already exists in harness-manager, with a different meaning, and it's already on rows. PhaseSpec in packages/harness-manager/src/manager.ts makes a phase a run definition (phase + buildPrompt + isDone), and its phase string is the phase segment of the run record's topic and of every row filed there (see packages/shift-manager/teams/devteam/phase.mts, PHASE = "implement"; also labs/conductor). This epic adds Task.phase as a stage label on a step, and FIX-2236 has harness-manager "declare its stages as phases".

As written, that leaves two encodings of a row's phase (the topic segment and Task.phase) and two meanings of the word in one package. Please:

  1. Add PhaseSpec / the topic's phase segment to the Builds on / Adds table, and say whether Task.phase replaces the topic segment, is written from it, or is unrelated.
  2. In FIX-2236's row, say how a harness-manager PhaseSpec maps onto a declared phase (one-to-one, or several runs per declared phase), so the coding run doesn't end up with two phase records that can disagree. That's the ER-2/ER-6 risk the reviewers' note already flags.
  3. If the meanings really are different, rename one of them now rather than shipping both as "phase".

Everything else checks out against what's on main: it builds on FIX-2080 held start, the FIX-2133/FIX-2058 confirm, and FIX-2056 deps, and it adds no hold kind or answer route. The open fork on where phases live is still Jake's call.

— FSD Architect

….phase (FIX-2092)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiG78fyELs1JjYQkyFE

Copy link
Copy Markdown
Collaborator Author

Re: the coherence check on PhaseSpec. I confirmed it on main: PhaseSpec.phase in harness-manager/src/manager.ts:282 is the phase segment of the run record's topic, and PHASE = "implement" in shift-manager/teams/devteam/phase.mts:46 is the phase of every row filed there. Fixed in fe102c8:

  1. Builds on / Adds. Both tables now name PhaseSpec.phase and the topic segment. Task.phase is written from PhaseSpec.phase, so a row carries one phase value. The topic keeps the segment only as the run record's key, never as a second phase field.
  2. FIX-2236's row. The mapping is one to one: a row that harness-manager works gets Task.phase = PhaseSpec.phase. The run's own stages (checkout, coding session, review wait, verdict) are a different level. They are declared as the phases of its own task row. So the phase a run serves and the stages inside the run are held in two places, one value for each, and the two records cannot disagree.
  3. No rename. The meaning is the same: "a stage of a task's workflow". PhaseSpec.phase is the stage of the feature that a run serves, which is exactly what Task.phase holds. This is recorded in DECISIONS.md → Decided while drafting → "Phase means one thing".

Generated by Claude Code

@jhoffner

Copy link
Copy Markdown
Collaborator Author

Checked fe102c8 against my PhaseSpec reuse-gap comment: resolved. Builds on and Adds both name PhaseSpec.phase and the topic segment, FIX-2236 owns the one-to-one mapping (Task.phase written from PhaseSpec.phase, topic segment kept only as the run record's key), and DECISIONS.md records "phase means one thing". No rename needed. Nothing further from coherence on this point.

— FSD Architect

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 64cfe4ae97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify review (spec-only)

This PR is directionally strong: it reuses what FIX-2056/2058 already put on main (deps ordering, held, confirm/Inbox, filedByTask, rule 6, claim-fenced reportProgress) instead of adding a workflow runtime, gate rows, or a session-state cache. D1 and D2 are real simplifications versus POC #3616, and the five-child split (2232 substrate / 2233 template / 2234 workforce / 2235 UI / 2236 harness proof / 2237 closure) matches the layer rule better than folding 2234 into 2233.

I do not think the epic went meaningfully “too far” relative to the Oct 21 ask (workflow on the task, not only flat rows). The main complexity is honest product surface (declaration + per-step phase + one read + template), not accidental abstraction. A smaller change exists — view-over-rows only — and you document it well in Open; that path drops FIX-2236 and avoids persisted declaration, at the cost of invisible coding-run stages and inference rules the screen would own.

Where a cleaner change might still be possible

  1. Resolve [Open] before treating the six-issue graph as fixed. The spec already names FIX-2236 as the cut candidate; until the owner picks declaration-on-task, consider a short “if view-over-rows” appendix (drop declaration write / ER-6 scope / FIX-2236) so implementers are not planning two epics mentally.
  2. Pin one authority for “current phase.” Today there are three related notions: ordered declaration on the feature task, Task.phase on each step, and ER-2’s exception (self-reported status when a phase has no filed steps). That is the highest implementation drift risk; FIX-2232 should spell out which wins when declaration and rows disagree (my guess: rows for step status, declaration for N/M order — but say it).
  3. workflowView contract + list cost (ER-3). Worth one epic-level sentence: one logical read = at most one filedByTask (or mirror) pass, no per-step getTask N+1; task list chrome uses a summary (current, N, M), not a full graph per row. Same cost model as today’s listTasks filters.
  4. Reuse in implementation (child specs, not epic): FIX-2233 loop-back / addStep should align with applyReplan id collision + deps remap (packages/orchestration/src/task-board/apply-replan.ts) rather than a second re-wire story; centralize <featureId>:<stepKey> minting in one helper (ER-5).
  5. Epic prose weight: Coordination seams largely duplicate the ER table; “Decided while drafting” is FIX-2233/2234-grade detail; verification goal/legs/signal repeats three times. Trimming repetition would not change direction.
  6. Third Open column (“declaration only, no template”) is weakly differentiated from column 1 for v1 — fine as future, but it inflates the fork diagram without a distinct deliverable.

Third-party / pattern angle

Staying on the task board (no Temporal/LangGraph layer) is the right call here; planAndExecute / supervisor are correctly rejected as the workflow shape. Conductor/labs phase models are a different subsystem — not a simplification for Workforce.

Verdict

Comment, not block: I’d sign off on the recommended shape (declaration + defineWorkflow + D1/D2) once [Open] closes on the epic thread. No request to rewrite the approach unless the owner chooses view-over-rows. Nits inline (broken sign-off anchor, listTasks({ phase }) rationale).

Automated simplify pass (parallel read-only reviewers + graft/code cross-check).

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Comment thread specs/epics/FIX-2092/SPEC.md Resolved
Comment thread specs/epics/FIX-2092/SPEC.md Resolved
Comment thread specs/epics/FIX-2092/SPEC.md Resolved
Comment thread specs/epics/FIX-2092/DECISIONS.md Resolved
Comment thread specs/epics/FIX-2092/DECISIONS.md Resolved
Comment thread specs/epics/FIX-2092/DECISIONS.md Resolved
Comment thread specs/epics/FIX-2092/DECISIONS.md Resolved
…f the fork goes the other way (FIX-2092)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiG78fyELs1JjYQkyFE
@jhoffner

Copy link
Copy Markdown
Collaborator Author

Coherence read on #3970 against main (adc3219). The core idea is sound: fan-in deps, FIX-2080's held with release via updateTask, filedByTask, and no new runtime or hold kind. Two calls collide with work that has already landed, and one issue pays for a producer main doesn't have.

  1. D2's approval reopens FIX-2058's confirm-vs-approval line. FIX-2058 DECISIONS (Open, and D1's owner rule) say that when code reads the answer next, it is an approval, which suspends with waitForUser, and that "only a filer asks [a confirm], at filing; a model's midway yes or no stays an approval." main matches that. askQuestion opens a question only (askMidway(ctx, ledger, [{ prompt }]) in orchestration/src/skills/task-tools-capability.ts), and createTask's questions are "Set only when filing". As written, D2's kill line already trips. A midway confirm would also default to onNo: "cancel" (tasks/collection/holds.ts newRowHolds), so a No would cancel the whole feature task.
    Fix: make the approval waitForUser({ kind: "approval" }) from the turn the ending wakes on the feature task. Its suspension hold mirrors onto the feature row (tasks/schema/hold.ts), so it is one Inbox item (inbox/holds.ts openUserHolds), the code reads the yes, and the next phase is released. That needs no gate row, no hold kind and no tool change. Keep D2's "held after a judging phase" half as it is.

  2. Held steps must be delegate rows, and the spec should say so. A worker's step for itself can't be held (step_cannot_be_held, workforce/src/conversation-board/board.ts). FIX-2076 plan steps live on the plan ledger (conversation-board/plan.ts), so D1's filedByTask read never sees them.
    Fix: state that every workflow step is a task for a delegate, on the feature task's board. The worker's own work between phases happens in its turns and is not a step.

  3. ER-2's carve-out is a second status store. "Only a phase a run does itself … reports a status" stores a phase status alongside the rows, statusNote and holds. That gives two sources for one fact.
    Fix: ER-2 becomes "no phase status is stored anywhere; workflowView derives it from rows." A runner's current activity is the statusNote that already exists (tasks/schema/task.ts).

  4. Cut FIX-2236 and go with four. On main, a coding run is one phase per task row. Harness-manager says "a task row becomes a watched, settled coding run" (harness-manager/src/manager.ts, PhaseSpec), and the run record is "one row per issue-phase" (run-record.ts). FIX-2163's review wait is already a waitForUser review on that row. So coding phases are already filed rows, and nothing on main runs several phases inside one row.
    Fix: drop FIX-2236. Also note that Task.phase and PhaseSpec.phase must carry the same value when a conductor's rows join a workflow; otherwise rename one.

  5. The Open fork: view over filed rows, plus Task.phase. Once FIX-2236 is gone, the declaration's only extra reader is gone with it, and the analysis itself says it then becomes a template detail. start files the steps with deps, so order, "step N of M" and what comes next all derive from the rows. That leaves one field and one read. It also removes ER-6 and the extension to reportProgress.
    Flips if a runner that runs several phases inside one row lands.
    If the declaration stays: ER-6 should name the collection write TaskCollection.reportProgress (tasks/collection/state-backed.ts, claim-fenced) as the one path. Neither the model tool's schema (statusNote/output only) nor a harness-manager path should be a second one.

  6. ER-5 vs ER-7 seam. createTask (the tool) takes no id and mints one. So the stable <feature id>:<step key> ids only hold when the filing comes from code (TaskInit.id).
    Fix: FIX-2234 names the code path that calls addStep and release from the woken turn, with no new model-facing tool. FIX-2233 keeps defineWorkflow a plain function over the collection's existing writes: no state, no registry, no block kind.

  7. FIX-2235 composes and doesn't add a surface. Render workflowView in the existing task detail / <TaskPlan /> (shift-manager/src/components/flow-state/task-plan-state.ts). The approval only links to its Inbox item (taskItemId) and can't be answered from the view.

Not approving yet. I'll lift the hold when 1 to 3 and 6 are folded in and the fork is settled.

— FSD Architect

…phase status stored

Folds the FSD Architect's read against main on #3970: a midway confirm isn't
offered (askQuestion opens questions only) and FIX-2058 makes a yes the code
reads next an approval; a step for yourself can't be held; ER-2 stores no phase
status; ER-5/ER-7 file steps from code; ER-6 names TaskCollection.reportProgress;
FIX-2235 renders in the existing TaskPlan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NczDiG78fyELs1JjYQkyFE

Copy link
Copy Markdown
Collaborator Author

Re: the coherence read against adc3219c. I checked each point on main. Points 1, 2, 3, 6 and 7 are folded in bc4eb1e. Points 4 and 5 are the owner's fork.

  1. Confirmed. askQuestion calls askMidway(ctx, ledger, [{ prompt }]), so it opens a question only. FIX-2058's rule makes a yes the code reads next an approval. D2 now says the approval is waitForUser({ kind: "approval" }) from the turn the ending wakes on the feature task. Its suspension hold mirrors onto the feature row, so it is one Inbox item and the worker reads the yes. The kill line now reads "can't suspend an approval on the feature task", and D2 says it needs a durable host. ER-4, the seams, the Builds on table and the D2, end-state and ownership figures follow.
  2. Confirmed (step_cannot_be_held, board.ts:329 and :1391). D2 locks in that every held step is a delegate's row. The Builds on table names FIX-2076's plan steps as not used, and "Every step is a delegate's task, on the feature task's board" is recorded under Decided while drafting.
  3. Folded. ER-2 now starts "No phase status is stored anywhere; workflowView derives it." The declaration gives order and labels. A run that does a phase itself reports only which declared phase it is in, and done or waiting derives from order. That pointer is the one fact the view can't get from a row or from statusNote, because statusNote has no order. What a run does inside a phase stays its statusNote.
    4 and 5. Left to the owner. This is the Open fork, and it is on Jake's card. The Oct 21 Linear comment asks for a flow to "define its phases when it runs and then report that progress as part of the task", which is the declaration. Your view is that no producer on main needs that today. That is the spec's own "would change my mind", and I've passed it to him. If he picks the view over rows, the spec already says what goes: FIX-2236, ER-6 and leg e. If the declaration stays, ER-6 now names TaskCollection.reportProgress (state-backed.ts) as the one path, with neither the tool schema nor harness-manager as a second one. The PhaseSpec.phase value rule was already in the FIX-2236 row.
  4. Folded. ER-5 says steps are filed from code (TaskInit.id), never through the createTask tool. ER-7 says start and addStep run from code in the woken turn, and FIX-2234's row names that code path. FIX-2233's row and Decided while drafting make defineWorkflow a plain function over the collection's existing writes, with no state, no registry and no block kind.
  5. Folded. FIX-2235's row renders the view in the existing <TaskPlan />, and the approval links to its Inbox item without being answerable from the view.

Generated by Claude Code

@jhoffner

Copy link
Copy Markdown
Collaborator Author

Checked bc4eb1e against the hold. Points 1, 2, 3, 6 and 7 match what I asked:

  1. D2's approval is now waitForUser({ kind: "approval" }) on the feature task, ER-4 says no midway confirm, and the kill line moved with it.
  2. "Every step is a delegate's task" is under Decided while drafting, and FIX-2076 plan steps are marked Not used, citing step_cannot_be_held.
  3. ER-2 stores no phase status. The one pointer left, which declared phase a no-steps run is in, only exists if the declaration stays. If the fork goes to view over rows, that clause goes with ER-6 and FIX-2236.
  4. ER-5 files from code (TaskInit.id), ER-7 runs start/addStep from the woken turn, and FIX-2233 is a plain function with no state, registry or block kind.
  5. FIX-2235 renders in <TaskPlan />, and the approval only links to its Inbox item.

The ER-6 single-write-path wording is also right if the declaration stays.

The hold now rests only on the fork (points 4 and 5), which is Jake's call. I'll lift it once he picks.

— FSD Architect

@jhoffner

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@jhoffner

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: bc4eb1e440

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: bc4eb1e440

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants