/** * * Renders the 8-row business-decision comparison table (per spec §5) plus * the 3-line footer (spec §5 footer + §7 ⚠️ gate). The formatter is the * single source of truth for the artifact's text shape; the standalone * template file at `src/templates/best-practice-scan.md` mirrors this * shape for human reference. * * Hard rules enforced here (defensive scans): * - Forbidden words: 会爆 / 头疼 / 黑暗 / 崩 * - Forbidden developer-perspective phrases: 代码 50 行 / 学习曲线 / 你的难 * - Forbidden binary framing: MVP vs 长期 * - Forbidden project-stage judgment: MVP 项目 * * The `★` recommendation marker is placed on the column header whose * `recommendation` value (A / B / C) matches `opts.recommendation`. */ import type { DocFragment } from './scan-orchestrator.js'; export type RecommendationChoice = 'A' | 'B' | 'C'; export type FormatOptions = { readonly intent: string; readonly language: string; readonly fragments: readonly DocFragment[]; readonly recommendation: RecommendationChoice; readonly reasoning: string; }; export declare function formatOutputTable(opts: FormatOptions): string; /** * Defensive scan: returns the list of forbidden-word / phrase hits * present in the rendered output. The catch-gate test calls this to * fail-loud if a future code change reintroduces a banned token. */ export declare function findForbiddenTokens(rendered: string): readonly string[]; export declare const __TEST__: { ROW_LABELS: readonly ["技术组合(通俗)", "peaks-code 估算", "user 看到", "user 操作", "业务影响(6 个月后)", "适用场景", "适用场景 (parallel)", "LLM 推荐"]; FORBIDDEN_WORDS: readonly ["会爆", "头疼", "黑暗", "崩"]; FORBIDDEN_PHRASES: readonly ["代码 50 行", "学习曲线", "你的难"]; FORBIDDEN_BINARY: readonly ["MVP vs 长期"]; FORBIDDEN_STAGE: readonly ["MVP 项目"]; };