import type { GitHubCI } from "../utils/github-ci.js"; import { type ProjectHealthScan } from "./project-health-scan.js"; export type ProjectHealthCategoryId = "files" | "hygiene" | "safety" | "debt"; export interface ProjectHealthCategory { readonly id: ProjectHealthCategoryId; readonly label: string; /** 0–100, or null when the category doesn't apply (left out of the total). */ readonly score: number | null; readonly summary: string; /** The worst offenders, most important first (at most {@link MAX_FINDINGS}). */ readonly findings: readonly string[]; /** Prompt that hands this category to the agent; null when there's nothing to fix. */ readonly fixPrompt: string | null; } export interface ProjectHealth { readonly score: number; /** Prompt that hands every category with findings to the agent; null when clean. */ readonly fixPrompt: string | null; /** Why the score was held down regardless of the rest; null when it wasn't. */ readonly cappedBy: string | null; readonly categories: readonly ProjectHealthCategory[]; /** Only part of a very large project was scanned. */ readonly truncated: boolean; } type CategoryDraft = Omit; /** * Weighted mean of the categories that apply, then held under a cap when * something critical is wrong; null when no category applies. */ export declare function scoreProjectHealth(scan: ProjectHealthScan, ci: GitHubCI | null): ProjectHealth | null; /** * The prompt the app's Project Health popover sends: review the scan's * findings, report, then ask the user what to fix with `ask_user`. Findings * come from file names in the project, so they are quoted as data. */ export declare function projectHealthPrompt(health: { readonly score: number; readonly cappedBy: string | null; readonly truncated: boolean; }, categories: readonly CategoryDraft[]): string; export {};