<< All versions

Skill v1.0.1

currentAutomated scan100/100
xberg-io/agent-conventions/feature-flag-conventions

+2 new

──Details
PublishedOctober 21, 2026 at 05:37 PM
Content Hashsha256:39d3926ee9f8ee82...
Git SHAadb0caa92c4d
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 3.0 KB)
SKILL.md3.0 KBactive
SKILL.md · 37 lines · 3.0 KB

version: "1.0.1" type: Playbook title: Feature Flag Conventions description: The shared Cargo feature-flag naming and semantics contract across xberg-io Rust libraries — the same flag names mean the same thing everywhere (otel, mcp/mcp-http, mimalloc/jemalloc, acceleration). Load when adding, renaming, or reviewing a crate's [features], or reconciling a library's flags with the rest of the stack. x-ai-rulez: kind: skill id: feature-flag-conventions metadata: name: feature-flag-conventions


Feature-flag conventions

Shared concerns use the same flag name with the same semantics in every library. A consumer that learns otel or mcp once should get identical behavior across xberg, crawlberg, liter-llm, html-to-markdown, tree-sitter-language-pack, and their bindings. Repo-specific flags (e.g. crawlberg stealth, liter-llm etcd-watch) stay local — this contract governs only shared concerns.

Standard flags

FlagMeaningDefaultNotes
(none) tracingStructured tracing is always-on, never a feature.—tracing is a non-optional dependency. Do not gate span emission. Un-gate any legacy optional tracing feature.
otelOpt-in OpenTelemetry / OTLP export layer, on top of always-on tracing.offPulls tracing-opentelemetry + the opentelemetry* stack. This is the only observability feature. Reconcile any always-on OTLP deps behind it.
mcpEmbedded Model Context Protocol server (stdio transport).off
mcp-httpMCP Streamable HTTP transport; implies mcp.offmcp-http = ["mcp", ...].
mimallocSelect the mimalloc global allocator.offMutually exclusive with jemalloc — guard with a compile_error! if both are set.
jemallocSelect the jemalloc global allocator.offMutually exclusive with mimalloc.
cuda / metal / mkl / accelerateDevice / BLAS acceleration backends where a crate exposes them.offSame names wherever acceleration is offered.

Rules

  • Names are the contract. Never invent a synonym for a shared concern (opentelemetry, observability, otlp for what is otel; model-context-protocol for mcp). Rename divergent flags to match.
  • Semantics travel with the name. otel must mean the OTLP export layer everywhere, not "enable tracing" (tracing is always-on) and not a metrics-only subset.
  • Always-on tracing, opt-in export. Do not force the opentelemetry dependency tree on library consumers — keep it behind otel so a plain dependency stays lean.
  • Implication edges are fixed: mcp-http ⇒ mcp; otel ⇒ (always-on) tracing.
  • Mutually-exclusive allocators always carry the both-enabled compile_error! guard.
  • Adding a shared flag to a new library? Copy the name, default, and implication edges from this table rather than redefining them. Coordinate a change to this contract across all libraries before landing it — no repo diverges unilaterally.
← v1.0.0All versions