Skip to content

Commit e75ce2f

Browse files
authored
docs: add recent feature highlights to README (#19)
* docs: add recent feature highlights to README Add documentation for features from the past 2 days: - GitHub AI Agent Integration: Security-hardened /oc commands for AI-powered issue resolution with prompt injection protection - Terminal Tab Title Sync: Auto-updates terminal title with repo/branch - Ralph Loop: Iterative AI development with auto-fix loops - Git Worktrees: Parallel branch development workflow These features enhance developer experience and enable autonomous AI-assisted development workflows. * docs: address CodeRabbit review feedback - Clarify pre-edit-check.sh primary role (git workflow protection) - Use placeholder format for terminal title example - Fix script path to .agent/scripts/ (source location) - Use <MAX_ITERATIONS> placeholder in examples - Change 'fixing' to 'resolving' for formal tone - Add credential security note
1 parent 717dd39 commit e75ce2f

File tree

1 file changed

+112
-1
lines changed

1 file changed

+112
-1
lines changed

README.md

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,64 @@ The setup offers to install [oh-my-opencode](https://github.com/code-yeongyu/oh-
224224

225225
See `.agent/tools/opencode/oh-my-opencode.md` for the full compatibility guide.
226226

227+
### GitHub AI Agent Integration
228+
229+
Enable AI-powered issue resolution directly from GitHub. Comment `/oc fix this` on any issue and the AI creates a branch, implements the fix, and opens a PR.
230+
231+
**Security-first design** - The workflow includes:
232+
- Trusted users only (OWNER/MEMBER/COLLABORATOR)
233+
- `ai-approved` label required on issues before AI processing
234+
- Prompt injection pattern detection
235+
- Audit logging of all invocations
236+
- 15-minute timeout and rate limiting
237+
238+
**Quick setup:**
239+
240+
```bash
241+
# 1. Install the OpenCode GitHub App
242+
# Visit: https://github.com/apps/opencode-agent
243+
244+
# 2. Add API key secret
245+
# Repository → Settings → Secrets → ANTHROPIC_API_KEY
246+
247+
# 3. Create required labels
248+
gh label create "ai-approved" --color "0E8A16" --description "Issue approved for AI agent"
249+
gh label create "security-review" --color "D93F0B" --description "Requires security review"
250+
```
251+
252+
The secure workflow is included at `.github/workflows/opencode-agent.yml`.
253+
254+
**Usage:**
255+
256+
| Context | Command | Result |
257+
|---------|---------|--------|
258+
| Issue (with `ai-approved` label) | `/oc fix this` | Creates branch + PR |
259+
| Issue | `/oc explain this` | AI analyzes and replies |
260+
| PR | `/oc review this PR` | Code review feedback |
261+
| PR Files tab | `/oc add error handling here` | Line-specific fix |
262+
263+
See `.agent/tools/git/opencode-github-security.md` for the full security documentation.
264+
227265
**Supported AI Assistants:** (OpenCode & Zed are our daily drivers and preferred tools, so will have the most continual testing. All 18 assistants below have MCP configuration support.)
228266

229267
**Preferred:**
230268

231-
- **[Tabby](https://tabby.sh/)** - Modern terminal with colour-coded Profiles. Use different profile colours per project/repo to visually distinguish which codebase you're working in.
269+
- **[Tabby](https://tabby.sh/)** - Modern terminal with colour-coded Profiles. Use different profile colours per project/repo to visually distinguish which codebase you're working in. **Auto-syncs tab title with git repo/branch.**
232270
- **[OpenCode](https://opencode.ai/)** - Primary choice. Powerful agentic TUI/CLI with native MCP support, Tab-based agent switching, and excellent DX.
233271
- **[Zed](https://zed.dev/)** - High-performance editor with AI (Preferred, with the OpenCode Agent Extension)
234272

273+
### Terminal Tab Title Sync
274+
275+
Your terminal tab/window title automatically shows `repo/branch` context when working in git repositories. This helps identify which codebase and branch you're working on across multiple terminal sessions.
276+
277+
**Supported terminals:** Tabby, iTerm2, Windows Terminal, Kitty, Alacritty, WezTerm, Hyper, and most xterm-compatible terminals.
278+
279+
**How it works:** The `pre-edit-check.sh` script's primary role is enforcing git workflow protection (blocking edits on main/master branches). As a secondary, non-blocking action, it updates the terminal title via escape sequences. No configuration needed - it's automatic.
280+
281+
**Example format:** `{repo}/{branch-type}/{description}`
282+
283+
See `.agent/tools/terminal/terminal-title.md` for customization options.
284+
235285
**IDE-Based:**
236286

237287
- **[Cursor](https://cursor.sh/)** - AI-first IDE with MCP support
@@ -844,6 +894,67 @@ Plans are tracked in `TODO.md` (all tasks) and `todo/PLANS.md` (complex executio
844894
| Command | Purpose |
845895
|---------|---------|
846896
| `/agent-review` | Analyze session and suggest agent improvements |
897+
| `/preflight-loop` | Run preflight checks iteratively until all pass |
898+
899+
### Ralph Loop - Iterative AI Development
900+
901+
The **Ralph Loop** (named after Ralph Wiggum's persistent optimism) enables autonomous iterative development. The AI keeps working on a task until it's complete, automatically resolving issues that arise.
902+
903+
**How it works:**
904+
905+
```text
906+
Task → Implement → Check → Fix Issues → Re-check → ... → Complete
907+
↑ ↓
908+
└────────────────────┘ (loop until done)
909+
```
910+
911+
**Usage:**
912+
913+
```bash
914+
# Run quality checks iteratively until all pass
915+
.agent/scripts/quality-loop-helper.sh preflight --auto-fix --max-iterations <MAX_ITERATIONS>
916+
917+
# Or use the slash command
918+
/preflight-loop --auto-fix --max-iterations <MAX_ITERATIONS>
919+
```
920+
921+
**Note:** Store any API credentials securely via environment variables or `.env` files (never commit credentials to version control).
922+
923+
**Key features:**
924+
- Automatic issue detection and resolution
925+
- Configurable max iterations (prevents infinite loops)
926+
- Works with any quality check (linting, tests, builds)
927+
- Detailed logging of each iteration
928+
929+
See `.agent/workflows/ralph-loop.md` for the full workflow guide.
930+
931+
### Git Worktrees - Parallel Branch Development
932+
933+
Work on multiple branches simultaneously without stashing or switching. Each branch gets its own directory.
934+
935+
**Quick usage:**
936+
937+
```bash
938+
# Create worktree for a new branch
939+
~/.aidevops/agents/scripts/worktree-helper.sh add feature/my-feature
940+
# Creates: ~/Git/aidevops-feature-my-feature/
941+
942+
# List all worktrees
943+
~/.aidevops/agents/scripts/worktree-helper.sh list
944+
945+
# Clean up after merge
946+
~/.aidevops/agents/scripts/worktree-helper.sh clean
947+
```
948+
949+
**Benefits:**
950+
- Run tests on one branch while coding on another
951+
- Compare implementations side-by-side
952+
- No context switching or stash management
953+
- Each OpenCode session can work on a different branch
954+
955+
The pre-edit check now recommends worktrees when creating branches, keeping your main directory on `main`.
956+
957+
See `.agent/workflows/worktree.md` for the complete guide.
847958

848959
### **Installation**
849960

0 commit comments

Comments
 (0)