Autonomy Skill
Invoke automatically after subagent completion or when deciding next actions.
When to Invoke (Automatic)
| Trigger | Action |
|---|---|
| Subagent returns completed work | Check selected tracking backend for next item |
| Task finishes successfully | Update status, pick next pending item |
| Work pattern detected in user message | Create work items if L2/L3 |
| Multiple tasks identified | Queue all, parallelize if L3 |
Acceptance Tests
| Test ID | Type | Prompt / Condition | Expected Result |
|---|---|---|---|
| AUT-T1 | Positive trigger | "Continue with autonomy after this item completes" | skill triggers |
| AUT-T2 | Positive trigger | "Run the next queued item automatically" | skill triggers |
| AUT-T3 | Negative trigger | "Explain what autonomy levels mean" | skill does not auto-dispatch work |
| AUT-T4 | Behavior | no system autonomy level in user ica-config | ask user to set system level (L1/L2/L3), persist choice |
| AUT-T5 | Behavior | no project autonomy level in project ica-config | ask user to set project level (follow-system/L1/L2/L3), persist choice |
| AUT-T6 | Behavior | project level is follow-system |
effective level resolves to system level |
| AUT-T7 | Behavior | project level explicitly set | effective level uses project level override |
| AUT-T8 | Behavior | actionable findings arrive while an item is already in_progress |
MUST invoke create-work-items + plan-work-items; run-work-items records deferred dispatch and does not preempt |
| AUT-T9 | Behavior | any continuation cycle executes | MUST include all three skills (create-work-items, plan-work-items, run-work-items) with invocation evidence or fail-closed |
Autonomy Level Configuration (MANDATORY)
Autonomy level MUST be resolved from ica.config.json (not tracking config).
Level values:
L1L2L3
Project-only value:
follow-system
Required keys:
- System (user) config key:
autonomy.system_level(L1|L2|L3, defaultL2) - Project config key:
autonomy.project_level(follow-system|L1|L2|L3, defaultfollow-system)
Resolution order:
- Resolve user (system) config file:
${ICA_HOME}/ica.config.json$HOME/.codex/ica.config.json$HOME/.claude/ica.config.json
- Resolve project config file:
./ica.config.json(project root)
- Read
autonomy.system_levelfrom user config. - Read
autonomy.project_levelfrom project config. - Determine effective level:
- if
autonomy.project_levelisL1/L2/L3, use that - if
autonomy.project_levelisfollow-system, useautonomy.system_level
- if
Bootstrap prompts (required if missing):
- If
autonomy.system_levelis missing:- ask: "No system autonomy level is configured. Set system autonomy level to
L2(recommended),L1, orL3?" - persist in user
ica.config.json
- ask: "No system autonomy level is configured. Set system autonomy level to
- If
autonomy.project_levelis missing:- ask: "No project autonomy level is configured. Set project autonomy level to
follow-system(recommended),L1,L2, orL3?" - persist in project
ica.config.json
- ask: "No project autonomy level is configured. Set project autonomy level to
Persistence rules:
- System level MUST be written to user
ica.config.json. - Project level MUST be written to project
ica.config.json. - If both are missing, ask and persist both before auto-dispatch.
- Effective default behavior after bootstrap is
L2viasystem_level=L2andproject_level=follow-system.
Example user ica.config.json:
{
"autonomy": {
"system_level": "L2"
}
}
Example project ica.config.json:
{
"autonomy": {
"project_level": "follow-system"
}
}
Compatibility:
- If legacy
autonomy.levelexists andautonomy.system_levelis missing, treat legacy value as system level for this run and persist it asautonomy.system_level.
Tracking Backend Selection (MANDATORY)
Resolve backend with config-first precedence:
- Project config:
.agent/tracking.config.json - Global config:
${ICA_HOME}/tracking.config.json - Agent-home config fallback:
$HOME/.codex/tracking.config.json$HOME/.claude/tracking.config.json
- Auto-detect GitHub backend
- Fallback:
.agent/queue/
Provider values:
githublinear(future)jira(future)file-based
Detection pattern:
TRACKING_PROVIDER=""
for c in ".agent/tracking.config.json" \
"${ICA_HOME:-}/tracking.config.json" \
"$HOME/.codex/tracking.config.json" \
"$HOME/.claude/tracking.config.json"; do
if [ -n "$c" ] && [ -f "$c" ]; then
TRACKING_PROVIDER="$(python3 - <<'PY' "$c"
import json,sys
cfg=json.load(open(sys.argv[1]))
it=cfg.get("issue_tracking",{})
print(it.get("provider","") if it.get("enabled",True) else "file-based")
PY
)"
break
fi
done
[ -z "$TRACKING_PROVIDER" ] && TRACKING_PROVIDER="file-based"
Configuration Bootstrap (MANDATORY)
Before continuation or dispatch, ensure a persisted tracking configuration exists and is used:
- If
.agent/tracking.config.jsonexists, use it. - If project config is missing, ask explicitly:
- "Use system tracking config for this project, or create a project-specific backend config?"
- If the selected config file does not exist, ask for backend default (
githuborfile-based) and create it. - Persist at least:
{
"issue_tracking": { "enabled": true, "provider": "github" },
"tdd": { "enabled": false }
}
- Use the persisted provider for this run (do not silently switch providers).
- If user asks to change backend later, update the same config file and confirm the new active provider.
TDD Confirmation Gate (MANDATORY)
If TDD skill is active (locally or globally), ask explicitly for this scope before auto-dispatch:
- "TDD is active. Apply TDD for this work scope? (yes/no)"
Persistence rule:
- If
tdd.enabledis missing on first TDD-related invocation, ask for the default and persist it in the selected config file. - Scope-level answer overrides stored default for the current run.
Dispatch Trigger And Interrupt Policy (MANDATORY)
Resolve from ICA config hierarchy:
autonomy.dispatch_trigger(on_completion|immediate_if_idle, defaulton_completion)autonomy.interrupt_policy(p0_only|always_confirm|never_preempt, defaultp0_only)
Policy behavior:
on_completion: dispatch next item only after currentin_progressitem reaches terminal state (completedorblocked).immediate_if_idle: dispatch immediately only when no item isin_progress.p0_only: preempt only forp0/security/data-loss/production-outage.always_confirm: ask before any preemptive switch.never_preempt: never switch away from currentin_progressitem.
Autonomy Levels
L1 - Guided
- Confirm before each action
- Wait for explicit user instruction
- No automatic continuation
L2 - Balanced (Default)
- Add detected work to selected backend queue
- Confirm significant changes
- Continue routine tasks automatically without interrupting active
in_progresswork
L3 - Autonomous
- Execute without confirmation
- Continue to next queued item on completion (non-preemptive)
- Discover and queue related work
- Maximum parallel execution
Continuation Logic (L3)
After work completes:
1. Run continuation pre-check gate on selected backend
- Run `validate` skill checks for the just-finished work item
- Run backend-aware tracking verification for the selected backend
- If gate fails: mark item `blocked`, report blocker, STOP auto-continuation
2. Mark current item completed in selected backend
- GitHub: update/close issue via github-issues-planning workflow
- Local: rename file in .agent/queue/
3. Check: Are there pending items in selected backend?
4. Check: Did the work reveal new tasks?
5. If yes → Add to selected backend queue, run create + plan triage, then dispatch next pending item per dispatch trigger and interrupt policy
6. Before dispatching next item, run readiness gate:
- next item is unblocked and has required fields (`type`, `priority`)
- TDD phase ordering is respected when applicable (`RED` -> `GREEN` -> `REFACTOR`)
- backend-aware tracking verification is still passing
7. If no more work → Report completion to user
Validation And Check Gates (MANDATORY)
Autonomy must enforce gates on every transition:
- Pre-close gate: do not close/complete current item until validation + tracking checks pass.
- Pre-dispatch gate: do not auto-dispatch next item until readiness + dependency checks pass.
- Fail-closed behavior: any failed gate halts continuation and surfaces blocker details.
Human-friendly action mapping:
- create when new work is discovered
- plan when reprioritization/dependency updates are needed
- run when selecting and executing the next actionable item
Create-Plan-Run Enforcement (MANDATORY)
Autonomy MUST involve all three canonical work-item skills in every continuation cycle:
create-work-itemsplan-work-itemsrun-work-items
Enforcement rules:
- Never jump directly to execution without
createandplaninvolvement in the same cycle. - If no new items are discovered,
create-work-itemsstill runs in normalize/no-op mode and records that outcome. - If an active
in_progressitem prevents switching,run-work-itemsstill runs in dispatch-evaluation mode and recordsdeferred(not skipped). - Missing invocation evidence for any one of the three skills is a hard gate failure.
Required invocation evidence (per cycle):
cpr.create.invoked=trueplus reference (createdornormalized-noop)cpr.plan.invoked=trueplus reference (reprioritizedorvalidated-noop)cpr.run.invoked=trueplus decision (selected|deferred|blocked|done)
Work Detection
Triggers queue addition:
- Action verbs: implement, fix, create, deploy, update, refactor
- Role skill patterns: "developer implement X"
- Continuation: testing after implementation
Direct response (no queue):
- Questions: what, how, why, explain
- Status checks
- Simple lookups
In-Progress Intake Rule (MANDATORY)
- If work is already
in_progress, newly detected findings/comments are intake-only:- create/append items in selected backend
- re-run planning/triage
- do not dispatch these new items immediately
- Continue the active
in_progressitem first. - Only preempt when interrupt policy allows; otherwise dispatch on completion.
Queue Integration
Uses backend-aware tracking:
- GitHub backend: typed issues + state reports
- Linear/Jira backend: provider-native items (when supported)
- Local backend:
.agent/queue/files
Local .agent/queue/ remains cross-platform fallback:
- Claude Code: TodoWrite for display + queue for persistence
- Other agents: Queue files directly
See:
create-work-itemsfor creating newly discovered itemsplan-work-itemsfor reprioritization and dependency refreshrun-work-itemsfor selecting and executing next actionable item- canonical create/plan/run work-item skills for queue management
github-issues-planningfor issue lifecycle operationsgithub-state-trackerfor prioritized status retrieval
Configuration
Resolved effective level comes from:
autonomy.system_levelin userica.config.jsonautonomy.project_levelin projectica.config.jsonfollow-systemmeans project uses system setting
Effective-level rule:
project_levelin (L1,L2,L3) overrides system levelproject_level=follow-systemusessystem_level- if missing, bootstrap must ask and persist values before dispatch
Additional behavior keys:
autonomy.dispatch_trigger(on_completion|immediate_if_idle)autonomy.interrupt_policy(p0_only|always_confirm|never_preempt)
Validation Checklist
- Acceptance tests were defined before behavior changes
- Missing
autonomy.system_leveltriggers user prompt and persistence - Missing
autonomy.project_leveltriggers user prompt and persistence -
follow-systemcorrectly resolves to system level - Effective level controls dispatch behavior without preempting active
in_progresswork -
ica.config.jsonfiles are updated at correct scopes (user vs project) - Every continuation cycle records create + plan + run invocation evidence (including
deferredrun cases)
Output Contract
When this skill runs, produce:
- autonomy resolution (
system_level,project_level, effective level, bootstrap status) - selected tracking backend and config source
- create/plan/run invocation evidence for the current continuation cycle
- WIP lock decision (
continued|deferred|preempted-with-policy) - gate status (pre-close, pre-dispatch, tracking verification)
- next action (
continue|blocked|done) with exact blocker if failed