agentleFS
Microsoft AzureKnown publisherAzure/osdu-spi/.github/copilot-instructions.md

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.

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
  1. Distinctive:

    Always use conventional commits format:

    line 24
  2. Very specific:

    Use the pattern: agent/<issue-number>-<description> Example: agent/123-fix-sync-conflict

    line 34
  3. Very specific:

    Create PRs using GitHub CLI: gh pr create

    line 38
  4. Distinctive:

    Ensure all CI checks pass before merging

    line 41
  5. Distinctive:

    Write behavior-driven tests, not implementation tests

    line 44
  6. Very specific:

    Run tests locally before pushing: mvn test

    line 47
  7. Very specific:

    Create workflow file in .github/workflows/

    line 52
  8. Distinctive:

    Follow existing patterns for permissions and error handling

    line 53
  9. Very specific:

    Update documentation in doc/ directory

    line 54
  10. Distinctive:

    Add ADR if making architectural changes

    line 55
  11. Very specific:

    Test with workflow_dispatch before relying on schedule

    line 59
  12. Distinctive:

    Consider impact on fork_integration branch

    line 60
  13. Distinctive:

    Update conflict resolution logic if needed

    line 61
  14. Distinctive:

    When creating issues, use appropriate labels:

    line 76
  15. Very specific:

    AI: Add copilot label for AI-suitable tasks

    line 80
  16. Common:

    Always include error handling in workflows

    line 110
  17. Very specific:

    Use if: failure() for cleanup steps

    line 111
  18. Distinctive:

    Create issues for persistent failures

    line 113
  19. Distinctive:

    Never commit sensitive data or credentials

    line 117
  20. Distinctive:

    Use GitHub Secrets for tokens and API keys

    line 118
  21. Distinctive:

    Follow branch protection rules strictly

    line 120
  22. Very specific:

    Look for copilot labeled issues for AI-suitable tasks

    line 126
  23. Distinctive:

    Follow existing code patterns for consistency

    line 127
  24. Very specific:

    Document new features in appropriate doc/ files

    line 131
  25. Distinctive:

    Create ADRs for significant architecture changes

    line 132
  26. Distinctive:

    Use clear, descriptive variable and function names

    line 133

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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 rules
  • fork_upstream - Automatically tracks upstream repository changes
  • fork_integration - Staging branch for conflict resolution before merging to main

Core Workflows

  1. init.yml - Repository initialization and configuration
  2. sync.yml - Automated upstream synchronization with deterministic PR descriptions
  3. build.yml - Build and test automation for Java/Maven projects
  4. validate.yml - PR validation, commit message checks, and conflict detection
  5. 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 API

Branch 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

  1. Create workflow file in .github/workflows/
  2. Follow existing patterns for permissions and error handling
  3. Update documentation in doc/ directory
  4. Add ADR if making architectural changes

Modifying Sync Behavior

  1. Edit .github/workflows/sync.yml
  2. Test with workflow_dispatch before relying on schedule
  3. Consider impact on fork_integration branch
  4. 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#testMethodName

Working 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 copilot label 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: |
          # Implementation

Error 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 copilot labeled 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 repository
  • GITHUB_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 copilot

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.