Use when a dd-trace-js change introduces or substantially changes a class hierarchy, module boundary, shared helper layer, public API, or duplicated behavior across multiple types. Triggers: architecture decision, design review, refactor shared behavior, new abstraction, composition versus inheritance, expose internals, module coupling, public surface, hot-path architecture, score the design.
73
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill before implementing a non-trivial structural change. Do not use it for a local bug fix or a small refactor whose boundaries and contracts remain unchanged.
The score is a decision aid, not a substitute for reasoning. Explain the evidence behind each score and reject an abstraction that adds complexity without improving the baseline.
baseline → proposal.Behavior shared by multiple types should live in one place. Adding a precondition or branch should touch one site, not require synchronized edits across implementations.
Cross-module access must use an intentional boundary, never another class's internals. Adding methods to npm-exported
classes such as Span, Tracer, or OpenTelemetry bridge spans is a lasting compatibility commitment. Prefer a
callback, diagnostic channel, composition, or a redesigned module boundary over exposing internal state.
Express invariants through constructor signatures, specific JSDoc types, narrow interfaces, abstract methods when
appropriate, and #private state. Do not rely on undocumented conventions between modules.
Test boundaries with multiple consumers or protocol/specification contracts directly. Exercise real entry points and observable output; do not export internals or construct impossible object states solely for tests.
Evaluate the likely next consumer, type, or method. A third implementation should require a localized addition rather than edits across every existing implementation. Do not add speculative generality without a credible next case.
Measure overhead at architectural boundaries on the actual call path. Avoid extra allocations, closures, dispatch, parsing, and listeners per call. A performance-motivated increase in complexity requires focused, reproducible benchmark evidence.
7 → 7 rewrite is not architectural progress.Summarize the review in a compact table:
| Dimension | Baseline | Proposal | Evidence |
|---|---|---|---|
| Drift prevention | |||
| Module coupling | |||
| Explicit contracts | |||
| Testability at boundaries | |||
| Extensibility | |||
| Hot-path fitness |
Then state the decision, rejected alternatives, remaining risks, and the validation needed before merging.
d62655e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.