/** * project's `CLAUDE.md` to drop the legacy heartbeat block. * * The legacy block (rendered by `peaks standards init` / `peaks * standards update` before slice 028) contained instructions that: * 1. pointed the LLM at the legacy `.peaks/.active-skill.json` path; * 2. required the LLM to invoke `peaks skill heartbeat:touch` and * `peaks skill presence:clear` on every turn; * 3. ended with an `External reference: https://github.com/affaan-m/...` * line that was peaks-loop-internal, not consumer-facing. * * The replacement text matches the post-slice-025 peaks-loop repo's own * `CLAUDE.md`: route the LLM through `peaks skill presence --json` and * render a compact status header when a valid skill is active. This * service is the deterministic in-place rewriter that brings existing * consumer trees in line with the new template. * * Behavior: * - `migrateStandards({ project, apply: true })` — rewrites the * file when the legacy block is present, returns * `applied: true`. * - `migrateStandards({ project, dryRun: true })` — returns the * would-change preview, no write. * - `migrateStandards({ project })` — defaults to a * dry-run. `--apply` is the only opt-in for a destructive write. * - File missing → `file: null`, no throw. * - Legacy block not present → `foundOldBlock: false`, no write. */ export declare const NEW_TEMPLATE_TEXT = "Active Peaks-Loop skill presence: at the start of every response, run `peaks skill presence --json` to read the active skill marker. The CLI resolves the session-scoped presence lease at `.peaks/_runtime//leases/presence-*.json`; do not read those files directly. When the response includes a valid skill name, display the compact status header: `Peaks-Loop Skill: | Peaks-Loop Role: | Peaks-Loop Gate: | Peaks-Loop Context: () | Next: `. Copy `` from the `data.role` field of that same read (`orchestrator` or `bee`; `null` for a skill outside both lists), and copy `` and `` from the `data.context.ratioPct` and `data.context.action` fields of that read \u2014 never judge the tier or estimate the context fill yourself. Display the header on every turn while the CLI returns an active skill; omit it when the CLI returns no active skill."; export type MigrateStandardsInput = { project: string; apply?: boolean; dryRun?: boolean; }; export type MigrateStandardsData = { file: string | null; foundOldBlock: boolean; wouldChange: boolean; applied: boolean; before: { lines: number; } | null; after: { lines: number; } | null; nextActions: string[]; }; export type MigrateStandardsResult = { ok: true; data: MigrateStandardsData; warnings: string[]; }; export declare function detectLegacyBlock(content: string): { found: boolean; start: number; end: number; }; export declare function rewriteLegacyBlock(content: string, newText?: string): { rewritten: string; replaced: boolean; }; export declare function migrateStandards(input: MigrateStandardsInput): MigrateStandardsResult;