Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 23, 2025

This PR adds comprehensive GitHub Copilot instructions to help AI coding assistants work effectively with the cbElasticsearch module. The instructions provide essential context about the project's architecture, coding conventions, and development practices.

What's Added

A new .github/copilot-instructions.md file that includes:

  • Project Overview: Detailed description of cbElasticsearch as an Elasticsearch integration for the ColdBox Framework
  • Architecture Documentation: Core components like SearchBuilder, Document, IndexBuilder, and their relationships
  • CFML/ColdFusion Guidelines: Language-specific conventions, file extensions, and component structure patterns
  • Code Style Standards: Formatting rules derived from existing .cfformat.json and .cflintrc configurations
  • Development Environment: Setup instructions, prerequisites, and environment variables
  • Testing Framework: TestBox usage patterns and test structure examples
  • Build & Deploy Process: Commands for code formatting, building, and releasing
  • Security & Performance Guidelines: Best practices for safe and efficient code
  • Common Development Tasks: Specific guidance for adding search methods, index operations, and configuration changes

Why This Matters

The cbElasticsearch module uses ColdFusion/CFML with the ColdBox framework, which has specific patterns and conventions that may not be familiar to all AI coding assistants. These instructions ensure that:

  1. AI assistants understand the fluent API patterns used throughout the codebase
  2. Code contributions follow established formatting and naming conventions
  3. New features integrate properly with the WireBox dependency injection system
  4. Changes maintain compatibility with the supported CFML engines (Lucee and Adobe ColdFusion)
  5. Testing follows the existing TestBox patterns

Example Impact

Before these instructions, an AI assistant might write generic code. With these instructions, it will understand to write ColdBox-specific patterns like:

component accessors="true" {
    property name="config" inject="Config@cbelasticsearch";
    
    public SearchBuilder function match( required string field, required any value ) {
        // Fluent API pattern that returns this for chaining
        return this;
    }
}

This follows the project's established patterns for dependency injection, fluent APIs, and CFML conventions.

Fixes #144.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor Author

Copilot AI commented Sep 23, 2025

@jclausen 👋 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.

@jclausen jclausen closed this Sep 23, 2025
Copilot AI changed the title [WIP] Setup copilot instructions Setup Copilot instructions for cbElasticsearch repository Sep 23, 2025
Copilot AI requested a review from jclausen September 23, 2025 18:23
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 copilot instructions

2 participants