agentleFS
MicrosoftKnown publishermicrosoft/mxc/.github/copilot-instructions.md

mxc

Copilot instructions1.4k starsChanged 59 days agoMITView on GitHub

MXC (Microsoft eXecution Container) is a cross-platform sandboxed code execution system. Prefer precise, scoped changes and preserve existing platform behavior, feature gates, wire compatibility, and failure semantics. The Rust toolchain is pinned by src/rust-toolchain.toml. Run Rust commands from src/ or pass --manifest-path src/Cargo.toml. Prefer the smallest test command covering the change. Host-dependent backend suites live under tests/scripts/; use the applicable backend guide and docs/ci-validation-infrastructure.md before running or changing them. - Production parsing dispatches through exact closed contracts and their version-specific…

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 10 mentionsJul 2026: 3 mentionsAug 2026: 4 mentionsSep 2026: 2 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/mxc repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/mxc

The biggest 5 of 24 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 24

Talked about on GitHub, Bluesky and Hacker News (24 times).

On GitHub · 16

11 more on GitHub

On Bluesky · 6

1 more on Bluesky

On Hacker News · 2

The file

Show its rules and text

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

16 rules. About 0 are common, 9 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    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:

    Read the documentation for the affected subsystem.

    line 7
  2. Very specific:

    Follow any matching file-scoped instructions under .github/instructions/.

    line 8
  3. Distinctive:

    Do not hand-edit generated files or released schemas.

    line 10
  4. Distinctive:

    Do not silently ignore unsupported policy.

    line 11
  5. Very specific:

    Keep wxc, lxc, and mxc_darwin thin.

    line 18
  6. Very specific:

    Keep build-time staging in mxc_build_common or nanvix_build_common, not runtime crates.

    line 19
  7. Very specific:

    Use #[cfg(target_os = "...")] and existing Cargo feature gates for platform-specific code.

    line 20
  8. Very specific:

    Prefer the smallest test command covering the change.

    line 64
  9. Very specific:

    Never edit schemas/stable/.

    line 76
  10. Distinctive:

    Never hand-edit generated development schemas or generated TypeScript wire types.

    line 77
  11. Distinctive:

    Do not weaken validation or convert failures into success-shaped fallbacks.

    line 94
  12. Distinctive:

    Update documentation in the same change when behavior changes:

    line 99
  13. Distinctive:

    Do not duplicate detailed backend behavior here.

    line 109
  14. Distinctive:

    Use the repository templates as the source of truth:

    line 113
  15. Distinctive:

    When creating issues through an API, explicitly set the issue type and these exact labels:

    line 118
  16. Very specific:

    Do not fabricate missing required issue fields.

    line 127

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

MXC Copilot Instructions

MXC (Microsoft eXecution Container) is a cross-platform sandboxed code execution system. Prefer precise, scoped changes and preserve existing platform behavior, feature gates, wire compatibility, and failure semantics.

Before changing code

  • Read the documentation for the affected subsystem. Start with the references below rather than inferring behavior from names.
  • Follow any matching file-scoped instructions under .github/instructions/.
  • Inspect nearby code and tests before editing. Reuse existing abstractions and error types.
  • Do not hand-edit generated files or released schemas.
  • Do not silently ignore unsupported policy. Reject it before creating a sandbox.

Architecture invariants

  • wxc_common is the cross-platform foundation. Do not move backend execution or enforcement into it, or add new backend implementation dependencies.
  • Backend crates generally depend on wxc_common; avoid cross-dependencies between backend crates. The existing optional nanvix_common dependency supplies shared MicroVM data/constants rather than backend dispatch.
  • mxc_engine is the single execution engine. Executor binaries and mxc-sdk delegate backend routing to it.
  • Keep wxc, lxc, and mxc_darwin thin. Do not add backend-selection matches to the binaries.
  • Keep build-time staging in mxc_build_common or nanvix_build_common, not runtime crates.
  • Use #[cfg(target_os = "...")] and existing Cargo feature gates for platform-specific code.
  • Preserve the distinction between run-to-completion, streaming, and state-aware lifecycle APIs.
  • Unsupported policy must fail closed. Do not accept a field that the selected backend cannot enforce.

See:

  • docs/schema.md
  • docs/versioning.md
  • docs/state-aware-lifecycle/mxc-state-aware-sandbox-api.md
  • docs/ci-validation-infrastructure.md
  • The relevant backend guide under docs/

Build and validation

The Rust toolchain is pinned by src/rust-toolchain.toml. Run Rust commands from src/ or pass --manifest-path src/Cargo.toml.

Builds

build.bat

./build.sh

./build-mac.sh

Targeted validation

# From src/
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo test -p wxc_common
cargo test -p wxc_common -- config_parser

# From sdk/node/
npm test
npm run test:integration

# From sdk/dotnet/ (requires .NET SDK 10+)

dotnet test --solution Microsoft.Mxc.Sdk.slnx

Prefer the smallest test command covering the change. Host-dependent backend suites live under tests/scripts/; use the applicable backend guide and docs/ci-validation-infrastructure.md before running or changing them.

Schema and policy rules

  • Production parsing dispatches through exact closed contracts and their version-specific adapters into private CommonRequestIR normalization input.
  • Preserve optional-field presence through parsing and binding. Apply defaults and semantic validation in the backend.
  • New features use their intended permanent JSON location in the exact development contract. JSON placement, publication eligibility, and runtime experimental authorization are separate. Update the matching closed request types, adapt them into CommonRequestIR or a phase-specific runtime config, and regenerate the registered exact schema and TypeScript artifacts.
  • Never edit schemas/stable/; released schemas are immutable.
  • Never hand-edit generated development schemas or generated TypeScript wire types.
  • schemas/schema-version.json is the canonical source for compatibility constants.
  • In the .NET SDK (sdk/dotnet/), every serialized or deserialized wire type must be registered as a [JsonSerializable] root in MxcJsonContext (MxcJsonSerialization.cs) and routed through the MxcJson helpers, so the source-generated resolver is used and no path falls back to reflection. When you add or change such a type or an options object, add a matching serialize/deserialize check to Microsoft.Mxc.Sdk.AotSmokeTest; its CI AOT publish gate fails on any reflection-dependent path.

See docs/schema-codegen.md for regeneration commands.

Error and security behavior

  • Surface errors explicitly using repository error types and include actionable context.
  • Preserve panic containment across mxc_ffi; no panic may unwind through the C ABI.
  • Preserve exact resource ownership and cleanup contracts, especially for processes, jobs, traces, sessions, and native handles.
  • Do not weaken validation or convert failures into success-shaped fallbacks.
  • Telemetry is Windows-only, requires explicit user consent, and fails closed. Administrative policy may restrict consent but may never grant it. See docs/telemetry/.

Documentation

Update documentation in the same change when behavior changes:

  • Schema or config fields: docs/schema.md and the applicable generated development artifacts.
  • Experimental features: docs/authoring-a-new-feature.md.
  • Versioning or promotion: docs/versioning.md.
  • Backend behavior: the corresponding guide under docs/.
  • SDK APIs: the affected SDK README/API documentation.
  • Telemetry: docs/telemetry/.
  • CI validation: docs/ci-validation-infrastructure.md.

Do not duplicate detailed backend behavior here. Keep the canonical explanation in the subsystem documentation.

Issues and pull requests

Use the repository templates as the source of truth:

  • Issues: .github/ISSUE_TEMPLATE/
  • Pull requests: .github/PULL_REQUEST_TEMPLATE.md

When creating issues through an API, explicitly set the issue type and these exact labels:

CategoryTypeLabels
Bug reportBugIssue-Bug, Needs-Triage
Feature requestFeatureIssue-Feature, Needs-Triage
Documentation issueTaskIssue-Docs, Needs-Triage
TaskTaskIssue-Task, Needs-Triage

Do not fabricate missing required issue fields. For security issues or BSODs, do not attach dumps, logs, or traces to a public GitHub issue; direct sensitive material to secure@microsoft.com and reference the issue.

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.