Problem
The 3 agent files in .github/agents/ (code-review-opus, code-review-gemini, code-review-codex) are copy-pasted VS Code codebase review instructions. They reference conventions that don't apply to Primer:
- Tabs vs spaces (Primer uses 2-space indent)
I-prefixed interfaces (Primer doesn't use this)
localize() / nls.localize() for strings (not applicable)
Disposable lifecycle with _register() (not applicable)
/common/, /browser/, /node/ layering rules (not applicable)
- Microsoft copyright headers (Primer uses MIT)
When AI uses these agents for code review, it enforces the wrong conventions.
Suggestion
Rewrite agent files to reference Primer's actual conventions from copilot-instructions.md:
- ESM everywhere, TypeScript strict mode
- Commands in
src/commands/, services in src/services/, UI in src/ui/
CommandResult<T> pattern, safeWriteFile(), output discipline (stdout=JSON, stderr=human)
- Vitest for tests,
--json/--quiet flags on all commands
- Ink/React for TUI, Commander for CLI
Could also be a future Primer feature: primer generate agents that produces agent files matching detected repo conventions.
Problem
The 3 agent files in
.github/agents/(code-review-opus, code-review-gemini, code-review-codex) are copy-pasted VS Code codebase review instructions. They reference conventions that don't apply to Primer:I-prefixed interfaces (Primer doesn't use this)localize()/nls.localize()for strings (not applicable)Disposablelifecycle with_register()(not applicable)/common/,/browser/,/node/layering rules (not applicable)When AI uses these agents for code review, it enforces the wrong conventions.
Suggestion
Rewrite agent files to reference Primer's actual conventions from
copilot-instructions.md:src/commands/, services insrc/services/, UI insrc/ui/CommandResult<T>pattern,safeWriteFile(), output discipline (stdout=JSON, stderr=human)--json/--quietflags on all commandsCould also be a future Primer feature:
primer generate agentsthat produces agent files matching detected repo conventions.