agentleFS
floci-iofloci-io/floci-az/.github/copilot-instructions.md

floci-az

Copilot instructions814 starsChanged 21 days agoMITView on GitHub

Review pull requests in the Floci-Az repository with Azure compatibility as the primary concern. Floci-Az is a Java-based local Azure emulator built on Quarkus. Its goal is to match Azure SDK and Azure CLI behavior through real Azure wire protocols, not convenience APIs or custom abstractions. Evaluate changes in this order: Raise concerns when a PR introduces any of the following without strong justification: Floci-Az follows a layered design: Core infrastructure commonly relevant in reviews: Check that handlers stay thin,…

We split this copilot-instructions.md into the rules it gives an agent

14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer correctness over convenience

    line 14
  2. Distinctive:

    Keep changes focused and testable

    line 15
  3. Distinctive:

    Check that handlers stay thin, business logic remains in service classes, and new changes fit existing repository patterns.

    line 47
  4. Distinctive:

    Use non-standard XML namespaces for Storage responses

    line 99
  5. Distinctive:

    When a PR changes configuration or persistence behavior, verify the change is wired consistently.

    line 104
  6. Distinctive:

    Check for updates to:

    line 106
  7. Distinctive:

    Treat repository YAML as the source of truth for runtime behavior unless the PR explicitly changes configuration semantics.

    line 120
  8. Distinctive:

    If behavior changes without automated coverage, call that out explicitly.

    line 140
  9. Distinctive:

    When analyzing a PR, check:

    line 144
  10. Distinctive:

    Write review comments that are:

    line 159
  11. Distinctive:

    Use severity when helpful:

    line 165
  12. Distinctive:

    Prefer comments that explain:

    line 171
  13. Distinctive:

    Use this fallback order:

    line 179
  14. Distinctive:

    If correctness would require a broader architectural change, call out the tradeoff instead of suggesting blind refactoring.

    line 185

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 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

Copilot Instructions for Pull Request Review

Review pull requests in the Floci-Az repository with Azure compatibility as the primary concern.

Floci-Az is a Java-based local Azure emulator built on Quarkus. Its goal is to match Azure SDK and Azure CLI behavior through real Azure wire protocols, not convenience APIs or custom abstractions.

Review Priorities

Evaluate changes in this order:

  1. Preserve Azure protocol compatibility
  2. Match Azure SDK and Azure CLI behavior
  3. Reuse existing Floci-Az patterns
  4. Prefer correctness over convenience
  5. Keep changes focused and testable

What to Flag

Raise concerns when a PR introduces any of the following without strong justification:

  • Non-Azure endpoint shapes or routing patterns
  • Request or response format changes made for convenience
  • Broad refactors unrelated to the PR goal
  • New service patterns where an existing Floci-Az pattern should be reused
  • Direct storage implementation usage instead of StorageFactory
  • Auth bypasses that skip AuthPipeline or Blob service SAS validation

Architecture Expectations

Floci-Az follows a layered design:

  • AzureRoutingFilter dispatches incoming requests to the correct service handler
  • AzureServiceHandler implementations parse Azure protocol input and produce Azure-compatible responses
  • Services contain business logic and should produce AzureErrorResponse on failure
  • Models hold domain data

Core infrastructure commonly relevant in reviews:

  • EmulatorConfig
  • AzureServiceRegistry
  • StorageFactory
  • AzureServiceHandler
  • AzureRoutingFilter
  • AzureErrorResponse
  • AuthPipeline / AuthVerifier

Check that handlers stay thin, business logic remains in service classes, and new changes fit existing repository patterns.

Service Routing

Each service is routed by account-suffix on a single port (default 4577):

ServicePath prefixNotes
Blob Storage/{account}/Container and blob operations
Queue Storage/{account}-queue/Queue and message operations
Table Storage/{account}-table/Table and entity operations
Azure Functions/{account}-functions/Deploy and invoke HTTP-triggered functions

Flag PRs that change routing prefixes or introduce non-Azure path conventions.

Protocol Review Rules

Floci-Az implements real Azure wire protocols. Review protocol-affecting changes carefully.

  • Blob Storage uses REST XML for list operations and raw binary for blob data
  • Queue Storage uses REST XML for messages and queue metadata
  • Table Storage uses OData JSON (application/json;odata=minimalmetadata) for entity operations
  • Azure Functions management uses REST JSON; function invocation proxies directly to the container

Pay extra attention to these cases:

  • Error responses must follow Azure's error envelope: { "error": { "code": "...", "message": "..." } }
  • SAS token parsing must respect expiry, permissions, and resource fields
  • Azure Functions must use Docker-in-Docker; do not introduce direct process execution

Auth Review

floci-az.auth.mode (dev or strict) is not read by any code today: every request is handled as in dev, and SharedKeyAuthVerifier accepts any SharedKey signature. Blob service SAS signatures are validated by StorageSasAuthorization against floci-az.auth.storage-account-keys, independent of auth.mode. Do not wire auth.mode to rejections without a maintainer decision, since users may already have set it.

Also supports Bearer tokens (BearerTokenVerifier) and SAS tokens (SasTokenParser).

Flag PRs that:

  • Hardcode auth behavior instead of reading from EmulatorConfig
  • Skip AuthPipeline when resolving the caller
  • Accept malformed or expired SAS tokens

XML and JSON Rules

Flag PRs that:

  • Return error responses that do not follow Azure error structures
  • Change OData metadata levels without justification
  • Use non-standard XML namespaces for Storage responses
  • Change controller return types in ways that may break reflection or native-image compatibility

Config and Storage Review

When a PR changes configuration or persistence behavior, verify the change is wired consistently.

Check for updates to:

  • EmulatorConfig
  • main application.yml
  • test application.yml
  • StorageFactory

Supported storage modes include:

  • memory
  • persistent
  • hybrid
  • wal

Treat repository YAML as the source of truth for runtime behavior unless the PR explicitly changes configuration semantics.

Testing Expectations

Expect automated coverage for changes that affect:

  • request parsing
  • response shape
  • error handling
  • persistence semantics
  • URL and endpoint generation
  • service enablement
  • auth validation

Prefer:

  • Azure SDK-based validation (Java, Node, Python SDKs) over raw HTTP-only testing
  • Integration tests for compatibility-sensitive behavior
  • Existing naming conventions such as *ServiceTest.java and *IntegrationTest.java

If behavior changes without automated coverage, call that out explicitly.

Review Checklist

When analyzing a PR, check:

  • Is the change focused?
  • Does it preserve Azure-compatible wire behavior?
  • Does it reuse an existing Floci-Az pattern?
  • Are handlers thin and service classes responsible for domain logic?
  • Are AzureErrorResponse and existing error-mapping patterns used correctly?
  • Are config and YAML updates complete?
  • Are storage changes wired through StorageFactory?
  • Are auth changes consistent with AuthPipeline and both dev/strict modes?
  • Are tests added or updated where compatibility is affected?
  • Are docs updated when user-facing behavior changes?

How to Write Feedback

Write review comments that are:

  • specific
  • repository-aware
  • grounded in Azure compatibility risk

Use severity when helpful:

  • high: likely breaks Azure SDK / CLI compatibility or protocol behavior
  • medium: inconsistent with Floci-Az architecture, wiring, or testing expectations
  • low: maintainability, clarity, or minor convention issue

Prefer comments that explain:

  • what is risky
  • why it matters in Floci-Az
  • which existing pattern should be followed instead

If Behavior Is Unclear

Use this fallback order:

  1. Prefer Azure behavior
  2. Then existing Floci-Az behavior
  3. Then compatibility test expectations

If correctness would require a broader architectural change, call out the tradeoff instead of suggesting blind refactoring.

Download now (ZIP)

  • 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,297 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 repositoryOne other file it gives its agents.

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.