Skip to content

feat(projects): project_steward trigger and Steward card wake state (abilityai/trinity-enterprise#1236) - #4491

Merged
vybe merged 6 commits into
devfrom
feature/1236-steward-wakeup
Nov 12, 2026
Merged

vybe merged 6 commits into
devfrom
feature/1236-steward-wakeup

Conversation

@vybe

@vybe vybe commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes abilityai/trinity-enterprise#1236

What

Platform half of abilityai/trinity-enterprise#1236: the platform wakes a project's steward when there is work for it, so no one has to schedule it. Waking is off until a person starts it.

  • New trigger project_steward, classified in each trigger set that names internal triggers: autonomous, pull-reachable, owner-configured, valid, reserved, operator-side, personless replay and the analytics buckets (task_execution_service, pull_pilot, skill_gate_service, turn_tier_service, caller_wake_service, canvas_service, routers/executions.py, db/schedules/analytics.py). No other value is added.
  • Frontend: the Steward card (ProjectStewardCard.vue) shows whether waking is started, why a wake was skipped, the last run and the next one, with Start and Pause for the people allowed to change it. Store and utils follow.
  • Docs: docs/user-docs/sharing-and-access/workspace-projects.md (incl. the one catch-up wake on Start) and one generic line in docs/memory/architecture/execution.md.
  • The enterprise submodule pin moves to 9eab2b3, the tip of abilityai/trinity-enterprise#1245, which builds on a03a9d3.

Review + security

  • Reading review: every trigger set gains only project_steward; no private terms in the diff or commits. The fix step added the guide and card wording for the catch-up wake, and the trigger catalog line.
  • /cso --diff: nothing at ≥8/10. No dependency, workflow or Dockerfile changes.

Tests

  • New: tests/unit/test_ent1236_project_steward_trigger.py, workspaceProjectsEnt1236.mount.spec.js. Updated: test_2048_pull_pilot_reach.py (the pinned trigger set).
  • Evidence sweep: the trigger-set guard files and direct importers green; the raw-color, loading-gate and source-text ratchets green. test_ent1022_retrieval_memory reds are pre-existing (no numpy, same on dev).
  • CI runs the full unit island and frontend suite.

Before merge

🤖 Generated with Claude Code

Trinity Agent (trinity) and others added 4 commits November 12, 2026 00:36
…er set (trinity-enterprise#1236 B)

The private projects module now wakes a project's steward agent with a turn
of its own, triggered_by=project_steward. The #4105 census does not scan the
private tree, so each set lists it explicitly:

- turn_tier_service.OWNER_CONFIGURED_TRIGGERS: a personless wake is the
  owner's turn, not a visitor's (the ent#1216 ledger-hide class);
- task_execution_service._AUTONOMOUS_TRIGGERS + pull_pilot.PULL_REACHABLE_TRIGGERS;
- routers/executions._VALID_TRIGGERS (a filter, never written from input);
- db/schedules/analytics: counted under Scheduled (it replaces the steward's
  schedule);
- canvas_service operator-side, skill_gate_service personless replay,
  caller_wake_service.RESERVED_TRIGGERS (recursion break).

test_2048_pull_pilot_reach re-pinned (result_ignored gains project_steward).
New tests/unit/test_ent1236_project_steward_trigger.py: 8 passed; with the
set lines reverted, 7 go red (the 8th is the visitor control).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ard, with Start/Pause (trinity-enterprise#1236 C)

The project read's steward.wake drives a new block on the agent branch of
ProjectStewardCard: the wake line (on, or the one named reason: not started
— off until a person starts it — paused by whom, autonomy off, project not
active, steward not on the project, couldn't check), what wakes it next,
the last run and a skipped wake. The creator or the agent's owner gets
Start waking the steward / Pause (stores/projects start/pauseStewardWake,
through _write so the page re-reads); only the agent's owner is linked to
the autonomy setting, with the one-line warning. While a wake block is
present the card never says No sweep scheduled; an older backend keeps the
earlier lines. The person-steward hint drops 'on a schedule'.

User guide: workspace-projects.md (the card, the wake rules, How a project
moves, Limitations).

Tests: workspaceProjectsEnt1236.mount.spec.js (jsdom mount), 11 passed;
with the source change reverted all 11 fail. The V4/1169/1161/980/4395
specs: 81 passed together. rawColor/loadingGate/sourceText ratchets: 28
passed. Raw-color scan (scan-raw-colors.mjs --json), ProjectStewardCard.vue:
raw_nongray 0 -> 0, hardcoded 0 -> 0, raw_gray 30 -> 38, semantic 28 -> 32.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rd trigger; pin enterprise (trinity-enterprise#1236 F3)

- User guide and the Steward card's Start hint: changes made before
  waking was started (or while it was paused) get one catch-up turn on the
  first Start, within the hourly limit. Behaviour unchanged (review I3).
  Pinned in workspaceProjectsEnt1236.mount.spec.js; removing the hint turns
  the "Not started" case red.
- architecture/execution.md: one line for the `project_steward` trigger and
  the sets it is in (review I5).
- Enterprise pin moved to 9eab2b3 (F1 stale-test fix, F2 the dispatch closes
  an execution row that has no turn behind it).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@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

PR Validation Report — #4491

PR: #4491 feat(projects): project_steward trigger and Steward card wake state (abilityai/trinity-enterprise#1236)
Author: vybe · Branch: feature/1236-steward-wakeup → dev · Files: 17 (+439/−22) · Head: b8fd922 · Lane C (enterprise gitlink), no schema
Run: trinity s6cWhOO-2yDY9MIcuuTESw, chain-ent1236 (trinity-pm). Report only.

Summary

Category Status Notes
Commit messages ✅ conventional prefixes; one dev merge
Base branch ✅ dev
PR size ✅ 17 files
Status auto-promotion ⚠️ no closing keyword. The issue is named only in the title. Not patched, because the rider says report only. It is cross-tracker, so the automation would not promote it anyway: set status-in-dev on ent#1236 by hand after merge (it is still status-ready)
Journey Impact ✅ check_journey_impact.py exit 0 (PASSED; the PR declares none, which is allowed)
Requirements / Architecture ✅ one generic trigger line in docs/memory/architecture/execution.md; the design doc is in the enterprise PR
Feature flows ➖ the flow is enterprise-side; the user doc is updated
Security (§4.1–4.10) ✅ no keys, emails, IPs, secrets, env vars, mode flips or host paths; enterprise-docs-guard PATTERN: 0 hits on added lines
Build / config packaging ➖ no new top-level package, no os.getenv
Audit rows (§4.11) ➖ no gated write handler touched in OSS. The Start/Pause routes are enterprise-side and write project_steward_resumed/_paused (per /review)
Structural review ✅ /review ent#1236 #issuecomment-6816186439; /cso --diff: nothing at ≥8/10 (PR body)
Merge gate ✅ Tier 1 green (pytest (head), regression diff, schema-parity, verify-non-root, both CodeQL, gitleaks, pg-migrations); lane C journey-smoke + e2e green on the PR; dev-ci on dev: success; no open dev-ci red issue
Test adequacy ✅ trigger-set pin, card mount spec, enterprise gate/CAS/wiring tests with mutations
Cross-surface drift (§5.5) ✅ no agent-server twin touched. routers/executions.py has a constant-set change only and carries # mcp: none — <reason>. No MCP tool encodes trigger values for this
Code quality ✅ each trigger set gains only project_steward (re-read in the diff); nit below
Product fit ✅ approved P1 issue. The OSS side holds only the trigger name and the card; the wake logic is in the private submodule (enterprise tier); this follows rulings #issuecomment-6814968363
Product bar 7–11 ✅ the card names every not-woken reason; Start/Pause only for people allowed to change it; user doc updated

Execution coverage (§5.4)

changed symbol / test file executed by verdict
trigger sets (8 modules) tests/unit/test_ent1236_project_steward_trigger.py + test_2048_pull_pilot_reach.py: 62 passed (this run, at head) ✅
ProjectStewardCard.vue / store resume/pause workspaceProjectsEnt1236.mount.spec.js: jsdom mount, clicks, store and HTTP calls asserted; 0 readFileSync (sweep: 311/311 in the scoped vitest set; CI e2e/build green) ✅
enterprise pin 9eab2b3 test_ent1236_steward_wake.py 52 passed, test_ent1236_wiring.py 25 passed (this run, at the pin). The sweep's 4 reds at eb165a3 are fixed by F1 in 9eab2b3 ✅

Mutations: not re-run here. The sweep killed M1 (autonomy), M2 (not started), M2b (person-only) and M3 (answered-only) at eb165a3. 9eab2b3 changes steward_wake.py only for F2, and its commit names the test that goes red with F2 reverted. I did not re-check that.

Issues found

Critical: none.

Warnings

Suggestions

  • task_execution_service.py: the _PERSONLESS_REPLAY_TRIGGERS comment still begins "all three are…" while the set now has four members. Wording only.
  • Add Fixes abilityai/trinity-enterprise#1236 to the body for traceability.

Not run

  • The full backend unit island and the full vitest run. CI's pytest (head) and the sweep already covered them, and the rider says not to re-run them.
  • No mutations re-run at 9eab2b3 (see above).

Recommendation

APPROVE. Merge it in the same step as abilityai/trinity-enterprise#1245, with the pin on the commit that lands on ent main.

PR #4491 — APPROVE — merge gate: ✅ (Tier 1 + PR-side journey-smoke/e2e green; dev-ci success)

@dolho

dolho commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Reviewed together with the enterprise half; findings are on abilityai/trinity-enterprise#1245. One touches this repo: the Steward card shows a stored "Last wake skipped" with no time, after later good runs (finding 1 there). Nothing blocking in the platform half itself.

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

Validated (/validate-pr, lane C): Tier 1 + journey-smoke/e2e green; pinned to ent main a9b752a (ent#1245 merged). Follow-ups in report.

@vybe
vybe merged commit 0edeece into dev Nov 12, 2026
28 checks passed
vybe pushed a commit that referenced this pull request Nov 13, 2026
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 <[email protected]>
vybe added a commit that referenced this pull request Nov 13, 2026
… (enterprise#1235) (#4496)

* feat(mcp): project task tools take todo, subtasks, blocked-by and tasks 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 <[email protected]>

* feat(workspace): the project page and guide show todo, subtasks, waiting 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 <[email protected]>

* fix(projects): guide says a task is made a person's when created; drop 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 <[email protected]>

* feat(mcp): start_project_task — the steward starts a task's run (trinity-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 <[email protected]>

* feat(workspace): project start/stop, the mode and runs waiting on the 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 <[email protected]>

* fix(workspace): an unknown project mode offers no Start, Stop or Mark 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 <[email protected]>

* feat(projects): a task done without its agent's claim needs a note, and 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 <[email protected]>

* docs(projects): the steward-wake paragraph defers to the project's mode

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 <[email protected]>

---------

Co-authored-by: Trinity Agent (trinity) <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: trinity-ability <[email protected]>
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.

3 participants