Repository navigation
Proposal: AI-led Project governance, unified board and Handoff-driven Workflow (five-stage plan) #1550
Description
Vision and two fundamental changes
FlyBot should become an AI-led Project Workspace. AI runs the project day to day; humans govern the rules, resolve consequential decisions, contribute proposals, and receive accountable results.
- Project owns one unified Tasks board and the participating humans, AI roles, workflows, resources, and durable project knowledge. Opening a Project goes directly to its board (task pools, each task's current workflow/handoff, project Bot health, attention needed, recent deliveries).
- Workflow changes from mandatory DAG orchestration to policy-based Handoff between role task pools. A Workflow is a persistent AI collaboration team; strict DAG and guards remain available where ordering is essential.
This is a design/roadmap proposal, not an implementation-ready ticket. Resolve the shared data/runtime contract before splitting development issues. Reuse existing mechanisms instead of introducing parallel boards or schedulers.
Product and governance model
Project and role-specific UI
- Owner (one per Project): ultimate governor for mission, governance policy, roles/membership, project Bots, compute/resources, budgets and autonomy boundaries. Owner's console may be detailed (Tasks/Workflows/Bots/Resources/Members/Project State/RSI); Owner normally does not manage daily tasks.
- Maintainers: make operational decisions and decide roadmap/architecture matters under governance policy; their UI emphasizes project board, decisions, meetings and deliveries.
- Members: submit issues/proposals, discuss and contribute, without default approval rights; simple project board and project assistant.
- Chief: project-owned AI manager, plans and routes work, classifies decision severity, organizes discussions and execution, escalates exceptions; not the ultimate authority.
- Project Assistant (one user–Project relationship): user's agent in this Project; holds user+project-scoped memory, can follow up on commitments, represent authorized preferences in Chief-convened meetings, and ask the human when beyond mandate. Every day at 09:00 in the user's timezone, sends a summary of the previous 24h and clear decisions requiring that person's input (with configurable delivery/quiet rules). Personal memory stays in FlyBot's own storage, never the source repository. The assistant may optionally connect the user's own GitHub account (via explicit per-user authorization), so proposals, issue comments and other contributions made on the user's behalf can be attributed to that person's GitHub identity. The assistant must distinguish user-approved/authorized actions from project-bot automation and preserve an audit trail.
Each user sees one Project board, with progressively exposed details. Workflow remains visible, not buried: it displays team roles, pool backlogs, worker activity, exceptions, handoff rules and outcomes; advanced controls need not burden Member UI.
Decision contract
Chief classifies each proposed decision and records the classification and rationale:
- Ordinary: one Maintainer's approval can conclude it.
- Major (e.g. substantial roadmap or architecture change): consensus among participating/required Maintainers under an explicit participation rule; unresolved objections trigger internal discussion, not silent approval.
- Severe (e.g. credible security/data-loss/irreversible-impact risk): a substantive minority objection pauses the risky action for review; it is a minority-protection/veto-on-risk rule, not automatic authority to impose an alternative. Owner-defined escalation/resolution rules apply.
- Owner establishes/changes supreme governance rules and resolves matters reserved to that authority.
- Maintainers can challenge Chief's classification and request reclassification. An LLM label alone never confers or bypasses GitHub/FlyBot authorization. All decisions are recorded with participants, evidence, dissent, version and resulting actions.
AI identities and authorization
Chief and Project Bots belong to the Project, not a human account. Start with a project-authorized GitHub App installation shared for repo operations, plus separate FlyBot Bot/Role/Task identities and auditable authorization checks. Avoid personal tokens for unattended project execution. A shared App does not imply independent native GitHub approval identities; maintain independent review attestations and observe protected branch/required human checks. Use minimum GitHub permissions. Revisit multiple Apps only if real identity/permission constraints require them. Personal Project Assistants are different: they may use their human user's individually authorized GitHub identity for user-attributed proposals, issue discussions and contributions. The assistant must never use the shared Project App to impersonate a user, nor borrow the user's authorization for autonomous project-Bot actions. Scope permissions and consent to the specific action; GitHub-native authorship follows the actual credential type and API operation, so verify attribution in integration tests.
Project State (minimal first version)
Store shared durable knowledge in the designated Project source repository, using existing file practices:
PROJECT.md: mission, owner/maintainer roles (or references), repo/resources links, governing boundaries.ROADMAP.md: current initiatives, milestones and priorities.AGENTS.mdand existingdocs/: operational rules, architecture and standards (reuse, don't duplicate).decisions/: concise dated meeting/design decisions, evidence, objections, status and links to resulting tasks.LESSONS.md: observed failures and learning; reuse the existing lesson→validated standard promotion mechanism.
Task/queue/worker runtime state, approval/reminder state, user GitHub connection/authorization metadata and Project Assistant private memory stay in FlyBot storage. GitHub issues, PRs and CI remain their authoritative sources. A shared context reader presents current relevant versions to Chief and ephemeral workers; do not indiscriminately inject all files into every context. Record changes with provenance. Use repo review/approval rules for sensitive state edits.
Workflow and execution contract
- Durable Bot Role defines skills, tools, policies and reusable project knowledge; Task Pool holds ready work for a role within a Workflow; ephemeral isolated Bot Instance claims one executable task with task-scoped context and resource quota.
- A user-facing parent Task retains stable identity across execution. Handoffs may create linked role-specific execution tasks (or other transitions once the contract is agreed) and preserve task lineage, prerequisites, result artifacts, acceptance criteria and verification.
- After execution, a Bot proposes an action to a single authoritative Task/Handoff API; the system validates destination, authorization, required evidence, concurrency, idempotency, retries/cycles and resource limits before enqueueing. Receiver claims asynchronously; no Bot writes another role's pool without checks.
- Handoff supports fan-out, return-to-upstream, follow-up work, failure and escalation. DAG/guards remain an optional strict execution policy for release, approvals and other ordered processes.
- Normal uncertainty is resolved locally by the role or routine handoff. Cross-role disagreement, repeated failures, unclear ownership or policy gaps escalate to Chief, who may convene a temporary meeting of Bots, Maintainers and authorized Project Assistants. Archive a structured decision and create linked execution tasks. A meeting is not itself a permanent Workflow.
- Differentiate live execution messages from human-facing conversation; do not leak ephemeral Bot replies into Chief's chat. Keep recoverable, auditable task state across failures and restarts.
Existing code to build upon
core/src/client/kanban.js: per-Bot/group board, task columns and subtasks.core/src/host/task-drive.js: task wakeups, queue role claims and WIP constraints.core/src/shared/workflow.js,core/src/shared/workflow-run.js,core/src/host/workflow-store.js: graph/guard workflow definition and task-node runtime.plugins/workflow/src/service.js: live run queue/concurrency and ephemeral node Bots.plugins/workflow/src/match.js: explicit/trigger-based routing.- Repo
AGENTS.mdandLESSONS.md: operating contract and experience-to-standard practice.
A prerequisite to reworking dispatch is clarifying how core Workflow and the Workflow plugin converge on one task identity and execution lifecycle.
Five-stage roadmap (Stages 1–4 implementation direction; Stage 5 research placeholder)
Stage 1 — Run FlyBot development as an AI-governed Project (dogfood first)
Objective: prove project governance and decisions with existing Bots, Tasks, groups and GitHub, before rebuilding the interface or engine.
Scope: designate Owner/Maintainers; publish minimal governance rules; configure Chief's severity triage and escalation; convene temporary discussions using existing groups; store formal decisions and link follow-up Issues; initialize lightweight Project State files.
Acceptance: use this proposal (#1550) or a comparable real major design issue to demonstrate proposal → Chief classification/research → Maintainer discussion and consensus → archived decision → executable Issues. No PR for the architecture proposal before authorization. Include a disagreement/reclassification case. Capture what Chief could automate and what still needed human intervention.
Stage 2 — Project as the work and knowledge boundary
Objective: give the already-running organization a unified Project view without duplicating task stores.
Scope: Project identity and repository binding, task affiliation and unified board; role-aware Owner console vs Maintainer/Member views; show task/workflow/bot status, exceptions and recent verified deliveries; shared Project State context reader; adapt existing Bot/group task boards as filters. Project Assistant initially may be a limited user–project identity with private memory, optional per-user GitHub connection for attributable contributions, and on-demand summaries.
Acceptance: one Project shows tasks originating from Bot, group and Workflow in a single board with stable identities and consistent statuses; Owner can reach members, Bots, resources and governance controls; non-owners cannot perform those operations. State changes in repository are versioned and do not silently overwrite decisions.
Stage 3 — Handoff-controlled Workflow and isolated pool workers
Objective: enable independent role pools and dynamically handed-off task execution, preserving strict DAG as an option.
Scope: agree typed Task/Handoff contract; one source of truth for task progress; role queues, isolated ephemeral worker instances, quotas and lease/recovery semantics; branching and rework; evidence and audit trail. Reconcile core and plugin workflows incrementally behind the shared task contract.
Acceptance: real issue → Dev → Review → Test with independently claimed tasks; review rejection sends tracked rework; concurrent tasks do not share worker state; restart/retry doesn't produce duplicate downstream work; strict release DAG still passes regression tests; measurable accepted deliveries and resources.
Stage 4 — Chief meetings and Project Assistants in live collaboration
Objective: solve exceptional work without manually programming workflow branches; minimize burden on humans.
Scope: Chief triggers temporary AI/human meetings for unresolved issues; participants include authorized users' Project Assistants; archive decision with dissent/evidence/owners and generate linked tasks; maintain each assistant's private FlyBot-side memory; schedule personalized daily 09:00 project digests and actionable decisions, with opt-out/quiet/authorization controls.
Acceptance: an ambiguous architecture conflict escalates, meeting reaches a governance-valid outcome or remains explicitly blocked, produces archived decisions and downstream tasks. Two users receive different personalized digests derived from the same factual project status without revealing one another's private memory.
Stage 5 — RSI / autonomous project evolution (reserved; design pending)
Objective: reserve the direction of optimizing Workflow efficiency and project evolution, without committing to a specific RSI mechanism or implementation now.
Scope and acceptance criteria are TBD after separate research and design review. Candidate topics include evaluation evidence, safe experiments and rollback, evolution of Handoff rules and next-goal selection. These are research questions, not approved implementation requirements.
Gate: do not start Stage 5 development, assign it to the agent queue, or claim performance gains until a separate proposal defines the optimization objects, evaluation criteria, safety boundaries, experiments and measurable acceptance tests. Stages 1–4 should collect reliable task/artifact/handoff/decision provenance that may later support RSI.
What we are not doing in the first stage
No complete new UI, no broad rewrite of the existing DAG engine, no second board or scheduler, no big knowledge graph/vector-memory platform, no autonomous mission changes and no unreviewed privilege expansion. Track measured outcomes; treat efficiency/scalability/RSI as hypotheses to verify.
Example target end-to-end
Member raises a Proposal → Chief classifies and researches → Maintainers discuss (and may involve their Project Assistants) → a governance-valid decision is saved in decisions/ and Roadmap updated → Chief emits linked Tasks → role pools claim them in isolated Bot instances and hand off with verified artifacts → Chief escalates unforeseen conflicts via meetings → Project board displays progress and deliveries → assistants report actionable summaries; later RSI experiments compare and improve the operating policy.
Decision requested from the community
Approve the target product model and the five-stage sequence, beginning with Stage 1 dogfooding. This issue should remain a design proposal / human decision item until the governing Owner/Maintainers approve scope and split each implementation stage into reviewable tasks.
Activity
Birfy commentedon Oct 28, 2026
Written-by: Triage
needs-human — 这是产品/运行契约的提案(Project 作为工作边界、Workflow 从强制 DAG 改为 task-pool + Handoff),不是可复现的缺陷,也没有验收口径;按准入线不生成 PR、不进 agent 队列,等 owner 定方向。
[-]Proposal: Project-centric task board and Handoff-driven Workflow (AI-led collaboration)[/-][+]Proposal: AI-led Project governance, unified board and Handoff-driven Workflow (five-stage plan)[/+]Birfy commentedon Oct 29, 2026
Written-by: Chief
Owner decision 2026-10-29 (Asia/Shanghai): the target product model and the five-stage sequence are approved, and Stage 1 starts now.
needs-humanis removed on the owner's instruction.Scope stays what Stage 1 itself says: prove the governance loop with the existing Bots, groups, tasks and GitHub — no new UI, no DAG engine rewrite, no second board, no scheduler. Stage 5 stays gated by its own research proposal.
Stage 1 is split into reviewable deliverables; the first one is #1680 (Project State: PROJECT.md / ROADMAP.md / docs/governance.md / decisions/). Later Stage 1 slices (Chief severity triage and escalation wording, recorded disagreement/reclassification case) get their own issues once the first lands, so this issue remains the umbrella and is not closed by a PR.
Admission line: the owner directed this work on 2026-10-29, which is the authorisation the design-proposal rule needs. Every slice still needs green
tests-okat its tip and the usual gates.Corrected 2026-10-29: the first slice landed as issue #1680 (the #1551 number was a slip in the line above).
Record the ThinkFlowLab#1550 decision walk-through in decisions/ (Thi…
Add a Project State reader tool for current file versions
Add one Project board read model for Bot, group and workflow tasks (T…
HugoXK commentedon Oct 29, 2026
Written-by: Chief
Development plan for Stage 2 (board + workflow visibility) — review request
Follow-up to the owner decision recorded above (2026-10-29). The model and the stage order stay exactly as approved; this is the build plan for the next two deliverables, and I am asking for a verdict on the plan itself so the PRs are not re-litigated one at a time.
Order of work
#1706— a failed or still-running workflow run becomes visible in the Inbox, where the owner already answers things.publicRungainsfinishedAtandcurrentStep; no other run state changes. Acceptance: a failure from any graph shows in the Inbox within one poll (today: 0).#1710— one read-only Project board per Project, rendered from rows the client already holds: no new endpoint, no host change.Three places where this meets today's UI, and the resolution
inbox.js:49(failed),:238(aturn:<id>card for a failed turn),:252(a failed task card), and a dedupe at:262-263("its last turn failed: that card is in Needs you"). A workflow failure extends that dedupe, it does not open a second one: one failure, one card, only the latest failed run per graph, and the lane count equalsneedsCount(:281).kanban.jshas two scopes today (group vs own at:170/:199), rail rows carrydata-kindbot/group(:215), the title comes from:355, the default selection from:363, and only a bot scope can create (:391). A Project scope is a third value in that enum — not a second board: the Project row sorts first, appears only when a member is bound, the Project board is read-only and labelled so, and drag stays on the per-Bot board.project-boardwhileauthz.js:68leaves it out ofTASK_ENDPOINTSand its rows carry neithertitlenorstatus; when both hold we change one input, not the view. (The#1713defect — the merged endpoint being denied when authz is on — is a separate whitelist fix, filed on its own evidence.)Non-goals: a second dashboard, a new aggregate endpoint, a DAG rewrite, a scheduler, and folding run cards into task identity in the first pass. Any of those is a different product and should arrive as its own proposal.
PRs on this surface right now:
#1714(ours, PASS atb4e6d2c3, read-only client slice) and#1715(same surface, plus acanManagegate). Only one should land: whichever merges first becomes the base and the other rebases as the next slice. Neither is closed and replayed.What I am asking for: say whether this contract is right, or name the one constraint that must change. With that answer,
#1706and the board slice go to PR on their own test evidence without reopening the product question — which is the whole point of asking now.HugoXK commentedon Oct 29, 2026
Written-by: Chief
Review of the RFC, and the decision I am asking for
I have read the five stages against the code that exists today (live main
aafb8d74). The model is right and I am not asking to change it. What I am asking for is the RFC's own Stage 1 closing step — a maintainer review verdict on this proposal — because Stage 1's acceptance cannot be met by one side alone.Stage 1 evidence so far (all on main today)
PROJECT.md,ROADMAP.md,docs/governance.md,decisions/(3 records) landed via Stage 1: publish the minimal Project State (PROJECT.md, ROADMAP.md, docs/governance.md, decisions/) #1680 / Add the minimal Project State: PROJECT.md, ROADMAP.md, docs/governance.md, decisions/ #1682.decisions/2026-10-29-stage-1-approved.mdanddecisions/2026-10-29-stage-1-dogfood.mdrecord the owner's approval of the model and the stage order, with provenance.needs-human(comment 6470699727), the Owner reclassified it and Stage 1 started (comment 6495508222). That is the recorded disagreement the acceptance criterion wants.What is still missing is the step that needs you: a maintainer discussion and a written verdict. Everything else in Stage 1 is running.
Three points I want settled at RFC level before Stage 2 ships, all of them where the RFC and today's code disagree:
One task identity. The RFC says this is a prerequisite to reworking dispatch. Today a Project board can only be a view over three sources —
#1703'sproject-boardreads Bot boards, group boards and workflow runs, and our own slice (Stage 2.3: the Project board view and who may act on it (owner vs member) #1710 / feat(client): a read-only Project board over the task records #1714) renders them client-side fromtasks. So Stage 2 should state one rule: the Project board never becomes a second task store, and identity stays with the task, not the row. If you agree, this is one sentence in Stage 2 and it removes the biggest rewrite risk in Stage 3."Non-owners cannot perform those operations". Authorization today is a flat endpoint allowlist (
authz.js:60, whitelist at:68,:406), with no Project roles. Project roles (owner/maintainer/member) exist nowhere in the enforcement path. So Stage 2 must not claim authorization it does not have: I propose roles are display and routing labels in Stage 2, nothing in the access path changes, and the real gate lands with its own authz proposal. If the RFC means something stronger, say so now — otherwise the acceptance line "non-owners cannot perform those operations" is unverifiable.Project State writes.
decisions/is the evidence trail, so runtime must never write it directly: every change goes through a reviewed PR, never a host write. That is how "versioned and do not silently overwrite decisions" becomes testable.One caution on Stage 3, not a change request.
task-drive.js:17-18(WRITE_BACK_WAKES = 2, 24h expiry) is where a typed Handoff contract changes real wakeups and WIP behaviour. I will not start Stage 3 before point 1 is answered, because guessing the task identity there costs a rewrite of the dispatch loop, not a patch.What I am asking for: confirm these three points, or amend them. With that answer Stage 2 starts immediately — #1706 (workflow failure visible in the Inbox) and #1710 (one read-only Project board) go to PR on their own test evidence, and I report Stage 1's loop result back on this thread. I am not asking for code review here, and no PR will close this issue.
Add the Project board view and gate who may act on a Project (ThinkFl…
feat(tasks): one typed task contract for class, rework, handoff, evid…
feat(tasks): one typed task contract for class, rework, handoff, evid…
Birfy commentedon Oct 29, 2026
Written-by: Chief
Where #1550 actually stands, by slice. Every row below is a merged commit on
main, checked against the pull request list at 2026-10-29T19:11Z (main80709a71).Stage 1 — Project State
PROJECT.md,ROADMAP.md,docs/governance.md)c5ed512ddecisions/(with the reclassification case)dcaae9bbb58ad688Stage 2 — Project board, roles, assistant
d5347032554d939ef0159ea8aafb8d74d34e4e62(shipped in v0.2.14)Stage 3 — typed handoff, role pools
80709a71, main checks greendev/1729-role-queues-leasesStage 4 — meetings and personalized digests
Acceptance against this issue's own words
Open items that are not development
peiqiangyu@huawei.com.zy95-12accepted and is now a maintainer;chendanyang4@huawei.comresolves to the owner's own account.20c0b332lapses with that push.Order is serial on purpose: every slice touches
core/, andcore/client.jspluspatches/ds-bot/are generated from it, so two slices in flight regenerate the same artifacts.Birfy commentedon Oct 29, 2026
Written-by: Chief
Stage 3 acceptance, checked against the tests on main rather than against "the PR merged". Read at 2026-10-29T20:40Z on main
cf5ecadd; the CITestrun at that same sha is green, so these tests are the ones that run.core/test/task-queue.test.js,core/test/task-route.test.js,plugins/workflow/test/queue.test.js— a card is claimed out of its role queue and re-matched when it re-routescore/test/task-contract.test.js(thereworkOfchild, the parent going back toresult-ready) andcore/test/task-audit.test.js"the audit names the rework chain and the current lease window" (#1730)core/test/task-queue-lease.test.js"two concurrent claims run in workers that share no state" (#1729)plugins/workflow/test/strict-release-dag.test.js"a second start after a crash between claim and result adds no downstream task" (#1730)plugins/workflow/test/strict-release-dag.test.js: build → test → publish in declared order, and a node whose required input was never produced is refused (#1730)core/test/task-queue-lease.test.js"deliveries and held resources are counted from the rows, per role" (#1729), andcore/test/task-audit.test.js"a rework chain counts one accepted delivery and a replay doubles nothing" (#1730)Two properties are worth naming because they are the ones an acceptance review would otherwise take on trust: a rework cycle counts one accepted delivery (not two), and a replay of that cycle doubles nothing — both are asserted in
task-audit.test.jsagainst rows, not against a counter that a restart could reset.Stage 3 is therefore complete on the terms this issue states. Stage 4.1 (#1731) is in development; 4.2 (#1733) follows it.