Skip to content

API Reference parrot.sdd.scripts.run_closeout_hooks

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

parrot.sdd.scripts.run_closeout_hooks

View source

Dispatch /sdd-done closeout hooks (FEAT-764). Exit: 0 ok · 1 blocking failure · 2 config/usage · 3 agents pending.

Alias Defaulting

Re-exported from parrot.sdd.scripts.closeout_hooks_config.Defaulting.

Alias EVENTS

Re-exported from parrot.sdd.scripts.closeout_hooks_config.EVENTS.

Class EventOutcome

Persisted result of one event run.

Fields:

Field Type Default Description
event str
feat_id str
results list[HookResult]
pending_agents list[dict[str, Any]]
blocking_failed bool False
evidence_md str ''

Alias HookContext

Re-exported from parrot.sdd.scripts.closeout_hooks_config.HookContext.

Alias HookKind

Re-exported from parrot.sdd.scripts.closeout_hooks_config.HookKind.

Alias HookResult

Re-exported from parrot.sdd.scripts.closeout_hooks_config.HookResult.

Alias HookSpec

Re-exported from parrot.sdd.scripts.closeout_hooks_config.HookSpec.

Alias HooksConfig

Re-exported from parrot.sdd.scripts.closeout_hooks_config.HooksConfig.

Alias HooksConfigError

Re-exported from parrot.sdd.scripts.closeout_hooks_config.HooksConfigError.

Function artifact_root

Return $SDD_HOOKS_ARTIFACT_ROOT or /tmp/claude-/sdd-hooks.

artifact_root() -> Path

Returns: Path

Function exit_code

Map an outcome to the CLI contract.

exit_code(outcome: EventOutcome) -> int

Parameter Type Default Description
outcome EventOutcome

Returns: int

Function finalize

Turn unrecorded pending hooks into failures and recompute blocking_failed (AC6).

finalize(event: str, feat_id: str, root: Path) -> EventOutcome

Parameter Type Default Description
event str
feat_id str
root Path

Returns: EventOutcome

Alias load_hooks

Re-exported from parrot.sdd.scripts.closeout_hooks_config.load_hooks.

Function main

CLI entry point.

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

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

Returns: int

Function record

Record a host-dispatched agent hook's outcome.

record(event: str, feat_id: str, name: str, status: str, summary: str, root: Path) -> EventOutcome

Parameter Type Default Description
event str
feat_id str
name str
status str
summary str
root Path

Returns: EventOutcome

Function render_evidence

Render the PR ## Evidence section (absolute artifact paths).

render_evidence(outcome: EventOutcome) -> str

Parameter Type Default Description
outcome EventOutcome

Returns: str

Alias run_builtin

Re-exported from parrot.sdd.scripts.closeout_builtins.run_builtin.

Function run_event

Run every enabled hook for event in declaration order.

Short-circuits after a blocking pre_pr failure: remaining hooks are skipped once a blocker fails or times out.

run_event(event: str, ctx: HookContext, cfg: HooksConfig, ctx_path: Path) -> EventOutcome

Parameter Type Default Description
event str
ctx HookContext
cfg HooksConfig
ctx_path Path

Returns: EventOutcome

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