040 · Workspace studio
What a workspace’s .agents folder holds, each kind listed and edited in the desktop app (spec_040_studio)
| Status | Done in v0.7.1 (the owner’s request, 2026-10-17): STU-01–STU-09; STU-10 in the usability pass (2026-10-26); STU-05a and STU-11 (Markdown fields, Specs) 2026-11-07; STU-12–STU-16 (Settings, Resources, simple mode, global agents’ and rules’ switches) 2026-11-14. The kinds that add behaviour have their own specs: skills (spec_013_skills), rules and guardrails (spec_041_gates), evals (spec_042_evals), workflows (spec_043_workflows), the Overview (spec_044_health) and the composer (spec_045_composer). |
| Source | apps/desktop/web/src/studio/ (StudioDrawer.tsx, Draft.tsx, SettingsPane.tsx, GlobalAgents.tsx, RulesPane.tsx), MenuBar.tsx, simpleMode.ts, ui/controls.tsx (Tabs), SecretSuggest.tsx, secretComplete.ts, files/secretCompletion.ts, pkg/engine/draft.go, pkg/service/server/studio.go |
| Tests | pkg/engine/draft_test.go, pkg/service/server/mcp_test.go (TestDraftManifestOverTheAPI), apps/desktop/web/src/secretComplete.test.ts, apps/desktop/web/src/simpleMode.test.ts, apps/desktop/web/src/studio/specs.test.ts (STU-11), apps/desktop/web/src/studio/studioKinds.test.ts (STU-12–STU-14), pkg/engine/agentfiles_test.go (TestGlobalAgentOffHere), pkg/service/server/handlers_test.go (TestAgentFilesOverTheAPI), pkg/config/connectorscope_test.go (TestAgentScope) (STU-15), pkg/engine/gates/gates_test.go (TestRuleOff), pkg/engine/memory/memory_test.go (TestSplitRule), apps/desktop/web/src/studio/ruleForm.test.ts (STU-16) |
A workspace’s .agents folder holds what shapes its agents: agents, skills, workflows, evals, rules, guardrails, jobs. The desktop app shows each kind and lets every one be created, read, changed and deleted, without opening the files.
- STU-01 The menu bar is Workspaces, Changes, Studio and Help (
menuIds; Studio with advanced settings, DSK-60a). It replaces the Agents and Workers menus (as jobs were called then). Until v0.7.1 Studio was a button, not a menu, that opened the Studio drawer. Since v0.8.0 (the owner’s request: the only item in the bar that wasn’t a drop-down) it’s a menu like the others: Studio’s kinds, each with its icon (studioKinds,studioIcons), opening Studio on that kind, or, with Studio open, showing it there as a click on its icon would (StudioDrawer’sask); the kind shown is marked (on, fromonKind), and Close Studio at its foot closes it as ✕ does (asking first about unsaved changes;Drawer’scloseRequest). A job that failed since the workspace’s jobs were last seen puts a red dot on the menu’s name (DSK-80c) and “N jobs failed” under Jobs. The background runs are the status bar’s (PAR-PAR-20). - STU-02 The Studio drawer (
StudioDrawer) lists the kinds at its left, as Settings does its sections (since v0.8.0 as icons only, each named on hover and to screen readers: the menu bar’s Studio menu names them, and two lists of names side by side were one too many), in the order an agent is built, grouped with a line between each group (studioGroups; the Studio menu’s separators are the same): Overview; Agents and Evals (the agent, and what proves it; spec_042_evals EV-12) and Skills; Rules and Guardrails (what it follows); Jobs and Workflows (what runs, simple to complex; until v0.8.0 Workflows came first); and Connectors (since v0.8.0) and Secrets (what it reaches), and shows the chosen kind’s list and editor. Each kind’s pane fills the drawer’s height and scrolls itself, and since v0.8.0 its width too (Settings’ 960 px measure no longer applies in Studio). The title bar has Reload agent files (DSK-91d), Studio’s one refresh: it reads the agent files again and lists the shown kind again (a pane holding unsaved changes is left as it is). Each pane starts with its kind’s name and folder (In .agents/<kind>), with its intro and group headings lined up under them. Closing the drawer, or picking another kind, with a form holding unsaved changes asks first (until v0.8.0 picking another kind discarded them;useDiscardGuard, which every pane shares with its own forms). Agents is the agent editor in its sliding layout (AgentEditorslide; DSK-91b): the workspace’s agents fill the pane, and choosing one (or +) slides its form in over the list, taking the whole pane, with a back arrow, Cancel and Save (kept at the bottom as the form scrolls) that return to the list; back and Cancel ask first when there are unsaved edits, and a save with problems stays on the form. Skills is the workspace’s own skills (SkillsPane; spec_013_skills SK-100–SK-103): their list, each skill’s form sliding in with General, References and Scripts tabs, and Add from… to copy or reference another. Rules is the workspace’s rules (RulesPane; spec_041_gates GT-08): the gates before and after the agent in the order they run, and the instruction rules. Guardrails is the built-in guardrails, switched on or off, and the workspace’s own (GuardrailsPane; spec_041_gates GT-28). Evals is the workspace’s evals, their cases and runs (EvalsPane; spec_042_evals EV-08). Workflows is the workspace’s workflows on a canvas (WorkflowsPane; spec_043_workflows WF-09); while a workflow’s canvas is open the pane takes the drawer’s whole width. Studio can be closed while a workflow runs: the run goes on, and the status bar and alerts follow it (WF-19); opening the workflow again shows the run. A request to show a workflow’s run (the status bar, an alert) opens Studio on it. Connectors is the systems the agents reach, by category (Databases first), this workspace’s and every workspace’s, each switched on or off for this workspace; Studio changes only the workspace’s own, and a global one opens as it is with Edit in Settings (ConnectorsPane; spec_047_connectors CON-11, CON-17, CON-18, spec_046_databases DB-14). Secrets is the workspace’s own secrets under the same kind of title (spec_039_secrets SEC-08), each shown as{secrets:workspace:key}with its stored name. Every kind has its editor. - STU-03 Jobs (
WorkersPane, spec_023_workers): the workspace’s runs going now, each with Stop, then its jobs (state, schedule, description; a failed last run or an invalid file in red) fill the pane, with New job (the drawer’s refresh lists them again). A job’s view (DSK-91: what it does and may do (and the workflow it runs), its runs, and a run going now, followed again when the view is shown again, with a workflow’s progress and Open on the canvas; Run now, Enable as shown or Disable, Edit, Delete, asked first), its form, or a new job’s form slides in over the list (the sharedslide-panelayout), with a back arrow; the form’s Cancel and Save stay at the bottom. Back from the form returns to the job’s view, from the view to the list; with unsaved changes it asks first. What used to open the jobs’ drawer opens Studio on Jobs: the command palette, the status bar’s failed runs (the first job that failed), a blitz://workers link. Seeing the jobs clears the failed-runs dot. The global jobs have the same pane in Settings › Library › Jobs (WK-60). - STU-04
Tabs(ui/controls.tsx): tabs over one panel, the chosen one underlined, ← → Home End moving between them; for the editors that come. - STU-05 Draft with AI (
DraftButton, Draft, or Redraft when there’s text): a request (optional: empty improves what’s there), then the model’s draft with what changed, Use putting it in the form unsaved, Back asking again.WorkspaceService.DraftManifest(kind, name, description, the text now, the request, a script’s language) has the suggestions model (else the reviewer’s, else the main one) write it from the kind’s brief (agent,skill,script,rule,guardrail,eval,workflow_step), secrets redacted from what it’s sent; nothing is saved. An unknown kind or nothing to go on isINVALID_ARGUMENT; a model that fails is aproblem, not an error. An agent’s instructions have it. - STU-05a 2026-11-07 (the owner: the long fields should be edited as a document, and Redraft floated above the box). Studio’s Markdown fields (
MarkdownField) are an agent’s System instructions, a skill’s Instructions, The rule, a guardrail’s What to catch, a job’s Prompt (its workflow input stays plain text) and an agent step’s prompt in a workflow, and a spec (STU-11). Each shows Visual (the visual editor of spec_037, in a box the field’s height that can be dragged taller, with the field’s placeholder while empty, not focused when it loads) or Source (the text box, with{secrets:completion), the label on the left and the choice on the right; the choice holds for the next field opened until the window reloads. Its tools sit under it on the right: Draft/Redraft, or a job’s Rewrite with AI; a workflow agent step gets Redraft with theworkflow_stepbrief. A read-only rule or guardrail shows Source, disabled. A field without a workspace folder (a global agent) shows Source. - STU-06
{secrets:completes as it’s typed (spec_039_secrets SEC-09) in the composer, an agent’s instructions, an MCP server’s environment and header values (global names only), the settings file and the Files editor:global:andworkspace:first (workspace:only with a workspace), then the names in either scope; a name goes in scoped. Escape closes the list (not the drawer it’s in). The text boxes (SuggestTextarea) warn of a named secret that isn’t there. - STU-07 The names come from
ListSecrets, kept for 30 s and forgotten when a secret is added or deleted (secretNames,forgetSecretNames); values are never fetched. - STU-08 The workspace’s settings no longer hold its secrets: they’re in Studio.
- STU-09 2026-10-18. Where a form picks several agents or skills (an eval’s agents and skills, a rule’s, a guardrail’s, a skill’s “offered to”), it’s a drop-down of check boxes (
MultiSelect), not a wall of chips; with none chosen it says what that means (every agent, the active agent, none). - STU-10 2026-10-26 (the owner’s usability pass). Studio’s kinds are named beside their icons when the drawer is 1200 px wide or more (a container query), and icons only (names on hover) below that and while a workflow’s canvas has the room (
is-compact). - STU-11 2026-11-07 (the owner: Studio views and edits the specs). Specs (
SpecsPane), after Overview: the project’s specification in.agents/specsas/specwrites it (spec_014 project-spec), the index (README.md) first, thenNNN-<name>.mdin order (“001 · Overview”), then any other Markdown file; a workspace without the folder says to run/specor add one. A spec opens over the list in a Markdown field (STU-05a) with Review with AI, Refine with AI and Redraft under it and the checks’ findings below it (spec_057_spec_driven SDD-01–SDD-05; the list and the checks come fromListSpecsandReviewSpec); Save writes it with the version read (refused when it changed on disk since), Revert, Close, and Delete after asking (the index isn’t changed). + asks for a title and creates the next number’s file (newSpecFile: lowercase words joined by-, accents dropped, at most 999) in/spec’s format, then opens it. Files are read, written and deleted throughFileService, as the editor’s are. - STU-12 2026-11-14 (the owner’s request: “there is confusion between settings and studio”; Studio is this workspace, Settings is every workspace). Settings (
SettingsPane), after Overview: the workspace’s own settings, the form that was Settings › Workspaces (WorkspaceSettingsForm, DSK-85a and DSK-85b: every card, changes told to the window withconfigChanged; Edit the settings file opens Settings turned over to this workspace’s file). What asks for a workspace’s settings opens it here (spec_024_desktop DSK-110). - STU-13 2026-11-14 (the owner’s request: the workspace’s resources laid out as Settings’ are). The side list is Overview, Settings and Specs; Resources, Jobs and Workflows (what the agents have, then what runs, simple to complex); Rules and Guardrails (
studioGroups, the Studio menu’s too; the menu’s Jobs carries the failed-jobs note). Resources holds Agents, Skills, Connectors and Secrets as tabs (studioTabs: Settings › Resources’ tabs, spec_024_desktop DSK-110, but Browser, since browser profiles are every workspace’s and made only in Settings; the workspace picks its profile in its Settings, STU-12), each the pane STU-02 describes. Agents has two tabs of its own, Agents and Evals (aSegmentedswitch under Resources’ tabs; EV-12’s evals pane), and each agent’s row has its evals one click away: “N evals”, opening Evals on that agent, or Draft evals when none cover it. Every tab is still a kind to open on (studioKindShown;resourcesalone opens its first tab,evalsopens Agents’ Evals), so a blitz://workers link, the Overview, an agent’s Evals and the status bar open their place. - STU-14 2026-11-14. Without advanced settings Studio has no menu (DSK-60a), but the workspace’s settings open it (STU-12): it then shows Settings and Resources with its Connectors tab alone (
studioEntriesShown,studioResourceTabs), as Settings shows them; a kind hidden there asked for opens Settings. - STU-15 2026-11-14 (the owner’s request: “on the agents (for a workspace), global agents should have a toggle for on and off”). Under the workspace’s own agents, Studio › Resources › Agents lists the user’s global agents (From every workspace,
GlobalAgents), read-only, each with a switch for this workspace alone and the gear to edit them in Settings. Switched off, a global agent isn’t loaded in the workspace (Registry.Hide, asked at each load;Workspace.SetAgentOnloads the agents again at once), so no conversation, job or eval there offers it, while its file stays and every other workspace keeps it. The choice is the person’s, never the project’s:agent-scope.jsonin the settings folder (config.OpenAgentScope), as connections’ are (spec_047_connectors CON-17).WorkspaceService.SetAgentEnabledsets it (UNKNOWN_AGENTfor a name that’s no global agent’s;FAILED_PRECONDITIONAGENT_IN_USEfor the workspace’s own agent, which must be changed first), andListAgentFilesfor the user’s scope with a workspace marks the ones off there (off_here). - STU-16 2026-11-14 (the owner’s request: “rules should also be able to toggle on and off”). Each rule Studio may change has a switch on its row in Studio › Rules (gates and instruction rules alike). Off writes
enabled: falsein its front matter (RuleSpec.off,RuleFile.off;gates.Spec.Off), as a guardrail’s switch does (spec_041_gates GT-28), keeping everything else; on takes the key out. A rule that’s off gates nothing (gates.Gates) and isn’t an instruction (memory’ssplitRule); its row is dimmed and says Off. Being in the rule’s file, the choice is the project’s, as the rule is.