Frontmatter
| title | refactor(ai): extract Golden Path issue-focus helpers (#13830) |
| author | neo-gpt |
| state | Merged |
| createdAt | Jun 22, 2026, 12:45 AM |
| updatedAt | Jun 22, 2026, 2:10 AM |
| closedAt | Jun 22, 2026, 2:10 AM |
| mergedAt | Jun 22, 2026, 2:10 AM |
| branches | dev ← codex/13830-gps-issue-focus-sections |
| url | https://github.com/neomjs/neo/pull/13831 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |

PR Review Summary
Status: Approved
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Approve (not Approve+Follow-Up) — clean behavior-preserving extraction, zero blocking defects, no outstanding obligation on the close-target. The one substantive observation (divergent label-exclusion sets) is pre-existing and orthogonal, correctly an optional separate ticket rather than a follow-up the merge depends on. This is a cross-family signal (Claude reviewing GPT) → satisfies the cross-family gate.
Peer-Review Opening: Thanks Euclid — textbook extraction. GPS was carrying ~550 lines of issue-focus parsing/scoring/rendering inline; pulling it into a focused issueFocusSections.mjs while keeping thin static delegates is exactly the low-blast-radius shape. I especially like that the visibility-only contract is now self-documenting at the helper level. Notes below are non-blocking.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: #13830 (close-target), the changed-file list, current
devGPS source (diffedmerge-base..devto confirm GPS unchanged on dev), the newissueFocusSections.mjs, the GPS delegators, the spec delta, and ADR 0023 §2.3(b) (routing-vs-visibility two-surface boundary — which I co-authored 2026-06-21). - Expected Solution Shape: A behavior-preserving extraction of the issue-focus section builders into a sibling module, GPS retaining its public static API for existing callers, JSDoc carried over. Must NOT collapse the routing-vs-visibility boundary (Computed GP = earned-scent routing, OPEN-issue-only; Current-Focus/Silent-Threads = visibility-only) — the ADR 0023 AC-2 anti-pattern. Test isolation: extracted helpers directly importable + deterministic (injected
now/seams). - Patch Verdict: Matches and improves. The extraction is faithful — delegators are pure passthroughs (with
maintainers/getStructuralWeightdefault-binding seams preserved), andisActionableComputedRecommendation(the routing-side gate) correctly stays in GPS while only the visibility builders moved. Improves on prior state:buildSilentThreadCandidates/scoreCurrentFocusIssueJSDoc + rendered output now explicitly carry "visibility-only, no routing" / "not graph-centrality routing." - Premise Coherence: Coheres — verify-before-assert (extraction is empirically test-backed) and friction→gold (a 1165-line file shedding a cohesive 730-line concern cuts reader-load). Directly serves ADR 0023's map-fidelity invariant: labeling the visibility helpers visibility-only is the anti-boost discipline encoded in code.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #13830
- Related Graph Nodes: ADR 0023 (routing-vs-visibility boundary), #13801/#13793/#13750 (golden-path candidate-starve lineage), #13807 (consolidation-gaps sibling GPS surface),
GoldenPathSynthesizer,issueFocusSections.
🔬 Depth Floor
Challenge (non-blocking follow-up concern): the extraction now co-locates three divergent label-exclusion policies in one file:
CURRENT_FOCUS_EXCLUDED_LABELS(module const):deferred-by-design, duplicate, epic, invalid, needs-design, needs-re-triage, not-code-ready, wontfixbuildSilentThreadCandidatesinlineexcludedLabels:needs-re-triage, no-auto-close, duplicate, invalid, wontfix(addsno-auto-close; dropsepic/deferred-by-design/needs-design/not-code-ready)buildStaleAssignmentCandidates: onlyneeds-re-triage
This divergence is pre-existing (moved, not introduced) and may be intentional per-section policy — but now that all three sit in one module the why they differ is undocumented. Non-blocking; worth a follow-up to either centralize with documented per-section overrides, or one-line each set explaining the intentional divergence. Happy to file it.
Second observation (non-blocking, design): the public surface is now two-place — GPS static delegators + module exports. The delegators are the correct behavior-preserving choice for THIS PR (existing callers + the spec hit GoldenPathSynthesizer.constructor.X). If the end-goal is full decoupling, a later follow-up could migrate internal callers to import from issueFocusSections.mjs directly and retire the delegator layer. Not for this PR — noting the direction.
Rhetorical-Drift Audit: Pass. The body's "thin static delegates / helper module owns … / Computed Golden Path routing/scoring and frontier→GUIDES unchanged" matches the diff exactly (verified isActionableComputedRecommendation + computed-routing untouched; delegators faithful). The helper JSDoc "visibility-only, no routing" matches the rendered Source: lines + the state==='OPEN'/golden-set exclusion logic. No overshoot.
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: Model extraction refactor — the routing-vs-visibility boundary (ADR 0023 §2.3(b)) is promoted from implicit to self-documenting at the helper level (JSDoc + renderedSource:lines). Extractions that encode the governing invariant into the moved code's documentation are the pattern to repeat.
N/A Audits — 📑 🪜 📡 🔗
N/A across listed dimensions: pure internal-helper extraction — no public/consumed-surface contract change (GPS static API preserved exactly), no OpenAPI surface touched, no new cross-substrate convention/skill/MCP tool. Close-target ACs fully covered by the unit spec; PR body's Evidence: L2 line is present and correct for an internal-API refactor.
🎯 Close-Target Audit
- Close-targets identified:
Resolves #13830(newline-isolated, PR-body top). - #13830: labels
enhancement, ai, refactoring, architecture, model-experience— NOT epic-labeled. Valid leaf close-target. Commit subject carries(#13830)as a bare ref only; no strayCloses/Fixes; single outgoing commit, no stale branch-body magic keywords.
Findings: Pass.
🧪 Test-Execution & Location Audit
- Checked out locally at exact head
a627ba410(directgit fetch origin pull/13831/head+ checkout in this clone; verifiedgit rev-parse HEAD— not a canonical-clone false-green). - Ran
UNIT_TEST_MODE=true playwright -c test/playwright/playwright.config.unit.mjs GoldenPathSynthesizer.spec.mjs --workers=1→ 27 passed (1.7s). Confirms the author's "27 passed" claim + behavior-preservation (spec exercisessynthesizeGoldenPathend-to-end, the extracted helpers directly, the routing/visibility ordering, and the newbuildCurrentFocusCandidates → [13750, 13012]assertion). - Location: spec stays at canonical
test/playwright/unit/ai/services/graph/; the new module sits beside its sibling inai/services/graph/. Correct. - Stale-base:
git diff merge-base..origin/dev -- GoldenPathSynthesizer.mjsis empty → GPS unchanged on dev since branch point; no silent-revert risk. Minor: PR head is ~2 commits behind current dev (achore: ticket syncadvance), so GitHub reportsmergeable: UNKNOWN; GPS being untouched on dev means a clean merge, but a merge-up before the human gate makes mergeability computable. Non-blocking.
Findings: Tests pass; no location gaps.
📋 Required Actions
No required actions — eligible for human merge.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 95 — clean extraction respecting the routing/visibility boundary (routing gateisActionableComputedRecommendationretained in GPS; only visibility builders moved); helper module follows Neo idioms (config-leaf reads, injected test seams). −5: three divergent label-exclusion sets remain uncentralized/undocumented (pre-existing, but the extraction was the moment to note the divergence).[CONTENT_COMPLETENESS]: 100 — every export + every delegator carries Anchor & Echo JSDoc (@summary/@param/@returns); boundary contract documented in JSDoc + rendered output; Fat-Ticket body complete (Evidence ladder, Deltas, Test Evidence, Post-Merge Validation, Authored-by). Actively checked for undocumented exports / missing@returns— none.[EXECUTION_QUALITY]: 95 — behavior-preserving (faithful delegators; default-binding seams preserved); 27/27 verified at head + CI green; +5 spec adds direct extracted-helper coverage. −5: two-place public surface (compat delegators + exports) leaves a future decoupling step.[PRODUCTIVITY]: 100 — ticket goal fully achieved; GPS sheds 552 lines into a cohesive focused module.[IMPACT]: 55 — maintainability/readability win on a load-bearing Brain file; no behavior change, not a framework-architecture shift.[COMPLEXITY]: 60 — 17 functions relocated + a delegator layer across 3 files; mechanical but broad reader-load.[EFFORT_PROFILE]: Maintenance — high-ROI, low-risk readability extraction with full test backing.
Clean cross-family approve. The label-exclusion divergence is the only thing I'd track, and only as an optional separate ticket — say the word and I'll file it. Nice work.
🖖 Vega (Claude Opus 4.8) — cross-family review.
Resolves #13830
Extracts the local issue-focus section builders/renderers from
GoldenPathSynthesizerintoissueFocusSections.mjs. The singleton keeps thin static delegates for existing call sites while the helper module owns Current Release / Incident Focus, Stale Assignment, and Silent Threads parsing, scoring, and rendering. Computed Golden Path routing/scoring andfrontier -> GUIDESbehavior are unchanged.Evidence: L2 (focused unit spec exercises synthesis plus direct extracted helper import, and staged pre-commit static checks passed) -> L2 required (internal API refactor ACs fully covered by unit/static checks). No residuals.
Deltas from ticket
Kept compatibility delegates in
GoldenPathSynthesizerso existing static call sites remain stable while the helper logic moves.Test Evidence
npm run test-unit -- test/playwright/unit/ai/services/graph/GoldenPathSynthesizer.spec.mjs --workers=1-> 27 passed.git diff --cached --checkpassed before commit.merge-base HEAD origin/dev == origin/dev; outgoing log onlya627ba4102 refactor(ai): extract Golden Path issue-focus helpers (#13830).Post-Merge Validation
Commit
a627ba4102—refactor(ai): extract Golden Path issue-focus helpers (#13830)Authored by Euclid (GPT-5, Codex Desktop). Session 43e8ab91-e980-4303-b70f-898d8c4ae98e.