-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Feature Type
Pipeline architecture
Problem or Need
10 exported functions have enough internal complexity to justify direct unit testing, but are not part of the public API. They lack any annotation distinguishing them from genuinely public exports. The existing knip config already excludes @internal-tagged items via tags: ["-internal"], but these functions don't have the tag.
Proposed Solution
Add /** @internal */ JSDoc tags to 10 exports. No code or test changes needed — just documentation.
Utils (4 exports):
| Export | File | Line |
|---|---|---|
writeYaml |
src/utils/file-io.ts |
99 |
writeText |
src/utils/file-io.ts |
121 |
table |
src/utils/logging.ts |
281 |
callLLMForText |
src/utils/llm.ts |
56 |
Stage 3 — Execution (5 exports):
| Export | File | Line |
|---|---|---|
createToolCaptureCollector |
src/stages/3-execution/hook-capture.ts |
72 |
analyzeCaptures |
src/stages/3-execution/hook-capture.ts |
306 |
collectQueryMessages |
src/stages/3-execution/sdk-client.ts |
430 |
extractMetrics |
src/stages/3-execution/transcript-builder.ts |
198 |
areMcpServersHealthy |
src/stages/3-execution/plugin-loader.ts |
572 |
Stage 4 — Evaluation (1 export):
| Export | File | Line |
|---|---|---|
getConflictSummary |
src/stages/4-evaluation/conflict-tracker.ts |
244 |
Also add @internal to SanitizationConfig type export in src/utils/sanitizer.ts:89 (type-only, borderline).
Steps:
- Add
/** @internal */JSDoc tag above each function/type definition - Verify:
npm run build && npm run typecheck && npm run knip
Pipeline Stage Affected
General / Multiple stages
Component Type (if applicable)
Not component-specific
Alternatives Considered
- Removing the exports entirely — rejected because these have enough logic to warrant direct testing; forcing integration-style tests would lose edge-case coverage
- Leaving them undocumented — rejected because it makes the public API boundary unclear
How important is this feature to you?
Low - Just a suggestion
Additional Context
Identified during comprehensive dead code analysis (2026-01-31). Related: #371 (dead types), #372 (stdlib wrappers), #373 (export removal). The existing 7 @internal tags on CLI helpers set good precedent for this pattern.
🤖 Created with Claude Code