Skip to content

feat(planning): read plan size bands and inventory threshold from settings - #13796

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/planning-tunable-defaults
Nov 6, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/planning-tunable-defaults

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: poteto leftover good-defaults, owner-directed

Summary

Owner, 2026-10-13T01:31:36Z: "not ship with assumptions or assumptions that you can't change, so I think having good defaults makes sense ... everything can be customizable and extensible, at least the things that make sense to change".

/planning:plan hard-coded its plan size bands (Trivial 1 file, Small 2-5, Medium 5-15) and its file-inventory threshold (10 or more files). Both now resolve through the plugin's existing convention-home cascade, with today's values as defaults, so behaviour is unchanged when nothing is set.

Fix

  • New keys:
    • plan_size_bands: block map trivial: 1, small: 5, medium: 15. Each value is the largest file count in its band.
    • plan_inventory_min_files: 10.
  • Layers: default, then team <home>/planning.yaml, then personal <home>/planning.local.yaml. Neither key has a userConfig option.
    • Basis: the plugin's comparable numeric keys, answer_audit_rounds and wayfind_suggest_questions, and the other plan-skill key, plan_stress_test, use this shape with no userConfig (plugins/planning/reference/config.md, "Convention-home keys"). The answer_audit_rounds userConfig layer was dropped deliberately (plugins/planning/tests/interview-defenses.test.sh:511).
    • So plugin.json, the generated README options table and the settings-token baseline are untouched.
  • Schema (schemas/planning.schema.json): integer sub-keys with minimums (trivial ≥ 1, small ≥ 2, medium ≥ 3) and an inventory threshold ≥ 1. The convention-home list in the description now names both keys.
  • Band order: setup-apply validates each key against the schema alone (lib/setup-apply.mjs:315-333), so it cannot compare values. reference/config.md therefore states the rule:
    • plan_size_bands resolves whole per layer, and a missing sub-key takes its default.
    • The values must rise strictly (trivial < small < medium). A layer that breaks the order is named and dropped, like any invalid value.
  • Bands keep today's shared boundary: small runs from trivial+1 to small, and medium from small to medium. The defaults still read 2-5 and 5-15. That overlap at 5 already existed and is not changed here.
  • skills/plan/SKILL.md Step 2 resolves both keys through "Convention-home keys" and reports one line, in the same pattern as plan_stress_test. context/plan-template.md now refers to the keys instead of the fixed numbers.
  • The docs/contracts/config-cascade/README.md planning row is not edited. It lists only the ADR 0064 keys and already leaves out the convention-home keys (plan_stress_test, question_pacing).
  • Change fragment: .changes/planning/feat-planning-tunable-defaults-7c3a91e4.md (minor).

Verification

  • New plugins/planning/tests/plan-size-keys.test.sh: PASS=17 FAIL=0. It covers:
    • schema accept and refuse cases through setup-apply --check
    • the defaults
    • the config.md rows and the order rule
    • the Step 2 text
    • no leftover hard-coded threshold
  • plugins/planning/tests/plan-stress-test.test.sh: PASS=77 FAIL=0.
  • setup-apply.test.sh: the same 4 failures (the $HOME-root and non-git cases) also fail on unmodified main in this environment. This change did not cause them.
  • /skill-quality:check on plan: PASS, 0 errors. All 5 warnings were already present (size, description length, fresh-eyes heuristic).

Related

  • Source finding: poteto self-audit, topic "Good defaults, no fixed assumptions" (planning/plan SKILL.md:188-190 and :205).

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 6, 2026 13:14
…tings

/planning:plan's size bands (trivial 1, small 5, medium 15 files) and
its file-inventory threshold (10 files) were fixed numbers. They now
resolve through two convention-home keys, plan_size_bands and
plan_inventory_min_files, with today's values as defaults, so nothing
changes when neither is set. config.md states the rising-order rule the
schema cannot check; a new test covers the schema, defaults and skill
text.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 6, 2026 18:25
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-06T18:26:00.759131Z
We couldn’t complete this review. Comment @codex review to try again.
23df6af Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 23df6af6863a3fc3f70d35bc6c0febabc47a3b27: read 6 of 6 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13796, head 23df6af

No security issues found. I read every hunk of all 6 changed files in .claude-lane/pr.diff. This was a full review: the prior-findings file shows 0 earlier heads reviewed (blocking only: no).

What the PR does: /planning:plan used fixed numbers for its plan size bands (1 / 5 / 15 files) and its file-inventory threshold (10 files). It now reads them from two new settings, plan_size_bands and plan_inventory_min_files. They are set in the existing team and personal convention-home files, and the defaults are the old values.

What I checked:

  • Schema (plugins/planning/schemas/planning.schema.json): both keys accept only integers, with minimums. plan_size_bands sets additionalProperties: false, so it accepts no other sub-keys. Nothing here takes a path, URL, command or shell value.
  • Skill text (skills/plan/SKILL.md Step 2, context/plan-template.md): the fixed numbers are replaced by references to the settings. No guardrail is removed or softened. The bands and the threshold only set how detailed a plan is. None of the protected instruction classes depends on them, so a repository that sets odd values gets a shallower or deeper plan and nothing more.
  • Docs and change note (reference/config.md, the .changes/ fragment): text only.
  • New test (tests/plan-size-keys.test.sh): it works in mktemp -d directories cleaned up by an EXIT trap, points HOME at a fake directory, and runs setup-apply.mjs --check and node -e only on files in the repository. No network calls, credentials or untrusted input.
  • Plugin manifests: no plugin.json or marketplace.json change, and the new keys have no userConfig option, so the manifest rules do not apply.
  • Trusted paths: no changed file matches a TRUSTED PATHS glob, and the PR touches no trust control, token request, kill switch or merge hold.
  • PR context: no embedded instructions aimed at the review lane.

No spend change: no new lane runs, models, schedules or billed resources.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 23df6af6863a3fc3f70d35bc6c0febabc47a3b27: read 6 of 6 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

I read every hunk of all 6 changed files. This is a full review, not blocking-only: the prior-findings file shows no earlier head reviewed.

What the change does. /planning:plan used to hard-code its plan size bands (trivial 1, small 2-5, medium 5-15) and its file-inventory threshold (10 files). Both now come from two new convention-home keys, plan_size_bands and plan_inventory_min_files. The defaults are today's values, so nothing changes when neither key is set.

What I checked:

  • Schema (planning.schema.json). The new keys use shapes setup-apply already validates: an object with additionalProperties: false, and integer minimums. checkValue recurses into object keys and refuses unknown sub-keys (plugins/planning/lib/setup-apply.mjs:461-474), so the test's refuse cases match the validator. The minimums (trivial ≥ 1, small ≥ 2, medium ≥ 3) agree with the strict-rise rule.
  • Order rule. The schema cannot compare values, so the strict-rise rule and the whole-per-layer resolution are stated in reference/config.md and in the schema description. Both match the PR's design. The overlap at 5 between small and medium predates this change, and the PR body says so.
  • Cross-references. The plan-template.md link ../../../reference/config.md resolves to plugins/planning/reference/config.md. No other hard-coded ≥10 files threshold is left in the plan skill. The other file-count text that remains is the plan-template.md "Choosing the Right Scale" examples, which the edited lead-in now presents as the defaults.
  • New test (plan-size-keys.test.sh). Its section awk bounds work: ### /#### headings do not end the ## Convention-home keys section, and #### does not end Step 2. Every Step 2 needle it greps for is in the head SKILL.md.
  • Change fragment. bump: minor fits a new opt-in setting. No plugin.json or marketplace.json changed, so no manifest checks apply.
  • Path-scoped rules. .claude/rules/skill-bodies-state-current-rules.md and .claude/rules/cost-claims.md match the changed skill and reference files. The changed text restates no volatile upstream detail and makes no cost claims.
  • Closing issue. The PR closes none ("No related issue: poteto leftover good-defaults, owner-directed"), so there are no acceptance criteria to check.
  • Paved paths. The standards index under docs/standards has no paved-path row, so nothing to report.

Not verified by me. The PR's test results (plan-size-keys.test.sh PASS=17, plan-stress-test.test.sh PASS=77, and setup-apply.test.sh failing the same way on main) are the author's claims. I had no shell to run them.

No embedded instructions were found in the PR context or prior-findings files.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit d371b3d Nov 6, 2026
69 checks passed
@kyle-sexton
kyle-sexton deleted the feat/planning-tunable-defaults branch November 6, 2026 18:54
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