Repository navigation
feat(ci): make the PR report easy to read and scan (STE, folds, colour, icons) - #155
Conversation
…e 1.10.1 The report used Coherence's own words (spec gap, entrance, trust, chokepoint, guard, invariant, crossing, baseline) with no definition. It now says in one sentence what Coherence is, names each kind of finding by what it means to the reader (spec file error, broken rule, unchecked input, bug that came back), uses short active sentences, gives the fix as a list, shows spec syntax only as code to type, and leaves out sections with nothing in them. The plain closing steps sit beside CLOSE_WAYS in gaps.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 4189fcb8-6fd5-428d-8c5f-4314d28e4dac
There was a problem hiding this comment.
PostHog Review · Standard · reviewed 76d8c2d: 1 Should fix.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.
… icons A familiar reader can now scan the report. Each section lists its findings first, and what the finding means and how to fix it sits in a details block below the list, as does "What is Coherence?". The verdict is a GitHub alert, so it has a colour: TIP when there is nothing to fix, NOTE for findings outside the pull request's files, IMPORTANT when some are in them, and WARNING when Coherence could not check everything. Icons mark each kind of finding and the changed-file mark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 4189fcb8-6fd5-428d-8c5f-4314d28e4dac
pauldambra
left a comment
There was a problem hiding this comment.
Note
🤖 Automated comment by QA Swarm — not written by a human
QA Swarm review complete. See inline comments.
|
Note 🤖 Automated comment by QA Swarm — not written by a human Multi-perspective review: router (cheap-first pass) + delegated lenses (qa-team, paul-reviewer, xp-reviewer, security-audit, engineering-systems-thinking as warranted) Verdict:
|
| Reviewer | Assessment |
|---|---|
| 🧭 router | Danger MEDIUM: 584 lines, and a release path. Flagged 4 removed pieces of information. Sent 2 reviews to Sonnet. |
| 🧪 xp | The rewrite is good. One HIGH (with ste) on the two lists in two places, plus the repeated fold, the lost route, and the title() shapes. |
| ✍️ general/ste | The STE wording is mostly strong. Two HIGH on CLOSE_STEPS (order, and the dropped condition), plus undefined "registry top" and "session". |
Automated by QA Swarm — not a human review
Addresses the posthog bot thread and 12 QA Swarm findings on PR #155, per the shepherd's agreed direction: - every report command now reads `npx --no -- coherence ...`, so a reader without a local install does not fetch the wrong package - CLOSE_WAYS and CLOSE_STEPS build from one CLOSE_PARTS list (guard, entrances, control none, in that order), so the two forms cannot drift apart; the entrances step now says "from the same source" - an unchecked input's route is shown again as "It reaches: `<stops>`." when it goes further than the entrance's own component - the report now says how many parts of the code and rules it read, and how many rules pass, inside the "What is Coherence?" fold - extracted `howToFix(...)` and `whatThisMeans(...)` helpers for the repeated fold pattern - "at the registry top" reads "for the list of projects in `coherence.config.json`" - added a test for a recorded run that declares no rules (nothing about rules shown) - split `title()` into `heading()` (counted sections) and `label()` (colon-terminated sections) - the no-run message now reads "Coherence has no record of running its check (session `<id>`)<where>, so it did not check the rules." - the bugs fold is titled "What this means" since Coherence cannot promise a fix there - "close" stays for unchecked inputs; the broken-rules fold now says "Fix the code..." / "fix the rule in the spec" Updated the matching assertions in ci.test.ts and the spec bullet in Lifecycle.spec.md that described the old behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 4189fcb8-6fd5-428d-8c5f-4314d28e4dac
… only when the check ran them A new code() helper writes a Markdown code span with a fence longer than any backtick run in the text, so a folder or file name cannot end the span early and add links to the comment. It replaces every dynamic code span, which also stops escape backslashes from showing inside a span (`ci\_7`). The "What is Coherence?" fold no longer says "0 rules pass" for a project whose rules the check did not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 4189fcb8-6fd5-428d-8c5f-4314d28e4dac
pauldambra
left a comment
There was a problem hiding this comment.
Note
🤖 Automated comment by QA Swarm — not written by a human
QA Swarm round 2 review complete. See inline comments.
… projects A route starts where its entrance is declared, so "It reaches:" now lists route.stops after the first. Before, it removed the gap's own component, which differs from the first stop for a deeply nested folder. The routeReach comment now sits above routeReach. A new test checks the fold's counts across two projects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 4189fcb8-6fd5-428d-8c5f-4314d28e4dac
Why
People could not read the Coherence comment on posthog-js PRs. It used Coherence's own words (spec gap, entrance, trust, chokepoint, guard, invariant, crossing, baseline) and did not define them. The goal is a report that a new reader can act on, written in Simplified Technical English (ASD-STE100).
What changed
One sentence at the top says what Coherence is.
Each kind of finding has a name that says what it means for the reader:
The sentences are short and active. The fix is a list of steps.
Spec syntax shows only as code that the reader types. It uses
control: none - <reason>(the grammar accepts the hyphen), not an em-dash.The layout lets a familiar reader scan the comment:
<details>blocks.TIP(nothing to fix), blueNOTE(findings, none in this PR's files), purpleIMPORTANT(some findings in this PR's files), and yellowWARNING(Coherence could not check everything).Sections with nothing in them are left out: "Spec size", "Chokepoints: none declared", and rules that pass.
The plain closing steps (
CLOSE_STEPS) are next toCLOSE_WAYSingaps.ts, so the two lists stay in step.Version 1.10.1, so merging publishes it.
The posthog-js comment, after this change
This is the real output for posthog-js, as GitHub draws it:
Coherence
📄 0 spec file errors · ⛔ 0 broken rules · 🚪 2 unchecked inputs · 🐛 0 bugs that came back
What is Coherence?
Coherence compares the code with its spec files (
*.spec.md). A spec file lists the rules for one part of the code.Note
These findings do not make this check fail.
None of these findings are in files that this pull request changes. You do not need to fix them in this pull request.
🚪 Unchecked inputs (2)
packages/web/Web.spec.md. The input comes from: host-app.packages/webpack-plugin/Webpack-plugin.spec.md. The input comes from: build.What this means and how to fix it
Input from outside this code comes in at these places. The spec does not say what checks that input. 10 more places were already like this when Coherence was added. This list does not show them.
To close one of these, find the place by its name in the
## entrancessection of its spec file. Add one line under it:control: none - <reason>.guard: <function>.entrances:line of that rule.To get the line to add, run
npx coherence scaffold control "<name>".Testing
ci.test.tscases are rewritten for the new text. They pass, and so do typecheck,lexicon:checkandspec:check(0 problems).mod-install.test.ts, and the bundled plugin case inbundled.e2e.ts) pass at 1.10.1.Created with PostHog Desktop
🤖 Generated with Claude Code