@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.
55 lines • 2.36 kB
TypeScript
import type { ReadonlyFS } from "../types.js";
import type { DriftReport } from "./types.js";
/**
* Parse YAML frontmatter and body text from a markdown file.
*
* The parser swallows malformed YAML into a sentinel object and never throws so
* drift checks can report content mismatch without aborting the whole audit.
*
* @param raw - Full markdown file contents, including optional YAML frontmatter.
* @returns Parsed frontmatter plus body text after the closing marker.
*/
export declare function parseMarkdownFrontmatter(raw: string): {
frontmatter: unknown;
body: string;
};
/**
* Compare skill markdown using goat-flow's drift semantics.
*
* Installed skill copies can reorder YAML keys or trim trailing whitespace
* during setup; those edits are not functional drift, but body or frontmatter
* value changes still are.
*
* @param expected - Template markdown content from `workflow/skills`.
* @param existing - Installed markdown content from an agent or skill-docs tree.
* @returns True when normalized frontmatter and body content match.
*/
export declare function skillContentsEquivalent(expected: string, existing: string): boolean;
/**
* Runtime dependencies for `checkDrift`.
*
* The filesystem is rooted at the audited project, while `templateRoot` points
* at goat-flow's package layout; separating them keeps consumer-project audits
* from accidentally reading templates from the target project.
*/
interface CheckDriftOptions {
/** ReadonlyFS rooted at the project being audited (for installed-copy reads). */
fs: ReadonlyFS;
/** Absolute path to the project being audited. Present for parity with other audit options; not currently used for IO. */
projectPath: string;
/**
* Absolute path whose layout mirrors goat-flow's own root (must contain
* workflow/skills/...). Defaults to the goat-flow package root resolved
* at runtime so consumer projects work out of the box.
*/
templateRoot?: string;
}
/**
* Run all drift comparisons and return a consolidated report.
*
* @param options - Project filesystem plus optional goat-flow template root.
* @returns Drift status, findings, and count of compared template/install pairs.
*/
export declare function checkDrift(options: CheckDriftOptions): DriftReport;
export {};
//# sourceMappingURL=check-drift.d.ts.map