Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 20, 2025

This PR implements comprehensive GitHub Copilot instructions to help AI assistants understand and work effectively with the Riteway testing library.

What's Added

.cursorrules

A comprehensive project configuration file that provides AI assistants with:

  • Complete project overview and architecture documentation
  • Coding standards and test writing patterns specific to Riteway
  • Development workflow including common commands (npm test, npm run lint, etc.)
  • Key design principles emphasizing Readable, Isolated, Thorough, and Explicit tests
  • Best practices for maintaining the required {given, should, actual, expected} assertion pattern

/ai Directory with Specialized Prompts

A collection of detailed guides for common development scenarios:

  • test-writing.md - Comprehensive patterns for writing Riteway tests with examples for pure functions, async operations, error handling, and React components
  • component-testing.md - React component testing patterns using render() and match() utilities, including event handling and conditional rendering
  • api-development.md - Guidelines for extending the Riteway API while maintaining backward compatibility and design principles
  • debugging.md - Common test failure patterns and debugging strategies with solutions for async issues, object comparisons, and environment problems
  • refactoring.md - Safe refactoring techniques for both test code and production code with step-by-step examples

AI_SETUP.md

Documentation explaining how the AI assistance works and what benefits developers can expect when using compatible AI tools.

Benefits for Developers

AI assistants will now:

  • Generate proper Riteway test code following the required assertion pattern
  • Understand the project's unique testing philosophy and conventions
  • Provide contextually appropriate debugging suggestions
  • Suggest refactoring approaches that maintain test reliability
  • Help with React component testing using Riteway's utilities

Example Improvement

Before this setup, an AI might generate generic test code:

test('should work', () => {
  expect(myFunction()).toBe(true);
});

After this setup, AI assistants will generate proper Riteway tests:

describe('myFunction()', async assert => {
  assert({
    given: 'valid input parameters',
    should: 'return expected result',
    actual: myFunction(input),
    expected: expectedOutput
  });
});

The configuration automatically activates when using compatible AI tools - no additional setup required.

Fixes #377.


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

Copilot AI and others added 2 commits August 20, 2025 03:08
Co-authored-by: ericelliott <364727+ericelliott@users.noreply.github.com>
Co-authored-by: ericelliott <364727+ericelliott@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions ✨ Set up Copilot instructions with .cursorrules and AI prompts Aug 20, 2025
Copilot AI requested a review from ericelliott August 20, 2025 03:10
ericelliott pushed a commit that referenced this pull request Jan 22, 2026
Create comprehensive task epic for implementing AI-native testing capabilities:
- Migrate PR #378 ai/ folder to riteway-ai/
- Build prompt compilation system for downstream use
- Implement riteway ai CLI command
- Add test output recording in ai-evals/
- Support rich TAP format with media embeds
- Full unit and e2e test coverage

Epic includes 9 sequential tasks with clear requirements and success criteria.

https://claude.ai/code/session_0135XoydQ5XAwSUrt6mrEdr6
ericelliott pushed a commit that referenced this pull request Jan 22, 2026
Focus epic solely on riteway ai CLI implementation:
- Removed section A (Migrate PR #378 Content)
- Removed section B (Prompt Compilation System)
- Removed Tasks 1-3 (migration and compilation tasks)
- Renumbered remaining tasks 4-9 to 1-6
- Updated dependencies to reflect new task numbers
- Reduced total effort from Large to Medium
- Updated next steps to start with CLI analysis

Epic now has clear focus: implement riteway ai command for testing prompts.

https://claude.ai/code/session_0135XoydQ5XAwSUrt6mrEdr6
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.

✨ Set up Copilot instructions

2 participants