P2: deterministic scheduler → real Now/Next/Later #37
Reference in New Issue
Block a user
No description provided.
Delete Branch "p2/scheduler-focus"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
CommiTea now answers "what should I do next?" from its own real backlog. A deterministic scheduler orders the open issues by dependency topology + priority + estimate and drives Focus's Now/Next/Later — running live over gitea data.
What's here
@commitea/core—schedule(issues, edges): Kahn topo-sort with priority(1-first) → larger-estimate → number tie-breaks, single serial capacity layout, cycle detection (reports the cycle instead of looping), and longest-chain critical-path marking.selectFocus()takes the top three. All pure and deterministic — the LLM does none of the arithmetic (decisions.md). Client gainsgetIssueDependencies. +11 unit tests (39 in core).scheduleFocus()maps real issues + deps → Now/Next/Later; Focus renders scheduler output, falling back to the demo fixture when no token is configured.Verification
GITEA_LIVE=1): the board shows the real 25 open + 9 closed, and Focus picks #2 ChangeSource (critical-path p/1 root) as Now with the rationale "on the critical path · unblocks #33, #4". Screenshots confirmed.v0 scope (each a named later slice)
🤖 Generated with Claude Code