Skip to content

API Reference parrot.sdd.config

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

parrot.sdd.config

View source

Per-repository SDD configuration (sdd/config.json) — FEAT-633 rev 0.2, amendment C6.

Attribute CONFIG_PATH

Attribute DEFAULT_WORKTREE_ROOT

Type: str

Attribute LEGACY_WORKTREE_ROOT

Type: str

Class LegacyWorktreesError

Registered git worktrees still live under .claude/worktrees/; the message is the recipe.

Class ProcedureSettings

Procedure-graph settings (sdd/config.json key procedure -- FEAT-891).

Fields:

Field Type Default Description
enabled bool True
enforce bool True
brief_max_lines int 8
remote_probe_timeout_seconds int 5
skill_directories list[str]

Class SddConfig

Team-owned SDD settings. Secrets never belong here.

Fields:

Field Type Default Description
base_branch str 'dev'
staging_branch str | None None
hotfix_base str 'main'
ledger_branch str | None None
issue_tracker Literal['jira', 'none'] 'none'
jira_host str | None None
reviewer Literal['codex', 'none'] 'none'
test_command str | None None
projects list[str] | None None
techwiki TechwikiConfig | None None
procedure ProcedureSettings | None None

Class SddConfigError

Raised when sdd/config.json exists but cannot be used.

Alias TechwikiConfig

Re-exported from parrot.sdd.techwiki.config.TechwikiConfig.

Attribute WORKTREE_ROOT_ENV

Type: str

Function default_sdd_config

Return the configuration used when a repository has no sdd/config.json.

default_sdd_config() -> SddConfig

Returns: SddConfig

Function find_repo_root

Walk up from start (default cwd) to the first directory holding .git (dir or file).

find_repo_root(start: Path | None = None) -> Path | None

Parameter Type Default Description
start Path | None None

Returns: Path | None — The repository root, or None when start is not inside a repository.

Function ledger_destination

Return the branch the ledger outbox delivers to: ledger_branch, else base_branch.

ledger_destination(config: SddConfig) -> str

Parameter Type Default Description
config SddConfig

Returns: str

Function legacy_migration_recipe

Return shell lines that move legacy worktrees and repair Git registrations.

legacy_migration_recipe(repo_root: Path, paths: Sequence[Path]) -> list[str]

Parameter Type Default Description
repo_root Path Primary repository root.
paths Sequence[Path] Registered legacy worktree paths to move.

Returns: list[str] — A fail-fast shell recipe, or an empty list when there are no paths.

Raises:

  • ValueError — When a mapping is unsafe, a destination is already occupied, or a legacy worktree has a live process inside it.

Function legacy_worktrees

Return registered worktrees inside the legacy root, sorted by resolved path.

legacy_worktrees(repo_root: Path) -> list[Path]

Parameter Type Default Description
repo_root Path Primary repository root passed to git.

Returns: list[Path] — Registered legacy worktree paths, or an empty list when git is unavailable or fails.

Function load_sdd_config

Load <root>/sdd/config.json; absent file or no repository means defaults.

load_sdd_config(root: Path | None = None) -> SddConfig

Parameter Type Default Description
root Path | None None

Returns: SddConfig

Raises:

  • SddConfigError — When the file exists but is not valid JSON or fails validation.

Function worktree_root

Return the absolute, normalized worktree root for repo_root.

worktree_root(repo_root: Path, override: str | None = None) -> Path

Parameter Type Default Description
repo_root Path Primary repository root used for relative settings.
override str | None None Explicit root setting that takes precedence over the environment.

Returns: Path — The normalized absolute worktree root.

Function worktree_root_setting

Return the configured raw worktree root without consulting application configuration.

worktree_root_setting(override: str | None = None) -> str

Parameter Type Default Description
override str | None None Explicit root setting that takes precedence over the environment.

Returns: str — The normalized absolute setting, or a normalized repository-relative setting.

Function write_default_config

Write the default config to <root>/sdd/config.json.

write_default_config(root: Path) -> Path

Parameter Type Default Description
root Path

Returns: Path

Raises:

  • FileExistsError — When the file already exists (never overwritten).

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