Profile Authoring
A profile bundles a schema reference, assertion references, and pass configuration into a single file for repeatable compression. Instead of passing --schema, --assertions, and individual pass options every time, define them once in a profile.
Profile File Format
name: my-profileschema: path/to/schema.yamlassertions: - path/to/assertions-1.yaml - path/to/assertions-2.yamlpasses: strip-secrets: strip-comments: strip-defaults: skip_low_confidence: true emit-classes: strip-conformant: annotate-deviations: deviation-summary: prune-empty:Fields
| Field | Description |
|---|---|
name | Human-readable profile name (optional, for display). |
schema | Relative path to a schema file. |
assertions | List of relative paths to assertion files. |
passes | Map of pass names to config. Use null or empty for defaults. |
Path Resolution
All paths are resolved relative to the profile file’s directory, not the current working directory. This makes profiles portable.
Bundled Profiles
decoct ships with a bundled docker-compose profile:
decoct compress config.yaml --profile docker-composeThis includes the Docker Compose schema, deployment standards assertions (12 rules), and a full pipeline.
Pass Configuration
| Pass | Config Options |
|---|---|
strip-secrets | secret_paths (list), entropy_threshold (float, default 4.5), min_entropy_length (int, default 16) |
strip-comments | — |
strip-defaults | skip_low_confidence (bool, default false) |
drop-fields | patterns (list of path patterns) |
keep-fields | patterns (list of path patterns to retain) |
emit-classes | — |
strip-conformant | — |
annotate-deviations | — |
deviation-summary | — |
prune-empty | — |
Pass Ordering
You don’t need to order passes in the profile. The pipeline automatically sorts them using topological ordering based on run_after/run_before constraints:
strip-secretsalways runs firststrip-defaultsruns after secrets and commentsstrip-conformantruns after defaultsemit-classesruns after defaults and prune-emptyannotate-deviationsruns after conformant strippingdeviation-summaryruns after annotation
Example Profiles
Minimal (generic cleanup)
name: minimalpasses: strip-secrets: strip-comments: prune-empty:Schema-aware
name: kubernetes-defaultsschema: schemas/kubernetes.yamlpasses: strip-secrets: strip-comments: strip-defaults: emit-classes: prune-empty:Full compliance check
name: docker-fullschema: schemas/docker-compose.yamlassertions: - assertions/deployment-standards.yamlpasses: strip-secrets: strip-comments: strip-defaults: emit-classes: strip-conformant: annotate-deviations: deviation-summary: prune-empty:Focused extraction
name: networking-onlyschema: schemas/docker-compose.yamlpasses: strip-secrets: keep-fields: patterns: - "services.*.ports" - "services.*.networks" - "networks.**" prune-empty:Conservative stripping
name: conservativeschema: schemas/learned-schema.yamlpasses: strip-secrets: strip-comments: strip-defaults: skip_low_confidence: true emit-classes: prune-empty:Sharing Profiles
Profiles are plain YAML files that can be:
- Committed to your repository alongside infrastructure configs
- Shared in a team config directory for different platforms
- Published as a package alongside custom schemas and assertions
Keep schema and assertion paths relative to the profile file for portability.