AGENT SKILL

CWP Conformance

暂无简介

License 许可
MIT
所属仓库
rhCat/skillChip
最近更新
2026-07-31
Stars
★ 0
Forks
0

01 前言 Front Matter

name
CWP Conformance
perks
[ "repin", "doclint", "vectors", "crosslang", "digestlint", "interop", "schemas", "keystore", "labeling", "reprobuild", "quickstart" ]
skill
cws-conform

02 资源文件 82

03 SKILL.md 正文

cws-conform — CWP Conformance (SV-1)

Make "cyberware is a specification, not a codebase" a checkable claim. A chip's identity is the canonical hash of its parts. The repin perk first observes drift against the committed pins — it verifies each skill's files against its existing index.json (a reference the run did not produce), so a file changed since the last pin is named — then regenerates every per-skill index.json (sha256 of every file + a roll-up skill_sha) and the chip manifest (index.json with the roll-up chip_sha), and records the old -> new chip_sha transition. The SV-1 self-referential act, performed and evidenced.

What to look out for

repin.json carries {skills, new_skills, old_chip_sha, new_chip_sha, changed, pre_drift[], drift_count, status}. The falsifiable signal is pre_drift: skills whose committed index no longer matched their files. status: "green" (exit 0) means the committed chip was already canonical — a no-op re-pin, the healthy steady state. status: "drift" (nonzero exit) means the committed pins were stale and the named skills had to be rewritten — the chip is still left re-pinned, but the drift is flagged (this is the SV-1 gate: someone changed a file without re-pinning). LOGS TO CHECK: that line + repin.json + the executor run-ledger.

Perks

perk tool nature
repin cws_repin observe drift vs committed pins, regenerate indexes + manifest, record the chip_sha transition — writes to TARGET_CHIP's index files
doclint cws_doclint structural conformance lint for a spec doc — exists, title, normative, on-topic (P0-V10) — read-only / safe
vectors cws_vectors replay the golden vector corpus (canonical + digest + sig verdicts) → conformance verdict (P0-T07/T17) — read-only / safe
crosslang cws_crosslang diff the independent Go verifier vs canonical.py+sign.py over the corpus — the external anchor (P0-T08) — needs the go toolchain
digestlint cws_digestlint prove every JSON-object hash routes through cwp.canonical, not ad-hoc json.dumps — the digest-cutover gate (P0-T04 / F1 / P0-V03) — read-only / safe
interop cws_interop prove cwp ↔ cosign/sigstore DSSE interop at the Ed25519ph layer, both directions (P0-T03) — needs openssl≥3.4 + go
schemas cws_schemas validate the CWP message corpus against the 2020-12 JSON Schemas (P0-T05) — 100% valid + negatives rejected — read-only / safe
keystore cws_keystore KeyStore seam contract (P0-T15) — file + PKCS#11-stub backends pass one suite; seam_real + HSM non-export — read-only / safe
labeling cws_labeling truth-in-labeling doc lint (P0-T16) — no enforcement claim without a criterion-id reference — read-only / safe
reprobuild cws_reprobuild reproducible engine build baseline (P0-T13 / M1 / P0-V11) — builds the Go anchor twice in isolated caches (two independent builders), asserts byte-identical digests; diffoscope: empty is proven by the sha256 match (and confirmed by diffoscope where installed); a flipped byte must break the match — needs the go toolchain
  • repin — set TARGET_CHIP (a chip dir: skill dirs each with a perks.json). Output: repin.json.
  • digestlint — set SCAN_ROOT (a dir) + optional EXCLUDE (default infra/cwp) / WHITELIST (relpath:line exemptions). Output: digestlint.json. AST same-expression lint: no json.dumps may feed a hash outside infra/cwp. This is what redeems the P0-T04 digest cutover.
  • doclint — set SPEC (a .md) + optional MIN_NORMATIVE / REQUIRE. Output: doclint.json. This is what redeems the P0 spec tranche (spec/keys.md, privacy.md, time.md, inflight.md, …).

Scope (the SV-1 surface)

repin is the canonical re-pin under the current sha256 scheme; doclint is the structural spec lint (P0-V10). The full P0 surface is built: vectors replays the golden-vector corpus through infra/cwp, crosslang diffs the verdict stream against the independent Go verifier (the V-EXT external anchor), schemas validates the message corpus against the 2020-12 JSON Schemas, keystore contracts the KeyStore seam (file + PKCS#11 stub), labeling is the truth-in-labeling doc lint, and reprobuild proves the byte-identical engine build. crosslang / interop / reprobuild need the Go toolchain; the rest are pure.

How to use it

Pick repin, copy ledger.json → task-ledger.json, set TARGET_CHIP + record_store, then validate → compose → compile → oversight → executor.

04 同仓库更多 Skills