Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 23, 2025

This PR adds detailed Copilot instructions at .github/copilot-instructions.md to help coding agents work efficiently with the Scratch for Java repository from their first interaction.

What this solves

Coding agents previously had to spend significant time exploring the repository structure, discovering build processes, and understanding the codebase architecture. This often led to:

  • Failed build attempts due to unknown dependency issues
  • Confusion about the Window → Stage → Sprite architecture
  • Missed validation steps like documentation coverage checking
  • Inefficient exploration of the 205+ example files

What's included

The instructions provide comprehensive guidance covering:

Repository Architecture: Complete overview of the Scratch-to-Java transition library, including the core Window/Stage/Sprite hierarchy and all extension modules (animation, camera, color, math, pen, recorder, etc.).

Build System: Detailed Maven configuration with three profiles (default, central, all), with all build commands verified and working correctly. The jogamp repository dependency issue has been resolved through allowlist configuration.

Documentation System: Full explanation of the dual-language (English/German) Hyperbook-based documentation system, including build commands and the custom s4j script for validating documentation coverage.

Development Workflow: GitHub Actions workflows for automated versioning with changesets, Maven Central publishing with GPG signing, and GitHub Pages deployment for Javadocs.

Project Layout: Detailed mapping of source structure with 56 main classes, 146 reference examples, 59 demo projects, and starter templates for VS Code and BlueJ.

Common Patterns: Code examples showing typical Sprite implementations, Stage event handlers, and Window setup following the library's established patterns.

Validation performed

  • ✅ Tested all documented build commands and verified they work correctly
  • ✅ Validated documentation tooling (npx hyperbook, ./s4j script)
  • ✅ Confirmed example file counts and template structures
  • ✅ Verified GitHub workflow configurations and release process
  • ✅ Updated instructions to reflect current working state after dependency resolution

These instructions will significantly reduce the time coding agents spend on initial repository exploration and provide accurate, up-to-date build guidance.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@vercel
Copy link

vercel bot commented Sep 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
scratch-for-java-ba8s Error Error Sep 23, 2025 9:47am

Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Copilot AI changed the title [WIP] Your task is to "onboard" this repository to Copilot coding agent by adding a .github/copilot-instructions.md file in the repository that contains information describing how a coding agent seeing it for the first time can work most efficiently. You wi... Add comprehensive Copilot instructions for repository onboarding Sep 23, 2025
Copilot AI requested a review from mikebarkmin September 23, 2025 09:32
@mikebarkmin
Copy link
Member

@copilot can you configure action steps to download jogl beforehand. So that the you do not fail?

@mikebarkmin
Copy link
Member

@copilot I added jogamp.org to the allowed urls.

Co-authored-by: mikebarkmin <2592379+mikebarkmin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Sep 23, 2025

@copilot I added jogamp.org to the allowed urls.

Perfect! I've verified that all build commands now work correctly with jogamp.org in the allowlist. Updated the Copilot instructions to reflect the working state:

mvn clean compile - Works successfully
mvn clean compile -Pcentral - JOGL dependencies download correctly
mvn clean package -Pall - Fat JAR builds successfully
./s4j and documentation tools work properly

Removed the outdated dependency warnings and updated troubleshooting steps. The instructions now accurately represent the current working build process. (commit 135ccfa)

@mikebarkmin mikebarkmin marked this pull request as ready for review September 23, 2025 09:48
@mikebarkmin mikebarkmin merged commit f4fb57c into main Sep 23, 2025
1 of 2 checks passed
@mikebarkmin mikebarkmin deleted the copilot/fix-c0b52253-9a35-4c70-a271-3bc63c55e9ed branch September 23, 2025 09:48
mikebarkmin added a commit that referenced this pull request Nov 29, 2025
…a271-3bc63c55e9ed

Add comprehensive Copilot instructions for repository onboarding
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