Skip to content

feat(workflows): bind deterministic workflows to persona snapshots - #114

Draft
BastiHu wants to merge 26 commits into
feature/agent-persona-settingsfrom
bastian/deterministic-workflow
Draft

BastiHu wants to merge 26 commits into
feature/agent-persona-settingsfrom
bastian/deterministic-workflow

Conversation

@BastiHu

@BastiHu BastiHu commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Development workflows previously resolved personas as individual actions launched. Library edits, removal, disabling, or provider changes could therefore alter a workflow after it had already been accepted.

This adds the deterministic development workflow and binds all seven required roles when the workflow starts. The server reads the external YAML library once, validates each role and its workflow-owned authority, resolves its exact model route, and stores immutable definition snapshots and assignments in the workflow execution record. Later phases, corrections, retries, and review restarts reuse those assignments. Legacy tasks without complete snapshots remain readable but require a fresh task to continue, and unavailable pinned providers produce an actionable block instead of silently rerouting.

The change also removes production persona definitions and prompt fallbacks. New environments start with an empty library; Settings continues to support external folders, imports, editing, disabling, removal, and conflict detection. The eleven previous definitions were exported unchanged to the local j5-personas folder and are not part of the repository.

Validation:

  • focused server persona, workflow, routing, runtime-policy, launch, persistence, and contract tests: 23 files / 220 tests passed
  • focused web workflow and integration tests: 10 files / 80 tests passed
  • server, web, mobile, contracts, client-runtime, and workflow-contracts typechecks
  • targeted lint for the new server persona/workflow implementation
  • workflow source manifest verification and server bundle build
  • all eleven external YAML definitions round-trip exactly; production bundles contain no default definitions or synthetic fixtures
  • git diff --check

Model: GPT-6 · Harness: Codex

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). labels Sep 8, 2026
bryantderosier and others added 26 commits September 8, 2026 10:33
Upstream orchestration structs keep only additive-optional references to the
assignment and request schemas; the persona vocabulary, availability, and
catalog schemas now live in packages/contracts/src/j5/agentPersona.ts and
reach consumers through one appended barrel export.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Claude system-prompt append and the Codex developer-instructions
expression keep their upstream shape and gain one J5 helper call each;
the joining logic lives in j5/agents/agentPersonaPrompts.ts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The seven library RPCs now live in packages/contracts/src/j5/agentPersona.ts
as their own RpcGroup, merged into WsRpcGroup with one appended call so the
existing environment-scoped WebSocket transport, remote connections, and
mobile keep working unchanged. Server handlers and scope declarations move to
apps/server/src/j5/agents/agentPersonaRpc.ts and are spread into the upstream
handler and scope tables; client atoms and presentation helpers move under
packages/client-runtime/src/j5.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… delegates

The orchestrator's thread.create validation, route-lock checks, and the
launch service's persona resolution now call small J5-owned helpers in
apps/server/src/j5/agents/agentPersonaOrchestration.ts; the runtime policy
seam calls one J5 resolver. Behavior and error messages are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Source folders and imports now recognize .yaml/.yml files only; JSON files
are ignored in folders and rejected on import. Server-written stores and
launch snapshots remain JSON, so no persisted state changes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The launch, runtime policy, projection rebuild, contract, RPC scope, and
adapter instruction cases for agent personas now live under
apps/server/src/j5/agents and packages/contracts/src/j5, each with a small
mirror of the upstream harness it needs. The upstream test files return to
their trunk content.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The orchestrator constructs one J5 guard set next to its other services,
handing over only its two error constructors and the adapter lookup; the
create, route-lock, and model-mismatch sites become single calls. Runtime
policy uses a J5 resolver that takes its error constructor the same way.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…wned files

Web and mobile now read the persona library through J5 atoms instantiated in
src/j5/agents/agentPersonaAtoms.ts, the assignment lock controls move into J5
components that the composers render with one conditional, and the mobile
library screen draws its own header row so the shared SettingsSection stays
at its upstream shape. FORK.md rows point at the new locations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The web file picker accepts only YAML, the mobile picker test uses YAML
names, and the user, operations, product, and FORK docs describe the
YAML-only import and source-folder behavior.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@BastiHu
BastiHu force-pushed the bastian/deterministic-workflow branch from 9630f1e to bab34c5 Compare September 10, 2026 10:35
@BastiHu BastiHu changed the title feat(workflows): add deterministic development workflow feat(workflows): bind deterministic workflows to persona snapshots Sep 10, 2026
@BastiHu
BastiHu changed the base branch from j5/main to feature/agent-persona-settings September 10, 2026 10:36
@bryantderosier
bryantderosier force-pushed the feature/agent-persona-settings branch 2 times, most recently from 95cfbff to a56b373 Compare September 14, 2026 12:08
An error occurred while trying to automatically change base from feature/agent-persona-settings to feature/agent-persona-catalog-rpc September 14, 2026 21:36
@Jacksondr5

Copy link
Copy Markdown
Owner

Heads-up: this PR touches Squadron code that is being removed.

What changed on j5/main (2026-10-08). J5 is retiring Squadrons and folding their behavior into projects (#412, decided 2026-10-05). The client half has merged (#454, #455, #456):

  • The Squadron picker, draft chip, sidebar Squadron filter, first-run gate and the Create, Rename and Delete Squadron dialogs are gone. Most of apps/web/src/j5/squadron/ is deleted.
  • New threads, drafts, the sidebar filter and Add Project use upstream's project flow again.
  • The Fleet page, Inbox and thread cards read the thread's project.

Still to come. The server migration re-keys the ledger from Squadrons to projects, removes list_squadrons and join_squadron, and renames squadron_id / squadronId to project fields across the server, the shared contracts and the peer protocol. After that, a rename pass removes the word from the remaining code.

For this PR. It reads and writes Squadron ids in about 175 changed lines, mostly in apps/web/src/j5/workflow/ (CreateWorkflowDialog.tsx, RunsPage.tsx, WorkflowsPanel.tsx, useCreateWorkflow.ts), apps/server/src/j5/workflow/SidebarRead.ts and apps/server/src/j5/workflow-definitions/Service.ts. It also edits apps/web/src/j5/squadron/SquadronDirectory.ts, which is going away with the migration.

When you next rebase: scope by the thread's or workspace's projectId where this uses a Squadron, and drop any Squadron picker in the create dialog. No Squadron needs to be chosen or sent when a thread is launched; the server derives the home from the project.

Posted by an AI agent on Jackson's behalf.

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

Labels

size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants