@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.
Files changed (47) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +47 -35
  3. package/README.zh-CN.md +48 -36
  4. package/cli/commands/authority.mjs +80 -125
  5. package/cli/constants.mjs +1 -1
  6. package/cli/dev/check-authority-surface.mjs +17 -8
  7. package/cli/dev/check-product-conformance.mjs +4 -32
  8. package/cli/lib/authority/audit.mjs +262 -185
  9. package/cli/lib/authority/change-candidates.mjs +807 -0
  10. package/cli/lib/authority/closed-sets.mjs +7 -8
  11. package/cli/lib/authority/compile.mjs +6 -24
  12. package/cli/lib/authority/compiled-snapshot.mjs +143 -0
  13. package/cli/lib/authority/consumers.mjs +69 -19
  14. package/cli/lib/authority/diagnostics.mjs +7 -1
  15. package/cli/lib/authority/diff.mjs +77 -54
  16. package/cli/lib/authority/format.mjs +4 -32
  17. package/cli/lib/authority/git-snapshot.mjs +34 -379
  18. package/cli/lib/authority/graph.mjs +10 -10
  19. package/cli/lib/authority/impact.mjs +17 -144
  20. package/cli/lib/authority/review.mjs +33 -43
  21. package/cli/lib/authority/sarif.mjs +1 -8
  22. package/cli/lib/authority/source-yaml.mjs +0 -4
  23. package/cli/lib/authority/surface.mjs +19 -1
  24. package/cli/lib/authority/terms.mjs +10 -9
  25. package/cli/lib/authority/validate.mjs +6 -14
  26. package/cli/lib/entrypoints.mjs +2 -1
  27. package/contracts/authority-source.schema.yaml +0 -6
  28. package/contracts/authority-verifier-bindings.schema.yaml +21 -10
  29. package/methodology/authority-authoring.yaml +9 -26
  30. package/methodology/core.yaml +5 -3
  31. package/package.json +1 -1
  32. package/spec/authority-audit.yaml +56 -52
  33. package/spec/authority-authoring.yaml +3 -16
  34. package/spec/authority-change-candidates.yaml +146 -0
  35. package/spec/authority-consumers.yaml +7 -0
  36. package/spec/authority-discovery.yaml +2 -2
  37. package/spec/authority-graph.yaml +1 -1
  38. package/spec/authority-impact.yaml +16 -39
  39. package/spec/authority-review.yaml +29 -47
  40. package/spec/authority-terms.yaml +5 -1
  41. package/spec/product-scope.yaml +8 -7
  42. package/cli/lib/authority/evidence-snapshot.mjs +0 -1
  43. package/cli/lib/authority/evidence.mjs +0 -1432
  44. package/contracts/authority-evidence-bindings.schema.yaml +0 -53
  45. package/contracts/authority-evidence-probe-results.schema.yaml +0 -38
  46. package/contracts/authority-impact-dispositions.schema.yaml +0 -13
  47. package/spec/authority-evidence.yaml +0 -200
@@ -1,10 +1,10 @@
1
- version: 1
1
+ version: 2
2
2
  spec:
3
- id: nimicoding.authority-review.v1
3
+ id: nimicoding.authority-review.v2
4
4
  owner: nimi-coding
5
5
  status: active
6
- product_claim: one_explicit_Git_base_commit_and_one_stable_current_worktree_produce_an_exact_read_only_change_review_over_complete_canonical_snapshots
7
- command: nimicoding authority review <repository-path> --base <git-ref> --bindings <file> --dispositions <file> --max-units <positive-safe-integer> --max-edges <positive-safe-integer> --max-bytes <positive-safe-integer> [--json]
6
+ product_claim: one_explicit_Git_base_commit_and_one_stable_current_worktree_produce_exact_read_only_authority_analysis_with_narrow_component_statuses
7
+ command: nimicoding authority review <repository-path> --base <git-ref> --bindings <file> --max-units <positive-safe-integer> --max-edges <positive-safe-integer> --max-bytes <positive-safe-integer> [--json]
8
8
  capture:
9
9
  repository: exact_non_bare_Git_worktree_root
10
10
  base_ref:
@@ -14,76 +14,58 @@ capture:
14
14
  base_authority:
15
15
  source: Git_object_database
16
16
  root: .nimi/spec_tree_required
17
- inventory: all_nested_tree_and_leaf_entries_without_suffix_filtering
18
17
  admitted_entry_types: [tree, regular_blob_100644_or_100755]
19
- refused: [symlink_blob, gitlink, unknown_mode_or_type, invalid_UTF-8_path, path_escape, duplicate_path, missing_object]
20
18
  worktree_authority:
21
19
  source: complete_live_filesystem_inventory_under_.nimi/spec
22
20
  includes: [tracked_unchanged, tracked_modification, tracked_deletion, untracked_or_ignored_file, unsupported_regular_file]
23
21
  refused: [missing_root, symlink, non_regular_entry, invalid_UTF-8_path, path_escape]
24
- stability: retain_exact_directory_and_file_handles_while_capturing_paths_types_bytes_and_metadata_then_recapture_complete_live_inventory_and_revalidate_all_held_handles_at_capture_commit
25
22
  race: any_path_type_byte_or_stability_metadata_change_refuses_the_whole_capture
26
23
  materialization:
27
24
  location: independent_0700_temporary_directory
28
- isolation: physical_temporary_root_must_be_outside_worktree_and_Git_administration_roots_before_any_directory_is_created_and_is_rechecked_after_creation
29
- validation: readback_paths_types_and_bytes_must_match_capture
30
25
  cleanup: required_after_success_or_failure
31
- Git_mutation: [checkout, stash, reset, stage, commit, branch_update, worktree_update, index_update]
32
- Git_mutation_posture: forbidden
26
+ Git_mutation: forbidden
33
27
  snapshot_identity:
34
28
  format: sha256_colon_lowercase_hex
35
29
  domain: nimicoding.authority-snapshot-content/v1
36
30
  inputs: sorted_repository_relative_regular_file_paths_entry_type_exact_byte_length_and_bytes
37
- excludes: [base_ref_name, commit_OID, executable_bit, permissions, mtime, ctime, inode, absolute_path, temporary_path, traversal_order]
38
- result:
39
- base: [commitOid, contentIdentity, file_count, unit_count, byte_count]
40
- worktree: [contentIdentity, file_count, unit_count, byte_count]
41
31
  oracles:
42
- admission_and_counts: compileAuthorityPath_on_each_materialized_snapshot
43
- semantic_delta: diffAuthorityPaths
44
- declared_impact: impactAuthorityPaths
45
- current_governance: auditAuthorityPath_on_worktree_snapshot_only
46
- copied_Git_parser_IR_graph_diff_or_detector: forbidden
32
+ admission_and_counts: exactly_one_compileAuthorityPath_call_per_materialized_side
33
+ immutable_read_model: createCompiledAuthoritySnapshot_with_by_ID_owner_scope_container_and_incoming_outgoing_indexes
34
+ semantic_delta: diffAuthoritySnapshots_on_the_two_admitted_read_models
35
+ declared_impact: impactAuthorityDiff_on_the_single_computed_semantic_diff
36
+ configured_audit: auditAuthoritySnapshot_on_the_admitted_worktree_read_model_only
37
+ component_recompile_or_persistent_cache: forbidden
47
38
  product:
48
- format: nimicoding.authority-review/v1
49
- top_level_fields: [format, operationStatus, policyStatus, complete, partial, snapshots, components, diff, impact, audit, budgets]
39
+ format: nimicoding.authority-review/v2
40
+ top_level_fields: [format, operationStatus, analysisComplete, partial, businessSemanticStatus, implementationConformanceStatus, snapshots, components, diff, impact, audit, budgets]
50
41
  operationStatus: completed
51
- policyStatus:
52
- blocked: current_audit_has_a_blocking_finding
53
- indeterminate: no_blocking_finding_and_impact_or_audit_coverage_is_incomplete
54
- passed: review_is_complete_and_current_audit_policy_passed
55
- complete: impact_complete_and_audit_complete_independent_of_blocking_policy
42
+ analysisComplete: snapshot_capture_corpus_admission_diff_impact_and_configured_audit_all_finished
56
43
  partial: false
57
- components: [snapshots, diff, impact, audit]
58
- component_fields: [operationStatus, complete]
59
- logical_products:
60
- diff: nimicoding.authority-diff/v1
61
- impact: nimicoding.authority-impact/v1
62
- audit: nimicoding.authority-audit/v1
63
- audit_claim: current_snapshot_only_without_before_after_finding_attribution
44
+ businessSemanticStatus: not_evaluated
45
+ implementationConformanceStatus: not_evaluated
46
+ components:
47
+ snapshotCapture: {fields: [status], status: captured}
48
+ corpusAdmission: {fields: [status], status: admitted}
49
+ semanticDiff: {fields: [status], status: computed}
50
+ declaredImpact: {fields: [status], status: computed}
51
+ configuredAudit: {fields: [status, blockingStatus], status: evaluated, blockingStatus: [clear, blocked]}
52
+ no_generic_policy_pass_or_conformance_status: true
64
53
  budgets:
65
54
  required: [maxUnits, maxEdges, maxBytes]
66
55
  values: positive_safe_integers
67
- units_and_edges: existing_audit_proof_traversal_semantics
68
56
  component_bytes: same_explicit_maxBytes_passed_to_diff_impact_and_audit
69
57
  review_bytes: UTF-8_bytes_of_compact_JSON.stringify_complete_review
70
58
  overflow: AUTH_REVIEW_BUDGET_or_existing_component_budget_with_review_null_and_partial_false
71
59
  outcomes:
72
- completed_passed: review_present_complete_true_policy_passed_exit_0
73
- completed_blocked: review_present_policy_blocked_exit_1
74
- completed_incomplete: review_present_complete_false_exit_1
75
- refused: invalid_Git_corpus_binding_disposition_capture_transition_or_budget_returns_review_null_partial_false_exit_1
60
+ completed_clear: review_present_analysisComplete_true_configured_audit_clear_exit_0
61
+ completed_blocked: review_present_analysisComplete_true_configured_audit_blocked_exit_1
62
+ refused: invalid_Git_corpus_binding_capture_transition_or_budget_returns_review_null_partial_false_exit_1
76
63
  usage_error: missing_repeated_or_invalid_CLI_argument_exit_2_without_review_product
77
64
  failed: uncaught_IO_resource_or_internal_failure_exit_2_without_review_product
78
- unresolved_impact: only_AUTH_IMPACT_UNDISPOSED_preserves_complete_logical_review_with_complete_false
79
- invalid_disposition: any_AUTH_IMPACT_DISPOSITION_INVALID_refuses_whole_review
80
- required_audit_gap: preserves_complete_logical_review_with_complete_false
81
- blocking_finding: preserves_complete_logical_review_without_claiming_finding_was_introduced_by_change
82
65
  boundaries:
83
66
  writes_authority_or_project_files: false
84
- durable_cache_database_history_or_receipt: none
85
- SARIF_review_aggregation: none
86
- heuristic_rename_split_merge_semantics: forbidden
87
- PR_branch_policy_approval_comment_commit_release_or_task_orchestration: not_owned
67
+ durable_cache_database_history_receipt_or_external_result: none
68
+ impact_disposition_or_host_completion_state: not_accepted
88
69
  arbitrary_shell_plugin_test_model_embedding_or_semantic_search_execution: forbidden
70
+ business_semantic_and_implementation_conformance: explicitly_not_evaluated
89
71
  public_AuthorityIR_or_SourceMap_export: none
@@ -26,7 +26,11 @@ inputs:
26
26
  required_for_code: true
27
27
  admission: must_be_one_exact_term_the_closed_lexical_grammar_admits
28
28
  lexical_grammar:
29
- classes: [snake_case, camelCase, UPPER_SNAKE, PascalCase, dotted]
29
+ classes: [snake_case, camelCase, UPPER_SNAKE, ALL_CAPS, PascalCase, dotted]
30
+ all_caps_shape: '[A-Z]{2,}'
31
+ all_caps_semantics: lexical_shape_only_without_acronym_or_product_identity_inference
32
+ acronym_leading_pascal_shape: '[A-Z]{2,}[a-z][a-z0-9]*([A-Z][a-z0-9]*)*'
33
+ ordinary_title_words: excluded_unless_they_match_the_existing_multi_segment_PascalCase_shape
30
34
  boundaries: ASCII_identifier_boundaries_required
31
35
  excluded: terms_inside_longer_path_like_tokens_containing_a_slash
32
36
  dotted_exclusion: final_segments_that_are_known_code_extensions
@@ -1,4 +1,4 @@
1
- version: 7
1
+ version: 9
2
2
  product:
3
3
  package_name: "@nimiplatform/nimi-coding"
4
4
  mission: canonical_authority_methodology_formatter_compiler_primitives_and_deterministic_gates
@@ -7,11 +7,11 @@ owned_surfaces:
7
7
  - exact_authority_guide_projection_and_managed_instruction_blocks
8
8
  - canonical_authority_format_and_complete_root_check
9
9
  - private_compile_bounded_filtered_lexical_discovery_with_field_snippets_optional_direct_authored_relation_preview_exact_query_and_declared_outgoing_context
10
+ - immutable_per_invocation_compiler_snapshots_with_transient_exact_indexes_and_change_derived_candidate_recall
10
11
  - semantic_diff_and_declared_review_impact
11
12
  - bounded_direct_references_exact_relation_paths_and_local_subgraphs
12
- - project_bound_deterministic_authority_audit_and_SARIF_projection
13
+ - project_bound_deterministic_graph_and_exact_lexical_authority_audit_and_SARIF_projection
13
14
  - git_aware_exact_read_only_authority_change_review
14
- - stable_current_worktree_authority_to_package_script_target_evidence
15
15
  - optional_L3_repository_governance_not_authority_admission
16
16
  canonical_boundary:
17
17
  host_product_authority: .nimi/spec/**/*.authority.{yaml,md}
@@ -29,12 +29,13 @@ out_of_scope:
29
29
  - profile_specific_authority_validation
30
30
  - planning_task_lifecycle_delegation_execution_review_or_approval
31
31
  - host_workflow_command_aggregation
32
+ - external_probe_result_attestation_test_execution_or_proof_packet_aggregation
32
33
  - sqlite_cache_incremental_embedding_semantic_search_visualization_AI_execution_or_Atlas
33
34
  claims:
34
35
  discovery: bounded_deterministic_exact_filtered_lexical_candidates_with_SourceMapped_field_snippets_and_optional_M1_direct_authored_relation_preview_not_semantic_search_selection_context_or_absence_proof
36
+ change_candidates: complete_union_of_caller_requested_exact_channels_with_raw_fields_modality_and_reasons_not_semantic_relevance_conflict_retirement_absence_or_conformance
35
37
  context: complete_declared_outgoing_interpretation_closure_not_complete_task_context
36
- impact: declared_review_obligation_not_sync_or_completion_proof
38
+ impact: declared_relation_impact_and_host_follow_up_targets_not_workflow_state_sync_or_completion_proof
37
39
  graph: complete_bounded_explicit_relation_navigation_not_semantic_inference_or_raw_IR
38
- audit: governance_bound_verifier_results_not_prose_predicate_inference_or_plugin_execution
39
- review: immutable_base_OID_and_stable_worktree_exact_snapshots_composed_through_existing_compiler_diff_impact_and_current_audit_oracles
40
- evidence: exact_identity_bound_package_script_target_reachability_and_external_supplied_observations_not_command_execution_test_success_runtime_reachability_or_conformance_attestation
40
+ audit: configured_graph_and_exact_case_sensitive_lexical_results_not_prose_predicate_inference_semantic_synonym_or_plugin_execution
41
+ review: immutable_base_OID_and_stable_worktree_exact_snapshots_composed_through_existing_compiler_diff_impact_and_current_audit_oracles_with_business_and_implementation_status_not_evaluated
@@ -1 +0,0 @@
1
- export { withGitEvidenceSnapshot } from "./git-snapshot.mjs";