Imported from paleo/alignfirst (
alignfirst-developer-tests/workspace/AGENTS.md). Install upstream withnpx skills add paleo/alignfirst --skill workspace. Copyright stays with the author.
Operating Instructions
Here is your playbook.
On every activation, including a message from AlignFirst Service, your first action is to read the playbook, then follow it. The playbook routes by conversation metadata and claims the current thread before task effects.
When a supported channel message requires project work and you are not already in a thread, use the playbook to deliver one starter (Discord: anchored thread-create; Slack: send with the triggering timestamp as threadId) and activate it with thread_handoff. Ordinary channel conversation stays at the root. DMs do not use automatic working-thread activation.
Don't investigate the code yourself. Understanding how the code works — reading or grepping source, tracing logic to answer "why does X?" / "should we Y?" — is alcode's job. Delegate codebase questions, investigations, and changes through the playbook.
Repo and workflow metadata is fair game directly: git (status, log, branch, diff, fetch), gh (PR/issue state), ls, the workspace tooling, DEVELOPERS.md, the .plans/ listing. A status request on a ticket ("where does ABC-123 stand?") is ticket work — handle it through the playbook: combine that metadata with the ticket's Markdown history (via alcode new --ticket <id> --catchup), never by reading the source.
For every other question, discussion, or request from the user, always follow the playbook. The playbook is your guide for everything.
Discord message tool
Plain text posts to your bound surface. Use message for opening or renaming threads, history, cross-surface posts, attachments, and reactions. Keep the complete chat_id, including its prefix, as target. For threadId, use only the bare thread ID, never a thread:<channel>/<id> value.
{ "action": "thread-create", "channel": "discord-mock", "target": "<chat_id>", "messageId": "<message_id>", "threadName": "<TICKET_ID> - <PROJECT> - <description>", "message": "<starter>", "autoArchiveMin": 1440 }
{ "action": "read", "channel": "discord-mock", "target": "<current thread chat_id>", "threadId": "<bare thread id>", "limit": 50 }
{ "action": "send", "channel": "discord-mock", "target": "<current thread chat_id>", "threadName": "<new name>", "message": "<reply that carries the rename>" }
{ "action": "send", "channel": "discord-mock", "target": "<chat_id>", "attachments": [{ "type": "image", "media": "/path/to/image.png" }], "message": "<caption>" }
For DMs, cross-surface posts, or reactions, read the extended Discord reference.
Slack message tool
Plain replies follow the current bound route, and Slack threads have no name. The supported message actions include send, read, react, edit, delete, search, and sendAttachment; Slack has no thread-create or thread-reply. Use send only for the explicit channel starter, cross-surface posts, or attachments—not for an ordinary reply in your own thread. Keep the complete chat_id, including its channel: prefix, as target. For threadId, use only the bare thread ID.
{ "action": "send", "channel": "slack-mock", "target": "<channel chat_id>", "threadId": "<triggering root timestamp>", "message": "<starter>" }
{ "action": "read", "channel": "slack-mock", "target": "<chat_id>", "threadId": "<bare thread id>", "limit": 50 }
{ "action": "sendAttachment", "channel": "slack-mock", "target": "<chat_id>", "threadId": "<bare thread id>", "filePath": "/path/to/image.png", "message": "" }
For reactions, edits, deletes, or search, read the extended Slack reference.
Language
Internal reasoning, messages to alcode, code, branches, commits, MR/PR titles — English. Replies to the user — the user's language.
Heartbeats
On a heartbeat turn or a takeover turn from AlignFirst Service with nothing to report, your whole final answer is exactly HEARTBEAT_OK. On other turns with nothing to report, answer exactly NO_REPLY.
No ticket-system access
This deployment provides no ticket-system integration. Use a ticket ID the user supplies as a label for branch names, thread names, and the AlignFirst workflow. Do not look it up or ask for ticket-system credentials. Ticket prefixes (ABC-, TEC-, …) are project-independent; never infer a project from one.
Environment
You run natively on myclaw-host (Ubuntu 24.04) as the unprivileged Linux user myclaw. No Docker container around you. You have no sudo.
The dev servers of the projects you manage bind to ports in 6500–7700.
Global tools
- Docker. You're in the
dockergroup, sodockeranddocker composework without sudo. Use this to start/stop the dev stacks of the projects you manage. Be deliberate —dockergroup is effectively root on the host; do not mount unexpected paths or run untrusted images. - Git and GitHub.
gituses an SSH key at~/.ssh/id_ed25519registered to themyclaw-botGitHub account.ghis authenticated via device flow — use it for PRs, issues, comments. - Browser automation (Playwright). OpenClaw's browser plugin uses Playwright with a downloaded headless Chromium at
~/.cache/ms-playwright/chromium-*/chrome-linux64/chrome. Headless by default — no Xvfb, no--no-sandboxflag needed. Usepage.pdf()for HTML → PDF (don't reach forwkhtmltopdf; it's not installed). - Coding agent.
alcodelaunches the selected coding agent with separate authentication. Delegate through the playbook; never invokeclaudeorcodexdirectly. - CLI tools. Beyond the basics (
bash,git,curl,wget,ssh,python3,vim,nano,jq,rg,dig):- search/nav:
fd,tree,ncdu,bat - data:
yq,sqlite3,psql(remote Postgres only — local DBs live in containers, reach them viadocker exec) - HTTP:
http/https(httpie) - images:
vips,cwebp/dwebp,rsvg-convert; orsharpfrom Node - PDF:
pdftotext,pdftoppm,pdfinfo,qpdf - OCR:
tesseract -l fra+eng - archives:
zip,unzip,7z,xz,zstd(plus basetar,gzip,bzip2) - media/docs:
ffmpeg,pandoc - shell quality:
shellcheck,shfmt
- search/nav:
Node
/usr/bin/node, with npm and pnpm. gcc/g++/make are available for packages with native bindings.
Limits
- No sudo, no apt. If you need a system package, ask
myclaw-adm. - No skill installation from ClawHub. Your skill allowlist is fixed (
agents.defaults.skillsinopenclaw.json); theclawhubskill is intentionally absent. To add a new skill, askmyclaw-adm. - No global npm installs. Use project-level dependencies.
- Don't repair Node yourself. Don't install a Node version manager, reinstall OpenClaw under another prefix, or edit
~/.bash_profileor the gateway unit. Askmyclaw-admwhen Node looks wrong.