docs: correct the Python Customize Mode section IDs and action list - #2264
Open
examon wants to merge 1 commit into
Open
docs: correct the Python Customize Mode section IDs and action list#2264examon wants to merge 1 commit into
examon wants to merge 1 commit into
Conversation
The Python README's "Customize Mode" section listed 10 section IDs and described "four string actions". The shipped Python API exposes 12 sections (`SystemMessageSection`) and 5 string actions (the literal arm of `SectionOverrideAction`): `preamble`, `runtime_instructions` and `preserve` were missing, so following the README it was impossible to discover them. Bring the two lines in line with the shipped API and with the equivalent sections in the Node.js, Go and .NET READMEs and in docs/getting-started.md, which already document all 12 sections and all 5 actions, including the section-group semantics that make `preamble` and `preserve` meaningful.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Python documentation to match the shipped system-message customization API.
Changes:
- Documents all 12 section IDs and section-group behavior.
- Documents all five actions, including
preserve. - Clarifies handling of unknown section IDs.
Show a summary per file
| File | Description |
|---|---|
python/README.md |
Corrects Customize Mode sections and actions. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
Contributor
Cross-SDK Consistency Review ✅This PR modifies only The documentation correction aligns the Python README with the already-accurate wording in No further action needed.
|
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.
Fixes #2263
The Python README's "Customize Mode" section listed 10 section IDs and described "four string actions". The shipped Python API exposes 12 sections and 5 string actions, so
preamble,runtime_instructionsandpreservewere undiscoverable for anyone following the Python README.The change
Two lines in
python/README.md:SystemMessageSection, in declaration order, and notes thatidentityandtool_instructionsare section groups and thatpreambletargets just the identity preamble;preserve, with a short gloss of what it is for, and the unknown-section sentence is scoped to the content-bearing actions.Both additions reuse the wording already in
dotnet/README.md,nodejs/README.md,go/README.mdanddocs/getting-started.md, so the Python README now matches the rest of the documentation rather than introducing a new phrasing.No code changes.
What the package actually exposes
surface.py:Output:
The README previously listed 10 of those 12 section IDs (omitting
preambleandruntime_instructions) and 4 of those 5 actions (omittingpreserve). After this change it lists all 12 and all 5, in the order shown above.Checks
python/README.mdis the only file changed, so no Python code path is affected.Run in
python/:uv run ruff format --check .— passesuv run ruff check—All checks passed!uv run ty check copilot— exits 0