Repository navigation
Honor configured split effort and tighten commit prompts - #37
Open
rafaeelricco wants to merge 2 commits into
Open
rafaeelricco wants to merge 2 commits into
rafaeelricco wants to merge 2 commits into
Conversation
- Call `generateContent` with `withDefaultMinEffort(config)` in `generateSplitPlan`, so an explicit effort reaches the provider and an unset one still falls back to the lowest level. - Drop the unused `withMinEffort` import from `src/domain/llm/router.ts` and update the module header to list split plan under `withDefaultMinEffort`. - Assert a configured `high` effort reaches the provider and an unset effort defaults to `low` in the split-plan router tests.
rafaeelricco
force-pushed
the
rafaeelricco/drop-split-min-effort
branch
from
September 27, 2026 14:58
e038516 to
fc4a7d6
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
- Replace the "internally decide" and stacked "ONLY / Do NOT" output lines in the conventional, imperative, and custom prompts with one line explaining that the reply becomes the commit message verbatim. - Capitalize the imperative prompt's style examples and negative example so they match its capital-letter rule, and make the example body bullets complete imperative sentences. - Label the split-plan examples as illustrative so their imperative messages do not override the active convention. - Limit the branch-name "forbidden anywhere" list to words from the instructions, so area prefixes like `cli` stay usable, and drop the `<synthesis_protocol>` steps while keeping the no-subset rule. - Pass `commit_convention` and `custom_template` through `refineCommitMessage` into `getRefinePrompt`, which now states the configured convention and the size-based format instead of inferring the convention from the current message. - Cover the refine prompt's use of a custom template with a unit test and update the refine call sites in the router tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Split-plan ignored the user's configured effort (always low/MINIMAL), so a high-effort pick never reached the provider. A prompt audit of the commit, refine, split and branch prompts also found instructions written for older models, a rule that contradicted its own examples, and a refine prompt that ignored the user's commit convention.
What's New
Split Plan Effort
generateSplitPlannow wraps the incomingProviderConfigwithwithDefaultMinEffortinstead ofwithMinEffort, so an explicit effort reaches the provider unchanged.withMinEffortstays insrc/domain/llm/effort.tsbecausewithDefaultMinEffortbuilds on it, and therouter.tsmodule header now lists split plan underwithDefaultMinEffort.Commit Prompts
add user authenticationas the good form. Its example body no longer ends with a literal- ...bullet.Branch Name Prompt
cli,model,toolandcontext, which collided with the area-prefix rule for changes undersrc/cli/.<synthesis_protocol>is removed; its one criterion not stated elsewhere ("no slug may be just a subset of another") moves into<diversity_axes>.Refine Convention
refineCommitMessagetakes the configuredcommit_conventionandcustom_template, andgetRefinePromptstates them throughconventionSummary. It no longer guesses the convention from the current message's prefix, which forced imperative style onto custom-template users, and it defines the size-based format instead of naming undefined SMALL/MEDIUM/LARGE labels.Split Plan Effort Flow
flowchart TB A["generateSplitPlan(config)"] --> B["withDefaultMinEffort"] B --> C{"config.effort set?"} C -->|yes| D["Keep configured effort"] C -->|no| E["Lowest level: low or MINIMAL"] D --> F["generateContent"] E --> F F --> G["Provider"]Changed Files
src/domain/llm/router.tswithDefaultMinEffort;refineCommitMessagetakes convention and template; module header updated.src/domain/commit/prompts.tsgetRefinePrompttakes convention and template.src/cli/commit.tscommit_conventionandcustom_templateto refine.test/domain/llm/router.test.tstest/domain/commit/prompts.test.tsTesting & Feedback
Review
generateSplitPlanandrefineCommitMessageinsrc/domain/llm/router.ts, then the prompt text insrc/domain/commit/prompts.ts. The split tests should expectJust("high")for a configuredhighandJust("low")for no effort. The new refine test fails on the old prompt, which contained "SMALL" and no template text. The prompt rewording is covered only by unit tests, so try it on real diffs:commitwith the imperative convention and confirm the title starts with a capital letter.commit branchon changes that are all undersrc/cli/and check that one suggestion can start withcli-.highincommit effort, then runcommit splitand confirm the commit note reportshigheffort.If you find any bugs or have recommendations for improvements, please open an issue and assign it to me.