Skip to content

feat(copilot): add repo-level Copilot instruction files#203

Open
don-petry wants to merge 11 commits into
mainfrom
feat/copilot-instructions
Open

feat(copilot): add repo-level Copilot instruction files#203
don-petry wants to merge 11 commits into
mainfrom
feat/copilot-instructions

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

@don-petry don-petry commented May 21, 2026

Summary

  • Adds .github/copilot-instructions.md customized for TalkTerm's Electron + React + TypeScript stack
  • Copies .github/instructions/typescript.instructions.md and javascript.instructions.md from the org canonical source
  • Covers: runtime (Electron 41 / Node.js 24), test setup (Vitest workspaces, Stryker mutation), Clean Architecture layers, IPC boundary contract, DDD bounded contexts

Stack 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

  • Documentation
    • Added organization-wide TypeScript and JavaScript development standards covering typing, formatting, linting, testing, and runtime practices.
    • Added repository-scoped Copilot instructions for the TalkTerm project describing project layout, dev/test/lint workflows, onboarding for required runtime keys, testing expectations, and architectural guidelines for renderer/main separation.

Review Change Stack

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.
Copilot AI review requested due to automatic review settings May 21, 2026 12:42
@don-petry don-petry requested a review from a team as a code owner May 21, 2026 12:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 020a11df-85fa-41f7-9ddb-c29e4050daf8

📥 Commits

Reviewing files that changed from the base of the PR and between eaaabdc and 97676ae.

📒 Files selected for processing (1)
  • .github/copilot-instructions.md

📝 Walkthrough

Walkthrough

Adds 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.

Changes

Development Standards and Guidelines

Layer / File(s) Summary
TalkTerm Project Context and Dev Setup
.github/copilot-instructions.md
Defines TalkTerm project scope, Electron + React + TypeScript stack, project directory layout, local dev/test/lint/format/typecheck commands, ANTHROPIC_API_KEY handling, test/mutation testing expectations, and repo-specific IPC and bounded-context overrides.
Organization JavaScript Development Standards
.github/instructions/javascript.instructions.md
Adds org-wide JavaScript conventions: prefer TypeScript, Prettier/ESLint enforcement, code style rules (no var, async/await, ES modules), JSDoc/// @ts-check`` guidance, Promise/error handling expectations, console usage restrictions, and Vitest/Jest testing/TDD conventions.
Organization TypeScript Development Standards
.github/instructions/typescript.instructions.md
Adds TypeScript/TSX standards: strict compiler settings, import/format/lint rules, type-safety patterns (unknown, branded types, discriminated unions, readonly), domain-driven design and bounded-context structure, CQRS naming/behavior constraints, pino structured logging with sensitive-field prohibitions, React functional/hook guidelines, typed result/error handling, co-located tests and Stryker mutation testing expectations, and Electron main/renderer IPC validation via contextBridge.

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(copilot): add repo-level Copilot instruction files' accurately and specifically summarizes the main change—adding Copilot instruction documentation files. It is concise, clear, and directly reflects the primary purpose of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/copilot-instructions

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Comment thread .github/copilot-instructions.md
Comment thread .github/copilot-instructions.md
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread .github/copilot-instructions.md
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.md tailored 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.

Comment thread .github/instructions/typescript.instructions.md
Comment thread .github/instructions/typescript.instructions.md
Comment thread .github/instructions/typescript.instructions.md
Comment thread .github/instructions/typescript.instructions.md
Comment thread .github/instructions/typescript.instructions.md
Comment thread .github/instructions/javascript.instructions.md

## Tech Stack

- **Runtime:** Electron 41 (Node.js 24 + Chromium 144)
github-actions Bot and others added 4 commits May 21, 2026 15:00
…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>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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`).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +43 to +47
- Dev run: `npm run dev`
- Test: `npm test`
- Lint: `npm run lint`
- Format: `npm run format`
- Typecheck: `npm run typecheck`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@don-petry
Copy link
Copy Markdown
Contributor Author

@dev-lead Please fix all open reviewer comments on this PR.

@don-petry don-petry enabled auto-merge (squash) June 1, 2026 12:39
Copy link
Copy Markdown
Contributor

@donpetry-bot donpetry-bot left a comment

Choose a reason for hiding this comment

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

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 5354c0f added 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 singleQuote examples 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_KEY only to describe that it is entered at runtime and stored via Electron safeStorage — 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.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +87 to +88
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants