Each polish round report goes into the knowledge base as one rung of the ladder of its pull request. The ladder goes under the PRD work item that the branch builds. The GitHub review of a round uses the same order and words as the report.
Today a polish round publishes its quality report as a claude.ai artifact, and only the GitHub review links it. The knowledge base never shows it. This PRD records each report artifact in tree.json. The tree then shows one ladder for each pull request, with one rung for each round. The ladder goes under the work item that the branch builds. Counts and a health range roll up to the PRD and the project. The report artifact gets the crumbs of the tree, and the GitHub review gets the sections and words of the report. The PRD has 12 functional and 4 non-functional requirements in 8 work items. The most risk is in the parent finder: a wrong guess puts a ladder under the wrong work item.
Glossary
Polish report
The quality report of one polish round, with its round section, published as one claude.ai artifact (quality report --record --out).
Rung
One polish report in the tree: the round number, the artifact URL, the health before and after, and the open findings.
Ladder
All the rungs of one branch or pull request, in round order, with the state of the pull request.
Parent
The page or the PRD work item (WI-n) that a ladder goes under in the tree.
Health range
The lowest and the highest health after the last round of each ladder in a roll-up, for example "health 74–81".
Open finding
A finding of the last round of a ladder with the state not-fixed. An accepted finding is not open.
Maintenance group
The group that the tree makes for the ladders that have no parent.
Problem and context
A polish round writes its report to a temporary folder outside the repo and publishes it as a new claude.ai artifact (skills/polish-once/SKILL.md:150). The same step says: do not run the publish procedure of the knowledge base (skills/polish-once/SKILL.md:157). So the only link to the report is in the GitHub review of the round.
A loop of 5 rounds makes 5 artifacts. A PRD with 5 work items can have 25 report artifacts that no page of the knowledge base lists. A reader of the PRD cannot see which work items have a pull request, or how the health of each one changed.
The GitHub review and the report give the same facts in a different order and with different words. The review says "Quality score: 71 before, 74 after (up)". The report says "Health 71 → 74 (UP)" and has the sections Health, Findings and Polish round. A reader who goes from the review to the report must find each fact again.
Goals and non-goals
Goals
Each published polish report is in the knowledge base: 0 report artifacts outside tree.json after a round.
A reader gets from a project pane to the report of a round in 1 click. A reader gets from a report to its PRD work item in 1 click.
The PRD row and the project show the polish state of the work in one line: PRs, rounds, health range and open findings.
The GitHub review has the sections of the report in the same order, and each fact of the review of today.
A polish loop adds 1 publish of the knowledge base, at its end.
Non-goals
A report page in docs/quality/ for each round. The reports stay claude.ai artifacts.
One artifact for each pull request that each round publishes again.
A call to GitHub or to a tracker in tree build.
A change to the metrics, the health score or the passes of a round.
Customers
Teams that run polish-once or polish-loop and keep a skillsaw knowledge base: each round appears under its work item with no manual step.
Readers of a PRD or a knowledge base, such as a lead or a product owner. They see which work items have a pull request, and the health of each one.
Reviewers of a pull request on GitHub: the review has the same sections and words as the report that it links.
Internal stakeholders
Joe Gaudet, maintainer of skillsaw: approves the PRD and the changes to the tree.json contract.
Users and scenarios
Roles: the author, who runs the polish skills on a branch; the reviewer, who reads the pull request; the reader, who opens the knowledge base.
An author runs polish-loop on the branch of WI-3 of a PRD. The pull request body links the PRD with #WI-3. After the loop, the knowledge base shows the ladder of the pull request under WI-3, with one rung for each round.
A reader opens the project of the PRD and sees "3 PRs · 7 rounds · health 74–81 · 1 open Nit". The reader clicks the last rung of the open pull request and gets its report.
A reviewer reads the review of round 2 on GitHub. Its sections have the order of the report, so the reviewer finds each fact at the same place in the two.
Error case: an author polishes a bug fix that links no plan. The CLI prints that it found no parent, and the ladder goes to the Maintenance group.
Current state
quality report --out writes the page to a folder outside the repo and does not update the index (packages/cli/src/quality/report.ts:214). The round record keeps the artifact link in report (packages/cli/src/polish/record.ts:62). The tree reads only the page folders of each kind (packages/cli/src/tree/tree.ts:86), so an artifact outside the repo is not in it.
A quality report page in docs/quality/ has the header cells branch, base and date, and links no page (packages/cli/assets/quality/template.html:18). The tree finds a parent only from the links of the header (packages/cli/src/tree/core.ts:136), so such a page goes under Not placed. The project pane always shows only the one-pager, PRD, ADR and walkthrough rows (packages/cli/src/tree/tree.ts:333).
The review body is short when the report is published (packages/cli/src/polish/review.ts:239), and long when it is not (packages/cli/src/polish/review.ts:268). The round section of the report has the order Passes, Findings of the round, Notes, Review guides, Gates, Verify (packages/cli/src/polish/round-section.ts:31).
Proposed state
After each round, polish ladder add records the report artifact as a rung in the artifacts section of tree.json. It finds the parent of the ladder once, at its first rung. tree build reads the ladders with the pages and draws them in the project pane, the Maintenance group and the What's new feed. quality report --parent gives the report artifact the crumbs of the tree. polish review writes the body in the order of the report.
The CLI finds the parent of a ladder in this order. It prints the parent and its source.
User interface and prior art
Three screens change: the project pane of the knowledge base, the header of a polish report, and the GitHub review of a round. The before states are pages that the CLI of today wrote for Fernbook, the invented product of the skill examples. The after states are copies of those pages with the change.
A functional requirement is FR-n. A non-functional requirement is NFR-n.
FR-1A round records its report as a rung
polish ladder add --record FILE writes one rung for the round into the ladder of its branch in tree.json.
Given the record of round 2 of the branch wi-3-export-dialog, with an https report link Whenpolish ladder add --record round-2.record.json runs Thenartifacts["polish/wi-3-export-dialog"] has a rung for round 2 And the rung has the URL, the date, the author, the health 71 and 74, and the count of open findings
Given a ladder that has a rung for round 2 When the same command runs again Then the ladder has one rung for round 2, with the values of the new record
Given a record with no https report link When the command runs Then it exits with code 2, names the field, and writes nothing
FR-2A ladder knows the state of its pull request
polish ladder sync reads the state of the pull request of each open ladder with gh, and writes it.
Given the open ladder of #212, and #212 merged on 2026-11-12 Whenpolish ladder sync runs Then the ladder has the state merged and the date 2026-11-12
Given no gh on the machine Whenpolish ladder sync runs Then it prints that gh is not available and exits with code 1 Andtree.json does not change
FR-3The parent comes from the flag, the PR body or the ticket
At the first rung, the CLI finds the parent in the order of the parent flowchart, and records it with its source.
Given--parent docs/prd/2026-11-03-notebook-export-jobs#WI-3 Whenpolish ladder add runs Then the parent is prd/2026-11-03-notebook-export-jobs#WI-3 and parentFrom is flag
Given no flag, and a PR body with a link to the pages URL of that PRD with #WI-3 When the command runs Then the parent is that work item and parentFrom is pr-body
Given no flag, no link to a page, and a PR ticket URL that is the data-issue of WI-4 When the command runs Then the parent is WI-4 and parentFrom is ticket
Given--parent with #WI-9, and the PRD has WI-1 to WI-5 When the command runs Then it exits with code 2 and the message names WI-1 to WI-5
FR-4A ladder with no parent goes to the Maintenance group
The tree makes the group Maintenance with one pane, "Pull requests with no plan", for the ladders that have no parent.
Given two ladders with no parent, changed on 2026-12-01 and 2026-12-03 Whentree build runs Then the knowledge base has the group Maintenance with the two ladders, the newest first Andtree check --strict does not report them
Given no ladder with no parent Whentree build runs Then the knowledge base has no Maintenance group
FR-5The project pane shows a Polish row
A project with one ladder or more gets a Polish row after Walkthroughs. Each block is one work item or page, with its ladders.
Given a PRD with WI-1 to WI-5, and ladders under WI-1, WI-2 and WI-3 Whentree build runs Then the pane has a Polish row with three blocks, in the order WI-1, WI-2, WI-3 And each ladder shows the PR link, the tag, one rung link for each round and a facts line And the row ends with "WI-4 and WI-5: no pull request yet."
Given a project with no ladder Whentree build runs Then the pane has no Polish row
FR-6Counts and the health range roll up
A work item, a PRD row and the tags of a project show a roll-up of the ladders below them. It has the count of PRs and rounds, the health range and the open findings.
Given three ladders with 3, 2 and 2 rounds, a last health of 81, 79 and 74, and 1 open Nit Whentree build runs Then the PRD row shows "Polish: 3 PRs · 7 rounds · health 74–81 · 1 open Nit." And the project tags show "3 PRs · 7 rounds · health 74–81"
Given one ladder with a last health of 74 Whentree build runs Then the roll-up shows "health 74" with no range
FR-7The tag shows the PR state and the health
The tag of a ladder is the state of the PR and the health after its last round. The data-status is the direction of that round.
Given #219 is open, and its last round went from 71 to 74 Whentree build runs Then the tag is "Open · 74" in an element with data-status="up"
Given a merged PR whose last round went from 72 to 70 Whentree build runs Then the tag is "Merged · 70" in an element with data-status="down"
FR-8What's new shows each round
Each rung is one row of the What's new feed, with the same 30-day window as the pages.
Given the rung of round 2 of #219 on 2026-12-02 Whentree build runs Then What's new has the row "2026-12-02 · #219 Export dialog with progress · Polish round 2 of 5: health 71 → 74. 1 open Nit."
FR-9A polish report shows its place in the tree
quality report --record FILE --out DIR reads the ladder of the branch from tree.json. The page gets the crumbs, the tree of the frame, the Plan and Pull request cells, and the rung strip.
Given a ladder under WI-3 with a rung for round 1 When the report of round 2 is built Then the crumbs are Notebooks › Notebook Export Jobs › PRD › WI-3 › #219 › Round 2 And the strip links round 1 and marks round 2 with aria-current="page"
Given a branch with no ladder When the report is built Then the page is the page of today, with no crumbs and no strip
FR-10The review body has the order and the words of the report
One body for each round, with or without a published report. The long parts are in one details block.
Given the record of round 2 Whenpolish review builds the review Then the body has the title, the crumb line, the header table, Health, Passes and Findings of the round, in this order And after them the details block, History of the branch and the AI line And the header table has the columns Status, Health, Commit, Base, Date and Report
Given the long body of today for the same record When a test compares the two bodies Then each SHA, score, count, path, command, note, guide, gate result and verify line of the old body is in the new body
Given 25 findings When the body is built Then the table has 20 rows, and one line names the 5 other findings by severity
FR-11Inline comments and replies use the words of the report
A comment starts with the severity, the metric ID and the pass, as a finding card of the report does. A reply uses the column names State and Remediation.
Given finding 2 of 3: Important, CQ-CC, Code quality, accepted When the review is built Then the comment starts with "🟠 **Important** · `CQ-CC` · 📏 Code quality · finding 2 of 3 · round 2" And the reply starts with "**State** 🤝 Accepted:"
FR-12A loop publishes the knowledge base once
After its last round, polish-loop runs tree build and the publish procedure. polish-once alone does the same after its round. Each round puts its change to tree.json in the commit of the round.
Given a loop of 3 rounds, and an agent with a tool that publishes to claude.ai When the loop ends Then the agent publishes the knowledge base one time And no round before the last one publishes it
Given round 2 with comments=yes, and a rung for round 2 in docs/tree.json When step 9 makes the commit of the round Then the commit has docs/tree.json And the commit has no file of .skillsaw/polish/
NFR-1A round makes only the knowledge base stale
The side tree of a document page does not list the ladders, so a new rung changes no other published page.
Given a repo with 12 published pages and a published knowledge base Whenpolish ladder add and tree build run Thentree stale prints only tree
NFR-2The tree build stays offline and the same on each day
tree build reads only files. The same files give the same output.
Given the same pages and the same tree.json with ladders Whentree build runs on two different days Then each file that it writes is byte-identical And a test with a fake runner sees no call to gh
NFR-3A rung adds 450 bytes or less to tree.json
Measured on the formatted JSON that the CLI writes, for a rung with a 64-character URL.
Given a ladder with 1 rung When 49 more rungs are added Thentree.json grows by 22,050 bytes or less
NFR-4The ladders are accessible
The direction of a round is text. Colour is not the only signal. The rung strip is a breadcrumb landmark.
Given the knowledge base and a report with ladders When the frame test runs axe on the two pages Then axe reports 0 violations And each rung link has the text "R2 74 ▲" and the title "Round 2: health 74, up"
Data model and API changes
Data model
tree.json gets the section artifacts: one ladder for each branch, with its rungs. The CLI writes it. The agent does not edit it.
No migration: a tree.json with no artifacts key has no ladder. tree check gets four new problems. They are a parent that names no page, and a work item that is not on its PRD. They are also a rung URL that is not an https claude.ai URL, and two rungs with the same round.
The agent runs it in step 8 of polish-once, after the publish of the report. At the first rung it finds the parent and the PR. A later rung keeps them, unless it gives --parent. It reads the PR body with gh, as polish review --post does. With no gh, it uses only --parent. Exit code 2: a bad record or a bad parent; nothing is written.
polish/wi-3-export-dialog: round 2 of 5, health 71 → 74
parent: prd/2026-11-03-notebook-export-jobs#WI-3 (from the PR body of #219)
docs/tree.json: written
polish ladder syncWrite the state of each open PR
The tree skill and the end of polish-loop run it. It calls gh pr view one time for each open ladder that has a PR. It changes only state and closed. Exit code 1 when gh is not available.
Command
npx @skillsaw/cli polish ladder sync
Output
#212 merged 2026-11-12
#215 merged 2026-11-20
#219 open
docs/tree.json: written
quality report --record FILE --out DIRBuild the report of a round
With a ladder for the branch of the record, the page gets the crumbs and the tree of the frame. It also gets the Plan and Pull request cells and the rung strip. With no ladder, the page is the page of today.
Health: 71 → 74 (UP)
Findings: 0 Important, 1 Nit, 0 Good
Ladder: polish/wi-3-export-dialog, round 2, under prd/2026-11-03-notebook-export-jobs#WI-3
Report: /tmp/r2/index.html
polish review --record FILE --pr N [--post]Build and post the review of a round
One body for each round: the sections of the report. The brief body and the long body of today go. The checks of the record do not change. The comments and the replies get the new first line.
### 🪚 Polish round 2 of 5 · level medium
<sub>Notebooks › Notebook Export Jobs › PRD › WI-3 › #219 › Round 2</sub>
| Status | Health | Commit | Base | Date | Report |
Commit: `3f9c2ab`. Quality score: 71 before, 74 after (up).
#### Health
Frontend
The page runtime does not change. The knowledge base page and the report page get static markup and CSS from the CLI.
Security and permissions
The CLI reads the PR body and the PR title from GitHub. They are text from other persons. The parent finder uses only the links that resolve to a page of this repo. The tree escapes each title and branch name, as it does for the page titles today. A rung URL must be an https claude.ai URL, as published must be (packages/cli/src/tree/core.ts:59).
A report artifact is private to its owner until the owner shares it. Each rung links to its artifact on each site, the public site too. A reader with no access sees the refusal page of claude.ai. The owner shares an artifact on claude.ai. tree build makes no network call. polish ladder sync uses the gh login of the user, and only reads.
Observability and success metrics
polish ladder add prints the ladder, the round, the health, and the parent with its source.
tree check reports the four new problems of the artifacts section.
The result of polish-once names the rung and the parent. The result of polish-loop names the publish of the knowledge base.
Target: fewer than 30% of the ladders of a repo with PRDs are in the Maintenance group. A higher count shows that the PR bodies do not link the plan.
Target: 0 published polish reports that are not in tree.json, in the skillsaw repos of the maintainer, after one month.
Rollout and migration
Release the CLI work items first, in one minor version of @skillsaw/cli. Release the skill changes (WI-8) after them, because the skills call the new commands. A repo with no artifacts key shows no change. To go back, remove the artifacts key and run tree build. An older CLI keeps the key and shows no ladder.
Work items
Proposed issues for the tracker. One item or more covers each requirement. The chart below comes from the cards. Click an item for its scope.
WI-1The artifacts section of tree.json and polish ladder add
The types, the checks of readTree and tree check, and the command with a given parent. Tests cover a new rung, a second write of a rung, a bad record and the size limit.
WI-2Find the parent of a ladder from the PR body and the ticket
A pure findParent. Its tests cover the flag, a relative link, a pages URL and a claude.ai URL. They also cover a ticket URL, a ticket key in the branch, and no match.
WI-3polish ladder sync
The state of each open PR with gh, through the Exec of the polish commands. Tests use a fake Exec.
WI-4Ladders in the layout of the tree
Ladder nodes, work item nodes, the Maintenance group, the roll-up and the What's new rows in tree/core.ts. Tests of the pure core, and a test that the build is the same on two days.
WI-5The Polish row of the project pane
The markup and the CSS of the row, the tag, the rungs, and the side tree of the knowledge base. Tests of tree stale after a rung, and an axe audit in the frame test.
WI-6The crumbs and the rung strip of a polish report
quality report --record reads the ladder and writes the crumb block, the two header cells and the strip. Tests for a ladder with a parent, with no parent, and no ladder.
WI-7The review body in the order of the report
The new body, comment and reply in polish/review.ts. A test compares the facts of the old long body and the new body. The example in round-comment.md changes.
WI-8The polish and tree skills use the ladder
polish-once step 8 runs polish ladder add. Step 9 stages docs/tree.json in the commit of the round. .skillsaw/polish/ stays out of the commit. polish-loop runs tree build, polish ladder sync and the publish once at its end. The tree skill, tree-json.md, the artifact contract and the site guide describe the ladder.
Future work and research
One spike and one stretch goal.
FW-1Do two branches that write rungs at the same time make merge conflicts in tree.json?
Merge 10 pairs of branches that each add a ladder, with the sorted keys of WI-1, and count the conflicts.
Decides: If the ladders move to one file for each branch in the tree folder. The maintainer decides.
FW-2A stack of pull requests as one ladder group
The ladders of a stack (polish stack) show from the bottom up, with a line between each PR and its parent PR.
Alternatives considered
Seven decisions had real alternatives: four product decisions and three technical decisions. The last part records the changes during the build.
Product decisions
DEC-1Where does a polish report live?
The tree reads files of the repo, and the reports are artifacts outside it.
Option
Cost
Verdict
One claude.ai artifact for each round, recorded as a rung
A new section of tree.json
Each review links the exact report of its round. FR-1
Do nothing: artifacts that only the review links
The tree shows no report
The problem stays.
One page in docs/quality for each PR
A commit of a 64 KB page each round
The user chose artifacts.
One artifact for each PR, published again each round
Fewer links
The link of an old review then shows a later round.
Revisit if: Teams publish the knowledge base to a site where the readers cannot open claude.ai artifacts.
DEC-2Under which node does a ladder go?
A PRD has many work items, and one PR builds one of them.
Revisit if: Readers find ladders in the state Open for PRs that merged more than a week before.
Changes during the build
The build of WI-1 to WI-8 changed these details of the plan.
Change
Why
A ladder has prUrl, the link of its pull request.
The crumb and the Pull request cell link the PR. gh pr view gives the link with the number.
polish ladder add and sync build the tree, and name each file that they write. Step 9 stages tree.json and the knowledge base page.
A rung changes the knowledge base page too. A commit of tree.json alone leaves the committed page old.
polish-once has a step 10: tree build and the publish procedure. In a loop, polish-loop does it one time, at its end.
FR-12 says that polish-once alone publishes the knowledge base. That needs a step.
The rung strip of a report shows the next round as its only later item.
The report is built at its round. The CLI does not know the later rounds then.
The roll-up line of a work item shows only with two or more ladders.
With one ladder, the line repeats the facts of the ladder.
The word "stable" of the mock-up is not built.
No field of a rung records it.
The summary of the details block of a review gives the count of gates, for example "Gates (3)". The mock-up had "3 passed, 0 failed".
A gate result is free text. The CLI does not read it.
The review gets the base from --base, else from the last quality report of the branch. The date is the date of the rung, else of the head commit.
The round record has neither. The examples of the site must give the same bytes on each run.
The rules of accepted findings moved from SKILL.md of polish-once to passes.md.
SKILL.md must stay in its word budget of 1500 words.
Risks
Risk
Likelihood
Impact
Mitigation
The parent finder puts a ladder under the wrong work item
Medium
Medium
The CLI prints the parent and its source. --parent moves a ladder. Only links to pages of this repo count.
Two branches that add ladders make a merge conflict in tree.json
Medium
Low
Sorted keys, one block for each ladder. FW-1 measures it.
A reader of a public site cannot open a private report artifact
High
Low
Accepted: each rung stays a link, on the public site too. The knowledge base links published pages the same way today.
The new review body is too long on GitHub
Low
Medium
The notes, guides, gates and verify are folded. The table has 20 rows or fewer.
Open questions
None. Joe Gaudet answered the three questions of the first draft on 2026-12-04. The interview record has the answers.
Interview record
Each question of the interview with its answer and its source. A fact from the code or a document, a question that the author did not ask, and an assumption are rows too.
Question
Answer
Source
When polish reports come into the tree, what is one page?
The reports stay in claude.ai artifacts. The author reads this as one artifact for each round, which the tree links.
User
How does a polish report find its parent page?
Automatically, with an override flag (recommended option).
User
Under which node does the report of a pull request go?
The PRD work item (recommended option).
User
Where does a report go when its branch links no plan?
An automatic Maintenance group (recommended option).
User
Where does the tree keep the record of each report artifact?
In tree.json, written by the CLI (recommended option).
User
One artifact for each round, or one for each PR?
One for each round (recommended option).
User
How does the project pane show the reports?
A ladder row with one line for each PR (recommended option).
User
Do the numbers roll up?
Counts and the health range (recommended option).
User
Which status tag does a ladder show?
The PR state and the health (recommended option).
User
When does the knowledge base publish again?
Once, at the end of the loop (recommended option).
User
Does the GitHub review change too?
Yes. Align it with the report: keep the information, align the information architecture, and show a mock-up.
User
On the public site, do the rungs link to the private artifacts, or show as text?
They link to the artifacts on each site.
User
Does DEC-5 need an ADR, because it changes the contract of tree.json?
No. The decision card in the plan is enough (recommended option).
User
Does the change to tree.json go into the commit of the round?
Yes. The skill stages it with the fixes of the round (recommended option).
User
Where does the report of a round go today?
A temporary folder and a claude.ai artifact. The knowledge base is not published in the round.
Code: skills/polish-once/SKILL.md:150
Does the tree read anything outside the page folders?
No. It reads each folder of each kind and tree.json.
Code: packages/cli/src/tree/tree.ts:86
What happens to the rungs of a merged PR?
All rungs stay links. The question was not asked.
Assumption
What is an open finding?
A finding of the last round with the state not-fixed. No source defines it.
Assumption
How does the health range read?
"health 74–81": the lowest and the highest last health. The arrow of the question reads as before and after.
Assumption
Which design system do the mock-ups use?
The runtime of skillsaw: copies of pages that the CLI built. design show has no design system for this repo.
Code: packages/cli/assets/runtime/base.css
Is there a one-pager?
No. The PRD is the plan.
Assumption
Changelog
Date
Author
Change
2026-12-04
Joe Gaudet (agent)
Build WI-1 to WI-8. Record the changes during the build in the Alternatives section, and add prUrl to the data model.
2026-12-04
Joe Gaudet (agent)
Record the answers to the three open questions. Rungs link on each site, DEC-5 has no ADR, and tree.json goes into the commit of the round.
2026-12-04
Joe Gaudet (agent)
First draft, with the mock-ups of the knowledge base, the polish report and the GitHub review.
The prd skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.