/** * Emit the portable roadmap authoring skill into a project * (roadmap-revamp/AC-16, AC-21, AC-35, AC-36). * * This is the one artifact AIDLC produces that is meant to leave the repository. * A contributor — often someone with no terminal and no checkout — loads it into * whichever agent they already use, describes what they want, and gets back a * correctly-formatted roadmap item to commit. * * Deliberately NOT a platform adapter, for two independent reasons: * * 1. Every adapter re-serializes frontmatter from a fixed key set * (`name`, `description`, `phase`, `trigger`, `priority`), so the `version` * key would be silently dropped on round-trip — and the version stamp is * the entire reason this file is generated rather than committed. * 2. Adapters exist to package one body for the *local* agent. This file is * carried out to somebody else's agent, so platform-native packaging is * the wrong shape: there is no platform to be native to. * * It also carries no lifecycle `phase` and never passes through * `parseSkillFile`, which requires one. That is the same seam * `operational/packagers.ts` opened for app-owned skills. * * Modelled on `installBundledGuidance` in `./guidance-install.ts` — read from * the content package, write into the project, bypass the adapters, report what * happened. One behavioural difference, stated in the design as DD-7: guidance * install preserves a locally-edited layer, and this deliberately does not. A * stale version stamp is the exact failure this feature exists to prevent, so * the framework keeps ownership of the file. * * The stamp names the version at which the emitted text last changed, not the * installed version as roadmap-revamp/AC-16 first had it: re-stamping identical * text on every release put this file in every branch's `aidlc update` diff * (update-restamps-unchanged-skills/AC-6). Two copies with one version still hold * the same text, which is what a contributor comparing them needs. * * No path here is derived from user data: every segment is a module constant, so * unlike the guidance installer there is no YAML-supplied filename to bound-check * before touching disk. * * @module */ import { type ItemFieldDecl } from '../roadmap/item-fields.js'; /** Repo-relative target, for reports and tests. */ export declare const ROADMAP_SKILL_PATH: string; /** * The fields to render, with `milestone` added when the roadmap has a milestones file and the * project has not declared the field itself (roadmap-milestones/AC-6). Without the file the * fields are returned as given, so the skill stays byte-identical (AC-7). */ export declare function withMilestoneField(fields: readonly ItemFieldDecl[], milestonesOn: boolean): readonly ItemFieldDecl[]; /** Outcome of one emission pass. */ export interface RoadmapSkillReport { /** Repo-relative path written, or null when nothing was written. */ path: string | null; status: 'installed' | 'updated' | 'already-current' | 'source-missing'; warnings: string[]; } /** * Render the emitted body from the shipped source. * * Exported for tests: rendering is pure, so the substitution and marker * placement can be asserted without touching a filesystem. * * @param source - Raw source template contents. * @param version - Version to stamp, e.g. `1.12.0`. * @param fields - The project's declared item fields; empty for the stock template. */ export declare function renderRoadmapSkill(source: string, version: string, fields?: readonly ItemFieldDecl[]): string; /** * Install the portable authoring skill into a project. * * @param projectRoot - Absolute project root. * @param contentRoot - Absolute root of the content package. * @param version - Version to stamp into the emitted frontmatter. Passed in * rather than read here so tests can pin it and this module needs no opinion * about where a package manifest lives. * @param opts.dryRun - Compute the report without writing. * @param opts.fields - Declared item fields, overriding what the project's config * says. A test seam: rendering is the thing worth asserting, and threading a * config file through a temp directory to assert it would test the reader twice. */ export declare function installRoadmapSkill(projectRoot: string, contentRoot: string, version: string, opts?: { dryRun?: boolean; fields?: readonly ItemFieldDecl[]; }): RoadmapSkillReport; /** * One-line summary of an emission pass, or null when there is nothing to say. * * `already-current` is deliberately silent: reporting it on every `update` would * add a line to the common case and train the reader to skip the section. */ export declare function summarizeRoadmapSkill(report: RoadmapSkillReport): string | null; //# sourceMappingURL=roadmap-skill.d.ts.map