Skip to content

Add comprehensive .github/copilot-instructions.md for AI coding agents#2

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/update-copilot-instructions-file
Draft

Add comprehensive .github/copilot-instructions.md for AI coding agents#2
Copilot wants to merge 2 commits intomainfrom
copilot/update-copilot-instructions-file

Conversation

Copy link
Contributor

Copilot AI commented Oct 14, 2025

Overview

This PR adds a comprehensive .github/copilot-instructions.md file to guide AI coding agents working on the WellTech AI MedSuite™ project. The documentation provides detailed guidance on architecture, development workflows, project conventions, and best practices.

What's Included

📋 Comprehensive Documentation (559 lines, 18KB)

The new file includes 15 major sections with 44 detailed subsections covering:

  1. Project Overview - Complete technology stack overview:

    • Backend: Python 3.11+, Flask 2.3+
    • Frontend: React 18+, HTML5, JavaScript
    • Database: SQLite (dev), PostgreSQL/Firestore (prod)
    • Authentication: JWT tokens with SHA-256 password hashing
    • External APIs: OpenAI GPT-4, Google Gemini
  2. Architecture Overview - Detailed project structure:

    • Main Flask application (app.py, src/main.py)
    • Firebase Cloud Functions (firebase_deployment/functions/index.js)
    • Frontend components (React UI, mobile interface, debug tools)
    • Database schema (users, therapy_sessions, audit logs)
  3. Development Workflows - Practical setup and usage:

    git clone https://github.com/justincihi/thinksync-enhanced.git
    cd thinksync-enhanced
    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
    python app.py
  4. Project-Specific Conventions:

    • Python code style (4 spaces, snake_case, docstrings)
    • JavaScript patterns (2 spaces, ES6+, async/await)
    • Database patterns (context managers, parameterized queries)
    • Authentication decorators (@require_auth, @require_admin, @require_active_user)
    • API response format (consistent JSON structure)
  5. Integration Points - Complete API documentation:

    • Public endpoints: /api/health, /api/therapy/demo, /api/auth/login, /api/auth/register
    • Protected endpoints: /api/auth/profile, /api/therapy/sessions/*
    • Admin-only endpoints: /api/admin/users/*, /api/admin/stats
    • Authentication flow with JWT tokens
    • External API integration (OpenAI, Google Gemini)
  6. Testing Guidelines:

    • Manual testing strategy using debug interface (/debug-upload-test.html)
    • Comprehensive test checklist for authentication, file uploads, and session management
    • Testing tools and shell scripts (test_upload.sh)
  7. Deployment Guidelines:

    • Firebase (recommended), Google Cloud Platform, Docker, Heroku
    • Pre-deployment checklist
    • Environment-specific configuration
  8. Security Best Practices:

    • Authentication security (password hashing, token expiration, rate limiting)
    • Data security (input validation, SQL injection prevention, XSS protection)
    • HIPAA compliance considerations (encryption, access logs, user isolation)
  9. Additional Sections:

    • Key files and their purposes
    • UI/UX guidelines with color scheme and design principles
    • Version control guidelines (branch strategy, commit format)
    • Debugging tips for common issues
    • Performance considerations and resource limits
  10. Best Practices for AI Agents:

    • Guidelines on when making changes (understand context, minimal changes, test thoroughly)
    • Code generation guidelines (follow patterns, error handling, validate inputs)
    • What NOT to do: Clear list of 7 prohibited actions (don't remove working code, don't hard-code secrets, etc.)

Why This Matters

This documentation serves as a single source of truth for AI coding agents to:

  • Understand the project architecture and technology stack
  • Follow established patterns and conventions
  • Maintain code quality and security standards
  • Navigate the codebase efficiently
  • Make surgical, minimal changes that preserve functionality
  • Comply with HIPAA and regulatory requirements

File Location

.github/
├── copilot-instructions.md  ← New comprehensive guide (559 lines)
└── workflows/
    └── python-app.yml      ← Existing CI/CD workflow

Benefits

✅ Reduces onboarding time for AI agents
✅ Ensures consistency across code changes
✅ Maintains security and compliance standards
✅ Provides clear examples and patterns
✅ Documents all API endpoints and integration points
✅ Establishes best practices for the project


Related: This addresses the need for comprehensive documentation to guide AI coding agents working on the WellTech AI MedSuite™ platform, a professional clinical AI solution for therapy session analysis.

Original prompt

implement this.

[Chronological Review: The conversation began with the user requesting an analysis of the codebase to generate or update the `.github/copilot-instructions.md` file. The user specified the need to focus on the architecture, developer workflows, project-specific conventions, and integration points. The user also provided context about the current date and the active file being worked on. The user then made a brief request with "pl," which was unclear, followed by a command to implement the analysis. The conversation ended with the user asking to implement the instructions.]

[Intent Mapping:

  • User requested to analyze the codebase for generating/updating .github/copilot-instructions.md.
  • User specified aspects to focus on: architecture, workflows, conventions, and integration points.
  • User made a brief unclear request ("pl").
  • User requested to implement the analysis.]

[Technical Inventory:

  • Technologies: Python, Flask (inferred from the provided code snippet).
  • Project Structure: Involves multiple files, with a focus on the admin dashboard and README documentation.
  • Integration Points: Not explicitly detailed yet but implied through the request for architecture analysis.]

[Code Archaeology:

  • Active file: /Users/incogneato/Documents/GitHub/thinksync-enhanced/README.md.
  • Mentioned file: /Users/incogneato/Documents/GitHub/thinksync-enhanced/admin_dashboard.py (contains the main application logic).
  • No specific code changes were documented yet.]

[Progress Assessment:

  • Completed: User provided context and specific requests for analysis.
  • Pending: Actual generation or update of the .github/copilot-instructions.md file based on the analysis.]

[Context Validation: All critical information for continuation is captured, including the user's goals and the specific files involved.]

[Recent Commands Analysis:

  • Last Agent Commands: User requested to analyze the codebase and implement the findings.
  • Tool Results Summary: No specific tool results were generated yet as the analysis and implementation are still pending.
  • Pre-Summary State: The agent was preparing to analyze the codebase and generate instructions when the token budget was exceeded.
  • Operation Context: The commands were executed to fulfill the user's goal of creating actionable instructions for AI coding agents based on the codebase.]
1. Conversation Overview: - Primary Objectives: User requested to "analyze this codebase to generate or update `.github/copilot-instructions.md` for guiding AI coding agents." - Session Context: The conversation focused on understanding the codebase architecture, workflows, conventions, and integration points to create effective instructions for AI agents. - User Intent Evolution: The user initially sought analysis, then made an unclear request, and finally asked to implement the analysis.
  1. Technical Foundation:
  • Python: Used for the application development.
  • Flask: Framework for building the web application.
  • Project Structure: Involves multiple components, including an admin dashboard.
  1. Codebase Status:
  • File Name: /Users/incogneato/Documents/GitHub/thinksync-enhanced/README.md
    • Purpose: Documentation for the project.
    • Current State: Active file being worked on.
  • File Name: /Users/incogneato/Documents/GitHub/thinksync-enhanced/admin_dashboard.py
    • Purpose: Contains the main application logic.
    • Current State: Context provided but no specific changes documented yet.
  1. Problem Resolution:
  • Issues Encountered: None explicitly mentioned; focus is on analysis and documentation.
  • Solutions Implemented: Not applicable yet as the analysis is pending.
  • Debugging Context: No ongoing troubleshooting efforts noted.
  • Lessons Learned: Insights will be gathered post-analysis.
  1. Progress Tracking:
  • Completed Tasks: User provided context and specific requests for analysis.
  • Partially Complete Work: Analysis and documentation of .github/copilot-instructions.md are pending.
  • Validated Outcomes: None yet, as the analysis has not been executed.
  1. Active Work State:
  • Current Focus: Analyzing the codebase to generate/update .github/copilot-instructions.md.
  • Recent Context: User requested an analysis of the codebase and implementation of findings.
  • Working Code: No specific code snippets discussed recently.
  • Immediate Context: User was preparing to implement the analysis when the token budget was exceeded.
  1. Recent Operations:
  • Last Agent Commands: User requested to analyze the codebase and implement the findings.
  • Tool Results Summary: No specific results generated yet; analysis is still pending.
  • Pre-Summary State: The agent was preparing to analyze the codebase when the token budget was exceeded.
  • Operation Context: Commands were executed to fulfill the user's goal of creating actionable instructions for AI coding agents.
  1. Continuation Plan:
  • Pending Task 1: Analyze the codebase to generate/update `.github/...

Created from VS Code via the GitHub Pull Request extension.


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

Co-authored-by: justincihi <181523173+justincihi@users.noreply.github.com>
Copilot AI changed the title [WIP] Update .github/copilot-instructions.md with analysis Add comprehensive .github/copilot-instructions.md for AI coding agents Oct 14, 2025
Copilot AI requested a review from justincihi October 14, 2025 06:36
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.

2 participants