/** * `aidlc roadmap` — projection of `.aidlc/roadmap/` onto GitHub Issues. * * Three leaves and no useful bare form: * * - `sync` projects eligible items onto issues. Disk is the source of truth; the tracker is * a rendering. Nothing is written to disk, ever. * - `import` seeds one `inbox/` item from an existing issue, once. * - `board-workflow` prints the GitHub Actions workflow that moves a Project board from the * labels `sync` writes. It prints; the user decides where it goes. * * Both command bodies are exported as plain functions taking an injectable `deps` bag and * **returning** an exit code rather than setting `process.exitCode`. Without that there * would be no entry point a test could call, and the consent and exit-code behaviour — the * part of this feature that decides whether something gets published — would be the part * with no coverage. * * Requirements: roadmap-issue-projection/AC-35 … roadmap-issue-projection/AC-40, * roadmap-issue-projection/AC-62 * * @module */ import type { Command } from 'commander'; import { type Prompter } from '../core/prompt.js'; import { type OpenResult } from '../roadmap/open-browser.js'; import { type GhRunner } from '../roadmap/sync/gh.js'; /** Injection seam. Every default is the real implementation. */ export interface RoadmapDeps { gh?: GhRunner; prompt?: Prompter; /** Where to resolve the project from. Defaults to `resolveProjectRoot()`. */ cwd?: string; out?: (text: string) => void; err?: (text: string) => void; /** Overrides the TTY probe in tests. Defaults to `isInteractive()`. */ interactive?: boolean; } export interface SyncOpts { dryRun?: boolean; yes?: boolean; repo?: string; retireIneligible?: boolean; } /** * Project the roadmap. Returns the process exit code. * * Exit codes are the interesting part of this function: * * - `0` — the plan was printed under `--dry-run`; or there was nothing to write; or a * human was asked and declined. All three are a deliberate outcome. * - `1` — a refusal, a `gh` failure, or a partly-applied plan. * - `2` — writes were planned but consent could not be obtained because nothing was * interactive and `--yes` was absent. **Not** zero: the caller in that situation is an * automation that believed it was syncing, and a green run that wrote nothing would leave * it believing that indefinitely. `--dry-run` is how a caller says it meant to look * without touching anything. */ export declare function syncCommand(opts: SyncOpts, deps?: RoadmapDeps): Promise; /** Seed one `inbox/` item from an issue. Returns the process exit code. */ export declare function importCommand(url: string, deps?: RoadmapDeps): Promise; /** * Print the board workflow. Returns the process exit code. * * Deliberately not routed through `wire()`: that resolves a project root, and printing a * file needs no project — somebody deciding whether to turn sync on should be able to read * it first (project-board-recipe/AC-3). */ export declare function boardWorkflowCommand(deps?: Pick): number; /** * The setup, printed to stderr so `> file` still saves a clean workflow while the person * running it sees what to do next. The same steps sit in the file's header, where nobody * reads them; the first real setup, on 2026-09-29, ran sync before the token was stored and * skipped every card — hence the order, and the warning on step 5. */ export declare const BOARD_SETUP_STEPS = "\nBoard setup \u2014 do these in order:\n 1. Create a GitHub Project whose Status field has the columns\n Inbox, Backlog, In Progress, Done, On Hold.\n 2. Save this output: aidlc roadmap board-workflow > .github/workflows/aidlc-project-status.yml\n then commit and push it.\n 3. Create a classic token at https://github.com/settings/tokens/new with the scopes\n project and read:org (plus repo if the repository is private), then run:\n gh secret set AIDLC_PROJECT_TOKEN\n 4. Point it at your board (the number at the end of the board's URL):\n gh variable set AIDLC_PROJECT_NUMBER --body \n 5. Only now run: aidlc roadmap sync\n Label changes made before steps 3 and 4 are skipped and never replayed.\n"; /** * Park the item promoted to `instance` in `hold/` (autopilot/AC-15, AC-16). * * The unattended rule's hard stop ends here. A command rather than prose because * the item lives in the primary checkout while the agent works in a worktree, and * a hand-made move from there is exactly the step that went missing on 2026-10-02. */ export declare function parkCommand(instance: string | undefined, opts: { reason?: string; item?: string; }, deps?: Pick): number; /** * Triage an inbox item into `backlog/` with its rank and run mode, or into `hold/` parked * or declined (autopilot-watcher-asks-person/AC-31..AC-33). */ export declare function triageCommand(item: string, to: string, opts: { rank?: string; run?: string; reason?: string; }, deps?: Pick): number; /** * Name the next ready backlog item (autopilot-priority/AC-1..AC-5). Read-only: * the driver that works the backlog unattended calls this and may never promote, * so the command that picks has no write path at all. */ export declare function nextCommand(opts: { json?: boolean; explain?: boolean; autopilot?: boolean; }, deps?: Pick): number; /** * Give a backlog item a rank, renumbering the others 1…k (triage-sets-priority/AC-1..AC-12). * * The roadmap skill proposes the rank at triage and runs this once the person has * answered; `--dry-run` is the "show where it lands" step. Autopilot never calls it — * deciding the order stays a person's job. */ export declare function rankCommand(item: string, rank: string, opts: { dryRun?: boolean; }, deps?: Pick): number; /** * The Milestones tab as text, so "what is still missing for the current milestone" is answered * in chat (roadmap-milestones/AC-19..AC-21). Exits 1 on an unusable file, an unknown * `--milestone`, or an open item whose `milestone` field is missing or unknown — after printing * the view, so the answer is still there (AC-4, AC-5). */ export declare function statusCommand(opts: { milestone?: string; }, deps?: Pick): number; /** * List what has no milestone, or write the `milestone:` lines given with `--set` * (roadmap-milestones/AC-22..AC-25). The agent drafts; the person reviews the diff and commits. */ export declare function assignCommand(opts: { set?: string[]; }, deps?: Pick): number; export interface ViewDeps extends Pick { now?: () => Date; open?: (file: string) => Promise; } /** * Where the page goes by default (html-roadmap-view/AC-1, AC-4): beside the claims and * registry in the git common dir, so every worktree shares one copy and nothing in a * working tree changes. Outside a git repository there is no such place, so it falls back * into the project's `.aidlc/`. */ export declare function defaultViewPath(cwd: string): string; /** * Write the roadmap page and open it (html-roadmap-view/AC-1..AC-7). Returns the exit code. * * A browser that will not start is a warning, not a failure: the page is written, and the * path printed above the warning is the way to it. */ export declare function viewCommand(opts: { open?: boolean; out?: string; }, deps?: ViewDeps): Promise; /** * Register the command group. * * The group has no `.action()`, so bare `aidlc roadmap` prints help to stderr and exits 1 — * the same shape as `add` and `knowledge`, and the reason `roadmap` belongs in the menu's * `EXCLUSIONS` rather than its roster. */ export declare function registerRoadmap(program: Command): Command; //# sourceMappingURL=roadmap.d.ts.map