This document defines the behavioral requirements for AI agents (Claude, GPT, or any LLM) operating within a SMALL-managed workspace.
These rules are non-negotiable. Violating them breaks the protocol's guarantees.
Before taking any action in a SMALL-managed repository, read the artifacts in this order:
handoff.small.yml- Current state and next stepsintent.small.yml- What the work isconstraints.small.yml- What must not be violatedplan.small.yml- Current task breakdownprogress.small.yml- What has been done
Do not skip this step. Do not assume you know the project state from conversation history.
After reading, run validation:
small validate
small lintIf either fails, fix the issues before proceeding. Do not proceed with invalid artifacts.
The following files are human-owned and must never be modified by an agent:
intent.small.ymlconstraints.small.yml
If these files are missing required information, ask the human to provide it. Do not guess or fill in defaults.
The progress.small.yml file is append-only:
- Add new entries at the end of the
entriesarray - Never modify existing entries
- Never delete entries
- Every entry must include evidence of execution
Valid evidence fields (at least one required):
evidence- Description of what happenedcommand- Shell command that was executedcommit- Git commit hashlink- URL to external evidencetest- Test execution detailsverification- Verification performed
Before ending a session for any reason, generate a handoff:
small handoff --summary "Description of current state"Reasons to handoff:
- Session ending (time, tokens, or context limit)
- Blocked on human input
- Task completion
- Unrecoverable error
The handoff must accurately reflect the current state. The next session depends on it.
Never claim a task is complete without validation:
small validate
small lintBoth must pass. A task with failing validation is not complete.
Every command execution must be recorded in progress:
small apply --cmd "your-command" --task task-idDo not execute commands outside of small apply unless they are read-only exploratory commands.
Read constraints.small.yml before every action. Each constraint has a severity:
error- Violation blocks all progress. Stop and report.warn- Violation should be reported but does not block.
When in doubt, treat as error.
Work through tasks in plan.small.yml in dependency order:
- Find tasks with
status: "pending"and no unmet dependencies - Set task to
in_progressbefore starting - Complete the task
- Record evidence in progress
- Set task to
completed - Move to next task
Do not skip tasks. Do not work on tasks with unmet dependencies.
Agents MUST NOT use small plan --done (or any plan status toggle) to represent completion.
Completion MUST be recorded using small checkpoint, which performs an atomic state transition and appends progress evidence.
Required completion patterns:
Start work:
small progress add --task <task-id> --status in_progress --evidence "Starting <task>"Finish work:
small checkpoint --task <task-id> --status completed --evidence "<what was completed>"Block work:
small checkpoint --task <task-id> --status blocked --evidence "<why blocked>"Handoff gate:
Before generating a handoff, agents MUST run:
small check --strictHandoff is only valid if strict mode passes and all completed or blocked tasks have progress evidence.
Rationale:
- Plan status alone is not evidence
- Checkpoint is the canonical completion primitive for agents
- Strict mode prevents "completed in plan, missing in progress" drift
If intent.small.yml or constraints.small.yml lacks information needed to proceed:
- Do not guess
- Do not invent requirements
- Ask the human explicitly for the missing information
- Wait for their response
- Proceed only after they update the artifact
If the intent or constraints are ambiguous:
- State the ambiguity explicitly
- Propose interpretations
- Ask the human to clarify
- Do not proceed until clarified
If a task cannot be completed:
- Mark it as
blockedin the plan - Add a progress entry explaining why
- Move to the next unblocked task
- If all tasks are blocked, handoff with explanation
If validation fails after your changes:
- Do not ignore the failure
- Read the error message
- Fix the issue
- Re-validate
- Only proceed after validation passes
If you encounter an error you cannot resolve:
- Record the error in progress
- Mark relevant tasks as blocked
- Generate a handoff with full context
- Stop and report to the human
- Edit
intent.small.ymlorconstraints.small.yml - Delete or modify existing progress entries
- Skip validation before claiming success
- Execute commands without recording them
- End a session without generating handoff
- Guess at missing constraints or intent
- Proceed when validation fails
- Ignore constraint violations
- That conversation history is accurate
- That previous work was validated
- That constraints haven't changed
- That the workspace is in a valid state
Always read .small/ and validate.
1. Read handoff.small.yml
2. Read intent.small.yml
3. Read constraints.small.yml
4. Read plan.small.yml
5. Read progress.small.yml
6. Run small validate
7. Run small lint
8. Resume from handoff.resume.current_task_id
1. Check next actionable task (pending, dependencies met)
2. Update task status to in_progress
3. Execute work, recording with small apply
4. Validate after each significant change
5. Update task status to completed
6. Repeat
1. Run small validate
2. Run small lint
3. Generate handoff with accurate summary
4. Report final status to human
Progress entries must be verifiable. Good evidence:
entries:
- task_id: "task-1"
timestamp: "2025-01-04T10:00:00.000000000Z"
status: "completed"
command: "npm test"
evidence: "All 47 tests passed"
commit: "a1b2c3d"Bad evidence (too vague):
entries:
- task_id: "task-1"
evidence: "Did the thing" # Not verifiableEvidence should allow a future agent or human to verify the claim.
| Rule | Requirement |
|---|---|
| Read first | Always read .small/ before acting |
| Validate | Run validate and lint before claiming success |
| Human files | Never edit intent or constraints |
| Progress | Append-only with evidence |
| Completion | Use small checkpoint, not plan --done |
| Strict gate | Run small check --strict before handoff |
| Handoff | Required when stopping |
| When stuck | Ask, don't guess |
| Constraints | Respect all, especially severity: error |