This repository welcomes contributions from AI agents. Unlike most projects, it is acceptable and expected that agents will commit their own work here.
The nudge project is a toolbox for running and monitoring AI coding agents (claude, codex, copilot, gemini, grok, vibe, qwen, antigravity) in tmux. The codebase is intentionally small and stable:
- Single C binary (
monitor.c→monitor-bin) with no external dependencies - Shell scripts for tmux orchestration
- Python tests (
test_monitor.py) for validation
This simplicity makes it safe for agents to modify — there's minimal risk of breaking complex abstractions or introducing subtle bugs.
Agents in this swarm should be designed to be stateless. The babysit loop periodically issues a /clear command to the agent to manage token costs and context length.
Because conversation history is regularly wiped:
- Do NOT rely on the agent's memory of past turns for project state.
- DO maintain critical state in backlog tasks or project-specific memory files.
- DO read relevant context files (like the
self-awareness.txtnote) whenever you start a new task.
The babysit loop will re-issue the full project briefing (long_prompt) immediately after every /clear to restore the agent's awareness of its environment and mission.
You should commit your work when:
- Adding support for a new agent (validation, help text, tests)
- Fixing bugs in the monitor or shell scripts
- Improving tests or capture fixtures
- Updating documentation (README, AGENTS, backlog docs)
- Understand the codebase — Read
README.mdand the activity logic inmonitor.c - Make changes — Edit
monitor.cfor state logic changes - Run tests —
make test - Commit — Use clear, descriptive commit messages
monitor.c / monitor-bin is the only monitor implementation.
The monitor is content-agnostic: any pane output is working, followed by idle
after a quiet timeout. Do not add agent UI patterns without changing that design
explicitly.
When modifying state behavior:
- Implement in C first
- Add tests in
test_monitor.py - Update relevant help text and docs
Use Backlog.md as the source of truth for planned work:
- Read with
backlog task list --plain,backlog task <id> --plain, andbacklog search "<query>" --plain - Create or modify tasks only through the
backlogCLI - Do not edit files under
backlog/tasks/directly - Keep task notes concise; use
backlog --helpfor command details
If unsure about a change, err on the side of making it — the test suite provides good coverage, and the codebase is small enough that mistakes are easy to spot and fix.
Swarm workflow: read first:
- Runtime map:
/tmp/nudge-swarm/nudge/runtime.json - Self-awareness note:
/tmp/nudge-swarm/nudge/self-awareness.txt
Use as source of truth for:
- tmux pane targets
- monitor sockets, live state
- babysit pid/log/spec/state files
Messaging (durable, preferred):
- Prereq:
aiswarmmust be onPATH; install it withmake install-aiswarm. - Use the comms log for reliability between agents:
aiswarm send <cfg> <pane> "msg"orlog_broadcast. - Inspect:
aiswarm log <cfg> [--pending] [--pane X.Y],aiswarm cursors <cfg>. - Direct/manual still works:
./tmux-send <target> "message".
Do NOT use raw tmux send-keys ... Enter (fails to submit reliably).
Swarm scripts: swarm/.