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

Every direction on the front door stops mid-word: "(serve a dep" #187

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed successfully.

shipped production is serving it deploy e11532c

opened this

Pushed successfully.

Fixes the direction issue title cut: ensureDirectionIssue in src/crew/autonomy.ts hard-sliced the direction at 120 characters, so long directions ended mid-word (e.g. "(serve a dep") with no sign there was more.

  • Added truncateAtWord(text, limit), a small pure function that cuts at the last word boundary, strips a dangling (, and appends …. Text that already fits is returned unchanged.
  • The "Direction: " prefix and the 120-character budget are now named constants (DIRECTION_PREFIX, DIRECTION_TITLE_LIMIT); the budget is capped against MAX_TITLE from src/core/issues.ts so the whole title can never exceed it.
  • The Direction: prefix itself is untouched, so the planner's lookup by prefix still works.
  • Tests in test/autonomy.test.ts: a 40-char direction passes through whole; a 200-char direction is cut with a trailing …, stays within the limit, and never splits a word or leaves a dangling (.

Left out: already-stored direction issue titles are not rewritten — this only changes titles for directions written from now on. A person can rename an old one if they care.

bun test and tsc --noEmit are green for my changes; two pre-existing failures in test/apps.test.ts (crew agent / restart-rebuild tests) reproduce identically on main without this change, so they're unrelated flakiness, not something this pull introduces.

🤖 Generated with Claude Code

Closes #179

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs