Repository navigation
feat(chat): let an Admin choose who starts agent work, kept with who changed it and when (AC-011, 00481) - #2147
Merged
Conversation
…changed it and when (AC-011, 00481)
ROADMAP-plan §06's "Agent work" (mockup screen 3): a gear on Action
Center › Today, and the same panel in Settings › Chat.
- I approve first (the default, every workspace starts on it): every change
an agent's run makes asks for approval, whatever the agent's mode. The
approval precedence applies it in step 5, beside Ask me first, so there is
no second gate; Admin's Always asks too. Going live (step 4b) and reads,
refusals and clicks are untouched.
- Agent starts on its own: each agent's own mode applies, as today.
- Admins only; members read it with its last change ("Changed by … ·
date"). Each change is kept in setting_changes (key, old value, new
value, changed_by, changed_at); one that can't be kept is undone.
Migration 00481 adds chat_settings.agent_work (default approve_first) and
setting_changes (members read their workspace's rows, the server writes).
The web reads agent_work on its own, so a database before 00481 keeps
working, with agents asking first.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…own, and ask on the default The engine's agent-run tests set Agent work to auto_start, as "the agent's mode" means since 00481, and a new one checks that an agent in Full auto asks for its change on I approve first, the default. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…ect them, and copy its Help - setAgentWork goes on the read-only coverage's open list with the other Admin settings: asAdmin() checks the plan itself and answers read_only. - setting_changes is the Account's, no brand's data (brand access list). - The panel groups its two choices in a fieldset, so Settings › Chat's policy pickers stay its only radiogroups. - The agents' test set runs each agent in its own mode: its workspace is on Agent starts on its own. - The precedence's read test counts the Agent work read beside the settings. - approved-articles.json regenerated (yarn test -u src/lib/help). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
… with every default A row the database writes carries every column's default; the test set's had only Agent work, so its Full auto agents read Full auto for agents as off and never started. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Main brought ansvisor#2137 (00480) and ansvisor#2143. schema.sql is rebuilt with build-schema.sh (00480 then 00481). help/chat/agents.md's front matter keeps both keyword and synonym lists (Agent work's and Onboarding's). approved-articles.json regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
Merged
8 of 13 tasks
…t-work # Conflicts: # help/chat/agents.md
cihan-gyk
pushed a commit
to cihan-gyk/ansvisor
that referenced
this pull request
Nov 5, 2026
…t (AC-011) When ansvisor#2147 ships, Agent work starts every workspace on "I approve first", so agents that run in Auto or Full auto today will wait for a person before each change. This entry tells people why, and how an Admin lets agents start work on their own again. It is held back (published 2099-12-31) and not approved until ansvisor#2147 is on main and Cihan approves it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMenyNyxsr2Doq4CaQ3
This was referenced Nov 5, 2026
gkhngyk
pushed a commit
that referenced
this pull request
Nov 5, 2026
…t (AC-011) (#2152) * docs(help): approve the last 14 Help articles so Chat answers from them Cihan approved them on 2026-11-05, ahead of Chat's launch: Chat answers how-to questions only from approved articles (CHAT-19 §4). approved-articles.json regenerated with yarn test -u src/lib/help. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMenyNyxsr2Doq4CaQ3 * docs(chat): add a What's new entry telling people agents now ask first (AC-011) When #2147 ships, Agent work starts every workspace on "I approve first", so agents that run in Auto or Full auto today will wait for a person before each change. This entry tells people why, and how an Admin lets agents start work on their own again. It is held back (published 2099-12-31) and not approved until #2147 is on main and Cihan approves it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMenyNyxsr2Doq4CaQ3 --------- Co-authored-by: Claude <[email protected]>
…t-work Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…t-work # Conflicts: # help/chat/agents.md # web/src/lib/help/approved-articles.json
Collaborator
Author
5 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AC-011 part 2: the Agent work setting from ROADMAP-plan §06 (Drive › Ansvisor Product Developments › Diğer ›
ROADMAP-plan.md, decision 2 of 2026-10-22). The mockup isROADMAP-mockup.htmlscreen 3, the gear and its panel.Stacked on #2146 (the Today card). Merge #2146 first; this diff then shrinks to its own commits: 24d2d03, b8579d7, f7e5c82 and c14b9b8. The other commits are merges of that branch.
What the person sees
How it fits the Chat agent modes
The setting is a workspace ceiling on agent autonomy. It is applied inside the approval precedence, with no second gate. This is the coordinator's proposal; see the open questions.
precedence.tsstep 5, an agent's run on I approve first getsask('agent_work')for every WRITE.ctx.agentRunmarks an agent's run;readPrecedenceContextsets it when the engine passes the run's agent.agentModeNowand Full auto for agents.readPrecedenceContextreadsagent_workin its own query, so the rest of the context still reads, and agents ask first (the default). A value it doesn't recognise counts as I approve first.The change log
setAgentWork(Admins only, active plan) writes onlychat_settings.agent_work, so the other settings keep their values.setting_changesrow: keyagent_work, the old value (null when never set), the new value,changed_byandchanged_at.getAgentWorkViewand Settings › Chat's view read the last change, with the person's name, or else their e-mail.Migration 00481 (
needs-migration)chat_settings.agent_work text not null default 'approve_first', with a check allowingapprove_firstandauto_start.setting_changestable:changed_by(on delete set null),changed_at;chat_settings(00401).brand_id, so the demo coverage list doesn't apply.supabase/schema.sqlis rebuilt.web/src/types/supabase.tsis updated by hand.Help
help/action-center/action-center-actions.md: a new Agent work section.help/chat/agents.md: a new section, Agent work: who starts agent work.help/settings/chat-rules.md: a new Agent work section.approved-articles.jsonregenerated.Tests
agentRun; before 00481; a failed read.agent_work: 'auto_start'where they mean "the agent's own mode", plus one test for the default.Related issue
None. AC-011 (ROADMAP-plan §06, decision 2), part 2. The owner first dropped this setting, then asked for it on 2026-11-05.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
needs-migration). Until it is applied, the gear and the section show the default, and saving says "isn't available yet". Chat keeps working, with agents asking first.setting_changeshas the row (agent_work, null →auto_start, you, now);setAgentWorkanswersforbidden.CHAT_AUTO_GO_LIVE) still goes live with either choice.cd web && npx vitest run src/lib/chat/precedence.test.ts src/lib/chat/precedence-context.test.ts src/lib/chat/engine.test.ts src/lib/actions/chat-settings.test.ts src/components/chat-access/chat-settings-section.test.tsx src/components/action-center/agent-work-gear.test.tsx "src/app/[locale]/(dashboard)/dashboard/action-center/actions/page.test.tsx" src/lib/helpChecklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)help/(or no user-visible change) — see help/README.mdChecks run locally on this branch, using CI's jobs:
schema:
supabase/build-schema.shleavesschema.sqlas committed.version:checkpasses.web, first full run:
format:check,lint,typecheckandbuildpass.yarn testpassed 986 of 990 files (10,624 tests). Five tests failed, all fixed in f7e5c82 and c14b9b8:setAgentWork(2 tests);web reruns: the changed suites pass.
server, first full run:
format:checkandlintpass.npm testpassed 418 of 421 files:brand-access-policiesneededsetting_changeson its Account-level list (fixed in f7e5c82);content-people,traffic-events"fast") ran over their wall-clock limits on a busy machine. This PR doesn't touch either.The rerun of those files, together with
todayandcontent-agent, passes: 5 files, 188 tests.After the last edits: web
format:check,lintandtypecheck, and serverformat:checkandlint, pass again.Open questions for the owner
CHAT_AGENTIC. Should 00481 instead backfillauto_startfor workspaces that already have agents?CHAT_AUTO_GO_LIVE). Should I approve first also hold it once it's on?setting_changes(key, old, new, who, when); onlyagent_workis written today. Should other workspace switches (Full auto for members, go-live) log there too, in a later PR?Generated by Claude Code