Install
openclaw skills install codificaKeep context when work moves between agents or between you and a human. Uses the Codifica protocol to give every agent a shared, persistent memory of tasks, decisions, and handoffs — stored as plain text in Git.
openclaw skills install codificaYou are operating in a repository that uses the Codifica protocol (v0.2) — a file-based protocol for coordinating work between humans and AI agents.
Codifica uses plain text files committed with the code. There is no external service, no API, no database. Git is the audit log.
codifica.json at the repo rootspec field — typically codifica-spec.md)state field (may be a string, glob, or array)Do not proceed without reading the spec.
If codifica.json does not exist in the repo, this protocol does not apply — work normally.
{
"protocol": "codifica",
"version": "0.2",
"spec": "codifica-spec.md",
"state": "work.md",
"assets": "assets/",
"rules": "strict"
}
Key fields:
state — path to the state file(s). May be "work.md", "work/*.md", or an array like ["work/active.md", "work/done.md"]rules — may be a string ("strict") or an object with allowed_agents, file_scope, max_concurrent_tasks_per_agent, stale_claim_hours, and custom_typesIf rules is an object, check:
allowed_agents — if non-empty and your agent name is not listed, stop and ask a humanfile_scope.include / file_scope.exclude — do not modify files outside the allowed scopemax_concurrent_tasks_per_agent — do not claim more tasks than this limitScan all state files for tasks where:
state is todoowner matches your agent name (agent:<your-name>) or is unassigneddepends_on tasks have state: donePick by priority: critical > high > normal > low.
Among equal priority, prefer tasks with no depends_on (leaf tasks first).
Before starting work, you MUST claim the task in a single atomic commit:
state: in_progressowner: agent:<your-name>claimed_at: <ISO-8601 timestamp>state_transitions entry recording the claimCommit all these changes together. If you are working with a remote, push immediately. If the push fails (another agent claimed first), do NOT start work — pull, re-evaluate, and pick a different task.
An unassigned task in in_progress is a protocol violation.
Before starting a task, read its context field:
context.files — read these files for backgroundcontext.references — read execution_notes from these prior task IDscontext.constraints — hard rules beyond acceptance criteriacontext.notes — free-form guidance from the humanIf the task has depends_on, also read the dependency tasks' execution_notes (especially the summary) and artifacts for handoff context.
Follow the task's acceptance criteria. Respect any context.constraints. Work within the file_scope defined in codifica.json.
When you complete work, update the task in the state file:
Add an execution_notes entry:
execution_notes:
- by: agent:<your-name>
note: |
Description of what you did.
summary: "Single line, max 120 chars, scannable answer"
timestamp: <ISO-8601>
provenance:
session_id: <your-session-id-if-available>
Record any files you produced in artifacts:
artifacts:
- path: src/feature/new-file.ts
type: code
- path: assets/TASK-ID/output.csv
type: csv
Move the task to the appropriate next state:
build tasks: in_progress → to_be_testedtest, investigate, followup): in_progress → done (may skip to_be_tested)completed_at: <ISO-8601> when moving to doneAdd a state_transitions entry:
state_transitions:
- from: in_progress
to: to_be_tested
by: agent:<your-name>
reason: "Work completed, ready for testing"
timestamp: <ISO-8601>
Commit with a message referencing the task ID: FEAT-101: implement login flow
human_review sections.assets/.to_be_tested to done.blocked or rejected — only humans may do this.depends_on.summary (single line, max 120 chars) on your closing execution note.completed_at when moving a task to done.If you discover a genuine blocker (missing dependency, failing test, ambiguous requirement):
execution_notes explaining the blocker and recommending the task be blockedblocked yourself — only humans may do thisWhen asked about what work has been done (by you or other agents):
owner, state, labels, completed_at)summary field on closing execution_notes for quick answersnote text and artifacts when more detail is neededcompleted_at and labels to filter by time and domainThis is the structured alternative to reading chat transcripts.
If your push fails due to a Git conflict:
Conflicts on the same task should be escalated to a human.
todo → in_progress → to_be_tested → done
↓ ↑
blocked ──→ todo ──────────────┘
↓
rejected ──→ todo (human-only reopen)
Only humans may move tasks to blocked or rejected.
Only humans may reopen tasks from rejected.