Repository navigation
Closed
Description
Overview
Make the "one playbook = one responsibility" principle explicit and enforceable. This includes formalizing the rule in AGENTS, adding red-flag guidance and a pre-implementation checklist to the Ansible template guide, and publishing an ADR that defines atomic playbooks. Conditional enablement logic should live in Rust (command/step), not in Ansible when: clauses. The ADR is the core deliverable.
Specification: docs/issues/add-explicit-rule-for-atomic-ansible-playbooks.md
Scope
- Documentation/ADR only (no runtime code changes expected)
- Applies to Ansible playbook authoring and Rust-side orchestration expectations
Tasks
- Author ADR at docs/decisions/atomic-ansible-playbooks.md (context, decision, rationale, consequences, examples)
- Update AGENTS rule EPIC: Destroy Command Implementation #8 to explicitly require atomic playbooks and Rust-driven conditional execution; remind about registering static playbooks in
copy_static_templates() - Update docs/contributing/templates/ansible.md with Red Flags and a pre-implementation checklist steering contributors to create new atomic playbooks instead of modifying existing ones
Acceptance Criteria
- Pre-commit checks pass:
./scripts/pre-commit.sh - ADR docs/decisions/atomic-ansible-playbooks.md exists with decision, rationale, examples (wrong vs right), and consequences
- AGENTS rule EPIC: Destroy Command Implementation #8 explicitly mandates one playbook = one responsibility, clarifies Rust-side conditional execution, and mentions registering static playbooks
- Ansible guide includes a "Red Flags" section and a pre-implementation checklist that discourage multi-responsibility playbooks
- Guidance prohibits using Ansible
when:for service/feature enablement and directs that gating to Rust steps - Links between AGENTS, the Ansible guide, and the ADR are present and correct
Notes
Discovered in issue #292 when storage creation was added to existing playbooks instead of creating a new atomic one. Emphasize the Command → Step → Playbook flow and Rust-side gating instead of Ansible when: clauses.
Activity
josecelano commentedon Jan 27, 2026
Specification document: docs/issues/306-add-explicit-rule-for-atomic-ansible-playbooks.md
Key scope:
when:; registration via copy_static_templates)docs: [#306] add atomic ansible playbook rules
docs: remove completed issue #306 specification