@nimiplatform/nimi-coding 0.1.0 → 0.2.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 (121) hide show
  1. package/README.md +19 -20
  2. package/adapters/oh-my-codex/README.md +8 -9
  3. package/cli/commands/audit-sweep.mjs +10 -10
  4. package/cli/commands/classify-spec-tree.mjs +5 -0
  5. package/cli/commands/closeout.mjs +3 -0
  6. package/cli/commands/generate-spec-derived-docs.mjs +20 -0
  7. package/cli/commands/generate-spec-migration-plan.mjs +30 -0
  8. package/cli/commands/start.mjs +5 -1
  9. package/cli/commands/surface-validator-command.mjs +49 -0
  10. package/cli/commands/sweep-design.mjs +295 -0
  11. package/cli/commands/sweep.mjs +22 -0
  12. package/cli/commands/sync.mjs +132 -0
  13. package/cli/commands/topic-formatters.mjs +8 -8
  14. package/cli/commands/validate-ai-governance.mjs +167 -46
  15. package/cli/commands/validate-domain-admission.mjs +5 -0
  16. package/cli/commands/validate-guidance-bodies.mjs +5 -0
  17. package/cli/commands/validate-placement.mjs +5 -0
  18. package/cli/commands/validate-projection-edges.mjs +5 -0
  19. package/cli/commands/validate-spec-audit.mjs +5 -1
  20. package/cli/commands/validate-table-family.mjs +5 -0
  21. package/cli/commands/validate-tracked-output-admission.mjs +5 -0
  22. package/cli/constants.mjs +5 -49
  23. package/cli/help.mjs +33 -11
  24. package/cli/index.mjs +20 -2
  25. package/cli/lib/audit-sweep-runtime/admissions.mjs +38 -29
  26. package/cli/lib/audit-sweep-runtime/audit-validity.mjs +8 -0
  27. package/cli/lib/audit-sweep-runtime/chunks.mjs +11 -11
  28. package/cli/lib/audit-sweep-runtime/closeout.mjs +8 -8
  29. package/cli/lib/audit-sweep-runtime/codex-auditor-evidence.mjs +3 -3
  30. package/cli/lib/audit-sweep-runtime/codex-auditor.mjs +10 -10
  31. package/cli/lib/audit-sweep-runtime/common.mjs +7 -7
  32. package/cli/lib/audit-sweep-runtime/format.mjs +3 -3
  33. package/cli/lib/audit-sweep-runtime/ingest.mjs +8 -8
  34. package/cli/lib/audit-sweep-runtime/inventory-spec-chunks.mjs +24 -27
  35. package/cli/lib/audit-sweep-runtime/inventory.mjs +58 -18
  36. package/cli/lib/audit-sweep-runtime/ledger.mjs +1 -1
  37. package/cli/lib/audit-sweep-runtime/p0p1-profile.mjs +2 -2
  38. package/cli/lib/audit-sweep-runtime/remediation.mjs +6 -6
  39. package/cli/lib/audit-sweep-runtime/rerun.mjs +6 -6
  40. package/cli/lib/audit-sweep-runtime/status.mjs +1 -1
  41. package/cli/lib/audit-sweep-runtime/validators.mjs +2 -2
  42. package/cli/lib/authority-convergence.mjs +397 -2
  43. package/cli/lib/blueprint-audit.mjs +5 -5
  44. package/cli/lib/closeout.mjs +126 -3
  45. package/cli/lib/contracts.mjs +21 -17
  46. package/cli/lib/handoff.mjs +29 -11
  47. package/cli/lib/high-risk-admission.mjs +60 -11
  48. package/cli/lib/high-risk-decision.mjs +31 -2
  49. package/cli/lib/high-risk-ingest.mjs +5 -1
  50. package/cli/lib/high-risk-review.mjs +5 -1
  51. package/cli/lib/internal/contracts-parse.mjs +195 -24
  52. package/cli/lib/internal/contracts-validators.mjs +3 -2
  53. package/cli/lib/internal/doctor-bootstrap-surface.mjs +82 -35
  54. package/cli/lib/internal/doctor-delegated-surface.mjs +1 -1
  55. package/cli/lib/internal/doctor-finalize.mjs +12 -8
  56. package/cli/lib/internal/doctor-inspectors.mjs +34 -1
  57. package/cli/lib/internal/governance/ai/ai-context-budget-core.mjs +74 -12
  58. package/cli/lib/internal/governance/ai/ai-structure-budget-core.mjs +24 -6
  59. package/cli/lib/internal/governance/ai/check-agents-freshness.mjs +18 -23
  60. package/cli/lib/internal/surface-taxonomy-validators.mjs +931 -0
  61. package/cli/lib/internal/validators-spec.mjs +229 -20
  62. package/cli/lib/sweep-design-runtime/common.mjs +246 -0
  63. package/cli/lib/sweep-design-runtime/engine.mjs +733 -0
  64. package/cli/lib/sweep-design-runtime/fix-topic.mjs +414 -0
  65. package/cli/lib/sweep-design-runtime/lifecycle.mjs +54 -0
  66. package/cli/lib/sweep-design-runtime/results.mjs +324 -0
  67. package/cli/lib/sweep-design.mjs +8 -0
  68. package/cli/lib/sync.mjs +143 -0
  69. package/cli/lib/topic-artifacts.mjs +186 -0
  70. package/cli/lib/topic-authority-coverage.mjs +73 -0
  71. package/cli/lib/topic-closeout.mjs +560 -0
  72. package/cli/lib/topic-common.mjs +404 -0
  73. package/cli/lib/topic-decisions.mjs +332 -0
  74. package/cli/lib/topic-draft-packets.mjs +126 -7
  75. package/cli/lib/topic-execution.mjs +515 -0
  76. package/cli/lib/topic-goal.mjs +112 -33
  77. package/cli/lib/topic-ledger.mjs +281 -0
  78. package/cli/lib/topic-lifecycle-artifacts.mjs +173 -0
  79. package/cli/lib/topic-root-validation.mjs +288 -0
  80. package/cli/lib/topic-runner-commands.mjs +174 -0
  81. package/cli/lib/topic-runner-deferral.mjs +532 -0
  82. package/cli/lib/topic-runner-stale-gates.mjs +114 -0
  83. package/cli/lib/topic-runner-validation.mjs +138 -0
  84. package/cli/lib/topic-runner.mjs +109 -154
  85. package/cli/lib/topic-scaffold.mjs +252 -0
  86. package/cli/lib/topic-waves.mjs +403 -0
  87. package/cli/lib/topic.mjs +81 -93
  88. package/cli/lib/value-helpers.mjs +6 -1
  89. package/cli/seeds/bootstrap.mjs +96 -20
  90. package/cli/seeds/seed-policy.yaml +67 -0
  91. package/config/bootstrap.yaml +1 -1
  92. package/config/skill-manifest.yaml +4 -2
  93. package/config/spec-generation-inputs.yaml +41 -19
  94. package/contracts/audit-remediation-map.schema.yaml +1 -0
  95. package/contracts/audit-sweep-result.yaml +4 -0
  96. package/contracts/domain-admission.schema.yaml +56 -0
  97. package/contracts/migration-inventory.schema.yaml +80 -0
  98. package/contracts/negative-fixtures.yaml +91 -0
  99. package/contracts/placement-contract.schema.yaml +163 -0
  100. package/contracts/projection-edge.schema.yaml +130 -0
  101. package/contracts/shared-enums.yaml +68 -0
  102. package/contracts/spec-generation-audit.schema.yaml +19 -4
  103. package/contracts/spec-generation-inputs.schema.yaml +130 -29
  104. package/contracts/spec-reconstruction-result.yaml +9 -5
  105. package/contracts/surface-taxonomy.schema.yaml +201 -0
  106. package/contracts/sweep-design-result.yaml +349 -0
  107. package/contracts/table-family.schema.yaml +114 -0
  108. package/contracts/topic-goal.schema.yaml +10 -1
  109. package/contracts/tracked-output-admission.schema.yaml +70 -0
  110. package/contracts/workflow-consumer.schema.yaml +112 -0
  111. package/methodology/audit-sweep-p0p1-recall.yaml +1 -1
  112. package/methodology/spec-reconstruction.yaml +53 -30
  113. package/package.json +5 -4
  114. package/spec/_meta/command-gating-matrix.yaml +33 -0
  115. package/spec/_meta/generate-drift-migration-checklist.yaml +44 -62
  116. package/spec/_meta/governance-routing-cutover-checklist.yaml +3 -3
  117. package/spec/_meta/phase2-impacted-surface-matrix.yaml +14 -14
  118. package/spec/_meta/spec-authority-cutover-readiness.yaml +3 -5
  119. package/spec/_meta/spec-tree-model.yaml +104 -36
  120. package/spec/bootstrap-state.yaml +36 -36
  121. package/spec/product-scope.yaml +13 -10
@@ -0,0 +1,130 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.projection-edge.v1
4
+ owner: nimi-coding
5
+ purpose: Declare allowed projections between package, host, product, and derived surfaces.
6
+ required_top_level_fields:
7
+ - version
8
+ - projection_edges
9
+ - edge_kind_enum
10
+ - semantic_constraints
11
+ projection_edge_required_fields:
12
+ - edge_id
13
+ - edge_kind
14
+ - source_ref
15
+ - source_class
16
+ - source_owner
17
+ - target_ref
18
+ - target_class
19
+ - target_owner
20
+ - allowed_fields
21
+ - forbidden_promoted_fields
22
+ - drift_check_command
23
+ - failure_disposition
24
+ shared_enum_ref: shared-enums.yaml
25
+ projection_edges:
26
+ - edge_id: nimi_coding_package_to_host_anchor
27
+ edge_kind: package_to_host_anchor
28
+ source_ref: package://@nimiplatform/nimi-coding/{spec,methodology,contracts,config}/**
29
+ source_class: methodology_authority
30
+ source_owner: nimi_coding_package
31
+ target_ref: .nimi/spec/_meta/nimi-coding-admission-anchor.yaml
32
+ target_class: host_projection_anchor
33
+ target_owner: nimi_host
34
+ allowed_fields: [package_id, package_version, package_truth_root, projection_edges, must_not_override]
35
+ forbidden_promoted_fields: [package_methodology_body, product_rule_body, lifecycle_status, run_ledger, private_evidence]
36
+ drift_check_command: pnpm exec nimicoding validate-projection-edges --profile nimi
37
+ failure_disposition: fail_closed
38
+ - edge_id: nimi_coding_package_to_managed_projection
39
+ edge_kind: package_to_managed_projection
40
+ source_ref: package://@nimiplatform/nimi-coding/{config,contracts,methodology,spec}/**
41
+ source_class: methodology_authority
42
+ source_owner: nimi_coding_package
43
+ target_ref: .nimi/{config,contracts,methodology}/**
44
+ target_class: nimicoding_managed_projection
45
+ target_owner: nimi_host
46
+ allowed_fields: [projected_package_file_body]
47
+ forbidden_promoted_fields: [product_rule_body, lifecycle_status, run_ledger, private_evidence]
48
+ drift_check_command: pnpm exec nimicoding sync --check
49
+ failure_disposition: fail_closed
50
+ - edge_id: product_authority_to_derived_view
51
+ edge_kind: product_to_derived_view
52
+ source_ref: .nimi/spec/<domain>/kernel/**
53
+ source_class: product_authority
54
+ source_owner: product_domain
55
+ target_ref: stdout_view
56
+ target_class: derived_view
57
+ target_owner: generator
58
+ allowed_fields: [rendered_summary, source_refs, generator_id]
59
+ forbidden_promoted_fields: [product_rule_body_without_source_ref, audit_coverage_status, lifecycle_status]
60
+ drift_check_command: pnpm exec nimicoding generate-spec-derived-docs --profile nimi --check
61
+ failure_disposition: fail_closed
62
+ - edge_id: product_authority_to_support_registry
63
+ edge_kind: product_to_support_registry
64
+ source_ref: .nimi/spec/<domain>/kernel/**
65
+ source_class: product_authority
66
+ source_owner: product_domain
67
+ target_ref: .nimi/spec/<domain>/kernel/tables/*.yaml
68
+ target_class: support_registry
69
+ target_owner: product_domain
70
+ allowed_fields: [registry_id, owner, schema_ref, authority_refs, command_refs, evidence_class]
71
+ forbidden_promoted_fields: [audit_coverage_status, audit_date, lifecycle_status, roadmap_status, run_ledger]
72
+ drift_check_command: pnpm exec nimicoding validate-table-family --profile nimi
73
+ failure_disposition: fail_closed
74
+ - edge_id: authority_to_local_audit_evidence
75
+ edge_kind: authority_to_audit_evidence
76
+ source_ref: .nimi/spec/<domain>/kernel/**
77
+ source_class: product_authority
78
+ source_owner: product_domain
79
+ target_ref: .nimi/local/audit/**
80
+ target_class: audit_evidence_state
81
+ target_owner: audit_workflow
82
+ allowed_fields: [authority_refs, evidence_refs, finding_refs, coverage_scope, audit_validity]
83
+ forbidden_promoted_fields: [product_rule_body, package_methodology_body]
84
+ drift_check_command: pnpm exec nimicoding validate-placement --profile nimi
85
+ failure_disposition: fail_closed
86
+ - edge_id: topic_to_local_lifecycle_state
87
+ edge_kind: topic_to_local_state
88
+ source_ref: .nimi/topics/**
89
+ source_class: lifecycle_progress_state
90
+ source_owner: topic_lifecycle
91
+ target_ref: .nimi/local/state/**
92
+ target_class: lifecycle_progress_state
93
+ target_owner: execution_workflow
94
+ allowed_fields: [topic_id, wave_id, status, packet_ref, result_ref, closeout_ref]
95
+ forbidden_promoted_fields: [product_rule_body, package_methodology_body, private_evidence]
96
+ drift_check_command: pnpm exec nimicoding topic validate --profile nimi
97
+ failure_disposition: fail_closed
98
+ edge_kind_enum:
99
+ - package_to_host_anchor
100
+ - package_to_managed_projection
101
+ - product_to_derived_view
102
+ - product_to_support_registry
103
+ - authority_to_audit_evidence
104
+ - topic_to_local_state
105
+ failure_disposition_enum:
106
+ - fail_closed
107
+ - block
108
+ allowed_target_classes:
109
+ - host_projection_anchor
110
+ - nimicoding_managed_projection
111
+ - derived_view
112
+ - support_registry
113
+ - audit_evidence_state
114
+ - lifecycle_progress_state
115
+ forbidden_promoted_fields_catalog:
116
+ - package_methodology_body
117
+ - product_rule_body
118
+ - generated_rendered_body
119
+ - audit_coverage_status
120
+ - audit_date
121
+ - lifecycle_status
122
+ - roadmap_status
123
+ - run_ledger
124
+ - private_evidence
125
+ semantic_constraints:
126
+ - host_projection_anchor_must_not_copy_package_methodology_body
127
+ - nimicoding_managed_projection_is_project_local_cli_projection_not_product_authority
128
+ - derived_view_projection_must_be_reproducible
129
+ - audit_evidence_may_cite_authority_but_never_override_it
130
+ - missing_projection_edge_is_a_validation_failure
@@ -0,0 +1,68 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.spec-surface-shared-enums.v1
4
+ owner: nimi-coding
5
+ surface_class_enum:
6
+ - product_authority
7
+ - product_authority_table
8
+ - product_admission_registry
9
+ - thin_guidance
10
+ - derived_view
11
+ - spec_generation_state
12
+ - audit_evidence_state
13
+ - operational_local_artifact
14
+ - methodology_authority
15
+ - nimicoding_managed_projection
16
+ - host_projection_anchor
17
+ - candidate_roadmap
18
+ - support_registry
19
+ - lifecycle_progress_state
20
+ authority_rank_enum:
21
+ - active_product_canonical
22
+ - package_canonical
23
+ - package_projection_support
24
+ - support_only
25
+ - guidance_only
26
+ - derived_non_authority
27
+ - evidence_only
28
+ - lifecycle_state
29
+ - operational_local
30
+ - candidate_only
31
+ tracking_policy_enum:
32
+ - tracked_required
33
+ - tracked_forbidden
34
+ - local_only
35
+ - tracked_only_with_explicit_admission
36
+ mutability_enum:
37
+ - human_admitted
38
+ - package_admitted
39
+ - package_projected
40
+ - generated_reproducible
41
+ - operational_snapshot
42
+ - disposable
43
+ disposition_enum:
44
+ - keep
45
+ - move_package
46
+ - move_local
47
+ - split
48
+ - rewrite
49
+ - delete
50
+ - block
51
+ confirmation_reason_enum:
52
+ - none
53
+ - product_semantic_fork
54
+ - owner_ambiguity
55
+ - package_boundary_ambiguity
56
+ - destructive_deletion
57
+ artifact_class_enum:
58
+ - derived_manifest
59
+ - derived_summary
60
+ - state_manifest
61
+ - audit_index
62
+ - audit_summary
63
+ - roadmap_index
64
+ - roadmap_summary
65
+ semantic_constraints:
66
+ - all_contracts_must_use_underscore_enum_values
67
+ - hyphenated_dispositions_are_forbidden
68
+ - missing_enum_ref_fails_contract_validation
@@ -1,16 +1,27 @@
1
- version: 1
1
+ version: 2
2
2
  audit_contract:
3
3
  id: canonical_spec_generation_audit
4
- target_ref: .nimi/spec/_meta/spec-generation-audit.yaml
4
+ owner: nimi-coding
5
+ target_ref: .nimi/local/state/spec-generation/spec-generation-audit.yaml
6
+ output_class: spec_generation_state
5
7
  required_top_level_fields:
6
8
  - generation_mode
7
9
  - canonical_target_root
8
10
  - declared_profile
9
11
  - input_roots
12
+ - placement_report_ref
10
13
  - files
14
+ optional_top_level_fields:
15
+ - file_entry_refs
16
+ file_entry_ref_contract:
17
+ shard_root: .nimi/local/state/spec-generation/spec-generation-audit
18
+ shard_payload_field: spec_generation_audit_file_entries
19
+ required_shard_fields:
20
+ - parent_ref
21
+ - files
11
22
  required_file_entry_fields:
12
23
  - canonical_path
13
- - file_class
24
+ - surface_class
14
25
  - source_refs
15
26
  - source_basis
16
27
  - coverage_status
@@ -25,7 +36,11 @@ coverage_status_enum:
25
36
  - placeholder_not_allowed
26
37
  hard_constraints:
27
38
  - every_generated_canonical_file_requires_a_matching_audit_entry
39
+ - file_entry_refs_must_stay_under_local_spec_generation_state_root
40
+ - file_entry_ref_shards_must_point_back_to_parent_audit
28
41
  - required_canonical_files_must_not_be_placeholder_not_allowed
29
42
  - unresolved_or_inferred_content_must_be_explicit
30
- - source_refs_must_stay_within_declared_inputs_or_optional_benchmark_root
43
+ - source_refs_must_stay_within_class_filtered_declared_inputs
31
44
  - no_empty_success_looking_audit_entries
45
+ - generation_audit_must_not_be_written_under_.nimi/spec
46
+ - generation_audit_must_not_be_used_as_product_authority
@@ -1,39 +1,140 @@
1
- version: 1
1
+ version: 2
2
2
  input_contract:
3
3
  id: canonical_spec_generation_inputs
4
- target_root: .nimi/spec
5
- mode_enum:
6
- - mixed
7
- benchmark_mode_enum:
8
- - none
9
- - repo_spec_blueprint
10
- - custom_blueprint
11
- acceptance_mode_enum:
12
- - canonical_tree_validity_without_blueprint
13
- - semantic_and_structural_parity_when_blueprint_exists
4
+ owner: nimi-coding
5
+ replaces_version: 1
6
+ purpose: Replace blanket docs_roots ingestion with class-filtered generation inputs.
14
7
  required_fields:
15
8
  - mode
16
9
  - canonical_target_root
17
- - code_roots
18
- - docs_roots
19
- - structure_roots
20
- - human_note_paths
21
- - benchmark_blueprint_root
22
- - benchmark_mode
23
- - acceptance_mode
10
+ - code_inputs
11
+ - docs_inputs
12
+ - structure_inputs
13
+ - topic_inputs
14
+ - local_inputs
15
+ - forbidden_source_classes
24
16
  - generation_order
25
17
  - inference_rules
18
+ - acceptance_mode
19
+ document_instance:
20
+ mode: class_filtered
21
+ canonical_target_root: .nimi/spec
22
+ code_inputs: []
23
+ docs_inputs:
24
+ - root: .nimi/spec
25
+ class_filter: product_authority_only
26
+ allowed_surface_classes: [product_authority, product_authority_table, product_admission_registry, thin_guidance, host_projection_anchor, support_registry]
27
+ forbidden_surface_classes: [derived_view, spec_generation_state, audit_evidence_state, operational_local_artifact, nimicoding_managed_projection, candidate_roadmap, lifecycle_progress_state, methodology_authority]
28
+ owner: nimi_host
29
+ use_as_authority: true
30
+ projection_edge_ref: null
31
+ structure_inputs: []
32
+ topic_inputs:
33
+ - root: .nimi/topics
34
+ owner: topic_lifecycle
35
+ allowed_surface_classes: [lifecycle_progress_state, candidate_roadmap]
36
+ use_as_authority: false
37
+ local_inputs:
38
+ - root: .nimi/local
39
+ owner: local_execution
40
+ allowed_surface_classes: [spec_generation_state, audit_evidence_state, operational_local_artifact, lifecycle_progress_state]
41
+ use_as_authority: false
42
+ forbidden_source_classes:
43
+ - derived_view
44
+ - spec_generation_state
45
+ - audit_evidence_state
46
+ - operational_local_artifact
47
+ - nimicoding_managed_projection
48
+ - candidate_roadmap
49
+ - lifecycle_progress_state
50
+ generation_order: [classify_inputs, validate_placement, product_authority, product_authority_tables, thin_guides, derived_views, generation_audit]
51
+ inference_rules: [no_blanket_docs_roots, no_generated_as_authority, no_derived_views_written_to_local, no_audit_or_lifecycle_state_as_authority]
52
+ acceptance_mode: placement_validity_before_generation
53
+ docs_input_required_fields:
54
+ - root
55
+ - class_filter
56
+ - allowed_surface_classes
57
+ - forbidden_surface_classes
58
+ - owner
59
+ - use_as_authority
60
+ - projection_edge_ref
61
+ shared_enum_ref: shared-enums.yaml
62
+ generic_input_required_fields:
63
+ - root
64
+ - owner
65
+ - allowed_surface_classes
66
+ - forbidden_surface_classes
67
+ - use_as_authority
68
+ code_input_required_fields:
69
+ - root
70
+ - owner
71
+ - projection_edge_ref
72
+ structure_input_required_fields:
73
+ - root
74
+ - owner
75
+ - allowed_surface_classes
76
+ topic_input_required_fields:
77
+ - root
78
+ - owner
79
+ - allowed_surface_classes
80
+ - use_as_authority
81
+ local_input_required_fields:
82
+ - root
83
+ - owner
84
+ - allowed_surface_classes
85
+ - use_as_authority
86
+ input_item_schemas:
87
+ code_inputs: code_input_required_fields
88
+ docs_inputs: docs_input_required_fields
89
+ structure_inputs: structure_input_required_fields
90
+ topic_inputs: topic_input_required_fields
91
+ local_inputs: local_input_required_fields
92
+ baseline_inputs:
93
+ docs_inputs:
94
+ - root: .nimi/spec
95
+ class_filter: product_authority_only
96
+ allowed_surface_classes: [product_authority, product_authority_table, product_admission_registry, thin_guidance, host_projection_anchor, support_registry]
97
+ forbidden_surface_classes: [derived_view, spec_generation_state, audit_evidence_state, operational_local_artifact, nimicoding_managed_projection, candidate_roadmap, lifecycle_progress_state, methodology_authority]
98
+ owner: nimi_host
99
+ use_as_authority: true
100
+ projection_edge_ref: null
101
+ topic_inputs:
102
+ - root: .nimi/topics
103
+ owner: topic_lifecycle
104
+ allowed_surface_classes: [lifecycle_progress_state, candidate_roadmap]
105
+ use_as_authority: false
106
+ local_inputs:
107
+ - root: .nimi/local
108
+ owner: local_execution
109
+ allowed_surface_classes: [spec_generation_state, audit_evidence_state, operational_local_artifact, lifecycle_progress_state]
110
+ use_as_authority: false
111
+ mode_enum:
112
+ - class_filtered
113
+ acceptance_mode_enum:
114
+ - placement_validity_before_generation
115
+ - semantic_and_structural_parity_when_blueprint_exists
26
116
  generation_order_enum:
27
- - index
28
- - kernel_markdown
29
- - kernel_tables
30
- - generated_views
117
+ - classify_inputs
118
+ - validate_placement
119
+ - product_authority
120
+ - product_authority_tables
31
121
  - thin_guides
122
+ - derived_views
123
+ - generation_audit
124
+ forbidden_source_classes:
125
+ - derived_view
126
+ - spec_generation_state
127
+ - audit_evidence_state
128
+ - operational_local_artifact
129
+ - nimicoding_managed_projection
130
+ - candidate_roadmap
131
+ - lifecycle_progress_state
32
132
  hard_constraints:
33
- - canonical_target_root_must_be_.nimi/spec
34
- - benchmark_blueprint_root_is_optional
35
- - benchmark_blueprint_root_must_not_be_required_for_ordinary_projects
36
- - mixed_inputs_may_include_code_docs_structure_and_human_notes
37
- - kernel_markdown_and_kernel_tables_take_priority_over_generated_views_and_guides
38
- - local_report_markdown_paths_must_use_topic_lifecycle_shape
39
- - human_authored_topic_reports_must_use_.nimi/topics_as_canonical_root
133
+ - docs_roots_blanket_ingestion_is_forbidden
134
+ - canonical_target_root_must_be_.nimi/spec_for_product_authority_outputs_only
135
+ - each_input_file_must_have_an_accepted_surface_class_before_render
136
+ - generated_views_must_not_be_used_as_authority_inputs
137
+ - generated_views_must_render_to_stdout_only
138
+ - audit_state_and_lifecycle_state_must_not_be_used_as_product_authority_inputs
139
+ - nimicoding_managed_projections_may_be_read_as_project_context_but_not_as_product_authority_inputs
140
+ - generation_audit_outputs_must_default_to_.nimi/local/state/spec-generation
@@ -1,9 +1,11 @@
1
- version: 1
1
+ version: 2
2
2
  result_contract:
3
3
  id: delegated_spec_reconstruction_result
4
+ owner: nimi-coding
4
5
  summary_required_fields:
5
6
  - generated_paths
6
7
  - audit_ref
8
+ - placement_report_ref
7
9
  - coverage_summary
8
10
  - unresolved_file_count
9
11
  - inferred_file_count
@@ -15,17 +17,18 @@ summary_status_enum:
15
17
  - partial
16
18
  - blocked
17
19
  canonical_tree_completion:
18
- profile_ref: .nimi/spec/_meta/spec-tree-model.yaml
20
+ profile_ref: .nimi/contracts/surface-taxonomy.schema.yaml
19
21
  generation_inputs_ref: .nimi/config/spec-generation-inputs.yaml
20
22
  audit_contract_ref: .nimi/contracts/spec-generation-audit.schema.yaml
21
- audit_ref: .nimi/spec/_meta/spec-generation-audit.yaml
23
+ audit_ref: .nimi/local/state/spec-generation/spec-generation-audit.yaml
22
24
  required_tree_state: canonical_tree_ready
23
25
  required_files_valid: true
24
26
  completion_requirements:
25
27
  - canonical_tree_ready
26
28
  - declared_profile_required_files_valid
27
- - declared_file_class_constraints_valid
28
- - spec_generation_audit_present_and_valid
29
+ - declared_surface_class_constraints_valid
30
+ - placement_report_present_and_valid
31
+ - spec_generation_audit_present_and_valid_as_local_state
29
32
  - required_canonical_files_have_matching_audit_entries
30
33
  - unresolved_gaps_must_remain_explicit
31
34
  - blocked_must_be_reported_by_the_external_host
@@ -33,5 +36,6 @@ completion_requirements:
33
36
  locality: local_only
34
37
  semantic_constraints:
35
38
  - do_not_promote_closeout_summary_to_project_truth
39
+ - do_not_promote_generation_audit_to_product_truth
36
40
  - treat_declared_blueprint_as_benchmark_only_not_canonical_output_root
37
41
  - completed_reconstruction_means_reconstructed_or_partial_only
@@ -0,0 +1,201 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.surface-taxonomy.v1
4
+ owner: nimi-coding
5
+ purpose: Define every spec surface class before placement validation or migration.
6
+ required_top_level_fields:
7
+ - version
8
+ - taxonomy
9
+ - class_enum
10
+ - authority_rank_enum
11
+ - tracking_policy_enum
12
+ - mutability_enum
13
+ - semantic_constraints
14
+ class_required_fields:
15
+ - class_id
16
+ - owner_kind
17
+ - authority_rank
18
+ - allowed_roots
19
+ - tracking_policy
20
+ - mutability
21
+ - reference_rules
22
+ - promotion_rules
23
+ - fail_closed_cases
24
+ shared_enum_ref: shared-enums.yaml
25
+ taxonomy:
26
+ - class_id: product_authority
27
+ owner_kind: product_domain
28
+ authority_rank: active_product_canonical
29
+ allowed_roots: [".nimi/spec/<domain>/kernel/*.md"]
30
+ tracking_policy: tracked_required
31
+ mutability: human_admitted
32
+ reference_rules: [may_reference_product_authority_table, may_reference_thin_guidance, may_reference_minimal_host_projection_anchor]
33
+ promotion_rules: [only_admitted_topic_wave_may_change_product_authority]
34
+ fail_closed_cases: [contains_lifecycle_status, contains_audit_coverage, contains_package_methodology_body]
35
+ - class_id: product_authority_table
36
+ owner_kind: product_domain
37
+ authority_rank: active_product_canonical
38
+ allowed_roots: [".nimi/spec/<domain>/kernel/tables/*.yaml"]
39
+ tracking_policy: tracked_required
40
+ mutability: human_admitted
41
+ reference_rules: [must_declare_table_family, may_reference_product_authority]
42
+ promotion_rules: [table_family_must_be_product_authority_family]
43
+ fail_closed_cases: [missing_table_family, contains_status_or_coverage_fields, unknown_table_family]
44
+ - class_id: product_admission_registry
45
+ owner_kind: product_governance
46
+ authority_rank: support_only
47
+ allowed_roots: [".nimi/spec/high-risk-admissions.yaml"]
48
+ tracking_policy: tracked_required
49
+ mutability: human_admitted
50
+ reference_rules: [may_reference_topic_packets, must_use_packaged_schema, must_not_copy_package_mechanics]
51
+ promotion_rules: [only_explicit_manager_owned_decision_may_append_rows]
52
+ fail_closed_cases: [contains_package_methodology_body, contains_operational_runtime_state, missing_packaged_schema_ref]
53
+ - class_id: thin_guidance
54
+ owner_kind: product_domain
55
+ authority_rank: guidance_only
56
+ allowed_roots: [".nimi/spec/<domain>/*.md", ".nimi/spec/INDEX.md"]
57
+ tracking_policy: tracked_required
58
+ mutability: human_admitted
59
+ reference_rules: [may_reference_product_authority, must_not_define_rule_body]
60
+ promotion_rules: [normative_content_must_move_to_product_authority]
61
+ fail_closed_cases: [contains_must_rule_body, defines_new_rule_id, defines_acceptance_gate]
62
+ - class_id: derived_view
63
+ owner_kind: generator
64
+ authority_rank: derived_non_authority
65
+ allowed_roots: ["stdout_view"]
66
+ tracking_policy: untracked_stdout_only
67
+ mutability: generated_reproducible
68
+ reference_rules: [may_reference_declared_inputs, must_not_be_referenced_as_authority]
69
+ promotion_rules: [never_promote_derived_output]
70
+ fail_closed_cases: [referenced_as_authority, stored_under_product_authority_root, written_to_local_derived]
71
+ - class_id: spec_generation_state
72
+ owner_kind: spec_generator
73
+ authority_rank: lifecycle_state
74
+ allowed_roots: [".nimi/local/state/spec-generation/**"]
75
+ tracking_policy: local_only
76
+ mutability: operational_snapshot
77
+ reference_rules: [may_cite_inputs_and_generation_command]
78
+ promotion_rules: [never_promote_generation_state]
79
+ fail_closed_cases: [stored_under_.nimi/spec_meta, used_as_product_authority_input]
80
+ - class_id: audit_evidence_state
81
+ owner_kind: audit_workflow
82
+ authority_rank: evidence_only
83
+ allowed_roots: [".nimi/local/audit/**"]
84
+ tracking_policy: local_only
85
+ mutability: operational_snapshot
86
+ reference_rules: [may_cite_authority_refs, must_not_override_authority]
87
+ promotion_rules: [may_justify_change_packet_only]
88
+ fail_closed_cases: [stored_under_product_authority_root, contains_private_material_in_tracked_root]
89
+ - class_id: operational_local_artifact
90
+ owner_kind: host_adapter
91
+ authority_rank: operational_local
92
+ allowed_roots: [".nimi/local/**"]
93
+ tracking_policy: local_only
94
+ mutability: disposable
95
+ reference_rules: [may_be_cited_as_evidence]
96
+ promotion_rules: [never_promote_operational_artifact]
97
+ fail_closed_cases: [stored_under_.nimi/spec]
98
+ - class_id: methodology_authority
99
+ owner_kind: nimi_coding_package
100
+ authority_rank: package_canonical
101
+ allowed_roots: ["package://@nimiplatform/nimi-coding/{spec,methodology,contracts,config}/**"]
102
+ tracking_policy: tracked_required
103
+ mutability: package_admitted
104
+ reference_rules: [may_project_through_declared_projection_edge]
105
+ promotion_rules: [may_be_consumed_by_host_anchor_only]
106
+ fail_closed_cases: [copied_to_host_product_authority, stranded_in_host_spec]
107
+ - class_id: nimicoding_managed_projection
108
+ owner_kind: nimi_coding_package_projection
109
+ authority_rank: package_projection_support
110
+ allowed_roots: [".nimi/methodology/**", ".nimi/contracts/**", ".nimi/config/**"]
111
+ tracking_policy: tracked_required
112
+ mutability: package_projected
113
+ reference_rules: [may_be_read_as_project_local_nimicoding_context, must_not_override_product_authority]
114
+ promotion_rules: [created_or_refreshed_only_by_nimicoding_init_or_sync]
115
+ fail_closed_cases: [copied_to_host_product_authority, promoted_to_product_spec, drift_without_sync_policy]
116
+ - class_id: host_projection_anchor
117
+ owner_kind: host_projection
118
+ authority_rank: support_only
119
+ allowed_roots: [".nimi/spec/_meta/<package>-admission-anchor.yaml", ".nimi/config/host-overlay.yaml"]
120
+ tracking_policy: tracked_only_with_explicit_admission
121
+ mutability: human_admitted
122
+ reference_rules: [may_point_to_methodology_authority, must_be_minimal]
123
+ promotion_rules: [never_promote_to_product_authority]
124
+ fail_closed_cases: [contains_package_methodology_body, contains_lifecycle_status]
125
+ - class_id: candidate_roadmap
126
+ owner_kind: planning_owner
127
+ authority_rank: candidate_only
128
+ allowed_roots: [".nimi/topics/**"]
129
+ tracking_policy: local_only
130
+ mutability: human_admitted
131
+ reference_rules: [may_cite_product_authority, must_not_authorize_implementation]
132
+ promotion_rules: [must_move_to_product_authority_through_admitted_wave]
133
+ fail_closed_cases: [stored_under_.nimi/spec, referenced_as_active_authority]
134
+ - class_id: support_registry
135
+ owner_kind: package_or_product_owner
136
+ authority_rank: support_only
137
+ allowed_roots: ["package://@nimiplatform/nimi-coding/{config,contracts,spec}/**", ".nimi/spec/<domain>/kernel/tables/*.yaml"]
138
+ tracking_policy: tracked_only_with_explicit_admission
139
+ mutability: human_admitted
140
+ reference_rules: [may_register_evidence_commands, may_reference_product_authority]
141
+ promotion_rules: [semantic_rows_move_to_product_authority]
142
+ fail_closed_cases: [contains_status_field, contains_coverage_field, contains_audit_date, contains_progress_field]
143
+ - class_id: lifecycle_progress_state
144
+ owner_kind: topic_or_execution_workflow
145
+ authority_rank: lifecycle_state
146
+ allowed_roots: [".nimi/topics/**", ".nimi/local/state/**"]
147
+ tracking_policy: local_only
148
+ mutability: operational_snapshot
149
+ reference_rules: [may_cite_topic_packets_and_results]
150
+ promotion_rules: [never_promote_lifecycle_state]
151
+ fail_closed_cases: [stored_under_.nimi/spec, used_as_product_authority]
152
+ class_enum:
153
+ - product_authority
154
+ - product_authority_table
155
+ - product_admission_registry
156
+ - thin_guidance
157
+ - derived_view
158
+ - spec_generation_state
159
+ - audit_evidence_state
160
+ - operational_local_artifact
161
+ - methodology_authority
162
+ - nimicoding_managed_projection
163
+ - host_projection_anchor
164
+ - candidate_roadmap
165
+ - support_registry
166
+ - lifecycle_progress_state
167
+ authority_rank_enum:
168
+ - active_product_canonical
169
+ - package_canonical
170
+ - package_projection_support
171
+ - support_only
172
+ - guidance_only
173
+ - derived_non_authority
174
+ - evidence_only
175
+ - lifecycle_state
176
+ - operational_local
177
+ - candidate_only
178
+ tracking_policy_enum:
179
+ - tracked_required
180
+ - tracked_forbidden
181
+ - local_only
182
+ - tracked_only_with_explicit_admission
183
+ mutability_enum:
184
+ - human_admitted
185
+ - package_admitted
186
+ - package_projected
187
+ - generated_reproducible
188
+ - operational_snapshot
189
+ - disposable
190
+ semantic_constraints:
191
+ - every_candidate_file_gets_exactly_one_surface_class
192
+ - unclassified_files_fail_closed
193
+ - product_authority_classes_must_not_contain_lifecycle_state_or_audit_coverage
194
+ - product_admission_registry_may_store_compact_semantic_admissions_but_not_package_mechanics
195
+ - generated_and_derived_classes_are_never_authority
196
+ - package_methodology_and_package_spec_remain_package_owned
197
+ - nimicoding_managed_projection_may_exist_in_host_project_but_is_not_product_authority
198
+ - host_projection_anchor_must_be_minimal_and_must_not_copy_package_body
199
+ - support_registry_must_not_store_run_or_coverage_status
200
+ - candidate_roadmap_must_not_live_under_.nimi/spec
201
+ - tracked_non_product_outputs_require_tracked_output_admission