agentleFS
ralphkraussralphkrauss/agent-orchestrator/.cursor/rules/worker-posture.mdc

agent-orchestrator / rules

Cursor rule4 starsChanged 6 months agoMITView on GitHub

Worker posture: trusted is the default; supervisor stays curated; isolation is profile opt-in

We split this worker-posture.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every worker spawn emits one { type: 'lifecycle', payload: { state: 'worker_posture', backend, worker_posture, ...

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
worker-posture.mdc
---
description: "Worker posture: trusted is the default; supervisor stays curated; isolation is profile opt-in"
globs:
  - "src/backend/**/*.ts"
  - "src/orchestratorService.ts"
  - "src/contract.ts"
  - "src/harness/capabilities.ts"
  - "src/mcpTools.ts"
alwaysApply: false
---
<!-- Generated from .agents/ by scripts/sync-ai-workspace.mjs. Do not edit directly. -->


# Worker Posture

Issue #58 introduces a `worker_posture: 'trusted' | 'restricted'` field on
the `WorkerProfile`, the direct-mode `start_run` / `send_followup` inputs,
and the persisted `RunModelSettings`. Defaults to `'trusted'`.

- Workers default to `trusted`: backend-native parity with a manual run from
  the project worktree. Each backend translates `trusted` to its own
  surface — Claude broadens `--setting-sources` to `user,project,local` and
  adds `enableAllProjectMcpServers`; Codex drops `--ignore-user-config` and
  uses resume-safe `-c` overrides; Cursor passes `local.settingSources:
  ['all']` to the SDK.
- The Claude **supervisor** envelope (`buildClaudeSpawnArgs`) is always
  restricted. It must not read `worker_posture` or branch on it.
- `restricted` posture is the profile opt-in for the pre-#58 closed-by-default
  envelope. New code paths that change worker behavior should ask "what does
  this look like under restricted?" before changing the default.
- Profile mode rejects `profile + worker_posture` (and direct-mode
  `worker_posture` on profile-mode chains in `send_followup`) the same way
  `codex_network` is rejected today — to keep the profile manifest
  authoritative for the chain.
- The resolved posture is persisted on `RunModelSettings.worker_posture`.
  Legacy `null` is tolerated on read and normalized to a concrete posture on
  child-record write (same pattern as `codex_network: null → 'isolated'`).
- Every worker spawn emits one `{ type: 'lifecycle', payload: { state:
  'worker_posture', backend, worker_posture, ... } }` event so operators
  can see the chosen posture in `get_run_events`. CLI backends emit via
  `WorkerInvocation.initialEvents`; Cursor emits via
  `store.appendEvent()` after `Agent.create`/`Agent.resume` succeeds and
  before the first SDK stream message.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.