feat(copilot): add repo-level Copilot instruction files#203
Conversation
Deploys .github/copilot-instructions.md customized for TalkTerm's stack (Electron 41, React 19, Vite, Vitest, Stryker, Clean Architecture + DDD), plus language-specific instruction files for TypeScript and JavaScript. Part of the org-wide rollout from petry-projects/.github PR #328.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds three documentation files: TalkTerm-scoped Copilot instructions, org-wide JavaScript standards, and org-wide TypeScript/TSX standards describing tooling, coding, testing, logging, DDD, and Electron IPC rules. ChangesDevelopment Standards and Guidelines
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive development standards and Copilot instructions for the TalkTerm project and the Petry Projects organization. It establishes tech stack definitions, project structures, and coding standards for JavaScript and TypeScript, including specific guidelines for Domain-Driven Design (DDD), CQRS, and Electron development. The review feedback identifies critical issues including hallucinated version numbers for Electron and Node.js, the omission of the required 'pino' logging library from the key libraries list, and architectural inconsistencies between the project structure tree and the defined bounded contexts.
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Runtime:** Electron 41 (Node.js 24 + Chromium 144) |
There was a problem hiding this comment.
The runtime versions specified here (Electron 41, Node.js 24, Chromium 144) appear to be hallucinated. As of early 2025, the latest stable version of Electron is 34, and Node.js 24 has not been released. Providing incorrect version numbers to Copilot will lead to inaccurate code suggestions, such as the use of non-existent APIs or language features. Please update these to reflect the actual versions used in the project.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb465b8ba1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds repository-specific GitHub Copilot instruction files for TalkTerm, layering org-wide standards with TalkTerm’s Electron/React/TypeScript constraints and testing/tooling setup.
Changes:
- Add repo-level
.github/copilot-instructions.mdtailored to TalkTerm architecture and tooling. - Add language-specific instruction overlays for TypeScript/TSX and JavaScript via
.github/instructions/*.instructions.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| .github/instructions/typescript.instructions.md | Adds TypeScript/TSX development standards and examples to guide Copilot output. |
| .github/instructions/javascript.instructions.md | Adds JavaScript-specific standards for legacy/config scripts and migration guidance. |
| .github/copilot-instructions.md | Adds TalkTerm-specific Copilot guidance (stack, structure, testing, IPC boundary rules). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Runtime:** Electron 41 (Node.js 24 + Chromium 144) |
…ndards Makes the language instruction files discoverable directly from the copilot-instructions.md footer rather than requiring readers to browse .github/instructions/. Addresses CodeRabbit review feedback. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5354c0ff12
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| them — they increase circular dependency risk and slow down bundlers. | ||
| - **Naming:** `PascalCase` for types, interfaces, classes, and React components. `camelCase` for | ||
| variables, functions, and methods. `SCREAMING_SNAKE_CASE` for module-level constants. | ||
| File names match the primary export (`UserRepository.ts`, `OrderSummary.tsx`). |
There was a problem hiding this comment.
Align TypeScript filename rule with repo kebab-case convention
This rule conflicts with the repo’s own naming standard in AGENTS.md (General source files | kebab-case), so Copilot will be steered to generate non-component TS files like UserRepository.ts that violate project conventions. Because this file is an always-on instruction source, the mismatch will repeatedly introduce avoidable churn (renames, inconsistent imports, and review noise) across new TypeScript code.
Useful? React with 👍 / 👎.
| - Always handle the error case explicitly — never use `.catch(() => {})` silently. | ||
| - Fail fast with a clear, descriptive error when an invariant is violated. | ||
|
|
||
| ## Testing (Vitest / Jest) |
There was a problem hiding this comment.
Remove Jest option from TypeScript testing guidance
This repository standardizes on Vitest (AGENTS.md Section 1 and npm scripts), but the instruction header presents Jest as an equally valid default. In practice this will steer Copilot to generate Jest-specific patterns (jest.fn, Jest config assumptions) that do not run in TalkTerm’s test setup, creating broken test scaffolding and avoidable rework in PRs.
Useful? React with 👍 / 👎.
| ## Testing | ||
|
|
||
| - Follow the same TDD rules as TypeScript: write tests before implementing, never `.skip()`. | ||
| - Use the same test runner as the rest of the project (Vitest or Jest). |
There was a problem hiding this comment.
Remove Jest option from JavaScript testing guidance
TalkTerm’s project instructions and scripts define Vitest as the test runner, but this line tells Copilot to use either Vitest or Jest. That ambiguity causes generated JavaScript tests to drift toward Jest APIs and conventions that are not configured here, which translates directly into failing or non-runnable suggested tests until manually rewritten.
Useful? React with 👍 / 👎.
| - Dev run: `npm run dev` | ||
| - Test: `npm test` | ||
| - Lint: `npm run lint` | ||
| - Format: `npm run format` | ||
| - Typecheck: `npm run typecheck` |
There was a problem hiding this comment.
Remove npm run script guidance that cannot execute here
This repository currently has no package.json, so the listed npm run commands are not executable in the repo as committed. Because Copilot uses this file as operational guidance, it will suggest validation and local workflows that fail immediately (npm ERR! missing script / missing package manifest), adding avoidable friction for anyone following these instructions.
Useful? React with 👍 / 👎.
|
@dev-lead Please fix all open reviewer comments on this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: LOW
Reviewed commit: e21c1cfbda8677963ae25c9ce53c0b1b1ea6ff3d
Review mode: triage-approved (single reviewer)
Summary
Docs-only PR adding three markdown files: a TalkTerm-scoped copilot-instructions.md and two org-wide language standards (typescript.instructions.md, javascript.instructions.md). Net diff is +267 / -0 across three new files. No source code, no schema or migrations, no auth/secrets, no CI/workflow changes, no dependency updates. Triage classified this as low-risk and that assessment holds on closer inspection.
Linked issue analysis
No linked issues; CodeRabbit's pre-merge "Linked Issues check" was skipped accordingly. The PR description references the org-wide rollout (petry-projects/.github PR #328), which is sufficient context for a per-repo instruction file deployment.
Findings
- Scope is appropriate. All changes are confined to
.github/documentation files intended to guide Copilot/agent behavior. Nothing executable, nothing that affects build, runtime, or security posture. - Author has been iterating on bot feedback. The follow-up commit
5354c0fadded language-instruction links to the org standards section in response to CodeRabbit review. CodeRabbit's most recent re-review reports "No actionable comments were generated." - Remaining bot comments are non-blocking. The open inline comments from gemini-code-assist, chatgpt-codex-connector, and Copilot are P2/medium-priority style and accuracy notes (e.g., Prettier
singleQuoteexamples using double quotes, comma spacing in YAML frontmatter glob lists, Chromium version pinning, bounded-context list vs. directory layout). These are content-quality nits in an instruction document, not correctness or security issues, and can be addressed in a follow-up if the maintainers find them worth pursuing. - No secrets, no risky patterns. The doc references
ANTHROPIC_API_KEYonly to describe that it is entered at runtime and stored via ElectronsafeStorage— no value is committed.
CI status
All checks green on the head SHA:
- CodeQL — Analyze (actions): SUCCESS
- CodeQL — Analyze (python): SUCCESS
- CodeQL: SUCCESS
- CodeRabbit: SUCCESS
- SonarQube Cloud quality gate: passed (0 new issues, 0 security hotspots)
Merge state is BLOCKED only because human review approval has not yet been recorded; the branch is otherwise mergeable.
Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 682e722e2c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Use **pino** as the default structured logger. Never use `console.log`, `console.error`, or | ||
| `console.warn` in application code (`console.*` is acceptable only in CLI tools and build |
There was a problem hiding this comment.
Remove the unplanned pino logging directive
This repo’s standards and planning artifacts route operational behavior through the avatar error pipeline and audit trail, and the documented stack/dependencies do not include pino; making it the default logger here will steer Copilot to add import pino from "pino" in TypeScript application code, introducing an unplanned dependency and bypassing the project-specific error/audit pipeline.
Useful? React with 👍 / 👎.



Summary
.github/copilot-instructions.mdcustomized for TalkTerm's Electron + React + TypeScript stack.github/instructions/typescript.instructions.mdandjavascript.instructions.mdfrom the org canonical sourceStack discovered
Electron 41 · Node.js 24 · React 19 · TypeScript (strict) · Vite · Tailwind CSS · Rive · Vitest · React Testing Library · Playwright · Stryker · better-sqlite3 · Claude Agent SDK
References
🤖 Generated with Claude Code
Summary by CodeRabbit