Operational runbook for AI agent workflows. Covers common scenarios, troubleshooting, and recovery procedures.
| Command | Purpose |
|---|---|
retort sync |
Regenerate all AI tool configs from spec |
retort validate |
Check config integrity and security |
agentkit discover |
Scan repo and detect tech stacks |
retort init |
Initialize a new repo overlay |
/orchestrate |
Run multi-team coordination workflow |
/check |
Run quality gates locally |
/review |
Request code review from relevant teams |
- Clone the repository
- Run
retort init --repoName <name>to create overlay - Edit
.agentkit/overlays/<name>/settings.yamlas needed - Run
retort syncto generate all configs - Commit the generated files
- Add agent definition to
.agentkit/spec/agents.yaml - Run
retort syncto regenerate agent files - Verify with
retort validate
- Edit
.agentkit/overlays/<repo>/settings.yaml - Add entries to
permissions.alloworpermissions.deny - Run
retort sync— deny entries always win over allow - Verify with
retort validate
- Edit
.agentkit/overlays/<repo>/commands.yaml - Add command overrides (merged at file level with base spec)
- Run
retort sync
- Run
DEBUG=1 retort syncfor verbose logging - Check for unresolved placeholder warnings (mustache-style
{{key}}tokens) - Verify overlay directory matches
.agentkit-repomarker
- Review
settings.yaml— deny entries override all matching allow entries - Ensure no secrets appear in allow lists
- Check that tool patterns match the expected format
- This indicates drift — someone edited a generated file directly
- Run
retort syncto overwrite with canonical version - Commit the regenerated files
- Verify
.shscripts have executable permissions (chmod +x) - Check that the hook reads JSON from stdin correctly
- Test with:
echo '{"tool":"Write"}' | .claude/hooks/protect-sensitive.sh
Generated files include a backup-aware atomic write. If sync fails mid-write:
- Check for leftover
.tmp/directory in agentkit root - If present, delete it:
rm -rf .agentkit/.tmp - Re-run
retort sync
- Delete all generated files (those with
GENERATED by Retortheader) - Run
retort syncto regenerate everything - Use
git diffto verify the output
If .claude/state/orchestrator.json becomes corrupted:
- Delete the file
- The orchestrator will recreate it on next
/orchestrateinvocation - Active session data will be lost — check git history for recovery
This runbook is maintained by Retort. Run pnpm --dir .agentkit retort:sync to regenerate.