Skip to content

API Reference parrot.sdd.scripts.migrate_index

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.sdd.scripts.migrate_index

View source

One-shot migration: monolithic sdd/tasks/.index.json → per-spec index files.

The script reads the legacy monolith, groups tasks by their feature slug (NOT feature_id — multiple specs share a numeric ID in the wild, so the slug is the disambiguator), and writes one JSON file per feature into sdd/tasks/index/<feature>.json. Tasks without a resolvable feature go to _orphans.json with a stderr warning per orphan.

The script is idempotent — re-running on the same input produces byte-equivalent output. It NEVER modifies or deletes the source monolith; removing the source is a separate, explicit step performed by a human after verifying the migration.

Function main

CLI entry point for the migration script.

main(argv: list[str] | None = None) -> int

Parameter Type Default Description
argv list[str] | None None

Returns: int

Function migrate

Split the monolithic source index into per-spec files under dest.

migrate(source: Path, dest: Path, dry_run: bool = False) -> int

Parameter Type Default Description
source Path Path to the legacy sdd/tasks/.index.json.
dest Path Directory where per-spec <feature>.json files are written (created if missing).
dry_run bool False When True, compute the plan and emit warnings but do not write any files.

Returns: int — Process exit code: 0 on success.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally