Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.

A shared design format can change without its declared version changing.
In my agent-shuriken project, the contract-design skill depends on a format supplied by another skill, design-doc.
It also uses a separate script from that skill to check the finished design before implementation and testing.
Both references in musubi.json accept ^1.0.0, but they store separate fingerprints.
musubi is the CLI that checks these declared dependencies.
The design skill instructs the agent to run musubi check before reading the shared content if the command is available, and to stop if the check fails.
If the shared format changes but its declared version stays at 1.0.0, the consumer's range still accepts it. The agent may nevertheless read instructions that have never been checked with that consumer. I designed musubi to keep the accepted version range and the fingerprint of the previously checked content together.
To follow that decision, the examples below use musubi's smaller design-document fixture at commit 88a82fefd5b234f8f7fd7cae2ab4a82861722715.
The version range expresses which versions the consumer accepts; the fingerprint records the exact inputs it checked.
The consumer's examples then help decide whether to accept changed inputs.
The experiments were run for this article in disposable directories, not in a deployed service or a coding-agent session. The test results come from actual Node.js processes.
A compatible version can still contain a change

The example repository has a design-doc skill that provides a format called design.
Its consumer, api-design, follows that format when producing API design documents.
Here, the provider supplies shared content, while the consumer declares which content it follows.
The provider declares the version, format path and JSON check path in its own musubi.json under provides.design.
skills/
├── design-doc/
│ ├── SKILL.md
│ ├── musubi.json
│ ├── formats/design.md
│ └── checks/design.json
└── api-design/
├── SKILL.md
├── musubi.json
└── examples/orders-api.mdThe consumer records the accepted range and checked fingerprint together in examples/skills/api-design/musubi.json.
It also names the example document to check against the provider's rules.
{
"musubi": "2026-11-19",
"follows": {
"design-doc/design": {
"version": "^1.0.0",
"integrity": "sha256-yNSwpBT+xXEV5bGBqedpHmjWIHVi+JaAnRATAJ0s7wM=",
"examples": [
"examples/orders-api.md"
]
}
}
}The range ^1.0.0 accepts declared versions from 1.0.0 up to, but excluding, 2.0.0. The range is a compatibility policy, not proof of semantic compatibility. The fingerprint is the SHA-256 digest, encoded in base64, of the provider content as musubi defines it. A different fingerprint does not establish whether a change is harmful; it identifies a difference in the hashed inputs.
Content-level dependencies
The reference identifies one content item, design-doc/design, rather than accepting everything that happens to live in the provider's directory.
The provider's provides.design entry selects the format and its check; the consumer's follows entry records the range, fingerprint and example files for that item.
Here, examples/orders-api.md belongs to the consumer.
It is a maintained example of what that particular skill should produce, so different consumers can check different examples against the same format.
The two references in the real contract-design introduction use this separation for another reason.
Reading the design format and running the finished-document verification script are different operations, even though both resources come from design-doc.
Separate content entries let a consumer identify the exact file it needs for each operation.
Because the provider's loading instructions are shared, however, those separate entries do not necessarily have independent fingerprint inputs; a common SKILL.md edit can affect both.
Version policy and checked content
The project's architecture decision record (ADR) 0003 records the design decision and rejected alternatives, including three ways to store dependency information.
A range alone would miss a rewrite inside the range.
A fingerprint alone would block even compatible fixes until the digest was rewritten, without expressing a version policy.
Putting the range in musubi.json and the checked versions and fingerprints in a separate musubi.lock would give consumers two places to read.
I chose to keep the range and the fingerprint side by side.
Consider the routine case of an added heading in the shared format.
Keeping version 1.0.0 would not trigger a range rejection, but it could make a consumer's example incomplete.
Changing the declared version to 1.0.1 would still be accepted by ^1.0.0; the content change would still need checking.
The stored fingerprint makes that review depend on the files that changed, rather than on whether the provider remembered to change a version string.
Changing the version string alone has the opposite effect.
In a CLI experiment for this article, changing only the provider's declaration from 1.0.0 to 1.0.1 left the fingerprint unchanged and ordinary check passed.
The provider's musubi.json is not itself one of the three hashed files in this example.
The range evaluates its declared version, while the fingerprint evaluates the selected content; neither substitutes for the other.
A package manager may still lock the installed skill or its source revision. musubi instead tracks the content a consumer follows and has checked. An installer can change files after an earlier check, which is why ADR 0003 also calls for a check before the agent reads the content, when the command is available. This is an instruction to the agent, not a runtime access-control mechanism.
Hash the instructions and the check, not just the template

The provider's SKILL.md tells the agent which file supplies the format. The format contains the required headings and table. The JSON check defines what the CLI looks for in consumer examples. Changing any of these can affect how a consumer uses the content.
That is why fingerprintFiles in src/skills.ts builds a path list that includes the provider's SKILL.md, the referenced content file and the check file if one is declared. fingerprint in src/fingerprint.ts hashes those files in order. For this example the inputs are SKILL.md, formats/design.md, and checks/design.json, in that order.
The hashing procedure is equivalent to the following pseudocode.
for each path in [SKILL.md, content file, optional check file]:
hash.update(path + "\n" + byte_length + "\n")
hash.update(file_bytes)
hash.update("\n")
integrity = "sha256-" + base64(digest)Including paths and byte lengths gives the input an explicit framing. A newline is a byte too. There is no normalization of Markdown formatting before hashing. The check is deliberately conservative: even a wording-only change that has no effect on the final document can require rechecking. Since the whole provider SKILL.md is included, editing shared loading instructions can also invalidate fingerprints for more than one content item.
Paths, bytes and selected inputs
The framing makes each file boundary part of the input. The digest is built from a relative path, a decimal byte count, the file bytes and a separator, repeated in the specified order. It therefore identifies more than the concatenated prose of a template. Moving identical bytes to a different relative path produces a different input, even if a reader sees the same text after opening the file.
The pinned fingerprint function confirmed that distinction in an isolated experiment.
Renaming the copied format from formats/design.md to formats/renamed.md, then hashing the new path with the unchanged file bytes, changed the result.
This was a function-level experiment, not a complete provider migration: the instructions and declaration were not rewritten to use the new name.
It isolates what the path contributes to the digest.
The input list is also a limit on what the fingerprint can detect.
Adding a separate notes.md beside the provider files left the selected-input digest unchanged in another experiment.
musubi does not hash every file in the directory or automatically follow every Markdown link.
If a shared instruction depends on additional material, a matching fingerprint alone does not establish that the additional material is unchanged.
What the experiments establish
To separate byte changes from structural changes, the experiment appended one newline to a copied provider file, calculated the fingerprint, then restored the original bytes.
Each row below is a separate edit to one of the three selected files, using the pinned fingerprint.ts implementation.
| Changed file | Fingerprint prefix after change | Matches recorded integrity? |
|---|---|---|
| Original provider files | yNSwpBT+ | Yes |
| SKILL.md, one newline added | pYObObpG | No |
| formats/design.md, one newline added | aNXx0Oif | No |
| checks/design.json, one newline added | vAI2pkXr | No |
| Original bytes restored | yNSwpBT+ | Yes |
The prefixes are shortened for readability; musubi compares the full value.
The original digest matched the value already recorded by the repository's consumer, and restoring the bytes restored that value.
The pinned range function also accepted the three 1.x examples in the version diagram and rejected 2.0.0 for ^1.0.0.
These newline edits deliberately leave the required headings and table columns intact. They separate change detection from the later decision to accept the changed content. A mismatch is expected even for such a small edit; whether the consumer's examples still satisfy the rules is a separate question. The experiment does not measure whether the resulting design documents are useful or whether an agent interprets the prose correctly.
The command-level cases below used the actual pinned CLI with disposable copies of its example files.
Source and fixture bytes were checked against the pinned Git blob IDs before execution.
The supported-runtime run used Node.js v24.22.1: nine function assertions, seven CLI cases, six additional boundary cases and all 27 tests in tests/check.test.ts passed.
An earlier run on Node.js v22.16.0 was below the declared minimum of 22.18; the supported run supersedes it.
The full upstream suite and an actual coding-agent session were not run.
A mismatch is a review checkpoint

Mismatch and example failures
The actual control flow in src/check.ts first resolves the referenced content and checks its version. It calculates the current fingerprint only after the version is accepted. When the fingerprint differs, ordinary musubi check reports a problem and skips the changed reference's example rules.
With --update, the checker applies the provider's current JSON rules to the consumer's designated examples when both exist. For a changed fingerprint, it queues a rewrite if checking that reference adds no problems. The table describes the design-document example, which has both JSON rules and a designated example.
| Condition | Ordinary check | Check with --update |
|---|---|---|
| Version outside accepted range | Reject reference | Reject reference |
| Matching fingerprint | Check designated examples | Check designated examples |
| Changed fingerprint, examples pass | Report mismatch, skip rules | Queue new fingerprint |
| Changed fingerprint, example fails | Report mismatch, skip rules | Report rule failure; keep old fingerprint |
For a changed reference, --update is the explicit request to evaluate examples against new inputs and consider recording them.
It does not decide whether a change in the instructions is desirable.
That decision still requires reading the provider's diff and the consumer's example.
The newline experiments show the successful update path: each ordinary check returned exit 1 for a mismatch, while --update accepted the edit and the subsequent check passed.
The failure path depends on the example's structure.
Its JSON rules require a ## Decisions heading with a table containing Option, Chosen and Why columns.
Removing that heading made --update fail and left the old fingerprint in place; changing the provider's declared version to 2.0.0 also prevented the update.
A matching fingerprint does not bypass those example rules. In a separate CLI case, the required heading was removed from the consumer example without changing the provider files. The fingerprint still matched, but ordinary check returned exit 1 for the missing heading. This distinguishes a changed dependency from a consumer example that no longer satisfies an unchanged dependency.
Per-reference rewrites
One consumer's failed example does not prevent another consumer from accepting an update. In the two-consumer experiment, a copy of the example consumer had its required heading removed, then the shared format was edited. The CLI returned exit 1, but the valid consumer's digest had been rewritten while the invalid consumer kept its old digest. At this commit, updates are per reference, not an all-or-nothing transaction.
The implementation explains the partial update.
Before applying a reference's rules, check remembers the current number of reported problems.
If checking that reference adds no problems, its changed fingerprint is queued for rewriting.
After processing references and checking for cycles, the CLI writes the queued changes before deciding its overall exit status.
Inspect the declaration diff even after exit 1. The error output identifies what still needs work; the diff shows which references have already accepted new bytes. Fix the failed examples and recheck without assuming that the previous command left every declaration untouched.
Updates without structural checks
ADR 0004 limits musubi check to declarative JSON rules rather than allowing it to execute arbitrary provider scripts. It checks the structure of the specified examples, not every document an agent generates. In agent-shuriken, design-doc/verify is a separate reference: the design skill explicitly runs that script against a completed design document. A passing musubi check does not certify that script's safety, the provider's authenticity or the correctness of the generated design. If there are no designated examples or no JSON rules, this step performs no example-based verification. A changed fingerprint can still be updated when no new problems are recorded.
Two CLI experiments illustrate what an update means when these checks are absent.
In the first case, the example file was left with its required heading removed, but the declaration no longer named any examples.
Baseline check passed because that broken file was not selected for checking.
After a newline edit to the provider format, normal check reported the mismatch, while --update accepted the new fingerprint and the subsequent check passed.
In the second case, the provider declared no JSON check. The baseline fingerprint was recalculated for the resulting two-file input list, while the consumer's named example was left structurally broken. Again, a later format edit caused a mismatch, but update succeeded because there were no JSON rules to apply. This does not show a validator being defeated: no structural validation had been configured for that reference.
An integrity field without representative examples cannot establish that a changed template still fits the consumer's output.
Even with examples, a headings-and-columns check can establish those structural properties only.
A complete-looking decision table may still contain a poor decision, which requires reviewing the example or using a separate domain-specific check.
Try the decision on a disposable checkout

The disposable fixture
Use Node.js 22.18 or later and a disposable checkout. The pinned check command has no external runtime dependencies. The clone and checkout commands below set up the reader's environment; the experiment used copies of the same pinned source and example files.
git clone https://github.com/cardene777/musubi.git
cd musubi
git checkout 88a82fefd5b234f8f7fd7cae2ab4a82861722715
node --experimental-strip-types src/cli.ts check examples/skillsAfter confirming the baseline, add a newline to one provider file. The content's declared version is unchanged, but the fingerprint must differ, as the direct experiment showed.
Before accepting the edit, inspect it with git diff -- examples/skills/design-doc and read the consumer's example.
# In a disposable checkout of the pinned repository:
printf '\n' >> examples/skills/design-doc/formats/design.md
node --experimental-strip-types src/cli.ts check examples/skills
# Observed: exit 1 (fingerprint mismatch).
# Review the changed file and the consumer example before accepting it.
node --experimental-strip-types src/cli.ts check examples/skills --update
git diff -- examples/skills/api-design/musubi.json
node --experimental-strip-types src/cli.ts check examples/skillsThe final declaration diff
Before running --update, review both the provider's diff and the example; if the change is not intended, do not accept it. Afterward, inspect the consumer's declaration and check again. For a real skill repository, review the format changes and the corresponding integrity changes in the same pull request. Discard the disposable checkout when finished.
For example, if the provider's rules gained a required heading or column, update the maintained example only after deciding what that requirement means for the consuming skill. Removing the example from the declaration merely to obtain a passing update would remove the check that makes the result useful. If the declared version is outside the range, reconsider the compatibility decision before widening it.
This declaration is useful when several skills share instructions and their consumers need a record of which content they accepted. A self-contained skill with no shared content may not need that extra dependency bookkeeping. When accepting a shared-format update, commit the new integrity value with any example changes needed to demonstrate the intended output.
For the broader declaration and discovery model, see the existing musubi guide on Bitsumi.
References
- ADR 0003: Range and fingerprint without a lockfile
- ADR 0004: JSON rules rather than scripts
- Fingerprint implementation
- Version range implementation
- Check implementation
- Check tests
- Consumer example declaration
- Definition at the checked revision
- agent-shuriken: contract-design's shared content declaration
- Provider file selection and declaration validation
- agent-shuriken: contract-design instructions
