Skip to content

Latest commit

 

History

History
1331 lines (1243 loc) · 79.1 KB

IDEAS.md

File metadata and controls

1331 lines (1243 loc) · 79.1 KB

briefstack — ideas

The living backlog: ideas and open items after v1.0.0. None of them is planned or in scope yet, and nothing here is to be built until the user decides so; each needs its own plan and approval.

1. A library of third-party skills

Done in phase 6 (BRIEF-phase-6.md).

  • Add skills from the chat or from a page: a GitHub link, a zip or a SKILL.md.
  • Store them in the personal library with their source, a pinned commit, the license and tags.
  • Quarantine with an automatic review (scripts, network access, hooks, allowed-tools, a safety warning) and the user's approval before use.
  • The architect proposes which skills to include in each project and which subagents they go to.
  • Add them to existing projects too, with a confirmation.
  • briefstack never runs them.

2. Working inside projects from briefstack

Done in phase 7 (BRIEF-phase-7.md, PLAN-phase-7.md): tasks in existing projects. What stays open is in §7, "Open items from phase 7".

Today briefstack only creates projects; the work on them happens in Claude Code or the app. To consider: whether the global chat should be able to open and direct work sessions in an existing project.

3. Controls the U5 design shows that the app does not have

The design in docs/diseno/ draws these. They were left off the screens during U5, at the user's request, and are recorded here with what each one would take. Each would be a behaviour change, outside a UI pass.

Usage: "New preset based on Balanced"

Done (phase 9, step 33): POST /api/usage/presets and the form on the Usage page; decisions.md, "Phase 9: step 33, four controls of IDEAS §3".

Create a user preset from a base one, from the page. It would need a write route for presets (today user presets are written by hand in the user's usage-profiles.json), the same schema check as the CLI, a form to change the model and effort per agent, and the rule that .claude/agents/*.md is only written by briefstack usage set.

Usage: a note on the week's plan window

Done (phase 9, step 33): from the last saved reading (with resets_at) and activity in GET /api/usage; no new reading.

"The week is at 63% and resets on Monday; switching to Max with two creations running could reach the limit sooner." The page would need to read the plan usage outside a creation (today it is read for each creation's panel), know the reset day, and count the running creations; the reading costs a call each time.

Projects: "Export CSV"

Done (phase 9, step 33): built in the page, no paths, a blob: download under the unchanged CSP.

Download the projects list as a CSV file. The page could build it from GET /api/projects, but it would need a decision on columns and on paths (the list shows absolute paths of the user's machine), a file download from a page whose CSP allows nothing but 'self' (a blob: URL would need checking against the CSP), and English and Spanish column names.

Projects: "Archive" an interrupted or cancelled creation

Done (phase 9, step 33): <home>/archived-sessions.json, PUT /api/sessions/:id/archived, Archive and Restore on the Projects page; list_sessions lists them marked.

Hide an unfinished creation from the list without deleting it. It would need a place to keep the choice (a field in the session's folder or in the briefstack home, written by code with tests), a write route with the token, a way to see and restore what was archived, and a rule for the chat's list_sessions tool.

Project and result: "Open folder"

Open the project's folder in the system's file manager. The server would have to start a program on the user's machine (explorer, open or xdg-open, one per platform), from a browser request: a new kind of action for a local server, with its own confirmation, path checks (only folders this tool created) and tests on the three systems.

Improvements: "Discard" a suggestion

Done in phase 6 (M8 in PLAN-phase-6.md).

Remove a suggestion from the list without preparing it. Suggestions are kept by the improvement manager; it would need a discard route with the token, a stored state for discarded suggestions (so they do not come back after a restart), the same for the chat's view of suggestions, and tests.

Settings: folders with read-only access

A list of folders agents may read without asking, with add and remove. It would change the guard and the permission policy: a new config field, the guard allowing reads (never writes) inside those folders, the same validation as the projects folder (full path, not over the library or the repository), a note in the creation's denied list, and tests in the security suite. The design's folder dialog also offers "read only" versus "read and write" for one creation, which would need the same change.

4. Open items from the plans

Moved here from the backlogs of the phase plans that were still open when v1.0.0 was tagged. Items those backlogs listed and a later phase closed are not repeated.

  • /tasks was captured for the generator and the reviewer only; the interviewer, researcher and architect still need one during a run (verification 9). From PLAN-phase-1.md.

  • A claude-code project does not show its scheduled tasks anywhere; only NEXT_STEPS.md of a claude-app project does. From PLAN-phase-1.md.

  • Done in backlog 2 (B10 in PLAN-backlog-2.md, option (1); its real check, scripts/real/check-chat-step.ts, is for the user to run). The chat sometimes describes a creation's step wrongly: it should quote the exact step from the panel. From PLAN-phase-4.md, carried in PLAN-phase-5.md.

    Proposal (backlog 1, B10):

    • Cause. The chat gets the step as data and words it itself. list_sessions gives the open step's id (gap-analysis, validate-review, …) only while a step is open: the manager's currentStep is unset between a step.finished and the next step.started. session_panel gives every step's state, but not the position or the name the panel shows ("step 3 / 9", "Validate and review"), which come from UI code (stepPosition and t.stepLabel in src/ui/). The system prompt does not say to quote the step, so the model infers it, at times from which agent runs or from the order, and between steps it has nothing to go on.
    • Options. (1) One stepText in both tools, built by the same code as the panel: the step reached (the open one, else the last one that is not waiting, as stepPosition does), "Step n of 9: name" in the chat's language, and what the creation waits for. stepPosition and the step labels move to code both sides import (src/panel/, src/i18n/), and the system prompt says to tell what a creation is doing by quoting stepText, never by inferring it. (2) Only the prompt line, with the ids as they are: cheaper, but the wording and the gaps between steps stay with the model. Recommended: (1).
    • Risk. Low. The panel's own text must not change (the moved function is the same one); the prompt change shifts how the model answers, so it needs a real check.
    • Tests. stepText equals what the panel shows for an open step, between steps, waiting for an answer, finished and interrupted, in English and Spanish; list_sessions and session_panel carry it; the system prompt names it; a real check for the user that asks the chat mid-creation and compares the answer with the panel.
  • Done in backlog 2 (B8 in PLAN-backlog-2.md, option (1); what the docs say is in decisions.md, "Backlog 2: claudeMdExcludes for creations"; its real check, scripts/real/check-claude-md.ts, passed for the main session and a subagent on 2026-10-26: closed). Creations see the repo's CLAUDE.md. From PLAN-phase-4.md, carried in PLAN-phase-5.md.

    Still open after B8: a CLAUDE.md in a folder above the repo (the user's own, if any) still loads in creations, as the docs say every parent folder's does; and the templates' library/templates/*/claude-code/CLAUDE.md would load on demand if an agent read a file in their folder. Neither is excluded yet.

    Proposal (backlog 1, B8):

    • Cause. Creation sessions run with the repo as working folder and settingSources: ['project'] (buildQueryOptions in src/creation/sdkRunner.ts); that is how they get the flow's skill, agents and hooks. The same source loads the repo's CLAUDE.md as project memory, in the main session and in every subagent. That file is for contributors ("plan first and wait for approval", "when the brief is ambiguous, ask", commit and CI rules), and some of it pulls against the flow, which must ask only through its tools. CLAUDE.local.md is not loaded (local is not a source). Whether CLAUDE.md files in folders above the repo load too is to be checked.
    • Options. (1) The claudeMdExcludes setting (in the SDK 0.3.286 types: "glob patterns or absolute paths of CLAUDE.md files to exclude", for user, project and local memory) with the repo's CLAUDE.md, in the flag settings the runner already passes to each creation. Skills, agents and hooks still load. To verify in the docs first: that flag settings honour it and that subagents follow it. (2) omitClaudeMd on agent definitions: subagents only ("no effect on the main session agent"), and the flow's agents are files, not SDK definitions; at most a complement to (1). (3) Move the contributor rules from the root CLAUDE.md to CONTRIBUTING.md: no code, but contributors' own Claude Code sessions lose them, and whatever stays in the root file still reaches creations. (4) Run creations from a folder of their own with a copy of .claude/: the guard's paths, the npm run briefstack command and the hooks all assume the repo as working folder; too large for the gain. Recommended: (1).
    • Risk. Low for the flow, which never needed those rules. The setting sits in the same flag settings as the command-hook guard, so the change must leave the guard's settings exactly as they are. If Claude Code ignores the setting, nothing breaks: the file is still loaded, as now.
    • Tests. buildQueryOptions carries the exclusion with the repo's CLAUDE.md path, written by code from the repo folder, and the guard's settings unchanged (unit); the guard and creation security tests as they are; a real check for the user (scripts/real/) that asks a creation's main session and one subagent whether a marker line of the repo's CLAUDE.md is in their instructions.
  • Folder claims live in the server's memory, so a creation started from the terminal (/new-project in Claude Code) is not seen by them (the apply gate of improvements does see it). From PLAN-phase-4.md, carried in PLAN-phase-5.md.

    Half done in backlog 2 (B9 in PLAN-backlog-2.md): option (2), read only, recorded in the session's folder.json rather than in an event (decisions.md, "Backlog 2: the web app sees the folders of terminal creations"), and the README note of option (3). Still open: option (1), so that the terminal flow is refused the folder of a web creation too.

    Proposal (backlog 1, B9):

    • Cause. FolderClaims is a map in the server's CreationManager, filled by the server's own PreToolUse hook (folderClaims.ts) when the flow runs paths check, grant_directory or scaffold. A creation started from Claude Code has none of the server's hooks (only the repo's command hooks, which append events), so it never claims a folder: the server cannot refuse it one, nor refuse its own creations the folder the terminal one writes. Its events.jsonl does not name the output folder either (targets are relative to their roots), so the server cannot rebuild the claim from disk the way the apply gate finds in-progress sessions.
    • Options. (1) Claims on disk, written by the CLI: paths check and scaffold, which both flows run, take --session SESSION (the flow already passes it to event) and record { session, dir, at } in <home>/claims/<session>.json; the server writes its creations' claims there too. A claim counts while its session is in progress (the apply gate's rule: started, not ended, last event within 2 hours). The server's claims hook and the CLI both refuse a folder that overlaps another live claim. (2) Read only: a new event records the folder of paths check, and the server treats the folders of in-progress terminal sessions as claimed; the terminal flow is still refused nothing. (3) Leave it, and say in the README that a terminal creation and the web app must not target the same folder. Recommended: (2) as a first step, then (1).
    • Risk. A claim left by a session that died blocks its folder until it goes stale (2 hours); the refusal must name the session. The claims hook is part of the security model: changing what it refuses needs the security suite. Several processes write claims, so each session has its own file, written aside and renamed. Absolute paths stay in the briefstack home, never in events or in the repo.
    • Tests. The claims file: overlap, case on Windows and macOS, stale and ended sessions, a damaged file (unit); paths check and scaffold refusing a held folder and allowing it once stale or ended (CLI); a web creation refused the folder of a terminal session on disk (server, with the fake runner); the folder-claims tests as they are; an e2e with a fake terminal session; a real check for the user with one terminal and one web creation.
  • Done in backlog 1 (A7 in PLAN-backlog-1.md). The library lock on writes that take more than 2 minutes. From PLAN-phase-4.md, carried in PLAN-phase-5.md.

  • Done in backlog 1 (A6): the SDK passes it; whether Claude Code sends the cancellation is still to be seen in a real session. Check whether the SDK passes the abort signal to the chat's tools. From PLAN-phase-4.md, carried in PLAN-phase-5.md.

  • Done in backlog 1 (A5). Turns that ended in text are counted in memory only, so suggestions after a server restart miss them. From PLAN-phase-5.md.

  • Done in backlog 1 (A2). Less noise in the skills static scanner: URLs in license files and localhost URLs as info, subprocess and socket weighed by context. From PLAN-phase-6.md.

  • Done in backlog 1 (A3). A portability finding for absolute Linux paths (/tmp, /mnt, /home) in skill scripts, which on Windows end up under the current drive. From PLAN-phase-6.md.

  • Done in backlog 1 (A4: the last known values). The Usage page shows no figures until a creation reads the usage: show the last known values, or read them when the page opens. From PLAN-phase-6.md.

  • Done in backlog 1 (A1). tests/unit/improve-manager.test.ts, "waits while a creation runs and applies once none does", sleeps a fixed 80 ms to check that nothing was committed; wait for a gate tick that found the blocker instead. From PLAN-release.md.

  • An intermittent end-to-end failure on Windows CI: "Test timeout of 30000ms exceeded while setting up "app"" in two tests of tests/e2e/ui.spec.ts, "usage › offers the user presets as cards of their own" (failed, retry included) and "usage › shows the last known plan usage …" (flaky), on the run of db9b812 (2026-10-26, run 40391171879), a commit that changed only documentation. The next run, with the same code, was green. The app fixture (the server and the page) took longer than the test's 30 seconds on that runner. To look at: what the fixture waits for, and whether its setup needs its own timeout. From PLAN-backlog-2.md.

  • Creations and improvement sessions do not offer the Skill tool, so their model cannot invoke Claude Code's bundled skills, built-in plugins or synced claude.ai skills; but nothing in their settings turns those off. Consider giving them the task's layers too (disableBundledSkills, disableSkillShellExecution, CLAUDE_CODE_DISABLE_BUNDLED_SKILLS, CLAUDE_CODE_DISABLE_CRON). From PLAN-phase-7.md; decisions.md, "Phase 7: skills that are not the project's".

5. Codex

To consider, not planned. (a) Generated projects: add skills-directory/ skill-codex (MIT, runs codex exec) through the skills library; it goes through quarantine like any skill with scripts. The official openai/codex-plugin-cc (Apache-2.0) is a plugin, not a skill: at most a recommendation in NEXT_STEPS.md. (b) briefstack's own flow: an optional, off-by-default Codex read-only review round. Writing through Codex is out: the guard does not see Codex's writes. Delegating moves usage to the user's OpenAI quota; it is not free, and every user would need Codex installed.

The user's goal (added in backlog 2): (c) After phase 7: in tasks and in generation, Claude Code delegates parts of the implementation to Codex and both build the project. Codex's writes are outside the guard, so Codex runs in its own sandbox limited to the task's worktree, and the diff, the declared checks and the user's approval are the control. Auth with the user's own Codex login; usage goes to the user's OpenAI quota.

  • Tasks: done (phase 8, closed 2026-11-17): the brief, what changed and the steps as done are in BRIEF-phase-8.md; the close is decisions.md, "Phase 8: closed". What its reviews left open is §8 below.
  • Generation: next, not started. It needs a brief of its own (the creation flow's guard differs from the task guard).

The notes below are the history of the tasks part, step by step.

What the spike measured (step 19, 2026-11-07, Codex CLI 0.167.0, Windows only; decisions.md, "Phase 8: Codex spike"). Against what (c) and the Codex brief assume:

  • Assumed: the sandbox is limited to the worktree. Measured: for writes, yes, in both Windows modes: outside the worktree, Codex's file tool and the shell are both refused. For reads, no: a file outside the worktree was read in both modes.
  • Assumed (open): the worktree's .git, which lives outside it, may not be protected. Measured: it is. Codex cannot write in the worktree's git folder or the repository's, so git add, git commit and git tag all fail and no ref moves. The history and the refs outside the task's files stay ours; the diff has to come from the worktree's files, which is what tasks already do.
  • Assumed: the network is blocked inside, and unelevated blocks it less. Measured: a server on 127.0.0.1 is reached in both modes. The Internet was not tried. briefstack's own server keeps its token in memory and in the opened address only, so reaching it is not enough to use its API; other local services are open to Codex.
  • Not foreseen: in elevated, the sandbox account cannot run a Node installed in the user's profile (nvm-windows), so Codex could not run the project's npm checks there; in unelevated it can.
  • Confirmed: the ChatGPT login works headless in codex exec; codex login status answers on stderr (exit 0 signed in, 1 with Not logged in); the mode can be set per call with -c windows.sandbox=... without touching config.toml; paths with spaces and of 186 characters work; killing the tree stops the running command and leaves the worktree usable; turn.completed carries the usage, absent when a call is killed; a one-step call costs about 32 000 input tokens, mostly cached.
  • codex sandbox -P :workspace -- <command> runs a command in the same sandbox with no model call: a cheap way to tell which mode is ready.

Step 20 (2026-11-07, no model call; decisions.md, "Step 20"). What it adds:

  • elevated closes the user's profile: no. A new folder in the profile's root was read in both modes; only folders whose own permissions exclude the sandbox account (such as %LOCALAPPDATA%) are closed.
  • The Internet: a GET to example.com got no answer in either mode. No control request was made outside the sandbox, so this is not yet proof that the sandbox blocks it. unelevated relies, at least in part, on proxy variables pointing at a closed port.
  • Closing reads per call: only in elevated, only by naming paths to deny in a permission profile (-c permissions.<name>={extends=":workspace", filesystem={'<path>'="deny"}, ...} and -P <name>). It writes deny entries into the real folders' ACLs, and they stay. unelevated refuses any such profile. A profile that does not read the whole disk is refused in both modes. Profiles are ignored when --sandbox is passed (docs), so using them in codex exec means dropping --sandbox workspace-write (not yet tried with the model).
  • Closing the network per call: no option tried closes 127.0.0.1 (network={enabled=false} in a profile, --sandbox-state-disable-network).
  • Node in elevated: it runs when Node is outside the user's profile.

Step 21 (2026-11-07, no model call; decisions.md, "Phase 8: step 21"). The Internet control was a gate for building the runner and the tool. It failed outside the sandbox: from this machine, a TLS connection to example.com is reset during the handshake (PowerShell and curl.exe alike). So step 20's failed GET says nothing about the sandbox, whether elevated keeps Codex off the Internet is still unknown, and nothing of the runner, the tool or Settings was built. Next: a control that works (another destination or another network), on the user's authorisation.

Attempt 2, with registry.npmjs.org (reached from outside): no request from inside got an answer, in either mode, but the TLS step failed (SEC_E_NO_CREDENTIALS, Windows' TLS library in the sandbox's account) after Trying <address>:443, which points to the TCP connection having opened (inferred). So no answer is not isolation. Next, attempt 3: a bare TCP connection, plain HTTP and Node's own TLS from inside elevated.

Attempt 3 (2026-11-08): both Windows modes reach the Internet from codex sandbox: a TCP connection to port 443, a plain HTTP GET and an HTTPS fetch with Node's own TLS all succeeded. "Network blocked inside" is false on Windows; with reads and 127.0.0.1 also open, Codex could read the user's files and send them out. The gate is closed and the runner and the tool wait for the user's decision.

Step 22 (2026-11-08; decisions.md, "Phase 8: step 22"). Four codex exec calls (each Windows mode, default policy and sandbox_workspace_write.network_access=false) and a read of the firewall rules:

  • Measured: codex exec reaches the Internet in all four (TCP to 443, plain HTTP, HTTPS with Node's own TLS). elevated runs as CodexSandboxOffline in both policies.
  • Measured: Codex installs four Windows firewall rules that block that account (outbound to the Internet, loopback TCP and UDP, inbound). They are enabled, and Windows reports them as CategoryDisabled.
  • Inferred: the Windows firewall is not the one enforcing rules on this machine (another firewall product owns that role), so Codex's rules do nothing here. Where the Windows firewall is active, elevated would probably be closed; unelevated would not (no rule names the user).
  • So outcome (b): no Codex configuration closes the network on this machine. Options for the user, not decided: (1) isolate from outside, e.g. a rule in the firewall product that is active, for the CodexSandboxOffline account, and require elevated; briefstack would have to check that the block works before offering Codex, since it cannot read another product's rules. (2) Postpone Codex on Windows. (3) Accept it with a strong warning (reads, local services and the Internet all open). Recommendation: a cheap check of the network before each round (one codex sandbox TCP attempt from elevated, no model) as a gate in whatever is chosen, and (2) until that check passes on the user's machine.

The user's decision and step 25 (2026-11-08; decisions.md, "Phase 8: step 25"). The user chose (3): Codex stays, with its shell, and the measured risk is accepted with a plain warning in Settings; a closed network is no longer a requirement. Step 25 built the runner, the delegate_to_codex tool (task sessions only), the per-round record and the Settings card (off by default, unelevated by default, 5 calls per round), all over a fake Codex in CI. Step 26 prepared the real check on Windows (scripts/real/check-codex-task.ts, run by the user: it checks Codex in Settings before spending anything, then a task where Claude must hand src/slug.js to Codex; decisions.md, "Phase 8: step 26"). The user ran it on 2026-11-08: one call, completed, 11 s, 32,617 tokens, S8 intact.

Step 27 (2026-11-08; decisions.md, "Phase 8: step 27"). The task page shows the calls: a summary (calls of the task, the per-round limit Settings has now, total tokens), one table per round that has calls (outcome, time, commands, tokens, Codex's final message), and the cost notice; "Codex is working…" while a call runs, read from the round's own event lines (no new event); the cancel button's help says it stops Codex too. Open, not done:

  • The record keeps no calls-per-round limit, so the page shows the one in Settings now; a round run under another limit shows the current one. Keeping it would change the record's shape (step 27 left the record as it is).
  • Not demonstrated with a real Codex: a cancel in the middle of a call (the tree kill is tested with the fake Codex only), the limit reached, headChanged, large tasks.

Future improvement, not measured: a mode without Codex's shell (codex exec --disable shell_tool). Codex would keep only its file tool, which the spike saw refuse writes outside the worktree; without a shell it could not run commands, so the network and reads outside the worktree through programs would be out of its reach (to be measured: what the file tool itself can read, and whether the flag holds in codex exec). It would also lose running the project's tests. Measure it before offering it as an option.

6. Unattended runs that reach the user

Goal (user): define a project fully up front, leave Claude working locally or in the cloud until the plan's usage runs out, resume on its own after the reset, and contact the user by WhatsApp (message or call) only when a decision is needed, so the user does not have to watch a screen.

  • Up-front definition: the creation spec and phase 7 tasks; a run is a queue of tasks with their checks, decided before it starts.

  • Running unattended: a run goes task after task; a task's diff is applied by rules the user set beforehand (for example checks green and no new shell commands) or waits for the user.

  • Usage: before each step, read plan usage; at a threshold, pause and resume after the reset time the reading gives.

  • Reaching the user: a separate project, a personal message gateway (notify, ask with options, receive the answer), reusable by other tools. Not part of briefstack: it needs an outside account, credentials and inbound messages, which briefstack never handles. briefstack talks to it through one small interface.

  • Channel: WhatsApp Business Platform (business number, templates only outside the 24-hour window, charged per message, a Calling API). Unofficial personal-WhatsApp automation is out (against its terms). A Telegram bot is a simpler first channel: free, and long polling needs no public address.

  • Safety: messages carry the question and its options, never secrets or code; only answers from the user's own number or chat count; approving a new shell command from the phone is off unless the user turns it on; an unanswered request times out to the safe choice.

  • Order: after phase 7 and Codex.

  • The user's decision (2026-11-02): the decisions and approvals are taken at the start; once a run is unattended, the user is not asked again except in extreme need; when the user has set that a diff is applied once some rules are met, applying it asks for no attention. This replaces the earlier proposal that an unattended run always waits for the user's approval (decisions.md, "Phase 7: M9 accepted, phase closed").

  • To decide when it is planned, not now:

    • The declared checks would run on the consent given at the start: the session writes code that runs before anyone sees the diff, which S8 (the checks wait for a click on the proposal page) avoids today.
    • The mitigations, to choose then: run the checks in an isolation at the system level with no network; apply to an integration branch, not the main one, so that everything stays reversible; a list of shell commands approved at the start; stop and notify only for something outside the rules, with a timeout that takes the safe choice.

    Nothing of this is built.

7. Open items from phase 7

Left open when phase 7 closed (2026-11-01). Steps 14 to 16 of the cleanup (2026-11-02 to 2026-11-05) closed most of them; each item starts with its state: done, accepted by the user, or pending with the reason. The phase's plan is PLAN-phase-7.md; its decisions are in decisions.md, "Phase 7".

Each item ends with its source, in one of three forms:

  • "Review of step NN, X": finding X of the review of step NN of the phase (once, X is an open question of that step's report). The reviews are in the user's working notes, which stay outside the repo and are not published, so no file is named or linked; the item says what the finding found.
  • A record in this repo, by document and heading, for example decisions.md, "Phase 7: security review", S10.
  • Something seen while the phase was being closed, by the step that saw it (for example "seen in the gates of step 12"), or the open warnings in the user's working notes.

Code

  • Done in the cleanup of phase 7 (step 14, commit 8ab1a6e: the saves of one task are queued in TaskStore). The saves of one task are not ordered. When a round's session starts, its session id is saved without waiting (void this.options.store.save(record) in startRound, src/tasks/manager.ts), and TaskStore.save (src/tasks/store.ts) does not queue writes per task, so that save can land after the round's end and leave running on disk. Queue the saves per task, or wait for that one. It is the cause of the intermittent macOS test below. Review of step 07, M4; review of step 10, I1.
  • Done in the cleanup of phase 7 (step 14, commit 8a55729; a stop that begins during the record's own save still leaves the task as an abrupt stop does, which recover() puts back). The stop is read too early before a record changes. startRound clears reviewed, validations and checks and saves running before the late read of stopping, and between the first read and that change there are several awaits (limit, checks.commands, inspectProject, projectRestrictions). A new round refused in that window loses the reviewed proposal (the task comes back interrupted and needs another round); checks refused there leave the task checking until the next start. Read the flag again just before the record changes. Review of step 07, M2.
  • Done in the cleanup of phase 7 (step 14, commit 84d1732; answer() answers task.stopping). A session that is stopping can still ask. During the task manager's shutdown(), between settling the pending requests and handle.stop(), request() looks only at cancelling and the state, so a new tool call opens a dialog; answer() is not refused either. Deny in request() while stopping, with a test. Review of step 07, M5.
  • Done in the cleanup of phase 7 (step 14, commit a2315a8: the round and the record are copied, the checking step too). "Saved before shown" holds for the state, not for the round. onRoundDone sets the round's finishedAt, outcome, summary, error and commit on the record in memory before the save, and next = { ...record } shares rounds: the view and the stream can show the finished round while the disk is behind. Actions are not affected (they refuse running and checking), but the comment above the save says more than that. Copy the round too, or narrow the comment. Review of step 07, M3.
  • Done in the cleanup of phase 7 (step 15, commit 6124ab4: POST /api/tasks/:id/checks/cancel, from a button shown while they run). Cancelling the checks from the proposal page. Running checks end only with a server stop (or their 10-minute timeout per command). Review of step 05, M2.
  • Done in the cleanup of phase 7 (step 15, commit cce7fdd: the proposal's actions share one busy state on the page). The checks button while another proposal action runs is not disabled; the server's lock per task already makes the actions wait for each other. Optional in the review of step 05, I2; left out in decisions.md, "Decisiones sin Dani (fase 7)", M8b.
  • Done in the cleanup of phase 7 (step 15, commit 43ea994: a notShown warning for each, which does not stop the approval; errors and warnings are now capped apart). Files the proposal page cannot show (over 256 KB, binary files, links) are listed by name only; a warning for any of them was proposed. decisions.md, "Phase 7: security review", S10.
  • Done in the cleanup of phase 7 (step 15, commit aa90a18: the task's line goes under today's heading when it is the note's last one; other library additions keep one heading each). Two equal date headings in a project's note when a task is applied and reverted on the same day: appendDated (src/library/notes.ts) puts today's heading before every addition. Review of step 08, M9; seen again in the real run of step 11.
  • Done in the cleanup of phase 7 (step 16, commit 156714a: the confirmation closes for good when the task leaves checking). The cancel confirmation of the checks came back by itself: left open while the checks ended, it showed again on the next run without a click. Review of step 15 of the cleanup, M1.
  • Pending, planned with §6. Applying unattended "with checks green" clashes with S8: the declared checks run only after a click on the proposal page. The user decided on 2026-11-02 how unattended runs are approved; what that leaves open for the checks is in §6, "To decide when it is planned". Review of step 05, the report's open question.
  • Pending: the user kept it in the backlog (2026-11-05). The secret and path scans are slow on long lines. findSecrets, findAbsolutePaths and maskSecretValues take time that grows with the square of a line's length (measured: about 1.8 s, 1.7 s and 3.7 s for one line of 64 KB). The validations scan files up to 1 MB and the proposal page masks files up to 256 KB, so a long one-line file (a minified bundle) makes a round's end and the page slow. Make the scans linear without changing what they find. Seen in step 15 of the cleanup.
  • Pending: minor, not pursued (the rule of the cleanup: only important or blocking findings open work). What the review of step 14 of the cleanup left, all minor: reply() is not refused while the task manager stops (a reply reaches only the session the stop is ending; M11); a command the user allowed for the whole task is still allowed during a stop, which the commit message of 84d1732 does not say (api.md is exact; M4); startRound still changes the session id and running in memory before saving them (M4); newRound and runChecks load a task into the server's memory before the late read of the stop, harmlessly (M3). In the tests: no test fixes the failed path of onRoundDone (M12); the ordering test of tests/unit/tasks-store.test.ts waits a fixed 50 ms (M1), and its "failed save" test fails before the queue, so a write that fails inside the queue is not tested (M2); the guard test of tests/unit/tasks-manager.test.ts polls for any tool.denied line, not the guard's (M5); the I2 tests keep fixed waits of 300 and 500 ms (M6). Review of step 14.
  • Pending: minor, not pursued (the same rule). What the review of step 15 of the cleanup left, all minor: two paths of cancelling the checks have no test, the 15-second limit (cancelling goes on with the process maybe alive, and the old checkWith must return without writing) and checks that end while the cancel arrives (M2); past 50 warnings the cap drops notShown warnings without saying so on the page, so "a warning for each file" does not hold then (M3); unshown starts up to four more git processes per file besides the two of blob(), and does not stop at the cap, which slows a round's end on large diffs on Windows (M4); the warning's texts are written twice, once per language, and no e2e test goes through the Spanish page (M9). Review of step 15.

Tests

  • Done in the cleanup of phase 7 (step 14, commit 8ab1a6e: the ordered saves, and the test waits for the session id's save to be asked). Intermittent on macOS: tests/unit/tasks-manager.test.ts, "TaskManager: after a server stop › marks tasks the last server left running as interrupted", failed once in CI (run 41315930066, on 666fa66, a commit that changed only documentation; the runs after it were green): it read running where interrupted was expected. A race between the test and the unordered save above, which the test does not wait for. Review of step 07, M4; review of step 10, I1.
  • Done in the cleanup of phase 7 (step 14, commit 0e43e2e: the test polls for the line, with a deadline). Intermittent locally on Windows: tests/unit/tasks-manager.test.ts, "TaskManager: shell commands and questions › asks questions, and a write outside the worktree is denied by the guard", failed once (2026-11-01): the session's events.jsonl held tool.pre for the write but not yet the guard's tool.denied line when the test read it. The test reads the file without waiting for that line. Seen in the gates of step 12 (a commit that changed only documentation); the next run passed.
  • Done in the cleanup of phase 7 (step 14, commit 0e43e2e: approving is pinned as task.wrongState with checking; the 10 repetitions were runs of a step's report, not part of the tests, so nothing was removed). The R2 tests (tests/unit/tasks-run-checks.test.ts, "… is on disk before an action can see it (R2)"): after the fix the fulfilled branch of expectOneOrder is never reached, so approving is not pinned as refused; pin task.wrongState with checking. Their 10 repetitions add nothing, the result being deterministic. Review of step 07, M6.
  • Done in the cleanup of phase 7 (step 14, commit 0e43e2e: a spy on the checks' runs; each I2 test pins the order it forces; all three call recover()). The I1 and I2 tests: the route test of I1 (tests/unit/server-tasks.test.ts) infers that nothing ran from the task's state, not from a spy; the first I2 test forces the order but its expectOneOrder accepts either outcome; the I2 tests use a new manager rather than recover() (the same today). Review of step 06, R5.
  • Done in the cleanup of phase 7 (step 16, commit 61fc0c2: fake improvements, a skill service over a fake GitHub, a project and a running creation, so the test fails if any tool is refused; the importers' reading finds those forms, bare imports and any dynamic import whose target is not a plain string; the pure helpers stay exported, since tests/unit/tasks-checks.test.ts tests them). The reach of the checks invariant (tests/unit/tasks-checks-invariant.test.ts): four read tools (list_suggestions, list_proposals, show_proposal, list_skills) and four action tools (cancel_creation, prepare_improvement, add_skill, add_skill_to_project) are refused before doing their work, since the test has no improvements or skills; give it fakes of both. Its pattern for importers misses import X, { Y } from, double quotes and import() with a template. src/tasks/checks.ts still exports pure helpers that only tests use. Review of step 06, R4.
  • Done in the cleanup of phase 7 (step 16, commit 5659302: it polls for the turn's end). Intermittent locally: tests/unit/creation-fake-runner.test.ts, "ends a turn with a message …", read the last event after a fixed 30 ms and got running once (the session's start is written to disk before the turn ends). Seen in the gates of the close of step 15 of the cleanup.
  • Done in the cleanup of phase 7 (step 18, commits 88337c6 and 324e772: the test's clock for the quiet waits, and a condition instead of a fixed time). Intermittent locally: tests/unit/creation-sdk-runner.test.ts, "keeps waiting while messages keep coming after a result …", found the session closed (fake.closed true, line 824) once, in the gates of the close of step 15 (on af5c4b0). Cause shown: the test sent a message every 40 ms with real timers against an 80 ms quiet wait. With random synchronous stalls of the event loop (up to 150 ms, as a loaded machine causes), Node fired the 80 ms timer before the 40 ms one created in the same millisecond, logged in a probe, and the test failed in 113 of 300 repetitions. CPU load alone (a busy worker per core) did not reproduce it in 15 runs of the file. The same probe, 20 repetitions per test, also failed "does not run while the spec approval waits" (17 of 20: the tool reads the disk before it asks, inside a 30 ms wait) and tests/unit/creation-manager.test.ts, "streams the session.end …" (3 of 20: session.end was written a fixed 150 ms after session.finished, and the manager read both lines in one go). The three are fixed and pass the probe 20 of 20. Left as they are, noted only: three tests of the same file that look alike passed the probe 20 of 20, so no defect was shown: the reply sent after a 20 ms tick() against a 60 ms wait ("sends a free-text reply …"), the 120 ms pause against the 250 ms wait with a background agent ("waits much longer …"), and the fixed 20 ms tick() before the first hook ("claims the first session id …"), which would fail if the runner's reading of its folders took longer than that. Robust by reading: the question and permission tests (the wait is cleared in the same tick as the request), the polling loops with a bound, and the other creation-* files (they poll with a deadline, or their fixed waits only make a negative check weaker).
  • Done in the cleanup of phase 7 (step 16, commit 209384f: a comment in the test). The warning BRIEFSTACK_LIBRARY_LOCK … EPERM that a passing test logs is tests/unit/library-lock.test.ts's own: the test makes the lock's removal fail on purpose and Node prints the warning it checks. It is in each of the 20 Windows CI logs read (2026-10-30 to 2026-11-02); run alone, the file's other tests print nothing. Not a lock failure of the machine.
  • Pending, no cause shown: step 16 used about 20 minutes of the two hours set for it and none of its two test pushes. Intermittent on Windows CI: e2e tests that pass 30 seconds, most while setting up the app fixture. Seen in 4 of the 20 Windows runs read (2026-10-30 to 2026-11-02), each passed on its retry: tests/e2e/security.spec.ts:31 (in setup), auth.spec.ts:25 and :45 (in setup, the run's first two tests), tasks.spec.ts:227 (waiting for the page's menu), ui.spec.ts:422 (the Usage page); before them, the skills pages (the phase's open warnings) and the Usage tests of §4 (run 40391171879), possibly the same kind. A fifth run had another kind: creation.spec.ts:171 waited the 5 s of expect for the spec screen (8.3 s in all; its retry passed in 3.8 s). Also tests/e2e/several.spec.ts:121 locally, once (locator.click on the menu's "New project" link at 30 s; seen in the gates of step 14; review of step 14, M7), and tests/unit/library-lock.test.ts locally, once (the failing test is not known; 20 runs of the file in step 16 passed; its A7 test later failed on Windows CI, see the next item). What was measured: the e2e tests take 3.5 s at the median on the Windows runner (p90 8.6 s, p99 18.8 s, 2138 passing tests) against 1.2 s on Linux (p90 2.8 s, max 8.5 s, 6 runs); security.spec.ts:31, which is nearly all fixture, takes 0.2 s on Linux, 1.3 to 3.3 s on the Windows runner when it passes first, and 0.9 to 1.3 s on a Windows 11 desktop. The retries of the 30 s failures took 4.7 to 18 s. A hypothesis the data fit, not a measured cause: the Windows runner slows down as a whole for a minute or so, and the fixture, which every test runs, passes 30 s first. For it: in two of the four runs, other tests next to the failure (two workers) took the longest each took in the 20 runs (around security.spec.ts:31: 30.6 and 24.1 s, against medians of 3.3 and 2.1 s; around the Usage test: 16.9, 21.6 and 27.9 s, against 3.2, 5.4 and 4.0 s). Against it, or weaker than it looks: in the auth run, the only slow tests were the two failures (30.1 s each) and their retries (12.8 and 13.0 s), and the next ones took 3.1 to 4.3 s; around tasks.spec.ts:227, the neighbours took their usual time (7.4, 10.8 and 8.6 s, against medians of 6.8, 10.7 and 9.6 s); and on Linux security.spec.ts:31 is not always 0.2 s (1.2 s in run 41464978588). Not the usual cost of a cold start of the workers (the first four tests take 1.9 to 7.5 s in the other 19 runs). Unlikely by reasoning, not measured: the library lock (a lock this process failed to remove is taken over at once, src/library/lock.ts; the EPERM warning is the test's own, above), and one test's own code (the failures are in different files). A higher limit for Windows CI might stop the retries; whether 60 s is enough is not known, since the failed attempts were cut at 30 s. It was not set, as step 16 forbade it without a measured cause; the retry keeps CI green and shows each case as flaky. Still to measure: the fixture's steps timed one by one on the Windows CI runner, with at most two test pushes (a probe outside the repo was refused by the session's permissions in step 16); that would confirm or discard the hypothesis. Also to look at: whether the runner's antivirus scans the temp folders and the git processes the fixture starts (two git repositories and several commits per test), and a fixture that copies a prepared folder instead of running git for each test.
  • Partly done in phase 8 (step 24; decisions.md, "Phase 8: step 24, the library lock's judge counted its own delay"). The A7 test of tests/unit/library-lock.test.ts failed once on Windows CI (run 42431672549, retried green): the test process took a live process's lock. Fixed: the judge of a stale lock no longer counts its own delay as the lock's age, a holder that freshens its lock before the take-over keeps it, and the test no longer reads the other process's done through the pipe. Left by design (A7 keeps the age rule): a holder that stops running for more than about staleMs × 3/4 (225 ms in the test, 90 s in production) still loses its lock. Measured on a Windows 11 desktop under load: the holder was at most 27 ms late; not measured on the CI runner. If the A7 test fails again on CI, that is the cause left: measure the holder's delay on the runner (with test pushes) before raising staleMs.
  • Noted only, not investigated (reviews of steps 24 and 25):
    • tests/unit/chat-improve-tools.test.ts failed once on Windows CI: its beforeEach passed 30 s and the file took 68 s (run 42478022386); it passed when the run was retried.
    • takeOver in src/library/lock.ts keeps a small window: a holder that freshens its lock just after the taker's rename still loses it.
    • tests/unit/tasks-validate.test.ts can pass its 30 s limit when the machine is loaded on purpose (seen while measuring step 24, not in CI).

Real checks (scripts/real/)

  • Accepted (decisions.md, "Phase 7: M9 accepted, phase closed"). Layer 6 of the task guard (it refuses a Skill call for a skill that is not the project's) is shown by unit tests only: in real sessions Claude Code refuses those calls first, through the SDK skills option (check 5 in decisions.md, "Phase 7: M9 real checks"). Showing it in real needs a skill Claude Code lets the model call while the task's layers keep it out. Review of step 08, I2; review of step 10, M3.
  • Accepted (decisions.md, "Phase 7: M9 accepted, phase closed"). The real sessions of M9 ran on Windows only (Windows 11, Claude Code 2.1.316); macOS and Linux are covered by CI over the fake runners. decisions.md, "Phase 7: M9 real checks".
  • Done in the cleanup of phase 7 (step 16, commit 223e1d2: checks 3 and 4 print it as NOT CONTROLLED, and decisions.md, "Phase 7: M9 real checks", records it; adding 'local' to the control session's settingSources could control it in a later run). settings.local.json in checks 3 and 4 has no control: the control session loads settingSources: ['project'], which does not read the local file, so for it only the hiding in the worktree is shown. Review of step 08, M2.
  • Done in the cleanup of phase 7 (step 16, commit 223e1d2: check 4 prints it as NOT CONTROLLED, recorded in decisions.md as above). Check 4 has no control that the broad allow rules work without the task's layers. By H0, allow rules are not used in SDK sessions, so such a control may not be possible; the script should say so. Review of step 08, M3.
  • Done in the cleanup of phase 7 (step 16, commit 223e1d2). startWeb(…, runner?) in scripts/real/tasks-common.ts takes a runner that no script passes (it served rehearsals outside the repo). Review of step 08, M4.
  • Done in the cleanup of phase 7 (step 16, commit 223e1d2: the same registration rules, counted in code, and a helper's own: no check of its own, no exit, the caller's check first). The structural test of the real scripts (tests/unit/real-scripts.test.ts) skips tasks-common.ts; holding it to the same rules would be stricter. Review of step 08, M5.
  • Done in the cleanup of phase 7 (step 16, commit 223e1d2: within, two minutes, and the task's reading after the round too). Waits without a limit: controlSession awaits the context reading with no deadline (scripts/real/tasks-common.ts), and so does the beforeFinish of check 5 (scripts/real/check-task-skills.ts); a missing answer hangs the script instead of failing it (it can never pass by it). Race them with a deadline that fails. Review of step 10, M4.
  • Done in the cleanup of phase 7 (step 16, commit 223e1d2). (c) of check 5 counts any skill that is not the project's, by name, not only bundled ones (source built-in) as its step asked. The result of the run is the same (the 13 were all built-in); require the source if it runs again. Review of step 11, M1.
  • Done in the cleanup of phase 7: checked, no line to add (step 16, docs read 2026-11-05, recorded in decisions.md, "Phase 7: M9 real checks": the commands reference lists /design as a skill, but no sentence says it stays typable or is hidden from the model when bundled skills are off). The design observation of check 5 has no line in the skills docs, which mention doctor only; it rests on the control's init listing it too. Review of step 11, M2.

Not listed here

  • Findings already closed: fixed in a later step of the phase, accepted by the user, or checked and found true. Their records are in decisions.md, "Phase 7" and "Decisiones sin Dani (fase 7)".
  • Findings about the step reports (outputs not saved, CI quoted as extracts, a diffstat, gates not run on a commit's exact tree): they are about the user's working notes, not about briefstack, and past evidence cannot be redone.
  • The user's own working setup outside the repo (the notes and tools that drive each step, empty folders left on the user's machine after the move of 2026-10-30): not part of briefstack.
  • The other option of the review of step 07, M1: setting the stop flag when briefstack web begins to stop, before the improvements and the chat. The finding was fixed in api.md instead, and the current order is safe: the task manager's stop ends or aborts the work the task routes accepted in those seconds.

8. Open items from phase 8

Left open when phase 8 (Codex in tasks) closed (2026-11-17). Each item starts with its state and ends with its source, in the forms of §7 (for example "Review of step 22, minor"). The brief is BRIEF-phase-8.md; the decisions are in decisions.md, "Phase 8". Already listed elsewhere, so not repeated here: what the real checks did not cover (elevated in a real task, other systems, a cancel right at a call's start or end, the limit reached, headChanged, large tasks) is in decisions.md, "Phase 8: closed", and §5 (step 27); the limit the record does not keep is in §5 (step 27); the mode without Codex's shell is in §5; the A7 test to watch on Windows CI, the small window of takeOver, tasks-validate.test.ts under load and chat-improve-tools.test.ts on Windows CI are in §7, "Tests".

Codex itself (not measured)

  • Pending: not measured. elevated on a machine where it is not set up yet: on the user's machine it was already set up (by the Codex desktop app), so its first run, and whether it asks for administrator rights, were not seen. Review of step 19, point 6.
  • Pending: not measured. The mxc sandbox mode was only seen in the binary's strings. Review of step 19, m2.
  • Pending: not measured. Writes and git in unelevated through codex exec (case d) and paths with spaces and long paths in unelevated (case f) were measured with the model in elevated only; unelevated was measured with codex sandbox, without the model. Review of step 19, m3.
  • Pending: not explained. Why the DENY entry stayed on the outside folder and not on the planted one after the step 20 calls. Review of step 20, m1.
  • Pending: not measured. What codex-windows-sandbox-setup does on each elevated call. Review of step 20, m2.
  • Pending: not measured. Why Windows reports Codex's firewall rules as CategoryDisabled on the user's machine (inferred: another product owns the firewall category), and whether sandbox_workspace_write.network_access=false is applied at all (accepted with no error, same result as the default). Review of step 22, minor.
  • Noted. A call costs more than step 19 suggested: about 68,000 input tokens per call in step 22 (most cached), against 32,000 for a one-step call. Review of step 22, minor.
  • Pending: not measured. Codex's own default timeout for its shell tool (the step 28 check asks Codex for at least 150 s in case it is shorter). Review of step 28, risks.

Code and real checks

  • Pending: minor. requireConfirmation says "Claude Code session" (scripts/real/common.ts) also for scripts whose spend is Codex's, such as probe-codex.ts. Review of step 19, m1.
  • Pending: not shown with a real Codex. Events the runner does not read are ignored, such as a file_change item (Codex used its shell in every measured call, so none was seen). Review of step 25, "not tested".
  • Pending: partly shown. "Codex is working…" with a real Claude Code relies on a tool.post line, written by the PostToolUse hook, for the in-process tool. The step 28 real check showed it turning on; that it turns off when the call returns (and not only at the turn's end) was not checked in real. Review of step 27, "not tested".
  • Pending: unit tests only. The timedOut and notStarted outcomes of a call are shown on the page by unit tests only. Review of step 27, "not tested".
  • Noted. The real checks find Codex's processes by name, compared with the ones running before (the Codex desktop app also names codex), and they rely on Codex finding the user's own login: if briefstack's sandbox ever changed HOME or USERPROFILE, codex login status would fail and the check would stop before spending. Review of step 26, risks.

9. Open items from phase 9

Minor findings of the milestone reviews of phase 9 (builds), noted and not pursued (only blocking and important findings are fixed within their milestone). Each ends with its source, "Review of M". The plan is PLAN-phase-9.md; the decisions are in decisions.md, "Phase 9".

  • Done (step 33). Creating the integration branch reports any failure of update-ref as build.branchExists, an invalid base too (src/builds/git.ts). Review of M1.
  • Done (step 33: build.branchCheckedOut). Nothing stops the user from checking out briefstack/build-<id> by hand: update-ref would then move the branch under their folder, and removing it would leave that folder's HEAD on a missing branch. A check that no worktree has it checked out, before moving or removing it, would close that. Review of M1.
  • Done (step 33: verified in git's release notes; the minimum is now 2.40). git merge-tree --write-tree --merge-base is documented from git 2.40, while MIN_GIT_VERSION says 2.38; phase 7's apply (src/tasks/apply.ts) already used it, and the integration branch uses it too. Review of M1.
  • Noted. Several error codes and states were added in M1 before the milestones that use them. Review of M1.
  • Noted. The H0.1 probe's output does not print the user's folder's HEAD before the change; it is read from update-ref's message. Review of M1.
  • Noted. Commit a259a5c holds several concerns (a build's task start, unattended rounds, runBuildChecks, applying to the integration branch, the refused revert). Review of M2.
  • Pending: minor. No test for the race where a build's turn ends before the manager keeps the round's handle, nor for a PowerShell call in a build's round. The S8 regression test for builds is in tests/unit/builds-tasks.test.ts, not next to tasks-checks-invariant.test.ts. Review of M2.
  • Pending: minor. runBuildChecks takes its commands from its caller (the build), not from the build's record; a build's commands are checked at its start, not again when the record is read. Review of M2.
  • Pending: minor. A shell request with no tool-use id is denied by TaskApprovals.decide before the build hears of it, so it is not in the build's denied list; a denial through canUseTool writes no tool.denied line (as before phase 9). Review of M2.
  • Noted. Commit 51a9782 holds the build manager, most of M4's loop (usage pause, restart, cap of rounds), the usage reader, the routes and the wiring in one commit, and M4's code came without M4's tests (added in M4). Review of M3, I7.
  • Done (step 33: a warning and noChecks: true). A build may start with no checks: the rule "the checks pass" then holds by itself and every task with no denied command is applied. The start page does not warn about it. Review of M3.
  • Done (step 33: items, translated). build.invalidStart shows a generic text on the page, not the list of issues the server names (they are English only, as approvedListProblems of M2), and "how many tasks to run" is not lowered when tasks are removed, which then refuses the start. Review of M3.
  • Pending: minor. TaskManager.start and BuildManager.plan queue on different lines, so both may pass the preconditions before the other saves (harmless: the build's start checks again); and a planner counts in the shared limit only from a moment after its record is saved. Review of M3.
  • Done (step 33: a random tag). The planner prompt's data markers are fixed text: a brief holding === end of docs/BRIEF.md === fakes the end of the data (low impact: no tools, the user reviews the queue). A random marker would close it. Review of M3.
  • Done (step 33: 50 kept, deniedOmitted). A build task's denied list grows without a cap in build.json. Review of M3.
  • Done (in M5, a28d655; checked in step 33). The build page polls only while planning or running: a build paused for usage does not refresh when it resumes by itself. Review of M3.
  • Done (step 33: a cancel-asked file). A cancel followed at once by a server stop is not recorded: the build stays running, recover() makes it interrupted, and the user could resume a build they cancelled; likewise when the loop fails during a cancel. Keeping "cancel asked" in the record would close it. Review of M4.
  • Partly done (step 33: the transitive skip and Resume skipping again are tested; "cancel kills the tree" still rests on phase 7). No test of a transitive skip (a task skipped for a skipped one), nor of a task queued again by Resume and skipped again; "cancel kills the tree" is shown with the fake runner and rests on phase 7's tests of the task manager's cancel. Review of M4.
  • Noted. Commit 4bc9b3f holds pause, resume and cancel together with the task manager's refusal of a driven task (an open item of the review of M2). Review of M4.
  • Done (step 33, the user's decision 1). Discarding an applied or reverted build deletes only its branch. Was: an applied or reverted build cannot be discarded, so its briefstack/build-<id> branch stays in the project's repository (the brief's §3.5 says the per-task commits stay until the build is discarded). Discarding an applied build would delete only its branch. Review of M5.
  • Done (step 33, the user's decision 2). The build page shows Claude's tokens per task, from each round's result message. Was: the "tokens" column of the build's page shows only Codex's tokens, and a build's rounds offer no Codex, so it is empty in practice; task records keep no count of Claude's own tokens (the SDK's result message carries usage). Review of M5.
  • Done (step 33: build.alreadyOnBranch). If the server stops between landing the build's commit and saving applied, the build stays finished with its change on the default branch, and a new apply says build.nothingToApply ("nothing applied on its integration branch"), which is misleading. A code of its own would say it. Review of M5.
  • Pending: minor. A discard can stop halfway when the user acts on a waiting task meanwhile (some tasks discarded, the branch kept; retrying finishes it). A cancelled task whose discard fails during the apply stays open, and approving it later would move the branch of a build already applied: applyToBuild could refuse a build that no longer holds the project. Reverting does not check whether another build holds the project (it does not touch the user's folder). Review of M5.
  • Partly done (step 33: the error of an interrupted build is shown; the rest is pending). The build page: a waiting task the user approved or discarded still reads "Waiting for you" until Resume or Apply; Apply shows even when tasks wait (the server refuses with the reason); the error of a build interrupted by an unexpected failure is not shown; diff() does not catch a git failure (a 500). Review of M5.
  • Pending: minor. No e2e of the user's pause nor of a denied command (unit tests cover both); the token sum of GET /api/builds/:id is tested only at 0. Commit a28d655 also holds the refactor of src/tasks/apply.ts and two test-fixture fixes from M3 and M4. Review of M5.
  • Done (step 33). After a refused action the build page does not read the diff again (onDone runs only on success), so a second Apply with a stale head is refused the same way until the page is reloaded (the message now says to reload). useBuildDiff loads twice on mount (harmless). Review of M6.
  • Done (step 33). The planner session is tapped and its init.tools printed, web.call and web.stop() have deadlines, and the sandbox's processes are counted after the stop, in check-build.ts and the second real check check-build-deny.ts. Was: scripts/real/check-build.ts: the planner session is not tapped (that StructuredOutput reached it is seen from the outcome only, and its init.tools is not printed); web.call and web.stop() have no deadline of their own, and no process count is taken after the stop (only startWeb's last-resort cleanup). Review of M6.
  • Noted. Commit 26f52cc holds the four fixes of the review of M5 together, as earlier review fixes in this repository did. Review of M6.
  • Pending: minor. check-build-deny.ts reads the first round's red check from the outcome (a fix round ran, the check's own count is 2 or more, no command denied): the task keeps only its last checks, and a blocking validation in round 1 would also give a fix round. Task 1's fix round may deny a command again and leave it waiting: since step 37 that is NOT CONTROLLED, and the waiting is judged. How Claude Code words a hook's refusal to the model is printed, not judged. Review of step 33, part D.
  • Pending: minor. The tests of the real scripts are mostly text matches; the fixed queue is not checked against queueItemSchema and the regex that rebuilds the check script skips lines it does not match. Review of step 33, part D.
  • Noted. Commit 97f5d32 holds the second real check, the moved build helpers, the deadlines and the minors of check-build.ts together. Review of step 33, part D.
  • Pending: minor. Claude's tokens: no test of several readings in one round (the last one kept, not summed) nor of a cancelled or failed round's count; the fallback to the SDK's usage counts only the last turn of a round. The real checks' process count looks for node --test or scripts/check.js in every process of the machine, so another project of the user's running one would give a false FAIL. Review of step 33, part A.
  • Pending: minor. No UI test of the error of an interrupted build, of the "and N more" line of denied commands, nor of Revert on a discarded build; no test that a late usage reading never lands in a new round. Reverting a discarded build does not check whether another build holds the project now (its busy looks at active tasks only). Review of step 33, part B.
  • Pending: minor. No test of a loop that fails while a cancel is asked (the cancel-asked mark makes it cancelled), nor of finishCancel keeping the mark when its save fails; a mark can stay beside a build the loop left finished or interrupted (harmless: Resume removes it). activity on the Usage page is tested only with nothing running. The Usage form repeats the agent and effort lists of src/usage/schema.ts and src/models.ts. An unreadable user presets file answers with its absolute path in the error's params (as GET and PUT /api/usage already did; the page never shows it). Writing a preset rewrites the user's usage-profiles.json in the schema's key order. Review of step 33, part C.
  • Noted. Commits fde4fe7 (the four controls of part C) and bfaa9b6 hold several concerns. Review of step 33, part C. So does ffe7d5d (the fixes of part C's review, with a test of the cancel mark its message does not name); the week's note with activity: null has no test. Review of step 33, part E.
  • Noted. Commit 5c6133b holds the ten items of part B and the fixes of part A's review together. Review of step 33, part B.
  • Noted. Commit 8e02689 holds the user's decisions 1 and 2 together, and 1cf5846 the docs of part A with the minors of part D's review. Review of step 33, part A.
  • Pending. In the second real check (2026-11-22, Claude Code 2.1.330) the denial reached the model as Claude Code's PreToolUse:Bash hook error: [<path of the hook command>], not with briefstack's UNATTENDED_DENIED text (its NOT CONTROLLED line: "0 of 1 result(s) hold the start of UNATTENDED_DENIED"). The command was refused and not run, but the model is not told to go on without it or to use an approved command, and it sees local paths (the hook's command line). To find out how a hook's refusal reaches the model and make it carry briefstack's text without paths. decisions.md, "Phase 9: accepted".
  • Done (step 37). scripts/real/check-build-deny.ts now requires task 1 applied after 2 rounds once its fix round ended without the denied command (a fix round that calls any command off the list is NOT CONTROLLED, the model, and then task 1 must wait, denied, with no commit), and its denial is judged in the build's denied list read after the end. Was: it accepted task 1 waiting or applied. decisions.md, "Phase 9: the user's decisions", 4. Not run yet.

10. Open items from phase 10

What phase 10 (a first version of the code in a creation, Codex without its shell) leaves open. The plan is PLAN-phase-10.md; the decisions are in decisions.md, "Phase 10".

  • Done (2026-11-24, the user's decision). Hooks declared in the frontmatter of a project skill, command or agent the implementer or Codex writes (hooks:) are put back before the code commit, as the protected paths are, and listed with the reason (declaresHooks, the tasks' test). Not refused at the write: Codex's file tool does not pass through the guard, so the put-back is the one place for both. Review of M4, I6.
  • Not shown without a real session: that the implementer subagent sees the in-process briefstack-web tools, and that the runner rewrites guard.json at implement_start and implement_finish (no runner-level test). Reviews of M2 and M4. The real check of 2026-11-24 showed the first (1 run_command, 1 delegate_to_codex), the rewrite at implement_start only indirectly (the implementer's writes were allowed), and not the one at implement_finish; decisions.md, "Phase 10: accepted".
  • The usage gate and the bounds have no e2e (the gate is wired with the real runner only, as the creation's other readings). Review of M3, I4.
  • A Codex call keeps its own 10-minute deadline inside the step's minutes; some of the delegate's texts still say "round"; a failed symbolic-ref reads as "Codex not available". Review of M4, m2 and m4.
  • Not measured: whether Codex's file tool, without its shell, could write inside the project's .git (a filter in .git/config the server's git add would run); macOS and Linux for the no-shell mode; Codex releases after 0.167.0 (the status check reads the tools again on each check, and a creation uses only the version checked).
  • The creations list counts implement in "step n of m" when code was chosen; the live panel only once the step is reached. Review of M2, m8. Checked in step 37: both now count it once code is chosen (src/ui/creations.tsx and src/ui/creation.tsx, code !== undefined).
  • The terminal /new-project never offers code (out of scope by the brief); a terminal creation that wants code goes on with a task or a build.
  • Done (step 37): the put-back of ignored protected files, edge cases (review of M6, m2–m4). A wholly ignored .husky/, .githooks/, .briefstack/ or .claude/, or a protected folder under one (.claude/hooks/, .husky/_/), is read file by file (what was there stays, what is new goes; a new .claude/settings.local.json in a wholly ignored .claude/ is caught); a snapshot file that turns untracked goes back as the snapshot had it and is ignored again through info/exclude; when the snapshot cannot be read the step does not start (snapshotFailed, final), so nothing is removed. Still open: protected names under a wholly ignored folder that is not protected itself (vendor/ ignored whole, holding vendor/.husky/; node_modules/) are not opened; snapshotFailed has no e2e.
  • The put-back of definitions with hooks, edge cases (review of step 37, part A, m4, m7, m8; m2 and m3 done in part B): a definition that was a link at the start and is still one is written back as a plain file; a nested git repository (Codex's file tool could write a .git inside a skill's folder) hides the definitions in it, since git lists it as one folder; the implementer gets no word at the write, only the put-back (the guard could refuse a Write with hooks:).
  • Pending: run_command's refusal not seen in real. In the real check of 2026-11-24 the implementer never tried the command off the list (it wrote in the brief that it was not approved), so the refusal is covered by the unit, flow and e2e tests only; the user accepted phase 10 so ("Phase 10: the user's decisions", 3).
  • Pending: scripts/real/check-creation-code.ts FAILs when the model does not try the command off the list, a fact about the model, not about briefstack. Idea: ask for it more plainly, or report that verdict as NOT CONTROLLED when nothing was tried (it would then prove less). Not changed yet.

11. Open items from phase 11

What phase 11 (the build's board, cards run in parallel) leaves open. The plan is PLAN-phase-11.md; the decisions are in decisions.md, "Phase 11".

  • Not shown without a real session (the real check of 2026-11-26 showed two cards at once, one conflict redone and joined, and the checks run again on a joined commit; decisions.md, "Phase 11: accepted"), among others: two cards whose areas overlap kept apart; a second conflict leaving a card waiting; checks that fail only on the joined tree (joinChecksFailed); a usage pause or a user's pause with cards at work; a cancel of several trees; a restart with several cards; a full shared limit, and the cap of rounds reached; one slot, with its redo and the moved head checked again; more than two slots; the board's page itself (the check drives the API); macOS and Linux.
  • Tests missing (reviews of M3): the end-of-build race, a failing load with cards at work, runGit's retry on the configuration error, a failing discardForBuild, an unexpected failure of one card while others run, and joinChecksFailed reached by a redo whose own checks pass.
  • roundsRun may pass maxRounds by up to slots − 1 rounds (the cap is read when a card starts and before each fix round). Review of M3.
  • A cancel that wins through abortBuildChecks clears the round's own check results on the card's task (shown only on the task's page). Review of M2.
  • In a cancelled build the cards still queued show under Pending or Blocked, as phase 9's record keeps them queued; the board could say the build was cancelled on them. Review of step 39.
  • The focus goes to the page after a card is moved to the top or removed on the start page. Review of step 39.
  • zod's English detail of a bad area in build.planSchema, and a null slots value answered as a generic 400. Review of M1 (its third "not changed", the doubled cap of rounds, is no longer open: M3's redo uses it).
  • Vitest's default test timeout is 60 s (from 30 s) because a slow Windows runner passed 30 s on git-heavy tests (decisions.md, "Phase 11: M4 and M5", the CI of 385b947); the cost is that a test that really hangs fails later.

12. Open items from phase 12

What phase 12 (briefstack in a container on a home server, through Tailscale, with reserve providers) leaves open. The plan is PLAN-phase-12.md; the decisions are in decisions.md, "Phase 12" and "Decisiones sin Dani (fase 12)".

  • Not shown for real yet. The access check (no model) passed inside the container and through the tailnet name from another machine on 2026-11-28: refusals, the cookie, the devices, a stream ended by revoking its own device. Still to see: a build whose cards go on with a reserve provider (the second real check, waiting for a provider's key); whether Claude Code sends a [1m] model name to a provider as written or strips the suffix; a provider handling every tool call of a round; that CLAUDE_CODE_SUBPROCESS_ENV_SCRUB keeps ANTHROPIC_AUTH_TOKEN out of an approved command (the second check looks); the plan usage read with a setup-token token; auto-resume after a real restart of the container; the pages on a real phone; the sign-in lockout (the access check's --lockout was not run).
  • Two briefstack web on the same home recover each other's builds (phase 9's recover()), and now auto-resume them too. One server per home is assumed, not enforced. Step 40.
  • A card whose task an interrupted resume already discarded is not queued again by a later Resume. Step 40.
  • ANTHROPIC_DEFAULT_FABLE_MODEL is set to the provider's model in a provider's round, like the opus and sonnet aliases; Claude Code also reads it as the model it treats as a Fable model for automatic fallback on third-party providers (model-config). Whether that changes anything for a provider's model is unknown. Step 41.
  • DeepSeek's Claude Code guide was not read directly in step 41 (its host refused the connection); server.md's deepseek-flash[1m] and deepseek-flash come from web search and secondary guides that agree. Kimi's example (kimi-k3) was not checked again. Check both before the second real check.
  • A provider's key is never checked before a build uses it: none of the three documents a no-cost call under its Anthropic-compatible address, so the status check says "not checked"; a wrong key shows only when a card's round fails.
  • The second-conflict test of the scheduler (builds-scheduler.test.ts, "a second conflict leaves the card waiting") failed twice in full local runs in step 41 under load (the first card, slowed down, was redone too and no card was left waiting), and passed 20 of 20 alone. Its margins are timings (phase 11, step 39); a deterministic order of the joins would end it.
  • e2e on a loaded machine (step 41, a game running on the same PC): with Playwright's default workers, builds.spec.ts "the whole change shows… apply… revert" and tasks.spec.ts "a shell dialog, the proposal… then reverted" passed their 30 s timeout on the tree before and after that step's change alike, and passed alone and with --workers=2; the chat drawer's focus test failed once and passed 20 of 20 alone. Git steps slow down first.
  • busy counts long waits: a running build until it pauses or ends (hours), and a creation or a task round left waiting for the user's answer with no limit; a self-updating server that waits for 0 may wait long. A build between cards could be cut more cheaply than one with cards at work (it resumes by itself); busy does not tell them apart, nor work from a wait for the user. The short git steps of an apply or a revert are not counted. Step 41.
  • "Decisiones sin Dani" headings in decisions.md (phases 10 to 12) are Spanish, and name the user, in an English document. Kept as they are because other documents link to them. Review of M6.