Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .agent/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ mode: subagent
> **Skip this section if you don't have Edit/Write/Bash tools** (e.g., Plan+ agent).
> Read-only agents should proceed directly to responding to the user.

**CRITICAL**: This check MUST be performed BEFORE any edit/write tool call.
**CRITICAL**: This check MUST be performed BEFORE:
- **Creating** new files
- **Editing** existing files
- **Writing** any content to disk
- Using Edit, Write, or Bash tools that modify files

Failure to follow this workflow is a bug in the AI assistant's behavior.

**Self-check before editing**: Say "Checking git branch..." and run:
**Trigger words requiring this check**: create, add, write, update, modify, change, fix, implement, refactor.
If the user's request contains ANY of these, run the check FIRST.

**Self-check before any file operation**: Say "Checking git branch..." and run:

```bash
~/.aidevops/agents/scripts/pre-edit-check.sh
Expand Down Expand Up @@ -43,6 +51,15 @@ If the script outputs "STOP - ON PROTECTED BRANCH", you MUST NOT proceed with ed

**Why this matters**: Skipping this check causes direct commits to `main`, bypassing PR review.

**Self-verification**: Before ANY file operation, ask yourself:
"Have I run pre-edit-check.sh in this session?" If unsure, run it NOW.

**Working in aidevops framework**: When modifying aidevops agents, you work in TWO locations:
- **Source**: `~/Git/aidevops/.agent/` - THIS is the git repo, check branch HERE
- **Deployed**: `~/.aidevops/agents/` - copy of source, not a git repo

Run pre-edit-check.sh in `~/Git/aidevops/` BEFORE any changes to either location.

---

<!-- AI-CONTEXT-START -->
Expand Down Expand Up @@ -157,6 +174,9 @@ User confirms with numbered options to override if needed.
# List all worktrees
~/.aidevops/agents/scripts/worktree-helper.sh list

# Find sessions for open worktrees
~/.aidevops/agents/scripts/worktree-sessions.sh list

# Clean up after merge
~/.aidevops/agents/scripts/worktree-helper.sh clean
```
Expand Down
Loading
Loading