@nimiplatform/nimi-coding 0.2.8 → 0.3.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 (205) hide show
  1. package/CHANGELOG.md +8 -92
  2. package/CONTRIBUTING.md +5 -34
  3. package/README.md +47 -350
  4. package/README.zh-CN.md +33 -287
  5. package/cli/commands/start.mjs +48 -688
  6. package/cli/commands/validate-spec-audit.mjs +1 -5
  7. package/cli/constants.mjs +9 -417
  8. package/cli/help.mjs +28 -145
  9. package/cli/index.mjs +5 -33
  10. package/cli/lib/blueprint-audit.mjs +5 -12
  11. package/cli/lib/bootstrap.mjs +0 -9
  12. package/cli/lib/contracts.mjs +0 -163
  13. package/cli/lib/doctor.mjs +155 -10
  14. package/cli/lib/entrypoints.mjs +63 -167
  15. package/cli/lib/internal/contracts-loaders.mjs +0 -85
  16. package/cli/lib/internal/contracts-parse.mjs +84 -520
  17. package/cli/lib/internal/governance/ai/check-agents-freshness.mjs +13 -8
  18. package/cli/lib/internal/surface-taxonomy-validators.mjs +316 -66
  19. package/cli/lib/internal/validators-shared.mjs +0 -16
  20. package/cli/lib/internal/validators-spec-helpers.mjs +7 -140
  21. package/cli/lib/internal/validators-spec.mjs +103 -342
  22. package/cli/lib/shared.mjs +1 -42
  23. package/cli/lib/validators.mjs +0 -48
  24. package/cli/seeds/seed-policy.yaml +0 -3
  25. package/config/bootstrap.yaml +4 -4
  26. package/config/spec-generation-inputs.yaml +6 -12
  27. package/contracts/domain-admission.schema.yaml +3 -3
  28. package/contracts/migration-inventory.schema.yaml +12 -75
  29. package/contracts/negative-fixtures.yaml +19 -99
  30. package/contracts/placement-contract.schema.yaml +49 -78
  31. package/contracts/projection-edge.schema.yaml +37 -121
  32. package/contracts/shared-enums.yaml +4 -8
  33. package/contracts/spec-generation-inputs.schema.yaml +15 -112
  34. package/contracts/spec-layout.schema.yaml +32 -0
  35. package/contracts/surface-taxonomy.schema.yaml +43 -94
  36. package/contracts/table-family.schema.yaml +1 -1
  37. package/contracts/tracked-output-admission.schema.yaml +13 -66
  38. package/methodology/core.yaml +33 -25
  39. package/methodology/four-closure-policy.yaml +18 -26
  40. package/methodology/role-separation-policy.yaml +21 -27
  41. package/methodology/spec-reconstruction.yaml +17 -34
  42. package/package.json +2 -4
  43. package/spec/_meta/spec-tree-model.yaml +5 -101
  44. package/spec/product-scope.yaml +25 -57
  45. package/adapters/README.md +0 -25
  46. package/adapters/claude/README.md +0 -89
  47. package/adapters/claude/profile.yaml +0 -70
  48. package/adapters/codex/README.md +0 -53
  49. package/adapters/codex/profile.yaml +0 -78
  50. package/adapters/oh-my-codex/README.md +0 -184
  51. package/adapters/oh-my-codex/profile.yaml +0 -46
  52. package/cli/commands/admit-high-risk-decision.mjs +0 -108
  53. package/cli/commands/audit-sweep.mjs +0 -364
  54. package/cli/commands/closeout.mjs +0 -186
  55. package/cli/commands/decide-high-risk-execution.mjs +0 -124
  56. package/cli/commands/handoff.mjs +0 -123
  57. package/cli/commands/ingest-high-risk-execution.mjs +0 -95
  58. package/cli/commands/review-high-risk-execution.mjs +0 -95
  59. package/cli/commands/sweep-design.mjs +0 -295
  60. package/cli/commands/sweep.mjs +0 -22
  61. package/cli/commands/topic-formatters.mjs +0 -382
  62. package/cli/commands/topic-goal.mjs +0 -33
  63. package/cli/commands/topic-options-shared.mjs +0 -27
  64. package/cli/commands/topic-options-workflow.mjs +0 -767
  65. package/cli/commands/topic-options.mjs +0 -626
  66. package/cli/commands/topic-runner.mjs +0 -169
  67. package/cli/commands/topic.mjs +0 -795
  68. package/cli/commands/validate-acceptance.mjs +0 -5
  69. package/cli/commands/validate-execution-packet.mjs +0 -5
  70. package/cli/commands/validate-orchestration-state.mjs +0 -5
  71. package/cli/commands/validate-prompt.mjs +0 -5
  72. package/cli/commands/validate-worker-output.mjs +0 -5
  73. package/cli/lib/adapter-profiles.mjs +0 -403
  74. package/cli/lib/audit-execution.mjs +0 -52
  75. package/cli/lib/audit-sweep-runtime/admissions.mjs +0 -508
  76. package/cli/lib/audit-sweep-runtime/audit-validity.mjs +0 -356
  77. package/cli/lib/audit-sweep-runtime/chunks.mjs +0 -697
  78. package/cli/lib/audit-sweep-runtime/claude-auditor.mjs +0 -658
  79. package/cli/lib/audit-sweep-runtime/closeout.mjs +0 -144
  80. package/cli/lib/audit-sweep-runtime/codex-auditor-evidence.mjs +0 -654
  81. package/cli/lib/audit-sweep-runtime/codex-auditor.mjs +0 -527
  82. package/cli/lib/audit-sweep-runtime/common.mjs +0 -341
  83. package/cli/lib/audit-sweep-runtime/coverage-quality.mjs +0 -172
  84. package/cli/lib/audit-sweep-runtime/evidence-assignment.mjs +0 -155
  85. package/cli/lib/audit-sweep-runtime/format.mjs +0 -57
  86. package/cli/lib/audit-sweep-runtime/ingest.mjs +0 -486
  87. package/cli/lib/audit-sweep-runtime/inventory-spec-chunks.mjs +0 -425
  88. package/cli/lib/audit-sweep-runtime/inventory.mjs +0 -798
  89. package/cli/lib/audit-sweep-runtime/ledger.mjs +0 -315
  90. package/cli/lib/audit-sweep-runtime/p0p1-profile.mjs +0 -101
  91. package/cli/lib/audit-sweep-runtime/remediation.mjs +0 -349
  92. package/cli/lib/audit-sweep-runtime/rerun.mjs +0 -129
  93. package/cli/lib/audit-sweep-runtime/risk-budget.mjs +0 -300
  94. package/cli/lib/audit-sweep-runtime/status.mjs +0 -62
  95. package/cli/lib/audit-sweep-runtime/validators-ledger.mjs +0 -215
  96. package/cli/lib/audit-sweep-runtime/validators.mjs +0 -797
  97. package/cli/lib/audit-sweep.mjs +0 -19
  98. package/cli/lib/authority-convergence.mjs +0 -720
  99. package/cli/lib/closeout.mjs +0 -732
  100. package/cli/lib/codex-sdk-runner.mjs +0 -76
  101. package/cli/lib/external-execution.mjs +0 -101
  102. package/cli/lib/handoff.mjs +0 -812
  103. package/cli/lib/high-risk-admission.mjs +0 -512
  104. package/cli/lib/high-risk-decision.mjs +0 -353
  105. package/cli/lib/high-risk-ingest.mjs +0 -321
  106. package/cli/lib/high-risk-review.mjs +0 -267
  107. package/cli/lib/internal/contracts-parse-high-risk.mjs +0 -131
  108. package/cli/lib/internal/contracts-validators.mjs +0 -399
  109. package/cli/lib/internal/doctor-bootstrap-surface.mjs +0 -406
  110. package/cli/lib/internal/doctor-delegated-surface.mjs +0 -256
  111. package/cli/lib/internal/doctor-finalize.mjs +0 -383
  112. package/cli/lib/internal/doctor-format.mjs +0 -286
  113. package/cli/lib/internal/doctor-inspectors.mjs +0 -327
  114. package/cli/lib/internal/doctor-state.mjs +0 -205
  115. package/cli/lib/internal/validators-artifacts.mjs +0 -515
  116. package/cli/lib/sweep-design-runtime/common.mjs +0 -246
  117. package/cli/lib/sweep-design-runtime/engine.mjs +0 -733
  118. package/cli/lib/sweep-design-runtime/fix-topic.mjs +0 -414
  119. package/cli/lib/sweep-design-runtime/lifecycle.mjs +0 -54
  120. package/cli/lib/sweep-design-runtime/results.mjs +0 -324
  121. package/cli/lib/sweep-design.mjs +0 -8
  122. package/cli/lib/topic-artifacts.mjs +0 -186
  123. package/cli/lib/topic-authority-coverage.mjs +0 -73
  124. package/cli/lib/topic-closeout.mjs +0 -560
  125. package/cli/lib/topic-common.mjs +0 -404
  126. package/cli/lib/topic-decisions.mjs +0 -332
  127. package/cli/lib/topic-draft-packets.mjs +0 -167
  128. package/cli/lib/topic-execution.mjs +0 -533
  129. package/cli/lib/topic-goal.mjs +0 -440
  130. package/cli/lib/topic-ledger.mjs +0 -281
  131. package/cli/lib/topic-lifecycle-artifacts.mjs +0 -173
  132. package/cli/lib/topic-root-validation.mjs +0 -288
  133. package/cli/lib/topic-runner-commands.mjs +0 -174
  134. package/cli/lib/topic-runner-deferral.mjs +0 -532
  135. package/cli/lib/topic-runner-stale-gates.mjs +0 -114
  136. package/cli/lib/topic-runner-validation.mjs +0 -138
  137. package/cli/lib/topic-runner.mjs +0 -727
  138. package/cli/lib/topic-scaffold.mjs +0 -252
  139. package/cli/lib/topic-waves.mjs +0 -403
  140. package/cli/lib/topic.mjs +0 -81
  141. package/config/audit-execution-artifacts.yaml +0 -20
  142. package/config/external-execution-artifacts.yaml +0 -16
  143. package/config/host-adapter.yaml +0 -30
  144. package/config/host-profile.yaml +0 -29
  145. package/config/installer-evidence.yaml +0 -31
  146. package/config/skill-installer.yaml +0 -23
  147. package/config/skill-manifest.yaml +0 -48
  148. package/config/skills.yaml +0 -30
  149. package/contracts/acceptance.schema.yaml +0 -16
  150. package/contracts/admission-checklist.schema.yaml +0 -15
  151. package/contracts/audit-chunk.schema.yaml +0 -123
  152. package/contracts/audit-closeout.schema.yaml +0 -51
  153. package/contracts/audit-finding.schema.yaml +0 -61
  154. package/contracts/audit-ledger.schema.yaml +0 -138
  155. package/contracts/audit-plan.schema.yaml +0 -138
  156. package/contracts/audit-remediation-map.schema.yaml +0 -52
  157. package/contracts/audit-rerun.schema.yaml +0 -31
  158. package/contracts/audit-sweep-result.yaml +0 -53
  159. package/contracts/authority-convergence-audit.schema.yaml +0 -19
  160. package/contracts/closeout.schema.yaml +0 -25
  161. package/contracts/decision-review.schema.yaml +0 -16
  162. package/contracts/doc-spec-audit-result.yaml +0 -19
  163. package/contracts/execution-packet.schema.yaml +0 -49
  164. package/contracts/external-host-compatibility.yaml +0 -22
  165. package/contracts/forbidden-shortcuts.catalog.yaml +0 -23
  166. package/contracts/high-risk-admission.schema.yaml +0 -23
  167. package/contracts/high-risk-execution-result.yaml +0 -20
  168. package/contracts/orchestration-state.schema.yaml +0 -41
  169. package/contracts/overflow-continuation.schema.yaml +0 -12
  170. package/contracts/packet.schema.yaml +0 -30
  171. package/contracts/pending-note.schema.yaml +0 -17
  172. package/contracts/prompt.schema.yaml +0 -12
  173. package/contracts/remediation.schema.yaml +0 -16
  174. package/contracts/result.schema.yaml +0 -24
  175. package/contracts/spec-reconstruction-result.yaml +0 -41
  176. package/contracts/sweep-design-result.yaml +0 -349
  177. package/contracts/topic-goal.schema.yaml +0 -87
  178. package/contracts/topic-run-ledger.schema.yaml +0 -72
  179. package/contracts/topic-step-decision.schema.yaml +0 -45
  180. package/contracts/topic.schema.yaml +0 -65
  181. package/contracts/true-close.schema.yaml +0 -15
  182. package/contracts/wave.schema.yaml +0 -29
  183. package/contracts/worker-output.schema.yaml +0 -15
  184. package/contracts/workflow-consumer.schema.yaml +0 -110
  185. package/methodology/audit-sweep-p0p1-recall.yaml +0 -45
  186. package/methodology/authority-convergence-policy.yaml +0 -42
  187. package/methodology/overflow-continuation-policy.yaml +0 -14
  188. package/methodology/skill-exchange-projection.yaml +0 -114
  189. package/methodology/skill-handoff.yaml +0 -34
  190. package/methodology/skill-installer-result.yaml +0 -27
  191. package/methodology/skill-installer-summary-projection.yaml +0 -181
  192. package/methodology/skill-runtime.yaml +0 -23
  193. package/methodology/spec-target-truth-profile.yaml +0 -46
  194. package/methodology/topic-lifecycle-report.yaml +0 -144
  195. package/methodology/topic-lifecycle.yaml +0 -37
  196. package/methodology/topic-naming-ontology.yaml +0 -21
  197. package/methodology/topic-ontology.yaml +0 -38
  198. package/methodology/topic-validation-policy.yaml +0 -9
  199. package/methodology/wave-dag-policy.yaml +0 -14
  200. package/spec/_meta/command-gating-matrix.yaml +0 -143
  201. package/spec/_meta/generate-drift-migration-checklist.yaml +0 -137
  202. package/spec/_meta/governance-routing-cutover-checklist.yaml +0 -35
  203. package/spec/_meta/phase2-impacted-surface-matrix.yaml +0 -44
  204. package/spec/_meta/spec-authority-cutover-readiness.yaml +0 -102
  205. package/spec/bootstrap-state.yaml +0 -99
@@ -1,130 +1,46 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.projection-edge.v1
3
+ id: nimicoding.projection-edge.v2
4
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
5
+ purpose: Declare one-way projections without granting source authority to the projection.
6
+ required_top_level_fields: [version, projection_edges, edge_kind_enum, semantic_constraints]
7
+ projection_edge_required_fields: [edge_id, edge_kind, source_ref, source_class, source_owner, target_ref, target_class, target_owner, allowed_fields, forbidden_fields, drift_check_command]
25
8
  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}/**
9
+ - edge_id: package_to_managed_methodology
10
+ edge_kind: package_to_managed_projection
11
+ source_ref: package://@nimiplatform/nimi-coding/methodology/**
29
12
  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
13
+ source_owner: nimi-coding
14
+ target_ref: .nimi/methodology/**
15
+ target_class: nimicoding_managed_projection
16
+ target_owner: nimi-coding
17
+ allowed_fields: [all_package_owned_fields]
18
+ forbidden_fields: [host_product_authority_override]
19
+ drift_check_command: pnpm exec nimicoding sync --check
20
+ - edge_id: package_to_managed_contracts
21
+ edge_kind: package_to_managed_projection
22
+ source_ref: package://@nimiplatform/nimi-coding/contracts/**
23
+ source_class: methodology_authority
24
+ source_owner: nimi-coding
25
+ target_ref: .nimi/contracts/**
26
+ target_class: nimicoding_managed_projection
27
+ target_owner: nimi-coding
28
+ allowed_fields: [all_package_owned_fields]
29
+ forbidden_fields: [host_product_authority_override]
30
+ drift_check_command: pnpm exec nimicoding sync --check
31
+ - edge_id: package_to_managed_config
39
32
  edge_kind: package_to_managed_projection
40
- source_ref: package://@nimiplatform/nimi-coding/{config,contracts,methodology,spec}/**
33
+ source_ref: package://@nimiplatform/nimi-coding/config/**
41
34
  source_class: methodology_authority
42
- source_owner: nimi_coding_package
43
- target_ref: .nimi/{config,contracts,methodology}/**
35
+ source_owner: nimi-coding
36
+ target_ref: .nimi/config/**
44
37
  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]
38
+ target_owner: nimi-coding
39
+ allowed_fields: [package_owned_defaults]
40
+ forbidden_fields: [host_product_authority_override]
48
41
  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
42
+ edge_kind_enum: [package_to_managed_projection, package_to_host_anchor, authority_to_derived_view, authority_to_audit_evidence]
125
43
  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
44
+ - projection_target_must_not_gain_more_authority_than_source
45
+ - projection_edges_do_not_define_execution_order
46
+ - drift_checks_must_be_deterministic
@@ -1,11 +1,13 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.spec-surface-shared-enums.v1
3
+ id: nimicoding.spec-surface-shared-enums.v2
4
4
  owner: nimi-coding
5
5
  surface_class_enum:
6
6
  - product_authority
7
7
  - product_authority_table
8
8
  - thin_guidance
9
+ - host_instruction
10
+ - tracked_derived_projection
9
11
  - derived_view
10
12
  - spec_generation_state
11
13
  - audit_evidence_state
@@ -13,9 +15,7 @@ surface_class_enum:
13
15
  - methodology_authority
14
16
  - nimicoding_managed_projection
15
17
  - host_projection_anchor
16
- - candidate_roadmap
17
18
  - support_registry
18
- - lifecycle_progress_state
19
19
  authority_rank_enum:
20
20
  - active_product_canonical
21
21
  - package_canonical
@@ -24,9 +24,7 @@ authority_rank_enum:
24
24
  - guidance_only
25
25
  - derived_non_authority
26
26
  - evidence_only
27
- - lifecycle_state
28
27
  - operational_local
29
- - candidate_only
30
28
  tracking_policy_enum:
31
29
  - tracked_required
32
30
  - tracked_forbidden
@@ -59,8 +57,6 @@ artifact_class_enum:
59
57
  - state_manifest
60
58
  - audit_index
61
59
  - audit_summary
62
- - roadmap_index
63
- - roadmap_summary
64
60
  semantic_constraints:
65
61
  - all_contracts_must_use_underscore_enum_values
66
62
  - hyphenated_dispositions_are_forbidden
@@ -1,115 +1,20 @@
1
- version: 2
1
+ version: 3
2
2
  input_contract:
3
3
  id: canonical_spec_generation_inputs
4
4
  owner: nimi-coding
5
- replaces_version: 1
6
- purpose: Replace blanket docs_roots ingestion with class-filtered generation inputs.
5
+ purpose: Admit class-filtered evidence for spec construction without owning the host's execution process.
7
6
  required_fields:
8
7
  - mode
9
8
  - canonical_target_root
10
9
  - code_inputs
11
10
  - docs_inputs
12
11
  - structure_inputs
13
- - topic_inputs
14
12
  - local_inputs
15
13
  - forbidden_source_classes
16
14
  - generation_order
17
15
  - inference_rules
18
16
  - 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, 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, 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
17
+ mode_enum: [class_filtered]
113
18
  acceptance_mode_enum:
114
19
  - placement_validity_before_generation
115
20
  - semantic_and_structural_parity_when_blueprint_exists
@@ -121,20 +26,18 @@ generation_order_enum:
121
26
  - thin_guides
122
27
  - derived_views
123
28
  - 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
29
+ docs_input_required_fields:
30
+ - root
31
+ - class_filter
32
+ - allowed_surface_classes
33
+ - forbidden_surface_classes
34
+ - owner
35
+ - use_as_authority
36
+ - projection_edge_ref
37
+ local_input_required_fields: [root, owner, allowed_surface_classes, use_as_authority]
132
38
  hard_constraints:
133
39
  - docs_roots_blanket_ingestion_is_forbidden
134
- - canonical_target_root_must_be_.nimi/spec_for_product_authority_outputs_only
135
40
  - 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
41
+ - local_inputs_must_not_be_used_as_product_authority
42
+ - generated_or_audit_material_must_not_be_promoted_to_product_authority
43
+ - host_native_execution_state_is_outside_this_contract
@@ -0,0 +1,32 @@
1
+ version: 1
2
+ contract:
3
+ id: nimicoding.host-spec-layout.v1
4
+ owner: nimi-coding
5
+ purpose: Admit host-specific Spec paths without weakening package authority invariants.
6
+ host_config_ref: .nimi/config/spec-layout.yaml
7
+ required_top_level_fields: [version, contract_ref, spec_layout]
8
+ layout_required_fields: [canonical_root, host_instruction_paths, tracked_derived_projections, table_family_extensions]
9
+ tracked_derived_projection_required_fields:
10
+ - projection_id
11
+ - root
12
+ - source_roots
13
+ - generate_command
14
+ - drift_check_command
15
+ - required_marker
16
+ table_family_extension_required_fields:
17
+ - table_family
18
+ - authority_class
19
+ - required_fields
20
+ - forbidden_fields
21
+ semantic_constraints:
22
+ - host_layout_is_validation_data_not_product_authority
23
+ - host_layout_must_define_only_spec_surface_shape
24
+ - host_instruction_paths_must_not_overlap_product_authority_patterns
25
+ - tracked_derived_projection_is_never_product_authority
26
+ - tracked_derived_projection_requires_a_deterministic_generator_and_drift_check
27
+ - tracked_derived_projection_root_must_stay_inside_the_canonical_spec_tree
28
+ - tracked_derived_projection_roots_must_match_generated_paths
29
+ - tracked_derived_projection_root_must_not_overlap_direct_product_authority_files
30
+ - host_instruction_paths_may_carry_repository_instructions_but_not_product_rules
31
+ - table_family_extensions_define_shape_only_and_must_not_carry_product_rows
32
+ - table_family_extensions_must_not_shadow_package_families
@@ -1,26 +1,10 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.surface-taxonomy.v1
3
+ id: nimicoding.surface-taxonomy.v2
4
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
5
+ purpose: Define authority, support, generated, evidence, and local surfaces before spec validation.
6
+ required_top_level_fields: [version, taxonomy, class_enum, authority_rank_enum, tracking_policy_enum, mutability_enum, semantic_constraints]
7
+ class_required_fields: [class_id, owner_kind, authority_rank, allowed_roots, tracking_policy, mutability, reference_rules, promotion_rules, fail_closed_cases]
24
8
  shared_enum_ref: shared-enums.yaml
25
9
  taxonomy:
26
10
  - class_id: product_authority
@@ -29,9 +13,9 @@ taxonomy:
29
13
  allowed_roots: [".nimi/spec/<domain>/kernel/*.md"]
30
14
  tracking_policy: tracked_required
31
15
  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]
16
+ reference_rules: [may_reference_product_authority_table, may_reference_thin_guidance]
17
+ promotion_rules: [authority_changes_require_explicit_product_decision]
18
+ fail_closed_cases: [contains_audit_coverage, contains_operational_state, contains_package_methodology_body]
35
19
  - class_id: product_authority_table
36
20
  owner_kind: product_domain
37
21
  authority_rank: active_product_canonical
@@ -50,10 +34,28 @@ taxonomy:
50
34
  reference_rules: [may_reference_product_authority, must_not_define_rule_body]
51
35
  promotion_rules: [normative_content_must_move_to_product_authority]
52
36
  fail_closed_cases: [contains_must_rule_body, defines_new_rule_id, defines_acceptance_gate]
37
+ - class_id: host_instruction
38
+ owner_kind: product_host
39
+ authority_rank: support_only
40
+ allowed_roots: ["host-spec-layout://host_instruction_paths"]
41
+ tracking_policy: tracked_only_with_explicit_admission
42
+ mutability: human_admitted
43
+ reference_rules: [may_define_repository_editing_and_validation_instructions, must_not_define_product_rule_body]
44
+ promotion_rules: [product_semantics_must_move_to_product_authority]
45
+ fail_closed_cases: [path_not_admitted_by_host_spec_layout, defines_product_rule]
46
+ - class_id: tracked_derived_projection
47
+ owner_kind: generator
48
+ authority_rank: derived_non_authority
49
+ allowed_roots: ["host-spec-layout://tracked_derived_projections"]
50
+ tracking_policy: tracked_only_with_explicit_admission
51
+ mutability: generated_reproducible
52
+ reference_rules: [must_declare_source_roots, must_declare_generate_command, must_declare_drift_check, must_not_be_referenced_as_authority]
53
+ promotion_rules: [never_promote_derived_output]
54
+ fail_closed_cases: [missing_layout_admission, missing_generated_marker, referenced_as_authority, overlaps_direct_product_authority]
53
55
  - class_id: derived_view
54
56
  owner_kind: generator
55
57
  authority_rank: derived_non_authority
56
- allowed_roots: ["stdout_view"]
58
+ allowed_roots: [stdout_view]
57
59
  tracking_policy: untracked_stdout_only
58
60
  mutability: generated_reproducible
59
61
  reference_rules: [may_reference_declared_inputs, must_not_be_referenced_as_authority]
@@ -61,29 +63,29 @@ taxonomy:
61
63
  fail_closed_cases: [referenced_as_authority, stored_under_product_authority_root, written_to_local_derived]
62
64
  - class_id: spec_generation_state
63
65
  owner_kind: spec_generator
64
- authority_rank: lifecycle_state
66
+ authority_rank: operational_local
65
67
  allowed_roots: [".nimi/local/state/spec-generation/**"]
66
68
  tracking_policy: local_only
67
69
  mutability: operational_snapshot
68
70
  reference_rules: [may_cite_inputs_and_generation_command]
69
71
  promotion_rules: [never_promote_generation_state]
70
- fail_closed_cases: [stored_under_.nimi/spec_meta, used_as_product_authority_input]
72
+ fail_closed_cases: [stored_under_.nimi/spec, used_as_product_authority_input]
71
73
  - class_id: audit_evidence_state
72
- owner_kind: audit_workflow
74
+ owner_kind: verification_process
73
75
  authority_rank: evidence_only
74
76
  allowed_roots: [".nimi/local/audit/**"]
75
77
  tracking_policy: local_only
76
78
  mutability: operational_snapshot
77
79
  reference_rules: [may_cite_authority_refs, must_not_override_authority]
78
- promotion_rules: [may_justify_change_packet_only]
80
+ promotion_rules: [may_justify_an_explicit_authority_change]
79
81
  fail_closed_cases: [stored_under_product_authority_root, contains_private_material_in_tracked_root]
80
82
  - class_id: operational_local_artifact
81
- owner_kind: host_adapter
83
+ owner_kind: external_tooling
82
84
  authority_rank: operational_local
83
85
  allowed_roots: [".nimi/local/**"]
84
86
  tracking_policy: local_only
85
87
  mutability: disposable
86
- reference_rules: [may_be_cited_as_evidence]
88
+ reference_rules: [may_be_cited_as_non_authoritative_evidence]
87
89
  promotion_rules: [never_promote_operational_artifact]
88
90
  fail_closed_cases: [stored_under_.nimi/spec]
89
91
  - class_id: methodology_authority
@@ -101,8 +103,8 @@ taxonomy:
101
103
  allowed_roots: [".nimi/methodology/**", ".nimi/contracts/**", ".nimi/config/**"]
102
104
  tracking_policy: tracked_required
103
105
  mutability: package_projected
104
- reference_rules: [may_be_read_as_project_local_nimicoding_context, must_not_override_product_authority]
105
- promotion_rules: [created_or_refreshed_only_by_nimicoding_init_or_sync]
106
+ reference_rules: [may_be_read_as_project_local_context, must_not_override_product_authority]
107
+ promotion_rules: [created_or_refreshed_only_by_nimicoding_start_or_sync]
106
108
  fail_closed_cases: [copied_to_host_product_authority, promoted_to_product_spec, drift_without_sync_policy]
107
109
  - class_id: host_projection_anchor
108
110
  owner_kind: host_projection
@@ -112,16 +114,7 @@ taxonomy:
112
114
  mutability: human_admitted
113
115
  reference_rules: [may_point_to_methodology_authority, must_be_minimal]
114
116
  promotion_rules: [never_promote_to_product_authority]
115
- fail_closed_cases: [contains_package_methodology_body, contains_lifecycle_status]
116
- - class_id: candidate_roadmap
117
- owner_kind: planning_owner
118
- authority_rank: candidate_only
119
- allowed_roots: [".nimi/topics/**"]
120
- tracking_policy: local_only
121
- mutability: human_admitted
122
- reference_rules: [may_cite_product_authority, must_not_authorize_implementation]
123
- promotion_rules: [must_move_to_product_authority_through_admitted_wave]
124
- fail_closed_cases: [stored_under_.nimi/spec, referenced_as_active_authority]
117
+ fail_closed_cases: [contains_package_methodology_body, contains_operational_state]
125
118
  - class_id: support_registry
126
119
  owner_kind: package_or_product_owner
127
120
  authority_rank: support_only
@@ -131,60 +124,16 @@ taxonomy:
131
124
  reference_rules: [may_register_evidence_commands, may_reference_product_authority]
132
125
  promotion_rules: [semantic_rows_move_to_product_authority]
133
126
  fail_closed_cases: [contains_status_field, contains_coverage_field, contains_audit_date, contains_progress_field]
134
- - class_id: lifecycle_progress_state
135
- owner_kind: topic_or_execution_workflow
136
- authority_rank: lifecycle_state
137
- allowed_roots: [".nimi/topics/**", ".nimi/local/state/**"]
138
- tracking_policy: local_only
139
- mutability: operational_snapshot
140
- reference_rules: [may_cite_topic_packets_and_results]
141
- promotion_rules: [never_promote_lifecycle_state]
142
- fail_closed_cases: [stored_under_.nimi/spec, used_as_product_authority]
143
- class_enum:
144
- - product_authority
145
- - product_authority_table
146
- - thin_guidance
147
- - derived_view
148
- - spec_generation_state
149
- - audit_evidence_state
150
- - operational_local_artifact
151
- - methodology_authority
152
- - nimicoding_managed_projection
153
- - host_projection_anchor
154
- - candidate_roadmap
155
- - support_registry
156
- - lifecycle_progress_state
157
- authority_rank_enum:
158
- - active_product_canonical
159
- - package_canonical
160
- - package_projection_support
161
- - support_only
162
- - guidance_only
163
- - derived_non_authority
164
- - evidence_only
165
- - lifecycle_state
166
- - operational_local
167
- - candidate_only
168
- tracking_policy_enum:
169
- - tracked_required
170
- - tracked_forbidden
171
- - local_only
172
- - tracked_only_with_explicit_admission
173
- mutability_enum:
174
- - human_admitted
175
- - package_admitted
176
- - package_projected
177
- - generated_reproducible
178
- - operational_snapshot
179
- - disposable
127
+ class_enum: [product_authority, product_authority_table, thin_guidance, host_instruction, tracked_derived_projection, derived_view, spec_generation_state, audit_evidence_state, operational_local_artifact, methodology_authority, nimicoding_managed_projection, host_projection_anchor, support_registry]
128
+ authority_rank_enum: [active_product_canonical, package_canonical, package_projection_support, support_only, guidance_only, derived_non_authority, evidence_only, operational_local]
129
+ tracking_policy_enum: [tracked_required, tracked_forbidden, local_only, tracked_only_with_explicit_admission]
130
+ mutability_enum: [human_admitted, package_admitted, package_projected, generated_reproducible, operational_snapshot, disposable]
180
131
  semantic_constraints:
181
132
  - every_candidate_file_gets_exactly_one_surface_class
182
133
  - unclassified_files_fail_closed
183
- - product_authority_classes_must_not_contain_lifecycle_state_or_audit_coverage
134
+ - product_authority_classes_must_not_contain_operational_or_audit_state
184
135
  - generated_and_derived_classes_are_never_authority
136
+ - tracked_derived_projection_requires_host_spec_layout_admission
185
137
  - package_methodology_and_package_spec_remain_package_owned
186
- - nimicoding_managed_projection_may_exist_in_host_project_but_is_not_product_authority
187
- - host_projection_anchor_must_be_minimal_and_must_not_copy_package_body
188
- - support_registry_must_not_store_run_or_coverage_status
189
- - candidate_roadmap_must_not_live_under_.nimi/spec
138
+ - nimicoding_managed_projection_is_not_product_authority
190
139
  - tracked_non_product_outputs_require_tracked_output_admission
@@ -127,7 +127,7 @@ forbidden_fields_by_authority_class:
127
127
  semantic_constraints:
128
128
  - kernel_tables_path_is_not_authority_without_table_family
129
129
  - support_registry_may_register_evidence_commands_but_not_current_coverage
130
- - lifecycle_state_and_audit_coverage_must_move_local
130
+ - operational_state_and_audit_coverage_must_move_local
131
131
  - unknown_table_family_fails_closed
132
132
  - product_authority_table_rows_must_define_stable_product_facts
133
133
  - release_gate_registry_must_use_gate_registry_family_not_closed_enum