import type { Migration } from "../types.js"; /** * v0.4.0 → v0.5.0 — workflow-maker + frontmatter-driven routing. * * Per docs/plan/v0.5-workflow-maker.md §10 — 2-pass strategy: * * Pass 1 (this migration, automatic): * a. Prepend frontmatter to every `/.claude/agents/.md` we * own and to any user-owned SKILL.md under the 3-tier search paths. * Frontmatter is derived deterministically: name (folder), team * (parent folder), description (extractDescription), keyword * triggers (CANONICAL_KEYWORDS), stateful: false, explicit: true. * b. Create the 3-tier user/org/analysis directories with READMEs. * c. Add `skill_loader` + `author` sections to workspace.yaml. * d. Bump version 0.4.0 → 0.5.0. * * Pass 2 (separate, human-driven): * - `solosquad agent validate --all` — flags any SKILL.md where the * backfill produced an unusable description and human review is * needed. The migration does NOT run Pass 2 automatically; CI does. * * Non-destructive: * - Original SKILL.md bodies are preserved verbatim; only the frontmatter * block is prepended. * - `~/.solosquad-backups/-pre-v0.5/` snapshot (via backup.ts) keeps * a rollback target. * - Idempotent: a SKILL.md that already has frontmatter is left alone. * * Bundled assets (`assets/agents/.../SKILL.md`) are backfilled out-of-band * by `scripts/backfill-bundled-frontmatter.ts` — that's a one-shot the * SoloSquad maintainers run; the resulting files are committed and shipped. * The migration logic in this file is the same code, applied to user * workspaces instead of the bundled assets. */ export declare const migration: Migration; export interface BackfillSummary { total: number; backfilled: number; already_present: number; per_path: { path: string; action: "backfilled" | "skipped"; }[]; } /** * Run only Pass 1a (frontmatter backfill) on a workspace and return a * summary. Useful for `solosquad migrate --dry-run` style introspection. */ export declare function runFrontmatterBackfill(workspace: string): BackfillSummary;