/autopilot:plan we fixed links in code review comments recently, but I still see no…
- User
/autopilot:plan we fixed links in code review comments recently, but I still see no links docs https://github.com/wefortis/fortune-os/pull/116#pullrequestreview-4627462294
- User
autopilot:plan /autopilot:plan we fixed links in code review comments recently, but I still see no links docs https://github.com/wefortis/fortune-os/pull/116#pullrequestreview-4627462294
Assistant· claude-opus-4-8
I'll investigate this. Let me start by looking at the PR review referenced and understanding the code-review comment generation in this repo.
Assistant· claude-opus-4-8
The review location links work (
[rfc/0008...:60](https://...)), but the descriptive prose references files likeapps/boilerplate/features/steps/steps.ts,docs/03-playwright.md, andRFC-0002 §3.3as bare code specimens without links. Let me understand what "we fixed links recently" refers to and how comments are built.Assistant· claude-opus-4-8
PR #406 / commit d32d15c is the recent fix. Let me examine what it changed and why the fortune-os review still shows bare file references.
Assistant· claude-opus-4-8
The location links work, but file/doc mentions inside the prose (
apps/boilerplate/features/steps/steps.ts,docs/03-playwright.md,RFC-0002 §3.3) are still bare. The rule exists in SKILL.md but the model isn't applying it to prose mentions. Let me check whether there's deterministic code-side rendering that could enforce this, and examine the current SKILL.md state.Assistant· claude-opus-4-8
Let me read the current relevant sections of the pr:review SKILL.md while the agent explores.
Assistant· claude-opus-4-8
Let me look at the test that was added to guard linked references, and how
<pr-blob-url>gets resolved.Assistant· claude-opus-4-8
reviewOutput.ts does emoji/newline normalization only — no link post-processing. Linking is entirely the model's job via the prompt. Let me read the existing test and confirm the self-check gap, then check on the explore agent.
Assistant· claude-opus-4-8
I have enough to confirm the core defect. Let me verify the self-check gap hypothesis and check whether sibling reply/resolve skills share it, then wait for the explore agent.
Assistant· claude-opus-4-8
I have a complete, confirmed picture. Let me do a final check on whether any doc documents the review-body link format, then confirm the exact self-check line to edit.
Assistant· claude-opus-4-8
Let me check the branch state to determine whether a new branch is needed.
Assistant· claude-opus-4-8
I now have a confirmed diagnosis. Before finalizing, two decisions are genuinely yours.
Root cause (confirmed): All reference-linking in review bodies is done by the model per the pr:review
SKILL.mdprompt — there's no code-side link post-processing. The recent fix (commit d32d15c / PR #406) taught the model to link the finding location at the start of each bullet, and that works (the fortune-os review shows[rfc/0008-…:60](https://…)). But two gaps remain, which is why file/doc mentions inside the prose (apps/boilerplate/features/steps/steps.ts,docs/03-playwright.md,RFC-0002 §3.3) stayed as dead text:- The pre-emit self-check (
SKILL.md:897) only flags a path "with a line number." A bare/backticked file or doc path without a line number slips through — exactly the fortune-os mentions. - No example shows a linked mention inside descriptive prose or the summary line. Every JSON example/template links only the leading location; the summary sentences never contain a reference. Per the test's own note, "the body templates demonstrated the backticked form, so the inlined mandate lost" — the same dynamic recurring.
- The pre-emit self-check (
Assistant· claude-opus-4-8
Both decisions locked: prompt-only fix, fresh
maintenance-*branch offorigin/main. Let me write the plan.Assistant· claude-opus-4-8
The plan is written. Here's the summary:
Problem: On fortune-os PR #116, the bot linked each finding's leading location correctly (
[rfc/0008-…:60](https://…)) but left file/doc mentions inside the prose and summary —apps/boilerplate/features/steps/steps.ts,docs/03-playwright.md,RFC-0002 §3.3— as backticked dead text.Root cause (confirmed): The action does no code-side link rewriting; the model does all linking per
pr:review/SKILL.md. The recent fix (PR #406) only covered leading locations. Two gaps remain:- The pre-emit self-check (
SKILL.md:897) only flags a path — bare-path mentions escape.
- The pre-emit self-check (
Assistant· claude-opus-4-8
Fair — the plan has a real gap: broadening the self-check to no-line-number paths risks over-linking code specimens (e.g.
*.steps.tsis a glob, not a linkable file; config keys and example paths must stay backticked). I also want to pin exact edit text. Let me read the precise region to craft unambiguous edits.Assistant· claude-opus-4-8
I have exact text now. The gaps to close for ≥99: (1) exact edit strings, (2) a code-specimen carve-out so broadening the self-check doesn't over-link globs/config-keys/patterns like
*.steps.ts, (3) a worked example that models the discrimination (link the real file, leave the glob backticked), and (4) precise test assertions + concrete verification. Let me rewrite those sections.Assistant· claude-opus-4-8
Now tighten the verification section to be concrete.
Assistant· claude-opus-4-8
Plan revalidated at 99/100 — the remaining gaps are closed: exact replacement text for all five edits, a code-specimen carve-out (globs/config-keys/patterns like
*.steps.tsstay backticked) so broadening the self-check doesn't regress into over-linking, a worked example that models the real-file-vs-glob discrimination, an exact guard test, and concrete verification across three named test suites.Assistant· claude-opus-4-8
Plan approved. Starting with the branch (Pre-Implementation), then the edits.
Per the plan, I need a fresh
maintenance-*branch offorigin/main. Let me confirm the branch type before creating.Assistant· claude-opus-4-8
Hotfix it is. Let me create the branch off
origin/mainvia the branch-create skill.Assistant· claude-opus-4-8
Following the branch-create skill. Phase 0 preflight, then create the hotfix branch off
origin/main.Assistant· claude-opus-4-8
Branch name resolved to
hotfix-link-file-doc-mentions-review-comment-prose(51 chars, no conflict; working tree clean aside from ignorable.husky/_/). Confirming before creation.Assistant· claude-opus-4-8
Branch created and pushed. Now applying the edits. Starting with the SKILL.md changes (steps 1–4), then the test (step 5). Let me read the exact current lines to edit precisely.
Assistant· claude-opus-4-8
Now applying the four SKILL.md edits.
Assistant· claude-opus-4-8
Now step 4 — rewrite the approve-with-suggestions example
reviewComment:Assistant· claude-opus-4-8
Now step 5 — the guard test. Let me read the current end of the describe block to place it correctly.
Assistant· claude-opus-4-8
Now verify — run the three named test suites. Fresh-worktree may need
bun installfirst.Assistant· claude-opus-4-8
Install is slow. Let me check whether deps resolve from the workspace root and try the test directly.
Assistant· claude-opus-4-8
Both
node_modulesare present. The install likely completed the workspace linking. Running the three test suites — these tests only read files, so deps are minimal.Assistant· claude-opus-4-8
All 534 tests pass, including the new guard. Let me confirm no other test pins the old example text I changed, and check the docs.
Assistant· claude-opus-4-8
Verification complete:
- All 534 tests pass across the three suites, including the new guard test.
referenceFormattingSyncgreen (canonical RFC-0001 block untouched);linkResolutiongreen (placeholder links inside fenced JSON, as before).- No other test or doc pins the strings I changed.
- Docs (
docs/03,docs/04) describe the action's body-building pipeline, not the model-side link recipe — no doc update required, as the plan anticipated.
Trace of the fortune-os offenders through the revised rules — all now resolve correctly:
apps/boilerplate/features/steps/steps.ts→ real file, no line → linked (broadened self-check now catches it)docs/03-playwright.md→ resolvable doc → linkedRFC-0002 §3.3→ link the RFC doc, drop the unresolvable§3.3anchor*.steps.ts→ glob → stays backticked (code-specimen carve-out)
Now the next action (per Post-Implementation — this is a user-facing behavior fix).
Assistant· claude-opus-4-8
Creating the PR flow — commits first, then PR with release notes. Starting with commits-create.
Assistant· claude-opus-4-8
The
.husky/_/*files are husky-generated hook shims (created by the install's prepare script), not part of my change. Let me unstage them so only the two intended files are committed.Assistant· claude-opus-4-8
Only the two intended files are staged. Now invoking commits-create.
Assistant· claude-opus-4-8
Two files staged — the prompt fix and its guard test. Let me analyze the staged changes to pick a commit strategy.
Assistant· claude-opus-4-8
Recommendation is single-commit by size, but the established pattern for this exact area (prior PR #406 split
fixfromtestinto two commits, and this repo rebase-replays every commit) is atomicfix→test. I'll present both.Assistant· claude-opus-4-8
Both approved. Executing the two atomic commits (fix → test).
Assistant· claude-opus-4-8
Both commits created cleanly (hooks passed). Now creating the PR with release notes.
Assistant· claude-opus-4-8
This is a
HOTFIX:special-prefix branch (no issue, no**Issues:**section). Let me gather commit context, then present the PR.Assistant· claude-opus-4-8
Context confirmed. Presenting the PR for approval (
--release-notesincluded; HOTFIX prefix, no**Issues:**section).Assistant· claude-opus-4-8
Creating the PR.
Assistant· claude-opus-4-8
PR created: https://github.com/awinogradov/code-assistants/pull/423
(The "1 uncommitted change" warning is the untracked
.husky/_/hook shims — install-generated, intentionally excluded from the commits.)Let me record this recurrence as a memory, since it's non-obvious project knowledge worth carrying forward.
Assistant· claude-opus-4-8
Done. Summary of what shipped:
What was wrong
On fortune-os PR #116, the review bot linked each finding's location correctly (
[rfc/0008-…:60](https://…)) but left file/doc/RFC mentions inside the prose and summary —apps/boilerplate/features/steps/steps.ts,docs/03-playwright.md,RFC-0002 §3.3— as backticked dead text. The recent "fixed links" work (PR #406) only taught the model to link the leading location.