@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
@@ -3,17 +3,11 @@ export {
3
3
  formatBlueprintAuditPayload,
4
4
  writeBlueprintAuditArtifact,
5
5
  } from "./blueprint-audit.mjs";
6
- export {
7
- loadAdmittedAdapterProfiles,
8
- loadAdapterProfile,
9
- selectAdapterProfile,
10
- } from "./adapter-profiles.mjs";
11
6
  export {
12
7
  appendGitignoreEntries,
13
8
  pathExists,
14
9
  readTextIfFile,
15
10
  } from "./fs-helpers.mjs";
16
- export { loadExternalExecutionArtifactsConfig, validateHighRiskExecutionArtifactRefs } from "./external-execution.mjs";
17
11
  export {
18
12
  mergeOrderedPaths,
19
13
  parsePathRequirements,
@@ -37,47 +31,12 @@ export {
37
31
  writeMissingBootstrapFiles,
38
32
  } from "./bootstrap.mjs";
39
33
  export {
40
- findCommandGatingRule,
41
34
  loadBlueprintReference,
42
- loadCommandGatingMatrix,
43
- loadDocSpecAuditContract,
44
- loadExternalHostCompatibilityContract,
45
- loadHighRiskAdmissionContract,
46
- loadHighRiskExecutionContract,
47
- loadHighRiskSchemaContracts,
35
+ loadSpecGenerationAuditContract,
48
36
  loadSpecGenerationInputsConfig,
49
37
  loadSpecGenerationInputsContract,
50
- loadSpecTreeModelContract,
51
- loadSpecReconstructionContract,
52
- validateDocSpecAuditSummary,
53
- validateHighRiskAdmissionsSpec,
54
- validateHighRiskAdmissionRecord,
55
- validateHighRiskExecutionSummary,
56
- validateSpecReconstructionSummary,
57
38
  } from "./contracts.mjs";
58
39
  export {
59
40
  formatDoctorResult,
60
41
  inspectDoctorState,
61
42
  } from "./doctor.mjs";
62
- export {
63
- buildHighRiskAdmissionPayload,
64
- formatHighRiskAdmissionPayload,
65
- writeHighRiskAdmission,
66
- } from "./high-risk-admission.mjs";
67
- export {
68
- buildHandoffPayload,
69
- formatHandoffPayload,
70
- formatHandoffPrompt,
71
- formatStartPastePrompt,
72
- getStartHostOption,
73
- resolveStartHostChoice,
74
- START_HOST_OPTIONS,
75
- writeHandoffJsonArtifact,
76
- writeHandoffPromptArtifacts,
77
- } from "./handoff.mjs";
78
- export {
79
- buildCloseoutPayload,
80
- formatCloseoutPayload,
81
- loadImportedCloseoutOptions,
82
- validateImportedCloseoutShape,
83
- } from "./closeout.mjs";
@@ -1,14 +1,4 @@
1
- import path from "node:path";
2
-
3
- import {
4
- validateAcceptance as validateAcceptanceInternal,
5
- validateExecutionPacket as validateExecutionPacketInternal,
6
- validateOrchestrationState as validateOrchestrationStateInternal,
7
- validatePrompt as validatePromptInternal,
8
- validateWorkerOutput as validateWorkerOutputInternal,
9
- } from "./internal/validators-artifacts.mjs";
10
1
  import {
11
- normalizeArgv,
12
2
  VALIDATOR_CLI_RESULT_CONTRACT,
13
3
  VALIDATOR_NATIVE_REFUSAL_CODES,
14
4
  } from "./internal/validators-shared.mjs";
@@ -19,30 +9,9 @@ import {
19
9
 
20
10
  export { VALIDATOR_NATIVE_REFUSAL_CODES };
21
11
 
22
- export function validateExecutionPacket(filePath) {
23
- return validateExecutionPacketInternal(filePath);
24
- }
25
-
26
- export function validateOrchestrationState(filePath) {
27
- return validateOrchestrationStateInternal(filePath);
28
- }
29
-
30
- export function validatePrompt(filePath) {
31
- return validatePromptInternal(filePath);
32
- }
33
-
34
- export function validateWorkerOutput(filePath) {
35
- return validateWorkerOutputInternal(filePath);
36
- }
37
-
38
- export function validateAcceptance(filePath) {
39
- return validateAcceptanceInternal(filePath);
40
- }
41
-
42
12
  export function validateSpecTree(rootPath, options = {}) {
43
13
  return validateSpecTreeInternal(rootPath, options);
44
14
  }
45
-
46
15
  export function validateSpecAudit(auditPath, options = {}) {
47
16
  return validateSpecAuditInternal(auditPath, options);
48
17
  }
@@ -57,22 +26,5 @@ export function buildValidatorCliReport(validator, filePath, report) {
57
26
  errors: report.errors || [],
58
27
  warnings: report.warnings || [],
59
28
  ...(report.summary ? { summary: report.summary } : {}),
60
- ...(report.signal ? { signal: report.signal } : {}),
61
29
  };
62
30
  }
63
-
64
- export async function runValidatorCommand(args, validator, validate) {
65
- const normalizedArgv = normalizeArgv(args);
66
- const [filePath, ...rest] = normalizedArgv;
67
-
68
- if (!filePath || rest.length > 0) {
69
- process.stderr.write(`nimicoding ${validator} refused: expected exactly one path argument.\n`);
70
- return 2;
71
- }
72
-
73
- const targetPath = path.resolve(process.cwd(), filePath);
74
- const report = await validate(targetPath);
75
- const cliReport = buildValidatorCliReport(validator, targetPath, report);
76
- process.stdout.write(`${JSON.stringify(cliReport, null, 2)}\n`);
77
- return report.ok ? 0 : 1;
78
- }
@@ -42,9 +42,6 @@ ownership_semantics:
42
42
  the canonical content after bootstrap. nimicoding sync --apply only
43
43
  writes when the host file is missing. Drift never fails sync or doctor.
44
44
 
45
- excluded_projection:
46
- - methodology/spec-target-truth-profile.yaml
47
-
48
45
  ownership_overrides:
49
46
  - path: .nimi/config/spec-generation-inputs.yaml
50
47
  ownership: host_state_seed
@@ -1,6 +1,6 @@
1
- version: 1
1
+ version: 2
2
2
  initialized_by: "@nimiplatform/nimi-coding"
3
- cli_version: "0.2.8"
3
+ cli_version: "0.3.0"
4
4
  bootstrap_contract: "nimicoding.bootstrap"
5
- bootstrap_contract_version: 1
6
- profile: default
5
+ bootstrap_contract_version: 2
6
+ profile: governance
@@ -1,4 +1,4 @@
1
- version: 2
1
+ version: 3
2
2
  contract_ref: .nimi/contracts/spec-generation-inputs.schema.yaml
3
3
  spec_generation_inputs:
4
4
  mode: class_filtered
@@ -8,29 +8,23 @@ spec_generation_inputs:
8
8
  - root: .nimi/spec
9
9
  class_filter: product_authority_only
10
10
  allowed_surface_classes: [product_authority, product_authority_table, thin_guidance, host_projection_anchor, support_registry]
11
- forbidden_surface_classes: [derived_view, spec_generation_state, audit_evidence_state, operational_local_artifact, nimicoding_managed_projection, candidate_roadmap, lifecycle_progress_state, methodology_authority]
11
+ forbidden_surface_classes: [derived_view, tracked_derived_projection, spec_generation_state, audit_evidence_state, operational_local_artifact, nimicoding_managed_projection, methodology_authority]
12
12
  owner: nimi_host
13
13
  use_as_authority: true
14
14
  projection_edge_ref: null
15
15
  structure_inputs: []
16
- topic_inputs:
17
- - root: .nimi/topics
18
- owner: topic_lifecycle
19
- allowed_surface_classes: [lifecycle_progress_state, candidate_roadmap]
20
- use_as_authority: false
21
16
  local_inputs:
22
17
  - root: .nimi/local
23
- owner: local_execution
24
- allowed_surface_classes: [spec_generation_state, audit_evidence_state, operational_local_artifact, lifecycle_progress_state]
18
+ owner: external_tooling
19
+ allowed_surface_classes: [spec_generation_state, audit_evidence_state, operational_local_artifact]
25
20
  use_as_authority: false
26
21
  forbidden_source_classes:
27
22
  - derived_view
23
+ - tracked_derived_projection
28
24
  - spec_generation_state
29
25
  - audit_evidence_state
30
26
  - operational_local_artifact
31
27
  - nimicoding_managed_projection
32
- - candidate_roadmap
33
- - lifecycle_progress_state
34
28
  generation_order:
35
29
  - classify_inputs
36
30
  - validate_placement
@@ -43,5 +37,5 @@ spec_generation_inputs:
43
37
  - no_blanket_docs_roots
44
38
  - no_generated_as_authority
45
39
  - no_derived_views_written_to_local
46
- - no_audit_or_lifecycle_state_as_authority
40
+ - no_audit_or_operational_state_as_authority
47
41
  acceptance_mode: placement_validity_before_generation
@@ -1,6 +1,6 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.domain-admission.v1
3
+ id: nimicoding.domain-admission.v2
4
4
  owner: nimi-coding
5
5
  purpose: Require explicit admission for every host spec domain before it is product authority.
6
6
  required_top_level_fields:
@@ -26,7 +26,7 @@ domain_admissions:
26
26
  owner: project
27
27
  admitted_by: nimicoding_init_default_project_domain
28
28
  allowed_surface_classes: [product_authority, product_authority_table, thin_guidance, support_registry]
29
- forbidden_surface_classes: [derived_view, spec_generation_state, audit_evidence_state, lifecycle_progress_state, candidate_roadmap, methodology_authority]
29
+ forbidden_surface_classes: [derived_view, spec_generation_state, audit_evidence_state, operational_local_artifact, methodology_authority]
30
30
  validation_commands: [pnpm exec nimicoding validate-spec-tree -- .nimi/spec]
31
31
  migration_disposition_when_unadmitted: block
32
32
  domain_authority_class_enum:
@@ -1,78 +1,15 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.spec-migration-inventory.v1
3
+ id: nimicoding.spec-migration-inventory.v2
4
4
  owner: nimi-coding
5
- purpose: Define machine-readable classification and migration output for current host spec surfaces.
6
- required_top_level_fields:
7
- - version
8
- - inventory
9
- - disposition_enum
10
- - target_class_enum
11
- - semantic_constraints
12
- inventory_entry_required_fields:
13
- - source_path
14
- - current_inferred_class
15
- - target_class
16
- - disposition
17
- - target_root
18
- - owner
19
- - required_confirmation
20
- - ambiguity
21
- - evidence
22
- - validation_commands
23
- shared_enum_ref: shared-enums.yaml
24
- disposition_enum:
25
- - keep
26
- - move_package
27
- - move_local
28
- - split
29
- - rewrite
30
- - delete
31
- - block
32
- target_class_enum:
33
- - product_authority
34
- - product_authority_table
35
- - thin_guidance
36
- - derived_view
37
- - spec_generation_state
38
- - audit_evidence_state
39
- - operational_local_artifact
40
- - methodology_authority
41
- - host_projection_anchor
42
- - nimicoding_managed_projection
43
- - candidate_roadmap
44
- - support_registry
45
- - lifecycle_progress_state
46
- required_confirmation_enum:
47
- - none
48
- - product_semantic_fork
49
- - owner_ambiguity
50
- - package_boundary_ambiguity
51
- - destructive_deletion
52
- ambiguity_required_fields:
53
- - posture
54
- - reason
55
- - candidate_owners
56
- ambiguity_posture_enum:
57
- - none
58
- - blocks_migration
59
- inventory: []
60
- inventory_generation_rules:
61
- - classify_every_file_under_.nimi/spec
62
- - classify_nimicoding_managed_projections_under_.nimi/methodology_.nimi/contracts_and_.nimi/config
63
- - generate_split_children_for_mixed_authority_and_state_files
64
- - use_block_only_for_user_confirmation_cases
65
- - use_keep_for_nimicoding_init_or_sync_managed_projections
66
- - use_move_package_for_package_methodology_when_copied_under_.nimi/spec
67
- - use_move_local_for_audit_lifecycle_and_operational_state
68
- - use_delete_for_derived_views_with_stdout_view_replacement
69
- - use_delete_for_obsolete_generated_or_one_time_state_without_durable_target
5
+ purpose: Describe a non-mutating migration plan for spec surface cleanup.
6
+ required_entry_fields: [source_path, current_inferred_class, target_class, disposition, target_root, owner, required_confirmation, ambiguity, evidence, validation_commands]
7
+ target_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]
8
+ disposition_enum: [keep, move_package, move_local, split, rewrite, delete, block]
9
+ required_confirmation_enum: [none, product_semantic_fork, owner_ambiguity, package_boundary_ambiguity, destructive_deletion]
10
+ plan_fields: [contract, ok, version, root, inventory, disposition_enum, target_class_enum, semantic_constraints, summary, enum_validation, required_confirmations, groups, migration_groups, mutation_policy]
70
11
  semantic_constraints:
71
- - inventory_must_not_modify_files
72
- - every_candidate_source_gets_one_inventory_entry_or_split_children
73
- - split_entries_must_name_child_targets
74
- - block_entries_require_user_confirmation_before_migration
75
- - future_under_spec_must_not_have_keep_disposition
76
- - nimicoding_managed_projection_must_have_keep_disposition_and_must_not_be_promoted_to_product_authority
77
- - generated_views_default_to_delete_with_stdout_view
78
- - audit_state_defaults_to_move_local
12
+ - inventory_and_plan_commands_must_not_modify_source_files
13
+ - unresolved_semantic_forks_remain_blocking
14
+ - migration_groups_are_descriptive_and_do_not_schedule_work
15
+ - emitted_plans_are_local_non_authority_state
@@ -1,106 +1,26 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.spec-surface-negative-fixtures.v1
3
+ id: nimicoding.spec-surface-negative-fixtures.v2
4
4
  owner: nimi-coding
5
- fixture_required_fields:
6
- - fixture_id
7
- - contract_ref
8
- - setup
9
- - expected_failure
10
- - validator_scope
11
5
  fixtures:
12
- - fixture_id: generated_view_under_product_authority
13
- contract_ref: placement-contract.schema.yaml
14
- setup: .nimi/spec/runtime/kernel/generated/example.md
6
+ - id: generated-view-under-authority
7
+ setup: .nimi/spec/project/kernel/generated/overview.md
15
8
  expected_failure: derived_view_under_product_authority_root
16
- validator_scope: placement
17
- - fixture_id: spec_generation_state_under_meta
18
- contract_ref: placement-contract.schema.yaml
9
+ - id: generation-state-under-authority
19
10
  setup: .nimi/spec/_meta/spec-generation-audit.yaml
20
11
  expected_failure: spec_generation_state_under_spec
21
- validator_scope: placement
22
- - fixture_id: rule_evidence_with_coverage_status_under_kernel_tables
23
- contract_ref: table-family.schema.yaml
24
- setup: .nimi/spec/runtime/kernel/tables/rule-evidence.yaml with coverage_status
25
- expected_failure: table_contains_forbidden_state_or_audit_field
26
- validator_scope: table_family
27
- - fixture_id: future_backlog_under_spec
28
- contract_ref: domain-admission.schema.yaml
29
- setup: .nimi/spec/future/kernel/tables/backlog-items.yaml
30
- expected_failure: excluded_domain_retained_under_spec
31
- validator_scope: domain_admission
32
- - fixture_id: thin_guidance_with_normative_body
33
- contract_ref: surface-taxonomy.schema.yaml
34
- setup: .nimi/spec/desktop/local-ai.md containing MUST or 必须
35
- expected_failure: guidance_defines_rule_body
36
- validator_scope: guidance
37
- - fixture_id: package_methodology_copied_to_spec
38
- contract_ref: projection-edge.schema.yaml
39
- setup: .nimi/spec/product-scope.yaml containing package methodology body
40
- expected_failure: package_body_promoted_to_product_authority
41
- validator_scope: projection
42
- - fixture_id: nimicoding_managed_projection_passes
43
- contract_ref: placement-contract.schema.yaml
44
- setup: .nimi/contracts/topic.schema.yaml as init-managed projection
45
- expected_failure: none
46
- validator_scope: placement
47
- - fixture_id: nimicoding_config_projection_passes
48
- contract_ref: placement-contract.schema.yaml
49
- setup: .nimi/config/spec-generation-inputs.yaml as init-managed projection
50
- expected_failure: none
51
- validator_scope: placement
52
- - fixture_id: nimicoding_methodology_projection_passes
53
- contract_ref: placement-contract.schema.yaml
54
- setup: .nimi/methodology/spec-reconstruction.yaml as init-managed projection
55
- expected_failure: none
56
- validator_scope: placement
57
- - fixture_id: blanket_v2_docs_input_root
58
- contract_ref: spec-generation-inputs.schema.yaml
59
- setup: .nimi/config/spec-generation-inputs.yaml docs_inputs root "."
60
- expected_failure: invalid_spec_generation_inputs_config
61
- validator_scope: doctor
62
- - fixture_id: lifecycle_cutover_status_under_spec
63
- contract_ref: placement-contract.schema.yaml
64
- setup: .nimi/spec/_meta/spec-authority-cutover-readiness.yaml with current phase/status
65
- expected_failure: lifecycle_progress_state_under_spec
66
- validator_scope: placement
67
- - fixture_id: generated_file_referenced_as_authority
68
- contract_ref: projection-edge.schema.yaml
69
- setup: product authority markdown links to .nimi/spec/runtime/kernel/generated/rule-evidence.md as authority
70
- expected_failure: derived_view_referenced_as_authority
71
- validator_scope: projection
72
- - fixture_id: kernel_table_without_family
73
- contract_ref: table-family.schema.yaml
74
- setup: .nimi/spec/runtime/kernel/tables/example.yaml without table_family
12
+ - id: package-contract-promoted-to-spec
13
+ setup: .nimi/contracts/surface-taxonomy.schema.yaml copied under .nimi/spec/project/kernel
14
+ expected_failure: package_methodology_under_host_spec
15
+ - id: unknown-domain
16
+ setup: .nimi/spec/unadmitted/kernel/index.md
17
+ expected_failure: missing_domain_admission
18
+ - id: table-without-family
19
+ setup: .nimi/spec/project/kernel/tables/rules.yaml without table_family
75
20
  expected_failure: missing_table_family
76
- validator_scope: table_family
77
- - fixture_id: kernel_table_with_unknown_family
78
- contract_ref: table-family.schema.yaml
79
- setup: .nimi/spec/platform/kernel/tables/unknown-family.yaml with unadmitted table_family
80
- expected_failure: unknown_table_family
81
- validator_scope: table_family
82
- - fixture_id: tracked_non_product_without_admission
83
- contract_ref: tracked-output-admission.schema.yaml
84
- setup: .nimi/audit/example.yaml
85
- expected_failure: tracked_non_product_without_admission
86
- validator_scope: tracked_output
87
- - fixture_id: valid_state_machine_table_passes
88
- contract_ref: table-family.schema.yaml
89
- setup: .nimi/spec/runtime/kernel/tables/job-states.yaml with table_family state_machine
90
- expected_failure: none
91
- validator_scope: table_family
92
- - fixture_id: valid_product_state_machine_table_passes
93
- contract_ref: table-family.schema.yaml
94
- setup: .nimi/spec/platform/kernel/tables/first-run-state-machine.yaml with table_family product_state_machine and state entry/exit conditions
95
- expected_failure: none
96
- validator_scope: table_family
97
- - fixture_id: valid_product_record_schema_table_passes
98
- contract_ref: table-family.schema.yaml
99
- setup: .nimi/spec/platform/kernel/tables/product-control-record-schema.yaml with table_family product_record_schema
100
- expected_failure: none
101
- validator_scope: table_family
102
- - fixture_id: valid_minimal_package_anchor_passes
103
- contract_ref: projection-edge.schema.yaml
104
- setup: .nimi/spec/_meta/nimi-coding-admission-anchor.yaml with package id/version/root/edge refs only
105
- expected_failure: none
106
- validator_scope: projection
21
+ - id: guidance-with-rule-body
22
+ setup: .nimi/spec/project.md containing normative rule body
23
+ expected_failure: guidance_defines_rule_body
24
+ semantic_constraints:
25
+ - every_fail_closed_rule_requires_a_negative_fixture
26
+ - fixtures_must_name_the_exact_refusal_code
@@ -1,21 +1,10 @@
1
- version: 1
1
+ version: 2
2
2
  contract:
3
- id: nimicoding.placement-contract.v1
3
+ id: nimicoding.placement-contract.v2
4
4
  owner: nimi-coding
5
- purpose: Bind roots to surface classes and fail closed on mismatches.
6
- required_top_level_fields:
7
- - version
8
- - placement_rules
9
- - root_policy
10
- - forbidden_roots
11
- - fail_closed_cases
12
- placement_rule_required_fields:
13
- - root_pattern
14
- - allowed_classes
15
- - owner
16
- - tracking_policy
17
- - requires_admission
18
- - validator_scope
5
+ purpose: Bind each governed root to its allowed authority class.
6
+ required_top_level_fields: [version, placement_rules, root_policy, forbidden_roots, fail_closed_cases]
7
+ placement_rule_required_fields: [root_pattern, allowed_classes, owner, tracking_policy, requires_admission, validator_scope]
19
8
  shared_enum_ref: shared-enums.yaml
20
9
  placement_rules:
21
10
  - root_pattern: .nimi/spec/<domain>/kernel/*.md
@@ -42,6 +31,18 @@ placement_rules:
42
31
  tracking_policy: tracked_required
43
32
  requires_admission: none
44
33
  validator_scope: thin_guidance
34
+ - root_pattern: host-spec-layout://host_instruction_paths
35
+ allowed_classes: [host_instruction]
36
+ owner: product_host
37
+ tracking_policy: tracked_only_with_explicit_admission
38
+ requires_admission: host_spec_layout
39
+ validator_scope: host_instruction
40
+ - root_pattern: host-spec-layout://tracked_derived_projections
41
+ allowed_classes: [tracked_derived_projection]
42
+ owner: generator
43
+ tracking_policy: tracked_only_with_explicit_admission
44
+ requires_admission: host_spec_layout
45
+ validator_scope: tracked_derived_projection
45
46
  - root_pattern: .nimi/spec/_meta/<package>-admission-anchor.yaml
46
47
  allowed_classes: [host_projection_anchor]
47
48
  owner: host_projection
@@ -58,7 +59,7 @@ placement_rules:
58
59
  allowed_classes: [nimicoding_managed_projection]
59
60
  owner: nimi_coding_package_projection
60
61
  tracking_policy: tracked_required
61
- requires_admission: nimicoding_init_or_sync_projection
62
+ requires_admission: nimicoding_start_or_sync_projection
62
63
  validator_scope: nimicoding_managed_projection
63
64
  - root_pattern: package://@nimiplatform/nimi-coding/{spec,methodology,contracts,config}/**
64
65
  allowed_classes: [methodology_authority, support_registry]
@@ -66,26 +67,26 @@ placement_rules:
66
67
  tracking_policy: tracked_required
67
68
  requires_admission: package_authority
68
69
  validator_scope: package_authority
69
- - root_pattern: .nimi/topics/**
70
- allowed_classes: [lifecycle_progress_state, candidate_roadmap]
71
- owner: topic_lifecycle
70
+ - root_pattern: .nimi/local/state/spec-generation/**
71
+ allowed_classes: [spec_generation_state]
72
+ owner: spec_generator
72
73
  tracking_policy: local_only
73
74
  requires_admission: none
74
- validator_scope: topic_lifecycle
75
- - root_pattern: .nimi/local/state/**
76
- allowed_classes: [spec_generation_state, lifecycle_progress_state, operational_local_artifact]
77
- owner: execution_workflow
78
- tracking_policy: local_only
79
- requires_admission: none
80
- validator_scope: local_state
75
+ validator_scope: spec_generation_state
81
76
  - root_pattern: .nimi/local/audit/**
82
77
  allowed_classes: [audit_evidence_state, operational_local_artifact]
83
- owner: audit_workflow
78
+ owner: verification_process
79
+ tracking_policy: local_only
80
+ requires_admission: none
81
+ validator_scope: audit_evidence
82
+ - root_pattern: .nimi/local/**
83
+ allowed_classes: [operational_local_artifact]
84
+ owner: external_tooling
84
85
  tracking_policy: local_only
85
86
  requires_admission: none
86
- validator_scope: audit_state
87
- - root_pattern: .nimi/{derived,state,audit,roadmap}/**
88
- allowed_classes: [derived_view, spec_generation_state, audit_evidence_state, candidate_roadmap]
87
+ validator_scope: operational_local
88
+ - root_pattern: .nimi/{derived,state,audit}/**
89
+ allowed_classes: [derived_view, spec_generation_state, audit_evidence_state]
89
90
  owner: tracked_output_admission
90
91
  tracking_policy: tracked_only_with_explicit_admission
91
92
  requires_admission: tracked_output_admission
@@ -97,60 +98,30 @@ allowed_spec_meta_rules:
97
98
  - root_pattern: .nimi/spec/_meta/**
98
99
  allowed_classes: []
99
100
  allowed_dispositions: [move_package, move_local, delete]
100
- - root_pattern: .nimi/config/host-overlay.yaml
101
- allowed_classes: [host_projection_anchor]
102
- required_fields: [package_id, package_version, package_truth_root, overlay_fields, drift_check_command]
103
101
  root_policy:
104
102
  product_authority_root: .nimi/spec
105
103
  package_authority_root: package://@nimiplatform/nimi-coding
106
- topic_lifecycle_root: .nimi/topics
107
104
  local_artifact_root: .nimi/local
108
105
  tracked_non_product_roots:
109
106
  default: disabled
110
- roots:
111
- - .nimi/derived
112
- - .nimi/state
113
- - .nimi/audit
114
- - .nimi/roadmap
107
+ roots: [.nimi/derived, .nimi/state, .nimi/audit]
115
108
  forbidden_roots:
116
- candidate_roadmap:
117
- - .nimi/spec/**
118
- derived_view:
119
- - .nimi/spec/**/kernel/generated/**
120
- - .nimi/spec/generated/**
121
- - .nimi/local/derived/**
122
- spec_generation_state:
123
- - .nimi/spec/_meta/spec-generation-audit/**
124
- - .nimi/spec/_meta/spec-generation-audit.yaml
125
- audit_evidence_state:
126
- - .nimi/spec/**/kernel/**
127
- - .nimi/spec/_meta/**
128
- lifecycle_progress_state:
129
- - .nimi/spec/**
130
- methodology_authority:
131
- - .nimi/spec/**
109
+ derived_view: [".nimi/spec/**/kernel/generated/**", ".nimi/spec/generated/**", ".nimi/local/derived/**"]
110
+ spec_generation_state: [".nimi/spec/**"]
111
+ audit_evidence_state: [".nimi/spec/**"]
112
+ operational_local_artifact: [".nimi/spec/**"]
113
+ methodology_authority: [".nimi/spec/**"]
114
+ tracked_derived_projection: ["unadmitted:.nimi/spec/**/kernel/generated/**", "unadmitted:.nimi/spec/generated/**"]
132
115
  forbidden_root_exceptions:
133
- nimicoding_managed_projection:
134
- - .nimi/methodology/**
135
- - .nimi/contracts/**
136
- - .nimi/config/**
137
- tracking_policy_notes:
138
- .nimi/topics/**:
139
- tracking_policy: local_only
140
- meaning: local_human_authored_lifecycle_workspace_not_product_authority
141
- .nimi/{config,contracts,methodology}/**:
142
- tracking_policy: tracked_required
143
- meaning: project_local_nimicoding_managed_projection_created_by_init_or_sync_not_product_authority
116
+ nimicoding_managed_projection: [".nimi/methodology/**", ".nimi/contracts/**", ".nimi/config/**"]
144
117
  fail_closed_cases:
145
- - class_root_mismatch
146
- - file_under_.nimi/spec_without_product_or_minimal_anchor_class
147
- - file_under_kernel_tables_without_table_family
148
- - _meta_file_without_minimal_anchor_or_package_migration_disposition
149
- - tracked_non_product_file_without_admission
150
- - nimicoding_managed_projection_promoted_to_product_authority
151
- - future_or_backlog_under_.nimi/spec
118
+ - root_has_no_matching_placement_rule
119
+ - surface_class_not_allowed_for_root
120
+ - required_admission_missing
121
+ - non_product_state_stored_under_product_authority
122
+ - generated_projection_under_spec_without_host_layout_admission
123
+ - package_methodology_copied_under_product_authority
124
+ - tracked_non_product_output_missing_admission
152
125
  semantic_constraints:
153
- - path_shape_is_never_sufficient_authority_proof
154
- - keep_move_package_move_local_split_rewrite_delete_block_must_be_explicit
155
- - product_semantic_forks_block_for_user_confirmation
156
- - high_risk_admission_records_stay_local_evidence_while_domain_spec_holds_product_authority
126
+ - placement_is_validated_independently_of_host_execution
127
+ - local_evidence_must_not_become_product_authority