import type { BusinessConcept } from './project-scan-types.js'; export interface SedimentAppendOptions { readonly projectRoot: string; readonly concept: BusinessConcept; } export interface SedimentAppendResult { /** `true` when the file was rewritten; `false` when the (concept, sourceRid) tuple was already present. */ readonly written: boolean; /** `true` when a new file was created (vs. appended to an existing file). */ readonly created: boolean; /** Total concept rows after the operation. */ readonly totalConcepts: number; } /** * Single row of the audit-template inventory tables. The 4-tuple shape * mirrors the table layout in `.peaks/project-scan/{security-template, * perf-template, audit-output-schema}.md`: * * security-template.md Known risks inventory Risk pattern * perf-template.md Known baselines inventory Baseline description * audit-output-schema.md Known schema variants Variant description * * The `status` enum follows each template's own status vocabulary: * - security: active | mitigated | accepted | deprecated * - perf: active | superseded | deprecated * - audit-schema: active | superseded | deprecated * * Callers pass the field set appropriate for the table they're * appending to; the writer does not enforce which `status` values are * legal (the audit skill that wrote the row is authoritative). */ export interface AuditPatternRow { /** Natural-language description of the pattern (the second column). */ readonly value: string; /** Request-id that first surfaced / established the pattern. */ readonly sourceRid: string; /** Human-readable source pointer (e.g. memory file path). */ readonly source: string; /** Status enum value (template-specific — see docstring above). */ readonly status: string; } export interface AuditPatternAppendOptions { readonly projectRoot: string; readonly row: AuditPatternRow; } export interface AuditPatternAppendResult { /** `true` when the file was rewritten; `false` when the (value, sourceRid) tuple was already present. */ readonly written: boolean; /** `true` when a new file was created (vs. appended to an existing file). */ readonly created: boolean; /** Auto-incremented row number assigned to the new row. */ readonly assignedIndex: number; /** Total inventory rows after the operation (excludes the placeholder `| (empty) |` row). */ readonly totalRows: number; } /** * Append (or create) a business concept row in * `.peaks/project-scan/business-knowledge.md`. * * Idempotency contract (matches the bootstrap file's design intent): * - same `(concept, sourceRid)` tuple → skip (return `written: false`) * - same `concept`, DIFFERENT `sourceRid` → append (re-definition from a new source) * - new concept → append * * Throws when the existing file has malformed frontmatter or markdown * table (no silent corruption). Caller should fix the file before retrying. */ export declare function appendBusinessConcept(opts: SedimentAppendOptions): Promise; /** * Append (or create) a security-audit risk-pattern row in * `.peaks/project-scan/security-template.md` "Known risks inventory". * * The on-disk format is a 5-column markdown table (auto-incremented `#` * + 4 string fields). Idempotency: same `(value, sourceRid)` tuple is a * no-op; the frontmatter is preserved verbatim. The first append replaces * the `| (empty) |` placeholder row; subsequent appends go after the * table footer. */ export declare function appendSecurityPattern(opts: AuditPatternAppendOptions): Promise; /** * Append (or create) a perf-audit baseline row in * `.peaks/project-scan/perf-template.md` "Known baselines inventory". * * Same contract as `appendSecurityPattern` (5-column markdown table, * auto-incremented `#`, idempotent on `(value, sourceRid)`, * frontmatter preserved verbatim). */ export declare function appendPerfPattern(opts: AuditPatternAppendOptions): Promise; /** * Append (or create) an audit-output-schema variant row in * `.peaks/project-scan/audit-output-schema.md` "Known schema variants". * * Same contract as `appendSecurityPattern` (5-column markdown table, * auto-incremented `#`, idempotent on `(value, sourceRid)`, * frontmatter preserved verbatim). */ export declare function appendAuditSchemaVariant(opts: AuditPatternAppendOptions): Promise;