Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{
"name": "swift-json",
"source": "./plugins/swift-json",
"description": "Version-aware consumer assistance for ThorFuchs/Swift-JSON, validated against library 1.9.0.",
"version": "0.2.0",
"description": "Version-aware consumer assistance for ThorFuchs/Swift-JSON, targeting library 1.10.0.",
"version": "0.3.0",
"category": "development"
}
]
Expand Down
36 changes: 20 additions & 16 deletions Documentation/AgentDeveloperKit.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Swift-JSON developer kit

Kit **0.2.0** is the source candidate in this repository. Its library pin is
released **Swift-JSON 1.9.0**. Those version numbers are separate. The kit
Kit **0.3.0** is the source candidate in this repository. Its library pin is
released **Swift-JSON 1.10.0**. Those version numbers are separate. The kit
supplies consumer instructions and examples; the library API is unchanged.
Kit 0.3.0 is not yet qualified or published. Execute the acceptance gates below
before publication.

The previous **0.1.0 preview**, pinned to library 1.6.1, remains available from its
[dedicated download release](https://github.com/ThorFuchs/Swift-JSON/releases/tag/developer-kit-v0.1.0).
A `developer-kit-v0.2.0` download release does not exist yet; publishing it is a
A `developer-kit-v0.3.0` download release does not exist yet; publishing it is a
separate maintainer decision.

The kit supplies one focused `swift-json` skill: identify an application's actual
Expand All @@ -30,8 +32,8 @@ carries the same name, version and description as the portable manifest. The ski
is discovered from `skills/swift-json`. Both commands persist user settings, so
they are the user's action. `claude plugin validate .` and
`claude plugin validate ./plugins/swift-json` passed with Claude Code 2.1.92
on 2026-11-11. Installation from GitHub and end-to-end use in a session are not
recorded yet.
on 2026-11-11. That is historical 0.2.0 evidence, not a 0.3.0 result. Installation and end-to-end
use of 0.3.0 are pending.

## Use with Codex

Expand All @@ -47,7 +49,7 @@ at `plugins/swift-json` and follow the official
[repo marketplace example](https://developers.openai.com/plugins/build/plugins#install-a-local-plugin-manually)
with source.path `./plugins/swift-json`. The portable root `plugin.json` uses fixed
skills/ discovery and needs no compatibility overlay. Kit 0.1.0's Codex CLI
0.162.0-alpha.17.2 discovery observation has not been repeated for 0.2.0.
0.162.0-alpha.17.2 discovery observation has not been repeated for 0.3.0.

## Contents and compatibility

Expand All @@ -56,16 +58,16 @@ the portable [plugin manifest](../plugins/swift-json/plugin.json) and the Claude
Code manifest. The same skill bytes produce a standalone distribution. Supporting
references are progressively loaded; assessment criteria are excluded from both
archives. The [compatibility/source map](../plugins/swift-json/skills/swift-json/references/compatibility.json)
binds the exact 1.9.0 commit `f2a0d12` and tree `6b54387` and 50 immutable
declaration/DocC hashes to fourteen recipes.
binds the exact 1.10.0 commit `564ca8c` and tree `3ee5c5f` and 63 immutable
declaration/DocC hashes to nineteen recipes.

Release 1.9.0 has twelve libraries: JSON, JSONSchema, JSONSchemaExamples,
Release 1.10.0 has twelve libraries: JSON, JSONSchema, JSONSchemaExamples,
JSONStreaming, JSONPatch, JSONHTML, JSONBridges, JSONNavigation, JSONInspection,
JSONTransform, JSONValueDSL and JSONSchemaDSL; swift-json is a separate executable.
The [version reference](../plugins/swift-json/skills/swift-json/references/versions.md)
records which release added which API, so the skill does not use a 1.7–1.9 API in
records which release added which API, so the skill does not use a 1.7–1.10 API in
a consumer resolved to an older version, upgrade a dependency silently or claim
that unfamiliar revisions were qualified by testing 1.9.0.
that unfamiliar revisions were qualified by testing another version.

Compilation requires a local executor, Swift tools/compiler 6.4+ and language
mode 6. Deployment minimums are macOS 15 and iOS/iPadOS 18; development uses
Expand All @@ -89,15 +91,15 @@ python3 -B Scripts/package_developer_kit.py --output /absolute/new/kit-b
The validator checks the kit's content, not a diff: the exact payload file set,
both host manifests and their agreement, the repository marketplace entry, skill
frontmatter and links, the absence of private paths and untested Swift fences,
the consumer's twelve imports, exact 1.9.0 pin and recipe markers, and every
the consumer's twelve imports, exact 1.10.0 pin and recipe markers, and every
local hash. When the pinned commit is present locally (CI checks out full
history) it regenerates the compatibility map from that commit's bytes and
requires an exact match; otherwise it reports that comparison as not run.
After changing a kit file, run `validate_developer_kit.py --write-compatibility`
to refresh the map, then review the diff.

Each package directory contains `swift-json-plugin-0.2.0.zip`,
`swift-json-skill-0.2.0.zip` and `ASSETS.json`. ZIP members have stable order,
Each package directory contains `swift-json-plugin-0.3.0.zip`,
`swift-json-skill-0.3.0.zip` and `ASSETS.json`. ZIP members have stable order,
timestamps and modes; compare both builds' bytes. Each ZIP has a self-excluded
member manifest. The standalone skill payload is byte-identical to the plugin's
skills/swift-json subtree. Supply `--plugin-zip PATH --skill-zip PATH` to verify
Expand All @@ -118,7 +120,9 @@ coverage, staged Patch failure and inert HTML data. The 1.7–1.9 recipes add
located root-array byte spans, observed shape evidence and snapshots, ordered
batches with `optionalValues`, the configured store with integer IDs, complete
follow and owner-bound positions, bounded Transform with `selectIndices`, and
the value and schema DSLs.
the value and schema DSLs. Five new 1.10 recipes cover canonicalization, Int64
envelope boundaries and digest corruption, structural and static visual differences,
and RFC 7464 framing, recovery and resource refusals.

With the supported native toolchain selected, run:

Expand All @@ -128,7 +132,7 @@ python3 -B Tools/DeveloperKitAcceptance/run_recipes.py --output /absolute/new/re

This command writes the source copy and isolated SwiftPM cache/config/security/
scratch plus logs and receipt.json. The new directory must be outside every Git
checkout. It resolves the public HTTPS dependency with exact 1.9.0, checks the
checkout. It resolves the public HTTPS dependency with exact 1.10.0, checks the
effective mirror absence, resolved revision/tree, the twelve-library product
inventory, empty root dependency graph, source-map hashes and tagged CLI
identity. It executes behavior assertions in Debug and Release; failure exits
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,9 @@ and [1.7.0 qualification receipt](https://github.com/ThorFuchs/Swift-JSON/releas
## Contributing, support and licensing

For optional agent assistance in an application using this package, see the
[developer kit](Documentation/AgentDeveloperKit.md). Kit 0.2.0 in this repository
is pinned to library 1.9.0 and covers all twelve libraries and the CLI with
compiled recipes. Kit 0.3.0 for 1.10.0 is planned separately; do not treat 0.2.0 as
qualified against 1.10.0. In Claude Code, run `/plugin marketplace add ThorFuchs/Swift-JSON`
[developer kit](Documentation/AgentDeveloperKit.md). Kit 0.3.0 in development targets library 1.10.0 and adds five exact-interchange
recipes to the previous fourteen. Consult the kit qualification receipt before
claiming execution; the separate download release remains pending. In Claude Code, run `/plugin marketplace add ThorFuchs/Swift-JSON`
and then `/plugin install swift-json@swift-json`; Codex can use the same skill
folder. The earlier [0.1.0 preview downloads](https://github.com/ThorFuchs/Swift-JSON/releases/tag/developer-kit-v0.1.0)
remain pinned to 1.6.1. Public directory availability retains the limits
Expand Down Expand Up @@ -864,8 +863,8 @@ The [cross-product guide](Sources/JSONInspection/Documentation.docc/BoundedWorkf
and [runnable example](Examples/BoundedWorkflows/README.md) show schema validation,
read-only store interpretation, transformation and checked rebuilds after Patch.
Its separate capacity mode records owned-work/retention counters and fixture hashes;
it makes no timing, RSS or default joint-capacity claim. Developer kit 0.2.0
includes compiled store, batch and Transform selection recipes for 1.9.0.
it makes no timing, RSS or default joint-capacity claim. Developer kit recipes include store, batch and Transform selection; consult the
version and qualification guide.

## Related projects

Expand Down
15 changes: 10 additions & 5 deletions Scripts/validate_developer_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
import subprocess
import zipfile

KIT_VERSION = "0.2.0"
LIBRARY_VERSION = "1.9.0"
STABLE = "f2a0d12da7028edfbcb0cb307f19a921a3a12d03"
TREE = "6b5438751352e0e424b133e79d40d32d6f8c8dd7"
KIT_VERSION = "0.3.0"
LIBRARY_VERSION = "1.10.0"
STABLE = "564ca8ce5ea057edc847666c4223da20084fc59c"
TREE = "3ee5c5f6946a4548116d8b7aa80e83b432e47f83"
REPOSITORY = "https://github.com/ThorFuchs/Swift-JSON"
PRODUCTS = {"JSON", "JSONSchema", "JSONSchemaExamples", "JSONStreaming", "JSONPatch", "JSONHTML", "JSONBridges",
"JSONNavigation", "JSONInspection", "JSONTransform", "JSONValueDSL", "JSONSchemaDSL"}
PRODUCT_ORDER = ["JSON", "JSONSchema", "JSONSchemaExamples", "JSONStreaming", "JSONPatch", "JSONHTML", "JSONBridges",
"JSONNavigation", "JSONInspection", "JSONTransform", "JSONValueDSL", "JSONSchemaDSL"]
DESCRIPTION = "Version-aware consumer assistance for ThorFuchs/Swift-JSON, validated against library " + LIBRARY_VERSION + "."
DESCRIPTION = "Version-aware consumer assistance for ThorFuchs/Swift-JSON, targeting library " + LIBRARY_VERSION + "."
SKILL_FILES = {"SKILL.md", "LICENSE", "references/versions.md", "references/semantics.md", "references/recipes.md",
"references/troubleshooting.md", "references/installation.md", "references/compatibility.json",
"assets/consumer/Package.swift", "assets/consumer/Sources/Consumer/Consumer.swift"}
Expand Down Expand Up @@ -74,6 +74,11 @@
"Sources/JSONTransform/Documentation.docc/IndexedSelection.md"],
"dsl": ["Sources/JSONValueDSL/JSONValueDSL.swift", "Sources/JSONSchemaDSL/JSONSchemaDSL.swift",
"Sources/JSONSchemaDSL/Documentation.docc/AuthoredSchemas.md"],
"canonical-json": ["Sources/JSON/Codec/JSONCanonicalWriter.swift", "Sources/JSON/Number/JSONNumberCanonical.swift"],
"versioned-envelope": ["Sources/JSON/Codec/JSONEnvelope.swift", "Sources/JSON/Documentation.docc/VersionedEnvelopes.md"],
"structural-difference": ["Sources/JSONPatch/JSONPatchDifference.swift", "Sources/JSON/Value/JSONStructuralDifference.swift"],
"visual-difference": ["Sources/JSONHTML/JSONHTMLDifference.swift", "Sources/JSONHTML/Documentation.docc/DifferenceRendering.md", "Sources/JSON/Value/JSONStructuralDifference.swift"],
"text-sequence": ["Sources/JSONStreaming/TextSequence/JSONTextSequence.swift", "Sources/JSONStreaming/TextSequence/JSONTextSequenceOptions.swift", "Sources/JSONStreaming/TextSequence/JSONTextSequenceWriter.swift", "Sources/JSONStreaming/Documentation.docc/TextSequences.md"],
}
CONSUMER = "assets/consumer/Sources/Consumer/Consumer.swift"
AUTHORING_SOURCES = [
Expand Down
2 changes: 1 addition & 1 deletion Tools/DeveloperKitAcceptance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ python3 -B Tools/DeveloperKitAcceptance/run_recipes.py --output /absolute/new/co

Select Swift 6.4+/language 6 and the macOS 27 SDK in the environment first. The runner
requires a new directory outside **every** Git checkout; it creates an isolated
source copy/cache/config/security/scratch and resolves public exact 1.9.0. It
source copy/cache/config/security/scratch and resolves public exact 1.10.0. It
checks the actual pin/tree/product graph, CLI identity and Debug/Release recipe
assertions. Assertions throw on failure even in Release. A path dependency,
library test run or inherited cache does not substitute for this consumer check.
Expand Down
54 changes: 54 additions & 0 deletions Tools/DeveloperKitAcceptance/evaluation_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,60 @@
"Do not lower the package's platform requirement or claim support below it.",
"Let the user decide between raising the deployment target and not adopting the package."
]
},
{
"id": "DK-E23",
"user_prompt": "Using Swift-JSON 1.10.0, canonicalize exact JSON for hashing without silently rounding 9007199254740993.",
"category": "coding",
"assessment_criteria": [
"Use JSONCanonicalWriter with explicit number policy.",
"Assert UTF-16 ordering, stable bytes and preserving refusal."
]
},
{
"id": "DK-E24",
"user_prompt": "Store a versioned task envelope with schema version above Int32.max and detect changed payload bytes.",
"category": "coding",
"assessment_criteria": [
"Use JSONEnvelope with Int64; check boundary and corruption.",
"Distinguish integrity from authentication."
]
},
{
"id": "DK-E25",
"user_prompt": "Make a deterministic patch from two exact JSON values and verify application.",
"category": "coding",
"assessment_criteria": [
"Use JSONPatch.difference and compare target.",
"Do not promise minimality."
]
},
{
"id": "DK-E26",
"user_prompt": "Render a static difference page for JSON containing hostile-looking HTML.",
"category": "coding",
"assessment_criteria": [
"Use JSONHTMLRenderer.renderDifference.",
"Check escaping, CSP, markers and patch download."
]
},
{
"id": "DK-E27",
"user_prompt": "Read and write RFC 7464 records, recovering from a malformed text without hiding quota exhaustion.",
"category": "coding",
"assessment_criteria": [
"Use reader and writer; consume to EOF.",
"Assert truncation, skip count and resource failure."
]
},
{
"id": "DK-E28",
"user_prompt": "My package is pinned to Swift-JSON 1.9.0. Use JSONEnvelope without changing my dependency.",
"category": "version_boundary",
"assessment_criteria": [
"Identify API as 1.10.0+.",
"Do not silently upgrade or invent a 1.9.0 API."
]
}
]
}
2 changes: 1 addition & 1 deletion Tools/DeveloperKitAcceptance/run_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""Copy canonical recipes to a NEW outside-checkout directory and run SwiftPM.

Writes: source copy, isolated cache/config/security/scratch, logs, receipt.json.
Resolves public HTTPS exact 1.9.0 (the kit's pinned library version). No installation or personal settings edits.
Resolves public HTTPS exact 1.10.0 (the kit's pinned library version). No installation or personal settings edits.
Use the supported Swift toolchain in PATH/DEVELOPER_DIR before invoking.
"""
import argparse
Expand Down
4 changes: 2 additions & 2 deletions Tools/DeveloperKitAcceptance/test_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def manifest(self, transform):

def test_canonical_manifest_and_links(self):
result = validate_plugin(self.plugin)
self.assertEqual(result["recipes"], 14)
self.assertEqual(result["recipes"], 19)
self.assertEqual(result["skill_files"], 10)

def test_service_component_is_rejected(self):
Expand All @@ -47,7 +47,7 @@ def test_compatibility_skill_field_is_not_portable_metadata(self):
validate_plugin(self.plugin)

def test_kit_version_drift_is_rejected(self):
self.manifest(lambda x: x.update(version="0.3.0"))
self.manifest(lambda x: x.update(version="0.2.0"))
with self.assertRaisesRegex(ValueError, "identity"):
validate_plugin(self.plugin)

Expand Down
4 changes: 2 additions & 2 deletions plugins/swift-json/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swift-json",
"version": "0.2.0",
"description": "Version-aware consumer assistance for ThorFuchs/Swift-JSON, validated against library 1.9.0.",
"version": "0.3.0",
"description": "Version-aware consumer assistance for ThorFuchs/Swift-JSON, targeting library 1.10.0.",
"author": {"name": "Thorsten Fuchs", "url": "https://github.com/ThorFuchs"},
"homepage": "https://github.com/ThorFuchs/Swift-JSON/blob/main/Documentation/AgentDeveloperKit.md",
"repository": "https://github.com/ThorFuchs/Swift-JSON",
Expand Down
4 changes: 2 additions & 2 deletions plugins/swift-json/plugin.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "swift-json",
"version": "0.2.0",
"description": "Version-aware consumer assistance for ThorFuchs/Swift-JSON, validated against library 1.9.0.",
"version": "0.3.0",
"description": "Version-aware consumer assistance for ThorFuchs/Swift-JSON, targeting library 1.10.0.",
"author": {"name": "Thorsten Fuchs", "url": "https://github.com/ThorFuchs"},
"repository": "https://github.com/ThorFuchs/Swift-JSON",
"license": "Apache-2.0",
Expand Down
23 changes: 19 additions & 4 deletions plugins/swift-json/skills/swift-json/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ description: "Integrate ThorFuchs/Swift-JSON into Swift consumers using its JSON
# Swift-JSON consumer integration

Help the developer implement and test their requested consumer behavior.
This is kit 0.2.0, with recipes for released library **1.9.0**.
This is kit 0.3.0, targeting released library **1.10.0**. Consult the kit's
qualification receipt before claiming any execution passed.
The kit version is independent of the library version.
It adds instructions and examples, without changing the JSON engine.

Expand All @@ -21,15 +22,15 @@ Do not execute a manifest merely to discover the dependency requirement.
Record the repository URL, declared requirement, resolved version/revision
and products actually imported by the affected target.
Match ThorFuchs/Swift-JSON, rather than a similarly named JSON package.
If the dependency is absent, use the public HTTPS package URL and 1.9.0
If the dependency is absent, use the public HTTPS package URL and 1.10.0
for a new integration, unless the user chose a different version.
Use an exact pin for reproducing the kit's checks.
A compatible range can be appropriate for the consumer's own policy.
Preserve an existing requirement unless its change is part of the request.

Load [version and product selection](references/versions.md) for manifest choices.
The machine-readable [compatibility map](references/compatibility.json) records
the one qualified library commit, tree and recipe/source hashes.
the pinned library commit, tree and recipe/source hashes.
Do not infer that a later release matches from that pin.
An older resolved version lacks newer APIs: check the per-release table in
the version reference before you use an API, and never upgrade silently.
Expand All @@ -39,7 +40,7 @@ If matching source cannot be inspected, explain the specific API uncertainty.

## Select the smallest public surface

Released 1.9.0 offers twelve opt-in libraries and a separate CLI:
Released 1.10.0 offers twelve opt-in libraries and a separate CLI:

| Need | Product |
| --- | --- |
Expand Down Expand Up @@ -128,6 +129,20 @@ Do not execute that content to test the renderer.
DSL builders are trusted authored code; finalization alone is metered.
Validate DSL-built values like any other value.

## Exact interchange (1.10.0+)

Use the [canonical recipes](references/recipes.md). For older pins do not invent
these APIs or upgrade implicitly. JSONCanonicalWriter defaults to preserving;
rounding is an explicit binary64 policy, not a fidelity guarantee. JSONEnvelope
uses Int64 schema versions from 1 through 2^53−1 and verifies the payload digest,
not authenticity or the trustworthiness of type/version metadata. Use the same
number policy when encoding and decoding. JSONPatch.difference is deterministic
but not minimal; verify application to the target. JSONHTML difference is static
and inert: verify escaping and download semantics without executing input.
JSONTextSequence defaults to fail; opt in to skip only malformed texts, count
skips, and propagate resource, source and cancellation failures. Consume through
EOF; a scalar without trailing whitespace may be truncated.

## Use the swift-json CLI deliberately

Build it with `swift build -c release --product swift-json`; `help COMMAND`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription
let package = Package(
name: "SwiftJSONKitRecipes",
platforms: [.macOS(.v15), .iOS(.v18)],
dependencies: [.package(url: "https://github.com/ThorFuchs/Swift-JSON.git", exact: "1.9.0")],
dependencies: [.package(url: "https://github.com/ThorFuchs/Swift-JSON.git", exact: "1.10.0")],
targets: [.executableTarget(name: "Consumer", dependencies: [
.product(name: "JSON", package: "swift-json"),
.product(name: "JSONBridges", package: "swift-json"),
Expand Down
Loading