Skip to content

Generalize the mobile agent workflow into a repo-wide kilo workflow - #4812

Merged
iscekic merged 20 commits into
mainfrom
kilo-workflow
Jul 28, 2026
Merged

Generalize the mobile agent workflow into a repo-wide kilo workflow#4812
iscekic merged 20 commits into
mainfrom
kilo-workflow

Conversation

@iscekic

@iscekic iscekic commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the mobile-only agent workflow with a surface-agnostic, adversarially hardened one:

  • .kilo_workflow/WORKFLOW.md — the workflow: starter → planner(s) → orchestrator → implementer/impl-reviewer loops → E2E verification → PR. A starter grills requirements (hands-on/hands-off) and splits work into disjoint sections; one planner/worktree/orchestrator/PR per section. Agent parallelism is uncapped; only E2E device/stack phases contend for slots. The PR is the deliverable — on COMPLETE everything closes and the deleted scratch dir is itself the completion sentinel; BLOCKED retains scratch + a final report as evidence.
  • .kilo/agent/ — seven definitions: starter, planner, orchestrator (permissions pinned so unattended runs don't depend on machine-local global config; orchestrator pins kimi-k3) and the four worker roles (plan-reviewer, implementer, impl-reviewer, e2e-verifier), each with machine-checkable final-line sentinels so a crashed round can never read as a pass.
  • .kilo_workflow/dispatch-role.sh — checked-in dispatcher encoding the fragile parts (tmux wrapping, dedicated sessions for device roles, full KILO_*/OPENCODE* env strip, quoting, log naming, EXITCODE marker).
  • .kilo_workflow/e2e-slot.sh — slot semaphore, hardcoded contract, mid-acquire grace window in reap.
  • .kilo_workflow/learnings/ — 23 committed symptom/cause/fix entries: migrated from WORKFLOW_LEARNINGS.md, private harness memory, and kilo CLI's own memory (deduped, bucketed); learnings/system/ is gitignored for machine-local entries and copied into fresh worktrees by worktree-prepare.sh.
  • Removes apps/mobile/.kilo (superseded) and repoints mobile docs; simplifies the simulator claim to a worktree-owned lock file (mobile-simulator.ts 1093 → ~450 lines, tests 2921 → ~530) — the preparing/ready protocol, PID-identity liveness, recovery resets, and --phase machinery predated the global slot semaphore.

Why

The mobile workflow proved the planner/orchestrator/role-agent loop but was locked to apps/mobile, and its device-ownership machinery predated the slot semaphore. The goal for the generalized version: even a weak model can follow it mechanically, mistakes land in learnings or doc fixes instead of repeating, and nothing fails silently.

How it was hardened

Ten fresh-context adversarial reviews across two loops — kimi-k3 (×2), grok-4.5 (×3, incl. convergence), kilo-auto/efficient (×2), gpt-5.6-sol via codex, two role-play walkthroughs by a deliberately weak model, plus a deep verification agent — with every finding triaged as untrusted and bloat-adding suggestions rejected. Live probes validated the mechanics end to end: a real plan-reviewer dispatch (which experimentally disproved a mock plan's assumptions), an implementer boundary probe (fixed, checked, reported, did not commit), and a comprehension exam the actual orchestrator model (kimi-k3) passed 8/8. Notable structural fixes that came out of it: slot ownership moved to per-dispatch tmux sessions (window-named owners silently defeated the cap), terminal-state semantics that distinguish crash from completion, sentinel-gated void-round detection for every role, round caps that interlock with the escalation ladder (ceilings, not budgets), and a claim-leak fix in the simulator wrapper found by Kilobot on this PR (a failed boot whose recovery shutdown also failed left a running device adoptable).

Checks: typecheck, lint green; simulator tests 27/27; test:mobile-workflow 124/125 (the settle-app Open-guard failure is pre-existing on main).

iscekic added 2 commits July 28, 2026 02:54
Four repo-wide role agents (plan-reviewer, implementer, impl-reviewer,
e2e-verifier) generalized from apps/mobile/.kilo/agent/, discoverable
from any cwd via the root .kilo/ config dir. The e2e-verifier moves to
kimi-k3 with no step ceiling and bakes in output discipline and the
learnings contract.
Generalizes apps/mobile/.kilo/MOBILE_WORKFLOW.md into a surface-agnostic
workflow (starter -> planners -> orchestrator -> role-agent loops -> PR),
copies the e2e slot semaphore (same machine-global state dir), and seeds
learnings/ from WORKFLOW_LEARNINGS.md as one indexable file per entry;
learnings/system/ is gitignored for machine-local entries. The mobile
.kilo and e2e/ are left untouched pending the follow-up simplification.
@iscekic iscekic self-assigned this Jul 28, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers the single commit added since the last review (74d86e5e7ef090b897): a new .kilo_workflow/README.md human-orientation doc summarizing the workflow, run instructions, and directory contents; no code changes, and all relative links (WORKFLOW.md, dispatch-role.sh, e2e-slot.sh, learnings/) resolve to existing files in the PR. The two previously flagged findings (dev/local/mobile-simulator.ts claim-leak, .kilo_workflow/e2e-slot.sh BSD-only stat) are unchanged in this range and remain marked fixed by the author.

Files Reviewed (1 file)
  • .kilo_workflow/README.md - no issues
Previous Review Summaries (15 snapshots, latest commit 74d86e5)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 74d86e5)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers the commits since the last review (cfea8507d474d86e5e7): a test-fixture refactor in apps/extension/tests/e2e/ that centralizes safeToolNames/dangerousToolNames exports in kilo-api-fixture.ts, flips the default toolNames from dangerous to safe, and adds explicit toolNames: dangerousToolNames to each test that actually exercises the eval tool or dangerous mode — no logic, security, or runtime issues found. The two previously flagged findings (dev/local/mobile-simulator.ts claim-leak, .kilo_workflow/e2e-slot.sh BSD-only stat) are unchanged in this range and remain marked fixed by the author.

Files Reviewed (14 files)
  • apps/extension/tests/e2e/auto-continue.test.ts - no issues
  • apps/extension/tests/e2e/collapsible-code-blocks.test.ts - no issues
  • apps/extension/tests/e2e/context-usage.test.ts - no issues
  • apps/extension/tests/e2e/conversation-rendering.test.ts - no issues
  • apps/extension/tests/e2e/conversation-scroll.test.ts - no issues
  • apps/extension/tests/e2e/conversation-spacing.test.ts - no issues
  • apps/extension/tests/e2e/conversation-tabs.test.ts - no issues
  • apps/extension/tests/e2e/design-tokens.test.ts - no issues
  • apps/extension/tests/e2e/kilo-api-fixture.ts - no issues
  • apps/extension/tests/e2e/memories.test.ts - no issues
  • apps/extension/tests/e2e/organization-picker.test.ts - no issues
  • apps/extension/tests/e2e/run-abort.test.ts - no issues
  • apps/extension/tests/e2e/safe-mode.test.ts - no issues
  • apps/extension/tests/e2e/sidebar.test.ts - no issues

Previous review (commit cfea850)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers the commits since the last review (8c4292b53ccfea8507d4): four new .kilo_workflow/learnings/ entries, a WORKFLOW.md wording addition about committing learnings promptly, an Expo SDK/React Native version bump in apps/mobile/AGENTS.md, and a cross-reference addition in apps/mobile/e2e/AGENTS.md — all doc-only content with no logic, security, or runtime issues introduced. The two previously flagged findings (dev/local/mobile-simulator.ts claim-leak, .kilo_workflow/e2e-slot.sh BSD-only stat) are unchanged in this range and remain marked fixed by the author.

Files Reviewed (6 files)
  • .kilo_workflow/WORKFLOW.md - wording addition, no issues
  • .kilo_workflow/learnings/extension-analytics-e2e-needs-posthog-key-at-build.md - new file, no issues
  • .kilo_workflow/learnings/extension-firefox-e2e-newsession-under-load.md - new file, no issues
  • .kilo_workflow/learnings/mobile-cloud-agent-create-needs-github-integration.md - new file, no issues
  • .kilo_workflow/learnings/worktree-port-offset-airplay-collision.md - new file, no issues
  • apps/mobile/AGENTS.md - version bump, no issues
  • apps/mobile/e2e/AGENTS.md - cross-reference addition, no issues

Previous review (commit 8c4292b)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the single commit since the last review — wording tightening in .kilo_workflow/WORKFLOW.md (planner handoff now requires an approving Kilobot summary in addition to green CI, the two-retrigger Kilobot-waiver message wording, and dropping the deterministic-local-cloud-agent-turns exception from the real-LLM-responses rule) — all doc-only clarifications with no logic, security, or runtime issues introduced.

Files Reviewed (1 file)
  • .kilo_workflow/WORKFLOW.md - wording clarifications, no issues

Previous review (commit 09048c2)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the single commit since the last review — removal of the stale kilo-paid-model-auth-wedge.md learning doc with its cross-reference cleanly removed from .kilo_workflow/WORKFLOW.md. No dangling references to the removed file remain, and no new issues were introduced.

Files Reviewed (2 files)
  • .kilo_workflow/WORKFLOW.md - reference cleanup, no issues
  • .kilo_workflow/learnings/kilo-paid-model-auth-wedge.md (removed)

Previous review (commit 2e8da78)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the single commit since the last review — removal of the stale kilo-paid-model-auth-wedge.md learning doc with its cross-reference cleanly removed from .kilo_workflow/WORKFLOW.md. No dangling references to the removed file remain, and no new issues were introduced.

Files Reviewed (2 files)
  • .kilo_workflow/WORKFLOW.md - reference cleanup, no issues
  • .kilo_workflow/learnings/kilo-paid-model-auth-wedge.md (removed)

Previous review (commit 2f782e9)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the commits since the last review — removal of two stale learnings docs (kilobot-no-findings-state.md, mobile-cloud-agent-deterministic-turns-fake-llm.md) with their cross-references cleanly removed from .kilo_workflow/WORKFLOW.md — no dangling references remain and no new issues were introduced. Both previously flagged WARNINGs (dev/local/mobile-simulator.ts claim-leak, .kilo_workflow/e2e-slot.sh BSD-only stat -f %m) remain fixed and unaffected by this diff.

Files Reviewed (3 files)
  • .kilo_workflow/WORKFLOW.md - reference cleanup, no issues
  • .kilo_workflow/learnings/kilobot-no-findings-state.md (removed)
  • .kilo_workflow/learnings/mobile-cloud-agent-deterministic-turns-fake-llm.md (removed)

Previous review (commit fe8d519)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the single commit since the last review — wording clarifications in .kilo/agent/e2e-verifier.md (extension runbook reference, repro-mode sentinel casing) and .kilo_workflow/WORKFLOW.md (multi-repo PR existence check on scratch-gone, reviewer snapshot ordering note, Kilobot-waiver exit condition) — all consistent with the rest of the document, no new issues introduced.

Files Reviewed (2 files)
  • .kilo/agent/e2e-verifier.md - no issues
  • .kilo_workflow/WORKFLOW.md - no issues

Previous review (commit f9dc9b5)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the single commit since the last review — moving the KILO_/OPENCODE env-strip computation in .kilo_workflow/dispatch-role.sh from the dispatcher process into the tmux pane's shell (via a deferred command substitution) so it reflects the pane's actual inherited environment rather than the dispatcher's — and the quoting is correct with no new issues introduced.

Files Reviewed (1 file)
  • .kilo_workflow/dispatch-role.sh - env-strip now computed inside the tmux pane, quoting verified correct, no issues

Previous review (commit 36d23c5)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the single commit since the last review — a documentation-only correction of the Kilobot retrigger mention handle from @kilo-code-bot to @kilocode-bot in WORKFLOW.md — and it is consistent with the product-advertised handle used elsewhere in the codebase; no new issues were introduced.

Files Reviewed (1 file)
  • .kilo_workflow/WORKFLOW.md - doc-only mention handle fix, no issues

Previous review (commit dc5934d)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the commits since the last review; the previous WARNING on .kilo_workflow/e2e-slot.sh (stat -f %m is BSD-only, so Linux reaping never triggered) is fixed here with a stat -c %Y fallback, and no new issues were introduced by the accompanying dispatch-role.sh pipefail fix and WORKFLOW.md clarifications.

Files Reviewed (3 files)
  • .kilo_workflow/WORKFLOW.md
  • .kilo_workflow/dispatch-role.sh
  • .kilo_workflow/e2e-slot.sh - previous WARNING fixed

Previous review (commit 9eb5c5e)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

This incremental review covers only the commits since the last review; the previous WARNING on dev/local/mobile-simulator.ts (claim removed even when the failed device may still be running) is fixed in this range — bootSimulator now flags deviceMayBeRunning and claimSimulator keeps the claim in that case, with two new tests covering it — and one new issue was found in the newly added .kilo_workflow/e2e-slot.sh orphan-reaping logic.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.kilo_workflow/e2e-slot.sh 38 stat -f %m is BSD/macOS-only syntax; on Linux it always falls back to $now, so the new ownerless-slot age check never reaps orphaned slot dirs there
Files Reviewed (14 files)
  • .kilo/agent/e2e-verifier.md
  • .kilo/agent/impl-reviewer.md
  • .kilo/agent/implementer.md
  • .kilo/agent/orchestrator.md (new)
  • .kilo/agent/plan-reviewer.md
  • .kilo/agent/planner.md (new)
  • .kilo/agent/starter.md (new)
  • .kilo_workflow/WORKFLOW.md
  • .kilo_workflow/dispatch-role.sh (new) - 0 issues
  • .kilo_workflow/e2e-slot.sh - 1 issue
  • .kilo_workflow/learnings/dispatching-kilo-agents-from-another-harness.md
  • .kilo_workflow/learnings/github-pr-review-threads-api.md (new)
  • dev/local/mobile-simulator.test.ts - fixes/covers previous finding
  • dev/local/mobile-simulator.ts - fixes previous finding

Fix these issues in Kilo Cloud

Previous review (commit 5ef238d)

Status: No Issues Found | Recommendation: Merge

Executive Summary

This incremental review covers only the commits since the last review; all changed files are workflow/agent documentation (.kilo/agent/*.md, .kilo_workflow/WORKFLOW.md, .kilo_workflow/learnings/*.md, apps/mobile/e2e/AGENTS.md) with no application code, and no new issues were found. A prior WARNING on dev/local/mobile-simulator.ts:307 remains posted as an active inline thread; that file was not touched in this incremental diff so it was not re-reviewed here.

Files Reviewed (19 files)
  • .kilo/agent/e2e-verifier.md
  • .kilo/agent/impl-reviewer.md
  • .kilo/agent/implementer.md
  • .kilo/agent/plan-reviewer.md
  • .kilo_workflow/WORKFLOW.md
  • .kilo_workflow/learnings/dispatching-kilo-agents-from-another-harness.md
  • .kilo_workflow/learnings/kilo-edit-tool-blocks-kilo-config-paths.md
  • .kilo_workflow/learnings/kilo-interactive-orchestrator-wedges-relaunch.md
  • .kilo_workflow/learnings/kilo-paid-model-auth-wedge.md
  • .kilo_workflow/learnings/kilo-run-exits-0-without-verdict.md
  • .kilo_workflow/learnings/kilo-run-session-not-found-or-db-race.md
  • .kilo_workflow/learnings/kilo-run-shell-substitution-executes-backticks.md
  • .kilo_workflow/learnings/kilobot-no-findings-state.md
  • .kilo_workflow/learnings/mobile-cloud-agent-deterministic-turns-fake-llm.md
  • .kilo_workflow/learnings/mobile-e2e-nextjs-suspend-protocol.md
  • .kilo_workflow/learnings/mobile-ios-simulator-e2e-limitations.md
  • .kilo_workflow/learnings/nested-kilo-run-env-poisoning.md
  • .kilo_workflow/learnings/steering-a-running-kilo-session.md
  • apps/mobile/e2e/AGENTS.md

Previous review (commit 9212f6a)

Status: 1 Issue Found | Recommendation: Address before merge

Executive Summary

The simulator-claim simplification in dev/local/mobile-simulator.ts drops the claim's protection for the case where a failed boot's follow-up shutdown also fails, letting a peer worktree reclaim a device that may still be running.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
dev/local/mobile-simulator.ts 307 Claim is unconditionally removed on prepare/rename failure, even when the boot-failure follow-up shutdown also failed, contradicting the code's own comment that the claim stays in place in that case
Files Reviewed (5 files)
  • apps/mobile/e2e/AGENTS.md
  • dev/local/mobile-ios-build.ts
  • dev/local/mobile-ios-build.test.ts
  • dev/local/mobile-simulator.ts - 1 issue
  • dev/local/mobile-simulator.test.ts

Fix these issues in Kilo Cloud

Previous review (commit 4fcc7da)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the latest commits: workflow doc wording tweaks (uncapped agent parallelism, E2E-slot cap clarification, worktree-prepare learnings note), path updates in apps/mobile/AGENTS.md/apps/mobile/e2e/AGENTS.md pointing at the new .kilo_workflow location, a new machine-local learnings copy block in scripts/worktree-prepare.sh, and removal of the superseded apps/mobile/.kilo/* files; no bugs, security issues, or logic errors found in the changed lines.

Files Reviewed (11 files)
  • .kilo_workflow/WORKFLOW.md
  • apps/mobile/AGENTS.md
  • apps/mobile/e2e/AGENTS.md
  • scripts/worktree-prepare.sh
  • apps/mobile/.kilo/MOBILE_WORKFLOW.md (removed)
  • apps/mobile/.kilo/WORKFLOW_LEARNINGS.md (removed)
  • apps/mobile/.kilo/agent/mobile-e2e-verifier.md (removed)
  • apps/mobile/.kilo/agent/mobile-implementer.md (removed)
  • apps/mobile/.kilo/agent/mobile-plan-reviewer.md (removed)
  • apps/mobile/.kilo/agent/mobile-reviewer.md (removed)
  • apps/mobile/.kilo/e2e-slot.sh (removed)

Previous review (commit 47d0fb6)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the new repo-wide kilo workflow docs, four role-agent configs, and the e2e-slot.sh semaphore script; no bugs, security issues, or logic errors were found in the changed lines.

Files Reviewed (18 files)
  • .kilo/agent/e2e-verifier.md
  • .kilo/agent/impl-reviewer.md
  • .kilo/agent/implementer.md
  • .kilo/agent/plan-reviewer.md
  • .kilo_workflow/WORKFLOW.md
  • .kilo_workflow/e2e-slot.sh
  • .kilo_workflow/learnings/dispatching-kilo-agents-from-another-harness.md
  • .kilo_workflow/learnings/handoff-env-facts-must-be-inline.md
  • .kilo_workflow/learnings/kilo-agent-dies-on-large-session-payload.md
  • .kilo_workflow/learnings/kilo-run-exits-0-without-verdict.md
  • .kilo_workflow/learnings/kilo-run-interactive-requires-tty.md
  • .kilo_workflow/learnings/kilobot-no-findings-state.md
  • .kilo_workflow/learnings/mobile-cloud-agent-deterministic-turns-fake-llm.md
  • .kilo_workflow/learnings/mobile-github-stub-git-token-service-503.md
  • .kilo_workflow/learnings/mobile-github-stub-missing-files-endpoint.md
  • .kilo_workflow/learnings/mobile-ios-open-in-kilo-prompt-blocks-launch.md
  • .kilo_workflow/learnings/mobile-maestro-ios-driver-timeout-stale-xcodebuild.md
  • .kilo_workflow/learnings/system/.gitignore

Reviewed by claude-sonnet-5 · Input: 30 · Output: 4.7K · Cached: 686.8K

Review guidance: REVIEW.md from base branch main

iscekic added 2 commits July 28, 2026 03:03
Removes apps/mobile/.kilo (workflow doc, learnings, role agents, slot
script) now superseded by .kilo_workflow and root .kilo/agent; repoints
apps/mobile docs at the new paths. Worktree prep now copies the
machine-local learnings/system/ folder into fresh worktrees, and the
workflow doc states that agent parallelism is uncapped - only E2E
device/stack phases contend for slots.
The claim protocol predated the machine-global e2e slot semaphore and
duplicated its job with a preparing/ready state machine, PID-identity
liveness, recovery resets, and phase-aware relabeling. With device
phases capped by e2e-slot.sh, a claim only needs to answer which
worktree owns which simulator: an atomic JSON lock file, stale once its
worktree is deleted, labeled 'Kilo E2E - <worktree>' on claim and
restored on release. Boot verification (bootstatus terminal-failure
detection) is kept. The --phase flag is gone along with the prewarm
concept the workflow no longer has; the build-cache claim validation
now checks ownership only. dev/local/mobile-simulator.ts drops from
1093 to ~430 lines and its test file from 2921 to ~470.

The one failing mobile-workflow test (settle-app Open guard) is
pre-existing on main.
Comment thread dev/local/mobile-simulator.ts Outdated
iscekic added 2 commits July 28, 2026 03:46
Desk review, five fresh-context probes (kimi-k3, grok-4.5, opus, two
haiku role-plays, kilo-auto/efficient), and kilo CLI's own memory
surfaced gaps; the valid ones are fixed:

- Slot ownership: device-phase dispatches get their own tmux session
  (slots are owned and reaped by session name; window-named owners leak
  or share slots); verifier tears down services before releasing.
- Terminal states: the PR is the deliverable and everything else
  closes. COMPLETE deletes the scratch dir (its absence is the
  completion sentinel); BLOCKED leaves scratch + final-report.md as
  evidence. Monitors distinguish crash from completion by scratch state.
- Void rounds: every role definition now requires a fixed sentinel
  line; a log without one is a crashed round, never a pass.
- Dispatches: handoffs travel via --file only (shell substitution
  through a tmux command string executes backticks in the file);
  env strip covers all KILO_*/OPENCODE* vars; --model dropped for role
  agents (definitions pin models); concrete launch snippets with
  shell-expanded scratch paths; starter monitors planners.
- Loops: hard round caps with recorded-resolution escapes; the
  plan-review deadlock-breaker has an else branch; Kilobot wait has
  retriggers, a waiver, and concrete gh checks (retriggers observed
  dead on #4776 per kilo memory - green check on head is the review).
- Verifier learnings go to scratch (byte-identical baseline restore)
  or the main checkout's learnings/system/; the orchestrator commits
  them. .kilo_workflow/ is exempt from section disjointness.
- Six learnings added from kilo CLI memory and private harness memory
  (backtick execution, startup db race, paid-model auth, steering,
  orchestrator relaunch, simulator E2E limits, nextjs suspend
  protocol); stale entries updated (no --model, full env strip,
  sentinel-based void detection, dead retriggers); e2e runbook fixes
  (persistent remote relay, multi-sim UDID targeting).
…im leak

Second hardening pass from five more fresh-context reviews (grok-4.5,
kimi-k3, kilo-auto/efficient, gpt-5.6-sol via codex, plus a deep
verification agent) run against the updated doc, looping until rounds
stopped producing valid findings:

- .kilo_workflow/dispatch-role.sh: checked-in dispatcher encoding the
  whole contract (tmux wrapping, dedicated session for device roles,
  full env strip, quoting, log naming, EXITCODE marker) so no agent
  hand-assembles it; the doc's dispatch section shrinks to its usage.
- starter/planner/orchestrator agent definitions in .kilo/agent/ pin
  permissions (and the orchestrator's model), so unattended runs no
  longer depend on this machine's global kilo config.
- Reviewer sentinels are machine-checkable (FINDINGS: n / No findings.
  / STOPPED EARLY. as the last line); the verifier sentinel now follows
  a truth table; void rounds count toward caps and three consecutive
  voids are an infrastructure blocker; caps are ceilings with only
  takeover/BLOCKED left at the cap.
- Slice review diffs include new files (git add -N); cumulative review
  base is origin/main...HEAD and runs after a defined synchronization
  point (deferred project-wide checks); commits stage owned paths only.
- BLOCKED evidence is retained (monitor no longer cleans it); a
  scratch-gone state without a PR is a crash, not COMPLETE; planners
  write BLOCKED reports too; monitor relaunches cap at three.
- E2E loop: quiescence rule before dispatch, leftover cleanup after a
  dead verifier, E2E-Kilobot alternation cap; slot script reap has a
  grace window for mid-acquire slots and hardcodes its contract.
- Kilobot thread state via GraphQL (new learning with exact queries);
  clean state is zero unresolved threads; PRs use the repo template
  with what/why/how inside it.
- mobile-simulator: a failed boot whose recovery shutdown also fails
  now keeps the claim (flagged error) so a peer cannot adopt a
  possibly-running device - found by Kilobot on this PR; test added.
- Learnings: GitHub threads API added; env-strip and dispatch entries
  updated; system-learnings carve-out for the main checkout.
Comment thread .kilo_workflow/e2e-slot.sh Outdated
iscekic added 10 commits July 28, 2026 04:27
…osition, round definition

grok convergence review on the hardened doc found four real defects, all
introduced by the prior batch: the env-strip grep aborts dispatch-role.sh
under pipefail when no KILO_*/OPENCODE* vars exist (a non-kilo dispatcher
- now || true, with the same guard in the launch templates); the sentinel
is the line above the EXITCODE marker, so void detection reads
tail -2 | head -1 instead of the last line or a whole-log grep; the repro
gate's blocker phrase now matches the verifier's exact CANNOT REPRODUCE.
sentinel; and one round is defined as one full loop-body iteration so
caps are unambiguous.
Kilobot: stat -f %m is BSD/macOS-only; on GNU/Linux it switches to
filesystem mode, the fallback made age always 0, and the ownerless-slot
grace reap silently never fired. Try stat -f %m then stat -c %Y.
Panel review: STRIP was evaluated from the dispatcher's environment and
baked into the command, but tmux panes inherit the tmux SERVER env, so
server-carried KILO_*/OPENCODE* strays missing from the dispatcher's env
leaked into role agents - the exact poisoning path the strip exists to
close (and the header's 'full strip' claim was false). The strip is now
an escaped substitution that evaluates in the pane. Smoke-tested via a
stub kilo binary with a poisoned tmux global env: zero leaked vars.
…check, grok consistency nits

Final convergence panel (kimi-k3, kilo-auto/efficient, gpt-5.6-sol,
grok-4.5, plus a deep verification agent) on the finished spec: kimi and
efficient returned clean; the rest produced five one-line fixes, all
absorbed - the Kilobot waiver is now an explicit loop exit alternative;
the completion monitor checks the section branch's PR in every touched
repository instead of bare gh pr view; the pre-round reviewer snapshot
is ordered after the add -N diff generation; and the verifier definition
uses the exact CANNOT REPRODUCE. sentinel and lists the extension
runbook.
Drop the now-undocumented deterministic-turns mocking exception, align
the planner's gate shorthand and the retrigger waiver message with the
approving-summary contract.

@jeanduplessis jeanduplessis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the thinking with having .kilo_workflow as a top-level root directory? Why not put it in the existing .kilo/ directory?

@jeanduplessis jeanduplessis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before landing these changes, could we add instructions/context on how they interact, get triggered, etc. to something like DEVELOPMENT.md or another relevant documentation file?

These changes feel like the primitives of something bigger that isn't clear yet as part of this PR.

@iscekic

iscekic commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

What is the thinking with having .kilo_workflow as a top-level root directory? Why not put it in the existing .kilo/ directory?

The flow is meant to be self-improving, with the agent delivering learnings and workflow improvements as part of the PR it delivers. Kilo CLI can't edit anything in the .kilo folder without triggering a permission prompt, even when given explicit access. Moving everything to a different folder circumvents this.

iscekic added 3 commits July 28, 2026 11:31
Resolves the modify/delete conflict on apps/mobile/.kilo/WORKFLOW_LEARNINGS.md
in favor of the delete. Learnings main added since the branch point that the
generalized layout does not already cover are ported as individual files:
uncommitted learning edits reverted by role agents, mobile cloud-agent create
needs a GitHub integration, extension analytics posthog key at build time,
Firefox geckodriver newSession under load, and the AirPlay port-offset
collision. Entries already covered by .kilo_workflow/learnings/ or WORKFLOW.md
(TTY, interactive wedge, nested env, --file handoffs, kilobot handle,
extension scope) are dropped, along with the safe-mode fixture note (to be
fixed in the fixture), the worklets bundle-mode note, and the R2 credential
outage (resolved at the infra level).
The uncommitted-learnings trap described the retired mobile roles'
revert-anything-dirty behavior; the generalized verifier restores only its
own edits and WORKFLOW.md already forbids dispatch over uncommitted changes.
Fold the durable rule (commit learnings promptly; planner-authored learnings
are named in the handoff for the first commit) into the Learnings section
and drop the learning file. Cross-link the port-offset learning and the e2e
runbook's no-export rule so the per-command prefix does not read as a
contradiction.
mockKiloApi asserted dangerousToolNames by default while fresh conversations
default to safe mode, so every safe-mode spec had to pass toolNames
explicitly and carried its own copy of the safe list. Export safeToolNames
and dangerousToolNames from the fixture, default the assertion to safe mode,
drop the seven spec-local copies, and pass dangerousToolNames explicitly in
the nine specs that switch the conversation to dangerous mode. Full chrome
e2e suite: 95 passed, 0 failed.
@iscekic
iscekic enabled auto-merge (squash) July 28, 2026 10:53
@iscekic
iscekic disabled auto-merge July 28, 2026 11:01
Reviewer-requested orientation doc: how to launch a run, the two terminal
states, the pipeline and roles at a glance, the wall-time-for-correctness
trade the workflow makes, and what each file in the directory is for.
@iscekic
iscekic enabled auto-merge (squash) July 28, 2026 11:11
@iscekic
iscekic merged commit 6d4060f into main Jul 28, 2026
24 checks passed
@iscekic
iscekic deleted the kilo-workflow branch July 28, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants