knowledge-forge-ai/agentic-praxis-grimoire/go-cmp-test-profile
Claude Code and agent skill by knowledge-forge-ai/agentic-praxis-grimoire
- community
Checking that the SKILL.md file is still in the repository.
Use when a repository has already selected google/go-cmp v0.7.0 and comparison judgment is material to equality versus diff, option composition and filters, comparers and transformers, ignores and unexported fields, sorting, approximation, panics, diagnostic exposure, or thresholds beyond repository policy.
Install
npx vskill@latest install knowledge-forge-ai/agentic-praxis-grimoire/go-cmp-test-profileSKILL.md
The same SKILL.md was published earlier as knowledge-forge-ai/agentic-praxis-grimoire/go-cmp-test-profile.
go-cmp Test Profile
Core principle
Apply go-cmp judgment only after the repository has already selected the dependency and the task materially depends on semantic comparison. This profile is calibrated to release v0.7.0. Confirm the selected release before relying on any behavior claim below; a different release requires a source refresh. Use the highest justified Green — routine, Yellow — caution, Orange — warning, or Red — crisis / stop response for the current coherent decision.
Own equality versus diff, option composition and filtering, custom comparers and transformers, ignoring and unexported-field boundaries, sorting and approximation contracts, ambiguity and panic conditions, and diagnostic exposure. Leave native lifecycle, subtests, cleanup, and parallelism to a retained go-test-profile, and leave terse local expectations to explicit project-owned assertion policy.
Do not use
Do not use this profile for:
- deciding whether to adopt go-cmp, which is project-owned;
- a repository that has not selected the dependency;
- a selected release other than the calibrated one, until the option, sorting,
approximation, and panic claims are reverified against that release;
- native test lifecycle, subtests, cleanup, or parallelism, owned by a retained
go-test-profile or project-owned native test policy;
- terse local assertions, owned by project-owned assertion policy;
- production equality, hashing, or ordering design for shipped types;
- general Go semantics already owned by
go-language-profile; - generic implementation, debugging, planning, or review procedure;
- selecting commands, flags, coverage thresholds, CI, or dependency versions; or
- authorizing live services, host mutation, credentials, or destructive action.
Procedure
- Establish task authority, repository policy, the exact selected release, the
compared types, the option set in scope, exact checks, and rollback.
- Confirm the release matches the calibration. If it does not, stop and
reverify option, sorting, approximation, unexported, and panic behavior against that release's source before continuing.
- Determine the exact semantic contract each comparison must protect, and
which differences must remain detectable.
- Inspect equality versus diff use, option composition and filter scope,
comparer and transformer properties, ignore breadth, unexported-field handling, sorting contracts, tolerance justification, panic and ambiguity risk, and diagnostic content.
- Assign the highest level justified by a concrete risk in the structural
contract below. Coupled signals may explain one higher-level risk, but their count never manufactures Orange or Red. One semantic Red remains Red.
- Proceed proportionally for Green; inspect policy and evidence for Yellow;
require an accepted local design, rationale, rollback, and focused validation for Orange; stop a Red hidden-behavior, nondeterminism, ambiguity, ownership, or exposure condition.
- Pair independently with a process skill and, only when material, with a
retained go-test-profile. No chain is mandatory; when that owner is unavailable, use explicit project-owned native test policy.
- Preserve stricter repository policy. Never relax a superior safety, privacy,
truthfulness, or authority stop.
- Report level, signals, release assumption, option set, detectability
evidence, exception if any, and rollback.
Equality, diff, and diagnostics
The equality function supplies a boolean comparison without producing a value report. The diff function instead constructs a value-rendering diagnostic; when it has no difference to report, its result is empty. Computing both for one assertion often duplicates work and is Yellow on proportionality unless the caller has two independently stated needs.
Treat diff text as human-facing diagnostic output whose layout can change. Exact-text assertions and parsers are unsupported; use a reporter when a program needs structured comparison events.
Classify protected data before a rendering call or user option side effect. Filtering alone does not redact values. Ignoring or transforming a protected field changes what the comparison can detect and is permitted only when the required equality contract remains truthful. A sensitive diff must not reach a durable log, artifact, or report. When a diagnostic is withheld, report that fact without implying a reviewer inspected the hidden values.
Comparers, transformers, and filters
For every pair a custom comparer accepts, reversing the arguments must preserve the judgment, repeated calls must not drift, and the call must neither change its inputs nor produce observable side effects. Violating any of those obligations is Red.
Treat transform self-application as locally guarded: comparison will not keep feeding one transform back into itself through an unbroken chain of transformations. That branch-level protection says nothing about cycles formed by several transforms. When output can re-enter the transform's own input domain, select the acyclic constructor and state the domain boundary. Do not generalize one constructor's guard to all transforms.
Path and value predicates bound where an option applies. Structural traversal can call a path predicate when an indexed or keyed value exists on only one side, so swapping the comparison operands must not change the predicate's decision. A value predicate likewise must return the same decision after an operand swap and across repeated calls.
When more than one comparer or transformer applies to one value, comparison panics on an ambiguous option set; composition must be disambiguated by filters. An Ignore option passed without a filter also panics. Both are Red until resolved.
Ignoring and unexported fields
Record every ignored field or type and confirm none carries behavior the test exists to protect. An ignore that hides required behavior is a Red truthfulness stop, and a growing ignore set is a signal that the compared type or the test's contract needs review rather than more options.
Comparison panics when a struct contains unexported fields unless an ignoring option excludes them or an exporting option explicitly permits them. Keep the three responses distinct:
- Ignoring. The narrow ignore option excludes immediate unexported fields
of the specified types. It can be Green or Yellow when an explicit stable contract proves the fields carry no required behavior; hiding required behavior is Red.
- Allow-style access. Forcibly introspecting unexported fields of named
struct types reaches into those types' representation. Orange.
- Exporter-style access. A predicate can permit access for a broader set of
types. Classify it by the concrete ownership and compatibility boundary. Reaching external representation across an unaccepted boundary is Orange or Red, but predicate form alone does not determine that result.
Do not normalize bypassing unexported fields as routine. Prefer comparing an exported projection the owner guarantees.
Sorting contracts
The two sorting transformers have different ordering requirements. Do not merge them.
- Slice sorting requires a consistent relation without self-precedence or
broken chains: if one value precedes a second and the second precedes a third, the first must precede the third. Distinct values may still share one rank. Their prior order is then preserved, so comparison can remain sensitive to input order.
- Map sorting must additionally distinguish every unequal key through the
ordering relation. The helper panics when the relation cannot do so.
Claiming a total order is required for slice sorting is Red. Relying on slice sorting to normalize elements the ordering treats as equivalent is Red when the comparison result must be order-independent.
Approximation
Approximate float comparison takes a relative fraction and an absolute margin, and it panics when either parameter is negative or NaN. It does not apply when an operand is NaN or infinite, so operand handling is a separate decision; a separate option can equate NaN values. Approximate time comparison applies to non-zero time values and panics on a negative margin.
The error-equating option implements the standard matching relation used by errors.Is; that is not exact identity. When exact identity is the required contract, use an exact project-owned comparison. The any-non-nil error sentinel is Red when a particular error must be distinguished.
State these as the release's API facts. Do not present advice-level wording — such as calling a tolerance "small enough" or "reasonable" — as an API rule. A tolerance chosen to make a test pass, rather than justified by the domain, hides a consequential difference and is Red.
Structural threshold contract
Measure per coherent comparison owner — one comparison call site or one comparison helper and the option set it applies — not per test file. Canonical upstream option tests for this release compose as many as seven options in a single comparison and use three or more options in many cases, so a small per-file total is not evidence of safety and a large per-file total is not evidence of risk. Summing unrelated comparisons across a file false-escalates several independent, small, disjoint option sets that carry no aggregate composition risk. Numeric per-file cutoffs are therefore not used here.
| Signal | Green — routine | Yellow — caution | Orange — warning | Red — crisis / stop | |
|---|---|---|---|---|---|
| Options in one comparison owner | few, each independently justified | several, with one shared purpose | a set no reviewer can evaluate as a whole | composition is ambiguous or panics | |
| Comparer and transformer families | none, or one documented rule | two disjoint domains | overlapping domains bounded only by ordering | properties violated, or applicability ambiguous | |
| Filter layers on one option | none needed | one explicit predicate | nested predicates that obscure scope | scope cannot be stated | |
| Ignored field and type breadth | none, or one justified exclusion | a few independently justified | breadth that makes detectability unclear | required behavior is hidden | |
| Unexported handling | not needed, or exported projection compared | narrow ignore of immediate fields | allow- or exporter-style access to owned types | access across an unaccepted external boundary | |
| Comparison-helper layering | comparison at the call site | one helper with a stated contract | layered helpers spanning domains | the protected contract cannot be identified | |
| Semantic domains per helper | one | two, each explicit | several unrelated domains | a domain's rules silently apply to another |
Inspect a comparer, transformer, or ignore family by the distinct domain or independently justified exclusion it governs, not by call-site totals. Inspect filter nesting around each option and each independently meaningful semantic domain without turning either into an escalation counter.
Separate the subject under test from the harness. Expected-panic and adverse-option cases that prove the protected behavior are not defects in the test owner. Escalating on option or domain count alone is a defect. Every Orange or Red must name a detectability, determinism, ownership, or exposure risk.
Source and maintenance boundary
This profile was corrected and calibrated on 2026-07-25 from the canonical v0.7.0 sources for the comparison and option surfaces, the sorting and equating helpers, and the release's own option tests. The library is BSD-3-Clause licensed. The procedure is independently worded and uses factual API identifiers.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 73 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/go-cmp-test-profile/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 3
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/knowledge-forge-ai/agentic-praxis-grimoire/go-cmp-test-profile)