Skip to main content

Module sidecar_config

Module sidecar_config 

Source
Expand description

Plan K t-007: .asd/config.toml reader for opt-in sidecar sharding. Today a single shape: per-package sharding via [sidecar] shard_by = "package". Default is “class” (one file per conclusion class, current behavior).

The file is intentionally tiny — most projects need no config. For projects where two teams edit the same conclusion class (e.g. both add Decisions in the same week), per-package sharding splits the file by package_dir(file) so independent inserts land in different shards and don’t touch the same JSONL lines.

Format:

[sidecar]
shard_by = "package"   # or "class" (default)

Schema is intentionally forgiving — unknown keys and missing files both fall through to defaults. We don’t want a typo in config to break the commit hook.

Structs§

BudgetConfig
Plan K t-008: size budget for the committed sidecar. Defaults chosen for AcmeFlow-scale projects: 1 MB total, 200 KB per shard file. Configurable per-project via .asd/config.toml.
SidecarConfig
Top-level sidecar config.

Enums§

ShardBy
How asd conclusions export lays out files under .asd/conclusions/.

Functions§

package_key_for_filename
Sanitize a package directory path (crates/foo/src) into a filename-safe key (crates--foo--src). Empty string (root- level file with no parent directory) becomes "_root".