@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.
- package/LICENSE +21 -0
- package/README.md +348 -0
- package/adapters/README.md +25 -0
- package/adapters/claude/README.md +89 -0
- package/adapters/claude/profile.yaml +70 -0
- package/adapters/codex/README.md +53 -0
- package/adapters/codex/profile.yaml +78 -0
- package/adapters/oh-my-codex/README.md +185 -0
- package/adapters/oh-my-codex/profile.yaml +46 -0
- package/bin/nimicoding.mjs +6 -0
- package/cli/commands/admit-high-risk-decision.mjs +108 -0
- package/cli/commands/audit-sweep.mjs +341 -0
- package/cli/commands/blueprint-audit.mjs +91 -0
- package/cli/commands/clear.mjs +168 -0
- package/cli/commands/closeout.mjs +183 -0
- package/cli/commands/decide-high-risk-execution.mjs +124 -0
- package/cli/commands/doctor.mjs +53 -0
- package/cli/commands/generate-spec-derived-docs.mjs +131 -0
- package/cli/commands/handoff.mjs +123 -0
- package/cli/commands/ingest-high-risk-execution.mjs +95 -0
- package/cli/commands/review-high-risk-execution.mjs +95 -0
- package/cli/commands/start.mjs +717 -0
- package/cli/commands/topic-formatters.mjs +382 -0
- package/cli/commands/topic-goal.mjs +33 -0
- package/cli/commands/topic-options-shared.mjs +27 -0
- package/cli/commands/topic-options-workflow.mjs +767 -0
- package/cli/commands/topic-options.mjs +626 -0
- package/cli/commands/topic-runner.mjs +169 -0
- package/cli/commands/topic.mjs +795 -0
- package/cli/commands/validate-acceptance.mjs +5 -0
- package/cli/commands/validate-ai-governance.mjs +214 -0
- package/cli/commands/validate-execution-packet.mjs +5 -0
- package/cli/commands/validate-orchestration-state.mjs +5 -0
- package/cli/commands/validate-prompt.mjs +5 -0
- package/cli/commands/validate-spec-audit.mjs +27 -0
- package/cli/commands/validate-spec-governance.mjs +124 -0
- package/cli/commands/validate-spec-tree.mjs +27 -0
- package/cli/commands/validate-worker-output.mjs +5 -0
- package/cli/constants.mjs +489 -0
- package/cli/help.mjs +134 -0
- package/cli/index.mjs +103 -0
- package/cli/lib/adapter-profiles.mjs +403 -0
- package/cli/lib/audit-execution.mjs +52 -0
- package/cli/lib/audit-sweep-runtime/admissions.mjs +381 -0
- package/cli/lib/audit-sweep-runtime/audit-validity.mjs +333 -0
- package/cli/lib/audit-sweep-runtime/chunks.mjs +697 -0
- package/cli/lib/audit-sweep-runtime/closeout.mjs +144 -0
- package/cli/lib/audit-sweep-runtime/codex-auditor-evidence.mjs +639 -0
- package/cli/lib/audit-sweep-runtime/codex-auditor.mjs +515 -0
- package/cli/lib/audit-sweep-runtime/common.mjs +329 -0
- package/cli/lib/audit-sweep-runtime/coverage-quality.mjs +172 -0
- package/cli/lib/audit-sweep-runtime/evidence-assignment.mjs +152 -0
- package/cli/lib/audit-sweep-runtime/format.mjs +57 -0
- package/cli/lib/audit-sweep-runtime/ingest.mjs +486 -0
- package/cli/lib/audit-sweep-runtime/inventory-spec-chunks.mjs +198 -0
- package/cli/lib/audit-sweep-runtime/inventory.mjs +728 -0
- package/cli/lib/audit-sweep-runtime/ledger.mjs +315 -0
- package/cli/lib/audit-sweep-runtime/p0p1-profile.mjs +101 -0
- package/cli/lib/audit-sweep-runtime/remediation.mjs +349 -0
- package/cli/lib/audit-sweep-runtime/rerun.mjs +129 -0
- package/cli/lib/audit-sweep-runtime/risk-budget.mjs +300 -0
- package/cli/lib/audit-sweep-runtime/status.mjs +62 -0
- package/cli/lib/audit-sweep-runtime/validators-ledger.mjs +215 -0
- package/cli/lib/audit-sweep-runtime/validators.mjs +758 -0
- package/cli/lib/audit-sweep.mjs +18 -0
- package/cli/lib/authority-convergence.mjs +309 -0
- package/cli/lib/blueprint-audit.mjs +370 -0
- package/cli/lib/bootstrap.mjs +228 -0
- package/cli/lib/closeout.mjs +623 -0
- package/cli/lib/codex-sdk-runner.mjs +76 -0
- package/cli/lib/contracts.mjs +180 -0
- package/cli/lib/doctor.mjs +18 -0
- package/cli/lib/entrypoints.mjs +274 -0
- package/cli/lib/external-execution.mjs +101 -0
- package/cli/lib/fs-helpers.mjs +33 -0
- package/cli/lib/handoff.mjs +785 -0
- package/cli/lib/high-risk-admission.mjs +442 -0
- package/cli/lib/high-risk-decision.mjs +324 -0
- package/cli/lib/high-risk-ingest.mjs +317 -0
- package/cli/lib/high-risk-review.mjs +263 -0
- package/cli/lib/internal/contracts-loaders.mjs +132 -0
- package/cli/lib/internal/contracts-parse-high-risk.mjs +131 -0
- package/cli/lib/internal/contracts-parse.mjs +457 -0
- package/cli/lib/internal/contracts-validators.mjs +398 -0
- package/cli/lib/internal/doctor-bootstrap-surface.mjs +359 -0
- package/cli/lib/internal/doctor-delegated-surface.mjs +256 -0
- package/cli/lib/internal/doctor-finalize.mjs +385 -0
- package/cli/lib/internal/doctor-format.mjs +286 -0
- package/cli/lib/internal/doctor-inspectors.mjs +294 -0
- package/cli/lib/internal/doctor-state.mjs +205 -0
- package/cli/lib/internal/governance/ai/ai-context-budget-core.mjs +315 -0
- package/cli/lib/internal/governance/ai/ai-structure-budget-core.mjs +358 -0
- package/cli/lib/internal/governance/ai/check-agents-freshness.mjs +155 -0
- package/cli/lib/internal/governance/ai/check-high-risk-doc-metadata-core.mjs +173 -0
- package/cli/lib/internal/governance/config.mjs +150 -0
- package/cli/lib/internal/governance/runner.mjs +35 -0
- package/cli/lib/internal/governance/shared/read-yaml-with-fragments.mjs +49 -0
- package/cli/lib/internal/validators-artifacts.mjs +515 -0
- package/cli/lib/internal/validators-shared.mjs +28 -0
- package/cli/lib/internal/validators-spec-helpers.mjs +186 -0
- package/cli/lib/internal/validators-spec.mjs +410 -0
- package/cli/lib/shared.mjs +83 -0
- package/cli/lib/topic-draft-packets.mjs +48 -0
- package/cli/lib/topic-goal.mjs +361 -0
- package/cli/lib/topic-runner.mjs +772 -0
- package/cli/lib/topic.mjs +93 -0
- package/cli/lib/ui.mjs +178 -0
- package/cli/lib/validators.mjs +78 -0
- package/cli/lib/value-helpers.mjs +24 -0
- package/cli/lib/yaml-helpers.mjs +133 -0
- package/cli/nimicoding.mjs +1 -0
- package/cli/seeds/bootstrap.mjs +47 -0
- package/config/audit-execution-artifacts.yaml +20 -0
- package/config/bootstrap.yaml +6 -0
- package/config/external-execution-artifacts.yaml +16 -0
- package/config/host-adapter.yaml +30 -0
- package/config/host-profile.yaml +29 -0
- package/config/installer-evidence.yaml +31 -0
- package/config/skill-installer.yaml +23 -0
- package/config/skill-manifest.yaml +46 -0
- package/config/skills.yaml +30 -0
- package/config/spec-generation-inputs.yaml +25 -0
- package/contracts/acceptance.schema.yaml +16 -0
- package/contracts/admission-checklist.schema.yaml +15 -0
- package/contracts/audit-chunk.schema.yaml +110 -0
- package/contracts/audit-closeout.schema.yaml +51 -0
- package/contracts/audit-finding.schema.yaml +61 -0
- package/contracts/audit-ledger.schema.yaml +138 -0
- package/contracts/audit-plan.schema.yaml +123 -0
- package/contracts/audit-remediation-map.schema.yaml +51 -0
- package/contracts/audit-rerun.schema.yaml +31 -0
- package/contracts/audit-sweep-result.yaml +49 -0
- package/contracts/authority-convergence-audit.schema.yaml +19 -0
- package/contracts/closeout.schema.yaml +25 -0
- package/contracts/decision-review.schema.yaml +16 -0
- package/contracts/doc-spec-audit-result.yaml +19 -0
- package/contracts/execution-packet.schema.yaml +49 -0
- package/contracts/external-host-compatibility.yaml +22 -0
- package/contracts/forbidden-shortcuts.catalog.yaml +23 -0
- package/contracts/high-risk-admission.schema.yaml +23 -0
- package/contracts/high-risk-execution-result.yaml +20 -0
- package/contracts/orchestration-state.schema.yaml +41 -0
- package/contracts/overflow-continuation.schema.yaml +12 -0
- package/contracts/packet.schema.yaml +30 -0
- package/contracts/pending-note.schema.yaml +17 -0
- package/contracts/prompt.schema.yaml +12 -0
- package/contracts/remediation.schema.yaml +16 -0
- package/contracts/result.schema.yaml +24 -0
- package/contracts/spec-generation-audit.schema.yaml +31 -0
- package/contracts/spec-generation-inputs.schema.yaml +39 -0
- package/contracts/spec-reconstruction-result.yaml +37 -0
- package/contracts/topic-goal.schema.yaml +78 -0
- package/contracts/topic-run-ledger.schema.yaml +72 -0
- package/contracts/topic-step-decision.schema.yaml +45 -0
- package/contracts/topic.schema.yaml +65 -0
- package/contracts/true-close.schema.yaml +15 -0
- package/contracts/wave.schema.yaml +29 -0
- package/contracts/worker-output.schema.yaml +15 -0
- package/methodology/audit-sweep-p0p1-recall.yaml +45 -0
- package/methodology/authority-convergence-policy.yaml +42 -0
- package/methodology/core.yaml +25 -0
- package/methodology/four-closure-policy.yaml +28 -0
- package/methodology/overflow-continuation-policy.yaml +14 -0
- package/methodology/role-separation-policy.yaml +28 -0
- package/methodology/skill-exchange-projection.yaml +114 -0
- package/methodology/skill-handoff.yaml +34 -0
- package/methodology/skill-installer-result.yaml +27 -0
- package/methodology/skill-installer-summary-projection.yaml +181 -0
- package/methodology/skill-runtime.yaml +23 -0
- package/methodology/spec-reconstruction.yaml +63 -0
- package/methodology/spec-target-truth-profile.yaml +53 -0
- package/methodology/topic-lifecycle-report.yaml +144 -0
- package/methodology/topic-lifecycle.yaml +37 -0
- package/methodology/topic-naming-ontology.yaml +21 -0
- package/methodology/topic-ontology.yaml +38 -0
- package/methodology/topic-validation-policy.yaml +9 -0
- package/methodology/wave-dag-policy.yaml +14 -0
- package/package.json +50 -0
- package/spec/_meta/command-gating-matrix.yaml +110 -0
- package/spec/_meta/generate-drift-migration-checklist.yaml +155 -0
- package/spec/_meta/governance-routing-cutover-checklist.yaml +35 -0
- package/spec/_meta/phase2-impacted-surface-matrix.yaml +44 -0
- package/spec/_meta/spec-authority-cutover-readiness.yaml +104 -0
- package/spec/_meta/spec-tree-model.yaml +72 -0
- package/spec/bootstrap-state.yaml +99 -0
- package/spec/product-scope.yaml +56 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: nimi-coding.orchestration-state.v1
|
|
2
|
+
kind: orchestration-state
|
|
3
|
+
required:
|
|
4
|
+
- state_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- packet_ref
|
|
7
|
+
- run_status
|
|
8
|
+
- current_phase_id
|
|
9
|
+
- last_completed_phase_id
|
|
10
|
+
- awaiting_human_action
|
|
11
|
+
- updated_at
|
|
12
|
+
- owner
|
|
13
|
+
optional:
|
|
14
|
+
- pause_reason
|
|
15
|
+
- notification_refs
|
|
16
|
+
- current_prompt_ref
|
|
17
|
+
- latest_worker_output_ref
|
|
18
|
+
- latest_acceptance_ref
|
|
19
|
+
- latest_evidence_refs
|
|
20
|
+
- started_at
|
|
21
|
+
run_status_enum:
|
|
22
|
+
- running
|
|
23
|
+
- paused
|
|
24
|
+
- awaiting_confirmation
|
|
25
|
+
- completed
|
|
26
|
+
- failed
|
|
27
|
+
- superseded
|
|
28
|
+
notification_ref_required:
|
|
29
|
+
- event
|
|
30
|
+
- correlation_id
|
|
31
|
+
rules:
|
|
32
|
+
- packet_ref must resolve to an execution packet artifact
|
|
33
|
+
- current_phase_id and last_completed_phase_id must be null or existing packet phase ids
|
|
34
|
+
- running state requires current_phase_id
|
|
35
|
+
- paused state requires current_phase_id, pause_reason, and awaiting_human_action
|
|
36
|
+
- awaiting_confirmation state requires current_phase_id and awaiting_human_action and is legacy-only for older runs
|
|
37
|
+
- failed state requires awaiting_human_action
|
|
38
|
+
- completed state requires last_completed_phase_id and must not carry current_phase_id, awaiting_human_action, or pause_reason
|
|
39
|
+
- resume_token and transport secrets are forbidden
|
|
40
|
+
- notification_refs entries may track event/correlation emission refs, but they must not become notification log state ownership
|
|
41
|
+
- orchestration state must not encode semantic acceptance or finding judgments
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
id: nimicoding.overflow-continuation.v1
|
|
2
|
+
kind: overflow-continuation
|
|
3
|
+
required:
|
|
4
|
+
- topic_id
|
|
5
|
+
- wave_id
|
|
6
|
+
- overflowed_packet_id
|
|
7
|
+
- manager_judgement
|
|
8
|
+
- continuation_packet_id
|
|
9
|
+
- same_owner_domain
|
|
10
|
+
rules:
|
|
11
|
+
- overflow continuation must not be used to hide a cross-domain scope expansion
|
|
12
|
+
- same_owner_domain must be explicit and true before continuation is admitted
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
id: nimicoding.topic-packet.v1
|
|
2
|
+
kind: topic-packet
|
|
3
|
+
required:
|
|
4
|
+
- packet_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- wave_id
|
|
7
|
+
- packet_kind
|
|
8
|
+
- status
|
|
9
|
+
- authority_owner
|
|
10
|
+
- canonical_seams
|
|
11
|
+
- forbidden_shortcuts
|
|
12
|
+
- acceptance_invariants
|
|
13
|
+
- negative_tests
|
|
14
|
+
- reopen_conditions
|
|
15
|
+
status_enum:
|
|
16
|
+
- draft
|
|
17
|
+
- preflight
|
|
18
|
+
- candidate
|
|
19
|
+
- admitted
|
|
20
|
+
- dispatched
|
|
21
|
+
- closed
|
|
22
|
+
- superseded
|
|
23
|
+
freeze_allowed_status_enum:
|
|
24
|
+
- draft
|
|
25
|
+
- preflight
|
|
26
|
+
- candidate
|
|
27
|
+
rules:
|
|
28
|
+
- packet must not be admitted unless all six design fields are explicit
|
|
29
|
+
- packet must name only one primary wave owner domain
|
|
30
|
+
- packet must not encode scheduler/runtime transport ownership
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: nimicoding.pending-note.v1
|
|
2
|
+
kind: pending-note
|
|
3
|
+
required:
|
|
4
|
+
- pending_note_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- entered_from_state
|
|
7
|
+
- reason
|
|
8
|
+
- summary
|
|
9
|
+
- status
|
|
10
|
+
status_enum:
|
|
11
|
+
- active
|
|
12
|
+
- resumed
|
|
13
|
+
- closed
|
|
14
|
+
rules:
|
|
15
|
+
- pending note must exist before topic enters pending
|
|
16
|
+
- pending note must declare explicit reopen criteria or close trigger
|
|
17
|
+
- pending note must not coexist with active implementation tracking
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
id: nimi-coding.prompt.v1
|
|
2
|
+
kind: prompt
|
|
3
|
+
required_blocks:
|
|
4
|
+
- Task Goal
|
|
5
|
+
- Authority Reads
|
|
6
|
+
- Confirmed State
|
|
7
|
+
- Hard Constraints
|
|
8
|
+
- Must Complete
|
|
9
|
+
- Explicit Non-Goals
|
|
10
|
+
- Required Checks
|
|
11
|
+
- Required Final Output Format
|
|
12
|
+
- Blocker Escalation Rule
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
id: nimicoding.remediation.v1
|
|
2
|
+
kind: remediation
|
|
3
|
+
required:
|
|
4
|
+
- remediation_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- wave_id
|
|
7
|
+
- kind
|
|
8
|
+
- reason
|
|
9
|
+
kind_enum:
|
|
10
|
+
- a
|
|
11
|
+
- b
|
|
12
|
+
- continuation
|
|
13
|
+
- execution_state_closure
|
|
14
|
+
rules:
|
|
15
|
+
- remediation kind must use a package-owned enum
|
|
16
|
+
- continuation remediation must preserve packet lineage to the overflowed scope
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
id: nimicoding.topic-result.v1
|
|
2
|
+
kind: topic-result
|
|
3
|
+
required:
|
|
4
|
+
- result_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- wave_id
|
|
7
|
+
- result_kind
|
|
8
|
+
- verdict
|
|
9
|
+
- verified_at
|
|
10
|
+
verified_at_format: iso8601_utc_timestamp
|
|
11
|
+
verdict_enum:
|
|
12
|
+
- PASS
|
|
13
|
+
- NEEDS_REVISION
|
|
14
|
+
- FAIL
|
|
15
|
+
- OVERFLOW
|
|
16
|
+
result_kind_enum:
|
|
17
|
+
- preflight
|
|
18
|
+
- implementation
|
|
19
|
+
- audit
|
|
20
|
+
- judgement
|
|
21
|
+
rules:
|
|
22
|
+
- OVERFLOW is distinct from PASS and FAIL
|
|
23
|
+
- audit verdict must not be stronger than attached evidence
|
|
24
|
+
- result must not silently reopen a retired wave
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
audit_contract:
|
|
3
|
+
id: canonical_spec_generation_audit
|
|
4
|
+
target_ref: .nimi/spec/_meta/spec-generation-audit.yaml
|
|
5
|
+
required_top_level_fields:
|
|
6
|
+
- generation_mode
|
|
7
|
+
- canonical_target_root
|
|
8
|
+
- declared_profile
|
|
9
|
+
- input_roots
|
|
10
|
+
- files
|
|
11
|
+
required_file_entry_fields:
|
|
12
|
+
- canonical_path
|
|
13
|
+
- file_class
|
|
14
|
+
- source_refs
|
|
15
|
+
- source_basis
|
|
16
|
+
- coverage_status
|
|
17
|
+
- unresolved_items
|
|
18
|
+
source_basis_enum:
|
|
19
|
+
- grounded
|
|
20
|
+
- mixed_grounded_and_inferred
|
|
21
|
+
- inferred
|
|
22
|
+
coverage_status_enum:
|
|
23
|
+
- complete
|
|
24
|
+
- partial
|
|
25
|
+
- placeholder_not_allowed
|
|
26
|
+
hard_constraints:
|
|
27
|
+
- every_generated_canonical_file_requires_a_matching_audit_entry
|
|
28
|
+
- required_canonical_files_must_not_be_placeholder_not_allowed
|
|
29
|
+
- unresolved_or_inferred_content_must_be_explicit
|
|
30
|
+
- source_refs_must_stay_within_declared_inputs_or_optional_benchmark_root
|
|
31
|
+
- no_empty_success_looking_audit_entries
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
input_contract:
|
|
3
|
+
id: canonical_spec_generation_inputs
|
|
4
|
+
target_root: .nimi/spec
|
|
5
|
+
mode_enum:
|
|
6
|
+
- mixed
|
|
7
|
+
benchmark_mode_enum:
|
|
8
|
+
- none
|
|
9
|
+
- repo_spec_blueprint
|
|
10
|
+
- custom_blueprint
|
|
11
|
+
acceptance_mode_enum:
|
|
12
|
+
- canonical_tree_validity_without_blueprint
|
|
13
|
+
- semantic_and_structural_parity_when_blueprint_exists
|
|
14
|
+
required_fields:
|
|
15
|
+
- mode
|
|
16
|
+
- canonical_target_root
|
|
17
|
+
- code_roots
|
|
18
|
+
- docs_roots
|
|
19
|
+
- structure_roots
|
|
20
|
+
- human_note_paths
|
|
21
|
+
- benchmark_blueprint_root
|
|
22
|
+
- benchmark_mode
|
|
23
|
+
- acceptance_mode
|
|
24
|
+
- generation_order
|
|
25
|
+
- inference_rules
|
|
26
|
+
generation_order_enum:
|
|
27
|
+
- index
|
|
28
|
+
- kernel_markdown
|
|
29
|
+
- kernel_tables
|
|
30
|
+
- generated_views
|
|
31
|
+
- thin_guides
|
|
32
|
+
hard_constraints:
|
|
33
|
+
- canonical_target_root_must_be_.nimi/spec
|
|
34
|
+
- benchmark_blueprint_root_is_optional
|
|
35
|
+
- benchmark_blueprint_root_must_not_be_required_for_ordinary_projects
|
|
36
|
+
- mixed_inputs_may_include_code_docs_structure_and_human_notes
|
|
37
|
+
- kernel_markdown_and_kernel_tables_take_priority_over_generated_views_and_guides
|
|
38
|
+
- local_report_markdown_paths_must_use_topic_lifecycle_shape
|
|
39
|
+
- human_authored_topic_reports_must_use_.nimi/topics_as_canonical_root
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
result_contract:
|
|
3
|
+
id: delegated_spec_reconstruction_result
|
|
4
|
+
summary_required_fields:
|
|
5
|
+
- generated_paths
|
|
6
|
+
- audit_ref
|
|
7
|
+
- coverage_summary
|
|
8
|
+
- unresolved_file_count
|
|
9
|
+
- inferred_file_count
|
|
10
|
+
- status
|
|
11
|
+
- summary
|
|
12
|
+
- verified_at
|
|
13
|
+
summary_status_enum:
|
|
14
|
+
- reconstructed
|
|
15
|
+
- partial
|
|
16
|
+
- blocked
|
|
17
|
+
canonical_tree_completion:
|
|
18
|
+
profile_ref: .nimi/spec/_meta/spec-tree-model.yaml
|
|
19
|
+
generation_inputs_ref: .nimi/config/spec-generation-inputs.yaml
|
|
20
|
+
audit_contract_ref: .nimi/contracts/spec-generation-audit.schema.yaml
|
|
21
|
+
audit_ref: .nimi/spec/_meta/spec-generation-audit.yaml
|
|
22
|
+
required_tree_state: canonical_tree_ready
|
|
23
|
+
required_files_valid: true
|
|
24
|
+
completion_requirements:
|
|
25
|
+
- canonical_tree_ready
|
|
26
|
+
- declared_profile_required_files_valid
|
|
27
|
+
- declared_file_class_constraints_valid
|
|
28
|
+
- spec_generation_audit_present_and_valid
|
|
29
|
+
- required_canonical_files_have_matching_audit_entries
|
|
30
|
+
- unresolved_gaps_must_remain_explicit
|
|
31
|
+
- blocked_must_be_reported_by_the_external_host
|
|
32
|
+
- semantic_and_structural_parity_when_blueprint_exists
|
|
33
|
+
locality: local_only
|
|
34
|
+
semantic_constraints:
|
|
35
|
+
- do_not_promote_closeout_summary_to_project_truth
|
|
36
|
+
- treat_declared_blueprint_as_benchmark_only_not_canonical_output_root
|
|
37
|
+
- completed_reconstruction_means_reconstructed_or_partial_only
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
id: nimicoding.topic-goal.v1
|
|
2
|
+
kind: topic-goal-readiness-result
|
|
3
|
+
canonical_owner: nimi-coding/contracts/topic-goal.schema.yaml
|
|
4
|
+
host_projection_ref: .nimi/contracts/topic-goal.schema.yaml
|
|
5
|
+
projection_rule: host projection must be byte-aligned with this package contract
|
|
6
|
+
output_contract:
|
|
7
|
+
required:
|
|
8
|
+
- ok
|
|
9
|
+
- topic_id
|
|
10
|
+
- topic_ref
|
|
11
|
+
- topic_state
|
|
12
|
+
- true_close_status
|
|
13
|
+
- profile
|
|
14
|
+
- selected_next_target
|
|
15
|
+
- selected_wave_id
|
|
16
|
+
- topic_state_hash
|
|
17
|
+
- readiness
|
|
18
|
+
- goal_command
|
|
19
|
+
- source_artifacts
|
|
20
|
+
- validation_commands
|
|
21
|
+
- human_gates
|
|
22
|
+
- refusal_reasons
|
|
23
|
+
nullable:
|
|
24
|
+
- selected_wave_id
|
|
25
|
+
- goal_command
|
|
26
|
+
readiness_check_shape:
|
|
27
|
+
required:
|
|
28
|
+
- id
|
|
29
|
+
- status
|
|
30
|
+
- severity
|
|
31
|
+
- message
|
|
32
|
+
status_enum:
|
|
33
|
+
- pass
|
|
34
|
+
- fail
|
|
35
|
+
severity_enum:
|
|
36
|
+
- info
|
|
37
|
+
- blocking
|
|
38
|
+
validation_command_shape:
|
|
39
|
+
required:
|
|
40
|
+
- command
|
|
41
|
+
- cwd
|
|
42
|
+
- profile
|
|
43
|
+
- scope
|
|
44
|
+
- required
|
|
45
|
+
- expected_exit_code
|
|
46
|
+
refusal_reason_enum:
|
|
47
|
+
- topic_validate_failed
|
|
48
|
+
- topic_graph_validate_failed
|
|
49
|
+
- topic_not_ongoing
|
|
50
|
+
- true_close_not_started_required
|
|
51
|
+
- strict_policy_ignored
|
|
52
|
+
- parallel_truth_not_forbidden
|
|
53
|
+
- unknown_profile
|
|
54
|
+
- selected_target_not_wave
|
|
55
|
+
- selected_wave_mismatch
|
|
56
|
+
- wave_override_forbidden
|
|
57
|
+
- selected_wave_not_executable
|
|
58
|
+
- dependency_not_terminal
|
|
59
|
+
- missing_primary_closure_goal
|
|
60
|
+
- forbidden_shortcuts_incomplete
|
|
61
|
+
- forbidden_shortcuts_catalog_drift
|
|
62
|
+
- required_artifact_missing
|
|
63
|
+
- unresolved_placeholder
|
|
64
|
+
- stop_line_missing
|
|
65
|
+
- human_gates_missing
|
|
66
|
+
- validation_commands_missing
|
|
67
|
+
- closeout_criteria_missing
|
|
68
|
+
- authority_owner_missing
|
|
69
|
+
- work_type_missing
|
|
70
|
+
- authority_alignment_missing
|
|
71
|
+
- host_projection_drift
|
|
72
|
+
- goal_too_large
|
|
73
|
+
rules:
|
|
74
|
+
- slash output is emitted only when ok=true
|
|
75
|
+
- json output is emitted for ready and refused cases
|
|
76
|
+
- goal_command must be null whenever ok=false
|
|
77
|
+
- topic-goal output is a projection and must not mutate topic state
|
|
78
|
+
- host projection drift is a readiness refusal when the host projection exists
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
id: nimicoding.topic-run-ledger.v1
|
|
2
|
+
kind: topic-run-ledger
|
|
3
|
+
ledger_required:
|
|
4
|
+
- ledger_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- run_id
|
|
7
|
+
- kind
|
|
8
|
+
- run_status
|
|
9
|
+
- event_count
|
|
10
|
+
- event_refs
|
|
11
|
+
- latest_event_ref
|
|
12
|
+
- current_wave_id
|
|
13
|
+
- latest_decision_ref
|
|
14
|
+
- latest_packet_ref
|
|
15
|
+
- latest_prompt_ref
|
|
16
|
+
- latest_result_ref
|
|
17
|
+
- latest_closeout_ref
|
|
18
|
+
- current_human_gate
|
|
19
|
+
- retry_posture
|
|
20
|
+
- updated_at
|
|
21
|
+
event_required:
|
|
22
|
+
- event_id
|
|
23
|
+
- topic_id
|
|
24
|
+
- run_id
|
|
25
|
+
- event_index
|
|
26
|
+
- event_kind
|
|
27
|
+
- stop_class
|
|
28
|
+
- recommended_action
|
|
29
|
+
- source_ref
|
|
30
|
+
- summary
|
|
31
|
+
- recorded_at
|
|
32
|
+
- artifact_refs
|
|
33
|
+
event_kind_enum:
|
|
34
|
+
- decision_emitted
|
|
35
|
+
- wave_admitted
|
|
36
|
+
- packet_frozen
|
|
37
|
+
- worker_dispatched
|
|
38
|
+
- audit_dispatched
|
|
39
|
+
- result_recorded
|
|
40
|
+
- human_gate_opened
|
|
41
|
+
- human_gate_resolved
|
|
42
|
+
- wave_closed
|
|
43
|
+
- topic_closed
|
|
44
|
+
- runner_blocked
|
|
45
|
+
run_status_enum:
|
|
46
|
+
- running
|
|
47
|
+
- awaiting_human_confirmation
|
|
48
|
+
- awaiting_external_evidence
|
|
49
|
+
- blocked
|
|
50
|
+
- completed
|
|
51
|
+
artifact_ref_keys:
|
|
52
|
+
- decision_ref
|
|
53
|
+
- packet_ref
|
|
54
|
+
- prompt_ref
|
|
55
|
+
- worker_output_ref
|
|
56
|
+
- audit_output_ref
|
|
57
|
+
- result_ref
|
|
58
|
+
- closeout_ref
|
|
59
|
+
- evidence_ref
|
|
60
|
+
retry_posture_enum:
|
|
61
|
+
- not_applicable
|
|
62
|
+
- retry_allowed_same_command
|
|
63
|
+
- retry_requires_new_packet
|
|
64
|
+
- retry_forbidden_until_human_gate
|
|
65
|
+
rules:
|
|
66
|
+
- run events are append-only topic artifacts
|
|
67
|
+
- the ledger is a rebuildable projection from run events
|
|
68
|
+
- event stop_class and recommended_action must use the topic-step-decision contract enums
|
|
69
|
+
- continue events may record mechanically executed wave admission, packet freeze, and dispatch lineage without opening a human gate
|
|
70
|
+
- require_human_confirmation opens current_human_gate unless resolved by a later human_gate_resolved event
|
|
71
|
+
- completed must not imply semantic promotion or true-close
|
|
72
|
+
- no event may encode transport secrets or host resume tokens
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
id: nimicoding.topic-step-decision.v1
|
|
2
|
+
kind: topic-step-decision
|
|
3
|
+
required:
|
|
4
|
+
- decision_id
|
|
5
|
+
- topic_id
|
|
6
|
+
- wave_id
|
|
7
|
+
- decision_kind
|
|
8
|
+
- stop_class
|
|
9
|
+
- recommended_action
|
|
10
|
+
- reason_code
|
|
11
|
+
- requires_human_confirmation
|
|
12
|
+
- recommended_decision
|
|
13
|
+
- recommendation_rationale
|
|
14
|
+
- expected_artifacts
|
|
15
|
+
- next_command_ref
|
|
16
|
+
stop_class_enum:
|
|
17
|
+
- continue
|
|
18
|
+
- require_human_confirmation
|
|
19
|
+
- await_external_evidence
|
|
20
|
+
- blocked
|
|
21
|
+
- completed
|
|
22
|
+
recommended_action_enum:
|
|
23
|
+
- admit_wave
|
|
24
|
+
- freeze_packet
|
|
25
|
+
- dispatch_worker
|
|
26
|
+
- dispatch_audit
|
|
27
|
+
- record_result
|
|
28
|
+
- open_remediation
|
|
29
|
+
- continue_overflow
|
|
30
|
+
- hold_topic
|
|
31
|
+
- resume_topic
|
|
32
|
+
- closeout_wave
|
|
33
|
+
- closeout_topic
|
|
34
|
+
- no_action
|
|
35
|
+
rules:
|
|
36
|
+
- continue must carry a concrete placeholder-free next_command_ref for a mechanically executable package-owned command
|
|
37
|
+
- continue may represent a lifecycle transition when the selected target and command inputs are uniquely determined
|
|
38
|
+
- require_human_confirmation must carry a recommended_decision and recommendation_rationale
|
|
39
|
+
- require_human_confirmation is reserved for manager judgement, branch selection, ambiguous input, overflow continuation, or other non-mechanical gates
|
|
40
|
+
- phase transitions must use continue when selected target and command inputs are uniquely determined, including lineage-backed wave closeout and dependency-ready next-wave admission
|
|
41
|
+
- post-spec-update review is the exception to mechanical phase transition continuation; after a spec/authority/redesign implementation PASS, run-next-step must use require_human_confirmation with reason_code=spec_update_review_required until a fresh judgement PASS is recorded
|
|
42
|
+
- await_external_evidence must be used when worker, audit, or result evidence is not yet available
|
|
43
|
+
- blocked must carry blocking_checks or a reason_code that names the failed gate
|
|
44
|
+
- completed must not imply semantic promotion or true-close
|
|
45
|
+
- decision output must not mutate topic state
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
id: nimicoding.topic.v1
|
|
2
|
+
kind: topic
|
|
3
|
+
required:
|
|
4
|
+
- topic_id
|
|
5
|
+
- state
|
|
6
|
+
- created_at
|
|
7
|
+
- last_transition_at
|
|
8
|
+
- last_transition_reason
|
|
9
|
+
- title
|
|
10
|
+
- mode
|
|
11
|
+
- posture
|
|
12
|
+
- design_policy
|
|
13
|
+
- parallel_truth
|
|
14
|
+
- layering
|
|
15
|
+
- risk
|
|
16
|
+
- applicability
|
|
17
|
+
- entry_justification
|
|
18
|
+
- execution_mode
|
|
19
|
+
- selected_next_target
|
|
20
|
+
- current_true_close_status
|
|
21
|
+
- forbidden_shortcuts
|
|
22
|
+
state_enum:
|
|
23
|
+
- proposal
|
|
24
|
+
- ongoing
|
|
25
|
+
- pending
|
|
26
|
+
- closed
|
|
27
|
+
mode_enum:
|
|
28
|
+
- greenfield
|
|
29
|
+
- landed
|
|
30
|
+
- superseding
|
|
31
|
+
posture_enum:
|
|
32
|
+
- no_legacy_hard_cut
|
|
33
|
+
- backward_compat
|
|
34
|
+
design_policy_enum:
|
|
35
|
+
- complete_contract_first
|
|
36
|
+
- mvp_incremental
|
|
37
|
+
parallel_truth_enum:
|
|
38
|
+
- forbidden
|
|
39
|
+
- admitted
|
|
40
|
+
layering_enum:
|
|
41
|
+
- ontology
|
|
42
|
+
- time_phased
|
|
43
|
+
risk_enum:
|
|
44
|
+
- high
|
|
45
|
+
- low
|
|
46
|
+
applicability_enum:
|
|
47
|
+
- authority_bearing
|
|
48
|
+
- high_risk_refactor
|
|
49
|
+
- multi_wave_iteration
|
|
50
|
+
- complex_remediation
|
|
51
|
+
execution_mode_enum:
|
|
52
|
+
- inline_manager_worker
|
|
53
|
+
- manager_worker_auditor
|
|
54
|
+
true_close_status_enum:
|
|
55
|
+
- not_started
|
|
56
|
+
- pending
|
|
57
|
+
- true_closed
|
|
58
|
+
- revoked
|
|
59
|
+
- superseded
|
|
60
|
+
rules:
|
|
61
|
+
- topic_id must remain date-first and sortable
|
|
62
|
+
- state records coarse lifecycle root posture, not every fine-grained machine state
|
|
63
|
+
- low-risk topics are exceptional and require explicit entry_justification
|
|
64
|
+
- topic must not exist without a selected_next_target once active execution is admitted
|
|
65
|
+
- forbidden_shortcuts must use package-owned catalog keys or declared topic-local extensions
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
id: nimicoding.true-close.v1
|
|
2
|
+
kind: true-close
|
|
3
|
+
required:
|
|
4
|
+
- topic_id
|
|
5
|
+
- status
|
|
6
|
+
- audit_ref
|
|
7
|
+
- judgement_ref
|
|
8
|
+
status_enum:
|
|
9
|
+
- pending
|
|
10
|
+
- passed
|
|
11
|
+
- revoked
|
|
12
|
+
- superseded
|
|
13
|
+
rules:
|
|
14
|
+
- passed true close may later become revoked
|
|
15
|
+
- revoked true close must point at the follow-up audit or remediation lineage
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
id: nimicoding.wave.v1
|
|
2
|
+
kind: wave
|
|
3
|
+
required:
|
|
4
|
+
- wave_id
|
|
5
|
+
- slug
|
|
6
|
+
- state
|
|
7
|
+
- primary_closure_goal
|
|
8
|
+
- deps
|
|
9
|
+
- owner_domain
|
|
10
|
+
- parallelizable_after
|
|
11
|
+
- selected
|
|
12
|
+
state_enum:
|
|
13
|
+
- candidate
|
|
14
|
+
- preflight_draft
|
|
15
|
+
- preflight_admitted
|
|
16
|
+
- implementation_admitted
|
|
17
|
+
- implementation_active
|
|
18
|
+
- needs_revision
|
|
19
|
+
- overflowed
|
|
20
|
+
- continuation_packet_open
|
|
21
|
+
- closed
|
|
22
|
+
- retired
|
|
23
|
+
- superseded
|
|
24
|
+
rules:
|
|
25
|
+
- deps must reference only existing wave ids inside the same topic
|
|
26
|
+
- selected true is allowed for at most one active wave in a topic
|
|
27
|
+
- retired or superseded waves must not remain dispatchable
|
|
28
|
+
- overflowed is a lifecycle state and must not be normalized to closed without explicit continuation or trim judgement
|
|
29
|
+
- continuation_packet_open means overflow continuation has been explicitly admitted and linked to a frozen continuation packet
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
id: nimi-coding.worker-output.v1
|
|
2
|
+
kind: worker-output
|
|
3
|
+
required_blocks:
|
|
4
|
+
- Findings
|
|
5
|
+
- Implementation summary
|
|
6
|
+
- Files changed
|
|
7
|
+
- Checks run
|
|
8
|
+
- Remaining gaps / risks
|
|
9
|
+
- Runner Signal
|
|
10
|
+
optional_blocks:
|
|
11
|
+
- Chosen decision
|
|
12
|
+
- Authority / spec impact
|
|
13
|
+
- Guard behavior decision
|
|
14
|
+
- Next implementation step
|
|
15
|
+
- Remaining blockers
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
methodology:
|
|
3
|
+
id: audit_sweep_p0p1_recall
|
|
4
|
+
owner: nimi-coding/audit-sweep
|
|
5
|
+
purpose: Increase critical/high finding recall without turning every sweep into
|
|
6
|
+
an unbounded full audit.
|
|
7
|
+
activation_criteria:
|
|
8
|
+
- p0p1
|
|
9
|
+
- p0-p1
|
|
10
|
+
- p0
|
|
11
|
+
- p1
|
|
12
|
+
- critical-high
|
|
13
|
+
- critical_high
|
|
14
|
+
strategy:
|
|
15
|
+
mode: p0_p1_triage_then_deep
|
|
16
|
+
stages:
|
|
17
|
+
- triage every selected chunk against priority P0/P1 defect classes
|
|
18
|
+
- deep-audit only candidate P0/P1 signals, high-risk owner domains, or
|
|
19
|
+
calibration expected-defect chunks
|
|
20
|
+
- cluster duplicate symptoms under one canonical root-cause finding
|
|
21
|
+
- pause discovery when risk budget gates require remediation or admission
|
|
22
|
+
severity_mapping:
|
|
23
|
+
p0: critical
|
|
24
|
+
p1: high
|
|
25
|
+
priority_defect_classes:
|
|
26
|
+
- fail_open_or_pseudo_success
|
|
27
|
+
- authority_boundary_bypass
|
|
28
|
+
- unadmitted_truth_or_evidence_source
|
|
29
|
+
- partial_coverage_misrepresented_as_complete
|
|
30
|
+
- state_divergence_or_lost_update
|
|
31
|
+
- security_or_permission_bypass
|
|
32
|
+
- destructive_action_without_gate
|
|
33
|
+
- package_boundary_violation
|
|
34
|
+
no_p0p1_finding_requirement:
|
|
35
|
+
required: true
|
|
36
|
+
reasoning_field: coverage.p0p1_negative_reasoning
|
|
37
|
+
evidence_refs_field: coverage.p0p1_evidence_refs
|
|
38
|
+
evidence_refs_must_include_implementation: true
|
|
39
|
+
summary: If no critical/high finding is emitted, the auditor must explain why
|
|
40
|
+
applicable priority defect classes did not produce a P0/P1 issue and cite
|
|
41
|
+
implementation evidence.
|
|
42
|
+
non_goals:
|
|
43
|
+
- exhaustive proof that no issue exists
|
|
44
|
+
- new finding output format
|
|
45
|
+
- treating calibration fixture metadata as product findings
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
authority_convergence_policy:
|
|
3
|
+
gate_id: pre_implementation_authority_convergence
|
|
4
|
+
purpose: >
|
|
5
|
+
Require an independent auditor pass after authority/spec changes and before
|
|
6
|
+
implementation dispatch, without making any concrete AI host runtime part of
|
|
7
|
+
nimicoding semantic truth.
|
|
8
|
+
trigger_packet_kinds:
|
|
9
|
+
- authority
|
|
10
|
+
- spec
|
|
11
|
+
- redesign
|
|
12
|
+
- preflight
|
|
13
|
+
trigger_ref_prefixes:
|
|
14
|
+
- .nimi/spec/
|
|
15
|
+
trigger_topic_fields:
|
|
16
|
+
work_type:
|
|
17
|
+
- redesign
|
|
18
|
+
required_result:
|
|
19
|
+
result_kind: audit
|
|
20
|
+
pass_verdict: PASS
|
|
21
|
+
post_update_review:
|
|
22
|
+
trigger_packet_kinds:
|
|
23
|
+
- authority
|
|
24
|
+
- spec
|
|
25
|
+
- redesign
|
|
26
|
+
trigger_ref_prefixes:
|
|
27
|
+
- .nimi/spec/
|
|
28
|
+
required_result:
|
|
29
|
+
result_kind: judgement
|
|
30
|
+
pass_verdict: PASS
|
|
31
|
+
blocked_verdicts:
|
|
32
|
+
- NEEDS_REVISION
|
|
33
|
+
- FAIL
|
|
34
|
+
dispatch:
|
|
35
|
+
pre_implementation_role: auditor
|
|
36
|
+
implementation_role: worker
|
|
37
|
+
hard_constraints:
|
|
38
|
+
- auditor_output_is_candidate_evidence_only
|
|
39
|
+
- manager_records_audit_result_before_implementation_dispatch
|
|
40
|
+
- unresolved_blocking_findings_fail_closed
|
|
41
|
+
- deferred_items_must_be_explicitly_non_blocking
|
|
42
|
+
- concrete_subagent_mechanics_belong_to_adapter_profiles_not_methodology_semantics
|