Context
This ticket comes from a same-turn tech-debt-radar pass after PR #13829 was routed for review. The operator and peer memory already identified ai/services/graph/GoldenPathSynthesizer.mjs as a high-value architectural debt pocket: the class is now 1737 lines, marked singleton:true, has 26 static methods, and also exports 3 standalone helper functions.
The first safe split is not the Chroma/SQLite scoring core. It is the repo-synced issue visibility surface: Current Release / Incident Focus, Stale Assignment Candidates, and Silent Threads. Those helpers parse local issue markdown and render handoff sections; they are mostly pure filesystem/frontmatter logic and already have focused unit coverage inside test/playwright/unit/ai/services/graph/GoldenPathSynthesizer.spec.mjs.
Release classification: post-release / radar follow-up. This is maintainability hardening for the Golden Path surface, not a release-blocking fix for #13750.
The Problem
GoldenPathSynthesizer.mjs mixes at least four responsibilities in one singleton class:
- embedding dimension helpers;
- issue-sync section builders/renderers;
- PR/review-family summarization helpers;
- Chroma + SQLite computed-routing synthesis and final handoff writing.
The issue-sync section builders are a clear extraction seam because they are not the graph-ranking core and do not need singleton state. Keeping them inside the main synthesizer increases review risk on every Golden Path patch: small visibility-section fixes require loading and modifying the same file as the routing algorithm.
Memory Core prior-art sweep found a same-day peer note from @neo-opus-ada recording the operator example: GoldenPathSynthesizer.mjs as a 1500+ line singleton/static-method anti-pattern and a candidate for multiple split tickets. KB sweep found no existing decomposition ticket; it only surfaced the feature tickets that added the sections (#13758, #10275) and older steering discussions.
The Architectural Reality
Evidence from current dev:
ai/services/graph/GoldenPathSynthesizer.mjs is 1737 lines.
- It has
singleton:true but 26 static methods, so a large share of behavior is utility-style logic rather than singleton state.
- The issue-focus seam spans functions such as
collectIssueMarkdownFiles, extractIssueCommentBlocks, findLastQualifyingAssignmentActivity, buildStaleAssignmentCandidates, renderStaleAssignmentCandidatesSection, findLatestIssueActivity, buildSilentThreadCandidates, renderSilentThreadCandidatesSection, scoreCurrentFocusIssue, buildCurrentFocusCandidates, and renderCurrentFocusCandidatesSection.
- Existing sibling pure-helper modules already live in
ai/services/graph/, including providerDispatch.mjs, providerReadinessHelper.mjs, and sessionChunker.mjs.
Pre-Flight (structural fast-path): future authoring ai/services/graph/issueFocusSections.mjs matches sibling pure-helper modules in ai/services/graph/; sibling-file-lift applies; no novel directory choice. Map-maintenance: not needed, because ai/services/graph/ already covers graph-service helpers and this is another same-role helper module.
The Fix
Extract the issue-sync visibility-section helpers from GoldenPathSynthesizer.mjs into a focused pure helper module, tentatively ai/services/graph/issueFocusSections.mjs.
Keep the public behavior and rendered markdown stable. GoldenPathSynthesizer should import and call the extracted helpers, while the unit tests should continue to cover the same section behavior. This is an SRP split only: no scoring formula changes, no Chroma query changes, no SQLite graph-routing changes, and no new scheduler behavior.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
GoldenPathSynthesizer.synthesizeGoldenPath() handoff sections |
Existing GoldenPathSynthesizer.mjs behavior and Golden Path unit spec |
Renders Current Focus, Stale Assignment, and Silent Threads via extracted helpers with identical output |
Import failure should fail tests; no runtime fallback needed |
Existing handoff format comments remain in code |
Focused unit spec for GoldenPathSynthesizer section output |
New issueFocusSections.mjs helper exports |
Sibling pure-helper pattern in ai/services/graph/ |
Own issue markdown parsing, candidate scoring, and section rendering helpers |
None; helpers are deterministic and testable |
JSDoc @summary on each exported function |
Unit tests exercise helpers through synthesizer and/or direct helper tests |
Decision Record impact
None. This is aligned with existing ai/services/graph/ pure-helper extraction patterns and does not change ADR-governed graph steering semantics.
Acceptance Criteria
Out of Scope
- Splitting the computed-routing / Chroma + SQLite scoring core.
- Changing the Golden Path ranking formula, candidate pool, or Hebbian graph behavior.
- Changing Sandman scheduling, heavy-maintenance leases, or manual Sandman execution.
- Closing #13750.
Avoided Traps
- Do not file a vague “decompose the large class” epic here. This is one concrete extraction seam.
- Do not move routing semantics while extracting helpers. Visibility-only issue sections are the low-blast split; routing changes require their own proof path.
- Do not introduce a new directory.
ai/services/graph/ already hosts sibling helper modules for graph-service behavior.
Related
Related: #13750
Related: #13822
Related: #13828
Related: #13758
Related: #10275
Live latest-open sweep: checked latest 20 open issues at 2026-06-21T22:30:56Z; no equivalent extraction/decomposition ticket found.
A2A in-flight sweep: checked latest 30 messages at 2026-06-21T22:30:56Z; no competing claim for GoldenPathSynthesizer issue-focus helper extraction found.
KB duplicate sweep: GoldenPathSynthesizer issue focus section builders extraction duplicate ticket surfaced feature provenance (#13758, #10275) but no extraction ticket.
GitHub exact sweep: GoldenPathSynthesizer decomposition, Golden Path current focus extract, and GoldenPathSynthesizer current focus returned no equivalent ticket.
Origin Session ID: 019ee5c2-82ba-7b73-8812-df59106ff61a
Retrieval Hint: query_raw_memories("GoldenPathSynthesizer huge singleton static methods SRP decomposition tech debt radar issue focus sections")
Context
This ticket comes from a same-turn
tech-debt-radarpass after PR #13829 was routed for review. The operator and peer memory already identifiedai/services/graph/GoldenPathSynthesizer.mjsas a high-value architectural debt pocket: the class is now 1737 lines, markedsingleton:true, has 26 static methods, and also exports 3 standalone helper functions.The first safe split is not the Chroma/SQLite scoring core. It is the repo-synced issue visibility surface: Current Release / Incident Focus, Stale Assignment Candidates, and Silent Threads. Those helpers parse local issue markdown and render handoff sections; they are mostly pure filesystem/frontmatter logic and already have focused unit coverage inside
test/playwright/unit/ai/services/graph/GoldenPathSynthesizer.spec.mjs.Release classification: post-release / radar follow-up. This is maintainability hardening for the Golden Path surface, not a release-blocking fix for #13750.
The Problem
GoldenPathSynthesizer.mjsmixes at least four responsibilities in one singleton class:The issue-sync section builders are a clear extraction seam because they are not the graph-ranking core and do not need singleton state. Keeping them inside the main synthesizer increases review risk on every Golden Path patch: small visibility-section fixes require loading and modifying the same file as the routing algorithm.
Memory Core prior-art sweep found a same-day peer note from
@neo-opus-adarecording the operator example:GoldenPathSynthesizer.mjsas a 1500+ line singleton/static-method anti-pattern and a candidate for multiple split tickets. KB sweep found no existing decomposition ticket; it only surfaced the feature tickets that added the sections (#13758, #10275) and older steering discussions.The Architectural Reality
Evidence from current
dev:ai/services/graph/GoldenPathSynthesizer.mjsis 1737 lines.singleton:truebut 26 static methods, so a large share of behavior is utility-style logic rather than singleton state.collectIssueMarkdownFiles,extractIssueCommentBlocks,findLastQualifyingAssignmentActivity,buildStaleAssignmentCandidates,renderStaleAssignmentCandidatesSection,findLatestIssueActivity,buildSilentThreadCandidates,renderSilentThreadCandidatesSection,scoreCurrentFocusIssue,buildCurrentFocusCandidates, andrenderCurrentFocusCandidatesSection.ai/services/graph/, includingproviderDispatch.mjs,providerReadinessHelper.mjs, andsessionChunker.mjs.Pre-Flight (structural fast-path): future authoring
ai/services/graph/issueFocusSections.mjsmatches sibling pure-helper modules inai/services/graph/; sibling-file-lift applies; no novel directory choice. Map-maintenance: not needed, becauseai/services/graph/already covers graph-service helpers and this is another same-role helper module.The Fix
Extract the issue-sync visibility-section helpers from
GoldenPathSynthesizer.mjsinto a focused pure helper module, tentativelyai/services/graph/issueFocusSections.mjs.Keep the public behavior and rendered markdown stable.
GoldenPathSynthesizershould import and call the extracted helpers, while the unit tests should continue to cover the same section behavior. This is an SRP split only: no scoring formula changes, no Chroma query changes, no SQLite graph-routing changes, and no new scheduler behavior.Contract Ledger Matrix
GoldenPathSynthesizer.synthesizeGoldenPath()handoff sectionsGoldenPathSynthesizer.mjsbehavior and Golden Path unit specissueFocusSections.mjshelper exportsai/services/graph/@summaryon each exported functionDecision Record impact
None. This is aligned with existing
ai/services/graph/pure-helper extraction patterns and does not change ADR-governed graph steering semantics.Acceptance Criteria
GoldenPathSynthesizer.mjsinto a focused graph helper module.GoldenPathSynthesizer.synthesizeGoldenPath()keeps the same rendered section order and markdown content for existing covered cases.frontier -> GUIDESwrites.Out of Scope
Avoided Traps
ai/services/graph/already hosts sibling helper modules for graph-service behavior.Related
Related: #13750 Related: #13822 Related: #13828 Related: #13758 Related: #10275
Live latest-open sweep: checked latest 20 open issues at 2026-06-21T22:30:56Z; no equivalent extraction/decomposition ticket found. A2A in-flight sweep: checked latest 30 messages at 2026-06-21T22:30:56Z; no competing claim for
GoldenPathSynthesizerissue-focus helper extraction found. KB duplicate sweep:GoldenPathSynthesizer issue focus section builders extraction duplicate ticketsurfaced feature provenance (#13758, #10275) but no extraction ticket. GitHub exact sweep:GoldenPathSynthesizer decomposition,Golden Path current focus extract, andGoldenPathSynthesizer current focusreturned no equivalent ticket.Origin Session ID: 019ee5c2-82ba-7b73-8812-df59106ff61a
Retrieval Hint: query_raw_memories("GoldenPathSynthesizer huge singleton static methods SRP decomposition tech debt radar issue focus sections")