morningman opened a new pull request, #22:
URL: https://github.com/apache/doris-skills/pull/22
## Why
A PR description's first screen has to answer three questions for a reviewer
who doesn't know the module: what the PR changes, what changes for existing
users, and why the diff is the size it is. Only the last one had a mechanism
behind it: the Change map, `diff_profile.py`, and a checker warning.
apache/doris#71465 shows what that costs. Its first description passed
`check_pr.py` with no errors or warnings. Even so, a reader given only that
description couldn't say what an upgrade changes: by default, views that store
only Spark SQL stop working, and querying a view now needs SELECT on the tables
it reads. The PR's own regression output held a two-line example (the same view
returns 7 under the old rule and 42 under the new one), and the description
never used it.
The session that wrote that description shows why it came out that way:
- The PR step published development's draft verbatim and only filled in the
Change map's numbers. Nothing in the flow asked it to rewrite the draft, and
the draft already passed the checker, which checks structure.
- The handoff file held the 7 and 42 outputs, but no slot said they belonged
on the first screen. The rule asking for an example was a single sentence at
the end of a Problem Summary bullet.
- The agent read `write.md` only up to line 96 of 121, so it never reached
the writing rules. It never opened the Feature example, opened
`handoff-intake.md` only after the PR was published, and skipped
`develop-with-evidence`'s stage 6.
- The handoff file existed under `pr-handoff/feature/…`, a subdirectory
because the branch name contains `/`. Its final evidence was prose, it had
neither parts of the change nor reasons for edits, and it kept every
checkpoint's notes.
This PR gives the other two questions a mechanism as well, and makes the PR
step write for the reviewer instead of passing development's draft through.
## What changes
doris-pr-description:
- `references/write.md` now opens with what the first screen must do: answer
the three questions, each in a fixed place. Problem Summary now contains the
example: a real statement and its results before and after the change, copied
from a run. It also contains a table of the differences that existing users see
after upgrading: case, before, after, and how to keep the old behavior. A new
"Plain words" section sets four rules:
- define each term where it first appears;
- show a trimmed real instance of a structure instead of naming its parts;
- write one idea per sentence;
- never meet a length limit by squeezing sentences into strings of terms.
- A new `Interface changes` field, required for a Feature and added by any
other type when it applies, gets one table row per name that users type, set,
or read and that the PR adds or changes. That covers syntax, properties,
configs, session variables, errors, output columns, and the plugin API version.
- The new `scripts/interface_scan.py` lists candidates for that field from a
range's added lines, with `path:line`, and has its own `--self-test`. On #71465
it finds:
- `SHOW VIEW DIALECTS` and the columns it outputs;
- the four catalog properties, including `iceberg.view.catalog-mapping.*`,
which the first description left out;
- the 22 messages raised in added lines, including the definer-view error,
which the first description also left out;
- the connector API version bump.
- `scripts/check_pr.py` now warns when:
- a Bugfix, Feature, or Enhancement has no example in Problem Summary;
- `Behavior changed: Yes` has no table of differences;
- a large diff's Change map doesn't list its parts with sizes;
- Testing lists build or lint runs;
- with `--diff`, a name the scan finds never appears in the description.
Its `--self-test` also runs the scanner's self-test.
- `references/check-and-publish.md`: step 5 adds a cold read. A subagent
with no context gets only the title and description and answers six fixed
questions. Wrong or unsure answers and guessed terms show what to fix. The cold
read is required for Features, Enhancements, behavior changes, and diffs over
300 lines, and Check mode includes it.
- `references/handoff-intake.md` changes in three ways:
- The path rule now names the subdirectory that a `/` creates, and the
agent lists the directory recursively before concluding there is no handoff
file.
- The handoff's draft is material, not the description. The PR step writes
the first screen anew from the reader material, even when it wrote the draft
itself, and never publishes the draft as it stands because it passes the
checker.
- A new step checks that the file is complete.
- `SKILL.md`: the goal is now that reviewers understand the PR, not only
that they can decide whether to review it. The agent reads each reference file
whole, and the PR step starts from step 1 even when it developed the change in
the same session.
- Type files and examples:
- Feature asks for the example with output; Enhancement and Bugfix point
to the table of differences.
- The Feature example gains an example and an `Interface changes` table.
- A second Feature example shows a feature that changes a default for
existing users, the shape of #71465.
- The Enhancement example shows its response before and after, and its one
difference.
- `development.md`, `facts/basics.md`, `subagents.md`, and `rewrite.md`:
- where the reader material comes from, with and without a handoff file;
- the cold reader as a subagent that must get nothing but the description;
- in Rewrite mode, a cold read of the original description too when the
rewrite is for comparison.
develop-with-evidence:
- `references/handoff.md` changes in five ways:
- a `Stage` line;
- a `Reader material` section, written while the old code is still at
hand: the example with literal outputs, the differences for existing users, the
interface changes, and the terms;
- the file holds the current state, not a journal of checkpoints;
- the final evidence is kept as entries;
- a subdirectory example for branch names with `/`.
"Two to four sentences" gives way to plain words and the example.
- `references/stages/6-deliver.md`: completing the handoff now includes the
reader material and `Stage: delivered`. When the user also asked for the PR,
development hands over to the PR skill from its first step instead of
publishing the draft.
- `SKILL.md`: read each stage file whole. No stage is skipped because the
user wants the PR opened in the same session.
- `references/evidence-entry.md` and `stages/5-evidence.md`: keep the
literal output for results that reviewers will see, and use the `Stage` line
when resuming.
`README.md`: the two skills' rows describe the new parts.
## Notes for reviewers
- The new checker warnings are heuristics; for example, any table in Problem
Summary satisfies the differences check. The cold read judges content, and its
brief is fixed so that reads can be compared with each other.
- `Interface changes` is now a required Feature field, so Check mode reports
its absence as an error on descriptions written before this change.
- The scanner is a checklist. It reads only added lines, and it can't see
changed defaults, changed results, or messages built outside an exception
constructor. #71465's `duplicate SQL dialect` is one such message, and the cold
read found it.
## Testing
- `python3 skills/doris-pr-description/scripts/check_pr.py --self-test` →
`Self-test: 12 examples in 10 files, 0 problems` and `Self-test: 22 samples, 0
problems`.
- The checker on two versions of #71465's description, both checked with
`--diff` over that PR's commit:
- The first description now gets 1 error (no `Interface changes`) and 5
warnings: no example, no table of differences, a Change map without parts,
build runs under Testing, and `iceberg.view.catalog-mapping.` never mentioned.
- The author's hand-edited version gets 1 error and 3 warnings.
- The checker before this change passed both with no warnings.
- #71465's description was rewritten with this skill, and the checker
reports 0 errors and 0 warnings. Each description then got a cold read with the
same brief and model (Claude Sonnet 5.5). The rewrite was read twice: once
before and once after fixing what the first read got wrong.
| | First description | Edited by hand | Rewrite, 1st read | Rewrite, 2nd
read |
|---|---|---|---|---|
| Sureness from 1 to 5: what changes / a before-and-after case / what an
upgrade changes | 3 / 2 / 2 | 4 / 4 / 2 | 4 / 5 / 4 | 4 / 5 / 4 |
| Differences for existing users named correctly, out of 8 | 2, plus 2
partly | 2, plus 1 partly | 7 | 8 |
The reader of the first description had to guess at 12 terms, among them
`engine-based preference`, `HMS object markers`, `mirror text`, and `session
conversion`. The readers of the rewrite guessed only at details it leaves out,
such as whether dialect names ignore case. Their one wrong guess, about what
`legacy` mode reads in a Hive catalog, was fixed before the second read. The
readers' own estimates of the time they would need before trusting their
answers didn't move much: 45 to 60 minutes for both originals, and 30 to 45 and
45 to 60 minutes for the two reads of the rewrite. What they would still read
is the code, to verify the claims, and that is the review itself.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]