Skip to content

docs(work-ledger): say a patrol stops only once nothing is queued - #38779

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/37192-patrol-stop-queued-clause
Nov 19, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/37192-patrol-stop-queued-clause

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Every written copy of the conductor's patrol stop rule says what the conductor's own prompts say: a patrol ends only when every item is terminal and nothing is queued, or when the user says stop.

The goal-conductor skill (#36298) and the conductor's patrol prompts (#36312) end a patrol only once every ledger item is terminal and nothing is queued. Two written copies of that rule still give the old version, "every item is terminal, or the user says stop":

  • the work-ledger guide, src/kiro_crew/docs/work-ledger.md, which agents read through the search_docs tool;
  • the crew-mode spec's summary of the Bot conductor's patrol rule, docs/system-specs/modules/crew-mode.md.

Why it matters

A queued item has no ledger row yet, so a ledger whose rows are all terminal can still have work waiting. An agent or a person that reads the guide is told the patrol may stop at that point, which is the early stop the skill change was made to prevent.

Not a goal

What changed (motivation → approach → change)

The two docs now give the same stop rule as the skill and the prompts.

Doc Stop rule it gives
src/kiro_crew/docs/work-ledger.md every item terminal (accepted, rejected or abandoned) and nothing queued (a queued item has no ledger row yet), or the user says stop
docs/system-specs/modules/crew-mode.md the Bot conductor sends its one final report when every item is terminal and nothing is queued, or the user says stop

Words only: no code, prompt or fixture changes.

Backwards compatibility

Compatible: documentation text only; nothing reads these lines as data.

Removes nothing: the paragraphs gain one clause each and keep everything they said.

Tests

No new test: test/test_work_ledger_doc.py deliberately does not pin prose, and the prompt text these docs describe is already pinned on main by test_conductor_patrol.py and the spec-byte fixtures (#36312).

Manual verification

Checked on Linux (Ubuntu 24.04), through the path agents use to read this guide, search_docs(page="work-ledger") in kiro_crew.mcp_guide:

Stop-rule paragraph returned Says "nothing is queued"
Before "every item is terminal (accepted, rejected or abandoned), or when the user says stop" no
After "every item is terminal (accepted, rejected or abandoned) and nothing is queued (a queued item has no ledger row yet), or when the user says stop" yes

search_docs(query="conductor stops patrolling") still returns work-ledger as its first hit. The branch merges into main with no conflict. In the merged tree every live copy of the stop rule carries the clause: goal-conductor SKILL.md stop condition 1, patrol_final_report, patrol_ends, PATROL_MESSAGE, and the two docs here. The only copies without it are the earlier texts kept in SHIPPED_PATROL_MESSAGES.

On the same host, the full project gate list (its backend and frontend related-test shards and the docs lint included), semgrep, test/test_work_ledger_doc.py and test/test_search_docs.py all pass.

Real-machine verification

N/A -- the diff changes two Markdown files and runs nothing.

Related Issues

Closes #37192

Checklist

  • A Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 0eee668a21188bc480747894962bcc0d2f28b99c touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 0eee668a21188bc480747894962bcc0d2f28b99c — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (2 items) — 2 justified

Intent: make the written docs give the same patrol stop rule as the conductor's prompts and skill, so no reader thinks a patrol can stop while work is still queued. FIX.

  1. Work-ledger guide (read through search_docs) now says a patrol stops only once every item is terminal and nothing is queued — justified
  2. Crew-mode spec's Bot-conductor summary now carries the same "nothing is queued" clause — justified

[FIRST-PRINCIPLES-REVIEWED] 0eee668

Description read

[DESCRIPTION-READ] 7e0ad8ce95baa942779db246746170505cf3193314aa1bcd19930c6965f2d13a

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 0eee668a21188bc480747894962bcc0d2f28b99c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Doc-only change; it brings the two written copies of the patrol stop rule in line with the shipped prompts and skill, and removes nothing.

[DESIGN-REVIEWED] 0eee668

Description read

[DESCRIPTION-READ] 9707a8fe23347f12a8079fd8fd9382bac86b9c6a7417e8893bb0292b512d42da

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 0eee668a21188bc480747894962bcc0d2f28b99c — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 0eee668

Verdict parsed from the review's SHA-scoped output markers for commit 0eee668a21188bc480747894962bcc0d2f28b99c.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 0eee668a21188bc480747894962bcc0d2f28b99c false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 0eee668a21188bc480747894962bcc0d2f28b99c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 0eee668

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 0eee668a21188bc480747894962bcc0d2f28b99c false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 18, 2026
The goal-conductor skill and the conductor's patrol prompts end a patrol
only when every ledger item is terminal and nothing is queued: a queued
item has no ledger row yet, so an all-terminal ledger alone can still
leave work undispatched. The work-ledger guide and the crew-mode spec's
summary of the Bot conductor's patrol rule still gave the old two-part
stop, so a reader of either was told the patrol may end with work
queued. Both now carry the same clause.

Closes #37192
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in both files this PR edits (the Crew Mode spec and src/kiro_crew/docs/work-ledger.md) since this head went green (d155058 -> dc531c1); CI re-running.

The one red on the previous head, Backend Tests (Windows) (4), was the flaky test_prune_lock_blocks_concurrent_false_to_true_promotion (#38865); its fix, #38884, is in the new base. The diff itself is unchanged.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/37192-patrol-stop-queued-clause branch from 68965f6 to 0eee668 Compare November 19, 2026 15:59
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 19, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 3% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier 2: design-doc-gate: A.

This PR changes wording only. It adds "and nothing is queued" to the conductor's patrol stop rule in the work-ledger guide and in the crew-mode spec. The new wording matches what main already ships: goal-conductor SKILL.md:722, the patrol_final_report prompt in spec_prompts.py:191, the PATROL_MESSAGE test at test_conductor_patrol.py:780 and the ledger golden fixture. Three other Markdown matches for "every item is terminal" are not the patrol stop rule: the cleanup sweep in session-work-ledger.md, the CLI --until-done flag in cli.md, and a historical RFC audit table. Nothing reads these lines as data, no test pins this prose, and every CI check passed.

Tier: 2, held for a person: design-doc-gate: A.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 0eee668a21 · 6 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed head 0eee668. The change is two documentation clauses: the work-ledger guide and the crew-mode spec now say a conductor's patrol stops only when every item is terminal and nothing is queued, or when the user says stop. I checked this against the conductor's final-report prompt and the goal-conductor skill's stop condition on this head, and all three now say the same thing. No code, prompt or test fixture changes, so nothing here can change runtime behaviour, and I found nothing that blocks merging.

@KiroCrewCaptain
KiroCrewCaptain merged commit eed7e41 into main Nov 19, 2026
99 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/37192-patrol-stop-queued-clause branch November 19, 2026 17:19
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 19, 2026
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.

Sync the 'and nothing is queued' patrol stop clause into patrol_ends, tick texts and work-ledger.md

2 participants