Repository navigation
refactor(work-ledger): drop the advisory goal item cap and its notice - #33601
Conversation
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
26d1f83 to
11d6240
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The removed field had no readers left outside the patch, and the accepted RFC (#33584) covers the decision. Notes
[DESIGN-REVIEWED] 83136dc Description read[DESCRIPTION-READ] 8b395a13d117f8f4cf10c79cb2be6f89239fbac0e8fffc8bf8ba82f9ee0fb52c 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Each removal follows the accepted RFC What this change shipsInventory (8 items) — 8 justifiedIntent: stop the goal conductor from giving a one-time "over 20 items" notice that nobody acts on, and keep the goal's item count readable. This is a removal (ADDITION-inverse), not a defect fix.
[FIRST-PRINCIPLES-REVIEWED] 83136dc Description read[DESCRIPTION-READ] 3de9aac22e6f87abd1ba7a09301cada411ed26a5db608906447de95aa7cd7f61 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
11d6240 to
79124c3
Compare
79124c3 to
b45d002
Compare
b45d002 to
30d812f
Compare
30d812f to
5f86e1f
Compare
The goal's item_cap has refused nothing since #19338: it only set cap_exceeded and made the conductor give a one-time notice tracked by an item_cap_notice session-ledger artifact. Remove item_cap, DEFAULT_GOAL_ITEM_CAP, MAX_GOAL_ITEM_CAP and cap_exceeded from the store, the work_ledger_record schema and work_ledger_read, and the notice rule from the conductor prompt, the goal-conductor skill and the work-ledger doc. goal_items_used and created_total stay readable; concurrency_cap and MAX_ITEMS_PER_CONDUCTOR are unchanged. Old headers carrying item_cap read fine and drop the key on the next write; a caller still passing item_cap is refused as an unknown field. Implements rfc-drop-goal-item-cap.md (#33584).
5f86e1f to
83136dc
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approving. On head 83136dc the review checked these points. Every writer and reader of item_cap, cap_exceeded and item_cap_notice is gone from src/ and website/. Every caller of _write_goal and apply_conductor_action was updated. An old on-disk header that still stores item_cap loads and then drops the key. A stale item_cap argument gets a 400 through the existing unknown-field path. The prompt hash, mate-parity and facade pins were re-pinned to match. The design is signed off by a maintainer through the accepted RFC (#33584).
Done well: both compatibility edges the RFC names are pinned by tests, and goal_items_used keeps its counting coverage after the cap tests went away.
Optional:
- Update
docs/request-for-change/rfc-drop-goal-item-cap.mdfrontmatter (status,implementation-prs: [33601],last-audited,audited-at) and the README.md:31 index row, which still says "Nothing built". - In
test/test_conductor_agent.py, keep"items used: N of" not in textand"in every round report" not in text. They still pass, and they pin the rule that a round report may state the total but is never required to. - The body correctly calls this a breaking change, but the title says
refactor:. Arefactor!:orfeat!:type would match that.
bolichen97
left a comment
There was a problem hiding this comment.
Approving 83136dc as maintainer. 99 checks pass. The one red is the helper job "rerun / Re-run Sensitive Change Review", which failed at 10:16 UTC because it found no Sensitive Change Review run to rerun. Sensitive Change Review itself passed on this same head at 10:49 UTC, so the helper's red does not block.
This implements the item_cap removal from RFC #33584, and it loosens a soft limit:
ConductorRecord.item_cap,cap_exceeded,DEFAULT_GOAL_ITEM_CAP,MAX_GOAL_ITEM_CAP, theitem_capgoal-write argument, its validatorFieldSpecand its MCP schema property are all removed. The concurrency cap is unchanged, so spend stays bounded.goal_items_usedis still derived and returned on theconductorblock, compact reads included, andnew_goal=truestill starts a new count.- An old header that stored
item_capstill reads, and the next write drops the key. A goal write that still sendsitem_capgets a 400 for an unknown field. The MCP schema no longer offers it, and the tests pin both cases. - The conductor prompt, the goal-conductor skill and
work-ledger.mdlose the one-time cap notice and itsitem_cap_noticebookkeeping.
I read the product hunks and the test changes. I found no regex in product code and no new refusal beyond the removed field.
Problem / Motivation
Goal: Remove the work ledger's advisory goal
item_capand the conductor's one-time item-total notice, keeping the goal's item count readable.Since #19338
item_caprefuses nothing. It only setscap_exceeded, and the conductor prompt (spend_bounded) and the goal-conductor skill make the conductor give a one-time notice, tracked by anitem_cap_noticesession-ledger artifact it rewrites at every round close. The owner reports that nobody acts on the notice and it is raised on nearly every goal.Why it matters
The notice is noise to the person, and it costs a prompt rule, a session-ledger write every round, a tool field and a header field on every goal.
Not a goal
concurrency_cap(default 6) orMAX_ITEMS_PER_CONDUCTOR(32, wire codeitem_cap_exceeded).goal_items_usedandcreated_totalstay onwork_ledger_read.patrol_budgettext in the same prompt and skill files (another PR).What changed (motivation → approach → change)
Decision: rfc-drop-goal-item-cap.md (docs PR #33584,
accepted; this PR rebases onto it once it merges). It supersedesrfc-conductor-item-total-notice.mdand amendsrfc-work-ledger-concurrency-cap.md§3/§5.ConductorRecord.item_cap,cap_exceeded,_stored_item_cap,DEFAULT_GOAL_ITEM_CAP,MAX_GOAL_ITEM_CAPremoved (work_ledger_records.py,work_ledger.pyfacade,work_ledger_writes.py_write_goal/apply_conductor_action). The rebuild no longer carries a cacheditem_cap.item_capremoved from thework_ledger_recordJSON schema and_RECORD_FIELDS(mcp_work.py), the validator (opt_in_server_schemas.py) and the HTTP handler (work_ledger_conductor.py).work_ledger_readdropscap_exceededand keepsgoal_items_used(work_ledger_read.py); the warm task brief's conductor payload dropsitem_cap.spend_boundedrule keeps the concurrency cap and the no-progress check and replaces the item-cap notice with one sentence: the total has no cap and reads asgoal_items_used. The goal-conductor skill's "Item cap (advisory)" bullet becomes a short "Item total" bullet;src/kiro_crew/docs/work-ledger.mdmatches. The old skill text said to keep the count out of round reports. That rule served the one-time notice and goes with it. The new bullet says a round report can stategoal_items_used, because the owner asked to keep the total visible for round reports. It permits, it does not require (RFC §4).WORK_STORED_ITEM_LIMITstays imported inwork_ledger_records.py(withnoqa: F401) because thework_ledgerfacade serves it from there.Compat choice for an old caller passing
item_captoaction=goal: reject. The schema already refuses any unknown field with a 400 that names it, before anything is written, so this needs no code. Ignoring would need a kept schema entry plus a drop path for a field with no effect, and the caller would believe a cap was set. The tool's advertised schema no longer lists the field, so a current conductor never sends it.Backwards compatibility
Breaking:
work_ledger_record action=goal item_cap=<N>is refused 400 (unknown field);work_ledger_readno longer returnsitem_caporcap_exceeded. Writer sweep on origin/main @ 1e3b894 (git grep -nE "item_cap|cap_exceeded|item_cap_notice"): the only writers ofitem_capwere the conductor prompt and goal-conductor skill (both changed here) and tests (updated). No frontend, Bot prompt (crewmate_prompts.json), team-lead skill or system spec names it.Stored headers that carry
item_capstill read:ConductorRecord.from_dictignores the key and the next header write drops it (test_a_stored_item_cap_from_an_old_header_is_ignored_and_dropped).Reader: src/kiro_crew/dashboard/handlers/work_ledger_read.py:api_work_ledger_get -- chat|subagent -- drops
cap_exceeded, still returnsgoal_items_usedandcreated_total| test_the_read_carries_the_goal_total_and_no_item_capReader: src/kiro_crew/dashboard/warm_task_brief.py:_conductor_payload -- crew page -- drops
item_cap;_goal_progressreads onlygoal_items_used,goal_items_base,created_total| test/test_warm_task_brief_crew_mode.pyReader: src/kiro_crew/work_ledger.py:rebuild_from_projection -- chat -- keeps
concurrency_capandgoal_items_basefrom a clean cache | test_a_clean_rebuild_keeps_the_cached_goal_capsReader: src/kiro_crew/agent_parts/spec_prompts.py:spend_bounded -- chat -- notice text removed; conductor reads
goal_items_used| test_back_to_back_rounds_keep_a_spend_boundReader: src/kiro_crew/builtin_skills/goal-conductor/SKILL.md:Item total -- chat|subagent -- notice and
item_cap_noticeartifact removed | test_back_to_back_rounds_keep_a_spend_boundReader: session ledger
item_cap_noticeartifact -- chat -- written only by the removed prompt rule; an existing value is an inert artifact string no code reads | git grep finds no reader in src/Reader: src/kiro_crew/mcp_work.py:_tool_definitions -- chat|subagent -- schema no longer lists
item_cap| test_the_tool_schemas_spell_the_stores_cap_ceilingsTests
test_work_ledger_caps.py: item-cap tests rewritten as count tests (goal_items_used,new_goal, legacy headers) with no cap; newtest_the_goal_total_is_counted_and_never_refusedandtest_a_stored_item_cap_from_an_old_header_is_ignored_and_dropped.test_work_ledger_tools.py: the read carriesgoal_items_used/created_totaland noitem_cap/cap_exceeded; a goal write withitem_capis 400; schema and_RECORD_FIELDSno longer list it.test_conductor_agent.py: prompt and skill still carry the concurrency cap and no-progress check, namegoal_items_used, and carry noitem_cap/cap_exceeded._CONDUCTOR_SYSTEM_PROMPTshape hash (test_agent_refactor_contracts.py), thekirocrew-conductor.json/kirocrew-ledger-conductor.jsonspec-byte goldens (test_agent_refactor_spec_bytes.py, re-pinned from CI's printed digests since they cannot be regenerated locally), facade inventory, projection, metrics, warm-brief and parity reason.Local: 704 passed (work-ledger, conductor, probe, remote-dispatch files), then 85 related files: 3678 passed with 4 pin failures, all fixed and re-run green; flake8, black, isort and docs-lint clean on touched files.
Proof: not provable -- other: removal of an advisory field; no defect to revert
Manual verification
N/A — unit coverage sufficient: the change removes a field and prompt text; store, HTTP and schema paths are covered by the tests above.
Related Issues
Refs #19338, #22417, #33584
Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.