From bfbd42f9bdc77cbd0a1a1f40293f299244194ac2 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Mon, 5 Oct 2026 07:36:25 +0200 Subject: [PATCH] docs: require atomic commits per task Define backlog tasks and independently testable acceptance criteria as commit boundaries, authorize local task commits by default, and keep shared-worktree staging under the coordinating agent. Validation: git diff --cached --check (passed) --- AGENTS.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index c1501ea..422ecd4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,11 +5,15 @@ Act as the Rust project steward for fader_master: a Linux MIDI-to-application-vo ## Working method and commits - Read the architecture, task dependencies, repository status, and affected code before changing behavior. Select the smallest independently testable acceptance criterion. -- For behavior changes, write a meaningful failing test, implement the behavior, and refactor with tests green. Use one commit per tested behavior or tightly coupled acceptance-test group; do not combine unrelated milestones or commit a deliberately failing intermediate state. -- Include the test and implementation in the same commit. Record the test command and result in the commit body. Documentation-only commits should record document validation rather than inventing runtime tests. +- Treat each selected backlog task or independently testable acceptance criterion as an atomic commit boundary. Finish and commit that boundary before starting the next one. If a backlog task contains independent behaviors, use multiple ordered commits; never combine separate tasks or milestones merely because they were requested together. +- A request to implement a task authorizes the local commits needed for that task. Do not ask again before each commit. An explicit user instruction not to commit overrides this default. Never push, publish, or create tags unless the user separately authorizes that action. +- For behavior changes, write a meaningful failing test, implement the behavior, and refactor with tests green. Keep the test and implementation in the same commit, and never commit a deliberately failing intermediate state. +- Record the test command and result in the commit body. Documentation-only commits should record document validation rather than inventing runtime tests. - Before each commit inspect the staged diff and run relevant tests. Before completing a milestone run the workspace gates below. If a gate is blocked, report its exact cause; never describe it as passing or mark an unverified implementation task complete. - Update task checkboxes only when their acceptance criteria pass. Keep design decisions, configuration examples, and user documentation consistent with implementation. -- Preserve user edits. Stage specific files. Do not amend, reset, force-push, or publish without authorization. Local incremental commits are requested for this project. +- At the start of every task, inventory the dirty worktree and identify changes that predate the task. Preserve those changes, stage explicit paths or hunks, and exclude unrelated work from the task commit. If safe separation is impossible, stop and ask rather than absorbing someone else's edits. +- When multiple agents share the worktree, give them non-overlapping task boundaries. Subagents report their changed files and verification results; the coordinating agent stages and creates the atomic commits so concurrent agents never race on the shared Git index. +- Use a task-specific imperative commit subject, referencing the backlog ID when one exists. Do not amend, reset, force-push, or publish without authorization. Local incremental commits are required for completed implementation tasks. - Keep research spikes bounded. Verify current dependency APIs, licenses, MSRV, and native prerequisites before adding a crate. Explain material tradeoffs in the architecture. ## Rust standards @@ -39,4 +43,4 @@ cargo build --workspace --release --all-features Also test the default build, no-default-features build, and each optional backend independently once feature flags exist. Provision native development libraries in CI. Hardware-free domain, fake-adapter, config, and TUI tests must run without an audio daemon or USB device. Keep real audio/hardware checks separately opt-in and document their fixtures and prerequisites. Add property tests for numerical conversions and state invariants; use a fake clock for retries and coalescing. Test observable behavior, including failure paths, rather than private implementation details. -Current baseline: the workspace is a scaffold, not an implementation of the architecture. Its Jenkinsfile lacks doctests and Clippy warning enforcement; Cargo.lock is currently ignored. Fix these deliberately in the foundation milestone. +Current baseline: the workspace remains primarily a scaffold rather than an implementation of the architecture. The `implementation-start` tag marks the tested CI coverage/badge baseline; the remaining foundation work, including a pinned toolchain/MSRV and the initial domain/config crates, stays ordered in `task.md`.