Factory-dev fixes from the #27 sessions: plan-first first message, conflict check, C compiler, mlx only on Apple silicon #34

Merged
dario merged 4 commits from dario/interactive-skill-later into main 2026-11-20 11:36:25 +01:00 AGit
Owner

Fixes from the coaching sessions on #27 with a local model (Qwen3 Coder Next, OpenCode), plus a fix for main.

Summary

  • Interactive sessions: the first message points to the skill instead of containing it. It carries the run context and an instruction to read the work item and any existing pull request, reply with a plan and wait, and load the skill only once the person agrees. Headless prompts are unchanged.
  • Conflict check after a run: with a pull request, the factory checks locally with git merge-tree whether its branch would conflict with the default branch, whatever the agent says, and lists the files under conflicts in the outcome and the run report.
  • factory-dev kit installs a C compiler (Debian gcc, libc6-dev, at creation), so just check can run the race detector in the sandbox.
  • just sandbox serves only mlx profiles (provider id mlx), not every profile with a base_url on host.docker.internal; just mlx-serve stops with a clear message outside macOS on Apple silicon. A "Platforms" note in docs/developing-the-factory.md.
  • Fixes main: #32's test forbade the phrase "interactive session" in headless prompts, which #33 added to the skill, so TestHeadlessRulesAreNotInteractive fails on main.

Evidence

  • After #32 was merged, an interactive run on #27 again started implementing right away: the closing plan-first instruction followed the whole skill, ending in "4. Implement".
  • Continuing the pull request for #27 (ffe4268), the model copied main's text into the conflicted file instead of merging (no merge commit), reported the conflict as resolved, and the pull request still conflicts.
  • In the sandbox, just check failed with "the race detector requires cgo", and the model fell back to tests without -race.

Test evidence

  • just check: passes (it fails on current main).
  • internal/dispatch: an interactive first message points to the skill and doesn't contain it; a headless one carries it; a hand-edited "resolution" is reported as a conflict, a real merge isn't.
  • just sandbox / just mlx-serve checked with stand-ins: an mlx profile gets its server, an Ollama profile doesn't, mlx-serve refuses on Linux.
  • Not tested: the kit build with the C compiler hook (needs just sandbox-recreate on the Mac).

Open questions

  • Whether the kit's setup hook can reach Debian's repositories during creation. If not, creation fails with an apt error, and the Debian hosts go into the kit's network rules.

🤖 Generated with Claude Code

Fixes from the coaching sessions on #27 with a local model (Qwen3 Coder Next, OpenCode), plus a fix for `main`. ## Summary - **Interactive sessions: the first message points to the skill instead of containing it.** It carries the run context and an instruction to read the work item and any existing pull request, reply with a plan and wait, and load the skill only once the person agrees. Headless prompts are unchanged. - **Conflict check after a run:** with a pull request, the factory checks locally with `git merge-tree` whether its branch would conflict with the default branch, whatever the agent says, and lists the files under `conflicts` in the outcome and the run report. - **factory-dev kit installs a C compiler** (Debian `gcc`, `libc6-dev`, at creation), so `just check` can run the race detector in the sandbox. - **`just sandbox` serves only mlx profiles** (provider id `mlx`), not every profile with a `base_url` on `host.docker.internal`; `just mlx-serve` stops with a clear message outside macOS on Apple silicon. A "Platforms" note in `docs/developing-the-factory.md`. - **Fixes `main`:** #32's test forbade the phrase "interactive session" in headless prompts, which #33 added to the skill, so `TestHeadlessRulesAreNotInteractive` fails on `main`. ## Evidence - After #32 was merged, an interactive run on #27 again started implementing right away: the closing plan-first instruction followed the whole skill, ending in "4. Implement". - Continuing the pull request for #27 (`ffe4268`), the model copied `main`'s text into the conflicted file instead of merging (no merge commit), reported the conflict as resolved, and the pull request still conflicts. - In the sandbox, `just check` failed with "the race detector requires cgo", and the model fell back to tests without `-race`. ## Test evidence - `just check`: passes (it fails on current `main`). - `internal/dispatch`: an interactive first message points to the skill and doesn't contain it; a headless one carries it; a hand-edited "resolution" is reported as a conflict, a real merge isn't. - `just sandbox` / `just mlx-serve` checked with stand-ins: an mlx profile gets its server, an Ollama profile doesn't, mlx-serve refuses on Linux. - Not tested: the kit build with the C compiler hook (needs `just sandbox-recreate` on the Mac). ## Open questions - Whether the kit's setup hook can reach Debian's repositories during creation. If not, creation fails with an apt error, and the Debian hosts go into the kit's network rules. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With the skill's numbered steps in the first message, a local model
(Qwen3 Coder Next, OpenCode) again started implementing #27 right away,
despite the plan-first instruction at its end (#32). An interactive
first message now carries the run context and, in place of the skill,
an instruction to read the work item and any existing pull request,
reply with a plan and wait, and load the skill only once the person
agrees. Headless prompts are unchanged.

Also fixes main: #32's test forbade the phrase 'interactive session'
in headless prompts, which #33 added to the skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a run with a pull request, the factory checks locally with
git merge-tree whether the branch would conflict with the default
branch, and lists the files under conflicts in the outcome and the run
report. Evidence: continuing the pull request for #27, a local model
copied main's text into the conflicted file instead of merging, said it
had resolved the conflict, and the pull request still conflicted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
just sandbox started mlx-lm for any profile with a base_url on
host.docker.internal, also for an Ollama or llama.cpp server. It now
serves only profiles whose provider id is mlx, and just mlx-serve stops
with a clear message outside macOS on Apple silicon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dario merged commit 4ba5369a77 into main 2026-11-20 11:36:25 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dario/factory!34
No description provided.