Skip to content

feat(workflows): agent workflows — phase-keyed task lifecycle playbooks - #3008

Merged
senamakel merged 13 commits into
tinyhumansai:mainfrom
senamakel:feat/agent-workflows-full
May 30, 2026
Merged

senamakel merged 13 commits into
tinyhumansai:mainfrom
senamakel:feat/agent-workflows-full

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

Adds Agent Workflows — user/project WORKFLOW.md playbooks (mirroring the skills domain) that bind behavior to a task's lifecycle phases (on_pick_up_task, on_close_task, on_enter_directory). At each phase a workflow can inject rules, run scripts through the existing approval-gated shell, scope visible tools, and surface working-directory (git) context. No bespoke executor — phase scripts reuse ShellTool; everything else is context injected into the agent's turn.

Changes

  • Core domain src/openhuman/agent_workflows/ — types, frontmatter parse, user/project discovery (project-shadows-user, trust-gated), create/read/uninstall ops, phase guidance + effective tool-scope resolution, git working-dir context, prompt catalog renderer.
  • RPC namespace workflows (list/read/create/uninstall/phase) wired into the controller registry (CLI + JSON-RPC).
  • Harness — PromptContext.workflows threaded through agents + catalog render; workflow_load / workflow_phase agent tools (phase scripts run through the gated ShellTool, so the ApprovalGate applies unchanged); orchestrator/integrations agent.toml allowlists; task-board status→phase hooks.
  • Frontend — /workflows page (list/view/create/delete) + a Workflows chip on the Intelligence page; workflowsApi, workflowsSlice; workflows.* + nav.workflows + memory.tab.workflows* i18n keys across all 12 locales.
  • Capability automation.agent_workflows in the about_app catalog.

Testing

  • Rust: cargo check clean; agent_workflows 39 unit tests + workflow_tools 13 tests pass; JSON-RPC E2E round-trip (json_rpc_workflows_lifecycle_round_trip) green.
  • Frontend: pnpm typecheck 0 errors; Vitest (page/api/slice, 35 tests); pnpm i18n:check exit 0 (13 locales, 0 missing).
  • Pre-existing, unrelated failure on this machine: cwd_jail::macos::seatbelt_blocks_write_outside_root (sandbox env; file untouched by this branch).

Submission Checklist

  • Tests added/updated for new behavior
  • `pnpm typecheck` and `pnpm lint` pass
  • `cargo check` passes for changed Rust
  • Docs/architecture notes updated where relevant
  • No secrets, keys, or PII committed

senamakel added 10 commits May 29, 2026 20:38
Phase-keyed workflow domain (WORKFLOW.md + frontmatter) mirroring the
skills domain: parse/discover/select/workdir/ops/inject/schemas with
user+project scope (project shadows user, trust-gated). Workflows bind to
task lifecycle phases (on_pick_up_task/on_close_task/on_enter_directory).
RPC namespace 'workflows' (list/read/create/uninstall/phase) wired into
the controller registry. 36 unit tests.
…ent, i18n

AgentWorkflows page (list/view/create/delete) mirroring Skills, with
WorkflowCard/WorkflowDetailDrawer/CreateWorkflowModal/PhaseEditor,
workflowsApi (5 RPC wrappers), workflowsSlice (thunks+selectors),
/workflows route, and workflows.* i18n keys across all 12 locales.
35 Vitest tests (page 8, api 12, slice 15).
…sk hooks

Thread PromptContext.workflows through all agents + render the available-
workflows catalog; add workflow_load / workflow_phase agent tools (phase
scripts run through the gated ShellTool so the ApprovalGate applies);
register both in the session builder and the orchestrator/integrations
agent.toml allowlists; add task-board status->phase detection hooks in
todos/ops; self-contained run_git_sync in workdir. Verified: lib + all
test targets compile; 48 workflow tests pass (36 core + 12 tool tests).
Add json_rpc_workflows_lifecycle_round_trip (create -> list -> read ->
phase -> uninstall over the real axum stack, isolated under a temp HOME)
and the automation.agent_workflows capability entry in the about_app
catalog. Apply rustfmt across the workflow domain files.
Resolve i18n conflicts from upstream's chunk-file removal: keep the new
flat-file en.ts (workflows + conversations blocks both retained), drop the
obsolete chunks/<locale>-5.ts files our branch had modified. Workflow
domain, RPC, UI, about_app capability, and e2e test all preserved.
Verified: cargo check clean, pnpm typecheck 0 errors, i18n:check exit 0.
After upstream's chunk-file removal, the workflows.* + nav.workflows keys
existed only in en.ts. Mirror them into every flat locale file (English
placeholders, real translations to follow) so pnpm i18n:check passes the
changed-line coverage gate.
Add a 'workflows' pill (Beta) to the Intelligence PillTabBar that renders
the existing AgentWorkflows management UI inline, alongside the standalone
/workflows route. Reuses the workflows slice/API. Adds the
memory.tab.workflows / memory.tab.workflowsDescription i18n keys (deduped
in en.ts, mirrored to all 12 locales). Verified: typecheck 0 errors,
i18n:check exit 0.
@senamakel
senamakel requested a review from a team May 30, 2026 07:19
@coderabbitai

coderabbitai Bot commented May 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@senamakel, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 56 minutes and 54 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2378fa7c-a2ce-43b9-a1fd-b76941bfccb3

📥 Commits

Reviewing files that changed from the base of the PR and between 7e9fa67 and acccaa3.

📒 Files selected for processing (92)
  • .claude/projects/-Users-enamakel-work-tinyhumansai-openhuman-2/memory/MEMORY.md
  • .claude/projects/-Users-enamakel-work-tinyhumansai-openhuman-2/memory/cargo-check-vs-test-verification.md
  • .claude/projects/-Users-enamakel-work-tinyhumansai-openhuman-2/memory/subagent-output-can-be-lost.md
  • app/src/AppRoutes.tsx
  • app/src/components/workflows/CreateWorkflowModal.tsx
  • app/src/components/workflows/PhaseEditor.tsx
  • app/src/components/workflows/WorkflowCard.tsx
  • app/src/components/workflows/WorkflowDetailDrawer.tsx
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/pages/AgentWorkflows.test.tsx
  • app/src/pages/AgentWorkflows.tsx
  • app/src/pages/Intelligence.tsx
  • app/src/services/api/workflowsApi.test.ts
  • app/src/services/api/workflowsApi.ts
  • app/src/store/index.ts
  • app/src/store/workflowsSlice.test.ts
  • app/src/store/workflowsSlice.ts
  • src/core/all.rs
  • src/openhuman/about_app/catalog_data.rs
  • src/openhuman/agent/debug/mod.rs
  • src/openhuman/agent/harness/harness_gap_tests.rs
  • src/openhuman/agent/harness/session/builder.rs
  • src/openhuman/agent/harness/session/turn.rs
  • src/openhuman/agent/harness/session/types.rs
  • src/openhuman/agent/harness/subagent_runner/ops.rs
  • src/openhuman/agent/harness/test_support_tests.rs
  • src/openhuman/agent/profiles.rs
  • src/openhuman/agent/prompts/mod.rs
  • src/openhuman/agent/prompts/mod_tests.rs
  • src/openhuman/agent/prompts/types.rs
  • src/openhuman/agent/tools.rs
  • src/openhuman/agent/tools/workflow_tools.rs
  • src/openhuman/agent/tools/workflow_tools_tests.rs
  • src/openhuman/agent/triage/evaluator.rs
  • src/openhuman/agent_registry/agents/archivist/prompt.rs
  • src/openhuman/agent_registry/agents/code_executor/prompt.rs
  • src/openhuman/agent_registry/agents/critic/prompt.rs
  • src/openhuman/agent_registry/agents/crypto_agent/prompt.rs
  • src/openhuman/agent_registry/agents/help/prompt.rs
  • src/openhuman/agent_registry/agents/integrations_agent/agent.toml
  • src/openhuman/agent_registry/agents/integrations_agent/prompt.rs
  • src/openhuman/agent_registry/agents/loader.rs
  • src/openhuman/agent_registry/agents/markets_agent/prompt.rs
  • src/openhuman/agent_registry/agents/mcp_setup/prompt.rs
  • src/openhuman/agent_registry/agents/morning_briefing/prompt.rs
  • src/openhuman/agent_registry/agents/orchestrator/agent.toml
  • src/openhuman/agent_registry/agents/orchestrator/prompt.rs
  • src/openhuman/agent_registry/agents/planner/prompt.rs
  • src/openhuman/agent_registry/agents/researcher/prompt.rs
  • src/openhuman/agent_registry/agents/skill_creator/prompt.rs
  • src/openhuman/agent_registry/agents/summarizer/prompt.rs
  • src/openhuman/agent_registry/agents/tool_maker/prompt.rs
  • src/openhuman/agent_registry/agents/tools_agent/prompt.rs
  • src/openhuman/agent_registry/agents/trigger_reactor/prompt.rs
  • src/openhuman/agent_registry/agents/trigger_triage/prompt.rs
  • src/openhuman/agent_workflows/discover.rs
  • src/openhuman/agent_workflows/discover_tests.rs
  • src/openhuman/agent_workflows/inject.rs
  • src/openhuman/agent_workflows/inject_tests.rs
  • src/openhuman/agent_workflows/mod.rs
  • src/openhuman/agent_workflows/ops.rs
  • src/openhuman/agent_workflows/ops_tests.rs
  • src/openhuman/agent_workflows/parse.rs
  • src/openhuman/agent_workflows/parse_tests.rs
  • src/openhuman/agent_workflows/schemas.rs
  • src/openhuman/agent_workflows/schemas_tests.rs
  • src/openhuman/agent_workflows/select.rs
  • src/openhuman/agent_workflows/select_tests.rs
  • src/openhuman/agent_workflows/types.rs
  • src/openhuman/agent_workflows/workdir.rs
  • src/openhuman/agent_workflows/workdir_tests.rs
  • src/openhuman/learning/prompt_sections.rs
  • src/openhuman/memory_tools/prompt.rs
  • src/openhuman/mod.rs
  • src/openhuman/todos/ops.rs
  • src/openhuman/tools/impl/system/shell.rs
  • src/openhuman/tools/ops.rs
  • tests/json_rpc_e2e.rs
  • tests/personality_e2e.rs

Comment @coderabbitai help to get the list of available commands and usage tips.

senamakel added 3 commits May 30, 2026 00:27
Use symlink_metadata (not exists(), which dereferences) when checking the
WORKFLOW.md marker so a symlinked marker inside a discovery directory is
not followed and read — consistent with the non-symlink parent-dir guard
in scan_root. Carried over from review feedback on the prior PR tinyhumansai#2897.
Adds a unix symlink-rejection test.
@senamakel
senamakel merged commit 20ad76d into tinyhumansai:main May 30, 2026
15 of 19 checks passed
senamakel added a commit to senamakel/openhuman that referenced this pull request Jun 6, 2026
senamakel added a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
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