Skip to content

fix(engine): the map gates a research/discussion birth; the d/r doors refuse a mapped name - #1089

Merged
leeovery merged 1 commit into
mainfrom
fix/direct-entry-name-collision
Sep 2, 2026
Merged

fix(engine): the map gates a research/discussion birth; the d/r doors refuse a mapped name#1089
leeovery merged 1 commit into
mainfrom
fix/direct-entry-name-collision

Conversation

@leeovery

@leeovery leeovery commented Sep 2, 2026

Copy link
Copy Markdown
Owner

What

Closes the one door that bypassed the discovery map's ordering: the epic menu's d/r command options take a free-typed topic name, and a name already on the map slipped through.

Why

The epic menu derives each topic's next action from the map — a research-routed topic never offers a discussion until its research completes. But at the d door the entry skill read only the discussion item's own status, the shared discovery-item ensure no-ops on an existing item whatever its routing, and topic start checked nothing beyond the item itself. Typing a research-routed topic's name at d started a discussion on it with the research untouched. Same hole at r.

Changes

  • Engine guardtopic start on an epic, for research and discussion, refuses a birth the map's next action does not name (the same lifecycle join the menu and the map ops already use, so the engine is never the permissive path around the prose). Two deliberate passes: an in-progress item always resumes, and a parked research stub always drains — research is downstream of nothing, and a discussing topic's parked research has no menu row (a research-side concern lands research-side regardless of routing, per triage-landing.md). A parked discussion stub on a research-routed topic waits for the research, as the menu already has it.
  • render direct-entry-gate <wu>.<phase>.<topic> — the d/r doors' gate. Empty for a name not on the map (or a work unit without one); the entry-blocker pair otherwise, naming where the topic stands ("already on the map — it is routed to research and nothing has started") and pointing back to the epic menu. The research drain passes here too.
  • Both entry skills fetch the gate right after kebab-casing the free-typed name and stop terminal on a blocker — before any summary derivation, map-item ensure, or phase validation.
  • lifecyclePhrase moves from discovery-map.cjs to derivations.cjs (one home, three consumers) and gains the fresh case.
  • CLAUDE.md, commands.md, and the engine usage banner updated.

Tests

  • test-engine-transactions: every arm of the guard — both refusals, the discussion-stub wait, the research-stub drain beneath a live discussion, the map's own next action passing, resume regardless, off-map and non-epic ungated, the terminal-status refusals keeping their own words.
  • test-engine-render-surfaces: the surface's blocker text per lifecycle, the drain pass, empty for new names and features, the phase refusal.
  • Pipeline simulation: refusals and gate renders after the harvest, and the drain at the parked-concern step.
  • New prose case discussion-direct-entry-refuses-a-mapped-topic: workflow-start → the epic → d → a research-routed name → the blocker, world unchanged.
  • discussion-sweeps-a-dead-peers-leavings: its recipe birthed a discussion on a research-routed topic — a world the engine can no longer produce — so it reroutes the topic first, as the epic mainline already does. Snapshot diff is that one routing field.

Verification

npm test — 2746 pass. npm run typecheck clean. node tests/prose/run.cjs select --diff main intersects every discussion-entry case; the two worth walking first are discussion-direct-entry-refuses-a-mapped-topic (new) and start-continues-an-epic-into-discussion.

Standalone, not stacked on #1088 — the two touch different lines of the simulation and merge independently.

🤖 Generated with Claude Code

…and the d/r doors refuse a mapped name

The epic menu derives every topic's next action from the discovery map,
so a research-routed topic never offers a discussion until its research
completes. The menu's d/r command options bypassed that: they take a
free-typed name, the discovery-item ensure no-ops on an existing item
whatever its routing, and topic start read only the phase item's own
status. Typing a research-routed topic's name at d started a discussion
on it with the research untouched.

- topic start (epic, research|discussion): refuses a birth the map's
  next action does not name — the same join the menu renders from. An
  in-progress item always resumes; a parked research stub always drains
  (research is downstream of nothing, and a discussing topic's parked
  research has no menu row).
- render direct-entry-gate <wu>.<phase>.<topic>: the d/r doors' gate —
  empty for a name not on the map, the entry-blocker pair naming where
  the topic stands otherwise; the research drain passes.
- both entry skills fetch the gate after kebab-casing and stop terminal
  on a blocker, before deriving a summary or ensuring a map item.
- lifecyclePhrase moves to derivations (one home, three consumers) and
  gains the fresh case.
- tests: transactions (the guard's every arm), render surfaces, the
  simulation; a new prose case walks the d door into the refusal; the
  dead-peer sweep case's recipe reroutes its topic before discussing it
  (a world the engine could no longer produce).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@leeovery
leeovery merged commit ca2f0a5 into main Sep 2, 2026
@leeovery
leeovery deleted the fix/direct-entry-name-collision branch September 2, 2026 16:47
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.

1 participant