Deply Config
Use this skill to create or audit a production-ready deply.yaml for a Python project and wire it into local checks, CI, and documentation.
Workflow
- Inspect the repository before asking questions:
- Package tree and Python source roots.
pyproject.toml,setup.py,setup.cfg, requirements files, lockfiles.Makefile,.github/workflows/,.gitlab-ci.yml, tox/nox/pre-commit config.- Existing docs, architecture notes, and framework imports.
- Existing
deply.yamlfiles anddeply:ignore/deply:ignore-filesuppressions.
- Ask only for intent that cannot be discovered:
- Preserve current architecture or enforce a target architecture.
- Strictness:
light,medium, orstrict. - CI rollout: fail immediately or explicitly accept reviewed debt in a baseline; check CLI support first.
- Read the needed references:
references/discovery.mdfirst for deterministic repository inspection before asking questions.references/deply-v1-schema.mdfor exact Deply v1 YAML, the v1.3.2+pyproject.tomlform, collectors, rules, and validation constraints.references/architecture-recipes.mdwhen choosing a target architecture style.references/presets.mdforlight,medium, andstrictAgent Skill profiles.references/framework-presets.mdfor Agent Skill guidance when the repo uses Django, FastAPI, Flask, Celery, or SQLAlchemy.references/adoption-and-audit.mdwhen auditing an existing config or adopting Deply in a legacy project.references/monorepo.mdwhen the repo has multiple apps, packages, or services.references/violation-triage.mdwhendeply analyzereports violations.references/ci-and-docs.mdwhen adding Makefile, CI, or documentation changes.
- Choose the mode:
- Create/update mode: generate or improve
deply.yamlwith public root keydeply:. When nodeply.yamlexists, checkdeply init --help. If supported and a packaged preset (layered,django,fastapi,flask) matches the discovered framework or layering, rundeply init --preset <name>instead of hand-writing YAML, then adapt layer directories and rules to the repository. Hand-write the config only on older CLIs or when no preset fits. - Audit mode: review existing config, CI, docs, and suppressions before proposing changes.
- Create/update mode: generate or improve
- Run
deply validate --config=deply.yamlfrom the project root. - Run
deply analyze --parallel --config=deply.yamlfrom the project root. - If violations exist, triage them before editing. Fix incorrect collectors/excludes first, without weakening intended boundaries. For accepted legacy debt, follow
references/adoption-and-audit.md: checkdeply analyze --help, create a baseline explicitly, then compare before and after code changes. Never refresh the baseline to hide new violations. Published v1.2.1 lacks baseline options; use its numeric threshold only when the user explicitly accepts that weaker check. - Before authorized code edits, check
deply context --help. If supported, rundeply context --file path/to/file.py --config=deply.yaml --report-format=jsonfor each file being edited. Read analysis status and file status first, then memberships, rules, direct callers/dependencies and related violations. Seereferences/violation-triage.mdfor the contract and older-CLI fallback. Context does not authorize edits by itself. - After code edits, run
deply analyze --config=deply.yaml --report-format=json, adding--baseline=path/to/reviewed-baseline.jsonwhen the project uses one. Do not refresh it to hide new violations. - Add local command, CI step, and short architecture docs when requested.
- Finish with the output contract below.
Rules
- Prefer the smallest config that enforces the intended boundaries.
- Do not invent unsupported keys such as
allow_layer_dependencies. - Do not add generated files, tests, migrations, virtualenvs, build output, or vendored code to analysis scope.
- Keep domain/business layers independent from frameworks, persistence, transport, and SDKs when using
mediumorstrict. - Do not add new Deply suppressions unless the user accepts a specific architectural reason.
- Report existing suppressions separately from new violations.
- Validate every config with the installed Deply CLI before presenting it as complete.
Final Output Contract
End every run with:
- Changed files.
- Mode: create/update or audit.
- Strictness:
light,medium,strict, ornot changed. - Validation command and result.
- Analyze command and result.
- Context command/status for edited files when supported, or the older-CLI fallback used.
- Current violation count; with baseline, counts of
new,existing, andresolveddiagnostics. - Existing suppression count and any new suppressions added.
- CI behavior: blocking, baseline with its path, legacy numeric threshold, or not changed. Include baseline creation/changes explicitly.
- Follow-up work, only if required to finish adoption safely.