/** * The document-deliverable quality floor skill — `wicked-garden-draft` (wicked-garden ≥ 12.35.0, * garden PR #1127) — as the interactive seams hand it to the engine. * * The 2026-09 recon's brochure (F-RECON-007/008/009: unreadable meta text, 4 pages for a 2-page * brief, an invented claim and a shipped `[PLACEHOLDER]`) was drafted by phases carrying * `skill_ref: null`: no skill owned drafting, so no design floor and no self-check ran. The * garden fix is a skill whose `## Runtime` block names ONE command the author runs on the SAVED * file before "done" (`self_check.py --pages N --exact --render --repo `); * the skill rides the drafting steps of wicked-core's `interactive-*` presets (X-MIG M9, * wicked-core#860), and crew's half is to name in the TASK what the command needs — the page budget * the brief implies and the repository snapshot(s) claims must trace to — exactly as the skill's * "In a governed run" section expects. * * The presets ALWAYS require the skill (crew#935). The engine admits every `skill_ref` the run's * planned units name against the published skills snapshot before a unit runs, and FAILS the run * when the snapshot does not hold it (the PA's `pa-scope` names none, so it may run first; the * drafting steps it plans are refused) (wicked-core `SkillsError::Missing`: "… enable and republish them"), so a run on a * garden older than 12.35.0, or a snapshot not republished since upgrading, fails rather than * run without the floor. The seams ask the skills runtime once when they arm, only to LOG which way * it is and name the fix. */ /** The skill's name as the snapshot keys it (path-derived: `skills/draft/SKILL.md` → `wicked-garden-draft`). */ export declare const DRAFT_SKILL = "wicked-garden-draft"; /** The first wicked-garden release that ships it. */ export declare const DRAFT_SKILL_GARDEN_VERSION = "12.35.0"; /** Predicate the seams are wired with: does the PUBLISHED snapshot hold (and enable) `name`? */ export type SkillHeld = (name: string) => boolean; /** The page budget a brief + style imply, per the skill's § 2 defaults. */ export type PageBudget = { pages: number; exact: true; source: 'brief' | 'style-default'; } | { pages: null; exact: false; source: 'style-default' | 'unknown'; }; /** * "two pages" / "2-page brochure" / "a one-pager" in the brief wins (`--exact`, the skill's default * reading of a named count). Otherwise the style decides: a brochure/leaflet is 2 pages, a `doc` * (memo/prose) and a `web` page have NO page budget, a `ppt` deck's budget is its slide count — which * the outline fixes, so the clause tells the worker to pass the count it planned. * * (crew#1005) A count in the brief is the budget only when it names the DELIVERABLE: the plural * ("two pages", "4 printed pages"), a spaced singular ("fit it on one page"), or a "N-page" adjective * on a document noun ("a 2-page printed brochure"). A "N-page" adjective on anything else describes * something else — "the one-page tip calculator" is the app the deck is about — and is skipped. And * a `ppt` deck never takes a PAGE count at all: its budget is the slide count (a Slides draft that * read "one-page" came out as six thumbnails on one landscape page). */ export declare function pageBudgetFor(brief: string, style: string): PageBudget; /** The launcher the skill's `## Runtime` block names for a wicked-crew run. */ export declare const DRAFT_SELF_CHECK_LAUNCHER = "\"$WICKED_GARDEN_ROOT/scripts/wicked-garden\" run scripts/draft/self_check.py"; /** * The single-line task clause (FINDING-011: no embedded newline) that hands the worker what the * skill's self-check needs: the budget, the snapshot(s) to cite against, and the exact command on * the SAVED file. `revision: true` is the edit/chat wording — the file already has a page count the * user accepted; the revision must not change it, and no repo snapshot rides those legs. */ export declare function draftQualityClause(outPath: string, budget: PageBudget, snapshotDirs: readonly string[], opts?: { revision?: boolean; style?: string; }): string; /** The one log line a seam writes when it arms, saying which way the gate went and why. */ /** * Say the arm line — now, or (crew#1145) once the daemon's background skills ladder has landed: * asked before it lands, every seam would report the snapshot as missing while it is only being * verified. Never throws. */ export declare function logDraftSkillArmLine(seam: string, skillHeld: SkillHeld | undefined, skillsSettled: Promise | undefined, log: (message: string) => void): void; export declare function draftSkillArmLine(seam: string, held: boolean): string; /** The self-check script, relative to the wicked-garden plugin root. */ export declare const DRAFT_SELF_CHECK_SCRIPT = "scripts/draft/self_check.py"; /** The garden launcher crew spawns (it resolves the plugin's Python: venv → uv → python3 → python). */ export declare const DRAFT_LAUNCHER_SCRIPT: string; /** How long the floor gets before it is reported UNAVAILABLE (a claims scan walks the snapshot). */ export declare const DRAFT_FLOOR_TIMEOUT_MS = 120000; /** What crew's re-derivation of the draft floor concluded. */ export interface DraftFloorVerdict { /** `pass` — every floor the check could judge is met; `fail` — a floor is breached, with the * rule named in {@link breaches}; `unverified` — no floor failed but the page count could not * be verified (disclosed, published); `unavailable` — the floor could not run at all. */ verdict: 'pass' | 'fail' | 'unverified' | 'unavailable'; /** One line per breached floor, each naming the rule — what the thread and the log say. */ breaches: string[]; /** One line for the log / the thread: what was re-derived and what it found. */ summary: string; } /** `wicked-garden run scripts/draft/self_check.py …` as argv for `node ` — the same * inputs the worker's clause names ({@link draftQualityClause}), minus `--render`: crew does not * drive a browser at finalize (see the module note above). */ export declare function draftFloorArgv(gardenRoot: string, outPath: string, budget: PageBudget, snapshotDirs: readonly string[], opts?: { style?: string; }): string[]; /** * The verdict, from the self-check's own `--json` report (pure — this is what the tests pin). * * `claims` and `contrast` are deterministic over the file alone, so their failure IS a breach. * `pages` is only a breach when the count already exceeds the budget (see the module note): a * count below an `--exact` budget is unproven without a render and is reported as unverified. * * The report's SHAPE is judged first (codex review): a report whose `checks.claims` / * `checks.contrast` are missing or carry no boolean `ok` is not this floor's report — a schema * drift, or another program's output — and answers `unavailable`, never `pass`. And a report that * declares itself FAILED for a reason this floor does not recognise is a breach in its own right: * the floor reports the check's own `failed` list rather than passing a document the check refused. */ export declare function draftFloorVerdict(report: unknown, budget: PageBudget): DraftFloorVerdict; /** Where the live wicked-garden plugin is, or null when nothing is installed / discovery refused * (a symlink below a config dir). The same source the daemon's skills runtime publishes from. */ export declare function gardenPluginRoot(): string | null; /** Injectable IO for {@link runDraftFloor} — tests substitute the spawn and the root. */ export interface DraftFloorIo { gardenRoot?: () => string | null; /** Runs `node ` and resolves its stdout (the `--json` report). Default: `node:child_process`. */ run?: (argv: string[], timeoutMs: number) => Promise<{ stdout: string; code: number | null; }>; timeoutMs?: number; } /** * Re-derive the draft floor on the SAVED document: run the skill's own self-check and judge its * report ({@link draftFloorVerdict}). Never throws — a floor that cannot run answers * `unavailable` with the reason, because a broken check must not read as a pass and must not take * document generation down with it. */ export declare function runDraftFloor(outPath: string, budget: PageBudget, snapshotDirs: readonly string[], opts?: { style?: string; }, io?: DraftFloorIo): Promise; //# sourceMappingURL=draft-skill.d.ts.map