/** * Loop Engineering Readiness linter (M6 — peak-spec §7.5 + §8.4). * * Pure function: takes the raw markdown text of a peaks-* SKILL.md * file and returns either * { ok: true, findings: [] } * or * { ok: false, findings: string[] }. * * The lint asserts three structural properties the spec binds every * Loop-Engineering-participating peaks-* skill to: * * 1. The skill references the shared guideline file * `.peaks/standards/loop-engineering-guidelines.md` (or its * alias `.peaks/standards/loop-engineering-guidelines.md`). * Reference may appear anywhere in the body — code fence, * plain prose, or list item — as long as the literal token is * present. * * 2. The skill does NOT introduce a CLI verb that bypasses the * LLM-coordinated model. We flag lines that look like * "Run `peaks ` to …" where `` is not in the * allowlist of LLM-owned sediment / asset / evolution verbs. * The user types NL; the LLM runs the CLI on the user's behalf * (RL-1 / Human-NL-Choice-Only). * * 3. The skill does NOT introduce a JSON / manifest * hand-authoring surface. We flag lines containing phrases * like "Edit the manifest", "write the JSON", "fill the JSON * file", etc., when they are not part of an explicit allowlist * (allowlist only references; never an instructional phrase). * * Each finding is a single line of the form: * ": " * so a downstream CLI can render it directly without further * parsing. * * The lint intentionally does NOT touch any application-level * code; it only parses a SKILL.md text. The peaks CLI command * `peaks skill lint --category loop-engineering-readiness * --path ` * (registered in src/cli/commands/skill-loop-engineering-readiness.ts) * reads the SKILL.md from disk and calls this function. * * Per RL-1 / Human-NL-Choice-Only and * `.peaks/memory/two-forms-only-rule.md`, the user only ever picks * via AskUserQuestion or describes in NL; the LLM runs the CLI. * This lint is what stops a future peaks-* skill from regressing * that rule at the textual layer. */ export type LintFinding = string; export type ReadinessLintResult = { ok: true; findings: []; } | { ok: false; findings: LintFinding[]; }; /** * The shared guideline file that every Loop-Engineering-participating * peaks-* skill must reference. Both the canonical path and the * common alias are accepted. * * The alias is intentionally identical to the canonical path here: * the spec sometimes renders it as * `.peaks/standards/loop-engineering-guidelines.md` * with a slash prefix and sometimes without. We accept both. */ export declare const LOOP_ENGINEERING_GUIDELINE_PATHS: readonly [".peaks/standards/loop-engineering-guidelines.md"]; /** * The allowlist of CLI verbs that a peaks-* SKILL.md may legitimately * instruct an LLM to invoke on the user's behalf. These are the * sediment / asset / evolution surface verbs introduced in * 18-verb sediment pool from 2026-07-04-peaks-maker-dynamic-skill- * sediment-design §4.2. * * Any other `peaks ` token that appears in the form * "Run `peaks ` to …" * is treated as a CLI-verb-bypass attempt and flagged. */ export declare const ALLOWED_CLI_VERBS: Set; /** * Phrases that constitute a JSON / manifest hand-authoring surface. * If a SKILL.md instructs the user to perform one of these actions, * it violates RL-1 / Human-NL-Choice-Only and is flagged. * * Each entry is a lowercase substring matched against each line of * the SKILL.md. The match is case-insensitive; the surrounding * `` placeholders in the original spec are matched literally. */ export declare const JSON_HAND_AUTHORING_PHRASES: ReadonlyArray; /** * Phrases that explicitly reference a JSON / manifest surface but * in an ALLOWED way — e.g. "the manifest is written by the CLI" or * "see manifest schema for details". A line that contains one of * these allowlisted phrases is NOT flagged even if it contains a * JSON-hand-authoring phrase elsewhere on the same line. * * The allowlist is intentionally narrow; it must mention either * the CLI as the writer OR a schema reference, NOT an instructional * verb targeting the user. */ export declare const JSON_REFERENCE_ALLOWLIST: ReadonlyArray; /** * Lint a SKILL.md text for Loop Engineering readiness. * * @param skillMdText raw markdown text of a peaks-* SKILL.md * @returns a ReadinessLintResult */ export declare function lintSkillLoopEngineeringReadiness(skillMdText: string): ReadinessLintResult;