Skip to content

Commit 95543a9

Browse files
committed
Refresh patch-bridge methodology guard
1 parent 79672f1 commit 95543a9

1 file changed

Lines changed: 61 additions & 17 deletions

File tree

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,102 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}>
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
#
4-
# K9 Validator: Methodology Guard
5-
# Checks that agent work respects methodology constraints declared in
6-
# agent_instructions/methodology.a2ml.
7-
#
8-
# Usage: k9 validate methodology-guard
4+
# K9 Validator: Patch Bridge Methodology Guard
5+
# Ensures that CVE classification, lockfile parsing, reachability analysis, and registry lookups align
6+
# with the methodology ergonomics declared in agent_instructions/methodology.a2ml.
97

108
let methodology_guard = {
11-
name = "methodology-guard",
9+
name = "patch-bridge-methodology-guard",
1210
version = "1.0.0",
13-
description = "Validates that agent work respects declared methodology constraints",
11+
description = "Validates that the bridge modules remain present, coverage metadata is fresh, and template placeholders are removed.",
1412

1513
checks = {
1614
divergent_invariant_language = {
17-
description = "No files in languages violating the divergent language invariant",
15+
description = "No files introduce a disallowed language variant in the proof directories.",
1816
severity = "error",
19-
# When methodology.divergent-invariants.language-invariant is set,
20-
# check that no new files introduce a different language for that purpose.
21-
# Example: if language-invariant = "idris2", reject new .lean or .v files
22-
# in the proof directories.
2317
check_type = "file-extension-guard",
2418
scope = "src/",
2519
},
2620

2721
believe_me_ceiling = {
28-
description = "believe_me count must not exceed declared ceiling",
22+
description = "believe_me occurrences do not exceed the declared ceiling (0 by default).",
2923
severity = "error",
3024
pattern = "believe_me",
3125
ceiling_key = "methodology.divergent-invariants.believe-me-ceiling",
3226
default_ceiling = 0,
3327
},
3428

3529
assert_total_ceiling = {
36-
description = "assert_total count must not exceed declared ceiling",
30+
description = "assert_total usage stays within the declared ceiling (0 by default).",
3731
severity = "error",
3832
pattern = "assert_total",
3933
ceiling_key = "methodology.divergent-invariants.assert-total-ceiling",
4034
default_ceiling = 0,
4135
},
4236

4337
state_not_template = {
44-
description = "STATE.a2ml must not contain template placeholders",
38+
description = "STATE.a2ml must not contain template placeholders.",
4539
severity = "warning",
4640
file = ".machine_readable/6a2/STATE.a2ml",
4741
reject_patterns = ["{{PLACEHOLDER}}", "{{PROJECT}}", "rsr-template-repo"],
4842
},
4943

5044
coverage_updated = {
51-
description = "coverage.a2ml should be updated within 30 days",
45+
description = "coverage.a2ml should be refreshed within the last 30 days.",
5246
severity = "info",
5347
file = ".machine_readable/agent_instructions/coverage.a2ml",
5448
staleness_days = 30,
5549
},
50+
51+
classify_module = {
52+
description = "CVE classification belongs to src/bridge/classify.rs.",
53+
severity = "error",
54+
check_type = "file-exists",
55+
file = "src/bridge/classify.rs",
56+
},
57+
58+
lockfile_module = {
59+
description = "Lockfile parsing logic is still present.",
60+
severity = "error",
61+
check_type = "file-exists",
62+
file = "src/bridge/lockfile.rs",
63+
},
64+
65+
reachability_module = {
66+
description = "Reachability analysis module remains versioned.",
67+
severity = "warning",
68+
check_type = "file-exists",
69+
file = "src/bridge/reachability.rs",
70+
},
71+
72+
registry_module = {
73+
description = "Registry lookup helper is tracked.",
74+
severity = "warning",
75+
check_type = "file-exists",
76+
file = "src/bridge/registry.rs",
77+
},
78+
79+
interface_test = {
80+
description = "The Zig FFI integration test supports the adoption gate.",
81+
severity = "warning",
82+
check_type = "file-exists",
83+
file = "src/interface/ffi/test/integration_test.zig",
84+
},
85+
86+
no_template_files = {
87+
description = "Remove any rsr-template placeholders.",
88+
severity = "error",
89+
check_type = "file-pattern-guard",
90+
scope = ".",
91+
reject_patterns = ["{{PROJECT}}", "{{OWNER}}", "{{AUTHOR}}"],
92+
},
93+
94+
no_placeholder_fuzz = {
95+
description = "Placeholder fuzz harnesses should not exist.",
96+
severity = "warning",
97+
check_type = "file-not-exists",
98+
file = "tests/fuzz/placeholder.txt",
99+
},
56100
},
57101
}
58102
in methodology_guard

0 commit comments

Comments
 (0)