@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,349 @@
1
+ version: 2
2
+ result_contract:
3
+ id: sweep_design_result
4
+ status: active_contract
5
+ canonical_entrypoint: "nimicoding sweep design"
6
+ owner: nimicoding/sweep-design
7
+ artifact_root: ".nimi/local/sweep-design/<run-id>/"
8
+ source_inputs:
9
+ - ".nimi/local/audit/evidence/<sweep-id>/findings.yaml"
10
+ source_findings_policy: read_only_never_update_from_sweep_design
11
+ source_input_policy:
12
+ - source_audit_findings_are_read_only
13
+ - source_findings_sha256_must_be_recorded_at_intake
14
+ - design_state_is_written_only_to_sweep_design_derived_artifacts
15
+
16
+ canonical_runtime_phases:
17
+ - intake
18
+ - packet-build
19
+ - packet-build-batch
20
+ - auditor-prompt
21
+ - result-ingest
22
+ - ledger-validate
23
+ - finalize
24
+ - wave-plan
25
+
26
+ retired_runtime_phases:
27
+ - confirm
28
+ - cluster
29
+ - fork-review
30
+ - plan
31
+ - preflight
32
+ - synthesize
33
+ - decide
34
+ - extra-audit
35
+
36
+ artifact_kinds:
37
+ - name: inventory
38
+ kind: sweep-design-inventory
39
+ required_fields:
40
+ - run_id
41
+ - source_audit_sweep_id
42
+ - source_findings_ref
43
+ - source_findings_sha256
44
+ - source_findings_mutation_policy
45
+ - findings
46
+ - name: design_auditor_packet
47
+ kind: sweep-design-design-auditor-packet
48
+ required_fields:
49
+ - run_id
50
+ - packet_id
51
+ - source_audit_sweep_id
52
+ - included_finding_ids
53
+ - source_finding_refs
54
+ - related_finding_refs
55
+ - related_code_refs
56
+ - authority_refs
57
+ - prior_design_state_refs
58
+ - prior_design_state_marker
59
+ - revision_ledger_refs
60
+ - current_cluster_refs
61
+ - current_wave_refs
62
+ - explicit_questions
63
+ - expected_result_shape_ref
64
+ - evidence_gap_policy
65
+ - stop_conditions
66
+ - name: design_auditor_result
67
+ kind: sweep-design-design-auditor-result
68
+ required_fields:
69
+ - run_id
70
+ - packet_id
71
+ - result_id
72
+ - auditor
73
+ - auditor_family
74
+ - auditor_mode
75
+ - auditor_result_origin
76
+ - methodology_ref
77
+ - packet_ref
78
+ - session_ref
79
+ - transcript_ref
80
+ - llm_session_ref
81
+ - llm_transcript_ref
82
+ - llm_prompt_ref
83
+ - result_schema_version
84
+ - provenance
85
+ - evidence_read
86
+ - finding_outcomes
87
+ - cluster_changes
88
+ - wave_changes
89
+ - revision_entries
90
+ - human_decision_requests
91
+ - extra_audit_requests
92
+ - validation_recommendations
93
+ - closeout_recommendations
94
+ - rejection_status
95
+ - name: revision_ledger
96
+ kind: sweep-design-revision-ledger
97
+ required_fields:
98
+ - run_id
99
+ - ledger_id
100
+ - append_only
101
+ - entries
102
+ - ledger_snapshot_hash
103
+ - entries_root_hash
104
+ - previous_ledger_snapshot_hash
105
+ - name: revision_entry
106
+ kind: sweep-design-revision-entry
107
+ required_fields:
108
+ - revision_entry_id
109
+ - entry_index
110
+ - revision_type
111
+ - created_at
112
+ - previous_entry_hash
113
+ - entry_hash
114
+ - previous_artifact_refs
115
+ - replacement_artifact_refs
116
+ - affected_finding_ids
117
+ - affected_cluster_ids
118
+ - affected_wave_ids
119
+ - reason_code
120
+ - evidence_refs
121
+ - auditor_provenance
122
+ - human_gate_status
123
+ - projection_refs_changed
124
+ - name: decision_queue
125
+ kind: sweep-design-decision-queue
126
+ - name: auditor_prompt
127
+ kind: sweep-design-auditor-prompt
128
+ required_fields:
129
+ - run_id
130
+ - packet_id
131
+ - packet_ref
132
+ - expected_result_shape_ref
133
+ - required_result_origin
134
+ - synthetic_result_policy
135
+ - required_llm_provenance_fields
136
+ - task
137
+ - name: batch_manifest
138
+ kind: sweep-design-batch-manifest
139
+ required_fields:
140
+ - run_id
141
+ - manifest_id
142
+ - source_inventory_ref
143
+ - source_findings_ref
144
+ - source_findings_sha256
145
+ - batch_size
146
+ - packet_count
147
+ - packets
148
+ - generated_artifact_policy
149
+ - name: final_state_report
150
+ kind: sweep-design-final-state-report
151
+ - name: wave_plan
152
+ kind: sweep-design-wave-plan
153
+
154
+ prior_design_state_marker_enum:
155
+ - empty
156
+ - present
157
+ - partial
158
+ - superseded_by_later_audit
159
+ - evidence_gap
160
+
161
+ auditor_family_enum:
162
+ - anthropic_claude
163
+ - openai_gpt
164
+ - openai_codex
165
+ - google_gemini
166
+ - xai_grok
167
+ - meta_llama
168
+ - mistral
169
+ - other
170
+
171
+ auditor_mode_enum:
172
+ - focused
173
+ - all
174
+ - degraded
175
+
176
+ auditor_result_origin_enum:
177
+ - llm_session
178
+ - external_llm_session
179
+ - synthetic_trial
180
+ llm_closeout_policy:
181
+ closeout_eligible_origins:
182
+ - llm_session
183
+ - external_llm_session
184
+ synthetic_trial_policy: allowed_only_with_explicit_flag_for_load_tests
185
+ synthetic_trial_must_not_satisfy_true_llm_closeout: true
186
+ llm_origins_require_fields:
187
+ - llm_session_ref
188
+ - llm_transcript_ref
189
+ - llm_prompt_ref
190
+
191
+ revision_type_enum:
192
+ - finding_state_revision
193
+ - duplicate_judgement
194
+ - superseded_judgement
195
+ - cluster_create
196
+ - cluster_merge
197
+ - cluster_split
198
+ - cluster_retire
199
+ - cluster_reopen
200
+ - finding_move
201
+ - wave_create
202
+ - wave_merge
203
+ - wave_split
204
+ - wave_retract
205
+ - wave_demote
206
+ - wave_block
207
+ - wave_implementation_ready
208
+ - wave_dependency_rewrite
209
+ - wave_validation_or_closeout_strengthening
210
+ - decision_packet_create
211
+ - extra_audit_request_create
212
+ - extra_audit_request_close
213
+ - human_decision_request_create
214
+ - human_decision_request_resolve
215
+ - final_state_projection_update
216
+ - user_decision_queue_rewrite
217
+
218
+ finding_lifecycle_states:
219
+ - raw
220
+ - confirmed
221
+ - needs_design
222
+ - duplicate
223
+ - superseded
224
+ - false_positive
225
+ - needs_more_audit
226
+ - needs_user_decision
227
+ - needs_authority_alignment
228
+ - ready_for_implementation_wave
229
+ - blocked
230
+ transient_states:
231
+ - raw
232
+ - confirmed
233
+ - needs_design
234
+ final_outcome_states:
235
+ - duplicate
236
+ - superseded
237
+ - false_positive
238
+ - needs_more_audit
239
+ - needs_user_decision
240
+ - needs_authority_alignment
241
+ - ready_for_implementation_wave
242
+ - blocked
243
+
244
+ packet_input_floor:
245
+ source_finding_refs_min: 1
246
+ related_code_refs_min_unless:
247
+ authority_only_packet: 1
248
+ authority_refs_min_when:
249
+ authority_bearing_finding: 1
250
+ related_finding_refs_min_when_available: 3
251
+ prior_design_state_marker_required: true
252
+ prior_design_state_refs_empty_allowed_only_when_marker_empty: true
253
+ evidence_gap_result_required_when_any_material_input_missing: true
254
+
255
+ required_final_outcome_provenance:
256
+ applies_to:
257
+ - ready_for_implementation_wave
258
+ - needs_user_decision
259
+ - needs_more_audit
260
+ - needs_authority_alignment
261
+ - blocked
262
+ - duplicate
263
+ - superseded
264
+ - false_positive
265
+ required_refs:
266
+ - design_auditor_packet_ref
267
+ - design_auditor_result_ref
268
+ - revision_ledger_entry_refs
269
+ - related_finding_ids_considered
270
+ - code_refs_considered
271
+ - authority_refs_considered
272
+ terminal_extra_requirements:
273
+ duplicate:
274
+ - canonical_finding_or_cluster_ref
275
+ superseded:
276
+ - superseding_finding_or_cluster_ref
277
+ false_positive:
278
+ - human_gate_ref
279
+ non_terminal_extra_requirements:
280
+ ready_for_implementation_wave:
281
+ - wave_id_ref
282
+ - preflight_ref
283
+ - validation_command_refs
284
+ - closeout_criteria_ref
285
+ needs_user_decision:
286
+ - decision_queue_item_ref
287
+ - decision_packet_ref
288
+ - recommended_decision
289
+ - queue_status
290
+ - blocked_downstream_wave_refs
291
+ needs_more_audit:
292
+ - extra_audit_request_ref
293
+ needs_authority_alignment:
294
+ - authority_convergence_ref
295
+ blocked:
296
+ - blocking_cause_refs
297
+ decision_outcome_policy:
298
+ accepted_or_closed_needs_user_decision_requires_human_gate_decision_ref: true
299
+
300
+ required_wave_fields:
301
+ - wave_id
302
+ - scope
303
+ - owner_domain
304
+ - authority_owner
305
+ - dependencies
306
+ - preflight_ref
307
+ - non_goals
308
+ - validation_commands
309
+ - negative_checks
310
+ - drift_resistance_checks
311
+ - closeout_criteria
312
+ - source_design_packet_refs
313
+ - design_auditor_result_refs
314
+ - revision_ledger_entry_refs
315
+ - blocked_gate_refs
316
+ - merged_cluster_ids
317
+ - merged_root_cause_keys
318
+ conditional_wave_fields:
319
+ consolidation_rationale_required_when: included_findings_or_clusters_count > 1
320
+ isolation_justification_required_when: included_findings_or_clusters_count == 1
321
+ not_applicable_value_allowed: "n/a"
322
+ wave_authority_coverage:
323
+ authority_owner_must_cover_source_authority_refs: true
324
+ source_authority_ref_sources:
325
+ - authority_owner
326
+ - authority_refs
327
+ - authority_refs_considered
328
+ - path_like_merged_root_cause_keys
329
+ generated_fix_topic_packets_must_copy_union_to:
330
+ - authority_owner
331
+ - canonical_seams
332
+
333
+ semantic_constraints:
334
+ - llm_auditor_judgement_is_required_for_material_findings
335
+ - deterministic_grouping_must_not_be_final_judgement
336
+ - projection_write_requires_same_ingest_revision_entry
337
+ - revision_ledger_is_append_only_and_hash_chained
338
+ - every_final_outcome_requires_packet_result_and_ledger_provenance
339
+ - raw_confirmed_and_needs_design_are_transient_only
340
+ - implementation_ready_wave_requires_non_empty_validation_commands
341
+ - source_findings_mutation_is_forbidden
342
+
343
+ forbidden_contract_shortcuts:
344
+ - mechanical_classifier_as_final_judgement
345
+ - projection_write_without_revision_entry
346
+ - final_outcome_without_llm_packet_result_refs
347
+ - implementation_ready_wave_with_empty_validation_commands
348
+ - one_finding_per_wave_default_without_isolation_justification
349
+ - source_findings_mutation
@@ -0,0 +1,114 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.table-family.v1
4
+ owner: nimi-coding
5
+ purpose: Require every kernel table to declare an allowed semantic family.
6
+ required_top_level_fields:
7
+ - version
8
+ - table_family_enum
9
+ - table_family_required_fields
10
+ - forbidden_fields_by_authority_class
11
+ - semantic_constraints
12
+ shared_enum_ref: shared-enums.yaml
13
+ table_family_required_fields:
14
+ - table_family
15
+ - owner
16
+ - authority_class
17
+ - row_schema
18
+ - allowed_references
19
+ - forbidden_fields
20
+ table_family_enum:
21
+ - closed_enum
22
+ - state_machine
23
+ - protocol_surface
24
+ - owner_matrix
25
+ - product_catalog
26
+ - support_registry
27
+ authority_class_enum:
28
+ - product_authority_table
29
+ - support_registry
30
+ table_families:
31
+ - table_family: closed_enum
32
+ authority_class: product_authority_table
33
+ required_fields: [table_family, owner, enum_id, values]
34
+ allowed_fields: [description, authority_refs, value, label, semantics]
35
+ forbidden_fields: [done, covered, coverage_status, audit_date, evidence_report, current, proposed, backlog_status, migration_status, mapping_status, run_id, ledger_ref]
36
+ - table_family: state_machine
37
+ authority_class: product_authority_table
38
+ required_fields: [table_family, owner, machine_id, states, transitions]
39
+ allowed_fields: [description, authority_refs, state, transition, from, to, guard]
40
+ forbidden_fields: [done, covered, coverage_status, audit_date, evidence_report, current, proposed, backlog_status, migration_status, mapping_status, run_id, ledger_ref]
41
+ - table_family: protocol_surface
42
+ authority_class: product_authority_table
43
+ required_fields: [table_family, owner, protocol_id, surfaces]
44
+ allowed_fields: [description, authority_refs, event, rpc, field, reason_code]
45
+ forbidden_fields: [done, covered, coverage_status, audit_date, evidence_report, current, proposed, backlog_status, migration_status, mapping_status, run_id, ledger_ref]
46
+ - table_family: owner_matrix
47
+ authority_class: product_authority_table
48
+ required_fields: [table_family, owner, matrix_id, rows]
49
+ allowed_fields: [description, authority_refs, owner, responsibility, boundary]
50
+ forbidden_fields: [done, covered, coverage_status, audit_date, evidence_report, current, proposed, backlog_status, migration_status, mapping_status, run_id, ledger_ref]
51
+ - table_family: product_catalog
52
+ authority_class: product_authority_table
53
+ required_fields: [table_family, owner, catalog_id, entries]
54
+ allowed_fields: [description, authority_refs, id, name, semantics, owner]
55
+ forbidden_fields: [done, covered, coverage_status, audit_date, evidence_report, current, proposed, backlog_status, migration_status, mapping_status, run_id, ledger_ref]
56
+ - table_family: support_registry
57
+ authority_class: support_registry
58
+ required_fields: [table_family, registry_id, owner, schema_ref, allowed_fields, forbidden_state_fields, entries]
59
+ allowed_fields: [authority_refs, command_refs, evidence_class, validation_scope, registry_owner]
60
+ forbidden_fields: [done, covered, coverage_status, audit_date, evidence_report, current, proposed, backlog_status, migration_status, mapping_status, run_id, ledger_ref]
61
+ support_registry_shape:
62
+ required_fields:
63
+ - table_family
64
+ - registry_id
65
+ - owner
66
+ - schema_ref
67
+ - allowed_fields
68
+ - forbidden_state_fields
69
+ forbidden_state_fields:
70
+ - done
71
+ - covered
72
+ - coverage_status
73
+ - audit_date
74
+ - evidence_report
75
+ - current
76
+ - proposed
77
+ - backlog_status
78
+ - migration_status
79
+ - mapping_status
80
+ - run_id
81
+ - ledger_ref
82
+ forbidden_fields_by_authority_class:
83
+ product_authority_table:
84
+ - done
85
+ - covered
86
+ - coverage_status
87
+ - audit_date
88
+ - evidence_report
89
+ - current
90
+ - proposed
91
+ - backlog_status
92
+ - migration_status
93
+ - mapping_status
94
+ - run_id
95
+ - ledger_ref
96
+ support_registry:
97
+ - done
98
+ - covered
99
+ - coverage_status
100
+ - audit_date
101
+ - evidence_report
102
+ - current
103
+ - proposed
104
+ - backlog_status
105
+ - migration_status
106
+ - mapping_status
107
+ - run_id
108
+ - ledger_ref
109
+ semantic_constraints:
110
+ - kernel_tables_path_is_not_authority_without_table_family
111
+ - support_registry_may_register_evidence_commands_but_not_current_coverage
112
+ - lifecycle_state_and_audit_coverage_must_move_local
113
+ - unknown_table_family_fails_closed
114
+ - product_authority_table_rows_must_define_stable_product_facts
@@ -1,6 +1,6 @@
1
1
  id: nimicoding.topic-goal.v1
2
2
  kind: topic-goal-readiness-result
3
- canonical_owner: nimi-coding/contracts/topic-goal.schema.yaml
3
+ canonical_owner: .nimi/contracts/topic-goal.schema.yaml
4
4
  host_projection_ref: .nimi/contracts/topic-goal.schema.yaml
5
5
  projection_rule: host projection must be byte-aligned with this package contract
6
6
  output_contract:
@@ -13,6 +13,7 @@ output_contract:
13
13
  - profile
14
14
  - selected_next_target
15
15
  - selected_wave_id
16
+ - execution_start_wave_id
16
17
  - topic_state_hash
17
18
  - readiness
18
19
  - goal_command
@@ -22,6 +23,7 @@ output_contract:
22
23
  - refusal_reasons
23
24
  nullable:
24
25
  - selected_wave_id
26
+ - execution_start_wave_id
25
27
  - goal_command
26
28
  readiness_check_shape:
27
29
  required:
@@ -76,3 +78,10 @@ rules:
76
78
  - goal_command must be null whenever ok=false
77
79
  - topic-goal output is a projection and must not mutate topic state
78
80
  - host projection drift is a readiness refusal when the host projection exists
81
+ - topic goal is the bridge from accepted topic design into Codex /goal execution ownership
82
+ - topic goal targets topic completion, not selected-wave completion
83
+ - selected_wave_id and execution_start_wave_id are execution cursors only
84
+ - ordinary wave admission, preflight, implementation, validation, result recording, and closeout transitions are non-final
85
+ - /goal may complete only after all waves are terminal and topic true-close/closeout evidence is recorded
86
+ - preflight_admitted is an execution-stage wave state for topic goal because wave preflight is part of execution, not a separate human design phase
87
+ - candidate and preflight_draft wave states may be deterministic topic-runner cursors when selected_next_target is empty and dependencies are terminal
@@ -0,0 +1,70 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.tracked-output-admission.v1
4
+ owner: nimi-coding
5
+ purpose: Define the only allowed path for tracked non-product artifacts.
6
+ required_top_level_fields:
7
+ - version
8
+ - admissions
9
+ - allowed_roots
10
+ - privacy_posture_enum
11
+ - semantic_constraints
12
+ admission_required_fields:
13
+ - artifact_class
14
+ - root
15
+ - owner
16
+ - schema_ref
17
+ - privacy_posture
18
+ - retention
19
+ - regeneration_or_review_command
20
+ - drift_check_command
21
+ - forbidden_fields
22
+ - max_size_policy
23
+ - non_parallel_truth_basis
24
+ shared_enum_ref: shared-enums.yaml
25
+ artifact_class_enum:
26
+ - derived_manifest
27
+ - derived_summary
28
+ - state_manifest
29
+ - audit_index
30
+ - audit_summary
31
+ - roadmap_index
32
+ - roadmap_summary
33
+ admissions: []
34
+ allowed_roots:
35
+ - .nimi/derived/**
36
+ - .nimi/state/**
37
+ - .nimi/audit/**
38
+ - .nimi/roadmap/**
39
+ privacy_posture_enum:
40
+ - non_private
41
+ - redacted
42
+ retention_enum:
43
+ - compact_manifest
44
+ - compact_summary
45
+ - compact_index
46
+ max_size_policy_required_fields:
47
+ - max_files
48
+ - max_bytes_per_file
49
+ - max_rows_per_file
50
+ non_parallel_truth_basis_enum:
51
+ - indexes_authority_refs_without_rule_body
52
+ - summarizes_redacted_evidence_without_raw_payload
53
+ - records_regeneration_metadata_without_generated_body
54
+ - records_product_facing_roadmap_without_implementation_authority
55
+ forbidden_fields:
56
+ - raw_audit_transcript
57
+ - private_prompt
58
+ - private_finding_detail
59
+ - product_rule_body
60
+ - package_methodology_body
61
+ - current_run_ledger
62
+ - raw_evidence_payload
63
+ - personal_or_secret_data
64
+ semantic_constraints:
65
+ - tracked_non_product_roots_are_disabled_without_admission
66
+ - empty_admissions_means_all_tracked_non_product_roots_fail_closed
67
+ - admission_must_prove_artifact_is_compact_non_private_and_non_parallel_truth
68
+ - audit_raw_materials_are_never_tracked_by_this_contract
69
+ - generated_views_must_be_reproducible_if_tracked
70
+ - roadmap_records_must_not_authorize_implementation
@@ -0,0 +1,112 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.workflow-consumer.v1
4
+ owner: nimi-coding
5
+ purpose: Require workflow tools to consume surface classes natively.
6
+ required_top_level_fields:
7
+ - version
8
+ - workflow_consumers
9
+ - semantic_constraints
10
+ workflow_consumer_required_fields:
11
+ - workflow_id
12
+ - package_entrypoint
13
+ - required_inputs
14
+ - required_surface_classes
15
+ - forbidden_surface_classes
16
+ - forbidden_authority_input_classes
17
+ - required_gates
18
+ - output_class
19
+ - fail_closed_cases
20
+ workflow_consumers:
21
+ - workflow_id: topic_runner
22
+ package_entrypoint: nimicoding topic-runner
23
+ required_inputs:
24
+ - placement_report
25
+ - selected_wave
26
+ - packet_ref
27
+ - topic_lifecycle_state
28
+ required_surface_classes:
29
+ - product_authority
30
+ - methodology_authority
31
+ - host_projection_anchor
32
+ forbidden_surface_classes:
33
+ - unclassified
34
+ - derived_view
35
+ - audit_evidence_state
36
+ forbidden_authority_input_classes:
37
+ - lifecycle_progress_state
38
+ required_gates:
39
+ - block_unclassified_authority_changes
40
+ - block_forbidden_root_class_combinations
41
+ - require_human_confirmation_for_product_semantic_fork
42
+ output_class: lifecycle_progress_state
43
+ fail_closed_cases:
44
+ - placement_report_missing
45
+ - authority_update_without_post_update_review
46
+ - workflow_id: audit_sweep
47
+ package_entrypoint: nimicoding sweep audit
48
+ required_inputs:
49
+ - authority_inventory
50
+ - evidence_inventory
51
+ required_surface_classes:
52
+ - product_authority
53
+ - product_authority_table
54
+ - product_admission_registry
55
+ - support_registry
56
+ forbidden_surface_classes:
57
+ - derived_view
58
+ - lifecycle_progress_state
59
+ forbidden_authority_input_classes: []
60
+ required_gates:
61
+ - authority_and_evidence_coverage_separated
62
+ - raw_outputs_local_only
63
+ output_class: audit_evidence_state
64
+ fail_closed_cases:
65
+ - audit_summary_promoted_to_product_truth
66
+ - workflow_id: spec_generation
67
+ package_entrypoint: nimicoding generate-spec-derived-docs
68
+ required_inputs:
69
+ - class_filtered_generation_inputs
70
+ - placement_report
71
+ required_surface_classes:
72
+ - product_authority
73
+ - product_authority_table
74
+ - product_admission_registry
75
+ - thin_guidance
76
+ - methodology_authority
77
+ - host_projection_anchor
78
+ forbidden_surface_classes:
79
+ - audit_evidence_state
80
+ - lifecycle_progress_state
81
+ - spec_generation_state
82
+ - derived_view
83
+ forbidden_authority_input_classes: []
84
+ required_gates:
85
+ - validate_placement_before_render
86
+ - reject_blanket_docs_roots
87
+ - generation_audit_local_state
88
+ output_class: derived_view
89
+ fail_closed_cases:
90
+ - generated_view_used_as_authority
91
+ - workflow_id: closeout
92
+ package_entrypoint: nimicoding topic closeout
93
+ required_inputs:
94
+ - placement_report
95
+ - validation_report
96
+ - result_ref
97
+ required_surface_classes:
98
+ - lifecycle_progress_state
99
+ forbidden_surface_classes:
100
+ - unclassified
101
+ forbidden_authority_input_classes: []
102
+ required_gates:
103
+ - placement_report_pass_required
104
+ - no_unresolved_block_disposition
105
+ output_class: lifecycle_progress_state
106
+ fail_closed_cases:
107
+ - closeout_claims_drift_resistance_with_placement_violations
108
+ semantic_constraints:
109
+ - workflow_must_not_infer_authority_from_path_shape_only
110
+ - workflow_outputs_must_have_declared_surface_class
111
+ - workflow_must_fail_closed_when_placement_report_is_missing
112
+ - workflow_must_not_promote_audit_or_lifecycle_state_to_product_authority
@@ -1,7 +1,7 @@
1
1
  version: 1
2
2
  methodology:
3
3
  id: audit_sweep_p0p1_recall
4
- owner: nimi-coding/audit-sweep
4
+ owner: nimicoding/audit-sweep
5
5
  purpose: Increase critical/high finding recall without turning every sweep into
6
6
  an unbounded full audit.
7
7
  activation_criteria: