Skip to content

feat(plan): budget tasks by tool-call estimate, not row count#174

Merged
MickaelV0 merged 5 commits into
stagingfrom
feat/168-plan-ops-budget
May 13, 2026
Merged

feat(plan): budget tasks by tool-call estimate, not row count#174
MickaelV0 merged 5 commits into
stagingfrom
feat/168-plan-ops-budget

Conversation

@MickaelV0
Copy link
Copy Markdown
Contributor

Summary

  • Adds Step 2d budget heuristic to /plan: each task is classified by cost class (trivial/bounded/judgmental/exploratory) and an ops estimate is computed from items × class mid-point
  • Tasks with estimated_total_ops > 50 are force-split or presented as DP(A) before the plan is finalized
  • Plan artifact's Wave Structure section now includes a Budget Table with per-task ops and split flags

Files changed

  • plugins/dev-core/skills/plan/SKILL.md — Step 2d budget heuristic, class table, force-split rule, artifact format
  • plugins/dev-core/skills/plan/references/plan-template.mdx — Budget Table section added to Wave Structure
  • plugins/dev-core/skills/plan/lib/budget.ts — classifier helper (classifyTask, computeBudget, renderBudgetTable, SPLIT_THRESHOLD)
  • plugins/dev-core/skills/plan/__tests__/budget.test.ts — 16 vitest tests covering all exports

Acceptance checklist

  • /plan Step 2d emits per-task ops estimate
  • Tasks >50 estimated ops auto-split or flagged with DP
  • Plan artifact shows the budget table
  • dev-process.mdx not present in this repo — no edit needed
  • All 553 tests pass, all hooks green

Coupling note

Issue #169 (/frame premise-validity gate) is in parallel. This PR does not touch frame skill files or ~/.claude/shared/*. If global-patterns.md §6 needs an update to reference the 50-op budget threshold, flag as follow-up.

Closes #168

Add Step 2d budget heuristic to /plan: classifies each task by cost
class (trivial/bounded/judgmental/exploratory), estimates tool-call ops,
force-splits or DP-flags tasks exceeding 50 ops, and emits a Budget
Table in the plan artifact's Wave Structure section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…plit-row example

- SKILL.md: remove 'Implementation helper' line (LLM cannot execute TS at runtime)
- budget.ts: delete unused OpsRange interface and OPS_RANGE export (dead public API)
- plan-template.mdx: add placeholder row showing YES split case

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@MickaelV0 MickaelV0 enabled auto-merge (squash) May 13, 2026 16:54
@MickaelV0 MickaelV0 merged commit b6d6b29 into staging May 13, 2026
5 checks passed
@MickaelV0 MickaelV0 deleted the feat/168-plan-ops-budget branch May 13, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/plan: budget tasks by tool-call estimate, not row count

1 participant