Skip to content

Conversation

Copy link

Copilot AI commented Aug 10, 2025

This PR implements comprehensive organization-wide GitHub Copilot instructions for SwitchbackTech, providing contextual guidance to ensure AI-generated code aligns with our "intentional software" philosophy and technical standards, specifically tailored to our Compass Calendar codebase.

What's Added

.github/copilot-instructions.md - A comprehensive instruction file covering:

Organization Context

  • Mission statement and philosophy of building intentional software for time management
  • Focus on minimalist design and user-centric development
  • Open source and community-driven approach

Technical Standards

  • Tech Stack: Complete coverage of React 18+, TypeScript, Node.js, MongoDB, Google Calendar API
  • Architecture: Monorepo patterns with Yarn workspaces, clean architecture principles
  • Coding Conventions: TypeScript strict mode, functional components, kebab-case files, co-located tests

Domain Expertise

  • Calendar-Specific Guidance: Time zone handling with dayjs, recurring events, Google Calendar sync patterns
  • Performance Optimization: Calendar rendering, virtual scrolling, React.memo() usage
  • Security Best Practices: OAuth implementation, data protection, session management

Compass-Specific TypeScript Patterns

The instructions include actual interfaces and patterns from our Compass repository:

// Real event interface from @core/types/event.types
interface Schema_Event {
  _id?: string;
  startDate?: string;
  endDate?: string;
  title?: string;
  description?: string | null;
  priority?: Priority;
  origin?: Origin;
  gEventId?: string;
  gRecurringEventId?: string;
  recurrence?: {
    rule?: string[];
    eventId?: string;
  };
  isAllDay?: boolean;
  isSomeday?: boolean;
  // ... other fields
}

// Component patterns with forwardRef and memo
export const GridEvent = memo(forwardRef<HTMLDivElement, GridEventProps>(
  ({ event, isDraft, isDragging, ...props }, ref) => {
    const isRecurring = event.recurrence && event.recurrence?.eventId !== null;
    const isInPast = dayjs().isAfter(dayjs(event.endDate));
    // ... implementation
  }
));

Key Features

  • Accurate Field Names: Uses actual field names like startDate/endDate, gEventId, _id
  • Real Enums: Includes actual Priority and Origin enums from constants
  • Import Patterns: Proper @core and @web alias usage
  • Zod Integration: Schema validation patterns with CoreEventSchema and extensions
  • Performance Patterns: React optimization techniques specific to calendar rendering

Repository-Specific Guidance

  • compass: Monorepo structure, Google Calendar sync considerations
  • compass-docs: Docusaurus conventions, code examples
  • .github: Organization-wide configuration best practices

Benefits

  • Consistent Code Quality: AI suggestions will follow established patterns and conventions
  • Domain Awareness: Copilot will understand calendar/time management context
  • Security-First: Built-in guidance for OAuth, data protection, and user privacy
  • Performance-Conscious: Optimizations specific to calendar rendering and real-time updates
  • Accurate Examples: TypeScript interfaces and patterns match the actual Compass codebase

The instructions reference existing documentation at docs.compasscalendar.com and maintain consistency with the established AGENTS.md guidance in the main compass repository.

Fixes #3.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Aug 10, 2025

@victor-enogwe 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] ✨ Setup "Organisation-Wide" Copilot Instructions. ✨ Setup Organization-Wide GitHub Copilot Instructions Aug 10, 2025
Copilot AI requested a review from victor-enogwe August 10, 2025 02:36
Copilot finished work on behalf of victor-enogwe August 10, 2025 02:36
@victor-enogwe
Copy link
Collaborator

issue: @copilot we don't use moment.js or date-fns. We use dayjs. Refactor the instructions to reflect this.

Copy link
Author

Copilot AI commented Aug 10, 2025

issue: @copilot we don't use moment.js or date-fns. We use dayjs. Refactor the instructions to reflect this.

Updated the instructions to use dayjs instead of moment.js or date-fns for date manipulation. (c5a8f2c)

Copilot finished work on behalf of victor-enogwe August 10, 2025 02:40
Copy link
Collaborator

Choose a reason for hiding this comment

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

:issue @copilot do not include extra files to this change

Copy link
Author

Choose a reason for hiding this comment

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

Removed the extra README.md changes. The PR now only includes the .github/copilot-instructions.md file as requested. (e3edf70)

Copilot AI requested a review from victor-enogwe August 10, 2025 02:47
Copilot finished work on behalf of victor-enogwe August 10, 2025 02:47
@victor-enogwe
Copy link
Collaborator

issue: @copilot update the typescript code and interface references to match what is contained in the [Compass][https://github.com/SwitchbackTech/compass] repository.

Copy link
Author

Copilot AI commented Aug 10, 2025

issue: @copilot update the typescript code and interface references to match what is contained in the [Compass][https://github.com/SwitchbackTech/compass] repository.

Updated the TypeScript interfaces and code examples to match the actual patterns used in the Compass repository. The instructions now include:

  • Real Schema_Event and Schema_GridEvent interfaces with proper field names (startDate/endDate, gEventId, etc.)
  • Actual Priority and Origin enums from the constants file
  • Component patterns using forwardRef and memo as seen in GridEvent
  • Proper import paths with @core and @web aliases
  • Zod schema validation patterns
  • Google Calendar integration field references

Commit: 66e866f

Copilot AI changed the title ✨ Setup Organization-Wide GitHub Copilot Instructions ✨ Setup Organization-Wide GitHub Copilot Instructions with Compass-Specific TypeScript Patterns Aug 10, 2025
Copilot finished work on behalf of victor-enogwe August 10, 2025 03:30
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.

✨ Setup "Organisation-Wide" Copilot Instructions.

2 participants