VS Code extension providing syntax highlighting, language configuration, and snippets for K9 contractile validator files.
K9 is the deployment validation language used by the contractile system. It supports two formats:
-
.k9(Kennel format) — YAML-like declarative syntax for validators, recipes, and pedigree metadata -
.k9.ncl(Yard/Hunt Nickel format) — Nickel-based programmable validators with contracts and type safety
-
Two TextMate grammars: one for
.k9(Kennel) and one for.k9.ncl(Nickel) -
Language configuration for both formats with bracket matching and comment toggling
-
13 snippets across both languages for common K9 patterns
-
Semantic coloring for trust levels:
kennel(highest),yard(medium),hunt(lowest) -
K9 magic number (
K9!) highlighting
Install from the VS Code marketplace:
ext install hyperpolymath.vscode-k9Or install from VSIX:
code --install-extension vscode-k9-0.1.0.vsixHighlights:
| Element | Scope |
|---|---|
Magic number ( |
|
Trust levels ( |
|
Pedigree fields (name, version, etc.) |
|
Security levels |
|
Key-value pairs |
|
Comments, strings, numbers, booleans |
Standard scopes |
Highlights:
| Element | Scope |
|---|---|
|
|
Contracts and types |
|
|
|
Record literals |
|
Recipe/validator blocks |
|
Security level annotations |
|
Nickel keywords |
|
Built-in types (Str, Num, Bool, etc.) |
|
String interpolation ( |
|
| Prefix | Name | Description |
|---|---|---|
|
K9 Magic Header |
File header with magic number and pedigree |
|
Validator |
Validator block with checks |
|
Recipe |
Recipe with inputs/outputs/constraints |
|
Dependency |
Dependency entry with trust level |
|
Kennel Trust |
Set trust to kennel (highest) |
|
Yard Trust |
Set trust to yard (medium) |
|
Hunt Trust |
Set trust to hunt (lowest) |
SPDX-License-Identifier: MPL-2.0
(PMPL-1.0-or-later preferred; MPL-2.0 required for VS Code marketplace)
See LICENSE for the full MPL-2.0 text. See LICENSE-PMPL for the PMPL-1.0-or-later text.