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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .claude/HOOKS-CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Add to the `"hooks"` section in `.claude/settings.json`:
- Never blocks

**context-injector.sh** (UserPromptSubmit)
- Injects reminders based on prompt keywords (test, security, api, playwright, commit)
- Injects reminders based on prompt keywords (test, security, api, commit)
- Never blocks

---
Expand Down
12 changes: 5 additions & 7 deletions .claude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ This directory contains skills, workflows, rules, agents, and shared patterns fo
.claude/
├── commands/ # 19 actionable skills (invokable workflows)
├── rules/ # 4 development rules (auto-applied)
├── agents/ # 9 specialized agents
├── agents/ # 7 specialized agents
├── hooks/ # 6 hook scripts (2 wired, 4 available)
├── shared/patterns/ # 3 reusable pattern files
├── shared/patterns/ # 2 reusable pattern files
├── settings.json # Security hooks & permissions
├── HOOKS-CONFIG.md # Hook configuration guide
└── README.md # This file
Expand Down Expand Up @@ -84,7 +84,7 @@ This directory contains skills, workflows, rules, agents, and shared patterns fo

---

## Agents (8 Specialized)
## Agents (7 Specialized)

| Agent | Purpose |
|-------|---------|
Expand All @@ -94,7 +94,6 @@ This directory contains skills, workflows, rules, agents, and shared patterns fo
| `security-auditor` | Security vulnerability analysis |
| `documentation-writer` | Documentation updates |
| `codebase-explorer` | Fast codebase exploration |
| `frontend-agent` | JS/CSS/Go templates |
| `mistake-learner` | Abstract mistakes to learnings |

**References:** `agents/references/` contains helper-reference, security-checklist, doc-standards.
Expand All @@ -116,13 +115,12 @@ This directory contains skills, workflows, rules, agents, and shared patterns fo

---

## Shared Patterns (3 Files)
## Shared Patterns (2 Files)

| Pattern | Purpose |
|---------|---------|
| `go-test-patterns.md` | Table-driven tests, mocks, testify |
| `integration-test-patterns.md` | CLI + Air integration tests |
| `playwright-patterns.md` | Selectors, templates, commands |
| `integration-test-patterns.md` | CLI integration tests |

---

Expand Down
20 changes: 8 additions & 12 deletions .claude/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ This directory contains specialized agents for the Nylas CLI codebase.
| `security-auditor` | opus | Security vulnerability analysis | Safe |
| `documentation-writer` | sonnet | Documentation updates | Limited |
| `codebase-explorer` | haiku | Exploration | Safe |
| `frontend-agent` | sonnet | UI/CSS/JS | Limited |
| `mistake-learner` | sonnet | Learning capture | Serial only |

---
Expand All @@ -27,23 +26,22 @@ Use parallel agents to explore or review the 745-file codebase without exhaustin

| Task | Agents | Why |
|------|--------|-----|
| Full codebase exploration | 5 | One per major directory |
| Feature search | 4 | Search cli, adapters, air, tui simultaneously |
| Full codebase exploration | 4 | One per major directory |
| Feature search | 3 | Search cli, adapters, tui simultaneously |
| Multi-file PR review | 4 | Review different files in parallel |
| Test coverage analysis | 4 | Analyze different packages |

### Invocation Patterns

```
# Full exploration (4 agents)
"Explore using 4 parallel agents:
# Full exploration (3 agents)
"Explore using 3 parallel agents:
- Agent 1: internal/cli/
- Agent 2: internal/adapters/
- Agent 3: internal/air/
- Agent 4: internal/domain/ + ports/ + tui/"
- Agent 3: internal/domain/ + ports/ + tui/"

# Feature search (4 agents)
"Find all email-related code using 4 agents across cli, adapters, air, tui"
# Feature search (3 agents)
"Find all email-related code using 3 agents across cli, adapters, tui"

# PR review (4 agents)
"Review these 8 files using 4 parallel code-reviewer agents"
Expand All @@ -55,7 +53,6 @@ Use parallel agents to explore or review the 745-file codebase without exhaustin
|-----------|-------|----------------|
| `internal/cli/` | 268 | HIGH |
| `internal/adapters/` | 158 | HIGH |
| `internal/air/` | 117 | HIGH |
| `internal/tui/` | 77 | MEDIUM |
| `internal/domain/` | 21 | LOW (shared) |

Expand All @@ -81,7 +78,6 @@ Use parallel agents to explore or review the 745-file codebase without exhaustin
| `documentation-writer` | Different file writers | Another doc-writer |
| `code-writer` | Different directory writers | Same-file writers |
| `test-writer` | Different package writers | Same-package writers |
| `frontend-agent` | code-writer (Go only) | Another frontend-agent |
| `mistake-learner` | None (serial only) | All write agents |

### Key Benefit
Expand Down Expand Up @@ -118,7 +114,7 @@ Parallel agents have **isolated context windows** - prevents "dumb Claude mid-se
| Model | Cost | Use For |
|-------|------|---------|
| **opus** | $$$ | Quality/security validation (code-reviewer, security-auditor) |
| **sonnet** | $$ | Implementation (code-writer, test-writer, documentation-writer, frontend-agent) |
| **sonnet** | $$ | Implementation (code-writer, test-writer, documentation-writer) |
| **haiku** | $ | Exploration (codebase-explorer) |

**Principle:** Use the cheapest model that delivers acceptable quality for the task.
Expand Down
10 changes: 1 addition & 9 deletions .claude/agents/code-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You are an expert code writer for the Nylas CLI polyglot codebase. You write pro
| Can run with | Cannot run with |
|--------------|-----------------|
| codebase-explorer, code-reviewer | Another code-writer (same files) |
| frontend-agent (different dirs) | test-writer (same package) |
| - | test-writer (same package) |
| - | mistake-learner |

**Rule:** Only parallelize if working on DISJOINT files.
Expand All @@ -30,7 +30,6 @@ You are an expert code writer for the Nylas CLI polyglot codebase. You write pro
| Language | Patterns You Follow |
|----------|---------------------|
| **Go** | Hexagonal architecture, table-driven tests, error wrapping |
| **Frontend** | See `frontend-agent.md` for JS/CSS/templates |

---

Expand Down Expand Up @@ -204,13 +203,6 @@ After writing code, report:
2. Implement in `internal/adapters/nylas/{resource}.go`
3. Add mock in `internal/adapters/nylas/mock_{resource}.go`

### Adding Frontend Feature

1. Add handler in `internal/air/handlers_*.go`
2. Add template in `internal/air/templates/`
3. Add styles in `internal/air/static/css/`
4. Add JavaScript in `internal/air/static/js/`

---

## Rules
Expand Down
192 changes: 0 additions & 192 deletions .claude/agents/frontend-agent.md

This file was deleted.

7 changes: 3 additions & 4 deletions .claude/agents/mistake-learner.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You analyze mistakes caught during development and update CLAUDE.md with abstrac
| Can run with | Cannot run with |
|--------------|-----------------|
| codebase-explorer, code-reviewer | code-writer, test-writer |
| - | frontend-agent, another mistake-learner |
| - | another mistake-learner |

**Rule:** Run this agent LAST after all other write operations complete.

Expand Down Expand Up @@ -65,7 +65,7 @@ Transform specific incidents into general principles:

| Specific | Abstracted |
|----------|-----------|
| "Forgot to return after http.Error in handleGetEmail" | "Air handlers: ALWAYS return after error responses" |
| "Forgot to return after http.Error in a webhook handler" | "HTTP handlers: ALWAYS return after error responses" |
| "Test failed because mock wasn't set up" | "Go tests: ALWAYS verify mock functions are set before asserting" |
| "Calendar showed wrong time in March" | "Calendar: ALWAYS handle DST transitions in time comparisons" |

Expand All @@ -86,8 +86,7 @@ Choose the right LEARNINGS subsection:
Examples:
```
- Go tests: ALWAYS use t.Cleanup() for resource teardown (prevents leaks)
- Air handlers: NEVER write response body after WriteHeader() (causes superfluous warning)
- Playwright: ALWAYS waitForSelector before click (Air lazy-loads content)
- HTTP handlers: NEVER write response body after WriteHeader() (causes superfluous warning)
```

### 5. Update CLAUDE.md
Expand Down
Loading
Loading