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
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,46 @@
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/).

## [Unreleased]

## [26.11.14] - 2026-11-10

This release repairs Codex crew coordination and verification evidence. Native interruptions, resumed work, and
late answers retain their original ownership. A bounded foreground wait still requires an active host turn;
installed-host acceptance remains a separate check.

### Fixed

- Codex crew state reads native interruption events so a stopped member can release its lane. When child work
resumes, the existing tool hook checks admission again; a continuation message alone grants no admission.
- Unanswered Codex questions remain actionable while the member still owns unfinished work. New questions also
record their originating steps, preserving that obligation when interruption returns work to the lead.
- A completed Codex foreground wait no longer counts as an armed wake source. The wait check distinguishes a
live process from an expired wait and explains the limits of ending the turn.
- Native Codex interruptions compare precise admission timestamps, so rounded activity displays cannot hide a
stop. A genuinely newer admission still protects resumed work from an older event.
- `dev session brief` shows its own Codex session's pending human requests when the CLI supplies a provider.
Other sessions and chat providers retain their existing visibility restrictions.
- Codex app scratch remains available when a hook names its independently registered checkout. Canonical project,
worktree and actor checks preserve the original host scratch boundary; a tool's `workdir` grants no access.
- Codex crew gates recognize completed native file changes for unfinished-code and test audits. External scratch
diagnostics alone no longer require mutation proof; delivered repository changes still do.
- Native Codex file attribution retains validated session identity when a large transcript requires a bounded
tail read. Codex proof checks also recognize supported `uv run` wrappers without counting quoted commands.
- Codex test logs retain their paths while commands run. Separate storage and file locks protect them from
concurrent cleanup; completed logs keep the existing count of ten per runner. Claude's log policy is unchanged.
- `dev canary` displays recorded Codex crew results separately when no main-session replies have been scored.
- Late answers to a stopped Codex child retain its identity instead of reaching another active task with the same
crew role. The original child receives its answer when it resumes.
- Distinct Codex grant messages in the same host turn keep separate evidence, verified against each complete
message in the session's own transcript. A corrected grant is no longer discarded as a repeated turn; identical
text and older turn-only evidence remain protected against reuse. Claude prompt identity is unchanged.
- Codex decisions sent to other sessions keep distinct message identities within one turn, including while
waiting for transcript confirmation. Saved decision evidence remains readable, and consumed approval evidence
cannot be reused through a different identity format.
- Codex crew guidance distinguishes a new native task from continuation of an existing step and requires an
explicit step name when recording completion.

## [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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
26.11.13
26.11.14
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.13",
"version": "26.11.14",
"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
13 changes: 12 additions & 1 deletion docs/guard.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ exist in the dev root.
### Codex scratch folders

Codex scratch access comes from the hook's registered session and actor, not a tool's chosen working directory.
The hook directory must match the registered host directory. Paths must be canonical and have no escaping links.
The hook directory must match the registered host directory. An app event may also name a directory inside its
independently registered checkout: devkit verifies the recorded project, repository root, and canonical main
checkout or managed worktree. The original app directory remains the scratch base. A tool's `workdir` cannot
establish that registration. Paths must be canonical and have no escaping links.

| Host | Main session | Crew member |
| --- | --- | --- |
Expand Down Expand Up @@ -652,6 +655,14 @@ in, and expires after 30 minutes. `grant backup <project>` opens one public back
`backup-policy/<project>`, `lesson-block/<lesson>`) works too. None of them is ever pre-approved with `dev crew mode auto --approve`. A dry run,
the help, `dev branch embargo` (the list), and `dev backup policy` (the read) need no grant.

In Codex, distinct messages can share one host turn. Devkit binds each new grant to both that turn and the exact
complete user message, then checks it against your own transcript before use. A corrected message can therefore
carry its own grant. Identical text within the same turn still counts once; older evidence recorded for the whole
turn remains protected against reuse. Claude continues to identify prompts by its native prompt ID.
Decisions sent to another session use the same complete-message identity, including while waiting for transcript
confirmation. Existing saved decision evidence remains readable, with its original provenance checks.
Restart Codex sessions after updating so one installed version handles each session's approval evidence.

### Lesson rules

A team can add its own rules, made from lessons that keep repeating (see
Expand Down
49 changes: 48 additions & 1 deletion docs/surfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,56 @@ session run during this app investigation.
| Messages and waits | Crew and peer messages share devkit's wait; Claude supports background command notifications | Live: hooks delivered questions and answers, but a wait consumed a truncated reply. Contract: [watch tests](../tests/test_codex_watch.py) retain complete sanitized stored messages, acknowledge each only after output, and keep audit events for moot questions. Documented timeout or empty-watch outcomes are control flow; argument errors and real CI failures stay failures. Native notifications do not drain devkit's queue. Timeout units are minutes |
| Continuity and compaction | Keeps the run, crew, decisions, and requests through compaction | Live: run and crew survived compaction, but the installed version omitted mid-turn Codex requests. Contract: [steering tests](../tests/test_codex_steering.py) read human `UserMessage` records from the root's validated interactive rollout, including failed and deferred tools, without granting approval. Read-only replay recovered the actual root's requests; this is not an installed host test or a test of the app's summarizer |
| Audit | Records launch, binding, refusals, gates, and completion under the session | Live: the app wrote `crew.start`, `crew.bind`, and `guard.deny`. Searching only `crew.launch` misses the actual lifecycle names. Contract: [audit identity tests](../tests/test_codex_audit_identity.py) and [shared-state acceptance](../tests/test_acceptance_shared_state.py) associate native Codex commands with their own actor and run, preserve registered Claude ancestry and explicit hook payloads, and require ownership before retaining a child's parent. Audit metadata grants no permissions. `crew.gate` is a findings event; its absence alone does not prove that a successful gate ran |
| Permissions and approvals | Typed decisions and grants authorize their named actions | The [Codex grant contracts](../tests/test_codex_grants.py) reject copied, replayed, and wrong-session evidence. The app's complete approval flow remains unverified. No grants were issued to test it |
| Permissions and approvals | Typed decisions and grants authorize their named actions | Live: a corrected grant typed during delivery shared the earlier message's turn and was rejected as a replay. The [Codex grant contracts](../tests/test_codex_grants.py) now distinguish complete messages and reject copied, replayed, and wrong-session evidence; [settlement contracts](../tests/test_peers_security.py) cover immediate and queued decisions. The updated app's complete approval flow remains unverified; no approvals were fabricated |
| Extensions and installation | Managed changes use the developer's authorized installation mechanism | Live: extension drift and acceptance notices appeared. No extension acceptance, permission change, or global installation was performed. A checkout fix does not change the pinned hooks of a running session |

### Installed app recheck on 26.11.12

A fresh audit on November 10 used the installed 26.11.12 hooks and native collaboration tools. The checkout
already included 26.11.13; changing that checkout did not update the installed hooks.

| Check | Observed result |
| --- | --- |
| Project binding | Starting a new progress run bound the project and branch. Earlier completed repository commands had left them empty; that command-completion path still needs live verification |
| Native crew launch and scratch | The assigned QA step bound to its real child. Creating and reading a file in the host-assigned member scratch folder worked |
| Scratch shell redirection | Redirecting a member's command output into that same scratch folder was denied. A source regression reproduces the denial when the event names the registered checkout. The historical hook envelope was not retained, so that exact incident payload remains unverified |
| Questions and answers | A real question and its answer reached the correct agents through hooks while the root turn was active |
| Native interruption | Codex reported the child interrupted, but devkit still counted its running lane and occupied slot |
| Native continuation and completion | A follow-up resumed the same child. Normal completion released its lane and slot; this did not prove admission after an interruption because the slot had never been released |
| Skills and lessons | Required skill context and matching lesson reminders arrived. Successful skill reads alone did not prove every gate recognized them |
| Canary | The installed CLI showed only headings, but the actual log contained 87 successful crew reports at the recheck. Main-session scoring remained unverified. The source correction displays Codex crew counts separately |
| Mid-turn requests and compaction | Actual human requests were retained as pending records and appeared in the compaction context. The own-session CLI brief filtered those records out; the source correction has a regression test |
| Other surfaces and events | No new CLI session, genuine approval, or welcome-display acceptance was performed |

An expired foreground wait is not a persistent wake source. While the root turn remains active, continue through
the host's wait and continuation tools and handle delivered questions. If the turn ends, state when you check
the work again; do not promise that a completed shell wait can reactivate it. A desktop notification to the
developer also does not prove that the host schedules an idle agent turn.

The source regressions cover [native interruption and continuation](../tests/test_codex_lifecycle.py),
[questions attached to unfinished work](../tests/test_watch_message_lifecycle.py), and
[expired wait records](../tests/test_watch_stop.py). Those tests are contract evidence, not a successful installed
retest. `dev crew inbox` delivers unseen messages; a question already delivered can still require an answer.
New Codex questions retain their originating steps across reassignment. Historical questions without that
provenance use the remaining ownership record; the patch cannot reconstruct an origin that was never recorded.
Replies to a stopped Codex child retain that child's identity. Another active task with the same crew role does
not receive the answer; resuming the original child keeps its pending reply available.

The continuity recheck distinguishes capture from display: the pending human requests were on disk, but
`dev session brief` hid them when it supplied the caller's provider. The source fix includes pending requests
only for the same Codex session. It does not expose another session's pending requests.

The source gate checks also recognize completed native Codex file changes from the member's own thread after
its fork boundary. Added lines feed the unfinished-code and test audits; inherited history, another thread's
events and incomplete changes do not. A diagnostic Python file outside every repository does not require a
mutation proof. Delivered repository changes, including repositories nested in scratch and links into them,
still require one. These corrections leave Claude's existing checks unchanged.

Codex test-run logs use a separate `codex/` folder beneath the existing project and worktree log directory.
Each running command holds a file lock; pruning skips active writers and retains ten completed logs per runner.
An allocation lock and unique filenames protect concurrent starts. Completed logs remain subject to retention;
they are not permanent archives. Claude keeps its existing log folder and retention policy.

After installing a verified correction through the supported developer workflow, start a new session and check
project identity, a recorded development-turn score, crew binding, and gate evidence again. Until then, keep source
test results separate from live verification of the installed version. See
Expand Down
6 changes: 5 additions & 1 deletion lib/devkit/approvals.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,11 @@ def apply(run: dict, moves: list, now: float) -> list:
continue
lane["state"] = m["to"]
if m["to"] == "running": # recovered: its silence counts from when it was seen again
lane.update(finished=None, recovered=round(now, 1), resumed_at=round(m.get("at") or now, 1))
admitted = m.get("at") or now
# Codex compares this admission with native interruption timestamps.
# Rounding upward can hide a later stop; Claude keeps its existing precision.
lane.update(finished=None, recovered=round(now, 1),
resumed_at=admitted if run.get("agent") == "codex" else round(admitted, 1))
_interval(run, m["id"], now, True)
else:
lane["finished"] = round(m.get("at") or now, 1)
Expand Down
10 changes: 9 additions & 1 deletion lib/devkit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1984,13 +1984,21 @@ def cmd_canary(a):
print(" no tracked replies yet (replies in sessions under ~/Development are checked after every turn)")
return 0
surf = canary.by_surface(a.days)
for agent, (ok, tot) in sorted(canary.summary(a.days).items()):
main_scores = canary.summary(a.days)
for agent, (ok, tot) in sorted(main_scores.items()):
pct = 100 * ok // tot
mark = ui.OK if pct >= 95 else ui.WARN if pct >= 80 else ui.FAIL
print(f" {mark} {agent.capitalize():<8} {ok}/{tot} replies carried the marker ({pct}%)")
for (ag, where), (sok, stot) in sorted(surf.items()):
if ag == agent and len([k for k in surf if k[0] == agent]) > 1:
print(f" {ui.dim(where.ljust(16))} {sok}/{stot} ({100 * sok // stot}%)")
codex_crew = [r for r in rs if r.get("agent") == "codex" and r.get("kind") == "crew"
and not r.get("corrected") and not r.get("internal")]
if codex_crew:
good, total = sum(bool(r.get("ok")) for r in codex_crew), len(codex_crew)
print(f" Codex crew {good}/{total} reports carried the marker ({100 * good // total}%)")
if "codex" not in main_scores:
print(" Codex main: no tracked replies yet")
fixed = canary.corrected(a.days)
if fixed:
print(f" {ui.dim(f'{fixed} miss(es) corrected after the Stop hook reminder (not counted above)')}")
Expand Down
Loading
Loading