UNPKG

@blundergoat/goat-flow

Version:

AI coding agent harness and local dashboard for Claude Code, OpenAI Codex, Google Antigravity, and GitHub Copilot - setup audits, guardrails, structured skills, deny hooks, and persistent learning loops.

57 lines 2.82 kB
/** * Cold-path content quality linting. * * Three detector families, all running on truth-bearing prose (instruction * files, installed skills, canonical docs). Ports logic inline from cclint * and agnix (per Assumption "no new runtime deps"): * * - Vague-term detection (3-term conservative subset: `properly`, * `correctly`, `appropriately`). INFO severity. * - Generic-instruction detection (5 cclint regex patterns, e.g. * "follow best practices"). WARNING severity. * - Non-actionable statement detection (3 cclint regex patterns with * negative lookaheads, e.g. bare "remember" without "to"). INFO. * * Both cclint code-block-skipping bugs are fixed here (ContentOrganizationRule * and ContentAppropriatenessRule both leak fenced-block content into their * matchers). A single `inCodeBlock` state machine is shared across all three * detector families - toggled on lines starting with ``` (after trimming). */ import type { AuditContext } from "./types.js"; import type { ContentFinding } from "./types.js"; /** Scan mode for a target. * - "full": all three detector families (vague-term, generic-instruction, non-actionable). * - "restricted": generic-instruction + non-actionable only. Used for * learning-loop surfaces (footguns/lessons), whose historical-incident * prose legitimately uses vague-adjacent words ("projects that correctly * omitted those fields"). The narrow generic and non-actionable patterns * rarely false-positive on historical prose; vague-term does. */ type ScanMode = "full" | "restricted"; /** * Scan one file, skipping fenced code blocks before applying prose detectors. * * Pass `mode: "restricted"` for learning-loop files to skip vague-term checks * on incident-description prose while still rejecting generic instructions. * * @param path - Repo-relative path used in emitted findings and mode-specific rules. * @param text - Markdown or instruction-file content to scan. * @param mode - Detector set to apply for the target surface. * @returns Content-quality findings found outside fenced code blocks. */ export declare function scanContentQuality(path: string, text: string, mode?: ScanMode): ContentFinding[]; /** * Run content-quality checks across the configured documentation targets. * * Missing files and unreadable targets are skipped; the function reports prose * findings for available surfaces instead of failing the whole audit on * optional buckets. * * @param ctx - Audit context containing the read-only project filesystem. * @returns Findings plus the count of files that were actually scanned. */ export declare function runContentQualityChecks(ctx: AuditContext): { findings: ContentFinding[]; filesScanned: number; }; export {}; //# sourceMappingURL=check-content-quality.d.ts.map