diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-15 01:14:46 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-15 01:14:46 -0500 |
| commit | f8bdf302fd71ba73ae1424d86275e1e223f09cf3 (patch) | |
| tree | 4f46c33a70d89ecb939d5f87c5fed3412515be58 /todo.org | |
| parent | e0f914d510c081db45cafaf4fe5c8f7b65e46fec (diff) | |
| download | rulesets-f8bdf302fd71ba73ae1424d86275e1e223f09cf3.tar.gz rulesets-f8bdf302fd71ba73ae1424d86275e1e223f09cf3.zip | |
feat(ai): add agent-roster detection script with tests
agent-roster is the single detection primitive for concurrent same-project Claude sessions: pgrep -x claude, resolve each pid's cwd from /proc, keep those at or inside the project root, and drop the scanner's own ancestry. It exits 0 when alone, 1 when other agents are present (printed pid + cwd), and 2 when the roster can't run. Both the helper launcher and the in-session startup check will call this rather than re-scanning.
pgrep and /proc are the system boundary, so I made them injectable (ROSTER_PGREP, ROSTER_PROC, ROSTER_SELF_PID) and the bats exercise the real include/exclude logic against fixtures, no agents spawned. The unavailable paths (no /proc, or pgrep absent) report on stderr and exit 2 rather than a false "alone".
This is the first slice of the helper-instance task. Startup and ai --helper wiring follow.
Diffstat (limited to 'todo.org')
| -rw-r--r-- | todo.org | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -43,7 +43,7 @@ Optional wrap-up step that surfaces filed keepers belonging to another project, Spec: [[file:docs/design/wrapup-routing-spec.org]]. Source proposal: [[file:docs/design/2026-06-13-wrapup-inbox-transcript-routing-proposal.org]] (archsetup handoff 2026-06-13). Next: =spec-review=. -** TODO [#B] Helper-instance support — concurrent same-project Claude :feature:spec: +** DOING [#B] Helper-instance support — concurrent same-project Claude :feature:spec: :PROPERTIES: :CREATED: [2026-06-11 Thu] :LAST_REVIEWED: 2026-06-12 |
