040 · Workspace studio
What a workspace’s .agents folder holds, each kind listed and edited in the desktop app (spec_studio_040)
| Status | Done in v0.7.1 (the owner’s request, 2026-10-17): STU-01–STU-09. The kinds that add behaviour have their own specs: skills (spec_skills_013), rules and guardrails (spec_gates_041), evals (spec_evals_042), workflows (spec_workflows_043), the Overview (spec_health_044) and the composer (spec_composer_045). |
| Source | apps/desktop/web/src/studio/ (StudioDrawer.tsx, Draft.tsx), MenuBar.tsx, simpleMode.ts, ui/controls.tsx (Tabs), SecretSuggest.tsx, secretComplete.ts, files/secretCompletion.ts, pkg/engine/draft.go, apps/service/internal/server/studio.go |
| Tests | pkg/engine/draft_test.go, apps/service/internal/server/mcp_test.go (TestDraftManifestOverTheAPI), apps/desktop/web/src/secretComplete.test.ts, apps/desktop/web/src/simpleMode.test.ts |
A workspace’s .agents folder holds what shapes its agents: agents, skills, workflows, evals, rules, guardrails, workers. 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. Studio is a button, not a menu: it opens the Studio drawer, where every kind is listed. A worker that failed since the workspace’s workers were last seen puts a red dot on it (DSK-80c). 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, in the order an agent is built: Agents and Evals (the agent, and what proves it; spec_evals_042 EV-12), Skills, Rules, Guardrails (what it follows), Workflows, Workers (what runs) and Secrets, and shows the chosen kind’s list and editor. Each kind’s pane fills the drawer’s height and scrolls itself. 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 another kind’s pane, with a form holding unsaved changes asks first. 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_skills_013 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_gates_041 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_gates_041 GT-28). Evals is the workspace’s evals, their cases and runs (EvalsPane; spec_evals_042 EV-08). Workflows is the workspace’s workflows on a canvas (WorkflowsPane; spec_workflows_043 WF-09); while a workflow’s canvas is open the kinds shrink to their icons and 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. Secrets is the workspace’s own secrets under the same kind of title (spec_secrets_039 SEC-08), each shown as{secrets:workspace:key}with its stored name. Every kind has its editor. - STU-03 Workers (
WorkersPane, spec_workers_023): the workspace’s runs going now, each with Stop, then its workers (state, schedule, description; a failed last run or an invalid file in red) fill the pane, with New worker (the drawer’s refresh lists them again). A worker’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 worker’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 worker’s view, from the view to the list; with unsaved changes it asks first. What used to open the workers’ drawer opens Studio on Workers: the command palette, the status bar’s failed runs (the first worker that failed), a blitz://workers link. Seeing the workers clears the failed-runs dot. The global workers have the same pane in Settings › Workers (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-06
{secrets:completes as it’s typed (spec_secrets_039 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).