Contributing to Shōkai
Thank you for looking at Shōkai. Specification v0.5.0 is the current published protocol in this repository, and @kigenka/shokai@0.7.6 is npm latest, as of December 1, 2026, 2:19 AM Pacific Time. The 0.7.8 toolkit is prepared for publication. 0.6.1 (25 November 2026) added visitor safety against trap places and the domain-and-certificate rule for doors; the specification stays v0.5.0 on the wire. The public GitHub repository is Kigenka/shokai, at tag v0.7.6. It is not 1.0, so review is the most useful contribution right now: read the specification, try to implement it, and tell us where it's unclear or unsafe.
Ways to help
Open an issue for anything unclear, contradictory or unsafe. Quote the section (for example "§6.7") and, if you can, the conformance check involved (for example "C151").
Implement it from the specification alone (start with
SPEC.md; the canonical normative text isdocs/SPEC-DETAIL.md), run the conformance runner against your door (npx shokai-conformance <url>), and tell us where you had to guess. An independent implementation is the strongest review there is.Propose a change. Small fixes can be a pull request. A change to normative behavior starts as a proposal in
proposals/: copy the shape of an existing one (problem, proposal, open questions) and open a pull request with it.Report a vulnerability privately. See SECURITY.md; please don't open a public issue for it.
Ask or discuss in GitHub Discussions: questions, ideas, and what you built.
Getting started
You need Node.js 22 or later (CI runs 20, 22 and 24) and git.
git clone https://github.com/<your-username>/shokai.git # your fork of github.com/Kigenka/shokai
cd shokai
npm run setup # installs the reference place, the prototype, the SDK and the schema tools
npm test # every suite: vectors, golden traces, scenarios, HTTP, SDK, conformance runner, JSON Schema
git checkout -b my-changeUseful commands while you work:
| Command | What it checks |
|---|---|
npm run trace-lint | Every MUST/SHOULD in SPEC.md and the extensions is tagged to a scenario, trace or check |
npm run trace-typecheck | Every golden trace typechecks against protocol-shapes.ts |
npm run schema / npm run check-schema | Regenerates schema/v<version>/schema.json from protocol-shapes.ts / checks it is current and that the golden traces validate |
npm run check-links | Links stay inside the spec bundles; every version marker agrees |
npm run quickstart | Runs QUICKSTART.md as written, in a fresh temp directory |
cd packages/shokai && npm test | The SDK and the conformance runner |
Where things live
- The specification:
SPEC.md(the normative core) anddocs/SPEC-DETAIL.md(the canonical normative text),extensions/,SIGNING.md; the wire types inprotocol-shapes.ts, and the JSON Schema generated from them inschema/. Don't editschema/by hand. - Conformance:
conformance/(golden traces, test vectors, the checklist); the runner is inpackages/shokai/src/conformance/. - The SDK:
packages/shokai/. Itssrc/core/andspec/are copied from the reference and the root byscripts/sync-core.mjs: edit the originals, then runnpm run syncinpackages/shokai. - Reference implementations:
reference/engawa/(the place server whose core the SDK ships),reference/prototype/,reference/signing-page/. - Proposals:
proposals/, numbered, not normative until merged into the spec.
Two kinds of contribution
- Code, tests, tools and documentation: the Developer Certificate of Origin 1.1 sign-off below, under the license of the files you change. No contributor agreement.
- Normative specification changes (
SPEC.md,docs/SPEC-DETAIL.md,extensions/,conformance/,SIGNING.md,protocol-shapes.tsand soschema/): these will need a specification contributor agreement, the OWF Contributor License Agreement 1.0 (Copyright and Patent), once counsel approves it. Until then, the project accepts no outside changes to normative files. Please open an issue or a proposal inproposals/instead (proposals aren't normative); the editor writes any resulting normative text. If you contribute for an employer, its authorization will be needed too.
Before outside material enters the specification
Issues, proposals and feedback are welcome and may be discussed without the OWF CLA. Sending them doesn't give the project the copyright and patent rights it needs to put them in a final specification, and an editor rewriting them doesn't settle that either. So:
- Discussion is open; incorporation waits for clearance. Substantive material from a third party (wording, a design, a message shape, a rule, a test) is not incorporated into a final normative specification until the project's contributor-rights review for it is complete: its origin checked, and the approved specification rights clearance obtained (the OWF CLA once counsel approves it, from the contributor and, where needed, their employer or organization).
- Logged. Each such item is entered in the contribution clearance register: its source (issue, proposal, message or conversation), the material used, the dates, its clearance status and who approved it. Until it is cleared it may appear only in non-normative places (issues,
proposals/, drafts marked as such). - Ideas and plain bug reports ("§6.7 contradicts §7.2") usually need no clearance; the editor decides, and records the decision in the register when in doubt.
- Commits that carry cleared material still need the DCO sign-off below.
Developer Certificate of Origin (DCO)
Each commit must carry a sign-off line stating that you wrote the change or otherwise have the right to submit it under the project's licenses:
Signed-off-by: Your Name <you@example.com>git commit -s adds it for you. Use your real name (sorry, no anonymous contributions). Pull requests whose commits aren't all signed off can't be merged.
Licenses
- Code and the whole specification (the reference implementations, the SDK, tools and tests, plus
SPEC.md,docs/SPEC-DETAIL.md,extensions/,conformance/,proposals/,protocol-shapes.tsandTHREAT-MODEL.md): Apache License 2.0, including its patent license (§3). - Explanatory documentation (
docs/, except the normativedocs/SPEC-DETAIL.md): Creative Commons Attribution 4.0. REUSE.tomlmaps every path to its license; the license texts are inLICENSES/.
By signing off, you agree that your contribution is licensed under the license that applies to the files you change. The use of the project's names and logo is in TRADEMARKS.md.
IP status (governing statement). Shōkai's specification and reference implementation are presently available under Apache License 2.0. The project intends to add a specification-level patent commitment under the OWFa 1.0 Final Specification Agreement (Patent Only), made per final version, starting with v0.5.0, with Yu Sung Yeh (the copyright holder and current founder-steward) as the intended signer; the copyright license stays Apache License 2.0. No such commitment has been executed yet. If the project later moves to a legal entity or a neutral home, later versions may be signed by it, as described in PATENTS.md; the choice is recorded as decision D27 in DECISIONS.md, pending the editor's confirmation and legal review. No existing copyright or patent owner is represented as having made an OWFa commitment merely because the specification has been published. Scope of a future commitment. Under OWFa 1.0, a signer's Granted Claims are limited to the patent claims needed to implement the functionality the specification describes (§7.4). A commitment does not reach a signer's whole personal patent portfolio, or claims that are not needed for the specification. The proposed commitment is described in PATENTS.md (not yet executed).
You keep the copyright in what you contribute; signing off licenses it, it doesn't assign it. New source files start with a short header naming the actual copyright holder: your own name for a file you write, or the project line for the project's own files (use # instead of // in shell and Python files, and an HTML comment in specification Markdown):
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2026 Your NameThe project's own files carry SPDX-FileCopyrightText: 2026 Yu Sung Yeh and Shōkai contributors (older files may still say 2026 Yu Sung Yeh).
To check licensing information locally, run reuse lint (for example pipx run reuse lint). It isn't part of CI yet, because CI would have to download the tool on every run.
AI-assisted contributions
You may use AI tools (code assistants, agents, language models) to help write code, specification text, tests or documentation. The rules are the same as for any other contribution:
- The person who signs off is accountable. Your
Signed-off-by:line is your DCO statement for the whole contribution, including any part an AI tool produced. An AI tool can't sign off, and a sign-off can't name one. - Review it as your own. Read, understand and test everything you submit. Don't submit output you couldn't explain in review.
- Only submit what you have the right to license. Don't submit material that reproduces third-party code or text you don't have the right to contribute under the project's licenses, or that your tool's terms don't let you contribute.
- Say so when it's substantial. If an AI tool wrote a substantial part of a change, mention it in the pull request description, naming the tool and what you decided or changed yourself (for example "drafted with an AI assistant; I chose the design, rewrote the error handling and tested it"). This helps reviewers and the project's authorship and provenance records; it doesn't change who is accountable.
- Fictional examples and the no-secrets rule below apply to AI output too.
Rules for spec changes
- Every new MUST or SHOULD carries at least one tag: a scenario (
[SC-…]), a golden trace ([G…]) or a conformance check ([C…]).npm run trace-lintmust report 0 gaps. - Golden traces must still typecheck (
npm run trace-typecheck). - Behavior changes come with tests in the reference implementation (
reference/engawa/test/) and, if they're visible on the wire, a conformance check. - Add an entry to
CHANGELOG.mdunder "Unreleased".
Pull requests
- Keep each pull request to one topic.
- Run
npm testat the repository root before you push (see the README for setup). CI runs the same checks. - Use fictional people, businesses and places, and example domains (
*.example), in examples and tests. Real technologies and standards (MCP, OAuth, passkeys/WebAuthn, payment or bank-data services and so on) may be named when they're described accurately as existing infrastructure. Don't imply that any real company endorses, partners with or behaves in a certain way in Shōkai. - Never commit keys, tokens,
.envfiles, local state or personal data.
Conduct
Everyone taking part is expected to follow the Code of Conduct. How decisions are made is described in GOVERNANCE.md.