Skip to content

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-profile
schema: path/to/schema.yaml
assertions:
- path/to/assertions-1.yaml
- path/to/assertions-2.yaml
passes:
strip-secrets:
strip-comments:
strip-defaults:
skip_low_confidence: true
emit-classes:
strip-conformant:
annotate-deviations:
deviation-summary:
prune-empty:

Fields

FieldDescription
nameHuman-readable profile name (optional, for display).
schemaRelative path to a schema file.
assertionsList of relative paths to assertion files.
passesMap 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:

Terminal window
decoct compress config.yaml --profile docker-compose

This includes the Docker Compose schema, deployment standards assertions (12 rules), and a full pipeline.

Pass Configuration

PassConfig Options
strip-secretssecret_paths (list), entropy_threshold (float, default 4.5), min_entropy_length (int, default 16)
strip-comments
strip-defaultsskip_low_confidence (bool, default false)
drop-fieldspatterns (list of path patterns)
keep-fieldspatterns (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-secrets always runs first
  • strip-defaults runs after secrets and comments
  • strip-conformant runs after defaults
  • emit-classes runs after defaults and prune-empty
  • annotate-deviations runs after conformant stripping
  • deviation-summary runs after annotation

Example Profiles

Minimal (generic cleanup)

name: minimal
passes:
strip-secrets:
strip-comments:
prune-empty:

Schema-aware

name: kubernetes-defaults
schema: schemas/kubernetes.yaml
passes:
strip-secrets:
strip-comments:
strip-defaults:
emit-classes:
prune-empty:

Full compliance check

name: docker-full
schema: schemas/docker-compose.yaml
assertions:
- assertions/deployment-standards.yaml
passes:
strip-secrets:
strip-comments:
strip-defaults:
emit-classes:
strip-conformant:
annotate-deviations:
deviation-summary:
prune-empty:

Focused extraction

name: networking-only
schema: schemas/docker-compose.yaml
passes:
strip-secrets:
keep-fields:
patterns:
- "services.*.ports"
- "services.*.networks"
- "networks.**"
prune-empty:

Conservative stripping

name: conservative
schema: schemas/learned-schema.yaml
passes:
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.