@nimiplatform/nimi-coding 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +47 -35
- package/README.zh-CN.md +48 -36
- package/cli/commands/authority.mjs +80 -125
- package/cli/constants.mjs +1 -1
- package/cli/dev/check-authority-surface.mjs +17 -8
- package/cli/dev/check-product-conformance.mjs +4 -32
- package/cli/lib/authority/audit.mjs +262 -185
- package/cli/lib/authority/change-candidates.mjs +807 -0
- package/cli/lib/authority/closed-sets.mjs +7 -8
- package/cli/lib/authority/compile.mjs +6 -24
- package/cli/lib/authority/compiled-snapshot.mjs +143 -0
- package/cli/lib/authority/consumers.mjs +69 -19
- package/cli/lib/authority/diagnostics.mjs +7 -1
- package/cli/lib/authority/diff.mjs +77 -54
- package/cli/lib/authority/format.mjs +4 -32
- package/cli/lib/authority/git-snapshot.mjs +34 -379
- package/cli/lib/authority/graph.mjs +10 -10
- package/cli/lib/authority/impact.mjs +17 -144
- package/cli/lib/authority/review.mjs +33 -43
- package/cli/lib/authority/sarif.mjs +1 -8
- package/cli/lib/authority/source-yaml.mjs +0 -4
- package/cli/lib/authority/surface.mjs +19 -1
- package/cli/lib/authority/terms.mjs +10 -9
- package/cli/lib/authority/validate.mjs +6 -14
- package/cli/lib/entrypoints.mjs +2 -1
- package/contracts/authority-source.schema.yaml +0 -6
- package/contracts/authority-verifier-bindings.schema.yaml +21 -10
- package/methodology/authority-authoring.yaml +9 -26
- package/methodology/core.yaml +5 -3
- package/package.json +1 -1
- package/spec/authority-audit.yaml +56 -52
- package/spec/authority-authoring.yaml +3 -16
- package/spec/authority-change-candidates.yaml +146 -0
- package/spec/authority-consumers.yaml +7 -0
- package/spec/authority-discovery.yaml +2 -2
- package/spec/authority-graph.yaml +1 -1
- package/spec/authority-impact.yaml +16 -39
- package/spec/authority-review.yaml +29 -47
- package/spec/authority-terms.yaml +5 -1
- package/spec/product-scope.yaml +8 -7
- package/cli/lib/authority/evidence-snapshot.mjs +0 -1
- package/cli/lib/authority/evidence.mjs +0 -1432
- package/contracts/authority-evidence-bindings.schema.yaml +0 -53
- package/contracts/authority-evidence-probe-results.schema.yaml +0 -38
- package/contracts/authority-impact-dispositions.schema.yaml +0 -13
- package/spec/authority-evidence.yaml +0 -200
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
version:
|
|
1
|
+
version: 4
|
|
2
2
|
id: nimicoding.authority-authoring
|
|
3
3
|
purpose: Author explicit .nimi/spec authority without inference.
|
|
4
4
|
authority_boundary:
|
|
@@ -14,7 +14,7 @@ daily_workflow:
|
|
|
14
14
|
- Modify only project-owned canonical authority. Choose every product value before writing; never infer an ID, owner, scope, condition, failure, or relation.
|
|
15
15
|
- Run nimicoding authority fmt <changed-file> for each changed file.
|
|
16
16
|
- Run nimicoding authority check <complete-path> [--scope-bindings <file>] --json; then compile. For repository anchors run nimicoding authority anchors <repository-path> --spec <corpus-path> [--scope-bindings <file>] --max-units <positive-safe-integer> --max-anchors <positive-safe-integer> --max-bytes <positive-safe-integer> --json.
|
|
17
|
-
- For semantic changes, run diff and impact with explicit budgets and complete inputs;
|
|
17
|
+
- For semantic changes, run diff and impact with explicit budgets and complete inputs. Treat returned obligations only as host-owned follow-up targets; run the project's real code, type, test, and gate workflow separately.
|
|
18
18
|
- Never continue from compiler diagnostics, unknown IDs, budget failures, or partial/guessed results.
|
|
19
19
|
|
|
20
20
|
source_profiles:
|
|
@@ -22,7 +22,7 @@ source_profiles:
|
|
|
22
22
|
shape: "Closed mapping: format nimicoding.authority/v2; owner?; scope string?; units. Units/IDs/order unchanged."
|
|
23
23
|
defaults: owner/rule scope inherit; unit overrides; definitions lack scope.
|
|
24
24
|
omissions: lifecycle active and relations [] may be omitted; removed/reason stay explicit; missing owner/rule scope at both levels fails.
|
|
25
|
-
|
|
25
|
+
format: nimicoding.authority/v2_only_without_legacy_migration_or_history_input
|
|
26
26
|
markdown:
|
|
27
27
|
shape: One unit per file. Front matter carries format, id, kind, owner, lifecycle, rule modality/scope, and relations.
|
|
28
28
|
title: One plain H1.
|
|
@@ -67,38 +67,21 @@ relation_rules:
|
|
|
67
67
|
|
|
68
68
|
formatter_and_diagnostics:
|
|
69
69
|
- fmt canonicalizes; v2 strips redundant unit defaults but keeps container choices.
|
|
70
|
-
-
|
|
70
|
+
- Any source format other than nimicoding.authority/v2 fails fmt, check, compile, diff, impact, and review admission.
|
|
71
71
|
- check/compile use the complete path and fail closed; no public or partial AuthorityIR is emitted.
|
|
72
72
|
- Diagnostics give locations, reasons, conflicts, and repair categories, never product values.
|
|
73
73
|
- Fix values only from task or product authority. Do not invent container defaults, fallback data, historical inference, internal contracts, or wildcard corpus reading.
|
|
74
74
|
|
|
75
75
|
change_workflow:
|
|
76
76
|
diff: nimicoding authority diff <before-path> <after-path> --max-bytes <positive-integer> --json
|
|
77
|
-
|
|
77
|
+
candidates: nimicoding authority change-candidates <before-path> <after-path> --channels <comma-separated-closed-set> --max-candidates <positive-safe-integer> --max-reasons <positive-safe-integer> --max-bytes <positive-safe-integer> --json
|
|
78
|
+
impact: nimicoding authority impact <before-path> <after-path> --max-bytes <positive-integer> --json
|
|
78
79
|
boundaries:
|
|
79
80
|
- Diff compares complete canonical inputs; formatting, profile, file, and order-only changes are semantic zero.
|
|
80
|
-
-
|
|
81
|
+
- Change candidates are the complete union only for caller-requested exact owner, scope, changed-term, direct-relation, Definition-identity, and Definition-title channels. They are recall inputs for AI or human judgment, never conflict, retirement, authority, absence, or conformance findings.
|
|
82
|
+
- Impact follows declared reverse applies_to/supersedes only and reports every before/after scope consumer plus one test follow-up target for each impacted active rule.
|
|
81
83
|
- Diff/impact budgets cover complete compact payloads; budget failure returns no partial result.
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
disposition_authoring:
|
|
85
|
-
workflow:
|
|
86
|
-
- Write the empty skeleton and run impact to obtain exact obligations from the failed result.
|
|
87
|
-
- Add exactly one entry per impacted active rule using real project evidence, then rerun impact with the same budget. Missing or extra dispositions fail.
|
|
88
|
-
empty_skeleton: |
|
|
89
|
-
format: nimicoding.authority-impact-dispositions/v1
|
|
90
|
-
rules: []
|
|
91
|
-
complete_example: |
|
|
92
|
-
format: nimicoding.authority-impact-dispositions/v1
|
|
93
|
-
rules:
|
|
94
|
-
- id: rule.checkout-session
|
|
95
|
-
consumers:
|
|
96
|
-
- scope: api.checkout
|
|
97
|
-
status: addressed
|
|
98
|
-
evidence: src/checkout/session-handler.ts
|
|
99
|
-
test:
|
|
100
|
-
status: addressed
|
|
101
|
-
evidence: tests/checkout-session.test.ts
|
|
84
|
+
- Impact accepts no disposition, receipt, external result, test outcome, or completion state. The host owns execution and workflow state.
|
|
102
85
|
|
|
103
86
|
canonical_examples:
|
|
104
87
|
complete_yaml_lifecycle: |
|
package/methodology/core.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
version:
|
|
1
|
+
version: 6
|
|
2
2
|
methodology:
|
|
3
3
|
id: nimi-coding
|
|
4
4
|
mission: Preserve explicit project-authored canonical authority through deterministic formatting, compilation, and fail-closed gates.
|
|
@@ -9,6 +9,7 @@ methodology:
|
|
|
9
9
|
- canonical_authority_formatter_and_conformance_gate
|
|
10
10
|
- bounded_deterministic_exact_filtered_lexical_candidate_discovery_with_SourceMapped_field_snippets_and_optional_direct_authored_relation_preview
|
|
11
11
|
- private_compiler_filtered_lexical_discovery_and_exact_query
|
|
12
|
+
- immutable_per_invocation_compiler_snapshots_transient_exact_indexes_and_change_derived_candidate_recall
|
|
12
13
|
- complete_declared_outgoing_interpretation_closure
|
|
13
14
|
- bounded_explicit_relation_graph_navigation
|
|
14
15
|
- project_bound_deterministic_authority_audit_and_SARIF_projection
|
|
@@ -27,12 +28,13 @@ methodology:
|
|
|
27
28
|
- host_canonical_authority_under_.nimi/spec
|
|
28
29
|
- projected_compact_authoring_methodology
|
|
29
30
|
- package_internal_compiler_contracts
|
|
30
|
-
-
|
|
31
|
+
- local_derived_output
|
|
31
32
|
boundaries:
|
|
32
33
|
discovery: bounded_exact_filtered_lexical_candidates_with_SourceMapped_field_snippets_and_optional_M1_direct_authored_relation_preview_not_semantic_search_selection_context_complete_recall_or_absence_proof
|
|
34
|
+
change_candidates: complete_union_for_explicit_requested_exact_channels_not_conflict_retirement_authority_or_conformance_judgment
|
|
33
35
|
context: complete_declared_outgoing_interpretation_closure_not_complete_task_context
|
|
34
36
|
graph: bounded_explicit_relation_navigation_not_semantic_inference_or_raw_IR
|
|
35
37
|
audit: explicit_project_verifier_bindings_not_prose_inference_plugin_execution_or_product_authority
|
|
36
|
-
impact:
|
|
38
|
+
impact: declared_relation_impact_and_host_follow_up_targets_not_implementation_consumer_or_test_sync_proof
|
|
37
39
|
authority_admission: nimicoding_authority_check_on_complete_canonical_root
|
|
38
40
|
optional_repository_governance: separate_L3_not_authority_admission
|
package/package.json
CHANGED
|
@@ -1,85 +1,89 @@
|
|
|
1
|
-
version:
|
|
1
|
+
version: 2
|
|
2
2
|
spec:
|
|
3
|
-
id: nimicoding.authority-audit.
|
|
3
|
+
id: nimicoding.authority-audit.v2
|
|
4
4
|
owner: nimi-coding
|
|
5
5
|
status: active
|
|
6
|
-
product_claim:
|
|
6
|
+
product_claim: complete_admitted_authority_and_one_explicit_closed_binding_list_produce_only_deterministic_violation_findings_and_narrow_counts
|
|
7
|
+
command: nimicoding authority audit <path> --bindings <file> --max-units <positive-safe-integer> --max-edges <positive-safe-integer> --max-bytes <positive-safe-integer> [--json|--sarif]
|
|
8
|
+
surface:
|
|
9
|
+
report_format: nimicoding.authority-audit/v2
|
|
10
|
+
corpus_root: complete_input_authority_corpus
|
|
11
|
+
boolean_flags: [json, sarif]
|
|
12
|
+
value_flags: [bindings]
|
|
13
|
+
integer_flags: [max-units, max-edges, max-bytes]
|
|
14
|
+
repeatable_flags: []
|
|
15
|
+
blocking_findings_change_exit_code: true
|
|
16
|
+
advisory_findings_change_exit_code: false
|
|
7
17
|
runtime:
|
|
8
18
|
function: auditAuthorityPath(authorityPath_bindingsPath_budgets)
|
|
9
19
|
source: one_complete_package_private_AuthorityIR_SourceMap_and_one_closed_binding_document
|
|
10
20
|
binding:
|
|
11
|
-
format: nimicoding.authority-verifier-bindings/
|
|
21
|
+
format: nimicoding.authority-verifier-bindings/v2
|
|
12
22
|
authority: package://@nimiplatform/nimi-coding/contracts/authority-verifier-bindings.schema.yaml
|
|
13
|
-
top_level_fields: [format,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
detector
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
top_level_fields: [format, bindings]
|
|
24
|
+
bindings: non_empty
|
|
25
|
+
binding_ID: unique_exact_dotted_lowercase_identifier
|
|
26
|
+
unknown_detector_extra_field_invalid_authority_ref_or_empty_list: refused_with_null_audit
|
|
27
|
+
detectors:
|
|
28
|
+
minimum-independent-incoming-reference/v1:
|
|
29
|
+
binding_fields: [id, detector, premise, targets, minimum, policy]
|
|
30
|
+
premise: exact_active_rule_selected_by_binding
|
|
31
|
+
targets: non_empty_unique_exact_active_definitions_selected_by_binding
|
|
32
|
+
attachment: premise_must_have_direct_applies_to_each_target
|
|
33
|
+
measurement: distinct_other_active_rule_sources_with_direct_applies_to_target
|
|
34
|
+
minimum: positive_safe_integer_from_binding
|
|
35
|
+
exact-lexical-invariant/v1:
|
|
36
|
+
binding_fields: [id, detector, term, match, expectation, policy]
|
|
37
|
+
corpus: complete_active_authority
|
|
38
|
+
fields: [meaning, statement, condition, failure]
|
|
39
|
+
case: sensitive
|
|
40
|
+
match:
|
|
41
|
+
token: exact_literal_with_boundaries_outside_Unicode_letter_number_underscore_dot_or_hyphen
|
|
42
|
+
phrase: exact_non_overlapping_code_point_substring
|
|
43
|
+
expectation: [present, absent]
|
|
44
|
+
no_synonym_stemming_embedding_normalization_or_diff_derived_policy: true
|
|
28
45
|
result:
|
|
29
|
-
format: nimicoding.authority-audit/
|
|
30
|
-
top_level_fields: [format, operationStatus,
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
format: nimicoding.authority-audit/v2
|
|
47
|
+
top_level_fields: [format, operationStatus, blockingStatus, findings, counts, budgets]
|
|
48
|
+
operationStatus: completed
|
|
49
|
+
blockingStatus:
|
|
33
50
|
blocked: at_least_one_blocking_finding
|
|
34
|
-
|
|
35
|
-
passed: no_blocking_finding_or_gap
|
|
36
|
-
complete: false_only_when_required_binding_gap_exists
|
|
51
|
+
clear: no_blocking_finding_advisory_findings_may_still_exist
|
|
37
52
|
common_item_fields: [code, fingerprint, detector, binding, premise, basis, message, policy, authorityRefs, primaryLocation, relatedLocations, witness]
|
|
38
53
|
location_fields: [file, range, sourcePointer]
|
|
39
54
|
related_location_fields: [role, location]
|
|
40
|
-
basis:
|
|
41
|
-
|
|
42
|
-
required_coverage: required_binding_declaration_without_configured_detector_execution
|
|
43
|
-
required_binding_gap_fields:
|
|
44
|
-
detector: null
|
|
45
|
-
premise: null
|
|
46
|
-
basis: required_coverage
|
|
47
|
-
policy: required
|
|
48
|
-
observation: exactly_one_governance_bound_structural_observation_per_evaluated_binding
|
|
55
|
+
basis: configured
|
|
56
|
+
positive_binding_records_or_pass_witnesses: forbidden
|
|
49
57
|
findings:
|
|
50
58
|
- premise_target_direct_attachment_missing
|
|
51
59
|
- minimum_independent_incoming_reference_not_met
|
|
52
|
-
|
|
60
|
+
- exact_lexical_expectation_violation
|
|
53
61
|
ordering:
|
|
54
|
-
|
|
55
|
-
findings: [binding_ID, target_ID, code]
|
|
56
|
-
gaps: binding_ID
|
|
62
|
+
findings: [binding_ID, target_ID_when_present, code]
|
|
57
63
|
fingerprint:
|
|
58
64
|
algorithm: SHA-256_with_sha256_colon_prefix
|
|
59
|
-
|
|
60
|
-
excluded: [file, range, sourcePointer, policy, message, corpus_digest, run_identity]
|
|
65
|
+
excludes: [file, range, sourcePointer, policy, message, corpus_digest, run_identity]
|
|
61
66
|
counts:
|
|
62
67
|
fields: [bindings, returned, traversal]
|
|
63
|
-
binding_fields: [
|
|
64
|
-
returned_fields: [
|
|
68
|
+
binding_fields: [configured, evaluated]
|
|
69
|
+
returned_fields: [findings]
|
|
65
70
|
traversal_fields: [units, edges]
|
|
66
71
|
budgets:
|
|
67
72
|
required: [maxUnits, maxEdges, maxBytes]
|
|
68
73
|
values: positive_safe_integers
|
|
69
|
-
|
|
74
|
+
units: distinct_units_inspected_by_all_configured_detectors
|
|
75
|
+
edges: distinct_authored_edges_inspected_by_graph_detectors
|
|
70
76
|
bytes: UTF-8_bytes_of_compact_JSON.stringify_audit
|
|
71
77
|
overflow: AUTH_AUDIT_BUDGET_with_null_audit_and_partial_false
|
|
72
78
|
outcomes:
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
clear: audit_present_blockingStatus_clear_exit_0
|
|
80
|
+
blocked: audit_present_blockingStatus_blocked_exit_1
|
|
81
|
+
refused: invalid_corpus_binding_authority_reference_or_budget_with_null_audit_exit_1
|
|
75
82
|
partial: forbidden
|
|
76
83
|
boundaries:
|
|
77
84
|
writes_authority: false
|
|
78
85
|
binding_is_canonical_product_authority: false
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
natural_language_contradiction_or_business_completeness: not_evaluated
|
|
87
|
+
detector_plugin_DSL_exception_filter_external_result_or_dynamic_execution: forbidden
|
|
88
|
+
blocking_policy_inference_from_diff: forbidden
|
|
82
89
|
public_JS_exports: none
|
|
83
|
-
summary:
|
|
84
|
-
result_unitCount: full_compiled_corpus_units
|
|
85
|
-
proof_traversal_counts: audit.counts.traversal
|
|
@@ -41,11 +41,6 @@ fields:
|
|
|
41
41
|
unit_common_resolved_from_container_or_unit: [owner, lifecycle, relations]
|
|
42
42
|
markdown_frontmatter_also_requires: [format]
|
|
43
43
|
format: nimicoding.authority/v2
|
|
44
|
-
migration_inputs:
|
|
45
|
-
format: nimicoding.authority/v1
|
|
46
|
-
admitted_by: [fmt --upgrade, check, compile, diff, impact]
|
|
47
|
-
rationale: history_snapshots_and_migration_inputs_are_read_not_authored
|
|
48
|
-
compatibility_authoring_surface: none
|
|
49
44
|
identifier: dot_separated_lowercase_segments_start_and_end_alphanumeric
|
|
50
45
|
kinds: [rule, definition]
|
|
51
46
|
lifecycles: [active, removed]
|
|
@@ -80,24 +75,15 @@ relations:
|
|
|
80
75
|
semantic_failures: [unknown_type, duplicate_edge, self_edge, dangling_target, type_mismatch, cardinality, cycle]
|
|
81
76
|
commands:
|
|
82
77
|
fmt:
|
|
83
|
-
syntax: nimicoding authority fmt <file> [--check] [--
|
|
78
|
+
syntax: nimicoding authority fmt <file> [--check] [--json]
|
|
84
79
|
semantic_status: not_evaluated
|
|
85
80
|
writes: one_source_file_atomically_unless_check
|
|
86
81
|
structural_discriminants: [format, kind, lifecycle]
|
|
87
82
|
invention: forbidden
|
|
88
|
-
upgrade:
|
|
89
|
-
admits: nimicoding.authority/v1
|
|
90
|
-
emits: nimicoding.authority/v2
|
|
91
|
-
lifting: uniform_container_owner_and_single_valued_scope_plus_omission_of_defaulted_unit_fields
|
|
92
|
-
semantic_change: none_the_compiled_IR_is_identical_before_and_after
|
|
93
83
|
check:
|
|
94
|
-
syntax: nimicoding authority check <path> [--scope-bindings <file>] [--
|
|
84
|
+
syntax: nimicoding authority check <path> [--scope-bindings <file>] [--json]
|
|
95
85
|
writes: none
|
|
96
86
|
no_scope_bindings_flag: exact_existing_check_behavior
|
|
97
|
-
require_format:
|
|
98
|
-
admitted_values: [nimicoding.authority/v2, nimicoding.authority/v1]
|
|
99
|
-
enforcement: every_container_must_declare_the_exact_requested_format
|
|
100
|
-
default: absent_preserves_history_and_migration_compatibility
|
|
101
87
|
scope_bindings:
|
|
102
88
|
format: nimicoding.scope-bindings/v1
|
|
103
89
|
document: closed_mapping_with_exact_format_and_non_empty_scopes_sequence
|
|
@@ -113,6 +99,7 @@ commands:
|
|
|
113
99
|
compile:
|
|
114
100
|
syntax: nimicoding authority compile <path> [--json]
|
|
115
101
|
writes: none
|
|
102
|
+
source_format: exact_nimicoding.authority/v2_only
|
|
116
103
|
ir_visibility: package_private
|
|
117
104
|
public_json: operation_counts_and_diagnostics_only
|
|
118
105
|
anchors:
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
spec:
|
|
3
|
+
id: nimicoding.authority-change-candidates.v1
|
|
4
|
+
owner: nimi-coding
|
|
5
|
+
status: active
|
|
6
|
+
product_claim: complete_deterministic_change_derived_recall_of_current_active_non_root_authority_candidates_over_caller_requested_explicit_exact_channels
|
|
7
|
+
source:
|
|
8
|
+
before: one_complete_independently_admitted_package_private_AuthorityIR_and_SourceMap
|
|
9
|
+
after: one_complete_independently_admitted_package_private_AuthorityIR_and_SourceMap
|
|
10
|
+
changes: complete_semantic_diff_between_the_two_admitted_inputs
|
|
11
|
+
command:
|
|
12
|
+
syntax: nimicoding authority change-candidates <before-path> <after-path> --channels <comma-separated-closed-set> --max-candidates <positive-safe-integer> --max-reasons <positive-safe-integer> --max-bytes <positive-safe-integer> [--json]
|
|
13
|
+
channel_selection:
|
|
14
|
+
required: one_non_empty_array
|
|
15
|
+
admitted: [owner, scope, changed_term, direct_relation, definition_identity, definition_title]
|
|
16
|
+
unknown_duplicate_non_string_or_empty: AUTH_CHANGE_CANDIDATES_CHANNELS_with_null_product
|
|
17
|
+
input_order: non_semantic
|
|
18
|
+
output_order: canonical_admitted_channel_order
|
|
19
|
+
completeness_scope: exact_union_of_requested_channels_only
|
|
20
|
+
unrequested_channels: not_evaluated_and_do_not_recall_or_emit_reasons
|
|
21
|
+
roots:
|
|
22
|
+
selection: every_exact_unit_ID_named_by_at_least_one_complete_semantic_diff_change
|
|
23
|
+
included_operations: [unit_added, modified, added, removed]
|
|
24
|
+
metadata_only_changes: included_because_owner_and_title_rename_context_are_product_relevant_recall_inputs
|
|
25
|
+
formatting_profile_file_move_container_regroup_and_source_order_only_change: no_root
|
|
26
|
+
root_record_fields: [id, changes, before, after]
|
|
27
|
+
change_fields: [operation, pointer]
|
|
28
|
+
side_fields: [kind, owner, lifecycle, title, location]
|
|
29
|
+
absent_side: explicit_null
|
|
30
|
+
candidate_universe:
|
|
31
|
+
source: after_only
|
|
32
|
+
lifecycle: active_only
|
|
33
|
+
roots: excluded
|
|
34
|
+
removed_tombstones: excluded
|
|
35
|
+
admission: at_least_one_exact_recall_reason_from_one_declared_channel
|
|
36
|
+
ordering: lexical_unit_ID
|
|
37
|
+
recall_channels:
|
|
38
|
+
owner:
|
|
39
|
+
match: exact_owner_equality_between_candidate_and_each_before_or_after_root
|
|
40
|
+
reason_witness: exact_raw_owner_and_both_SourceMap_locations
|
|
41
|
+
scope:
|
|
42
|
+
match: exact_scope_membership_shared_by_an_active_rule_candidate_and_each_before_or_after_active_rule_root
|
|
43
|
+
reason_witness: exact_raw_scope_and_both_SourceMap_locations
|
|
44
|
+
changed_term:
|
|
45
|
+
root_fields: [title, meaning, statement, condition, failure]
|
|
46
|
+
root_values: only_normalized_terms_present_on_one_changed_field_side_and_absent_from_the_other_side_plus_every_after_term_of_a_unit_added_root
|
|
47
|
+
candidate_fields: [title, meaning, statement, condition, failure]
|
|
48
|
+
normalization: [Unicode_NFKC, split_camelCase_boundary, deterministic_lowercase, Unicode_Letter_or_Number_runs, deduplicate_terms]
|
|
49
|
+
match: one_or_more_exact_normalized_terms_shared_by_one_changed_root_field_and_one_candidate_field
|
|
50
|
+
excluded: [unchanged_root_text, owner, scope, lifecycle, relations, removal_reason, fuzzy_matching, stopwords, synonyms, translation, embedding, model_inference]
|
|
51
|
+
unchanged_terms_within_a_changed_field: excluded
|
|
52
|
+
reason_witness: complete_shared_changed_term_set_plus_both_raw_fields_and_both_SourceMap_locations
|
|
53
|
+
direct_relation:
|
|
54
|
+
source: complete_before_and_after_authored_applies_to_or_supersedes_edges
|
|
55
|
+
match: candidate_is_the_exact_source_or_target_endpoint_of_an_edge_incident_to_a_root
|
|
56
|
+
direction: incoming_or_outgoing_relative_to_the_root_while_preserving_authored_source_and_target
|
|
57
|
+
reason_witness: complete_authored_edge_with_source_relation_target_locations_plus_root_and_candidate_ID_locations
|
|
58
|
+
definition_identity:
|
|
59
|
+
anchors:
|
|
60
|
+
- a_definition_root_on_the_same_side
|
|
61
|
+
- an_exact_definition_target_of_a_relation_authored_by_a_root_on_the_same_side
|
|
62
|
+
match:
|
|
63
|
+
- candidate_authors_a_relation_to_the_exact_same_definition_ID
|
|
64
|
+
- candidate_raw_text_contains_the_exact_NFKC_definition_ID_with_identifier_token_boundaries
|
|
65
|
+
reason_witness: exact_definition_ID_title_and_locations_root_reference_and_candidate_field_or_relation
|
|
66
|
+
definition_title:
|
|
67
|
+
anchors: same_as_definition_identity
|
|
68
|
+
match: candidate_raw_text_contains_the_complete_exact_NFKC_case_sensitive_definition_title_with_Unicode_Letter_Number_boundaries
|
|
69
|
+
excluded: [partial_title, case_fold, fuzzy_phrase, synonym, translation]
|
|
70
|
+
reason_witness: exact_definition_ID_title_and_locations_root_reference_and_candidate_raw_field
|
|
71
|
+
composition:
|
|
72
|
+
selection: set_union_of_every_candidate_admitted_by_any_requested_channel_on_either_side
|
|
73
|
+
reasons: every_unique_exact_requested_channel_side_root_and_witness_tuple
|
|
74
|
+
duplicate_candidates_and_reasons: suppressed
|
|
75
|
+
ranking_top_k_stopwords_frequency_cutoff_or_heuristic_reduction: forbidden
|
|
76
|
+
zero_candidates: successful_complete_empty_union
|
|
77
|
+
semantic_judgment: none
|
|
78
|
+
candidate:
|
|
79
|
+
fields: [id, kind, owner, lifecycle, title, modality, scope, rawFields, relations, primaryIdLocation, reasons]
|
|
80
|
+
modality: exact_must_or_must_not_for_rules_and_explicit_null_for_definitions
|
|
81
|
+
scope: exact_after_scope_for_rules_and_empty_for_definitions
|
|
82
|
+
raw_fields: [meaning, statement, condition, failure]
|
|
83
|
+
absent_raw_fields: explicit_null
|
|
84
|
+
relations: complete_after_authored_relation_records
|
|
85
|
+
reason_fields: [channel, side, rootId, witness]
|
|
86
|
+
reason_channels: [owner, scope, changed_term, direct_relation, definition_identity, definition_title]
|
|
87
|
+
side: before_or_after
|
|
88
|
+
locations:
|
|
89
|
+
fields: [file, range, sourcePointer]
|
|
90
|
+
paths: relative_to_the_corresponding_input_root_when_inside_it
|
|
91
|
+
payload:
|
|
92
|
+
format: nimicoding.authority-change-candidates/v1
|
|
93
|
+
fields: [format, complete, requestedChannels, roots, candidates, counts, budgets, policy]
|
|
94
|
+
requestedChannels: canonical_ordered_exact_caller_set
|
|
95
|
+
complete: true_only_when_the_entire_requested_channel_union_and_every_requested_channel_reason_are_returned
|
|
96
|
+
count_fields: [beforeUnits, afterUnits, changedRoots, eligibleAfterUnits, candidates, reasons]
|
|
97
|
+
budget_fields: [maxCandidates, maxReasons, maxBytes]
|
|
98
|
+
policy_fields: [roots, candidateUniverse, recall, changedTerms, ordering, interpretation]
|
|
99
|
+
excluded:
|
|
100
|
+
- score_or_rank
|
|
101
|
+
- truncated_or_partial_candidates
|
|
102
|
+
- inferred_relation
|
|
103
|
+
- conflict_or_consistency_finding
|
|
104
|
+
- retirement_or_replacement_recommendation
|
|
105
|
+
- authority_pass_or_fail
|
|
106
|
+
- implementation_or_test_conformance
|
|
107
|
+
budgets:
|
|
108
|
+
max_candidates: required_explicit_positive_safe_integer_over_the_complete_requested_channel_candidate_union
|
|
109
|
+
max_reasons: required_explicit_positive_safe_integer_over_all_unique_exact_requested_channel_reasons
|
|
110
|
+
max_bytes: required_explicit_positive_safe_integer_over_UTF-8_bytes_of_compact_JSON_stringify_complete_payload
|
|
111
|
+
candidate_or_reason_overflow: AUTH_CHANGE_CANDIDATES_BUDGET_with_null_product_and_partial_false
|
|
112
|
+
byte_overflow: AUTH_CHANGE_CANDIDATES_BUDGET_with_null_product_and_partial_false
|
|
113
|
+
silent_reduction: forbidden
|
|
114
|
+
evaluation_stages:
|
|
115
|
+
- exact_candidate_ID_union_using_only_light_indexes_and_match_descriptors
|
|
116
|
+
- exact_unique_logical_reason_count_without_global_reason_key_storage_or_SourceMap_witness_objects
|
|
117
|
+
- full_reason_candidate_root_and_payload_materialization_only_after_candidate_and_reason_budgets_pass
|
|
118
|
+
candidate_overflow: return_exact_required_candidate_count_without_reason_witness_candidate_record_or_payload_materialization
|
|
119
|
+
reason_overflow: return_exact_required_reason_count_without_reason_witness_candidate_record_or_payload_materialization
|
|
120
|
+
duplicate_match_occurrences: collapsed_by_each_channel_visitor_before_reason_counting
|
|
121
|
+
indexing:
|
|
122
|
+
snapshot_indexes: [by_ID, by_owner, by_scope, incoming_relations, outgoing_relations, by_container]
|
|
123
|
+
changed_terms: one_precomputed_candidate_field_term_set_plus_exact_term_to_candidate_field_inverted_index_per_side
|
|
124
|
+
definition_patterns:
|
|
125
|
+
normalization: each_candidate_text_field_and_each_unique_definition_identity_or_title_pattern_is_NFKC_normalized_once_per_index_build
|
|
126
|
+
matching: one_deterministic_Aho_Corasick_multi_pattern_scan_per_candidate_field_and_stage
|
|
127
|
+
boundaries: exact_identity_or_Unicode_Letter_Number_title_boundaries_are_checked_on_each_match
|
|
128
|
+
direct_relations: snapshot_adjacency_indexes_without_candidate_linear_search
|
|
129
|
+
persistence: none_indexes_are_transient_and_derived_from_the_two_immutable_compiler_snapshots
|
|
130
|
+
fail_closed:
|
|
131
|
+
invalid_before_or_after_authority: preserve_complete_side_qualified_diff_or_compiler_diagnostics
|
|
132
|
+
invalid_transition: preserve_AUTH_DIFF_TRANSITION_INVALID
|
|
133
|
+
invalid_channels: AUTH_CHANGE_CANDIDATES_CHANNELS
|
|
134
|
+
invalid_runtime_budget: AUTH_CHANGE_CANDIDATES_BUDGET_with_null_product
|
|
135
|
+
partial_product: forbidden
|
|
136
|
+
boundaries:
|
|
137
|
+
read_only: true
|
|
138
|
+
writes_or_durable_artifacts: none
|
|
139
|
+
public_JS_exports: none
|
|
140
|
+
authority_or_product_semantic_decision: not_claimed
|
|
141
|
+
natural_language_contradiction_detection: not_admitted
|
|
142
|
+
relation_generation_or_repair: not_admitted
|
|
143
|
+
hard_cut_workflow_or_report: host_owned_not_admitted
|
|
144
|
+
implementation_code_test_or_gate_location: separate_product_not_included
|
|
145
|
+
source_container_proximity_annotation: not_included_because_it_is_non_semantic_unbounded_and_derivable_from_returned_locations
|
|
146
|
+
cache_SQLite_embedding_or_persistent_index: none
|
|
@@ -28,10 +28,17 @@ inputs:
|
|
|
28
28
|
scheme_knowledge: none_this_tool_knows_no_particular_project_scheme
|
|
29
29
|
absent_scheme: reference_is_externalUnresolved_never_dead
|
|
30
30
|
reference_grammar:
|
|
31
|
+
escaped_line_continuation: exact_backslash_LF_or_backslash_CRLF_is_removed_for_matching_while_locations_use_the_original_source_line
|
|
32
|
+
source_string_escape_boundary: one_backslash_followed_by_a_common_escape_starter_ends_the_local_path_while_two_or_more_backslashes_remain_a_Windows_separator_run
|
|
31
33
|
local_literal:
|
|
32
34
|
shape: .nimi<separator_run>spec_optionally_followed_by_further_segments
|
|
33
35
|
separators: forward_or_back_slash_runs_because_source_literals_escape_backslashes
|
|
34
36
|
bare_root_admitted: true
|
|
37
|
+
terminal_period_disambiguation:
|
|
38
|
+
raw_target_or_prefix_exists: preserve_raw_target
|
|
39
|
+
raw_absent_and_removing_exactly_one_period_resolves: classify_the_single_period_as_sentence_punctuation
|
|
40
|
+
raw_and_single_period_stripped_both_absent: preserve_raw_target_and_report_dead
|
|
41
|
+
raw_and_single_period_stripped_both_exist: preserve_raw_target
|
|
35
42
|
excluded: glob_star_or_angle_bracket_placeholder
|
|
36
43
|
local_constructor:
|
|
37
44
|
shape: adjacent_string_literals_beginning_with_.nimi_then_spec
|
|
@@ -25,7 +25,7 @@ filters:
|
|
|
25
25
|
zero_lexical_match_in_nonempty_eligible_universe: AUTH_DISCOVERY_NOT_FOUND_without_absence_proof
|
|
26
26
|
fields:
|
|
27
27
|
included: [id, title, owner, scope, meaning, statement, condition, failure, reason]
|
|
28
|
-
excluded: [relations, container_or_file_name, SourceMap_path_text, derived_context,
|
|
28
|
+
excluded: [relations, container_or_file_name, SourceMap_path_text, derived_context, implementation_artifacts, test_artifacts]
|
|
29
29
|
match: normalized_token_equality
|
|
30
30
|
admission: at_least_one_query_term_matches_one_included_field_of_an_eligible_unit
|
|
31
31
|
ranking:
|
|
@@ -55,7 +55,7 @@ snippets:
|
|
|
55
55
|
omissions: exact_nonnegative_omittedBeforeTerms_and_omittedAfterTerms_counts
|
|
56
56
|
complete: true_only_when_no_normalized_field_term_is_omitted
|
|
57
57
|
traceability: exact_portable_field_SourceMap_location_on_every_match
|
|
58
|
-
boundary:
|
|
58
|
+
boundary: snippet_is_a_lexical_match_not_source_prose_context_or_an_explanation
|
|
59
59
|
preview:
|
|
60
60
|
option_group: preview_direction_relations_and_max_edges_must_be_all_present_or_all_absent
|
|
61
61
|
source: existing_M1_direct_authored_graph_over_the_same_complete_compiler_snapshot
|
|
@@ -38,7 +38,7 @@ budgets:
|
|
|
38
38
|
required_all: [max_units, max_edges, max_bytes]
|
|
39
39
|
path_also_requires: max_hops
|
|
40
40
|
subgraph_also_requires: depth
|
|
41
|
-
units_and_edges:
|
|
41
|
+
units_and_edges: constrain_complete_traversal_accounting_not_only_returned_witness
|
|
42
42
|
bytes: UTF-8_bytes_of_compact_JSON.stringify_graph
|
|
43
43
|
overflow: AUTH_GRAPH_BUDGET_with_null_graph_and_partial_false
|
|
44
44
|
outcomes:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
version:
|
|
1
|
+
version: 2
|
|
2
2
|
spec:
|
|
3
|
-
id: nimicoding.authority-impact.
|
|
3
|
+
id: nimicoding.authority-impact.v2
|
|
4
4
|
owner: nimi-coding
|
|
5
5
|
status: active
|
|
6
|
-
product_claim:
|
|
6
|
+
product_claim: compare_admitted_compiler_outputs_and_report_declared_relation_impact_and_host_owned_follow_up_targets_without_accepting_completion_state
|
|
7
7
|
commands:
|
|
8
8
|
diff: nimicoding authority diff <before-path> <after-path> --max-bytes <positive-integer> [--json]
|
|
9
|
-
impact: nimicoding authority impact <before-path> <after-path> --
|
|
9
|
+
impact: nimicoding authority impact <before-path> <after-path> --max-bytes <positive-integer> [--json]
|
|
10
10
|
diff:
|
|
11
11
|
source: two_independently_admitted_compiler_outputs
|
|
12
12
|
format: nimicoding.authority-diff/v1
|
|
@@ -21,64 +21,41 @@ diff:
|
|
|
21
21
|
added: scope_value_or_relation_added
|
|
22
22
|
removed: scope_value_or_relation_removed
|
|
23
23
|
source_record_fields: [file, range, sourcePointer]
|
|
24
|
-
range_fields: [start, end]
|
|
25
|
-
position_fields: [line, column]
|
|
26
24
|
unit_removed_operation: forbidden
|
|
27
25
|
physical_unit_deletion: AUTH_DIFF_TRANSITION_INVALID
|
|
28
26
|
retirement: active_unit_is_replaced_by_a_valid_same_ID_same_kind_removed_tombstone
|
|
29
|
-
tombstone_retention: removed_unit_remains_present_until_a_separately_admitted_reserved_ID_mechanism_exists
|
|
30
27
|
pure_profile_format_file_rename_unit_order_or_container_regroup_change: empty
|
|
31
28
|
ordering: [unit_ID, JSON_pointer, operation, values]
|
|
32
29
|
traceability: changed_values_reference_before_and_or_after_SourceMap
|
|
33
|
-
invalid_input_diagnostics:
|
|
34
|
-
path_identity: before_or_after_prefix_plus_input_root_relative_path
|
|
35
|
-
related_paths: same_side_prefix_and_relative_normalization
|
|
36
|
-
ordering: global_diagnostic_order_after_normalization
|
|
37
|
-
relocated_equivalent_inputs: byte_identical_JSON
|
|
38
30
|
byte_budget:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
overflow: AUTH_DIFF_BUDGET
|
|
42
|
-
result: {diff: null, partial: false}
|
|
31
|
+
measure: UTF-8_bytes_of_compact_JSON.stringify_diff
|
|
32
|
+
overflow: AUTH_DIFF_BUDGET_with_null_diff_and_partial_false
|
|
43
33
|
impact:
|
|
44
|
-
format: nimicoding.authority-impact/
|
|
45
|
-
top_level_fields: [format, changedUnits, impactedUnits, obligations
|
|
34
|
+
format: nimicoding.authority-impact/v2
|
|
35
|
+
top_level_fields: [format, analysisStatus, changedUnits, impactedUnits, obligations]
|
|
36
|
+
analysisStatus: completed
|
|
46
37
|
impacted_unit_fields: [id, kind]
|
|
47
|
-
obligation_fields: [ruleId, type, target
|
|
48
|
-
|
|
49
|
-
roots: normative_governance_definition_rule_graph_changes; non_normative_metadata_diff_is_reported_but_creates_no_obligation
|
|
38
|
+
obligation_fields: [ruleId, type, target]
|
|
39
|
+
roots: normative_governance_definition_rule_graph_changes; non_normative_metadata_diff_is_reported_but_creates_no_impact_root
|
|
50
40
|
direction: reverse_declared_relations_from_changed_units_to_dependents
|
|
51
41
|
relation_categories: [applies_to, supersedes]
|
|
52
42
|
unrelated_units: excluded
|
|
53
43
|
active_rule_obligations:
|
|
54
44
|
consumer: union_of_before_and_after_declared_scope
|
|
55
|
-
test:
|
|
56
|
-
|
|
57
|
-
complete: every_required_declared_obligation_has_exact_addressed_evidence
|
|
58
|
-
proof_boundary: does_not_prove_implementation_consumer_or_test_synchronization
|
|
59
|
-
partial_success: false
|
|
60
|
-
failure_report: may_list_complete_impacted_units_and_unresolved_obligations_with_ok_false
|
|
45
|
+
test: one_host_follow_up_target_per_impacted_active_rule
|
|
46
|
+
completion_or_disposition_input: forbidden
|
|
61
47
|
byte_budget:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
overflow: AUTH_IMPACT_BUDGET
|
|
65
|
-
result: {diff: null, impact: null, partial: false}
|
|
66
|
-
dispositions:
|
|
67
|
-
format: nimicoding.authority-impact-dispositions/v1
|
|
68
|
-
authority: package://@nimiplatform/nimi-coding/contracts/authority-impact-dispositions.schema.yaml
|
|
69
|
-
status: addressed
|
|
70
|
-
evidence: explicit_non_empty_text
|
|
71
|
-
inference: forbidden
|
|
48
|
+
measure: UTF-8_bytes_of_compact_JSON.stringify_object_containing_diff_and_impact
|
|
49
|
+
overflow: AUTH_IMPACT_BUDGET_with_null_diff_null_impact_and_partial_false
|
|
72
50
|
fail_closed:
|
|
73
51
|
invalid_before_or_after_authority: compiler_diagnostics
|
|
74
52
|
identity_reuse_kind_change_or_physical_deletion: AUTH_DIFF_TRANSITION_INVALID_or_compiler_identity_diagnostics
|
|
75
53
|
dangling_relation_or_illegal_lifecycle: compiler_diagnostics
|
|
76
|
-
malformed_or_extra_disposition: AUTH_IMPACT_DISPOSITION_INVALID
|
|
77
54
|
missing_or_invalid_max_bytes: CLI_usage_failure
|
|
78
55
|
boundaries:
|
|
79
56
|
writes_authority: false
|
|
80
57
|
durable_artifacts: none
|
|
81
58
|
git_interpretation: none
|
|
59
|
+
host_obligation_state_receipt_test_execution_or_completion: not_accepted_or_owned
|
|
82
60
|
natural_language_contradiction_detection: not_claimed
|
|
83
61
|
implementation_consumer_test_sync_proof: not_admitted
|
|
84
|
-
storage_search_embedding_visualization_AI_execution_Atlas: not_admitted
|