diff --git a/AGENTS.md b/AGENTS.md index 60531d1..fe37cf6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,11 @@ This document provides workspace-level instructions for AI agents working anywhe ### General Workspace Rules - Always let the user review the proposed commit scope and commit message first, and wait for explicit approval before creating any local git commit in this workspace. +- Treat commit-related wording such as `commit it`, `make the commit`, `create a git`, `give me a commit`, or close variations as a request to prepare the commit for review, not as approval to run `git add` or `git commit`. +- Before running any local `git add` or `git commit`, show the repo path, current branch, exact files to stage, and exact commit message. +- Only run `git add` or `git commit` after the operator replies with the exact phrase `approve commit` for the displayed scope and message. +- If the proposed scope or message changes after review, show the updated scope/message and require a new `approve commit`. +- Never treat approval to commit as approval to push. Pushing requires a separate explicit request after the commit exists. - Never commit or push to the nested `galaxy-complete` repo under `/home/aw/code/cds/galaxy-complete` without the user's explicit approval. - Never assume work in `/home/aw/code/cds` should be pushed to `rnd.cdsi.us.com`. @@ -70,6 +75,7 @@ When the user explicitly asks to "create a git" or otherwise requests git/commit 4. When generating git commands that need SSH, use the user's one-off method exactly as: `GIT_SSH_COMMAND='ssh -i ~/.ssh/id_ed25519_anthony -o IdentitiesOnly=yes'` 5. Prefer complete copy-pasteable command sequences that are ready to run from `/root/cdc-e2e-cyp-12.17.4`. +6. The exact `approve commit` handshake above applies only to commits this agent would execute locally; ATVM Cypress machine/vm git requests remain draft-only unless the operator explicitly overrides that rule. If the user does not specify the ATVM Cypress machine/vm, follow the general workspace rules above and any other git guidance already in this file. diff --git a/atvm/AGENTS.md b/atvm/AGENTS.md index 117f6e0..8bd85e5 100644 --- a/atvm/AGENTS.md +++ b/atvm/AGENTS.md @@ -71,6 +71,10 @@ This file defines how to operate and maintain the ATVM workspace in `/home/aw/co - Default all ATVM automation runs to watcher-backed execution unless the operator explicitly says to run without watcher. - After starting an ATVM automation run, report the exact executed `cmc-templates.py` and `run-sorry-cypress.py` commands. - Treat git/commit requests as a separate approval gate. +- Treat commit-related wording such as `commit it`, `make the commit`, `create a git`, `give me a commit`, or close variations as a request to prepare the commit for review, not as approval to run `git add` or `git commit`. +- Before any local `git add` or `git commit`, show the repo path, current branch, exact files to stage, and exact commit message. +- Only run `git add` or `git commit` after the operator replies with the exact phrase `approve commit` for the displayed scope and message. +- If the proposed scope or message changes after review, show the updated scope/message and require a new `approve commit`. - Follow `/home/aw/code/cds/atvm/git-guide.md` for ATVM git command drafting and commit-request handling, including the rule that the controller `e2e cypress` repo behavior only applies when the operator explicitly asks for the `e2e cypress` repo or a close variation, the rule to draft plain git commands rather than SSH-wrapped controller login commands unless explicitly requested, the SSH-prefixed push example requirement for that repo, and the rule that phrases such as `create me a git`, `create a git`, `create a git description`, `make me a git`, `make a git`, `make me a git description`, `create me a git description`, and close variations are prepare-only until the operator explicitly approves the displayed commit command. - Never execute `git push` from the assistant for this workspace. - After creating a local commit for the explicitly requested `e2e cypress` controller repo, stop and give the operator the exact manual SSH-prefixed push command reference from `git-guide.md`, unless they explicitly ask for a different remote or branch. diff --git a/atvm/git-guide.md b/atvm/git-guide.md index 5064e69..86ec02b 100644 --- a/atvm/git-guide.md +++ b/atvm/git-guide.md @@ -36,7 +36,7 @@ This file records ATVM-specific git workflow preferences for `/home/aw/code/cds/ - the exact `git commit` command planned for execution - When a detailed body is warranted, do not reduce the proposed commit to only the short title at execution time. - Do not run `git commit` immediately after drafting the message. -- Wait for explicit user approval before creating the commit. +- Wait for exact user approval before creating the commit. - Do not treat a request such as "give me the git commit" or "make the commit" as approval by itself. - Do not treat a request such as "create a git for me", "show me a proposed git commit", "prepare the commit", or any similar commit-related wording as approval by itself. - Treat all of the following as approval-gated prepare-only requests, not as permission to run `git commit`: @@ -50,7 +50,9 @@ This file records ATVM-specific git workflow preferences for `/home/aw/code/cds/ - Treat close variations of those phrases with the same intent the same way. - If the request means "prepare or create git/commit wording or a commit", ask for approval first before running any commit action. - Treat every commit-related request as prepare-and-show-only until the operator explicitly approves the commit after seeing the proposed message or exact command. -- Only execute `git commit` after the operator explicitly approves the displayed commit command. +- For commits the assistant would execute locally, show the repo path, current branch, exact files to stage, and exact commit message before running `git add` or `git commit`. +- Only execute `git add` or `git commit` after the operator replies with the exact phrase `approve commit` for the displayed scope and message. +- If the proposed scope or message changes after review, show the updated scope/message and require a new `approve commit`. - If there is any ambiguity about whether the operator is asking for preparation versus execution, default to not committing. ## Push Requests