Skip to content
Open
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
26 changes: 26 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,36 @@ Open-source forum software built on the [AT Protocol](https://atproto.com/). Por
7. **No raw SQL** -- Drizzle ORM with parameterized queries only.
8. **Structured logging** -- Pino logger, never `console.log`.

### Before Starting Any Issue

**Always check for existing work before implementing anything:**

1. Search for open PRs that may already address the issue: `gh pr list --repo singi-labs/barazo-website --state open`
2. Search for related branches: `gh api repos/singi-labs/barazo-website/branches --paginate`
3. Scan the codebase for partial implementations of the feature
4. Check closed PRs for previously attempted work
Comment on lines +54 to +55

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Consider adding specific commands for completeness.

Items 3 and 4 provide general guidance but lack concrete commands that agents can execute. Consider adding specific examples:

📋 Suggested additions
-3. Scan the codebase for partial implementations of the feature
-4. Check closed PRs for previously attempted work
+3. Scan the codebase for partial implementations: `rg -i "relevant-keyword" --type ts`
+4. Check closed PRs for previously attempted work: `gh pr list --repo singi-labs/barazo-website --state closed --search "keyword"`
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 54 - 55, Update AGENTS.md items 3 and 4 to replace
vague guidance with concrete, copy-pasteable commands and examples: for item 3
add explicit search commands and patterns to locate partial implementations
(e.g., repository-wide text search instructions, common filenames and keywords
to look for, and how to include/exclude test or vendor dirs) and for item 4 add
exact steps to query closed PRs (describe using GitHub/Git CLI or web UI
filters, which labels/titles to look for and how to search by timeframe or
author). Mention these examples inline under each item and include a brief note
about adapting filters to the repo’s conventions.


The GitHub board may lag behind actual implementation state. Partial or complete implementations may exist without being reflected in issue status. Never duplicate work -- always verify first.

### Git Workflow

All changes go through Pull Requests -- never commit directly to `main`. Branch naming: `type/short-description` (e.g., `feat/add-reactions`, `fix/xss-sanitization`).

**Use git worktrees for all feature work.** Each branch must get its own working directory. This prevents multiple agents from stepping on each other's files and allows parallel work without stashing.

```bash
# Create a worktree for your branch
git worktree add /tmp/barazo-website-<branch-name> -b <branch-name> origin/main

# Work in the worktree
cd /tmp/barazo-website-<branch-name>

# When done, remove the worktree
git worktree remove /tmp/barazo-website-<branch-name>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add safety guidance for worktree removal.

The git worktree remove command can fail if there are uncommitted changes or if you're currently inside the worktree directory. Consider adding a note about prerequisites for safe cleanup.

📝 Suggested addition after line 72
 # Work in the worktree
 cd /tmp/barazo-website-<branch-name>
 
+# Before removal: ensure you're outside the worktree and changes are committed/merged
+cd /singi-labs/repos/barazo-website/
+
 # When done, remove the worktree
-git worktree remove /tmp/barazo-website-<branch-name>
+git worktree remove /tmp/barazo-website-<branch-name>  # Add --force if needed
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` at line 73, Add a short safety note immediately after the "git
worktree remove /tmp/barazo-website-<branch-name>" line explaining
prerequisites: ensure you are not currently inside the worktree directory,
commit or stash any uncommitted changes (or discard them intentionally), and
that the branch/worktree is not checked out elsewhere; mention using "git
worktree remove --force" only when you understand it will drop local changes and
suggest "git worktree prune" or cleaning up locks if removal still fails.

```

Never work directly in the main checkout (`/singi-labs/repos/barazo-website/`). Always create a worktree per issue. Clean up the worktree after the PR is merged.

### AT Protocol Context

- Users own their data (stored on their Personal Data Server)
Expand Down
Loading