Repository navigation
feat: board-driven automation daemon (drag a card, launch the work) - #350
Closed
Hadrien-Cornier wants to merge 1 commit into
Closed
Hadrien-Cornier wants to merge 1 commit into
Hadrien-Cornier wants to merge 1 commit into
Conversation
Poll the Hadrien FirstMate Azure board and auto-launch the right agent on a card transition: into Ready to plan spawns a planning scout, into In Progress spawns an implementation ship crew. Poll loop (not webhook) so there is no public tunnel to maintain. CPU-safe by design: nice +19 (ionice on Linux), one WIQL query plus one chunked batch fetch per cycle then sleep, portable singleton lock. Guardrails: seed markers without spawning on first sight (no mass-spawn on start/restart), one-agent-per-card+stage dedupe, concurrency and hourly runaway caps, repo resolution that flags-and-leaves rather than guessing, kill switch, and a full decision log. Ships fm-board-daemon.sh, fm-board-arm.sh, fm-board-lib.sh, the plan/impl brief templates, an agent-only board-automation skill, docs, and a behavior test.
Author
|
Superseded: reopening on the canonical Azure repo ai-firstmate (dev.azure.com/talroo/Product/_git/ai-firstmate), which powers firstmate locally + for the company. |
This was referenced Aug 6, 2026
Closed
|
Test comment (will be deleted). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Turns the "Hadrien FirstMate" Azure Board into the control surface that launches fleet work: the captain drags a card between columns and the right agent starts automatically.
A local bash daemon polls the board (no webhook, so there is no public tunnel to maintain) and acts on real column transitions:
Ready to planIn Progress(fromPlanned/Proposed)Each spawned agent reads the work item from Azure itself, does the work through the normal firstmate machinery, and moves the card to its next column (
Planned, thenPR). Normal watcher/afk supervision covers the spawned crew.CPU-safety design (a hard requirement)
FM_BOARD_POLL_SECS(default 120s), thensleep- no busy-wait.curlparsed by a singlepython3pass.renice), and lowers IO priority withionice -c 3on Linux (absent on macOS, skipped).Guardrails
state/.board-spawned-<id>-<stage>marker).FM_BOARD_MAX_INFLIGHT(default 4) and hourly runaway capFM_BOARD_MAX_PER_HOUR(default 12); excess is queued, not dropped.repo:tag or lane maps to a fleet project viaconfig/board-lane-map; unresolvable cards are logged and left for retry.state/.board-daemon.log; each spawn records todata/backlog.mdand comments on the card.Arm / kill
The daemon is not wired into session start or bootstrap - it runs only when explicitly armed.
FM_BOARD_AUTOSPAWN=0gives observe-only.What I verified
tests/fm-board-daemon.test.sh(7 cases): stage classifier, repo resolution, seed-without-spawn on first sight, one-transition-one-spawn + dedupe, kill switch, concurrency cap queueing, unresolved flag-and-leave. All pass.--seedagainst the live board: seeded all 56 cards, spawned nothing (the critical no-mass-spawn guarantee).started/healthy, single process, beacon advances each cycle, niceness 19, idle 0.0% CPU,--restarthome-scoped, kill switch idles.shellcheck bin/*.sh bin/backends/*.sh tests/*.shclean.Shipped disabled: nothing runs until the captain arms it. Review, then
bin/fm-board-arm.sh(optionallyFM_BOARD_AUTOSPAWN=0first to observe).Files:
bin/fm-board-daemon.sh,bin/fm-board-arm.sh,bin/fm-board-lib.sh,docs/board-automation/(README + plan/impl brief templates),.agents/skills/board-automation/,docs/examples/board-lane-map,tests/fm-board-daemon.test.sh.