import type { ConstitutionFileUpdate } from './standards-constitution.js'; import type { StandardsWriteStatus } from './project-standards-service.js'; /** * Create a file that must not exist yet. * * `O_EXCL` is the guard: the write fails if the file appeared between the * plan and the write, so a hand-written `CLAUDE.md` / `AGENTS.md` is never * clobbered. `O_NOFOLLOW` refuses to write through a symlink. */ export declare function writeNewFile(path: string, content: string): void; /** Append to a file that already exists, refusing to follow a symlink. */ export declare function appendExistingFile(path: string, content: string): void; /** * Apply ONE constitution file's plan: create it when absent, append the * managed block when it has none, leave it alone otherwise. * * The `prevalidate` callback is the caller's write-target guard — it lives * with the other containment checks, and this module does not need to know * what they are. */ export declare function applyConstitutionFile(input: { readonly file: ConstitutionFileUpdate; readonly writtenFiles: string[]; readonly appendedFiles: string[]; readonly prevalidate: (file: ConstitutionFileUpdate) => void; }): StandardsWriteStatus; /** * Detect whether the consumer project still carries a 1.x "thick" * `.claude/rules/` tree (the legacy layout that 2.0 migrates away * from). A project with thick 1.x rules should NOT be silently * re-initialised into the 2.0 `.peaks/standards/` layout; the * caller should explicitly run `peaks standards migrate --from-claude-rules` * instead. A new project (no `.claude/rules/` tree, or only a * previously-thinned 2-line-pointer tree) is safe to bootstrap * directly into the 2.0 canonical layout. */ export declare function hasThickOneXClaudeRules(projectRoot: string): boolean;