@nimiplatform/nimi-coding 0.1.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 (186) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +348 -0
  3. package/adapters/README.md +25 -0
  4. package/adapters/claude/README.md +89 -0
  5. package/adapters/claude/profile.yaml +70 -0
  6. package/adapters/codex/README.md +53 -0
  7. package/adapters/codex/profile.yaml +78 -0
  8. package/adapters/oh-my-codex/README.md +185 -0
  9. package/adapters/oh-my-codex/profile.yaml +46 -0
  10. package/bin/nimicoding.mjs +6 -0
  11. package/cli/commands/admit-high-risk-decision.mjs +108 -0
  12. package/cli/commands/audit-sweep.mjs +341 -0
  13. package/cli/commands/blueprint-audit.mjs +91 -0
  14. package/cli/commands/clear.mjs +168 -0
  15. package/cli/commands/closeout.mjs +183 -0
  16. package/cli/commands/decide-high-risk-execution.mjs +124 -0
  17. package/cli/commands/doctor.mjs +53 -0
  18. package/cli/commands/generate-spec-derived-docs.mjs +131 -0
  19. package/cli/commands/handoff.mjs +123 -0
  20. package/cli/commands/ingest-high-risk-execution.mjs +95 -0
  21. package/cli/commands/review-high-risk-execution.mjs +95 -0
  22. package/cli/commands/start.mjs +717 -0
  23. package/cli/commands/topic-formatters.mjs +382 -0
  24. package/cli/commands/topic-goal.mjs +33 -0
  25. package/cli/commands/topic-options-shared.mjs +27 -0
  26. package/cli/commands/topic-options-workflow.mjs +767 -0
  27. package/cli/commands/topic-options.mjs +626 -0
  28. package/cli/commands/topic-runner.mjs +169 -0
  29. package/cli/commands/topic.mjs +795 -0
  30. package/cli/commands/validate-acceptance.mjs +5 -0
  31. package/cli/commands/validate-ai-governance.mjs +214 -0
  32. package/cli/commands/validate-execution-packet.mjs +5 -0
  33. package/cli/commands/validate-orchestration-state.mjs +5 -0
  34. package/cli/commands/validate-prompt.mjs +5 -0
  35. package/cli/commands/validate-spec-audit.mjs +27 -0
  36. package/cli/commands/validate-spec-governance.mjs +124 -0
  37. package/cli/commands/validate-spec-tree.mjs +27 -0
  38. package/cli/commands/validate-worker-output.mjs +5 -0
  39. package/cli/constants.mjs +489 -0
  40. package/cli/help.mjs +134 -0
  41. package/cli/index.mjs +103 -0
  42. package/cli/lib/adapter-profiles.mjs +403 -0
  43. package/cli/lib/audit-execution.mjs +52 -0
  44. package/cli/lib/audit-sweep-runtime/admissions.mjs +381 -0
  45. package/cli/lib/audit-sweep-runtime/audit-validity.mjs +333 -0
  46. package/cli/lib/audit-sweep-runtime/chunks.mjs +697 -0
  47. package/cli/lib/audit-sweep-runtime/closeout.mjs +144 -0
  48. package/cli/lib/audit-sweep-runtime/codex-auditor-evidence.mjs +639 -0
  49. package/cli/lib/audit-sweep-runtime/codex-auditor.mjs +515 -0
  50. package/cli/lib/audit-sweep-runtime/common.mjs +329 -0
  51. package/cli/lib/audit-sweep-runtime/coverage-quality.mjs +172 -0
  52. package/cli/lib/audit-sweep-runtime/evidence-assignment.mjs +152 -0
  53. package/cli/lib/audit-sweep-runtime/format.mjs +57 -0
  54. package/cli/lib/audit-sweep-runtime/ingest.mjs +486 -0
  55. package/cli/lib/audit-sweep-runtime/inventory-spec-chunks.mjs +198 -0
  56. package/cli/lib/audit-sweep-runtime/inventory.mjs +728 -0
  57. package/cli/lib/audit-sweep-runtime/ledger.mjs +315 -0
  58. package/cli/lib/audit-sweep-runtime/p0p1-profile.mjs +101 -0
  59. package/cli/lib/audit-sweep-runtime/remediation.mjs +349 -0
  60. package/cli/lib/audit-sweep-runtime/rerun.mjs +129 -0
  61. package/cli/lib/audit-sweep-runtime/risk-budget.mjs +300 -0
  62. package/cli/lib/audit-sweep-runtime/status.mjs +62 -0
  63. package/cli/lib/audit-sweep-runtime/validators-ledger.mjs +215 -0
  64. package/cli/lib/audit-sweep-runtime/validators.mjs +758 -0
  65. package/cli/lib/audit-sweep.mjs +18 -0
  66. package/cli/lib/authority-convergence.mjs +309 -0
  67. package/cli/lib/blueprint-audit.mjs +370 -0
  68. package/cli/lib/bootstrap.mjs +228 -0
  69. package/cli/lib/closeout.mjs +623 -0
  70. package/cli/lib/codex-sdk-runner.mjs +76 -0
  71. package/cli/lib/contracts.mjs +180 -0
  72. package/cli/lib/doctor.mjs +18 -0
  73. package/cli/lib/entrypoints.mjs +274 -0
  74. package/cli/lib/external-execution.mjs +101 -0
  75. package/cli/lib/fs-helpers.mjs +33 -0
  76. package/cli/lib/handoff.mjs +785 -0
  77. package/cli/lib/high-risk-admission.mjs +442 -0
  78. package/cli/lib/high-risk-decision.mjs +324 -0
  79. package/cli/lib/high-risk-ingest.mjs +317 -0
  80. package/cli/lib/high-risk-review.mjs +263 -0
  81. package/cli/lib/internal/contracts-loaders.mjs +132 -0
  82. package/cli/lib/internal/contracts-parse-high-risk.mjs +131 -0
  83. package/cli/lib/internal/contracts-parse.mjs +457 -0
  84. package/cli/lib/internal/contracts-validators.mjs +398 -0
  85. package/cli/lib/internal/doctor-bootstrap-surface.mjs +359 -0
  86. package/cli/lib/internal/doctor-delegated-surface.mjs +256 -0
  87. package/cli/lib/internal/doctor-finalize.mjs +385 -0
  88. package/cli/lib/internal/doctor-format.mjs +286 -0
  89. package/cli/lib/internal/doctor-inspectors.mjs +294 -0
  90. package/cli/lib/internal/doctor-state.mjs +205 -0
  91. package/cli/lib/internal/governance/ai/ai-context-budget-core.mjs +315 -0
  92. package/cli/lib/internal/governance/ai/ai-structure-budget-core.mjs +358 -0
  93. package/cli/lib/internal/governance/ai/check-agents-freshness.mjs +155 -0
  94. package/cli/lib/internal/governance/ai/check-high-risk-doc-metadata-core.mjs +173 -0
  95. package/cli/lib/internal/governance/config.mjs +150 -0
  96. package/cli/lib/internal/governance/runner.mjs +35 -0
  97. package/cli/lib/internal/governance/shared/read-yaml-with-fragments.mjs +49 -0
  98. package/cli/lib/internal/validators-artifacts.mjs +515 -0
  99. package/cli/lib/internal/validators-shared.mjs +28 -0
  100. package/cli/lib/internal/validators-spec-helpers.mjs +186 -0
  101. package/cli/lib/internal/validators-spec.mjs +410 -0
  102. package/cli/lib/shared.mjs +83 -0
  103. package/cli/lib/topic-draft-packets.mjs +48 -0
  104. package/cli/lib/topic-goal.mjs +361 -0
  105. package/cli/lib/topic-runner.mjs +772 -0
  106. package/cli/lib/topic.mjs +93 -0
  107. package/cli/lib/ui.mjs +178 -0
  108. package/cli/lib/validators.mjs +78 -0
  109. package/cli/lib/value-helpers.mjs +24 -0
  110. package/cli/lib/yaml-helpers.mjs +133 -0
  111. package/cli/nimicoding.mjs +1 -0
  112. package/cli/seeds/bootstrap.mjs +47 -0
  113. package/config/audit-execution-artifacts.yaml +20 -0
  114. package/config/bootstrap.yaml +6 -0
  115. package/config/external-execution-artifacts.yaml +16 -0
  116. package/config/host-adapter.yaml +30 -0
  117. package/config/host-profile.yaml +29 -0
  118. package/config/installer-evidence.yaml +31 -0
  119. package/config/skill-installer.yaml +23 -0
  120. package/config/skill-manifest.yaml +46 -0
  121. package/config/skills.yaml +30 -0
  122. package/config/spec-generation-inputs.yaml +25 -0
  123. package/contracts/acceptance.schema.yaml +16 -0
  124. package/contracts/admission-checklist.schema.yaml +15 -0
  125. package/contracts/audit-chunk.schema.yaml +110 -0
  126. package/contracts/audit-closeout.schema.yaml +51 -0
  127. package/contracts/audit-finding.schema.yaml +61 -0
  128. package/contracts/audit-ledger.schema.yaml +138 -0
  129. package/contracts/audit-plan.schema.yaml +123 -0
  130. package/contracts/audit-remediation-map.schema.yaml +51 -0
  131. package/contracts/audit-rerun.schema.yaml +31 -0
  132. package/contracts/audit-sweep-result.yaml +49 -0
  133. package/contracts/authority-convergence-audit.schema.yaml +19 -0
  134. package/contracts/closeout.schema.yaml +25 -0
  135. package/contracts/decision-review.schema.yaml +16 -0
  136. package/contracts/doc-spec-audit-result.yaml +19 -0
  137. package/contracts/execution-packet.schema.yaml +49 -0
  138. package/contracts/external-host-compatibility.yaml +22 -0
  139. package/contracts/forbidden-shortcuts.catalog.yaml +23 -0
  140. package/contracts/high-risk-admission.schema.yaml +23 -0
  141. package/contracts/high-risk-execution-result.yaml +20 -0
  142. package/contracts/orchestration-state.schema.yaml +41 -0
  143. package/contracts/overflow-continuation.schema.yaml +12 -0
  144. package/contracts/packet.schema.yaml +30 -0
  145. package/contracts/pending-note.schema.yaml +17 -0
  146. package/contracts/prompt.schema.yaml +12 -0
  147. package/contracts/remediation.schema.yaml +16 -0
  148. package/contracts/result.schema.yaml +24 -0
  149. package/contracts/spec-generation-audit.schema.yaml +31 -0
  150. package/contracts/spec-generation-inputs.schema.yaml +39 -0
  151. package/contracts/spec-reconstruction-result.yaml +37 -0
  152. package/contracts/topic-goal.schema.yaml +78 -0
  153. package/contracts/topic-run-ledger.schema.yaml +72 -0
  154. package/contracts/topic-step-decision.schema.yaml +45 -0
  155. package/contracts/topic.schema.yaml +65 -0
  156. package/contracts/true-close.schema.yaml +15 -0
  157. package/contracts/wave.schema.yaml +29 -0
  158. package/contracts/worker-output.schema.yaml +15 -0
  159. package/methodology/audit-sweep-p0p1-recall.yaml +45 -0
  160. package/methodology/authority-convergence-policy.yaml +42 -0
  161. package/methodology/core.yaml +25 -0
  162. package/methodology/four-closure-policy.yaml +28 -0
  163. package/methodology/overflow-continuation-policy.yaml +14 -0
  164. package/methodology/role-separation-policy.yaml +28 -0
  165. package/methodology/skill-exchange-projection.yaml +114 -0
  166. package/methodology/skill-handoff.yaml +34 -0
  167. package/methodology/skill-installer-result.yaml +27 -0
  168. package/methodology/skill-installer-summary-projection.yaml +181 -0
  169. package/methodology/skill-runtime.yaml +23 -0
  170. package/methodology/spec-reconstruction.yaml +63 -0
  171. package/methodology/spec-target-truth-profile.yaml +53 -0
  172. package/methodology/topic-lifecycle-report.yaml +144 -0
  173. package/methodology/topic-lifecycle.yaml +37 -0
  174. package/methodology/topic-naming-ontology.yaml +21 -0
  175. package/methodology/topic-ontology.yaml +38 -0
  176. package/methodology/topic-validation-policy.yaml +9 -0
  177. package/methodology/wave-dag-policy.yaml +14 -0
  178. package/package.json +50 -0
  179. package/spec/_meta/command-gating-matrix.yaml +110 -0
  180. package/spec/_meta/generate-drift-migration-checklist.yaml +155 -0
  181. package/spec/_meta/governance-routing-cutover-checklist.yaml +35 -0
  182. package/spec/_meta/phase2-impacted-surface-matrix.yaml +44 -0
  183. package/spec/_meta/spec-authority-cutover-readiness.yaml +104 -0
  184. package/spec/_meta/spec-tree-model.yaml +72 -0
  185. package/spec/bootstrap-state.yaml +99 -0
  186. package/spec/product-scope.yaml +56 -0
@@ -0,0 +1,133 @@
1
+ import { readFile } from "node:fs/promises";
2
+
3
+ import YAML from "yaml";
4
+
5
+ import { pathExists } from "./fs-helpers.mjs";
6
+ import { isPlainObject, toStringArray } from "./value-helpers.mjs";
7
+
8
+ function findFirstMatchingKey(node, targetKey) {
9
+ if (Array.isArray(node)) {
10
+ for (const entry of node) {
11
+ const found = findFirstMatchingKey(entry, targetKey);
12
+ if (found !== undefined) {
13
+ return found;
14
+ }
15
+ }
16
+ return undefined;
17
+ }
18
+
19
+ if (!isPlainObject(node)) {
20
+ return undefined;
21
+ }
22
+
23
+ if (Object.prototype.hasOwnProperty.call(node, targetKey)) {
24
+ return node[targetKey];
25
+ }
26
+
27
+ for (const value of Object.values(node)) {
28
+ const found = findFirstMatchingKey(value, targetKey);
29
+ if (found !== undefined) {
30
+ return found;
31
+ }
32
+ }
33
+
34
+ return undefined;
35
+ }
36
+
37
+ export function parseYamlText(text) {
38
+ if (!text) {
39
+ return null;
40
+ }
41
+
42
+ try {
43
+ return YAML.parse(text);
44
+ } catch {
45
+ return null;
46
+ }
47
+ }
48
+
49
+ export async function loadYamlFile(filePath) {
50
+ const info = await pathExists(filePath);
51
+ if (!info || !info.isFile()) {
52
+ return null;
53
+ }
54
+
55
+ try {
56
+ return YAML.parse(await readFile(filePath, "utf8"));
57
+ } catch {
58
+ return null;
59
+ }
60
+ }
61
+
62
+ export function readYamlScalar(text, key) {
63
+ const parsed = parseYamlText(text);
64
+ const value = findFirstMatchingKey(parsed, key);
65
+
66
+ if (value === undefined || value === null || isPlainObject(value) || Array.isArray(value)) {
67
+ return null;
68
+ }
69
+
70
+ return String(value);
71
+ }
72
+
73
+ export function readYamlList(text, key) {
74
+ const parsed = parseYamlText(text);
75
+ const value = findFirstMatchingKey(parsed, key);
76
+ return toStringArray(value);
77
+ }
78
+
79
+ export function mergeOrderedPaths(...groups) {
80
+ const merged = [];
81
+
82
+ for (const group of groups) {
83
+ for (const entry of group) {
84
+ if (entry && !merged.includes(entry)) {
85
+ merged.push(entry);
86
+ }
87
+ }
88
+ }
89
+
90
+ return merged;
91
+ }
92
+
93
+ export function parseSkillSection(text, sectionKey) {
94
+ const parsed = parseYamlText(text);
95
+ const section = parsed?.[sectionKey];
96
+
97
+ if (!Array.isArray(section)) {
98
+ return [];
99
+ }
100
+
101
+ return section.map((entry) => ({
102
+ ...entry,
103
+ id: typeof entry?.id === "string" ? entry.id : null,
104
+ inputs: Array.isArray(entry?.inputs) ? entry.inputs.map((item) => String(item)) : [],
105
+ required: entry?.required === undefined ? undefined : String(entry.required),
106
+ source: entry?.source === undefined ? undefined : String(entry.source),
107
+ purpose: entry?.purpose === undefined ? undefined : String(entry.purpose),
108
+ result_contract_ref: entry?.result_contract_ref === undefined ? undefined : String(entry.result_contract_ref),
109
+ })).filter((entry) => entry.id);
110
+ }
111
+
112
+ export function parsePathRequirements(text, sectionKey) {
113
+ const parsed = parseYamlText(text);
114
+ const section = parsed?.[sectionKey];
115
+
116
+ if (!Array.isArray(section)) {
117
+ return [];
118
+ }
119
+
120
+ return section
121
+ .filter((entry) => isPlainObject(entry) && typeof entry.path === "string")
122
+ .map((entry) => ({
123
+ path: entry.path,
124
+ required_top_level_keys: Array.isArray(entry.required_top_level_keys)
125
+ ? entry.required_top_level_keys.map((item) => String(item))
126
+ : [],
127
+ }));
128
+ }
129
+
130
+ export function readTopLevelKeys(text) {
131
+ const parsed = parseYamlText(text);
132
+ return isPlainObject(parsed) ? Object.keys(parsed) : [];
133
+ }
@@ -0,0 +1 @@
1
+ export { runCli } from "./index.mjs";
@@ -0,0 +1,47 @@
1
+ import { readFile, readdir } from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ const PACKAGE_ROOT = fileURLToPath(new URL("../..", import.meta.url));
6
+ const HOST_BOOTSTRAP_EXCLUDED_PATHS = new Set([
7
+ "methodology/spec-target-truth-profile.yaml",
8
+ ]);
9
+ const SOURCE_PROJECTIONS = [
10
+ { sourceDir: "config", outputDir: ".nimi/config" },
11
+ { sourceDir: "contracts", outputDir: ".nimi/contracts" },
12
+ { sourceDir: "methodology", outputDir: ".nimi/methodology" },
13
+ { sourceDir: "spec", outputDir: ".nimi/spec" },
14
+ ];
15
+
16
+ function toPortableRelativePath(filePath) {
17
+ return filePath.split(path.sep).join("/");
18
+ }
19
+
20
+ async function collectProjectedFiles(rootPath, currentPath, outputDir, seedMap) {
21
+ const entries = await readdir(currentPath, { withFileTypes: true });
22
+
23
+ for (const entry of entries) {
24
+ const absolutePath = path.join(currentPath, entry.name);
25
+ if (entry.isDirectory()) {
26
+ await collectProjectedFiles(rootPath, absolutePath, outputDir, seedMap);
27
+ continue;
28
+ }
29
+
30
+ const relativePath = toPortableRelativePath(path.relative(rootPath, absolutePath));
31
+ if (HOST_BOOTSTRAP_EXCLUDED_PATHS.has(`${path.basename(rootPath)}/${relativePath}`)) {
32
+ continue;
33
+ }
34
+ seedMap.set(`${outputDir}/${relativePath}`, await readFile(absolutePath, "utf8"));
35
+ }
36
+ }
37
+
38
+ export async function createBootstrapSeedFileMap() {
39
+ const seedMap = new Map();
40
+
41
+ for (const projection of SOURCE_PROJECTIONS) {
42
+ const sourceRoot = path.join(PACKAGE_ROOT, projection.sourceDir);
43
+ await collectProjectedFiles(sourceRoot, sourceRoot, projection.outputDir, seedMap);
44
+ }
45
+
46
+ return seedMap;
47
+ }
@@ -0,0 +1,20 @@
1
+ version: 1
2
+ audit_execution_artifacts:
3
+ skill_id: audit_sweep
4
+ host_adapter_ref: .nimi/config/host-adapter.yaml
5
+ result_contract_ref: .nimi/contracts/audit-sweep-result.yaml
6
+ locality: local_only
7
+ artifact_roots:
8
+ plan_ref: .nimi/local/audit/plans
9
+ chunk_refs: .nimi/local/audit/chunks
10
+ ledger_ref: .nimi/local/audit/ledgers
11
+ report_ref: .nimi/local/audit/reports
12
+ remediation_map_ref: .nimi/local/audit/remediation-maps
13
+ audit_closeout_ref: .nimi/local/audit/closeouts
14
+ packet_ref: .nimi/local/audit/packets
15
+ evidence_refs: .nimi/local/audit/evidence
16
+ run_ledger_ref: .nimi/local/audit/runs
17
+ hard_constraints:
18
+ - audit_execution_artifacts_remain_operational_only
19
+ - imported_refs_must_stay_under_declared_local_roots
20
+ - candidate_artifacts_must_not_override_semantic_truth
@@ -0,0 +1,6 @@
1
+ version: 1
2
+ initialized_by: "@nimiplatform/nimi-coding"
3
+ cli_version: "0.1.0"
4
+ bootstrap_contract: "nimicoding.bootstrap"
5
+ bootstrap_contract_version: 1
6
+ profile: default
@@ -0,0 +1,16 @@
1
+ version: 1
2
+ external_execution_artifacts:
3
+ skill_id: high_risk_execution
4
+ host_adapter_ref: .nimi/config/host-adapter.yaml
5
+ result_contract_ref: .nimi/contracts/high-risk-execution-result.yaml
6
+ locality: local_only
7
+ artifact_roots:
8
+ packet_ref: .nimi/local/packets
9
+ orchestration_state_ref: .nimi/local/orchestration
10
+ prompt_ref: .nimi/local/prompts
11
+ worker_output_ref: .nimi/local/outputs
12
+ evidence_refs: .nimi/local/evidence
13
+ hard_constraints:
14
+ - external_execution_artifacts_remain_operational_only
15
+ - imported_refs_must_stay_under_declared_local_roots
16
+ - candidate_artifacts_must_not_override_semantic_truth
@@ -0,0 +1,30 @@
1
+ version: 1
2
+ host_adapter:
3
+ runtime_owner: external_ai_host
4
+ selected_adapter_id: none
5
+ admitted_adapter_ids:
6
+ - codex
7
+ - oh_my_codex
8
+ - claude
9
+ handoff_mode: prompt_output_evidence_handoff
10
+ evidence_mode: candidate_only
11
+ semantic_review_owner: nimicoding_manager
12
+ admitted_execution_surfaces:
13
+ - authority_convergence_audit
14
+ host_profile_ref: .nimi/config/host-profile.yaml
15
+ manifest_ref: .nimi/config/skill-manifest.yaml
16
+ artifact_contract_ref: .nimi/config/external-execution-artifacts.yaml
17
+ handoff_ref: .nimi/methodology/skill-handoff.yaml
18
+ operational_state_roots:
19
+ - .nimi/local
20
+ - .nimi/cache
21
+ semantic_owner_roots:
22
+ - .nimi/methodology
23
+ - .nimi/spec
24
+ - .nimi/contracts
25
+ - .nimi/config
26
+ hard_constraints:
27
+ - adapter_must_not_override_semantic_truth
28
+ - adapter_must_not_define_acceptance_or_disposition
29
+ - adapter_runtime_state_must_remain_operational_only
30
+ - authority_convergence_subagent_execution_is_adapter_projection_only
@@ -0,0 +1,29 @@
1
+ version: 1
2
+ host_profile:
3
+ id: external_ai_host
4
+ host_class: ai_native_coding_host
5
+ runtime_contract_ref: .nimi/methodology/skill-runtime.yaml
6
+ compatibility_contract_ref: .nimi/contracts/external-host-compatibility.yaml
7
+ installer_ref: .nimi/config/skill-installer.yaml
8
+ installer_result_contract_ref: .nimi/methodology/skill-installer-result.yaml
9
+ ownership_mode: external
10
+ execution_mode: delegated
11
+ install_state: not_installed
12
+ self_hosted: false
13
+ required_context:
14
+ - .nimi/methodology
15
+ - .nimi/spec
16
+ - .nimi/contracts
17
+ - .nimi/config/skill-manifest.yaml
18
+ - .nimi/config/host-profile.yaml
19
+ - .nimi/config/host-adapter.yaml
20
+ - .nimi/config/external-execution-artifacts.yaml
21
+ - .nimi/methodology/skill-handoff.yaml
22
+ required_capabilities:
23
+ - read_project_local_nimi_truth
24
+ - route_declared_external_skills
25
+ - fail_closed_on_missing_authority
26
+ hard_constraints:
27
+ - vendor_neutral_profile_only
28
+ - do_not_assume_local_runtime_install
29
+ - do_not_claim_packet_orchestration_ownership
@@ -0,0 +1,31 @@
1
+ version: 1
2
+ evidence_home:
3
+ id: local_skill_installer_operational_evidence
4
+ locality: local_only
5
+ root: .nimi/local/installer-evidence
6
+ runs_dir: .nimi/local/installer-evidence/runs
7
+ latest_summary_path: .nimi/local/installer-evidence/latest-summary.json
8
+ payload_cache_dir: .nimi/local/installer-evidence/payloads
9
+ temp_dir: .nimi/local/installer-evidence/temp
10
+ retention:
11
+ summaries: retain_verified_history
12
+ raw_logs: local_prunable
13
+ payloads: ephemeral_best_effort
14
+ temp_paths: delete_after_run
15
+ semantic_projection:
16
+ mode: verified_summary_only
17
+ contract_ref: .nimi/methodology/skill-installer-summary-projection.yaml
18
+ target_result_contract: .nimi/methodology/skill-installer-result.yaml
19
+ lifecycle_scope:
20
+ owner: external_ai_host
21
+ stage_model: collapsed_single_contract
22
+ semantic_stages:
23
+ - capture
24
+ - production
25
+ - status_declaration
26
+ - semantic_projection
27
+ - final_result_declaration
28
+ hard_constraints:
29
+ - do_not_promote_concrete_evidence_artifacts
30
+ - do_not_require_tracked_evidence_files
31
+ - missing_local_evidence_must_not_imply_success
@@ -0,0 +1,23 @@
1
+ version: 1
2
+ installer:
3
+ id: external_delegated_skill_installer
4
+ installer_owner: external_ai_host
5
+ installer_mode: delegated
6
+ install_state: not_installed
7
+ executable_installation: false
8
+ self_hosted: false
9
+ manifest_ref: .nimi/config/skill-manifest.yaml
10
+ runtime_contract_ref: .nimi/methodology/skill-runtime.yaml
11
+ host_profile_ref: .nimi/config/host-profile.yaml
12
+ result_contract_ref: .nimi/methodology/skill-installer-result.yaml
13
+ evidence_home_ref: .nimi/config/installer-evidence.yaml
14
+ install_flow:
15
+ - read_declared_skill_manifest
16
+ - resolve_against_declared_runtime_contract
17
+ - resolve_against_declared_host_profile
18
+ - require_explicit_external_install_action
19
+ hard_constraints:
20
+ - do_not_assume_local_installer_runtime
21
+ - do_not_assume_vendor_specific_package_manager
22
+ - do_not_claim_self_hosted_installation
23
+ - unresolved_install_requirement_must_fail_closed
@@ -0,0 +1,46 @@
1
+ version: 1
2
+ manifest:
3
+ runtime_owner: external_ai_host
4
+ runtime_contract_ref: .nimi/methodology/skill-runtime.yaml
5
+ host_profile_ref: .nimi/config/host-profile.yaml
6
+ installer_ref: .nimi/config/skill-installer.yaml
7
+ installer_result_contract_ref: .nimi/methodology/skill-installer-result.yaml
8
+ execution_mode: delegated
9
+ install_state: not_installed
10
+ skills:
11
+ - id: spec_reconstruction
12
+ source: external
13
+ required: true
14
+ result_contract_ref: .nimi/contracts/spec-reconstruction-result.yaml
15
+ inputs:
16
+ - .nimi/config/spec-generation-inputs.yaml
17
+ - .nimi/methodology/spec-reconstruction.yaml
18
+ - .nimi/spec/_meta/spec-tree-model.yaml
19
+ - .nimi/spec/bootstrap-state.yaml
20
+ - id: doc_spec_audit
21
+ source: external
22
+ required: true
23
+ result_contract_ref: .nimi/contracts/doc-spec-audit-result.yaml
24
+ inputs:
25
+ - README.md
26
+ - .nimi/spec
27
+ - id: audit_sweep
28
+ source: external
29
+ required: false
30
+ result_contract_ref: .nimi/contracts/audit-sweep-result.yaml
31
+ inputs:
32
+ - .nimi/methodology
33
+ - .nimi/spec
34
+ - .nimi/contracts
35
+ - .nimi/local
36
+ - .nimi/config/audit-execution-artifacts.yaml
37
+ - id: high_risk_execution
38
+ source: external
39
+ required: false
40
+ result_contract_ref: .nimi/contracts/high-risk-execution-result.yaml
41
+ inputs:
42
+ - .nimi/methodology
43
+ - .nimi/spec
44
+ - .nimi/contracts
45
+ - .nimi/local
46
+ - .nimi/config/external-execution-artifacts.yaml
@@ -0,0 +1,30 @@
1
+ version: 1
2
+ bootstrap:
3
+ runtime_installed: false
4
+ installation_mode: deferred
5
+ canonical_reconstruction_guidance: .nimi/methodology/spec-reconstruction.yaml
6
+ canonical_contracts_root: .nimi/contracts
7
+ canonical_manifest: .nimi/config/skill-manifest.yaml
8
+ canonical_host_profile: .nimi/config/host-profile.yaml
9
+ canonical_host_adapter: .nimi/config/host-adapter.yaml
10
+ canonical_external_execution_artifacts: .nimi/config/external-execution-artifacts.yaml
11
+ canonical_runtime_contract: .nimi/methodology/skill-runtime.yaml
12
+ canonical_installer: .nimi/config/skill-installer.yaml
13
+ canonical_installer_result_contract: .nimi/methodology/skill-installer-result.yaml
14
+ canonical_installer_operational_evidence: .nimi/config/installer-evidence.yaml
15
+ canonical_installer_summary_projection_contract: .nimi/methodology/skill-installer-summary-projection.yaml
16
+ handoff_contract: .nimi/methodology/skill-handoff.yaml
17
+ runtime_owner: external_ai_host
18
+ expected_skill_surfaces:
19
+ - id: spec_reconstruction
20
+ required: true
21
+ purpose: reconstruct_project_canonical_tree_into_.nimi/spec
22
+ - id: doc_spec_audit
23
+ required: true
24
+ purpose: compare_human_docs_against_.nimi/spec
25
+ - id: audit_sweep
26
+ required: false
27
+ purpose: perform_full_coverage_audit_sweep_and_emit_frozen_findings_ledger
28
+ - id: high_risk_execution
29
+ required: false
30
+ purpose: packetized_execution_after_project_truth_matures
@@ -0,0 +1,25 @@
1
+ version: 1
2
+ contract_ref: .nimi/contracts/spec-generation-inputs.schema.yaml
3
+ spec_generation_inputs:
4
+ mode: mixed
5
+ canonical_target_root: .nimi/spec
6
+ code_roots: []
7
+ docs_roots:
8
+ - README.md
9
+ structure_roots:
10
+ - .
11
+ human_note_paths: []
12
+ benchmark_blueprint_root: null
13
+ benchmark_mode: none
14
+ acceptance_mode: canonical_tree_validity_without_blueprint
15
+ generation_order:
16
+ - index
17
+ - kernel_markdown
18
+ - kernel_tables
19
+ - generated_views
20
+ - thin_guides
21
+ inference_rules:
22
+ - infer_domains_from_available_source_materials_when_no_blueprint_exists
23
+ - separate_normative_kernel_from_generated_and_guidance_surfaces
24
+ - establish_kernel_markdown_before_thin_guides
25
+ - establish_kernel_tables_before_generated_views
@@ -0,0 +1,16 @@
1
+ id: nimi-coding.acceptance.v1
2
+ kind: acceptance
3
+ required_order:
4
+ - authority alignment
5
+ - phase closure
6
+ - evidence sufficiency
7
+ - disposition
8
+ - next step or reopen
9
+ disposition_enum:
10
+ - complete
11
+ - partial
12
+ - deferred
13
+ required_blocks:
14
+ - Findings
15
+ - Current Phase Disposition
16
+ - Next Step or Reopen Condition
@@ -0,0 +1,15 @@
1
+ id: nimicoding.admission-checklist.v1
2
+ kind: admission-checklist
3
+ required:
4
+ - checklist_id
5
+ - topic_id
6
+ - scope
7
+ - gate_items
8
+ - stop_phrases
9
+ scope_enum:
10
+ - topic_entry
11
+ - wave_preflight
12
+ - implementation_admission
13
+ rules:
14
+ - every gate item must be answerable as pass or fail
15
+ - stop phrases must remain explicit manager stop signals rather than hints
@@ -0,0 +1,110 @@
1
+ version: 1
2
+ schema:
3
+ id: nimi-coding.audit-chunk.v1
4
+ kind: audit-chunk
5
+ required_top_level_fields:
6
+ - version
7
+ - kind
8
+ - sweep_id
9
+ - chunk_id
10
+ - state
11
+ - owner_domain
12
+ - criteria
13
+ - files
14
+ - file_hashes
15
+ - lifecycle
16
+ - created_at
17
+ - updated_at
18
+ optional_top_level_fields:
19
+ - planning_basis
20
+ - spec_surface
21
+ - authority_refs
22
+ - authority_kind
23
+ - app_id
24
+ - package_authority_id
25
+ - admission_ref
26
+ - authority_root
27
+ - evidence_root_admission_refs
28
+ - admitted_evidence_roots
29
+ - host_authority_projection_refs
30
+ - evidence_roots
31
+ - evidence_inventory
32
+ - evidence_inventory_status
33
+ - evidence_inventory_empty_reason
34
+ - coverage_contract
35
+ - evidence_file_hashes
36
+ - calibration_expected_defects
37
+ - coverage_quality
38
+ - audit_validity
39
+ state_enum:
40
+ - planned
41
+ - dispatched
42
+ - ingested
43
+ - reviewed
44
+ - frozen
45
+ - failed
46
+ - skipped
47
+ lifecycle_required_fields:
48
+ - planned_at
49
+ - dispatched_at
50
+ - ingested_at
51
+ - reviewed_at
52
+ - frozen_at
53
+ - failed_at
54
+ - skipped_at
55
+ hard_constraints:
56
+ - chunk_files_must_match_plan_inventory
57
+ - spec_authority_chunks_must_declare_authority_refs_and_evidence_roots
58
+ - spec_authority_chunks_must_declare_evidence_inventory
59
+ - spec_authority_chunks_with_empty_evidence_inventory_must_declare_explicit_empty_reason
60
+ - spec_authority_chunks_must_declare_coverage_contract
61
+ - spec_authority_chunk_files_remain_authority_refs_only
62
+ - admitted_package_authority_projection_refs_must_be_explicitly_mapped
63
+ - spec_authority_ingest_requires_one_authority_outcome_per_authority_ref
64
+ - spec_authority_ingest_requires_evidence_files_exactly_matching_evidence_inventory
65
+ - spec_authority_authority_outcome_evidence_refs_must_belong_to_authority_refs_or_evidence_inventory
66
+ - no_finding_audited_outcomes_must_declare_negative_reasoning
67
+ - no_finding_audited_outcomes_with_non_empty_evidence_inventory_must_declare_implementation_evidence_refs_or_not_applicable_reason
68
+ - p0p1_recall_chunks_without_critical_or_high_findings_must_declare_negative_reasoning_and_implementation_refs
69
+ - p0p1_recall_chunks_with_implementation_inventory_must_record_rule_specific_checks
70
+ - p0p1_no_finding_evidence_with_implementation_inventory_must_cite_semantic_auditor_provenance
71
+ - synthetic_no_finding_generators_must_not_emit_semantic_audit_evidence
72
+ - calibration_expected_defects_must_be_satisfied_by_finding_evidence_when_present
73
+ - ingest_requires_dispatch
74
+ - frozen_requires_manager_review
75
+ - failed_or_skipped_requires_explicit_reason
76
+ audit_evidence_coverage_fields:
77
+ - evidence_files
78
+ - authority_outcomes
79
+ - no_finding_summary
80
+ - p0p1_negative_reasoning
81
+ - p0p1_evidence_refs
82
+ - p0p1_rule_checks
83
+ - p0p1_implementation_not_applicable_reason
84
+ auditor_provenance_fields:
85
+ required_when_p0p1_no_finding_with_implementation_inventory:
86
+ - kind
87
+ - packet_ref
88
+ - session_ref_or_transcript_ref_or_review_ref
89
+ authority_outcome_fields:
90
+ required:
91
+ - authority_ref
92
+ - status
93
+ - evidence_refs
94
+ optional:
95
+ - reason
96
+ - negative_reasoning
97
+ - implementation_evidence_refs
98
+ - implementation_not_applicable_reason
99
+ authority_outcome_status_enum:
100
+ - audited
101
+ - blocked
102
+ - not_applicable
103
+ calibration_expected_defect_fields:
104
+ required:
105
+ - id
106
+ optional:
107
+ - root_cause_key
108
+ - location_file
109
+ - severity
110
+ - category
@@ -0,0 +1,51 @@
1
+ version: 1
2
+ schema:
3
+ id: nimi-coding.audit-closeout.v1
4
+ kind: audit-closeout
5
+ required_top_level_fields:
6
+ - sweep_id
7
+ - ledger_ref
8
+ - remediation_map_ref
9
+ - audit_closeout_ref
10
+ - coverage_status
11
+ - coverage_scope
12
+ - coverage_quality
13
+ - audit_validity
14
+ - finding_posture
15
+ - closeout_posture
16
+ - verified_at
17
+ coverage_status_enum:
18
+ - full
19
+ - partial
20
+ - blocked
21
+ closeout_posture_enum:
22
+ - audit_complete_findings_open
23
+ - audit_complete_all_findings_postured
24
+ - partial_coverage_all_findings_postured
25
+ - partial_coverage_findings_open
26
+ - audit_invalid_no_finding_evidence
27
+ - blocked
28
+ coverage_quality_required_fields:
29
+ - scope_label
30
+ - posture
31
+ - warnings
32
+ - blockers
33
+ audit_validity_required_fields:
34
+ - posture
35
+ - warnings
36
+ - blockers
37
+ - no_finding_posture
38
+ - p0p1_recall_required_count
39
+ - p0p1_recall_invalid_count
40
+ - p0p1_rule_check_count
41
+ - auditor_provenance_present
42
+ - calibration_expected_defect_count
43
+ - calibration_missed_defect_count
44
+ hard_constraints:
45
+ - closeout_requires_latest_ledger_snapshot
46
+ - audit_complete_requires_no_active_chunks
47
+ - all_open_findings_require_remediation_map_coverage
48
+ - all_closed_findings_require_resolution_evidence
49
+ - coverage_status_partial_requires_partial_coverage_closeout_posture
50
+ - audit_validity_invalid_requires_audit_invalid_no_finding_evidence_posture
51
+ - coverage_quality_and_audit_validity_must_be_nested_objects_not_flattened_root_fields