Skip to content

Add Copilot custom instructions for AceForge context awareness#52

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-copilot-custom-instructions
Draft

Add Copilot custom instructions for AceForge context awareness#52
Copilot wants to merge 3 commits intomainfrom
copilot/add-copilot-custom-instructions

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Adds .github/copilot-instructions.md to guide Copilot with AceForge-specific context: local-first AI music workstation, macOS/Apple Silicon constraints, PyTorch MPS optimization, and Flask/React architecture patterns.

Contents

  • Project context: ACE-Step integration, Demucs, XTTS, basic-pitch; local-first with no cloud dependencies
  • Tech stack: Flask blueprints, React 19/TypeScript, Vite, PyTorch with MPS, PyInstaller bundling
  • Code conventions:
    • Python: cdmf_* module naming, typed signatures, logging module (not print), Blueprint pattern
    • TypeScript: Functional components, discriminated unions, centralized API layer
  • Architecture patterns: Blueprint per feature, lazy model loading, singleton pattern for ML models, MPS device selection
  • ML specifics: TORCH_JIT=0 for frozen apps, MPS memory management, 24kHz sample rates, LoRA training
  • Platform constraints: Apple Silicon unified memory, ad-hoc code signing, sys._MEIPASS for bundled resources
  • Common pitfalls: Don't load models at startup, chunk long audio, handle missing MPS gracefully
  • Examples: Blueprint creation with proper logging, React panel patterns

Example pattern

import logging
from flask import Blueprint, jsonify

logger = logging.getLogger(__name__)

def create_feature_blueprint() -> Blueprint:
    bp = Blueprint("feature_name", __name__)
    
    @bp.route("/api/feature", methods=["POST"])
    def handle_feature():
        try:
            data = request.get_json()
            if not data:
                return jsonify({"error": "No data provided"}), 400
            result = process_feature(data)
            return jsonify({"status": "success", "result": result}), 200
        except Exception as e:
            logger.error(f"Feature error: {e}", exc_info=True)
            return jsonify({"error": str(e)}), 500
    
    return bp

404 lines covering security (input validation, sandboxing), performance (MPS optimization, streaming), and testing (pytest, GitHub Actions on macOS runners).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 8, 2026 20:09
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Copilot custom instructions for guided reviews Add Copilot custom instructions for AceForge context awareness Feb 8, 2026
Copilot AI requested a review from lmangani February 8, 2026 20:11
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