@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.
70 lines • 2.65 kB
TypeScript
/**
* Candidacy check: given a draft markdown or a description, recommend what
* kind of artifact the author should create - skill, reference, instruction-
* file rule, learning-loop entry, CLI command, or "don't create."
*
* Runs BEFORE the structural quality rubric. The rubric answers "is this
* artifact well-built?"; the candidacy check answers "should this artifact
* exist as a skill at all?"
*
* v1 is deterministic. Heuristics for drafts (heading + length signals) and
* for descriptions (keyword + intent matching). LLM-assisted candidacy for
* borderline drafts/descriptions is handled by the skill-quality rubric.
*/
import type { ArtifactSubtype, QualityConfig } from "./quality-config.js";
type CandidacyInputDraft = {
kind: "draft";
content: string;
suggestedName?: string;
};
type CandidacyInputDescription = {
kind: "description";
text: string;
};
type CandidacyInput = CandidacyInputDraft | CandidacyInputDescription;
type RecommendedArtifact = {
type: "skill";
subtype: ArtifactSubtype;
} | {
type: "reference";
subtype: Extract<ArtifactSubtype, "playbook" | "index" | "meta">;
} | {
type: "instruction-file";
reason: "too-short" | "rule-shaped" | "constraint";
} | {
type: "learning-loop";
subtype: "lesson" | "footgun" | "decision" | "pattern";
} | {
type: "cli-command";
} | {
type: "do-not-create";
reason: "one-time-task" | "already-exists" | "no-clear-intent";
};
/** Follow-up action shown to authors after the candidacy recommendation. */
interface CandidacyNextStep {
action: string;
template?: string;
}
/** Deterministic recommendation plus evidence for which artifact type should be created. */
export interface CandidacyResult {
recommendedArtifact: RecommendedArtifact;
/** 0-1 confidence in the recommendation. */
confidence: number;
reasoning: string[];
nextSteps: CandidacyNextStep[];
}
/**
* Run the candidacy check against either a markdown draft or a free-text
* description. Returns a recommended artifact type and the reasoning behind
* the recommendation.
*
* The optional `config` parameter is reserved for future per-project
* heuristic overrides (currently the v1 heuristics are project-independent).
*
* @param input - draft markdown or free-text description to classify
* @param _config - reserved quality config for future project-specific heuristics
* @returns candidacy recommendation, confidence, reasoning, and next steps
*/
export declare function runCandidacyCheck(input: CandidacyInput, _config?: QualityConfig): CandidacyResult;
export {};
//# sourceMappingURL=candidacy.d.ts.map