observability
Skill2 starsChanged 5 months agoApache-2.0View on GitHub
Wire OpenTelemetry through the SystemTelemetry port — domain produces semantic spans, infra transports them — never bypass the port in app/ or cli/.
89 other projects use a version of this.
Adopted by
Most recently taken up by
- lengrufeng2008/dsh-skill-librarytheir own version, first seen Nov 15, 2026
- swap-cameroon/kuro-antigravity-configtheir own version, first seen Nov 15, 2026
- d-padmanabhan/agent-engineering-handbooktheir own version, first seen Nov 11, 2026
- TheBeardedBearSAS/claude-crafttheir own version, first seen Nov 11, 2026
- juninmd/skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use gitops, background-jobs and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
kcns008Skillgitops
GitOps Agent (Flow) — manages ArgoCD applications, Helm charts, Kustomize overlays, deployment strategies (canary, blue-green, rolling), multi-cluster GitOps, and drift detection for Kubernetes and OpenShift clusters.
Also in 4 projects that use this
YepAPISkillbackground-jobs
Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.
Also in 4 projects that use this
Mushfiqur-Rahman-RobinSkillrag-systems
Best practices for building Retrieval-Augmented Generation systems — chunking, embedding, hybrid retrieval, reranking, indexing, caching, evaluation, observability — plus a catalog of RAG patterns and when each applies.
Also in 3 projects that use this
YepAPISkilldata-pipelines
ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.
Also in 4 projects that use this
wpankSkillcaching
Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.
Also in 5 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 13 projects that use this
Other versions89 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 89
- openai/plugins★ 7.8ksame name
- BuilderIO/agent-native★ 7.7ksame name
- brianlovin/briOS★ 2.3ksame name
- lablup/backend.ai★ 679same name
- DevelopersGlobal/ai-agent-skills★ 216same name
- kid-sid/claude-spellbook★ 190same name
- YougLin-dev/Aha-Loop★ 181same name
- proyecto26/system-design-skills★ 118same name
- TheBeardedBearSAS/claude-craft★ 108same name
- AsiaOstrich/universal-dev-standards★ 84same name
79 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- boundariesSkill
- cli-view-layerSkill
- effect-servicesSkill
- find-docsSkill
- infrastructure-adaptersSkill
- model-routingSkill
- phax-cliSkill
- phax-decide-planSkill
- phax-decide-reviewSkill
- phax-decide-specSkill
- phax-planningSkill
- phax-reviewSkill
- phax-specSkill
- state-machinesSkill
- validation-boundariesSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 72 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Never call @opentelemetry/* APIs from src/app/ or src/cli/.
“Common” is measured: kept by at least 6 in 10 of the 72 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Observability doctrine
Core principle: OpenTelemetry transports and correlates. The system produces the meaning. Snapshots capture the meaning, not the transport.
Three-layer split
src/domain/telemetry/ ← pure semantic types, NO Effect, NO OTel, NO IO
src/ports/systemTelemetry.ts ← Effect service (Context.Tag) — the app talks here
src/infra/telemetry/ ← implementations (OTel, file, in-memory, composite)| Layer | Rule |
domain/ | May not import SystemTelemetry port, infra/telemetry, or @opentelemetry/* |
app/ | Calls SystemTelemetry only; must not import infra/telemetry/_ or @opentelemetry/_ |
cli/ | May use the factory (layer.ts) at the composition root; must not import the OTel adapter or @opentelemetry/* directly |
infra/telemetry/ | Only module that may import @opentelemetry/* |
SystemTelemetry port (src/ports/systemTelemetry.ts)
| Method | When to call |
withOperation(name, attrs, eff) | Wrap any named unit of work — becomes a span in OTel |
recordEvent(event) | Emit a SemanticTelemetryEvent (adapter call, step, gate, artifact) |
recordTransition(transition) | Shortcut for state.transition events from the dispatcher |
recordError(report) | Emit a SystemErrorReport when an adapter boundary fails |
incrementCounter(name, attrs?) | Increment a named metric counter |
recordDuration(name, ms, attrs?) | Record a duration sample |
Never call @opentelemetry/* APIs from src/app/ or src/cli/.
Implementations (src/infra/telemetry/)
| File | Purpose |
inMemory.ts | Collects events in-process; used in tests via getSemanticTraceSnapshot() |
jsonFile.ts | Appends one JSON line per event to a configurable path; IO errors swallowed |
openTelemetry.ts | Maps semantic events onto OTel spans/events/metrics; only file that imports @opentelemetry/* |
composite.ts | Fans out one logical call to multiple implementations; inner failures swallowed |
layer.ts | Factory (makeSystemTelemetryLayer) — called by src/cli/ to build the live layer |
Fake for tests: src/infra/fakes/systemTelemetry.ts → makeFakeSystemTelemetry().
Snapshot rule
Tests assert against InMemoryTelemetry.getSemanticTraceSnapshot(), which projects events through projectEvent from src/domain/telemetry/snapshot.ts.
Snapshots must never contain: traceId, spanId, durationMs, or any 13+ digit Unix timestamp. Only semantic fields survive projection: type, event, stateBefore, stateAfter, dispatcher, operationId, adapter, operation, result, step, gate, artifact, path.
E2E helper: import withTelemetryCapture from tests/e2e/helpers/telemetry.ts.
SystemErrorReport contract
Built at the application layer (not inside infra adapters) using makeSystemErrorReport from src/domain/telemetry/errors.ts. Report builders live in src/app/telemetry/reportBuilders.ts:
reportShellFailure(e, ctx)— Shell adapter failuresreportGitFailure(e, ctx)— Git adapter failuresreportAgentFailure(e, ctx)— Agent backend adapter failures
stderrExcerpt is always truncated to ≤ 4 KB by makeSystemErrorReport.
Architectural guards (tests/unit/architecturalGuards.telemetry.test.ts)
| Rule | What it checks |
PHAX_TELEMETRY_001 | src/domain/ has no forbidden imports (port, infra, OTel) |
PHAX_TELEMETRY_002 | Only src/infra/telemetry/openTelemetry.ts and its unit test import @opentelemetry/* |
PHAX_TELEMETRY_003 | src/app/ has no infra/telemetry imports; src/cli/ has no direct OTel adapter imports |
PHAX_TELEMETRY_004 | Snapshot files contain no transport fields or raw Unix timestamps |
How to fix a violation
PHAX_TELEMETRY_001: The domain file is importing a port or adapter. Move the type it needs into src/domain/telemetry/ or pass it as a plain value parameter.
PHAX_TELEMETRY_002: An unexpected file imports OTel. Route telemetry through SystemTelemetry port instead. If this is a new OTel adapter, it belongs in src/infra/telemetry/ and must be added to the guard allowlist.
PHAX_TELEMETRY_003: An app file is importing a concrete adapter. Use the SystemTelemetry port via Effect DI. A CLI file importing the OTel adapter directly must go through makeSystemTelemetryLayer instead.
PHAX_TELEMETRY_004: A snapshot was captured before getSemanticTraceSnapshot() was applied, or a new unstable field leaked into the projection. Always snapshot the projection output, never the raw event or OTel span.
Further reading
- Doctrine source:
.context/attachments/rK8ZI3/pasted_text_2026-05-25_14-05-46.txt - Architecture docs:
docs/observability.md(added in phase-12) - Snapshot baseline:
tests/e2e/__snapshots__/semanticTrace.test.ts.snap
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
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.

