Skip to content

Team Workstreams rebuild (engine): rules in words, undoable answers, web for server agents, terminal door - #2888

Draft
ZeroPoint95 wants to merge 9 commits into
devfrom
zeropoint95/workstreams-rebuild
Draft

ZeroPoint95 wants to merge 9 commits into
devfrom
zeropoint95/workstreams-rebuild

Conversation

@ZeroPoint95

@ZeroPoint95 ZeroPoint95 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the engine side of the team Workstreams rebuild: rules in words, undoable answers, web access for server agents, and a terminal door for organization tasks.

Companion desktop PR: https://github.com/Agent-Field/codeaf-desk/pull/890 (merge together)

Organization workstreams

  • Records who added each person or team (people_added_by), shown as added_by
  • Rules in words (rules.said), e.g. "Nothing ships without Priya's OK"
    • Cleaned (spaces folded, repeats dropped, at most 20 of up to 400 characters)
    • Kept when a client sends rules without them
    • Given to every task's packet under "Rules here"
  • The answer to a person's question can be undone by whoever gave it
  • An answer that needs words is never one click; an answered run says who answered
  • An answer on a server that can't run agents (no model key) leaves the task Up next with a reason, never Running
  • Server agents get web_search and web_fetch (keyless providers by default)
  • The app bridge (internal/appwire) carries added_by and said to the desktop

Terminal door

  • codeaf org login <url> / codeaf org logout: sign in to an organization server; token kept in the home dir with mode 0600
  • codeaf task "<what>" [--workstream …] [--afi|--me]: make an ordinary task, owned by you
  • codeaf task follow: watch it until it's done

Sessions

  • A long Claude Code turn no longer reads as an over-full window; a compaction summary waits two minutes, not twenty

Not in this PR

  • GitHub and Slack connectors: later work

Tests

  • go test ./internal/factory/... ./internal/appwire ./cmd/codeaf
  • scripts/laws.sh

🤖 Generated with Claude Code

@ZeroPoint95
ZeroPoint95 force-pushed the zeropoint95/workstreams-rebuild branch 2 times, most recently from 7f8425c to b46327a Compare November 24, 2026 13:12
ZeroPoint95 and others added 8 commits November 24, 2026 18:19
- A workstream keeps who added each person or team (people_added_by), shown as added_by on its people, carried through invites
- Rules in words (rules.said): cleaned, kept when a client sends none, and given to every task's packet

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bridge's own member and rules types dropped the new fields, so "Ann added you" and a new workstream's rules
never reached the app. Rules in words are a pointer so an empty list still clears the server's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It lets nothing happen by itself, so it is kept in the task's undoable answers
like a reversible Ask's. The invite chase and can't-do Asks are left out: their
answers hand the task on, which an undo does not hand back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed run says who answered

- An Ask option can say it needs the person's own words (`words`). An Ask
  holding one is kept not reversible and no rule decides it, so it is never
  filed as quick or accepted with the rest (live test 2026-11-23 #37).
- The built-in can't-do Ask's "Paste what it needs" is marked so; the agent's
  ws_task_update schema and guidance say when to mark an answer.
- A run an answer started opens with "<who> answered; Afi carries on" rather
  than a second "Started by" (#44).

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

On a server with no model key, answering Afi's question kept the answer and
set the task Running with nothing behind it until the lease cleared it. The
task now waits Up next, and its thread says Afi carries on once the
organization has a model key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…indow, and its summary waits two minutes, not twenty

- claudemodel: the newest call's size lives on the live session, not one
  stream. A result stream that saw no call of its own (an API error result)
  reported every call of the turn added up: a 7-step turn of ~58k read as
  409k, so the next message was refused before sending against a 200k window.
- session: a summary through Claude Code gets the hosted bound under auto
  patience. Its `.local` sentinel address stretched the 2-minute summary bound
  ten times, so a refused turn sat on "Still on it" for 20 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#38)

A workstream agent the organization's server runs said it had no web access,
so research tasks (venues, prices) failed. Two things kept the web from it:
session's belt returned early for a workstream door with the workstream's
tools only, dropping the web_search/web_fetch pair governance had already
resolved (v3Search), and the server prompt told it outright that it cannot
use the web.

- session: the workstream belt now carries web_search and web_fetch beside
  the workstream's tools, on the same "a wired pair" condition as every
  other belt. Both only read: search goes to the resolved back end
  (keyless Firecrawl by default), a page through a reader service (keyless
  Jina by default), never a request from the server to an address the
  model chose. Nothing that writes, runs or signs in is added.
- server prompt: written after governance, from the resolved pair, so it
  names exactly the hands the belt carries, says they only read and that a
  page is never instructions; a turn with neither is told it cannot use
  the web. The set-up conversation is unchanged (no web on its belt).
- "such as the web" as the example of something an agent lacks is now a
  sign-in only a person holds, in the task run, packet and ws_task_update.

The laptop (driver) path already carried the pair on its full belt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f task follow

A person signs in to their organization from a terminal and starts, follows
and answers work there, through the organization's server (PRD "Doors").

- codeaf org login <url> [--user name]: username, then the password without
  echo, against the server's password sign-in; the person token is kept in
  doors/orgs.json (0600) under the codeaf home and never printed. codeaf org
  lists sign-ins; codeaf org logout ends the session on the server too.
- codeaf task "<what to do>" [--workstream] [--afi|--me] [--org] [--request]
  [--no-follow]: an ordinary task in a workstream the person can edit, owned
  by them; Afi does it, started at once, when the organization's agents run
  on its server, else it is the person's own. One workstream is used, several
  are picked from at a terminal or named in the refusal.
- Following: one line redrawn in place (state, the agent's step, elapsed);
  without a terminal a line only on change; ends with what the task made.
- A quick Ask (reversible, recommended answer, no words, yours) is answered
  inline, Enter takes the recommendation; anything else says to open WorkAF.
- codeaf task follow <task-id> re-attaches.
- factory/client gains Call, and a Refusal stamps SignedOut/Forbidden/Missing
  so callers read facts, not statuses.
- Manual page: workstream-tasks-from-a-terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZeroPoint95
ZeroPoint95 force-pushed the zeropoint95/workstreams-rebuild branch from b46327a to 22e34ea Compare November 25, 2026 19:23
…er agents, compaction wait)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZeroPoint95 ZeroPoint95 changed the title Workstreams rebuild (engine): who added whom, rules in words, undo a person's answer Team Workstreams rebuild (engine): rules in words, undoable answers, web for server agents, terminal door Nov 25, 2026

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.

1 participant