Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to devkit. Versions follow CalVer `YY.MM.PATCH` (PATCH restarts at 0 each month); tags are
`vYY.MM.PATCH`. Sections follow [Keep a Changelog](https://keepachangelog.com/).

## [26.11.13] - 2026-11-10

This release keeps `dev doctor` working on a Python that cannot load one of its native modules, and makes sure a
note from another agent session reaches a session that is idle.

### Fixed

- **`dev doctor` crashed on a Python whose XML module does not load.** A teammate's Homebrew Python 3.15.2 could not
load `pyexpat` (built against a newer macOS SDK than the Mac's own `libexpat`), and the jobs module needed it as it
loaded. The jobs module now loads without it, the doctor's first row checks that the Python running devkit can load
`pyexpat`, `ssl`, `sqlite3`, `zlib`, and `ctypes`, and names each one that fails with the fix, and a jobs check that
fails is a failed row instead of a crash.
- **A note from another session waited unread in an idle session.** A plain note to a session with no wait armed
notified nobody, so it was read only at the developer's next message. It now sends a desktop notification (at most
one every ten minutes for each session), `dev session tell` says which sessions are not waiting, and a Claude Code
session's end-of-turn checklist asks for `dev watch --wait --standby` while other sessions run on this Mac.

## [26.11.12] - 2026-11-10

This release repairs Codex session context, crew isolation, message delivery, and continuity. Runtime changes are
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26.11.12
26.11.13
2 changes: 1 addition & 1 deletion desktop/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": "0.4",
"name": "devkit",
"display_name": "devkit",
"version": "26.11.12",
"version": "26.11.13",
"description": "Every repo in its place. Every agent on the same page. Your devkit portfolio, project status, tasks, CI and team, in Claude Desktop chat and Cowork.",
"long_description": "devkit connects Claude Desktop to **devkit** from Firefly Software Solutions Inc.: every repository in its place under ~/Development, one handoff repository that keeps each project's status, tasks, plans, lessons and session log, and the same rules for Claude Code, Codex and the team. Claude Code already uses devkit through its plugin; this extension brings it to Desktop chat and Cowork.\n\n**What you can ask**\n\n- **Where things stand:** the portfolio overview, one project's status, its tasks, a standup of the last days, and a status report for the team or management.\n- **Delivery:** live CI/CD runs with job progress and an ETA, and a project's delivery policy (versioning, test gate, release flow) with its gaps.\n- **Team and history:** who is working on what, devkit's crew of specialist agents and the decisions waiting for you, lessons learned, devkit's audit trail, its scheduled jobs, and a health check of the whole setup.\n- **Tasks:** add a task, or start, finish, block, unblock or release one. Changes go through the `dev` command, so devkit's guard and audit trail apply exactly as they do in the terminal.\n\nWhen Claude reports a project's status, it starts with the devkit status block (**[Firefly> DevKit]**), the same one Claude Code and Codex use.\n\n**Setting it up.** devkit must be installed on this Mac: run `./install.sh` in the devkit repository, which runs `dev setup`. The extension finds devkit on its own; set the devkit folder only if devkit is not where `dev setup` put it. The tools come from your devkit checkout, so `dev update` updates them without reinstalling the extension. It needs Python 3.9 or later, which comes with the macOS Command Line Tools.\n\n**Privacy.** Everything runs on your Mac through the `dev` command and reads your workspace and handoff repository. The project status, CI status and doctor tools ask GitHub or your CI provider through your existing sign-in (for example `gh auth login`); task changes are pushed to your own handoff repository. No token is stored by the extension.",
"author": {
Expand Down
8 changes: 8 additions & 0 deletions lib/devkit/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,14 @@ def turn_checklist(agent: str, data: dict, sess: dict) -> list:
items.append((rule, msg))
for rule, why in _watch_reasons(agent, dict(data, stop_hook_active=False)): # after a push, members at work
items.append((rule, why.replace("devkit: ", "", 1)))
if agent == "claude" and not data.get("agent_id") and not any(rule in ("watch", "wait") for rule, _ in items):
try: # other sessions on this Mac and nothing armed: a note from one would wait for the developer's next message
from . import peers
hint = peers.standby_hint(agent, data.get("session_id") or "")
if hint:
items.append(("standby", hint))
except Exception:
_log(f"checklist standby: {traceback.format_exc()[-300:]}")
return items


Expand Down
3 changes: 2 additions & 1 deletion lib/devkit/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import json
import os
import plistlib
import re
import subprocess
import sys
Expand Down Expand Up @@ -121,6 +120,8 @@ def loaded(name: str) -> bool:

def install(quiet: bool = False) -> list:
"""Write and (re)load the plists of enabled jobs, unload disabled ones, retire the legacy sync agent."""
import plistlib # here, not when the module loads: plistlib needs pyexpat, which some Pythons cannot load, and
# `dev doctor` and `dev jobs` read the jobs without writing a plist
AGENTS_DIR.mkdir(parents=True, exist_ok=True)
LOGS.mkdir(parents=True, exist_ok=True)
out = []
Expand Down
24 changes: 21 additions & 3 deletions lib/devkit/peers.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,9 @@ def _fan_out(view: _View, me: _Me, keys: list, msg: dict, notify_ok) -> tuple:

def send(sender: dict, target: str, text: str, kind="note", urgent=False, now=None) -> dict:
"""A note or a question to the sessions a target names -> {"id", "to": [key], "skipped": [{"key", "why"}],
"notified": [key]}. The sender (identity.speaker().as_dict()) must be a main session."""
"notified": [key], "unarmed": [key]}. A recipient with no wait armed ("unarmed") reads it only at its next
prompt, so the developer gets a desktop notification for it, at most once per NOTIFY_EVERY per recipient. The
sender (identity.speaker().as_dict()) must be a main session."""
view = _View(now)
now = view.now
me = _sender(sender, view)
Expand All @@ -902,7 +904,7 @@ def send(sender: dict, target: str, text: str, kind="note", urgent=False, now=No
raise
mid = _reserve(me, now)
msg = _message(mid, kind, me.frm(), str(target).strip(), body, now, urgent=urgent)
to, skipped, notified = _fan_out(view, me, keys, msg, kind == "question" or urgent)
to, skipped, notified = _fan_out(view, me, keys, msg, True) # a note too: nothing else tells an idle session
skipped = gone + skipped
_record_sent(me, {"id": mid, "ts": now, "kind": kind, "target": msg["target"], "to": to, "skipped": skipped,
"answered_by": [], "closed": False})
Expand All @@ -914,7 +916,23 @@ def send(sender: dict, target: str, text: str, kind="note", urgent=False, now=No
f"{view.git(k).get('branch') or rec.get('branch') or '-'}: {_one_line(body)}")
_audit("peer.send", mid, f"{kind} to {len(to)} session(s), {len(skipped)} skipped", kind=kind, count=len(to),
recipients=to)
return {"id": mid, "to": to, "skipped": skipped, "notified": notified}
return {"id": mid, "to": to, "skipped": skipped, "notified": notified,
"unarmed": [k for k in to if not view.waiting(k)]}


def standby_hint(agent: str, sid: str, now=None) -> str:
"""The end of a main-session turn while other agent sessions run on this Mac and nothing waits here: a note one
of them sends reaches this session only at the developer's next message, unless a standby wait wakes it. -> the
reminder, or "" when no other session is live or a wait of this session is."""
view = _View(now)
me = view.current(key(agent, sid))
others = [k for k in view.keys() if view.current(k) == k and k != me and view.reach(k) == "live"]
if not others or view.waits().get(_split(me)):
return ""
n = len(others)
return (f"{n} other agent session{'s run' if n > 1 else ' runs'} on this Mac and nothing waits here, so a note "
f"from {'them' if n > 1 else 'it'} reaches you only at the developer's next message: before you end the "
f"turn, run `dev watch --wait --standby` with Bash run_in_background")


def _boxes(view: _View, k: str, strict: bool = False) -> list:
Expand Down
2 changes: 2 additions & 0 deletions lib/devkit/peerscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ def _send(a, kind: str) -> int:
+ (", ".join(_label(k, rows) for k in res["to"]) or "nobody"))
if res.get("skipped"):
print(" skipped: " + ", ".join(f"{_label(s['key'], {})} ({s['why']})" for s in res["skipped"]))
for k in res.get("unarmed") or []: # nothing wakes it: say so, so the sender never takes delivery for a reading
print(f" not waiting: {_label(k, rows)} reads it at its next prompt")
if res.get("notified"):
print(" the developer got a desktop notification for " + ", ".join(_label(k, rows) for k in res["notified"])
+ " (no wait is armed there)")
Expand Down
47 changes: 38 additions & 9 deletions lib/devkit/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,30 @@ def install_commands(packages) -> str:
return " · ".join(cmds + [n for k, n in pk if k == "script"])


# The native modules devkit loads: XML and launchd plists (pyexpat), HTTPS (ssl), SQLite, gzip (zlib), and ctypes.
PY_NATIVE = ("pyexpat", "ssl", "sqlite3", "zlib", "ctypes")
PY_FIX = ("use a Python whose native modules load, ahead of this one on the PATH: `uv python install 3.13 --default` "
"puts one in ~/.local/bin; then open a new terminal and run dev doctor again")


def python_runtime_check(modules=PY_NATIVE) -> tuple:
"""`dev doctor`'s row for the Python that runs devkit: each native module devkit loads, imported in a process of
the same interpreter, so one that cannot load is named with its error instead of crashing the command that needs
it. A Homebrew Python built against a newer macOS SDK than the system's can fail this way: its pyexpat needs a
newer /usr/lib/libexpat than the Mac has."""
code = ("import importlib, sys\n"
"for m in sys.argv[1:]:\n"
" try:\n"
" importlib.import_module(m)\n"
" except Exception as e:\n"
" print(m + ': ' + (str(e).splitlines() or [type(e).__name__])[0][:160])\n")
rc, out, err = sh([sys.executable, "-I", "-S", "-c", code, *modules], timeout=60)
broken = [ln for ln in out.splitlines() if ln.strip()] if rc == 0 else [f"the check did not run: {err[:160]}"]
where = f"{tilde(sys.executable)} {sys.version.split()[0]}"
detail = f"{where} · cannot load {'; '.join(broken)}" if broken else f"{where} · {', '.join(modules)} load"
return "Workspace", "Python runtime", not broken, detail, PY_FIX


def tools_check(stacks, have=None) -> tuple:
"""doctor's required-tools row: the base groups' tools on every Mac, and a stack's tools (its language server
included) only when the developer chose the stack (config `stacks`, which the wizard records). `claude` and
Expand Down Expand Up @@ -2716,6 +2740,7 @@ def doctor() -> int:
def check(group, name, ok, detail="", fix=""):
results.append((group, name, ok, detail, fix))

check(*python_runtime_check())
check(*tools_check(CFG.get("stacks") or []))
rc, out, err = sh(["gh", "auth", "status"], timeout=20)
gh_ok = rc == 0
Expand Down Expand Up @@ -2878,15 +2903,19 @@ def _canon_ok(m):
rc, out, _ = sh(["docker", "compose", "version", "--short"], timeout=20)
check("Docker", "compose plugin", rc == 0, out or "not found", "dev install --only docker")

from . import jobs as _jobs
for jname, jj in _jobs.jobs().items():
if not jj.get("enabled"):
continue
lr = _jobs.last_run(jname) or {}
okj = _jobs.loaded(jname) and lr.get("rc") in (0, None)
check("Automation", f"job {jname}", okj, f"{_jobs.schedule_text(jj)} · last " +
(core.ago(lr["start"]) + (" ok" if lr.get("rc") == 0 else f" exit {lr.get('rc')}") if lr else "never"),
f"dev jobs show {jname}")
try: # a job's state that cannot be read is a failed row, never a crash of the whole doctor
from . import jobs as _jobs
for jname, jj in _jobs.jobs().items():
if not jj.get("enabled"):
continue
lr = _jobs.last_run(jname) or {}
okj = _jobs.loaded(jname) and lr.get("rc") in (0, None)
check("Automation", f"job {jname}", okj, f"{_jobs.schedule_text(jj)} · last " +
(core.ago(lr["start"]) + (" ok" if lr.get("rc") == 0 else f" exit {lr.get('rc')}") if lr else "never"),
f"dev jobs show {jname}")
except Exception as e:
check("Automation", "scheduled jobs", False, f"could not be read: {type(e).__name__}: {str(e)[:160]}",
"see the Python runtime row above; then dev jobs")
from . import audit
for row in audit.publish_checks():
check(*row)
Expand Down
2 changes: 1 addition & 1 deletion plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devkit",
"version": "26.11.12",
"version": "26.11.13",
"description": "Every repo in its place, every agent on the same page: project context and handoff notes, tasks, a portfolio overview, local-first delivery (one push, one CI run), backend methodology, managed worktrees and a guard.",
"icon": "./assets/icon.png",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion plugin/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devkit",
"version": "26.11.12",
"version": "26.11.13",
"description": "Every repo in its place, every agent on the same page: project context and handoff notes, tasks, a portfolio overview, local-first delivery (one push, one CI run), backend methodology, managed worktrees and a guard.",
"author": {
"name": "Firefly Software Solutions Inc.",
Expand Down
28 changes: 28 additions & 0 deletions tests/test_doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,33 @@ def test_a_project_you_do_not_administer_is_named_without_failing(self):
self.assertIn("off in other/lib, which you do not administer", rows[0][3])


LIB = Path(__file__).resolve().parents[1] / "lib"


class BrokenPythonTests(unittest.TestCase):
# a teammate's `dev doctor` crashed: their Homebrew Python could not load pyexpat (a build against a newer macOS
# SDK than their system libexpat), and jobs.py imported plistlib, which needs it, as the module loaded

def without_pyexpat(self, code):
"""Run `code` in a Python whose pyexpat cannot load, with devkit's lib on its path."""
return subprocess.run([sys.executable, "-I", "-S", "-c", "import sys\nsys.modules['pyexpat'] = None\n"
f"sys.path.insert(0, {str(LIB)!r})\n" + code], capture_output=True, text=True,
timeout=60)

def test_the_jobs_module_loads_where_pyexpat_does_not(self):
p = self.without_pyexpat("from devkit import jobs\nprint(sorted(jobs.jobs())[:1])")
self.assertEqual(p.returncode, 0, p.stderr[-400:])

def test_doctor_names_each_native_module_that_does_not_load_with_the_fix(self):
group, name, ok, detail, fix = setup.python_runtime_check(modules=("zlib", "devkit_no_such_native_module"))
self.assertFalse(ok)
self.assertIn("devkit_no_such_native_module", detail)
self.assertNotIn("zlib:", detail)
self.assertIn("uv python install", fix)

def test_doctor_passes_a_python_whose_native_modules_load(self):
self.assertTrue(setup.python_runtime_check(modules=("zlib", "json"))[2])


if __name__ == "__main__":
unittest.main()
31 changes: 29 additions & 2 deletions tests/test_peers.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ def test_question_without_a_wait_notifies_the_developer_once_per_ten_minutes(sel
self.assertEqual(len(self.notified), 1)
self.assertIn("acme/api asks session acme/api · main: May I rebase main now?", self.notified[0][1])
peers.send(sender(CLAUDE_A), "@0199a213-81", "And the tag?", kind="question", now=self.now + 60)
peers.send(sender(CLAUDE_A), "@0199a213-81", "a plain note", now=self.now + 700)
self.assertEqual(len(self.notified), 1)
self.assertEqual(len(self.notified), 1) # once per ten minutes for one recipient
r = peers.send(sender(CLAUDE_A), "@0199a213-81", "Urgent: stop pushing", urgent=True, now=self.now + 700)
self.assertEqual(r["notified"], [b])
watch.LIVE.mkdir(parents=True)
Expand All @@ -342,6 +341,34 @@ def test_question_without_a_wait_notifies_the_developer_once_per_ten_minutes(sel
self.assertEqual(len(self.notified), 2)


def arm(self, sid, wid="w1", standby=False):
watch.LIVE.mkdir(parents=True, exist_ok=True)
(watch.LIVE / f"{wid}.json").write_text(json.dumps({
"id": wid, "agent": "claude", "session": sid, "consumer": "main", "pid": os.getpid(), "state": "live",
"started": self.now, "expires": self.now + 3600, **({"standby": True} if standby else {})}))

def test_a_note_to_a_session_with_no_wait_notifies_the_developer_and_tells_the_sender(self):
# the kit-consulting session's note reached an idle devkit session only when the developer wrote: a plain
# note notified nobody, and its sender could not tell that nothing would wake the other session
a, b, c = self.three_sessions()
r = peers.send(sender(CLAUDE_A), "@0199a213-81", "doctor crashes on a teammate's Python", now=self.now)
self.assertEqual((r["notified"], r["unarmed"]), ([b], [b]))
self.assertIn("doctor crashes on a teammate's Python", self.notified[0][1])
self.arm(CLAUDE_B)
r = peers.send(sender(CLAUDE_A), "@7be0a41d", "the report is in the scratch folder", now=self.now + 800)
self.assertEqual((r["notified"], r["unarmed"]), ([], [])) # its wait wakes it

def test_the_turn_end_asks_for_a_standby_wait_while_other_sessions_run(self):
self.three_sessions()
self.assertIn("dev watch --wait --standby", peers.standby_hint("claude", CLAUDE_A, now=self.now))
self.arm(CLAUDE_A, standby=True)
self.assertEqual(peers.standby_hint("claude", CLAUDE_A, now=self.now), "")

def test_no_standby_wait_is_asked_of_the_only_session(self):
self.session("claude", CLAUDE_A, pid=101)
self.assertEqual(peers.standby_hint("claude", CLAUDE_A, now=self.now), "")


class AnswerTests(PeerCase):
def test_answer_only_by_recipient_once(self):
a, b, c = self.three_sessions()
Expand Down
7 changes: 7 additions & 0 deletions tests/test_peerscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ def test_tell_names_the_skipped_and_the_ended_stay_out(self):
rc, out, _ = self.dev("tell", "project", "The API contract changed again")
self.assertIn("skipped: claude @7be0a41d (ended)", out)

def test_tell_says_which_sessions_are_not_waiting_and_read_it_later(self):
# a sender could not tell that its note would sit unread until the other session's next prompt
self.sessions()
rc, out, err = self.dev("tell", "@0199a213", "The doctor report is in the scratch folder")
self.assertEqual(rc, 0, err)
self.assertIn("not waiting: codex @0199a213 (acme/api · main) reads it at its next prompt", out)


class WhoMaySendTests(CliCase):
def test_member_cannot_send(self):
Expand Down
Loading