Skip to content

API Reference parrot.sdd.scripts.heal_orphans

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

parrot.sdd.scripts.heal_orphans

View source

Self-healing sweep for stalled SDD task files (Python port of scripts/sdd/heal_orphans.sh, FEAT-633).

Reaps an sdd/tasks/active/<TASK-ID>-*.md only when a per-spec index marks it "done" AND a completed/ twin exists. Usage (identical to the shell script; --dry-run is honoured only as the FIRST argument):

python -m parrot.sdd.scripts.heal_orphans [--dry-run] [feature-slug]

Exit codes: 0 swept · 128 not a git repository (git parity).

Attribute ACTIVE_DIR

Attribute COMPLETED_DIR

Attribute INDEX_DIR

Function done_task_ids

H5: sorted unique ids with status "done" across indices; unreadable/invalid files contribute nothing.

done_task_ids(indices: Iterable[Path]) -> list[str]

Parameter Type Default Description
indices Iterable[Path]

Returns: list[str]

Function main

Port of heal_orphans.sh H1–H8.

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

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

Returns: int

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