Public: anyone can read this; the crew can change it.

The planner's refusals live in one module, read by dependencies, plan and limb replan #5632

opened this

Merged 41d 4h ago, live in production

The planner's two refusals, "an issue cannot wait for itself" and "the planner has it in hand already", are now typed in one place: a new module, src/actions/planwords.ts. It exports them as SELFWAIT and INHAND. No existing module owned words like these, so I created it rather than adding to another file.

Notes

opened this

The planner's two refusals, "an issue cannot wait for itself" and "the planner has it in hand already", are now typed in one place: a new module, src/actions/plan_words.ts. It exports them as SELF_WAIT and IN_HAND. No existing module owned words like these, so I created it rather than adding to another file. The wording is unchanged, so answers and pages read exactly as before.

What moved where:

  • src/actions/dependencies.ts: dependencyWords.self is now SELF_WAIT.
  • src/actions/plan.ts: the refusal for a plan item that waits for itself now uses SELF_WAIT.
  • src/actions/limb_replan.ts: the take-back refusal now uses IN_HAND.
  • src/tui/screens/limbs.ts: the p key's message now uses IN_HAND.
  • src/contract/openapi.ts: this file isn't in the issue's list, but it had a fifth copy, "an issue cannot wait for itself (422)". The issue's grep -rn check would have found it, so it is now ` ${SELF_WAIT} (422) , which gives the same string. src/contract/probes.ts already imports from actions/`, so this doesn't open a new dependency between layers.

Under src/, grep -rn for either sentence now finds only plan_words.ts. In each file only the sentence's line changed, plus one import line.

New test: test/plan-words.test.ts checks that each exported sentence is non-empty. It also reads each of the five files as text and fails if either sentence is typed back in.

Checks run: bun x tsc --noEmit is clean. These test files pass (117 tests, 0 failures): plan-words, dependencies, limb-replan, limbs, tui-limbs, plan-pillars, plan-route, contract, openapi, openapi-coverage and openapi-served. One later command ran the whole suite by mistake; it was still running when I pushed, so I have no result from it. src/web didn't change, so the design lint wasn't needed.

🤖 Generated with Claude Code

Closes #5595

commented

The planner's two refusals, "an issue cannot wait for itself" and "the planner has it in hand already", are now typed in one place: a new module, src/actions/plan_words.ts. It exports them as SELF_WAIT and IN_HAND. No existing module owned words like these, so I created it rather than adding to another file. The wording is unchanged, so answers and pages read exactly as before.

What moved where:

  • src/actions/dependencies.ts: dependencyWords.self is now SELF_WAIT.
  • src/actions/plan.ts: the refusal for a plan item that waits for itself now uses SELF_WAIT.
  • src/actions/limb_replan.ts: the take-back refusal now uses IN_HAND.
  • src/tui/screens/limbs.ts: the p key's message now uses IN_HAND.
  • src/contract/openapi.ts: this file isn't in the issue's list, but it had a fifth copy, "an issue cannot wait for itself (422)". The issue's grep -rn check would have found it, so it is now ` ${SELF_WAIT} (422) , which gives the same string. src/contract/probes.ts already imports from actions/`, so this doesn't open a new dependency between layers.

Under src/, grep -rn for either sentence now finds only plan_words.ts. In each file only the sentence's line changed, plus one import line.

New test: test/plan-words.test.ts checks that each exported sentence is non-empty. It also reads each of the five files as text and fails if either sentence is typed back in.

Checks run: bun x tsc --noEmit is clean. These test files pass (117 tests, 0 failures): plan-words, dependencies, limb-replan, limbs, tui-limbs, plan-pillars, plan-route, contract, openapi, openapi-coverage and openapi-served. One later command ran the whole suite by mistake; it was still running when I pushed, so I have no result from it. src/web didn't change, so the design lint wasn't needed.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs