@ai-dossier/cli 0.92.0-next.638.1 → 0.92.0-next.640.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +27 -3
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -378,6 +378,26 @@ Override the sidecar path with `--evidence <path>`, or skip attaching one (even
378
378
 
379
379
  ---
380
380
 
381
+ ## Dossier Layout: the Agent Skills Format
382
+
383
+ Since 0.92.0 the commands that write dossiers emit the **spec layout**: the file is a valid [Agent Skill](https://agentskills.io/specification) as written. `name` and `description` (plus the optional `license`, `compatibility`, `allowed-tools`) sit at the top level, and every other Dossier field sits under `metadata` as a `dossier.<field>` string. Signed files use signature v3 (`covers: spec-frontmatter+body`), which covers that frontmatter as written plus the body. Legacy (flat, usually JSON) files are still read, and their v1/v2 signatures still verify.
384
+
385
+ ```bash
386
+ ai-dossier sign my-skill.ds.md --method ed25519 --key my-key # writes the spec layout + v3 signature
387
+ ai-dossier verify my-skill.ds.md # picks v1/v2/v3 from `covers`
388
+ ai-dossier lint my-skill.ds.md # `spec-shape` rule checks the Agent Skills layout
389
+ ```
390
+
391
+ | Command | Legacy input | Spec-shaped input |
392
+ |---|---|---|
393
+ | `sign` | converts to the spec layout, signs under v3; fills `name` (file name) and `description` (`objective`) when absent | re-signs under v3 |
394
+ | `format` | unsigned: converts to the spec layout. Signed: stays legacy (converting would orphan the signature). `--keep-legacy` always stays legacy | re-serializes as block YAML, keeping every value's exact string; it also trims trailing whitespace from the body, and if that changes the body the checksum is updated and the file must be re-signed |
395
+ | `checksum --update` | keeps the legacy layout | replaces only `dossier.checksum`; warns when a signed body changed |
396
+ | `lint` | `legacy-layout` (info): notes the old layout and any `name`/`description` that would fail once converted | `spec-shape` (error): name pattern, description length, string-only `metadata`, required `dossier.*` keys, block-style YAML |
397
+ | `publish` | uploads as written, with a note to re-sign | uploads as written |
398
+
399
+ The registry verifies signatures at publish time and rejects a bad one with 400 `INVALID_SIGNATURE`. Full specification, value encoding, strict-YAML rules and migration steps: [Spec-Shaped Dossiers and Signature v3](../docs/reference/spec-shape.md).
400
+
381
401
  ## Skills
382
402
 
383
403
  A dossier is a skill with trust, versioning, and registry distribution added. These commands bridge the registry and Claude Code skills (`~/.claude/skills/`).
@@ -396,9 +416,11 @@ ai-dossier install-skill org/skills/my-skill --fresh --force
396
416
  ai-dossier install-skill --remove my-skill
397
417
  ```
398
418
 
419
+ A spec-shaped dossier is copied byte for byte (a `---dossier`/`---json`/`---yaml` fence becomes `---`, which parses the same), so its v3 signature still verifies in `~/.claude/skills/` and `skills-ref validate ~/.claude/skills/<name>` accepts it. A legacy dossier's JSON frontmatter is rendered as YAML, with its registry path recorded as `x_source`. Every install also writes the registry path to a `.dossier-source` file next to `SKILL.md`. A spec-shaped copy cannot carry `x_source`, because v3 covers every frontmatter field, so the collision check and `install-skill --list`/`--all`/`--outdated` read `.dossier-source` instead. It is ignored unless it holds exactly one registry path.
420
+
399
421
  Restart Claude Code (or start a new session) to pick up a newly installed skill. At run time the skill calls `ai-dossier run <registry-path>`, which fetches and verifies the dossier on demand — so you don't need to install the dossier separately.
400
422
 
401
- **opencode support (auto-detect)**: When `~/.config/opencode/` exists, `install-skill` also writes a YAML-frontmatter wrapper to `~/.config/opencode/skills/<name>/SKILL.md`. opencode's parser only accepts standard YAML frontmatter (`---`), so dossier skills that use `---dossier` (JSON) frontmatter would otherwise be invisible. The wrapper carries the same `name`, `description`, and body; the signed source in `~/.claude/skills/` is never modified. Delegating skills (body contains `ai-dossier run`) also get an `allowedTools: [Bash(ai-dossier run *)]` line so opencode auto-approves the delegation.
423
+ **opencode support (auto-detect)**: When `~/.config/opencode/` exists, `install-skill` also writes a YAML-frontmatter wrapper to `~/.config/opencode/skills/<name>/SKILL.md`. opencode's parser only accepts standard YAML frontmatter (`---`), so legacy dossier skills that use `---dossier` (JSON) frontmatter would otherwise be invisible. Spec-shaped skills as the CLI writes them are already `---` YAML, so opencode reads them from `~/.claude/skills/` and no wrapper is written. The wrapper carries the same `name`, `description`, and body; the signed source in `~/.claude/skills/` is never modified. Delegating skills (body contains `ai-dossier run`) also get an `allowedTools: [Bash(ai-dossier run *)]` line so opencode auto-approves the delegation.
402
424
 
403
425
  Override with `--for claude|opencode|both`:
404
426
 
@@ -441,6 +463,8 @@ ai-dossier skill-export my-skill --version 2.0.0 --changelog "Add range support"
441
463
  | `--changelog <msg>` | Changelog message for the release |
442
464
  | `--verify` | Re-install after publish to confirm the roundtrip |
443
465
 
466
+ When it bumps the version, or the skill is an unsigned legacy file, `skill-export` writes the skill in the spec layout (locally too) before publishing. A version bump changes bytes the old signature covered, so a signature is dropped with a warning rather than shipped stale, and `--json` output carries `"signatureDropped": true`. Re-sign with `ai-dossier sign` and publish to ship a signed version. A spec-shaped skill exported with `--no-bump` is published byte for byte, signature included.
467
+
444
468
  ---
445
469
 
446
470
  ## Runstate — workflow milestones
@@ -2178,9 +2202,9 @@ Project registries are merged with user registries. User-configured registries t
2178
2202
 
2179
2203
  **How**:
2180
2204
  1. Checks if signature present in frontmatter
2181
- 2. Validates signature format
2205
+ 2. Validates signature format and its `covers` scheme: v1 (body), v2 (`frontmatter+body`, legacy layout) or v3 (`spec-frontmatter+body`, spec layout). An unknown scheme, or one that does not match the file's layout, fails
2182
2206
  3. Checks if key is in trusted keys list
2183
- 4. Verifies signature against content
2207
+ 4. Verifies signature against the payload that scheme covers
2184
2208
 
2185
2209
  **Result**:
2186
2210
  - ✅ Valid + Trusted → From known author
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-dossier/cli",
3
- "version": "0.92.0-next.638.1",
3
+ "version": "0.92.0-next.640.1",
4
4
  "description": "CLI for signed, versioned agent skills and model-driven orchestration: create, verify, sign, publish, and install skills for Claude Code, Codex, OpenCode, and LLM tools.",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -56,9 +56,9 @@
56
56
  "registry": "https://registry.npmjs.org"
57
57
  },
58
58
  "dependencies": {
59
- "@ai-dossier/core": "1.17.0-next.638.1",
60
- "@ai-dossier/sched": "0.69.0-next.638.1",
61
- "@ai-dossier/worktree-pool": "0.7.6-next.638.1",
59
+ "@ai-dossier/core": "1.17.0-next.640.1",
60
+ "@ai-dossier/sched": "0.69.0-next.640.1",
61
+ "@ai-dossier/worktree-pool": "0.7.6-next.640.1",
62
62
  "commander": "^12.1.0",
63
63
  "yaml": "^2.8.3"
64
64
  },