id: linter.scenario_bindings
kind: intent
statement: “WHEN a spec file is linted, THE linter SHALL fire scenario_binding_targets_declared_scenario on every binding row whose id slugifies to no — or to more than one — #### Scenario: heading of the same file under the one pinned canonicalization, SHALL fire scenario_binding_refs_own_file on every binding-cell reference that resolves only outside the row’s own file, SHALL warn scenario_binding_covers_constraint on every binding row whose verifies cell cites no Constraint row of its own file, SHALL warn scenario_binding_unbound_scenario once per declared scenario with no binding row in table-carrying files and scenario_binding_table_absent exactly once on a table-less file, SHALL warn scenario_binding_uninformative on a binding whose verifies cites more than 40% of the file’s Constraint rows (distinct_cited * 5 > total * 2) or whose on cell cites every declared Transition, SHALL fire scenario_binding_status_closed on every binding row whose optional status cell carries a value outside the closed vocabulary draft/confirmed — the absent cell is draft, SHALL compose with total_refs and ref_kind_compatible without double-reporting, SHALL walk binding rows in no file that carries no such table, and SHALL keep every scenario-binding finding and hint on the warnings channel with exit 0 — never on the issues channel.”
linter-scenario_bindings Specification
Purpose
The scenario-bindings checker: the scenario→model claim layer’s enforcement half. Every ### Scenario bindings row keys one #### Scenario: heading by its slug and cites own-file rows (given→State, on→Transition, asserts→State, verifies→Constraint), so a scenario’s compliance claim is data the linter can check: the slug join key must resolve to exactly one heading, every cited row must live in the binding’s own file (the scenario view projects one file’s machine), resolution and target-kind stay total_refs/ref_kind_compatible’s beat, and files without a table are walked not at all (per-file adoption). The coverage, unbound-hint, saturation, and reconciliation advisories of tickets pxjn/vkxv extend this capability’s family.
Constraints
| id | kind | expr | traces_to |
|---|---|---|---|
| slug_join_key | invariant | every binding row's id is the slug of exactly one #### Scenario: heading in the binding row's own file, under the one pinned canonicalization — a slug matching zero headings is a labeled finding (a silent no-op binding is a lie), and a slug matching more than one is a labeled finding naming every candidate heading (a silent double-bind is a worse lie) | [[linter.scenario_bindings]] |
| own_file_scope | invariant | every [[link]] in a binding row's given/on/asserts/verifies cell resolves in the binding row's own file — the scenario view projects one file's machine, a foreign frame has no lifeline, and cross-file bindings stay a named future (Revision 23 pins the restriction; lifting it is its own revision) | [[linter.scenario_bindings]] |
| lazy_resolution | invariant | binding rows are walked only in files carrying a ### Scenario bindings table — a table-less file parses zero binding rows and reports zero scenario-binding findings; adoption is per file | [[linter.scenario_bindings]] |
| coverage_own_file | invariant | every binding row's verifies cell cites at least one Constraint row of the binding row's own file (bare id, file-qualified <intent-id>.<id>, or a member of either) — an empty verifies cell or a states-only binding leaves the compliance claim unchecked; FILE-SCOPED v1 is pinned: citing an unrelated own constraint passes by construction, and requirement-scoped matching is ticket specodelic-dsyk | [[linter.scenario_bindings]] |
| status_vocabulary | invariant | every binding row's optional status cell carries a value in the closed vocabulary {draft, confirmed} — the absent cell is draft, so only an explicit misspelling can leave a binding's confirmation provenance unread; the cell sits between id` and the four typed reference columns (Revision 24 pins the column order) | [[linter.scenario_bindings]] |
| rollout_meter | invariant | a file with no ### Scenario bindings table gets exactly ONE scenario_binding_table_absent hint; a table-carrying file gets exactly one scenario_binding_unbound_scenario hint per declared scenario slug with no binding row — never both channels of the meter for one file | [[linter.scenario_bindings]] |
| saturation_pinned | invariant | a binding is uninformative when distinct own Constraint rows cited * 5 > total Constraint rows * 2 (strictly more than 40%, integer arithmetic, never floats — 1-2 constraint rows make any citation saturating, 3 rows make one citation clean), or its on cell cites EVERY declared Transition of a non-empty Model; both arms together fire ONE advisory naming the scenario | [[linter.scenario_bindings]] |
| advisory_channel | invariant | all four coverage-gate rules render on the warnings channel with exit 0 and are never counted by Report::failures — the issues channel, the strict lint baseline gate (issues only), and every checker verdict stay untouched | [[linter.scenario_bindings]] |
| composition_not_duplication | invariant | resolution and target-kind of binding-cell references stay total_refs / ref_kind_compatible's beat — neither the slug and own-file rules nor the coverage-gate family ever re-reports a dangling or wrong-kind target | [[linter.scenario_bindings]] |
| finding_reported | effect | linter.scenario_bindings.finding_reported(rule, subject) — every scenario-binding violation renders as one labeled Issue naming the rule id, the file, and the offending row or scenario, and every coverage-gate advisory renders as one labeled warning, each on its pinned channel with exit 0 | [[linter.scenario_bindings]] |
Model
States
unwalkedwalked_cleanviolations_reported(emits:[[linter.scenario_bindings.finding_reported]])
Transitions
| id | from | to | guard |
|---|---|---|---|
| walk_table | unwalked | walked_clean | the file carries a ### Scenario bindingstable ∧ every binding row's id slug-matches exactly one own#### Scenario: heading ([[linter.scenario_bindings.slug_join_key]]) ∧ every binding-cell link resolves own-file ([[linter.scenario_bindings.own_file_scope]]) ∧ every binding row's status stays in the closed vocabulary ([[linter.scenario_bindings.status_vocabulary]]) ∧ every binding row's verifies cites an own-file Constraint ([[linter.scenario_bindings.coverage_own_file]]) ∧ every declared scenario has a binding row and no binding saturates ([[linter.scenario_bindings.saturation_pinned]]) |
| report_violations | unwalked | violations_reported | the file carries a ### Scenario bindingstable ∧ ¬(every binding row's id slug-matches exactly one own#### Scenario: heading ∧ every binding-cell link resolves own-file ∧ every binding row's status stays in the closed vocabulary ∧ every binding row's verifies cites an own-file Constraint ∧ every declared scenario has a binding row and no binding saturates) |
Properties
| id | kind | derives_from | generator | predicate |
|---|---|---|---|---|
| slug_without_heading_fires | unit | [[linter.scenario_bindings.slug_join_key]] | binding_row_with_typo_slug() | rule_fired(spec, "scenario_binding_targets_declared_scenario") |
| ambiguous_slug_fires_once | unit | [[linter.scenario_bindings.slug_join_key]] | two_headings_sharing_one_slug() | exactly one finding naming the row and both headings |
| slug_match_passes | unit | [[linter.scenario_bindings.slug_join_key]] | binding_row_matching_one_heading() | lint_clean(spec) |
| foreign_ref_fires | unit | [[linter.scenario_bindings.own_file_scope]] | binding_cell_citing_foreign_row() | rule_fired(spec, "scenario_binding_refs_own_file") |
| own_ref_passes | unit | [[linter.scenario_bindings.own_file_scope]] | binding_cell_citing_own_row() | lint_clean(spec) |
| table_less_files_silent | unit | [[linter.scenario_bindings.lazy_resolution]] | corpus_of_table_less_files() | zero scenario-binding findings, exit 0 |
| table_carrying_file_fully_walked | unit | [[linter.scenario_bindings.lazy_resolution]] | one_table_with_two_violations_among_51_clean_files() | exactly two findings, both in the carrying file |
| dangling_ref_not_doubled | unit | [[linter.scenario_bindings.composition_not_duplication]] | binding_cell_citing_absent_row() | exactly one total_refs finding; zero own-file findings |
| wrong_kind_not_doubled | unit | [[linter.scenario_bindings.composition_not_duplication]] | binding_cell_citing_wrong_kind_row() | exactly one ref_kind_compatible finding; zero own-file findings |
| violation_labeled | unit | [[linter.scenario_bindings.finding_reported]] | corpus_with_binding_violations() | every finding names rule id, file, and binding row id |
| states_only_binding_warns | unit | [[linter.scenario_bindings.coverage_own_file]] | states_only_binding_with_own_constraints() | rule_fired(spec, "scenario_binding_covers_constraint") naming the scenario |
| real_verifies_passes | unit | [[linter.scenario_bindings.coverage_own_file]] | binding_row_citing_own_constraint() | zero coverage warnings for that row |
| unbound_scenario_hints_once | unit | [[linter.scenario_bindings.rollout_meter]] | one_binding_row_two_headings() | exactly one unbound_scenario hint, zero table_absent hints |
| table_less_file_hints_once | unit | [[linter.scenario_bindings.rollout_meter]] | corpus_of_table_less_files() | exactly one table_absent hint per file, exit 0 |
| saturated_verifies_warns | unit | [[linter.scenario_bindings.saturation_pinned]] | single_constraint_file_with_cited_binding() | exactly one uninformative warning naming the scenario |
| every_transition_cited_warns | unit | [[linter.scenario_bindings.saturation_pinned]] | on_cell_citing_all_transitions() | exactly one uninformative warning naming the scenario |
| proportionate_binding_passes | unit | [[linter.scenario_bindings.saturation_pinned]] | three_constraints_one_cited_partial_on() | zero saturation warnings |
| advisories_never_gate | unit | [[linter.scenario_bindings.advisory_channel]] | corpus_firing_every_coverage_rule() | issues empty, failures() == 0, all rules on warnings, exit 0 |
| refs_not_doubled | unit | [[linter.scenario_bindings.composition_not_duplication]] | binding_cell_citing_absent_or_wrong_kind_row() | exactly the generic rule fires, never a coverage-gate duplicate |
| status_outside_vocabulary_fires | unit | [[linter.scenario_bindings.status_vocabulary]] | binding_row_with_typo_status() | rule_fired(spec, "scenario_binding_status_closed") |
| closed_or_absent_status_passes | unit | [[linter.scenario_bindings.status_vocabulary]] | binding_rows_with_draft_confirmed_or_absent_status() | zero scenario_binding_status_closed findings |
Requirements
Requirement: Binding slugs name declared scenarios
The linter SHALL fire scenario_binding_targets_declared_scenario on
every binding row whose id is not the slug — under the one pinned
canonicalization (lowercase alphanumerics; every non-alphanumeric run
→ one hyphen; edge hyphens trimmed) — of exactly one #### Scenario:
heading in the binding row’s own file, and SHALL pass a row whose id
matches exactly one such heading.
Scenario: Slug without a heading fires
- WHEN a spec file declares
#### Scenario: renders folded machinesand a binding row whose id isrenders-folded-machines-typo - THEN the lint reports one
scenario_binding_targets_declared_scenariofinding naming the file and the binding row id, and exits nonzero
Scenario: Exactly one match passes
- WHEN the file declares
#### Scenario: renders folded machinesand a binding row whose id isrenders-folded-machines - THEN the lint reports zero scenario-binding findings for that row
Scenario: Ambiguous slug fires once
- WHEN the file declares two
#### Scenario:headings that slugify to the same slug, and a binding row whose id is that slug - THEN the lint reports exactly one
scenario_binding_targets_declared_scenariofinding naming the binding row and both headings — never a silent double-bind
Requirement: Binding references stay in the owning file
The linter SHALL fire scenario_binding_refs_own_file on every
[[link]] in a binding row’s given/on/asserts/verifies cell
that resolves only in a file other than the binding row’s own file, and
SHALL pass a cell whose targets all resolve in the owning file.
Scenario: Foreign frame fires
- WHEN a binding row’s
oncell cites[[other.capability.row]]and no row with that id exists in the binding row’s own file - THEN the lint reports one
scenario_binding_refs_own_filefinding naming the binding row, the column, and the foreign target
Scenario: Own-file citation passes
- WHEN a binding row’s
verifiescell cites[[own.capability.constraint_row]]and that row is declared in the same file - THEN the lint reports zero own-file findings for that cell
Requirement: Binding rows are walked only where the table lives
The linter SHALL walk binding rows only in files that carry a
### Scenario bindings table: a file without the table parses zero
binding rows and SHALL produce zero scenario-binding findings — a
table-less file has opted out, and adoption is per file.
Scenario: Table-less corpus stays silent
- WHEN the linter runs over the corpus’s 52 spec files, none of
which carries a
### Scenario bindingstable - THEN zero
scenario_binding_targets_declared_scenarioand zeroscenario_binding_refs_own_filefindings are reported, exit 0
Scenario: Table-carrying file is fully walked
- WHEN one file carries the table with one slug violation and one foreign reference
- THEN exactly those two findings are reported for that file, and the other 51 files stay silent
Requirement: Every binding verifies a constraint of its own file
The linter SHALL warn scenario_binding_covers_constraint on every
binding row whose verifies cell cites no Constraint row of the
binding row’s own file, and SHALL pass a row whose verifies cell
cites at least one such row. The scope is FILE-level (v1, pinned):
citing an unrelated own constraint passes the check by construction;
the linter SHALL NOT attempt requirement-scoped matching (ticket
specodelic-dsyk). The finding is advisory: the warnings channel, exit
0, never an Issue.
Scenario: States-only binding warns
- WHEN a spec file declares Constraint rows and a binding row whose
only populated cells are
given/asserts - THEN the lint reports exactly one
scenario_binding_covers_constraintwarning naming the scenario slug, and exits 0
Scenario: A real verifies citation passes
- WHEN a binding row’s
verifiescell cites one Constraint row of its own file - THEN the lint reports zero coverage warnings for that row
Requirement: Unbound scenarios are metered as advisory hints
The linter SHALL warn scenario_binding_unbound_scenario once for
every #### Scenario: heading of a table-carrying file whose slug has
no binding row, and SHALL warn scenario_binding_table_absent exactly
once on any file that declares no ### Scenario bindings table. A file
WITH the table SHALL NOT receive the file-level hint, and a file
WITHOUT the table SHALL NOT receive per-scenario hints. Both are
advisory: the warnings channel, exit 0, never an Issue.
Scenario: One bound row for two headings hints once
- WHEN a file carries the table with one binding row and declares
two
#### Scenario:headings - THEN the lint reports exactly one
scenario_binding_unbound_scenariohint naming the unbound slug and zero file-level hints
Scenario: A table-less file hints once
- WHEN the linter runs over a corpus of table-less spec files
- THEN each file gets exactly one
scenario_binding_table_absentwarning and zero per-scenario hints, and the lint exits 0
Requirement: A binding that claims everything is uninformative
The linter SHALL warn scenario_binding_uninformative on a binding
row whose verifies cell cites MORE than 40% of the file’s Constraint
rows — the pinned comparison is distinct_cited * 5 > total * 2, in
integer arithmetic — or whose on cell cites EVERY declared
Transition of a non-empty Model; an empty on cell never fires. Both
arms together SHALL fire ONE warning naming the scenario. The finding
is advisory: the warnings channel, exit 0, never an Issue.
Scenario: Saturated verifies warns
- WHEN a file declares one Constraint row and a binding row’s
verifiescell cites it - THEN the lint reports exactly one
scenario_binding_uninformativewarning naming the scenario
Scenario: Every transition cited warns
- WHEN a file declares two Transitions and a binding row’s
oncell cites both, whileverifiesstays proportionate - THEN the lint reports exactly one
scenario_binding_uninformativewarning naming the scenario
Scenario: A proportionate binding passes
- WHEN a file declares three Constraints and two Transitions, and a
binding row cites one Constraint in
verifiesand one Transition inon - THEN the lint reports zero saturation warnings
Requirement: Coverage findings never gate
None of scenario_binding_covers_constraint,
scenario_binding_unbound_scenario, scenario_binding_table_absent,
or scenario_binding_uninformative SHALL ever appear on the issues
channel, SHALL never be counted by Report::failures, and SHALL never
trip the strict lint baseline gate or a checker verdict.
Scenario: The advisories stay on the warnings channel
- WHEN the lint runs a corpus that fires every coverage-gate rule
- THEN
issuescarries no scenario-binding finding,failures()is 0, and every fired rule appears on the warnings channel with exit 0
Requirement: Binding status stays in the closed vocabulary
The linter SHALL fire scenario_binding_status_closed on every
binding row whose optional status cell carries a value outside the
closed vocabulary {draft, confirmed} — the absent cell is
draft — and SHALL pass every row whose status is draft,
confirmed, or absent. The finding names the file, the binding row,
and the offending value; like the other closed vocabularies it is an
Issue on the failure channel, not an advisory.
Scenario: A status outside the vocabulary fires
- WHEN a binding row carries
status=confrimed - THEN the lint reports one
scenario_binding_status_closedfinding naming the file, the binding row id, and the value, and exits nonzero
Scenario: The closed statuses pass
- WHEN one binding row carries
status=draftand another carriesstatus=confirmed, in a table whose declared columns includestatus - THEN the lint reports zero
scenario_binding_status_closedfindings and zero row-shape findings for both rows
Scenario: An absent status passes as draft
- WHEN a binding row carries no
statuscell at all - THEN the lint reports zero
scenario_binding_status_closedfindings for that row
Scenario bindings
| id | status | given | on | asserts | verifies |
|---|---|---|---|---|---|
| slug-without-a-heading-fires | [[slug_join_key]] | ||||
| exactly-one-match-passes | [[slug_join_key]] | ||||
| ambiguous-slug-fires-once | [[slug_join_key]] | ||||
| foreign-frame-fires | [[own_file_scope]] | ||||
| own-file-citation-passes | [[own_file_scope]] | ||||
| a-status-outside-the-vocabulary-fires | [[status_vocabulary]] | ||||
| the-closed-statuses-pass | [[status_vocabulary]] | ||||
| an-absent-status-passes-as-draft | [[status_vocabulary]] | ||||
| table-less-corpus-stays-silent | [[lazy_resolution]] | ||||
| table-carrying-file-is-fully-walked | [[lazy_resolution]] | ||||
| states-only-binding-warns | [[coverage_own_file]] | ||||
| a-real-verifies-citation-passes | [[coverage_own_file]] | ||||
| one-bound-row-for-two-headings-hints-once | [[rollout_meter]] | ||||
| a-table-less-file-hints-once | [[rollout_meter]] | ||||
| saturated-verifies-warns | [[saturation_pinned]] | ||||
| every-transition-cited-warns | [[saturation_pinned]] | ||||
| a-proportionate-binding-passes | [[saturation_pinned]] | ||||
| the-advisories-stay-on-the-warnings-channel | [[advisory_channel]] |