Skip to content

feat(projects): project mode — Track / Propose / Auto, Start and Stop (enterprise#1235) - #4496

Merged
vybe merged 14 commits into
devfrom
feature/1235-project-mode
Nov 13, 2026
Merged

vybe merged 14 commits into
devfrom
feature/1235-project-mode

Conversation

@vybe

@vybe vybe commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What

The open-source half of project mode (Track / Propose / Auto, with Start and Stop). The backend half lives in the enterprise module, on the same branch name feature/1235-project-mode.

  • MCP: start_project_task lets the project's steward propose or start a task run. Tool count is now 180. access.ts and client.ts are wired for it, and projects.test.ts covers it.
  • Project page: shows the mode and lifecycle state, and offers Start / Stop / Mark done only for a known state and a known mode (I-3). The Stop dialog names the runs that are still finishing, read from runs_live. A new ProjectRunsWaiting lists proposals waiting on a person, with batch approval. ProjectTaskStart gives the go on a held task.
  • Store and utils: projects.js and projectsUtils.js (mode, lifecycle actions).
  • Docs: workspace-projects.md (modes, Start/Stop) and mcp-server.md (the new tool, 180).

Stacked on feature/1232-task-shape (#4493), so this PR's base is that branch.

Fixes abilityai/trinity-enterprise#1235 (cross-tracker: the issue's status is set by hand after merge).

Journey Impact

Journey Impact: extends: J22

Review + security

Tests

workspaceProjectsEnt1235.mount.spec.js (new, 25 tests), workspaceProjectsStore.spec.js, workspaceProjectsUtils.spec.js, tools/projects.test.ts.

Before merge

🤖 Generated with Claude Code

Trinity Agent (trinity) and others added 7 commits November 12, 2026 01:54
…ks for people (abilityai/trinity-enterprise#1232)

- statusEnum gains `todo` (the new default); `list_project_tasks` takes
  `view: "next"` as its own query parameter, never a status.
- `create_project_task` takes `status`, `parent`, `blocked_by`, `for_person`;
  `update_project_task` takes `parent` (null clears it), `blocked_by_add`,
  `blocked_by_remove`, `for_person`. Ids are T-NNN, lists capped at 20 as
  the backend caps them.
- Descriptions name the rules and the named refusals; each stays under
  2,048 characters, asserted for every project tool in projects.test.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing and tasks for people (abilityai/trinity-enterprise#1232)

- projectsUtils: `todo` ("To do") leads the status list; a subtask sorts
  under its parent; helpers name the creator, who a task is for, subtask
  progress and "Waiting on T-NNN" (derived, never the Blocked status);
  shape refusals map to the parent / waits-on fields.
- ProjectTasks: rows nest subtasks and show progress, the wait, the
  assignee and the creator; the detail adds created by / subtask of /
  subtasks / waits on; a task for a person offers no Start. The form edits
  the parent (blank sends null) and the tasks it waits on as add/remove;
  create takes parent, waits on and "a person does this task".
- workspace-projects.md: the same rules in the words the agent tools use.

Tests: workspaceProjectsEnt1232.mount.spec.js (11, mounted); the V2 utils
status pin now includes todo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p a dead error mapping (abilityai/trinity-enterprise#1232)

- Guide: the switch that makes a task a person's is on the create form only.
- projectsUtils.js: remove the invalid_parent field mapping; the backend
  never sends that code (a malformed id is parent_not_found).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity-enterprise#1235, C)

Checkpoint C of trinity-enterprise#1235.

- New tool start_project_task(project_id, task_id, agent) → {state:
  started|proposed, run} or a structured refusal with its code. It posts to
  the agent run route with the turn id and a deterministic Idempotency-Key
  derived from the arguments (Invariant #18). The description (< 2048 chars)
  names the three modes, the refusals and how a run ends.
- access.ts policy row; MCP doc tool count 179 → 180 (projects.ts 15 → 16).
- Tests: projects.test.ts (key determinism, refusal shape, client route and
  headers, description words, the 2048 cap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… page (trinity-enterprise#1235, D)

The project page reads the lifecycle and the mode the platform now enforces:

- ProjectPage: a state badge (Not started / Running / Stopped / Done /
  Archived) with who changed it and when; Start project / Stop project and
  Mark done for edit rights; the mode (Track / Propose / Auto) as a selector
  for edit rights and a read-only badge for everyone else; Stop asks first
  and names the runs still finishing (or says runs under way finish when the
  read carries no list); a banner on a stopped project, which also says a
  message in an existing task chat still reaches its agent (T8).
- ProjectRunsWaiting (new): in Propose and Auto, the proposed runs with
  checkboxes, Approve selected and Decline (optional note), one outcome per id
  in words, and "Nothing is waiting for your go" when empty.
- ProjectTasks / ProjectTaskStart: the "Needs my go" toggle (sends
  needs_go, keeps unsaved form edits), "Needs a go" on a held row, needs a
  decision with the steward's last reason, the live run on the row and in
  the detail, and on a project that isn't running the reason in place of
  Start. A refused Start names its refusal (task_run_live, project_stopped,
  ...).
- projectsUtils: state, mode and run labels with a tolerant fallback; an
  unknown status or mode reads "Unknown" and offers no lifecycle verb. The
  stored-status labels now read Running / Stopped / Not started everywhere
  (list, rail, page).
- Store: startProject, stopProject, setMode, fetchRunsWaiting, decideRuns.
- User guide: the lifecycle and what each state does to agents, the three
  modes, the steward's own schedule versus platform wakes, held tasks and
  the two-rejection rule, the open-task-chat gap, and start_project_task in
  the words of its MCP description.

Tests: new workspaceProjectsEnt1235.mount.spec.js (24, mounted) and two
store-route tests in workspaceProjectsStore.spec.js. Mutation: making an
unknown status read as running, and Stop skipping its confirm, turned 2
tests red; restored. workspaceProjectsUtils.spec.js now pins Stopped for
paused.

Release note: Paused now means Stopped, and a stopped project refuses new
task runs (before, Paused did nothing to agents). A new project begins as
Not started; existing projects keep running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… done (trinity-enterprise#1235, I-3)

lifecycleActions read only the state, so a project whose mode the page does
not know (a newer backend value) still offered Start/Stop/Mark done while its
label read Unknown. It now offers nothing unless the mode is one of
PROJECT_MODES (a project read without a mode is still Track).

Tests: the helper with {mode:'turbo'} on a running project, and a jsdom mount
of the project page with the same; both red before the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vybe vybe added the ui PR touches the frontend UI — triggers Playwright e2e tests label Nov 12, 2026
@trinity-ability

Copy link
Copy Markdown
Contributor

/validate-pr — #4496 @26a27c7c58 — REQUEST CHANGES (paired)

Validated against the stacked base feature/1232-task-shape (d70d0a8ba2), not dev.

The code in this PR is fine. It is held because its paired backend PR has a blocking defect, and the two merge together. A task run that has finished is never closed on the backend. That has two visible effects here:

  • The Stop dialog's "still finishing" list names every run ever dispatched.
  • The steward cannot start a second run on the same task.

No change to this PR's code is needed for that fix. Details are on the paired PR.

Checks ✅ all green at the head (reduced stacked set; no backend unit run or CodeQL until retarget)
I-3 fix (26a27c7) ✅ mutation: removing the mode gate in lifecycleActions turns 2 of 25 mount tests red; the file was restored afterwards
Security / host paths / file modes ✅ clean
Public terms ✅ only generic "enterprise-gated" wording and issue references
Closing keyword ⚠️ none. The title's enterprise#1235 is not a reference GitHub can parse. Add Fixes abilityai/trinity-enterprise#1235 (cross-tracker, so set the status by hand after merge)
Journey Impact ⚠️ check_journey_impact.py passes, but the body declares none. The issue says extends: J13-project, so add that line

Not run: the evidence-sweep suites (already run), backend unit and CodeQL (they run at retarget), and UI verification (after merge).

@trinity-ability trinity-ability added the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 12, 2026
@trinity-ability

Copy link
Copy Markdown
Contributor

/validate-pr round 2: #4496 @26a27c7c58. Decision: APPROVE (paired)

I validated against the stacked base feature/1232-task-shape (d70d0a8ba2), not dev. Run chain-ent1232-1235-validate-2.

  • This PR is unchanged since round 1, where its code was fine. The two PR-body nits are fixed.
  • CI at 26a27c7 is all green (report and auto-merge were skipped).
  • The paired backend PR's blocking item from round 1 (a started run never ended) is fixed and verified: 82 tests passed locally, and five mutations each turned tests red. Its CI is green too, so the pair clears together.

Not run here: suites already run in round 1.

@trinity-ability trinity-ability removed the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 12, 2026
@vybe

vybe commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Chain note (trinity-pm): /validate-pr round 2 approved this pair at ent 79f92987e7 / platform 26a27c7c58. The pair stays draft because its base, feature/1232-task-shape (ent#1249 / trinity#4493), is waiting on an operator ruling on ent#1232. If that ruling moves the 1232 tips, this branch merges the new base and gets re-checked. Once the base is settled, this pair leaves draft in the same step as its base.

Trinity Agent (trinity) and others added 4 commits November 12, 2026 08:46
…nd shows it (abilityai/trinity-enterprise#1232)

Operator ruling 2026-11-12 ("Unblock, flag, require a note").

- MCP: update_project_task's note is required for that transition; its
  description and list_project_tasks' say what `closed_without_claim` and
  `blockers_closed_without_claim` mean ("its output may not exist; read the
  note"). A refusal surfaces as done_without_claim_needs_note.
- Page: setting done on a task with an agent on it, from anything but
  awaiting verification, makes the note required and sends nothing without
  it. The server's refusal shows under the note. The row and the detail show
  the flag, and a dependent names the blocker.
- Guide: one paragraph under the verification rule.

Awaiting verification → done and tasks for a person are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts in ProjectTasks.vue and projectsUtils.js resolved keeping both:
the trinity-enterprise#957 board view and abilityai/trinity-enterprise#1232's
task shape.

The board now shows the task shape correctly:
- `todo` is named by the first (Active) column and flagged "To do"; it was
  previously a known status there, so it read as Active with no badge.
- A card shows derived waiting ("Waiting on T-2") and subtasks beside the
  Blocked status's waiting_on line.
- A done card closed without its agent's claim carries the
  "Done without a done claim" badge.
- Dropping a card on Done from anything but pending-verification already
  asks for the note the server requires.

Board specs: the "status the board does not know" cases used `todo` as
the unknown stand-in; they now use `triage`, and new cases pin todo,
waiting and closed-without-claim (reverting the projectsUtils change
turns 3 of them red).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts resolved keeping both intents:
- src/mcp-server/src/tools/projects.ts: #4490's shared createTaskParams /
  updateTaskParams + declared() filter now carry every ent#1232 param
  (todo status, parent, blocked_by, blocked_by_add/remove, for_person,
  the done-without-claim note); both descriptions carry the ent#1232
  rules and REFS_RULE, each under 2048 chars.
- projects.test.ts: both describe blocks kept; the ent#1240 "drops
  undeclared keys" case uses priority (status is declared on create now).
- workspace-projects.md: both sections (GitHub issues and PRs before
  Subtasks, waiting and tasks for people).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in ent#1232's done-without-claim display and ent#1240's task refs and
board view. Both intents kept:

- projectsUtils: the lifecycle/mode/run helpers beside the ref badges.
- stores/projects: start/stop/mode/runs-waiting verbs beside moveTask and the
  ref verbs.
- ProjectTasks: the needs-a-go and live-run badges beside "Done without a done
  claim"; the needs-decision line, live run and Needs-my-go toggle beside the
  unclaimed lines; one import list.
- Store spec and MCP projects tests: both suites kept.

MCP: ent#1235 adds no create/update shape param (needs_go is a person's, so
no tool sets it); start_project_task forwards only its named fields. Every
project tool description is under 2048 characters (max 1406); the
start_project_task description test now asserts the bound. Tool count in
docs stays 180 / projects.ts 16 for this tree (ent#1237's four file tools are
on dev, not on the 1232 tip).

Submodule pin: 888233b (ent main), as on the 1232 branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trinity-ability

Copy link
Copy Markdown
Contributor

/validate-pr — delta round 3 (fix-4) — run chain-ent1232-1235-validate-3

Range: 26a27c7..83b9d62 (merge of the 1232 tip a0a9783). Paired: abilityai/trinity-enterprise#1252 @ 9b92e77c7b, delta APPROVE.

Check Result
Merge resolution (git show --cc) ✅ Conflicts were only in ProjectTasks.vue and projectsUtils.js, and both are a union: 1235's needs-go / run / needs-decision next to 1232's closed_without_claim / board. The import list carries both sets
Shape params forwarded ✅ createTaskParams / updateTaskParams declare parent, blocked_by, for_person, refs, blocked_by_add/remove, refs_add/remove, and declared() forwards them. start_project_task declares its own params
MCP tool count ✅ tool-count-docs.test.ts passes (the doc quotes the registered count)
Local runs ✅ mcp-server node --test projects.test.ts + tool-count-docs.test.ts: 48/48; tsc --noEmit exit 0. Frontend vitest (Ent1235/1232/1240 mount, Board mount+utils, Utils, Store, raw-color / loading-gate / source-text ratchets): 10 files, 161 passed
Submodule pin ➖ a03a9d3 → 888233b (forward on ent main, from the 1232 tip). It does not contain ent#1252, which is expected for the stacked pair; it gets re-pinned at the train
Closing keyword ✅ Fixes abilityai/trinity-enterprise#1235 (cross-tracker: set status-in-dev by hand after merge)
Journey Impact ❌ scripts/ci/check_journey_impact.py on this body + SHAs: REJECTED — 'extends' needs a journey id like J03, got J13-project. journey-impact.yml only runs on base dev/main, so it is not in this PR's checks yet. It turns red when the PR is retargeted to dev. Also, J13 in tests/journeys/catalog.yaml is the suggestions journey. The project journey is J22 ("A project is worked by agents and people from open to close…"). This line was already there at round 2, so fix-4 did not introduce it; round 2 missed it
CI @83b9d628c1 ✅ All pass: Build (typecheck)+unit, build, e2e, gitleaks, guard×2, schema-parity, verify-compose-file-sets, verify-docker-gid-detection, verify-non-root, changes. report / auto-merge skipping

Recommendation: REQUEST CHANGES (PR body only, no code change).

This PR requires the following changes before merge:

  • Change the body line to Journey Impact: extends: J22 (or none: <reason> if the author does not think J22 covers it), then re-run check_journey_impact.py.

The code delta is approved. Editing the body does not push anything, so remove status-needs-fix by hand once the line passes.

🤖 Generated with Claude Code

@trinity-ability trinity-ability added the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 12, 2026
@vybe

vybe commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Chain note (trinity-pm): the one change requested in validate round 3 is done. The body line now reads Journey Impact: extends: J22. scripts/ci/check_journey_impact.py was run on the new body against base a080d6c77e / head 83b9d628c1 and returned PASSED (exit 0). With the old line it returned REJECTED (exit 1). No code was pushed: the tip is still 83b9d628c1, the code delta approved in round 3, so status-needs-fix is removed.

All four PRs in this chain now leave draft together. Merge order is the operator's call: ent #1249 → #1252, and trinity #4493 → #4496.

@vybe vybe removed the status-needs-fix PR has an unaddressed review/validation finding; cleared by the author's next push (#2815) label Nov 12, 2026
@vybe
vybe marked this pull request as ready for review November 12, 2026 17:38
@vybe
vybe changed the base branch from feature/1232-task-shape to dev November 13, 2026 11:26
trinity-ability and others added 3 commits November 13, 2026 11:27
Conflicts, both docs: mcp-server.md tool counts (183 on dev + start_project_task
= 184 tools, 179 operator; projects.ts 16, platform_files.ts row kept) and
workspace-projects.md (dev's steward-waking bullet plus this branch's
stopped-project chat bullet).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The squash adds only the 1232 tip a0a9783, which this branch already
contains, so the tree is unchanged by this merge.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
dev's wake paragraph (#4491) said the steward starts no task runs in a wake
turn; with project mode a Propose or Auto project lets it propose or start one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@trinity-ability trinity-ability 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.

Code approved in round 3 at 83b9d62; since then only the dev merge (two doc conflicts) and one guide sentence. Tier 1 all green at bd21da8. Paired ent#1252 merged as 710c8ae.

@vybe
vybe merged commit 6bbff0d into dev Nov 13, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants