Graduated Autonomy
Configure how much independence your CodeSpar agent has with six autonomy levels (L0–L5), from fully passive to fully autonomous.
Graduated Autonomy
CodeSpar uses a graduated autonomy system that lets you control exactly how much independence your agent has. From L0 (passive — only responds when asked) to L5 (full auto — acts within policy bounds), you choose the level of trust appropriate for your project and team.
Autonomy Levels
| Level | Name | Behavior | Auto-Executes |
|---|---|---|---|
| L0 | Passive | Only responds when directly addressed | Nothing |
| L1 | Notify | Monitors events and sends alerts, never auto-executes | Nothing (default) |
| L2 | Suggest | Proposes actions proactively, waits for approval | Nothing |
| L3 | Auto-Low | Auto-executes low-risk commands, notifies after | status, help, logs, review, prs, context, whoami |
| L4 | Auto-Med | Auto-executes medium-risk commands | + instruct, fix, link, unlink, register, autonomy |
| L5 | Full Auto | Fully autonomous within policy bounds | + deploy staging, approve |
Level Details
L0 — Passive
The agent is completely silent unless directly mentioned with @codespar. It does not monitor events, does not send alerts, and does not take any action on its own.
Use case: Initial setup, sensitive environments, or when you want the agent to be available but invisible.
L1 — Notify (Default)
The agent monitors CI/CD events (builds, PRs, deploys) and sends notifications to connected channels. It never takes action on its own — it only informs.
What it monitors:
- Build failures and successes
- New pull requests
- Deploy completions
- Error spikes
Example notification:
L2 — Suggest
In addition to notifications, the agent proactively suggests actions when it detects relevant events. It presents the suggestion with an approval command so you can execute it with one click/message.
Example suggestion:
L3 — Auto-Low
The agent automatically executes low-risk, read-only commands without asking for approval. It notifies you after execution.
Auto-executed commands:
status— checking build/agent statushelp— showing command listlogs— viewing activity historyreview— reviewing pull requestsprs— listing pull requestscontext/memory— showing memory statswhoami— identity lookup
Example auto-execution:
L4 — Auto-Med
Adds medium-risk commands to auto-execution. The agent can now autonomously investigate issues, execute coding tasks, and manage repository links.
Additional auto-executed commands:
instruct— executing coding tasksfix— investigating and fixing issueslink/unlink— managing repository connectionsregister— identity registrationautonomy— changing autonomy level (within bounds)
Example auto-execution:
L5 — Full Auto
The agent operates with maximum autonomy within safety policy bounds. It can deploy to staging and auto-approve certain actions.
Additional auto-executed commands:
deploy staging— deploying to staging environmentsapprove— approving pending actions (non-production)
Important: Even at L5, the safety guardrails still apply. See the Safety Guardrails section below.
Safety Guardrails
Regardless of autonomy level, CodeSpar agents NEVER auto-execute the following actions:
| Action | Reason | Required |
|---|---|---|
| Production deploys | Risk of user-facing impact | Always requires human approval |
| Rollbacks | Destructive, may cause data loss | Always requires human approval |
| Data migrations | Irreversible database changes | Always requires human approval |
| Security-sensitive changes | Credential rotation, permission changes | Always requires human approval |
| Infrastructure modifications | Scaling, network changes | Always requires human approval |
| Kill switch | Emergency stop of all agents | Always requires human approval* |
* Exception: users with the emergency_admin RBAC role can execute kill without approval at any autonomy level.
Risk Matrix
This table shows which commands require approval at each autonomy level:
| Command | Risk | L0 | L1 | L2 | L3 | L4 | L5 |
|---|---|---|---|---|---|---|---|
status | low | manual | manual | manual | auto | auto | auto |
help | low | manual | manual | manual | auto | auto | auto |
logs | low | manual | manual | manual | auto | auto | auto |
review | low | manual | manual | manual | auto | auto | auto |
prs | low | manual | manual | manual | auto | auto | auto |
context | low | manual | manual | manual | auto | auto | auto |
whoami | low | manual | manual | manual | auto | auto | auto |
register | low | manual | manual | manual | manual | auto | auto |
instruct | medium | manual | manual | manual | manual | auto | auto |
fix | medium | manual | manual | manual | manual | auto | auto |
link | medium | manual | manual | manual | manual | auto | auto |
unlink | medium | manual | manual | manual | manual | auto | auto |
autonomy | medium | manual | manual | manual | manual | auto | auto |
approve | medium | manual | manual | manual | manual | manual | auto |
deploy staging | high | manual | manual | manual | manual | manual | auto |
deploy production | high | always manual | always manual | always manual | always manual | always manual | always manual |
rollback | critical | always manual | always manual | always manual | always manual | always manual | always manual |
kill | critical | always manual | always manual | always manual | always manual | always manual | always manual |
Changing Autonomy Level
Via Chat Command
Response:
Via API
RBAC Interaction
Autonomy levels interact with RBAC roles. A user can only change the autonomy level if their role permits it:
| Role | Can Set Autonomy | Max Level |
|---|---|---|
owner | Yes | L5 |
maintainer | Yes | L5 |
operator | Yes | L4 |
reviewer | No | — |
read-only | No | — |
emergency_admin | Yes | L5 |
If a user with operator role tries to set L5:
Recommendations
| Team Size | Project Stage | Recommended Level | Rationale |
|---|---|---|---|
| Solo dev | Early development | L3–L4 | Move fast, auto-review and auto-fix |
| Small team (2–5) | Active development | L2–L3 | Stay informed, auto-review PRs |
| Medium team (5–15) | Production | L1–L2 | Notify on events, suggest actions |
| Large team (15+) | Enterprise | L0–L1 | Maximum control, audit compliance |
| Any | Incident response | L0 | Full manual control during incidents |
Next Steps
- Command Reference — Full list of all 17 commands
- Security and RBAC — Role-based access control details
- Deploy Pipeline — How deployment approval works