Skip to content

Claude/zen hawking ioda4g - #3606

Open
dr-phil-2004 wants to merge 44 commits into
ruvnet:mainfrom
dr-phil-2004:claude/zen-hawking-ioda4g
Open

dr-phil-2004 wants to merge 44 commits into
ruvnet:mainfrom
dr-phil-2004:claude/zen-hawking-ioda4g

Conversation

@dr-phil-2004

Copy link
Copy Markdown

No description provided.

claude and others added 10 commits October 1, 2026 13:55
…rker)

MarIA is a thin interface on top of Ruflo/Claude Code; it does not touch the
Ruflo core. Lives in apps/maria/ as a standalone app.

- Next.js front (deployable on Vercel): magic-link login, mission launcher,
  live activity feed attributed per agent/sub-agent, changed-files list,
  cancel and follow-up (resumes the same Claude session).
- Supabase schema: missions + mission_events with RLS, column-level grants,
  cancel_mission() RPC and atomic claim_next_mission() for the worker,
  realtime publication.
- Worker (runs on the machine holding the Ruflo workspaces): claims queued
  missions, runs `claude -p --output-format stream-json`, batches events into
  Supabase, detects changed files via git snapshots + Write/Edit tool calls,
  one mission at a time per workspace, process-group kill on cancel/shutdown.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
Lets MarIA share an existing Supabase project (free-tier project limit):

- All tables and RPCs move from public to a dedicated `maria` schema, so
  names cannot collide with the other app.
- Auth users are shared with that app, so access is now restricted to
  maria.members: RLS on every table, cancel_mission() and inserts all
  require maria.is_member(); anon has no access to the schema.
- Front and worker clients target the `maria` schema; the front checks
  membership after login and shows an access-denied screen otherwise.

Verified against Postgres 16 with Supabase role/auth shims: outsiders
cannot read or create missions, members cannot set status or call the
worker RPC, service_role can claim and write events.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
Add MarIA: Claude Code mission control interface
Fail fast in the worker with an actionable message instead of the
supabase-js realtime WebSocket error, add .nvmrc and bump engines.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
…enials

- Append a system prompt telling the agent it runs unattended: no cd or
  chained commands (so pre-approved tool patterns match), no retrying
  denied variants, end with a question for follow-ups.
- Show the result event's permission_denials in the activity feed so the
  user knows which tools to add to MARIA_ALLOWED_TOOLS.
- Broaden the example allowlist to common npm/node/git read commands.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
Those variants miss simple allowlist patterns like Bash(git status) and
get denied; ask for the plain form run from the working directory.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
Instead of auto-denying tools that are not pre-approved, the agent's
permission prompts are now routed to the user:

- worker/permission-mcp.ts: a minimal stdio MCP server that Claude Code
  calls through --permission-prompt-tool. It records each request in
  maria.permission_requests and waits for the user's decision (fails
  closed: deny on timeout or technical error).
- Migration 0002: permission_requests table, decide_permission() RPC
  (members only, first decision wins), realtime publication.
- Front: PermissionPrompt modal with tool, command summary and full
  parameters; tab title shows pending count.
- Pending requests expire when a mission ends or the worker restarts.
- Configurable via MARIA_INTERACTIVE_PERMISSIONS (default on) and
  MARIA_PERMISSION_TIMEOUT_MS (default 10 min).

Verified with the real claude CLI (allow runs the command, deny returns
the refusal to the agent) and the SQL against Postgres 16.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
…denying

- Read mcp_servers from the init event; if the 'maria' permission server
  is not connected, post an error in the activity feed explaining that
  non-allowlisted actions will be denied without a prompt.
- Log permission-server errors (startup and Supabase failures) to
  $TMPDIR/maria-permissions.log, since Claude Code hides MCP stderr.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- src/lib/agents.ts rebuilds the mission's agents from the event stream:
  each Agent/Task tool call opens a sub-agent, messages carrying its
  parent_tool_use_id count as its actions, and the matching tool_result
  closes it (done / error; interrupted if the mission ends first). Also
  tallies calls to Ruflo MCP tools (swarm_init, agent_spawn...).
- AgentsPanel shows main agent, sub-agents (type, description, status,
  action count, last action, nesting) and the Ruflo section.
- After a mission that used Ruflo, the worker snapshots the registry via
  `ruflo agent list --format json` into missions.ruflo_agents (migration
  0003). `--all` is avoided: the CLI turns it into a status === 'all'
  filter that never matches. Command configurable via MARIA_RUFLO_CMD.

Verified against a real stream-json capture of a sub-agent run and the
real ruflo CLI (spawned agents are listed).

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
@dr-phil-2004
dr-phil-2004 requested a review from ruvnet as a code owner October 1, 2026 21:46
dr-phil-2004 and others added 19 commits October 1, 2026 22:49
…ished

- Background sub-agents return 'Async agent launched' immediately; the
  panel no longer marks them done on that result. The final status now
  comes from the system task_notification event (completed / failed /
  stopped), and task_progress keeps the action count up to date.
- Feed: one line per finished sub-agent, and intermediate result events
  (one per turn with async agents) are labelled 'Tour terminé' so only the
  last one reads as the end of the mission.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- New per-mission option "Branche isolée": the worker creates a worktree
  on branch maria/<id>-<slug> from the workspace HEAD, links shared
  untracked state (.claude-flow, .swarm, node_modules) and copies local
  config (.mcp.json, .claude, CLAUDE.md) when they are not versioned.
- Worktree missions run in parallel (MARIA_MAX_PARALLEL per workspace,
  default 3); in-place missions and merges stay exclusive on the main
  folder. claim_next_mission now takes in-place and worktree eligible
  workspaces separately (migration 0004).
- At the end of a mission, the agent's changes are committed on the
  branch (linked/copied entries excluded). "Continuer" reuses the parent's
  worktree so the Claude session can resume in the same directory.
- Branch panel in the mission view: merge into the workspace's current
  branch (refused if it has uncommitted changes; aborted cleanly on
  conflict) or discard (worktree and branch removed), via the
  request_worktree_action RPC; the worker executes and reports errors.

Verified on real git (create, commit, merge, dirty refusal, conflict
abort, discard), the SQL on Postgres 16, and two parallel missions
through the runner with a fake claude.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
With no terminal the interactive question is lost ('The user did not
answer'). Disallow the tool so the agent asks in plain text at the end
of its answer; the user replies with 'Continuer'.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
AskUserQuestion already reaches MarIA's permission prompt tool; it used to
be approved without answers, so the agent got "did not answer".

- The permission MCP server now returns the user's answers as
  updatedInput.answers ({ question: answer }), the format Claude Code
  expects; skipping or timing out tells the agent to proceed with
  reasonable choices and say so.
- Migration 0005: permission_requests.response + answer_question() RPC
  (members only, AskUserQuestion requests only, first answer wins).
- Front: the pop-up shows each question with its options (single or
  multiple choice), an "Autre" free-text answer, "Répondre" and
  "Ne pas répondre".
- AskUserQuestion is only disabled when interactive permissions are off;
  the agent is told to use it when it needs a decision.

Verified with the real claude CLI (answered, skipped, and a regular
permission request) and the SQL on Postgres 16.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- Show 'Session Claude Code ouverte' only once (Claude Code re-emits init
  on every resume when async sub-agents report back).
- Only announce task_notification for sub-agents; background commands
  (npm test, build) emit it too and showed up as 'Sous-agent sous-agent'.
- Cost is cumulative: display it only on the final result line.
- Headless note: sub-agents cannot message each other, so the agent is
  told to run them synchronously, relay each result itself, and not poll
  with ScheduleWakeup/ListAgents.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- "@architect @coder Ajoute…" limits the mission to those sub-agents: the
  main agent is told to delegate each step in order, synchronously, relaying
  each result to the next.
- A PreToolUse hook (worker/agent-guard.ts, passed via --settings) denies any
  other sub-agent type and background launches.
- The worker publishes the agents available in each folder (.claude/agents,
  user agents, built-ins) to maria.workspaces.agents (migration 0006); the
  mission form autocompletes @ mentions and previews the chain.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- Agents whose name contains spaces ("Benchmark Suite", "Performance
  Monitor"…) are now listed and mentioned as @Benchmark-Suite; the chain
  note and the guard keep the exact subagent_type.
- The suggestion menu shows every match (scrollable, keyboard-followed)
  instead of the first 8, and also matches on the description.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- The worker reads memory_entries from each folder's .swarm/memory.db
  (read-only, node:sqlite) every 30 s and mirrors added, changed and
  removed entries into maria.memory_entries (migration 0007).
- New "Mémoire" tab: per-folder entries with namespace filters, search on
  key/content/tags and expandable content.
- MARIA_MEMORY_DB sets the database path (relative to each folder), or
  disables the sync with 0.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
MarIA: permissions, agents, worktrees, questions, @-agent chains and Ruflo memory
`npm run service -- install` writes ~/.config/systemd/user/maria-worker.service
(current node/claude PATH frozen in, restart on failure, graceful SIGTERM to
the worker only) and starts it; restart/status/logs/uninstall/print
subcommands wrap systemctl and journalctl.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
README covering prerequisites, Supabase setup (exposed schema, migrations,
member, auth redirect URLs), .env.local variables, the worker as a systemd
service, Vercel settings, usage and troubleshooting.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- Sidebar modeled on the reference designs: logo and collapse toggle, search
  (⌘K / Ctrl+K), Overview, Category (Teams, Tickets, Notifications, Brains),
  Settings (Connecteurs), Agents (available agents from all folders), user
  card and Sign out at the bottom. The active item gets the purple gradient
  and glowing edge marker.
- Pages: Overview holds the missions (form, list, live view); Brains shows
  the Ruflo memory; each agent has a page with its description and a
  mission form prefilled with its @mention; Teams, Tickets, Notifications
  and Connecteurs are placeholders for now.
- Pending permission requests show as a badge on Notifications.
- Current page is kept in the URL hash; collapsed state in localStorage.
- Geist font and lucide icons; refreshed dark palette.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
MarIA: worker as a systemd service + setup guide
…witch

- Agents section modeled on the "My team" reference: "Agents" header with a
  "+" button, one row per agent with an app-icon style avatar (gradient
  squircle + creature: cat, sleepy blob, skull cat, chef, rabbit, flame,
  ghost, picked from the agent name) and signal bars showing how often it
  was @-mentioned in recent missions (green / yellow / red). Busiest agents
  are listed first.
- "Mode sombre" switch above the user card: dark by default, light theme
  on demand, remembered in the browser and applied before first paint.
- "+" opens a placeholder "Nouvel agent" page.
- next.config: agentRules false so `next dev` stops writing AGENTS.md and
  CLAUDE.md into the app folder.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- Sidebar lists only the 4 busiest agents (plus the one currently open),
  then an "and N more…" row that opens the agent library.
- Agent library page: every agent as a card with avatar, @mention,
  description and load bars, sorted by recent use, with a filter.
- Search moved out of the sidebar into a page header, next to a sun/moon
  theme toggle on the right; it finds pages, agents and missions
  (⌘K / Ctrl+K, arrows, Enter).
- Tighter sidebar spacing so the agent list fits without scrolling;
  removed a stale responsive rule from the old grid layout.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
dr-phil-2004 and others added 15 commits October 3, 2026 00:47
MarIA UI: team-style agent list, creature avatars, dark mode, header search
…ission dialog)

- Full-width "Activité" card modeled on the Weekly Engagement reference:
  one cell per day (rows Mon–Sun, columns weeks), 4 intensity levels with
  legend, hatched empty/low cells, "View all" switches 26 ↔ 52 weeks, and a
  refresh button. Counts come from missions created per day.
- Below it, the mission list: status, title, @-mentioned agents' avatars,
  branch state, folder, date and cost; clicking opens the mission on its
  own page (#/missions/<id>) with a back link.
- "Nouvelle mission" button in the page header opens the mission form in
  a dialog; the new mission opens right away.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- The header is now shared by every page and sits above the content:
  search centered, theme toggle and user profile at the far right.
- Clicking the profile opens a menu with the name, email and Sign out;
  closes on outside click or Escape.
- Profile card and Sign out removed from the bottom of the sidebar.
- Page title moved into the page content; the "Nouvelle mission" button
  belongs to the Overview page, next to its title.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- "Nouvelle mission" now opens a full page (#/new-mission) instead of a
  dialog, modeled on the reference: MarIA logo tile with purple glow,
  greeting ("Ravi de te voir, … ! Quelle mission pour aujourd'hui ?"),
  subtitle, a large composer (folder picker and "Branche isolée" toggle
  above, @-agent autocomplete, round send button) and three suggestion
  chips (tests, bug fix, code review) that prefill the prompt.
- Mission creation logic extracted into useMissionComposer, shared with
  the existing MissionForm.
- The "unknown agent" warning no longer shows for the mention being typed.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
…ee, glowing badges)

- Status badges everywhere (missions, sub-agents, branch) are glowing pills
  with a filled icon dot: cyan "En cours", green "Terminée", red "Échec",
  indigo "En attente", yellow "À valider", purple "Fusionnée", gray…
- Mission conversation as a timeline: compact lines with a small icon,
  "agent verb object" and relative time (click a tool line to see its
  output); agent replies and the user's prompt as highlighted messages with
  a breadcrumb card, and a "Répondre" action on the last reply.
- Agents card: MarIA at the center with sub-agents connected around it;
  connections are animated while an agent works, plus a list with badges.
- Modified files card: tree with collapsed single-child folders and
  +added / −deleted line counts per file and in total, under the branch.
  The worker now computes those counts (git diff --numstat) and stores them
  in missions.file_stats (migration 0008).
- The reply box is the same composer as the "Nouvelle mission" page
  (shared Composer component), sticky at the bottom; the side cards float
  (sticky, translucent, shadowed).

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
MarIA UI: Overview page, universal header, "Nouvelle mission" page
- New maria.teams table (migration 0009): name, description and members
  ({agent, role, lead}), readable and editable by MarIA members only.
- Teams page modeled on the reference: one team at a time on a dark stage
  lit by a purple beam with drifting sparks; name, description, member
  count; org chart with the lead(s) on top and curved glowing links to the
  other members (agent avatars in framed tiles, green dot when the agent is
  in a running mission, role underneath; click opens the agent, hover
  shows a remove button).
- "Terminal" view renders the team as a `tree`-style console output.
- The reference's header buttons live in a floating glass dock at the
  bottom: Chart / Terminal switch, ‹ team dots ›, "+ Membre", "+ Équipe"
  (← / → keys also switch teams).
- "Confier une mission" opens the new-mission page prefilled with the
  team's @agentS (leads first); dialogs to create a team and add a member.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
MarIA UI: Teams page (org chart, terminal view, floating dock)
…ch and PR per ticket

- maria.tickets table (migration 0010): number (T-12), title, description,
  status (open → grooming → planning → ready → in_progress → review →
  blocked → done), priority, type, assigned agent, folder, branch, PR url
  and number, last mission; missions get a ticket_id. Members only (RLS),
  realtime updates.
- Board view modeled on ClickUp: one tinted column per status with glowing
  status badge and count, drag & drop between columns, quick add at the
  bottom of each column. Cards use the boarding-pass design: agent avatar
  and type on top, "T-12 ─⑂─ ruvnet#34" route, title, notched dashed tear line,
  date / priority pills and a PR button.
- List view grouped by status, and a spreadsheet view with inline status,
  agent and priority editing.
- Ticket drawer: editable title, description and fields, branch and PR
  link, runs history, "Lancer l'agent" (resumes the previous run's
  conversation and branch when possible).
- Worker: a ticket mission runs on branch maria/T-<n>-<slug>, moves the
  ticket to in_progress, commits as "T-<n>: <title>", then pushes the
  branch and opens (or reuses) its PR with the GitHub CLI and moves the
  ticket to review with the PR link (blocked on failure).
  MARIA_TICKET_PR=0 disables push/PR.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
Ticket cards are no longer all white: the paper is pastel pink (urgent),
peach (high), blue (normal) or mint (low), with ink, dashed lines, pills
and placeholders derived from it.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
MarIA: Tickets page (Kanban / List / Spreadsheet), one branch and PR per ticket
- NotifCard: shared notification component modeled on the reference —
  dark card with a colored glow in the top-right corner and tinted border,
  outlined status icon, bold title, text, dark action buttons, close
  button, optional (indeterminate) progress bar. Tones: progress (blue),
  success (green), error (pink), warning (amber), permission (violet),
  question (sky).
- The permission and question pop-ups now use NotifCard (Autoriser /
  Refuser, question form inside).
- Toasts (bottom right) when a mission followed live finishes, fails or
  is cancelled, with "Voir la mission"; auto-dismiss after 9 s.
- Notifications page: "À traiter" first (pending permission requests with
  Autoriser / Refuser inline, pending questions, running missions with an
  animated progress bar and Annuler), then Aujourd'hui / Hier / Plus tôt:
  finished missions (failed ones offer "Réessayer"), permission history
  (allowed / denied / expired), ticket pull requests ("Ouvrir la PR").
  Filters (Tout, À traiter, Missions, Autorisations, Tickets), unread dots
  and "Tout marquer comme lu" (remembered in the browser), dismiss per
  card; permission requests update in real time.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
- Connectors page: worker status (Claude Code, GitHub CLI, Ruflo, project MCP),
  catalog of MCP servers (GitHub, Playwright, PostgreSQL, Slack, Notion, custom)
  with toggles, detail drawer (tokens, ask/allow policy, allowed tools, agent
  restriction) and global "always allowed" tools.
- Migration 0011: maria.connectors, maria.settings, workspaces.health.
- Worker: publishes its health, loads enabled connectors into --mcp-config and
  --allowedTools for each mission; secrets stay in the worker's .env.local.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp
MarIA UI: Notifications page and Connectors page (MCP servers per mission)
- Studio page (new agent, or "Modifier l'agent"): name, description, model,
  color, allowed tools, connectors and instructions, with starter templates
  and a live preview of the generated .claude/agents file.
- Migration 0012: maria.agent_files (definitions published by the worker) and
  maria.agent_ops (save/delete requests; members can only insert them).
- Worker: publishes agent definitions, applies requests inside
  <workspace>/.claude/agents only, and keeps header keys it does not manage
  (Ruflo agents' type, capabilities, hooks...).

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01EYLzTmzezSkXAERkr41FBp

ruvnet commented Oct 7, 2026

Copy link
Copy Markdown
Owner

@/tmp/claude-0/-home-user-ruflo/99a198e7-2058-59ed-a922-018777f60b76/scratchpad/triage/c3606.md


Generated by Claude Code

@ruvnet

ruvnet commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Flagging this for maintainer attention rather than acting on it myself: this PR has no description, an auto-generated-looking branch name (`claude/zen-hawking-ioda4g`), and adds an entirely new, unrelated Next.js application (`apps/maria/` — ~12k lines, 82 files: dashboard components, agent/mission UI, git/gh CLI wrappers) with no connection to anything else in this repo's scope.

I scanned the diff for anything concerning (supply-chain risk, obfuscated code, shell-injection-prone exec calls) — found nothing alarming; it uses execFile consistently rather than shell-string exec, no postinstall scripts, no network exfiltration patterns. So this doesn't look malicious, just unclear in intent and out of scope as submitted.

@dr-phil-2004 — could you add a description explaining what this is and why it belongs in ruvnet/ruflo? Without that, this isn't something that should be merged as-is.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants