import type { BrandPresetSpec } from "./brand.js"; import type { ProjectType, ScaffoldInputs } from "./index.js"; export declare const SCAFFOLD_VERSION = "0.1.0"; export interface SubstitutionOptions { /** * ISO date string `YYYY-MM-DD`. When omitted, defaults to today's date * (system clock). Tests should pin this for deterministic snapshots. */ date?: string; /** Override the brand spec resolution (used by tests + callers that already resolved it). */ brandSpec?: BrandPresetSpec; /** * Framework version to stamp into `{{framework_version}}`. The writer resolves * this from the canonical AGENTS body's *filename* (the single source of truth) * and passes it through. When omitted, falls back to * {@link frameworkVersionForType} so callers that don't read a template (tests, * standalone substitution) still get a sensible value. */ frameworkVersion?: string; } /** Today's date as `YYYY-MM-DD` in the local timezone. */ export declare function todayISODate(): string; /** `my-tool` -> `my_tool` (for Python module names). */ export declare function underscoredSlug(slug: string): string; /** `my-tool` -> `MyTool` (for PHP class names). */ export declare function pascalCaseFromSlug(slug: string): string; /** * `my-tool` -> `MY_TOOL` (for PHP/WordPress constant prefixes). WordPress * convention is UPPER_SNAKE for `define()`d constants (`MY_TOOL_VERSION`), * distinct from the PascalCase used for class names. Before v0.2.1 the * wp-plugin scaffolder reused `slug_camel` for constants, producing * `MyTool_VERSION` โ€” the 2026-06-03 dogfood finding #7. */ export declare function upperSnakeFromSlug(slug: string): string; /** * Fallback framework version embedded in the scaffolded CLAUDE.md header when * no `frameworkVersion` is supplied. The writer normally derives the real * version from the resolved AGENTS body's filename and passes it via * {@link SubstitutionOptions.frameworkVersion}; this hardcoded mapping only * applies to callers that don't read a template (e.g. tests). WordPress plugins * map to the WP AGENTS line; everything else to the generic line. */ export declare function frameworkVersionForType(projectType: ProjectType): string; /** * A single uppercase glyph for the generated favicon in static scaffolds * (`cf-pages`), where there is no runtime to derive one. * * ONE letter is deliberate โ€” a three-letter wordmark is mush at 32px. * * Restricted to `[A-Za-z0-9]` because the value is interpolated into SVG * markup: a brand whose name opens with `&` or `<` would otherwise emit an * XML-malformed icon, and a broken favicon fails exactly as silently as an * absent one. The `slug` fallback cannot itself fail โ€” slugs are validated * against `^[a-z][a-z0-9-]{2,49}$`, so character 0 is always a letter. */ export declare function brandInitial(brandName: string, slug: string): string; /** * The dedicated Uptime Kuma keyword this project's health document serves, per * the approved [[uptime-kuma-monitor]] ยง1 standard (Kerry, 2026-08-20). * * A monitor keyword must be three things, and only the first is obvious: * **UNIQUE** across the portfolio (otherwise a mis-pointed monitor stays * green), **STABLE** across requests and releases (a keyword on a version or * timestamp goes red on the next deploy), and **AN IDENTITY claim, not a STATE * claim** (a keyword on `"analytics":"configured"` goes red when analytics is * misconfigured on a perfectly healthy app). * * ๐Ÿ”ด DERIVED FROM THE SLUG, NEVER A LITERAL โ€” this is the load-bearing half and * it is the half that sounds optional. The decoupling from `service` is the * part that sounds like the point; it is not. A shared constant value * reintroduces the exact trap the field exists to prevent โ€” it becomes * `"status":"ok"` with extra steps, and it looks fine right up until the second * project carries it. The cautionary case is real: `z2w-agent-command-center` * serves `"keyword":"z2w-health-ok"`, unique today only by accident of adoption, * whose *name* reads as a portfolio-wide constant โ€” precisely the value a * standardisation pass would copy everywhere. This function exists so that no * scaffolder can ever hardcode one. * * The `-health-ok` suffix is not decoration. It anchors the RIGHT side of the * token so the value cannot collide with a sibling project's, and the * `"keyword":"` field prefix anchors the LEFT โ€” see the substring-containment * note in the emitted Uptime Kuma standards block. Both anchors matter in THIS * portfolio, which is actively renaming `z2w-foo` to `foo`: during that * transition a bare-slug keyword for `foo` would substring-match the body of * `z2w-foo`. */ export declare function healthKeyword(slug: string): string; /** * Build the placeholder โ†’ value map for a set of inputs. Exposed (not just * used internally by applySubstitutions) so callers can inspect or extend * the map before substituting. */ export declare function buildSubstitutionMap(inputs: ScaffoldInputs, opts?: SubstitutionOptions): Record; /** * Substitute every `{{placeholder}}` token in `template` with the value * resolved from `inputs`. Unknown placeholders are left intact verbatim so * the caller can detect drift between templates and the substitution map. */ export declare function applySubstitutions(template: string, inputs: ScaffoldInputs, opts?: SubstitutionOptions): string;