Skip to content

Agent files use VS Code conventions instead of Primer conventions #24

@digitarald

Description

@digitarald

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions