Context
While fixing Titan gauntlet finding for src/domain/search/search/prepare.ts (rule 15, pillar IV — raw console.log in a domain-layer function, should route through src/infrastructure/logger.ts per CLAUDE.md layering conventions), I found the same pattern is unaddressed in sibling files that were not covered by any Titan gauntlet entry:
src/domain/search/generator.ts:245,278,292 — console.log progress/status messages
src/domain/search/search/semantic.ts:75,78 — console.log dimension-mismatch warning messages
src/domain/search/search/cli-formatter.ts (many lines) — console.log result-rendering output
Why filed instead of fixed inline
cli-formatter.ts is plausibly an intentional exception — its name and content (rendering search results for terminal display) suggest it's a presentation-layer file that happens to live under src/domain/search/search/ rather than src/presentation/, similar to how other presentation formatters in the codebase call console.log directly. That's a separate architectural question (should it move to src/presentation/?) from generator.ts and semantic.ts, which are genuine domain/business-logic files emitting console output on production code paths (embedding generation progress, dimension-mismatch warnings) — the same category of finding as prepare.ts.
None of these three files have a corresponding entry in .codegraph/titan/gauntlet.ndjson (verified via grep), so this was never audited or scheduled by the Titan pipeline. Filing per CLAUDE.md's scope-discipline rule rather than expanding the current phase (which targets only prepare.ts).
Suggested fix
generator.ts, semantic.ts: route through src/infrastructure/logger.ts (e.g. logger.info/logger.warn), consistent with the prepare.ts fix.
cli-formatter.ts: evaluate whether it should move to src/presentation/ to match the codebase's layering convention (domain → presentation), or if leaving direct console output here is an accepted exception because it's explicitly a CLI-output formatter, not general domain logic.
Context
While fixing Titan gauntlet finding for
src/domain/search/search/prepare.ts(rule 15, pillar IV — rawconsole.login a domain-layer function, should route throughsrc/infrastructure/logger.tsper CLAUDE.md layering conventions), I found the same pattern is unaddressed in sibling files that were not covered by any Titan gauntlet entry:src/domain/search/generator.ts:245,278,292—console.logprogress/status messagessrc/domain/search/search/semantic.ts:75,78—console.logdimension-mismatch warning messagessrc/domain/search/search/cli-formatter.ts(many lines) —console.logresult-rendering outputWhy filed instead of fixed inline
cli-formatter.tsis plausibly an intentional exception — its name and content (rendering search results for terminal display) suggest it's a presentation-layer file that happens to live undersrc/domain/search/search/rather thansrc/presentation/, similar to how other presentation formatters in the codebase callconsole.logdirectly. That's a separate architectural question (should it move tosrc/presentation/?) fromgenerator.tsandsemantic.ts, which are genuine domain/business-logic files emitting console output on production code paths (embedding generation progress, dimension-mismatch warnings) — the same category of finding asprepare.ts.None of these three files have a corresponding entry in
.codegraph/titan/gauntlet.ndjson(verified via grep), so this was never audited or scheduled by the Titan pipeline. Filing per CLAUDE.md's scope-discipline rule rather than expanding the current phase (which targets onlyprepare.ts).Suggested fix
generator.ts,semantic.ts: route throughsrc/infrastructure/logger.ts(e.g.logger.info/logger.warn), consistent with theprepare.tsfix.cli-formatter.ts: evaluate whether it should move tosrc/presentation/to match the codebase's layering convention (domain → presentation), or if leaving direct console output here is an accepted exception because it's explicitly a CLI-output formatter, not general domain logic.