Require inline frontmatter values and correct the package contract
Check instruction packages / check (push) Successful in 4s
Check instruction packages / check (pull_request) Successful in 4s

Reject a top-level frontmatter key without "key: value" form, so
"disable-model-invocation:yes" can no longer bypass the boolean check.
Assert each rejection's reason in the new-pair tests. In the contract,
mark the Tester and Coordinator releases as proposed, list RelayView's
role-level changes, and state the path-depth bound and the identity and
archive sort orders exactly.

Refs #20

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-11-25 18:53:47 -05:00
1 parent 8c7d967efd
commit 1e9e46bc09
4 files changed
+69 -54

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ Public source for RelayView-maintained instruction-only role skills and an illus
| `packages/c4-diff` | Optional guidance | Reviewer / review | 0.13.0 | | `packages/c4-diff` | Optional guidance | Reviewer / review | 0.13.0 |
| `examples/starter-planner` | Illustrative starter; not a production default | Planner / planning | 0.13.0 | | `examples/starter-planner` | Illustrative starter; not a production default | Planner / planning | 0.13.0 |
Only named releases of maintained packages receive RelayView compatibility testing and maintenance. Optional guidance requires explicit role assignment; the Planner and Implementer defaults remain available alongside the pinned Issue Designer default. User forks are maintained by their publishers. Instruction packages use schema version 1, schema version 2 for a Planner package declaring owner-validated `issueClaim` metadata, or schema version 3 for a role communication package. Schema 2 accepts a nullable target status label; the owner enforces the claim transition after proved implementation handoff. Each package declares one role/step pair: `planner`/`planning`, `implementer`/`implementation`, `reviewer`/`review`, `designer`/`design`, `tester`/`testing`, or `coordinator`/`coordination`. RelayView admits Tester and Coordinator packages only after it adopts those pairs. A package contains only `SKILL.md`, declared `.md`/`.txt` resources, and `relayview-skill.json` within each package. The [instruction package contract](docs/authoritative/instruction-package-contract.md) gives every rule the checks enforce, the identity and archive algorithms, and the RelayView changes each new pair requires. Scripts, executable files, undeclared files, and requested permissions fail checks and owner admission. There is no fixed release calendar: maintained packages are versioned when their content or compatibility changes. A breaking owner contract requires a new compatible maintained release before the product depends on it. Only named releases of maintained packages receive RelayView compatibility testing and maintenance. Optional guidance requires explicit role assignment; the Planner and Implementer defaults remain available alongside the pinned Issue Designer default. User forks are maintained by their publishers. Instruction packages use schema version 1, schema version 2 for a Planner package declaring owner-validated `issueClaim` metadata, or schema version 3 for a role communication package. Schema 2 accepts a nullable target status label; the owner enforces the claim transition after proved implementation handoff. Each package declares one role/step pair: `planner`/`planning`, `implementer`/`implementation`, `reviewer`/`review`, `designer`/`design`, `tester`/`testing`, or `coordinator`/`coordination`. RelayView admits Tester and Coordinator packages only after it adopts those pairs. A package contains only `SKILL.md`, declared `.md`/`.txt` resources, and `relayview-skill.json`. The [instruction package contract](docs/authoritative/instruction-package-contract.md) gives every rule the checks enforce, the identity and archive algorithms, and the RelayView changes each new pair requires. Scripts, executable files, undeclared files, and requested permissions fail checks and owner admission. There is no fixed release calendar: maintained packages are versioned when their content or compatibility changes. A breaking owner contract requires a new compatible maintained release before the product depends on it.
## A named set in RelayView ## A named set in RelayView
@@ -49,7 +49,8 @@ lower-case 64-hex SHA-256 digests. Any additional field — such as `tools`,
- Every file in the directory except the sidecar is declared, and every - Every file in the directory except the sidecar is declared, and every
declared file is present with exactly its declared SHA-256. declared file is present with exactly its declared SHA-256.
- No symbolic links, executable bits, or non-regular files; at most 64 entries - No symbolic links, executable bits, or non-regular files; at most 64 entries
and 8 directory levels. (files and directories), and no relative path longer than 8 segments
including the file name.
- Each file is non-empty UTF-8 without a BOM or NUL bytes; the sidecar plus all - Each file is non-empty UTF-8 without a BOM or NUL bytes; the sidecar plus all
declared files total at most 128 KiB. declared files total at most 128 KiB.
@@ -66,19 +67,22 @@ metadata:
relayview-version: <major.minor.patch> relayview-version: <major.minor.patch>
``` ```
`metadata:` stands alone on its line, followed by exactly those two indented Every key other than `metadata` is written `key: value` with a non-empty
keys. Any other key, such as `tools` or `allowed-tools`, fails the check. value. `metadata:` stands alone on its line, followed by exactly those two
indented keys. Any other key, such as `tools` or `allowed-tools`, fails the
check.
## Identity and archive ## Identity and archive
The package identity is the SHA-256 of `relayview-instruction-package-v1\0` The package identity is the SHA-256 of `relayview-instruction-package-v1\0`
followed by length-framed parts (a 4-byte big-endian length, then the bytes): followed by length-framed parts (a 4-byte big-endian length, then the bytes):
the raw sidecar bytes, then for each declared path in sorted order the UTF-8 the raw sidecar bytes, then for each declared path, sorted as whole strings,
path and the file bytes. the UTF-8 path and the file bytes.
The release archive is an uncompressed ZIP containing the repository The release archive is an uncompressed ZIP containing the repository
`LICENSE` and `NOTICE.md`, then every package file under `<package-name>/` in `LICENSE` and `NOTICE.md`, then every package file under `<package-name>/`,
sorted path order. Every entry carries the timestamp 1980-01-01 00:00:00 and sorted segment by segment (so `a/b.md` precedes `a-b/c.md`, unlike the
whole-string order the identity uses). Every entry carries the timestamp 1980-01-01 00:00:00 and
mode `0644`, so the archive digest depends only on those bytes. mode `0644`, so the archive digest depends only on those bytes.
RelayView's `scripts/verify-first-party-skills-source.py` recomputes both RelayView's `scripts/verify-first-party-skills-source.py` recomputes both
@@ -96,26 +100,32 @@ retained sessions.
## RelayView adoption of the Tester and Coordinator pairs ## RelayView adoption of the Tester and Coordinator pairs
RelayView's owner admits `planner`, `implementer`, `reviewer`, and `designer` RelayView's owner admits only `planner`, `implementer`, `reviewer`, and
packages. Before RelayView pins a release containing a `tester` or `designer` packages. No released package declares `tester` or `coordinator`
`coordinator` package, its sidecar admission must accept that pair: yet. The planned releases below are proposed, not published:
| Release | New pair | Packages | | Proposed release | New pair | Planned packages |
| --- | --- | --- | | --- | --- | --- |
| `v0.15.0` | `tester`/`testing` | `tester-inspection` (schema 1), `tester-communication` (schema 3) | | `v0.15.0` | `tester`/`testing` | Tester inspection (schema 1) and Tester communication (schema 3) |
| `v0.17.0` | `coordinator`/`coordination` | coordinator automatic and manual methods (schema 1), `coordinator-communication` (schema 3) | | `v0.17.0` | `coordinator`/`coordination` | Coordinator automatic and manual methods (schema 1) and Coordinator communication (schema 3) |
The RelayView change for each pair: Before RelayView pins a release containing either pair, it must:
1. Accept the pair in the owner's sidecar admission (the role-to-step map in 1. **Know the role.** Add it to the owner's role types (`SkillWorkflowRole` /
`src/owner/workflowPresets.ts`), with schema 1 and schema 3; keep schema 2 `TrustedSkillRole` in `src/owner/workflowPresets.ts`) and give it an
Planner-only and schema 3 closed to `designer`. explicit step in `roleStep()`, which otherwise answers `design` for any
2. Add the step to the Skills settings contract and named-set validation so role it does not name.
the role's sets can be selected (`src/api/contract-skill-settings.ts`, the 2. **Admit the sidecar.** In `loadInstructionPackage`, accept the role in its
generated owner schemas, and the set step check in explicit role check and map it to its step in `expectedStep`. Accept schema 1
`src/owner/workflowPresets.ts`). and schema 3, keep schema 2 Planner-only, and keep schema 3 closed to
3. Pin the release in `first-party-skills/<tag>/` with its `bundle-lock.json` `designer`.
and add the bundle to `scripts/verify-first-party-skills-source.py`. 3. **Expose it in Skills settings.** Add the role and step to the package,
assignment, and set-selection schemas in `src/api/contract-skill-settings.ts`
and the generated owner schemas, and to named-set role and step validation
in `src/owner/workflowPresets.ts`, so the role's sets can be selected.
4. **Pin and verify the release.** Add `first-party-skills/<tag>/` with its
`bundle-lock.json`, and add the bundle to
`scripts/verify-first-party-skills-source.py`.
The identity framing, archive format, file rules, and frontmatter rules do not The identity framing, archive format, file rules, and frontmatter rules do not
change, so existing bundle locks stay valid. change for these pairs, so existing bundle locks stay valid.
+32 -28
View File
@@ -159,28 +159,28 @@ class RoleStepRejectionTests(unittest.TestCase):
self.assertRejected(copy, "invalid issue claim policy") self.assertRejected(copy, "invalid issue claim policy")
def test_rejects_schema_and_treatment_mismatches(self): def test_rejects_schema_and_treatment_mismatches(self):
fields, treatment = "unsupported manifest fields", "invalid communication treatment"
cases = { cases = {
"tester-fixture": [ "tester-fixture": [
{"treatment": "communication_context"}, ({"treatment": "communication_context"}, fields),
{"schemaVersion": 3}, ({"schemaVersion": 3}, fields),
{"schemaVersion": True}, ({"schemaVersion": True}, fields),
{"schemaVersion": "1"}, ({"schemaVersion": "1"}, fields),
{"schemaVersion": 1.5}, ({"schemaVersion": 1.5}, fields),
{"schemaVersion": 4}, ({"schemaVersion": 4}, fields),
], ],
"coordinator-communication-fixture": [ "coordinator-communication-fixture": [
{"treatment": "context"}, ({"treatment": "context"}, treatment),
{"treatment": None}, ({"treatment": None}, treatment),
{"schemaVersion": 1}, ({"schemaVersion": 1}, fields),
{"schemaVersion": True}, ({"schemaVersion": True}, fields),
], ],
} }
for name, changes in cases.items(): for name, changes in cases.items():
for change in changes: for change, message in changes:
with self.subTest(name=name, change=change), FixtureCopy(name) as copy: with self.subTest(name=name, change=change), FixtureCopy(name) as copy:
copy.write_manifest(dict(copy.manifest, **change)) copy.write_manifest(dict(copy.manifest, **change))
with self.assertRaises(PackageError): self.assertRejected(copy, message)
check_package(copy.path)
with FixtureCopy("tester-communication-fixture") as copy: with FixtureCopy("tester-communication-fixture") as copy:
manifest = copy.manifest manifest = copy.manifest
del manifest["treatment"] del manifest["treatment"]
@@ -214,24 +214,28 @@ class RoleStepRejectionTests(unittest.TestCase):
self.assertRejected(copy, "changed file") self.assertRejected(copy, "changed file")
def test_rejects_forbidden_frontmatter(self): def test_rejects_forbidden_frontmatter(self):
metadata, boolean = "unsupported skill metadata", "must be a boolean"
cases = (
("metadata:\n", "tools: [shell]\nmetadata:\n", metadata),
("metadata:\n", "allowed-tools: Bash\nmetadata:\n", metadata),
("metadata:\n", "model: any\nmetadata:\n", metadata),
("metadata:\n", "role: coordinator\nmetadata:\n", metadata),
("metadata:\n", "metadata: {}\n", metadata),
("metadata:\n", "metadata:\n relayview-tools: shell\n", metadata),
("metadata:\n", "metadata:\n relayview-role: tester\n", metadata),
("metadata:\n", "name: other-name\nmetadata:\n", metadata),
("metadata:\n", "disable-model-invocation: yes\nmetadata:\n", boolean),
("metadata:\n", "disable-model-invocation:yes\nmetadata:\n", metadata),
("metadata:\n", "disable-model-invocation:\nmetadata:\n", metadata),
)
for name in NEW_PAIR_FIXTURES: for name in NEW_PAIR_FIXTURES:
for old, new in ( for old, new, message in cases:
("metadata:\n", "tools: [shell]\nmetadata:\n"),
("metadata:\n", "allowed-tools: Bash\nmetadata:\n"),
("metadata:\n", "model: any\nmetadata:\n"),
("metadata:\n", "role: coordinator\nmetadata:\n"),
("metadata:\n", "metadata: {}\n"),
("metadata:\n", "metadata:\n relayview-tools: shell\n"),
("metadata:\n", "metadata:\n relayview-role: tester\n"),
("metadata:\n", "name: other-name\nmetadata:\n"),
("metadata:\n", "disable-model-invocation: yes\nmetadata:\n"),
):
if "disable-model-invocation" in new and name == "coordinator-manual-fixture":
old, new = "disable-model-invocation: true\n", "disable-model-invocation: yes\n"
with self.subTest(name=name, new=new), FixtureCopy(name) as copy: with self.subTest(name=name, new=new), FixtureCopy(name) as copy:
if name == "coordinator-manual-fixture":
# Drop the fixture's own key so an inserted one is not merely a duplicate.
copy.replace_in_skill("disable-model-invocation: true\n", "")
copy.replace_in_skill(old, new) copy.replace_in_skill(old, new)
with self.assertRaises(PackageError): self.assertRejected(copy, message)
check_package(copy.path)
def test_rejects_unsafe_or_undeclared_content(self): def test_rejects_unsafe_or_undeclared_content(self):
cases = ( cases = (
+2 -1
View File
@@ -143,7 +143,8 @@ def check_package(path):
key = line.split(":", 1)[0] key = line.split(":", 1)[0]
top_keys.append(key) top_keys.append(key)
in_metadata = key == "metadata" in_metadata = key == "metadata"
if in_metadata and line != "metadata:": # metadata stands alone; every other key carries an inline value.
if (line != "metadata:") if in_metadata else not re.fullmatch(r"[a-z-]+: .+", line):
_fail(f"{path}: unsupported skill metadata") _fail(f"{path}: unsupported skill metadata")
else: else:
_fail(f"{path}: unsupported skill metadata") _fail(f"{path}: unsupported skill metadata")