Skip to content
Open
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
114 changes: 57 additions & 57 deletions container/deploy.k9.ncl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
K9!
# SPDX-License-Identifier: MPL-2.0
# deploy.k9.ncl — {{PROJECT_NAME}} deployment component (Hunt level)
#
Expand All @@ -8,65 +9,10 @@
# It requires explicit authorisation via the Leash system.
#
# Usage:
# nickel typecheck container/deploy.k9.ncl
# Render the deployment placeholders before validation or deployment.
# k9-svc validate container/deploy.k9.ncl
# k9-svc deploy container/deploy.k9.ncl --env production

# The component's pedigree (self-description across five layers)
let component_pedigree = {
# ─────────────────────────────────────────────────────────────
# L1: The Snout — Identity
# ─────────────────────────────────────────────────────────────
metadata = {
name = "{{SERVICE_NAME}}-deploy",
version = "{{VERSION}}",
breed = "application/vnd.k9+nickel",
magic_number = "K9!",
description = "{{PROJECT_NAME}} deployment component (Hunt level)",
},

# ─────────────────────────────────────────────────────────────
# L2: The Scent — Target Environment
# ─────────────────────────────────────────────────────────────
target = {
os = 'Linux,
is_edge = false,
requires_podman = true,
min_memory_mb = 256,
},

# ─────────────────────────────────────────────────────────────
# L3: The Leash — Security
# ─────────────────────────────────────────────────────────────
security = {
trust_level = 'Hunt,
allow_network = true,
allow_filesystem_write = true,
allow_subprocess = true,
# In production, replace with a real Ed25519 signature.
signature = "PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT",
},

# ─────────────────────────────────────────────────────────────
# L4: The Gut — Self-Validation
# ─────────────────────────────────────────────────────────────
validation = {
checksum = "sha256:placeholder",
pedigree_version = "1.0.0",
hunt_authorized = false, # Must be set true after handshake
},

# ─────────────────────────────────────────────────────────────
# L5: The Muscle — Deployment Recipes
# ─────────────────────────────────────────────────────────────
recipes = {
install = "just container-build",
validate = "just container-verify",
deploy = "just container-up",
migrate = "just container-build && just container-up",
},
} in

# Deployment configuration
let deployment = {
# Target environments (dev / staging / production)
Expand Down Expand Up @@ -143,7 +89,61 @@ echo "K9: Rollback complete."

# Export the component
{
pedigree = component_pedigree,
# The component's pedigree (self-description across five layers)
pedigree = {
# ─────────────────────────────────────────────────────────────
# L1: The Snout — Identity
# ─────────────────────────────────────────────────────────────
metadata = {
name = "{{SERVICE_NAME}}-deploy",
version = "{{VERSION}}",
breed = "application/vnd.k9+nickel",
magic_number = "K9!",
description = "{{PROJECT_NAME}} deployment component (Hunt level)",
},

# ─────────────────────────────────────────────────────────────
# L2: The Scent — Target Environment
# ─────────────────────────────────────────────────────────────
target = {
os = 'Linux,
is_edge = false,
requires_podman = true,
min_memory_mb = 256,
},

# ─────────────────────────────────────────────────────────────
# L3: The Leash — Security
# ─────────────────────────────────────────────────────────────
security = {
leash = 'Hunt,
trust_level = 'Hunt,
allow_network = true,
allow_filesystem_write = true,
allow_subprocess = true,
# In production, replace with a real Ed25519 signature.
signature = "PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT",
},

# ─────────────────────────────────────────────────────────────
# L4: The Gut — Self-Validation
# ─────────────────────────────────────────────────────────────
validation = {
checksum = "sha256:placeholder",
pedigree_version = "1.0.0",
hunt_authorized = false, # Must be set true after handshake
},

# ─────────────────────────────────────────────────────────────
# L5: The Muscle — Deployment Recipes
# ─────────────────────────────────────────────────────────────
recipes = {
install = "just container-build",
validate = "just container-verify",
deploy = "just container-up",
migrate = "just container-build && just container-up",
},
},
deployment = deployment,
scripts = scripts,

Expand Down
1 change: 1 addition & 0 deletions docs/governance/MAINTENANCE-CHECKLIST.a2ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Cross-repo maintenance baseline (machine-readable canonical)

[metadata]
name = "MAINTENANCE-CHECKLIST"
version = "1.1.0"
last-updated = "2026-02-24"
scope = "cross-repo"
Expand Down
Loading