DEVX-5: feat: add DEFAULT_INFRASTRUCTURE and configurable task prefix

This commit is contained in:
2026-06-22 19:03:53 +00:00
parent 33b09c162d
commit 6436c5dd38
6 changed files with 339 additions and 96 deletions
+17 -27
View File
@@ -87,43 +87,33 @@ strict = ["src/devx/config.py", "src/devx/exceptions.py", "src/devx/i18n.py", "s
# ---------------------------------------------------------------------------
# Change classification — determines which changes trigger a release
# ---------------------------------------------------------------------------
# Safe-by-default: any file NOT listed here defaults to user-facing
# (requiring a release). This prevents new file types from silently
# skipping releases.
# The framework provides DEFAULT_INFRASTRUCTURE (CI workflows, tests, docs,
# lint config, etc.) that applies to any Python project. We only specify
# what's different about devx.
#
# Rule priority (first match wins):
# 1. user_facing_overrides (safety — highest priority)
# 2. infrastructure_overrides (explicit per-file)
# 3. infrastructure (glob patterns)
# 3. infrastructure (DEFAULT_INFRASTRUCTURE + project-specific patterns)
# 4. Default: user-facing (safe)
[tool.devx.classify]
# Infrastructure paths — changes here don't trigger a release
infrastructure = [
".gitea/**",
"tests/**",
"docs/**",
"hooks/**",
"Makefile",
"cliff.toml",
".pre-commit-config.yaml",
".env.example",
".gitignore",
".ruff.toml",
"AGENTS.md",
"README.md",
"CHANGELOG.md",
"TROUBLESHOOTING.md",
".ansible-lint",
".github/**",
]
# use_defaults = true # (default) merge with DEFAULT_INFRASTRUCTURE
# Project-specific infrastructure paths (merged with defaults).
# devx has no additional infrastructure paths — everything not in the
# defaults is user-facing (src/devx/**, pyproject.toml, translations.json).
infrastructure = []
# Infrastructure overrides — files that would default to user-facing
# but are actually infrastructure:
# - __init__.py: only contains __version__ (release artifact, not code)
# - api_clients.py: used only by CI/CD scripts, not by the CLI
# - __init__.py: only contains __version__ (set by release.py, not user code)
#
# NOTE: api_clients.py is NOT here — it's used by devx's CI modules
# (auto_merge.py, release.py, pr_review.py, etc.) which consumer projects
# call via `python -m devx.ci.*`. Changes to api_clients.py affect consumer
# projects' CI behavior, so it IS user-facing.
infrastructure_overrides = [
"src/devx/__init__.py",
"src/devx/api_clients.py",
]
# User-facing overrides — safety override for broad infrastructure patterns
@@ -133,4 +123,4 @@ user_facing_overrides = []
# Tag patterns — additional categories for CI conditional execution
# Orthogonal to release impact (user-facing vs infrastructure)
[tool.devx.classify.tags]
ansible = ["ansible/**", ".ansible-lint"]
# No tags needed for devx itself — it has no ansible/ directory