Skip to content

Commit db022d8

Browse files
hyperpolymathclaude
andcommitted
fix: repair contractiles templates and add root Dustfile
- Fix SPDX typo PLMP-1.0-or-later → PMPL-1.0-or-later in contractiles/dust/Dustfile, contractiles/lust/Intentfile, contractiles/must/Mustfile - Replace domain-specific template residue in Dustfile (kubectl/log-replay/ dustify) with generic rollback/deprecation starter content - Replace deployment-domain content in lust/Intentfile (trust-engine/ control-plane/introspection) with generic project-agnostic future intents - Update must/Mustfile template with proper REPLACE placeholders, realistic checks (tests-pass, format-ok, spdx-headers, no-template-residue), and note that failing tests block grade D - Add root-level Dustfile for the standards repo itself (was missing; root Mustfile existed but Dustfile did not) - Regenerate contractile.just from current A2ML sources via contractile gen-just --dir contractiles (now reflects Intentfile.a2ml, Trustfile.a2ml, and K9 components; plain Dustfile/Mustfile templates don't generate recipes as they are not A2ML format) - Add k9-coordination-protocol/ — reference implementation for the Testing and Benchmarking Taxonomy (79 tests, CRG grade C) - Extend TESTING-TAXONOMY.adoc with Appendix C documenting the reference implementation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2b933ae commit db022d8

20 files changed

Lines changed: 3955 additions & 103 deletions

Dustfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile — Standards repo recovery and rollback
3+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
4+
5+
version: 1
6+
7+
recovery:
8+
source:
9+
- name: source-rollback
10+
description: "Revert all source changes to the last commit."
11+
rollback: "git checkout HEAD -- ."
12+
notes: "Use when a bad spec or template edit lands before review."
13+
14+
generated:
15+
- name: regen-contractile-just
16+
description: "Re-derive contractile.just from the contractiles/ template set."
17+
handler: "contractile gen-just --dir contractiles"
18+
notes: "Regenerate after any change to Dustfile, Mustfile, Trustfile.a2ml, or Intentfile.a2ml."
19+
20+
templates:
21+
- name: template-rollback
22+
description: "Roll back a specific contractile template to its last known-good revision."
23+
rollback: "git checkout HEAD~1 -- contractiles/"
24+
notes: "Use when a template update introduces an SPDX typo or template residue regression."
25+
26+
deprecation:
27+
- name: lust-intentfile-legacy
28+
what: "contractiles/lust/Intentfile (plain-text compatibility form)"
29+
since: "v1.0.0"
30+
remove-by: "v2.0.0"
31+
migration: "Use contractiles/intend/Intentfile.a2ml (canonical A2ML form) for all new repos."
32+
notes: "lust/ is kept only while repos that copied the old template still exist in the estate."

contractile.just

Lines changed: 32 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,27 @@
44
#
55
# SPDX-License-Identifier: PMPL-1.0-or-later
66

7-
# === DUST (Recovery & Rollback) ===
8-
# Source: Dustfile.a2ml
9-
10-
# List available dust recovery actions
11-
dust-status:
12-
@echo ' dust-source-rollback: Revert all source changes to last commit [rollback]'
13-
14-
# Revert all source changes to last commit
15-
dust-source-rollback:
16-
@echo 'Executing rollback for source-rollback'
17-
git checkout HEAD -- .
18-
19-
207
# === INTEND (Declared Future Intent) ===
218
# Source: Intentfile.a2ml
229

2310
# Display declared future intents
2411
intend-list:
2512
@echo '=== Declared Intent ==='
2613
@echo ''
27-
@echo 'Features:'
14+
@echo 'Purpose:'
2815
@echo ''
29-
@echo 'Quality:'
30-
31-
32-
# === MUST (Physical State Checks) ===
33-
# Source: Mustfile.a2ml
34-
35-
# Run all must checks
36-
must-check: must-license-present must-readme-present must-spdx-headers must-no-banned-files
37-
@echo 'All must checks passed'
38-
39-
# LICENSE file must exist
40-
must-license-present:
41-
test -f LICENSE
42-
43-
# README must exist
44-
must-readme-present:
45-
test -f README.adoc || test -f README.md
46-
47-
# Source files should have SPDX license headers
48-
must-spdx-headers:
49-
find . -name '*.rs' -o -name '*.res' -o -name '*.gleam' | head -20 | xargs -r grep -L 'SPDX-License-Identifier' | wc -l | grep -q '^0$'
50-
51-
# No Dockerfiles or Makefiles
52-
must-no-banned-files:
53-
test ! -f Dockerfile && test ! -f Makefile
16+
@echo 'Anti-Purpose:'
17+
@echo ' - A fork or wrapper around another tool'
18+
@echo ' - A monorepo (unless explicitly structured as one)'
19+
@echo ''
20+
@echo 'If In Doubt:'
5421

5522

5623
# === TRUST (Integrity & Provenance Verification) ===
5724
# Source: Trustfile.a2ml
5825

5926
# Run all trust verifications
60-
trust-verify: trust-license-content trust-no-secrets-committed trust-container-images-pinned
27+
trust-verify: trust-license-content trust-no-secrets-committed
6128
@echo 'All trust verifications passed'
6229

6330
# LICENSE contains expected SPDX identifier
@@ -68,8 +35,30 @@ trust-license-content:
6835
trust-no-secrets-committed:
6936
test ! -f .env && test ! -f credentials.json && test ! -f .env.local
7037

71-
# Containerfile base images use pinned digests
72-
trust-container-images-pinned:
73-
test ! -f Containerfile || grep -q '@sha256:' Containerfile
7438

39+
# === K9 Components ===
40+
41+
# K9 component: contractiles/k9/examples/ci-config.k9.ncl
42+
k9-ci-config:
43+
contractile k9 run contractiles/k9/examples/ci-config.k9.ncl
44+
45+
# K9 component: contractiles/k9/examples/project-metadata.k9.ncl
46+
k9-project-metadata:
47+
contractile k9 run contractiles/k9/examples/project-metadata.k9.ncl
48+
49+
# K9 component: contractiles/k9/examples/setup-repo.k9.ncl
50+
k9-setup-repo:
51+
contractile k9 run contractiles/k9/examples/setup-repo.k9.ncl
52+
53+
# K9 component: contractiles/k9/template-hunt.k9.ncl
54+
k9-template-hunt:
55+
contractile k9 run contractiles/k9/template-hunt.k9.ncl
56+
57+
# K9 component: contractiles/k9/template-kennel.k9.ncl
58+
k9-template-kennel:
59+
contractile k9 run contractiles/k9/template-kennel.k9.ncl
60+
61+
# K9 component: contractiles/k9/template-yard.k9.ncl
62+
k9-template-yard:
63+
contractile k9 run contractiles/k9/template-yard.k9.ncl
7564

contractiles/dust/Dustfile

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
1-
# SPDX-License-Identifier: PLMP-1.0-or-later
2-
# Dustfile template - recovery and rollback semantics
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile — recovery, rollback, and deprecation semantics (template)
3+
# Fill in: replace placeholder paths and commands with real repo paths.
4+
# See: standards/contractiles/CANONICAL-TEMPLATES.adoc
35

46
version: 1
57

68
recovery:
7-
logs:
8-
- name: decision-log
9-
path: logs/decisions.json
10-
reversible: true
11-
handler: "log-replay --reverse logs/decisions.json"
9+
source:
10+
- name: source-rollback
11+
description: "Revert all source changes to the last commit."
12+
rollback: "git checkout HEAD -- ."
13+
notes: "Use when a bad patch lands and local tests break before merge."
1214

13-
policy:
14-
- name: policy-rollback
15-
path: policy/policy.ncl
16-
rollback: "git checkout HEAD~1 -- policy/policy.ncl"
17-
notes: "Rollback policy to the previous known-good revision."
15+
generated:
16+
- name: regen-outputs
17+
description: "Re-derive all generated artefacts (headers, bindings, machine-readable outputs) from source of truth."
18+
handler: "just gen"
19+
notes: "Covers auto-generated C headers, A2ML outputs, and any derived files."
1820

19-
gateway:
20-
- name: bad-deployment
21-
event: "deploy.failure"
22-
undo: "kubectl rollout undo deployment/gateway"
23-
notes: "Undo a failed deployment while preserving audit logs."
21+
config:
22+
- name: config-rollback
23+
path: "REPLACE-WITH-REAL-CONFIG-PATH"
24+
rollback: "git checkout HEAD~1 -- REPLACE-WITH-REAL-CONFIG-PATH"
25+
notes: "Roll back a specific config or policy file without disturbing the rest of the tree."
2426

25-
dust-events:
26-
- name: decision-log-to-dust
27-
source: logs/decisions.json
28-
transform: "dustify --input logs/decisions.json --output logs/dust-events.json"
29-
notes: "Map gateway decision logs into reversible dust events."
27+
deprecation:
28+
- name: example-deprecated-surface
29+
what: "REPLACE with the real API, module, or command being retired."
30+
since: "vX.Y.Z"
31+
remove-by: "vX+1.0.0"
32+
migration: "See ROADMAP.adoc or CHANGELOG for the replacement."
33+
notes: "Remove this entry once the deprecated surface is gone and the remove-by version ships."

contractiles/lust/Intentfile

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
# SPDX-License-Identifier: PLMP-1.0-or-later
2-
# Intentfile template - declared future intent
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Intentfile (plain-text compatibility form) — declared future intent (template)
3+
# Fill in: replace each section with real near-term plans for THIS repo.
4+
# Prefer the A2ML form (contractiles/intend/Intentfile.a2ml) for new repos.
5+
# See: standards/contractiles/CANONICAL-TEMPLATES.adoc
36

47
version: 1
58

69
future:
7-
trust-engine:
8-
- "Integrate hardware-backed key management."
9-
- "Support node attestation for deployments."
10+
features:
11+
- "REPLACE with specific planned features — be concrete, not aspirational."
12+
- "Each entry should map to a real roadmap item or tracked issue."
1013

11-
control-plane:
12-
- "Move to GitOps-backed configuration promotion."
13-
- "Add canary and staged rollout support."
14+
quality:
15+
- "Increase test coverage to cover all public-facing surfaces."
16+
- "Ensure all justfile recipes pass in CI without manual intervention."
17+
- "All declared tests and benches must pass before grade D can be claimed."
1418

15-
pipeline:
16-
- "Adopt Nickel (or your DSL) as the primary policy language."
17-
- "Automate policy promotion from dev to prod with signed artifacts."
19+
documentation:
20+
- "Annotate all public modules: purpose, boundary, and invariants per directory."
21+
- "Ensure EXPLAINME.adoc is present and accurately describes the scope."
22+
- "Remove all template residue — no placeholder content should survive into production."
1823

19-
introspection:
20-
- "Expose decision latency and policy evaluation metrics."
21-
- "Add tracing for end-to-end request decisions."
24+
deprecations:
25+
- "REPLACE with real planned removals: what is being retired, since when, and by when."

contractiles/must/Mustfile

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
# SPDX-License-Identifier: PLMP-1.0-or-later
2-
# Mustfile - declarative state contract (template)
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Mustfile — declarative state contract (template)
3+
# Fill in: replace placeholder checks with real invariants for THIS repo.
34
# See: https://github.com/hyperpolymath/mustfile
5+
# See: standards/contractiles/CANONICAL-TEMPLATES.adoc
46

57
version: 1
68

79
metadata:
8-
name: project-state-contract
9-
spec: v0.0.1
10-
description: "Invariant checks for config, policy, gateway, logs, and schema."
11-
12-
parameters:
13-
gateway_port: "8080"
14-
schema_version: "v0.0.1"
10+
name: "REPLACE-WITH-REPO-NAME"
11+
spec: v1.0.0
12+
description: "REPLACE with a real description of what this contract guards."
1513

1614
checks:
17-
- name: config-valid
18-
description: "config/service.yaml must be valid."
19-
run: "yq -e '.' config/service.yaml >/dev/null"
15+
- name: tests-pass
16+
description: "All declared tests must pass. Failing tests block grade D."
17+
run: "just test"
18+
19+
- name: format-ok
20+
description: "Source must be correctly formatted per repo style."
21+
run: "just fmt"
2022

21-
- name: policy-compiles
22-
description: "policy/policy.ncl must compile."
23-
run: "nickel check policy/policy.ncl"
23+
- name: license-present
24+
description: "LICENSE file must exist."
25+
run: "test -f LICENSE"
2426

25-
- name: gateway-exposes-port
26-
description: "Service must expose the configured port."
27-
run: "bash -uc 'ss -lnt | rg \":${GATEWAY_PORT:-8080}\"'"
27+
- name: readme-present
28+
description: "README.adoc (or README.md) must exist."
29+
run: "test -f README.adoc || test -f README.md"
2830

29-
- name: logs-are-json
30-
description: "Logs must be JSON."
31-
run: "bash -uc 'rg --files -g \"*.json\" logs | xargs -r jq -e .'"
31+
- name: spdx-headers-present
32+
description: "Source files must carry SPDX-License-Identifier headers."
33+
run: "bash -uc '! rg --files . | xargs -r grep -rL SPDX-License-Identifier | rg -v \".gitkeep|.lock|LICENSE|NOTICE\" | head -1 | rg .'"
3234

33-
- name: schema-version-matches
34-
description: "Schema must match version spec."
35-
run: "bash -uc 'rg -n \"${SCHEMA_VERSION:-v0.0.1}\" schema'"
35+
- name: no-template-residue
36+
description: "No placeholder text from the contractiles template must remain."
37+
run: "bash -uc '! rg -rn \"REPLACE-WITH|PLMP-1.0-or-later\" --type-not binary . | rg .'"

0 commit comments

Comments
 (0)