osdu-spi
Copilot instructions1 starsChanged 32 days agoApache-2.0View on GitHub
You are working with the Fork Management Template, an automated solution for managing long-lived forks of upstream repositories. This template uses GitHub Actions to automate synchronization, conflict resolution, and release management for OSDU (Open Subsurface Data Universe) projects.
- Reads credentials
- Commits and pushes
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,336 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- .github/fork-resources/copilot-instructions.mdCopilot instructions
- spi-fleetSkill
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
26 rules. About 1 is common, 15 are distinctive, and 10 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 24
Always use conventional commits format:
- Very specific: line 34
Use the pattern: agent/<issue-number>-<description> Example: agent/123-fix-sync-conflict
- Very specific: line 38
Create PRs using GitHub CLI: gh pr create
- Distinctive: line 41
Ensure all CI checks pass before merging
- Distinctive: line 44
Write behavior-driven tests, not implementation tests
- Very specific: line 47
Run tests locally before pushing: mvn test
- Very specific: line 52
Create workflow file in .github/workflows/
- Distinctive: line 53
Follow existing patterns for permissions and error handling
- Very specific: line 54
Update documentation in doc/ directory
- Distinctive: line 55
Add ADR if making architectural changes
- Very specific: line 59
Test with workflow_dispatch before relying on schedule
- Distinctive: line 60
Consider impact on fork_integration branch
- Distinctive: line 61
Update conflict resolution logic if needed
- Distinctive: line 76
When creating issues, use appropriate labels:
- Very specific: line 80
AI: Add copilot label for AI-suitable tasks
- Common: line 110
Always include error handling in workflows
- Very specific: line 111
Use if: failure() for cleanup steps
- Distinctive: line 113
Create issues for persistent failures
- Distinctive: line 117
Never commit sensitive data or credentials
- Distinctive: line 118
Use GitHub Secrets for tokens and API keys
- Distinctive: line 120
Follow branch protection rules strictly
- Very specific: line 126
Look for copilot labeled issues for AI-suitable tasks
- Distinctive: line 127
Follow existing code patterns for consistency
- Very specific: line 131
Document new features in appropriate doc/ files
- Distinctive: line 132
Create ADRs for significant architecture changes
- Distinctive: line 133
Use clear, descriptive variable and function names
≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Copilot Instructions
Project Overview
You are working with the Fork Management Template, an automated solution for managing long-lived forks of upstream repositories. This template uses GitHub Actions to automate synchronization, conflict resolution, and release management for OSDU (Open Subsurface Data Universe) projects.
Key Architecture
Branch Strategy
main- Production branch with strict protection rulesfork_upstream- Automatically tracks upstream repository changesfork_integration- Staging branch for conflict resolution before merging to main
Core Workflows
- init.yml - Repository initialization and configuration
- sync.yml - Automated upstream synchronization with deterministic PR descriptions
- build.yml - Build and test automation for Java/Maven projects
- validate.yml - PR validation, commit message checks, and conflict detection
- release.yml - Automated semantic versioning with Release Please
Development Guidelines
Commit Messages
Always use conventional commits format:
feat: add new feature
fix: correct bug in sync workflow
chore: update dependencies
docs: improve README documentation
feat!: breaking change to APIBranch Naming
Use the pattern: agent/<issue-number>-<description>
Example: agent/123-fix-sync-conflict
Pull Requests
- Create PRs using GitHub CLI:
gh pr create - Include clear descriptions of changes
- Reference related issues
- Ensure all CI checks pass before merging
Testing
- Write behavior-driven tests, not implementation tests
- For Java projects: use JUnit 5 and Mockito
- Aim for 80%+ test coverage
- Run tests locally before pushing:
mvn test
Common Tasks
Adding New Workflow Features
- Create workflow file in
.github/workflows/ - Follow existing patterns for permissions and error handling
- Update documentation in
doc/directory - Add ADR if making architectural changes
Modifying Sync Behavior
- Edit
.github/workflows/sync.yml - Test with
workflow_dispatchbefore relying on schedule - Consider impact on fork_integration branch
- Update conflict resolution logic if needed
Java/Maven Development
# Build project
mvn clean install
# Run tests with coverage
mvn clean test org.jacoco:jacoco-maven-plugin:0.8.14:report
# Run specific test
mvn test -Dtest=TestClassName#testMethodNameWorking with Issues
When creating issues, use appropriate labels:
- Type:
bug,enhancement,documentation - Priority:
high-priority,medium-priority,low-priority - Component:
configuration,dependencies,workflow - AI: Add
copilotlabel for AI-suitable tasks
Workflow Patterns
Standard Workflow Structure
name: Workflow Name
on:
schedule:
- cron: '0 0 * * 0' # Weekly
workflow_dispatch: # Manual trigger
jobs:
job-name:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Your Logic Here
run: |
# ImplementationError Handling
- Always include error handling in workflows
- Use
if: failure()for cleanup steps - Report status to PRs when applicable
- Create issues for persistent failures
Security Considerations
- Never commit sensitive data or credentials
- Use GitHub Secrets for tokens and API keys
- Trivy scanner removes sensitive patterns automatically
- Follow branch protection rules strictly
AI Development Tips
For GitHub Copilot
- This project is AI-optimized with clear patterns
- Look for
copilotlabeled issues for AI-suitable tasks - Follow existing code patterns for consistency
- Reference ADRs for architectural decisions
Documentation Standards
- Document new features in appropriate
doc/files - Create ADRs for significant architecture changes
- Use clear, descriptive variable and function names
Quick Reference
Key Files
doc/src/adr/- Architecture decisions.github/workflows/- All automation workflows
Environment Variables
UPSTREAM_REPO_URL- Repository variable naming the upstream repositoryGITHUB_TOKEN- Authentication token
Useful Commands
# View workflow runs
gh workflow view
# Create PR
gh pr create --title "feat: add feature" --body "Description"
# Check PR status
gh pr status
# View issues
gh issue list --label copilotDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

