@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nimi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
# @nimiplatform/nimi-coding
|
|
2
|
+
|
|
3
|
+
`@nimiplatform/nimi-coding` is the standalone host-agnostic boundary package
|
|
4
|
+
for the Nimi Coding methodology.
|
|
5
|
+
|
|
6
|
+
The product goal is to let arbitrary projects install a reusable AI coding
|
|
7
|
+
governance toolkit, bootstrap a project-local `.nimi/**` layer, and then use
|
|
8
|
+
AI-native authority, packet, and acceptance discipline for high-risk work.
|
|
9
|
+
|
|
10
|
+
## Primary Path
|
|
11
|
+
|
|
12
|
+
The primary `nimicoding` path is for an ordinary project with mixed inputs:
|
|
13
|
+
|
|
14
|
+
1. gather code/docs/structure/human notes
|
|
15
|
+
2. hand off `spec_reconstruction` to an external host
|
|
16
|
+
3. generate a canonical tree under `/.nimi/spec/**`
|
|
17
|
+
4. run `validate-spec-tree`
|
|
18
|
+
5. run `validate-spec-audit`
|
|
19
|
+
6. close out reconstruction
|
|
20
|
+
7. hand off `doc_spec_audit` and close it out locally
|
|
21
|
+
|
|
22
|
+
`blueprint-audit`, benchmark parity, and direct-copy helpers remain available,
|
|
23
|
+
but they are support-only or repo-local special cases. They do not define
|
|
24
|
+
default reconstruction completion.
|
|
25
|
+
|
|
26
|
+
In this monorepo, `/.nimi/spec/**` is now the repo-wide product authority.
|
|
27
|
+
Pre-cutover authority history now lives in Git rather than a repo-local
|
|
28
|
+
archive tree. Pre-cutover readiness work was evidence only and did not
|
|
29
|
+
authorize the flip by itself.
|
|
30
|
+
|
|
31
|
+
## Current Status
|
|
32
|
+
|
|
33
|
+
This repository is boundary-complete for its intended standalone scope.
|
|
34
|
+
|
|
35
|
+
Its completed standalone scope is:
|
|
36
|
+
|
|
37
|
+
- package identity
|
|
38
|
+
- repository foundation
|
|
39
|
+
- initial AI-native methodology seed
|
|
40
|
+
- package-owned repo-local support profile source for future governance slices
|
|
41
|
+
- machine-readable reconstruction, doc-spec-audit, and high-risk execution result contracts
|
|
42
|
+
- package-owned canonical high-risk admission schema contract
|
|
43
|
+
- seed-only high-risk execution schemas for packet, orchestration-state, prompt, worker-output, and acceptance
|
|
44
|
+
- vendor-neutral external host-profile seed
|
|
45
|
+
- package-owned external host compatibility contract seed
|
|
46
|
+
- host-adapter seed for constrained external execution-host interop
|
|
47
|
+
- package-owned admitted host-profile overlay seed for `oh_my_codex`
|
|
48
|
+
- package-owned external execution artifact landing-path contract seed
|
|
49
|
+
- vendor-neutral external delegated skill runtime contract seed
|
|
50
|
+
- vendor-neutral delegated skill installer seed
|
|
51
|
+
- fail-closed delegated skill installer result-contract seed
|
|
52
|
+
- local-only installer operational evidence-home seed
|
|
53
|
+
- fail-closed collapsed installer summary projection lifecycle-contract seed
|
|
54
|
+
- package-owned bootstrap source under `config/**`, `contracts/**`, `methodology/**`, and `spec/**`
|
|
55
|
+
- a bounded standalone CLI with staged `start`, validation, handoff, local closeout projection, explicit admission, and mechanical execution-artifact validation
|
|
56
|
+
- a host-agnostic semantic + interop boundary for external AI hosts such as OMX, Codex, Claude, Gemini, or another contract-observing host
|
|
57
|
+
|
|
58
|
+
It intentionally defers:
|
|
59
|
+
|
|
60
|
+
- packet-bound run kernel
|
|
61
|
+
- provider-backed execution
|
|
62
|
+
- scheduler, notification, and automation backend surfaces
|
|
63
|
+
- self-hosted methodology execution
|
|
64
|
+
|
|
65
|
+
## CLI Status
|
|
66
|
+
|
|
67
|
+
This repository now carries a boundary-complete standalone `nimicoding` CLI.
|
|
68
|
+
|
|
69
|
+
At the current stage it provides:
|
|
70
|
+
|
|
71
|
+
- executable package bin wiring
|
|
72
|
+
- help and version output
|
|
73
|
+
- a primary `nimicoding start` entrypoint for bootstrap, resume, and next-stage AI task prep
|
|
74
|
+
- a conservative `nimicoding clear` entrypoint for removing package-managed setup without deleting project-owned truth
|
|
75
|
+
- a bounded `nimicoding doctor`
|
|
76
|
+
- an explicit `nimicoding blueprint-audit` equivalence check for comparing a repo-local blueprint root with the candidate canonical tree under `.nimi/spec`
|
|
77
|
+
- a repo-local `pnpm check:spec-authority-cutover-readiness` gate for pre-cutover readiness validation before authority execution
|
|
78
|
+
- an explicit `nimicoding handoff` export
|
|
79
|
+
- an explicit `nimicoding admit-high-risk-decision` semantic admission surface
|
|
80
|
+
- a local-only `nimicoding closeout` projection
|
|
81
|
+
- a bounded local-only `nimicoding ingest-high-risk-execution` projection
|
|
82
|
+
- a bounded local-only `nimicoding review-high-risk-execution` projection
|
|
83
|
+
- a bounded local-only `nimicoding decide-high-risk-execution` projection
|
|
84
|
+
- mechanical validators for execution-packet, orchestration-state, prompt, worker-output, and acceptance
|
|
85
|
+
- skill-specific result contract seeding for reconstruction, doc/spec audit, and local-only high-risk execution closeout
|
|
86
|
+
- seed-only execution contract extraction under `.nimi/contracts/**`
|
|
87
|
+
- package-owned bootstrap source projection from `config/**`, `contracts/**`, `methodology/**`, and `spec/**`
|
|
88
|
+
|
|
89
|
+
Current `nimicoding start` behavior is intentionally narrow:
|
|
90
|
+
|
|
91
|
+
- detect the current project state and continue from the right stage
|
|
92
|
+
- create or resume the `.nimi/**` seed by projecting package-owned source into host paths
|
|
93
|
+
- seed AI-native spec-reconstruction guidance inside `.nimi/**`
|
|
94
|
+
- keep repo-local support-only methodology assets package-owned unless a host explicitly opts into them
|
|
95
|
+
- seed package-owned machine contracts inside `.nimi/contracts/**`
|
|
96
|
+
- seed package-owned execution schemas for future high-risk methodology artifacts without admitting runtime ownership
|
|
97
|
+
- seed canonical skill-manifest, host-profile, installer, delegated runtime contract, installer result contract, installer operational evidence home, and external handoff truth inside `.nimi/**`
|
|
98
|
+
- seed canonical host-adapter truth inside `.nimi/**` so external execution hosts can be admitted without becoming semantic owners
|
|
99
|
+
- seed canonical collapsed installer summary projection lifecycle truth inside `.nimi/**`
|
|
100
|
+
- update `.gitignore` for local runtime state
|
|
101
|
+
- optionally update `AGENTS.md` and `CLAUDE.md` as a staged confirmation inside `start`
|
|
102
|
+
- explain one step at a time, confirm one step at a time, and apply one step at a time in interactive mode
|
|
103
|
+
- prepare one authoritative JSON AI task package for `spec_reconstruction` or `doc_spec_audit` when the current project stage requires it
|
|
104
|
+
- let the user choose a target host such as Codex, Claude, or oh-my-codex for that next AI task
|
|
105
|
+
- print a short paste-ready prompt directly in the terminal during `start` instead of requiring users to open a generated prompt file
|
|
106
|
+
- fail closed on unknown CLI options
|
|
107
|
+
- validate bootstrap integrity and delegated-runtime posture with `doctor`
|
|
108
|
+
- preserve existing truth files rather than overwriting them
|
|
109
|
+
- refuse unsupported bootstrap contract versions
|
|
110
|
+
|
|
111
|
+
Current `nimicoding clear` behavior is intentionally narrow:
|
|
112
|
+
|
|
113
|
+
- remove only managed AI blocks in `AGENTS.md` and `CLAUDE.md`
|
|
114
|
+
- remove only package-owned bootstrap files under `.nimi/config/**`, `.nimi/contracts/**`, and `.nimi/methodology/**` when the local file still exactly matches the packaged seed
|
|
115
|
+
- preserve locally modified bootstrap files even when they live under those package-owned bootstrap paths
|
|
116
|
+
- preserve `.nimi/spec/**`, `.nimi/local/**`, and `.nimi/cache/**`
|
|
117
|
+
- avoid deleting project-owned truth or local operational artifacts implicitly
|
|
118
|
+
|
|
119
|
+
## Topic Lifecycle Reports
|
|
120
|
+
|
|
121
|
+
Human-authored local report work now uses a topic lifecycle workspace rooted at:
|
|
122
|
+
|
|
123
|
+
- `/.nimi/topics/**`
|
|
124
|
+
|
|
125
|
+
Canonical topic lifecycle roots are:
|
|
126
|
+
|
|
127
|
+
- `proposal`
|
|
128
|
+
- `ongoing`
|
|
129
|
+
- `pending`
|
|
130
|
+
- `closed`
|
|
131
|
+
|
|
132
|
+
The primary organization unit is a topic folder:
|
|
133
|
+
|
|
134
|
+
- `.nimi/topics/<state>/YYYY-MM-DD-topic-slug/`
|
|
135
|
+
|
|
136
|
+
Each topic folder should carry a lightweight `topic.yaml` state record and may
|
|
137
|
+
include:
|
|
138
|
+
|
|
139
|
+
- `README.md`
|
|
140
|
+
- `design.md`
|
|
141
|
+
- `preflight.md`
|
|
142
|
+
- `waves.md`
|
|
143
|
+
- `packet-*.md`
|
|
144
|
+
- `closeout.md`
|
|
145
|
+
|
|
146
|
+
Topic folder rules:
|
|
147
|
+
|
|
148
|
+
- use sortable date-first topic ids: `YYYY-MM-DD-topic-slug`
|
|
149
|
+
- express lifecycle by moving the topic folder between `proposal`, `ongoing`,
|
|
150
|
+
`pending`, and `closed`
|
|
151
|
+
- keep one canonical copy of a topic at a time
|
|
152
|
+
- record lifecycle transitions in `topic.yaml`; do not rely on folder moves
|
|
153
|
+
alone as the state evidence surface
|
|
154
|
+
|
|
155
|
+
Canonical constraints:
|
|
156
|
+
|
|
157
|
+
- human-authored topic lifecycle reports must use
|
|
158
|
+
`/.nimi/topics/{proposal|ongoing|pending|closed}/<topic-id>/**`
|
|
159
|
+
- flat markdown files directly under `/.nimi/topics/` are outside the
|
|
160
|
+
admitted methodology model
|
|
161
|
+
- `.local/report/**` is not an accepted root for human-authored topic
|
|
162
|
+
lifecycle reports; keep it only for execution evidence or machine outputs
|
|
163
|
+
- `.local/work/**` is no longer the primary methodology workspace for
|
|
164
|
+
human-authored topic execution materials
|
|
165
|
+
|
|
166
|
+
Applicability boundary:
|
|
167
|
+
|
|
168
|
+
- topic workflow is intentionally heavy and not the default entrypoint for all
|
|
169
|
+
engineering work
|
|
170
|
+
- use a topic when the work is authority-bearing, high-risk, cross-module,
|
|
171
|
+
multi-wave, or likely to need remediation / re-audit discipline
|
|
172
|
+
- small low-risk changes should stay on the ordinary non-topic path unless there
|
|
173
|
+
is an explicit reason they need topic-level governance
|
|
174
|
+
|
|
175
|
+
Development rhythm:
|
|
176
|
+
|
|
177
|
+
- a topic is the canonical home for one major iteration line, not a micro
|
|
178
|
+
requirement backlog
|
|
179
|
+
- waves are the bounded execution unit inside a topic
|
|
180
|
+
- entering `ongoing` requires a topic-local `preflight.md` with one selected
|
|
181
|
+
next execution target, a bounded stop line, consumed inputs/contexts, expected
|
|
182
|
+
closeout checks, and explicit forbidden reopenings
|
|
183
|
+
- `pending` is an optional no-active-development state for topics that are not
|
|
184
|
+
ready to close: use it when you want to distinguish "waiting on evidence or
|
|
185
|
+
an external trigger" from active `ongoing` work, and record explicit reopen
|
|
186
|
+
or close criteria instead of leaving that wait implicit
|
|
187
|
+
- each wave should own one primary closure goal and end in a bounded result such
|
|
188
|
+
as an authority cut, implementation packet, bounded re-audit, or explicit
|
|
189
|
+
pause/defer note
|
|
190
|
+
- planning-only waves may harden one execution target, but they must not chain
|
|
191
|
+
indefinitely; if no bounded closure is reached after a planning wave, pause or
|
|
192
|
+
re-preflight instead of opening unbounded new planning waves
|
|
193
|
+
- closeout stays layered: context closure, wave closeout, and final topic
|
|
194
|
+
closeout are distinct evidence surfaces
|
|
195
|
+
|
|
196
|
+
Avoid the older `slug-YYYY-MM-DD.md` shape because it sorts poorly and makes
|
|
197
|
+
cross-report navigation harder. Stable machine report artifacts that are meant
|
|
198
|
+
to behave like a current snapshot, such as `blueprint-equivalence-audit.json`,
|
|
199
|
+
should keep their fixed names.
|
|
200
|
+
|
|
201
|
+
## Canonical Spec Redesign Prep
|
|
202
|
+
|
|
203
|
+
The package now seeds Phase 0 / Phase 1 canonical-spec redesign contracts under
|
|
204
|
+
`.nimi/spec/_meta/**` together with rewritten `bootstrap-state.yaml` and
|
|
205
|
+
`product-scope.yaml`.
|
|
206
|
+
|
|
207
|
+
At this stage:
|
|
208
|
+
|
|
209
|
+
- these files are machine contracts and implementation authority for canonical spec generation
|
|
210
|
+
- active repository authority now lives under `/.nimi/spec/**`
|
|
211
|
+
- `start`, `doctor`, `handoff`, `closeout`, and high-risk gating already read the canonical tree lifecycle instead of treating the old five-file compact model as authoritative completion
|
|
212
|
+
- `nimicoding blueprint-audit` remains the explicit audit surface for benchmark-vs-canonical equivalence checks; it does not perform routing changes on its own
|
|
213
|
+
- `pnpm check:spec-authority-cutover-readiness` remains a pre-cutover readiness aggregator; after cutover it is historical/preflight-only rather than the active authority source
|
|
214
|
+
- canonical spec generation now reads mixed inputs from `.nimi/config/spec-generation-inputs.yaml` and treats any blueprint root as an optional benchmark rather than a universal host assumption
|
|
215
|
+
- completed canonical reconstruction now requires both structural validity and file-level auditability under `.nimi/spec/_meta/spec-generation-audit.yaml`
|
|
216
|
+
- `nimicoding validate-spec-tree` checks canonical tree structure, while `nimicoding validate-spec-audit` checks per-file grounding, inference, and unresolved-gap tracking
|
|
217
|
+
|
|
218
|
+
Current `nimicoding doctor` behavior is intentionally narrow:
|
|
219
|
+
|
|
220
|
+
- validate that `.nimi/**` bootstrap seed files are present
|
|
221
|
+
- validate that `.nimi/local/` and `.nimi/cache/` exist and remain ignored
|
|
222
|
+
- validate bootstrap contract compatibility metadata
|
|
223
|
+
- validate bootstrap-only and reconstruction-seeded lifecycle markers
|
|
224
|
+
- validate cross-contract reference alignment across manifest, handoff, runtime, installer, and host-profile truth
|
|
225
|
+
- validate host-adapter boundary truth and adapter selection posture
|
|
226
|
+
- validate admitted package-owned adapter profile overlays for named external hosts
|
|
227
|
+
- validate the packaged external host compatibility contract
|
|
228
|
+
- expose the supported external host posture, examples, and required/forbidden host behavior
|
|
229
|
+
- validate skill result-contract alignment
|
|
230
|
+
- validate the packaged high-risk execution result contract
|
|
231
|
+
- validate the packaged canonical high-risk admission schema contract
|
|
232
|
+
- validate the external execution artifact landing-path contract
|
|
233
|
+
- validate seed-only high-risk execution schemas under `.nimi/contracts/**`
|
|
234
|
+
- validate handoff context-order readiness for an external AI host
|
|
235
|
+
- expose the standalone completion profile, status, completed surfaces, deferred execution surfaces, and promoted parity gaps
|
|
236
|
+
- expose the generic external-host compatibility posture, admitted named overlay posture, and future-only host-specific surfaces
|
|
237
|
+
- validate canonical `.nimi/spec/high-risk-admissions.yaml` record shape against the packaged admission schema contract when present
|
|
238
|
+
- fail closed when lifecycle state, canonical tree readiness, and auditability drift apart
|
|
239
|
+
- report local `doc_spec_audit` closeout artifact status without promoting it to semantic truth
|
|
240
|
+
- emit either human-readable output or machine-readable JSON with `--json`
|
|
241
|
+
|
|
242
|
+
Current `nimicoding handoff` behavior is intentionally narrow:
|
|
243
|
+
|
|
244
|
+
- require explicit `--skill <skill-id>`
|
|
245
|
+
- export an authoritative machine-readable external handoff payload with `--json`
|
|
246
|
+
- optionally project a human-readable host briefing with `--prompt`
|
|
247
|
+
- remain host-agnostic: Claude, Codex, Gemini, OMX, or another external host may consume the same contract if it respects the declared boundaries
|
|
248
|
+
- export the package-owned host compatibility contract ref, supported host posture, supported host examples, and required/forbidden host behavior
|
|
249
|
+
- expose whether a generic external host is compatible, whether a named admitted overlay is merely available or currently selected, and which host-specific surfaces remain future-only
|
|
250
|
+
- reuse `doctor` validation and fail closed when bootstrap or delegated handoff posture is invalid
|
|
251
|
+
- allow `spec_reconstruction` handoff during bootstrap-only mode
|
|
252
|
+
- expose selected named adapter overlay metadata when an admitted host profile is selected
|
|
253
|
+
- export `resultContractRef` plus skill-specific closeout summary expectations
|
|
254
|
+
- export execution schema refs, expected artifact kinds, expected local artifact roots, and external execution summary status for `high_risk_execution`
|
|
255
|
+
- refuse `doc_spec_audit` and `high_risk_execution` handoff until the canonical tree under `.nimi/spec` is ready
|
|
256
|
+
|
|
257
|
+
Current `nimicoding closeout` behavior is intentionally narrow:
|
|
258
|
+
|
|
259
|
+
- require explicit `--skill`, `--outcome`, and `--verified-at`
|
|
260
|
+
- optionally import those fields plus an optional contract-validated `summary` from an external JSON payload with `--from`
|
|
261
|
+
- project external skill results into a local-only closeout payload
|
|
262
|
+
- optionally write the payload under `.nimi/local/handoff-results/` with `--write-local`
|
|
263
|
+
- fail closed if a `completed` outcome contradicts the current canonical-tree or audit state
|
|
264
|
+
- support contract-validated local-only summary import for `high_risk_execution`
|
|
265
|
+
- fail closed if imported high-risk execution refs escape the declared local artifact roots
|
|
266
|
+
- fail closed if imported high-risk execution summaries omit refs, drift in shape, or claim an illegal external execution status
|
|
267
|
+
- fail closed if imported `summary` content violates the declared skill result contract
|
|
268
|
+
- fail closed if an imported JSON summary does not match the current project or required shape
|
|
269
|
+
- never promote local closeout artifacts to project semantic truth
|
|
270
|
+
|
|
271
|
+
Current `nimicoding admit-high-risk-decision` behavior is intentionally narrow:
|
|
272
|
+
|
|
273
|
+
- require explicit `--from <json>` and `--admitted-at <iso8601>`
|
|
274
|
+
- accept only `nimicoding.high-risk-decision.v1` payloads with `decisionStatus: manager_decision_recorded`
|
|
275
|
+
- derive `topic_id` and `packet_id` from the mechanically valid attached packet
|
|
276
|
+
- project canonical admission preview for `.nimi/spec/high-risk-admissions.yaml`
|
|
277
|
+
- write tracked semantic truth only when `--write-spec` is given explicitly
|
|
278
|
+
- fail closed on malformed decision payloads, malformed admissions truth, or missing packet identity
|
|
279
|
+
|
|
280
|
+
Current `nimicoding ingest-high-risk-execution` behavior is intentionally narrow:
|
|
281
|
+
|
|
282
|
+
- require explicit `--from <json>` pointing at a local high-risk closeout artifact
|
|
283
|
+
- accept only `high_risk_execution` closeout artifacts with `outcome: completed` and `summary.status: candidate_ready`
|
|
284
|
+
- mechanically validate the referenced packet, orchestration-state, prompt, and worker-output artifacts using the packaged validators
|
|
285
|
+
- require all evidence refs to exist under the declared local artifact roots
|
|
286
|
+
- project a local-only ingest payload and optionally write it under `.nimi/local/handoff-results/`
|
|
287
|
+
- fail closed on contract drift, root escape, missing artifacts, or invalid worker-output/prompt/schema shape
|
|
288
|
+
- never decide semantic acceptance, disposition, or finding judgment
|
|
289
|
+
|
|
290
|
+
Current `nimicoding review-high-risk-execution` behavior is intentionally narrow:
|
|
291
|
+
|
|
292
|
+
- require explicit `--from <json>` pointing at a local high-risk ingest artifact
|
|
293
|
+
- accept only `nimicoding.high-risk-ingest.v1` payloads with `ok: true`
|
|
294
|
+
- project a local-only review-ready attachment payload for manager-owned review
|
|
295
|
+
- carry attachment refs, ingest validation evidence, and the declared semantic review owner
|
|
296
|
+
- fail closed if the ingest payload is malformed, not local-only, or mechanically invalid
|
|
297
|
+
- never decide semantic acceptance, disposition, or finding judgment
|
|
298
|
+
|
|
299
|
+
Current `nimicoding decide-high-risk-execution` behavior is intentionally narrow:
|
|
300
|
+
|
|
301
|
+
- require explicit `--from <json>`, `--acceptance <path>`, and `--verified-at <iso8601>`
|
|
302
|
+
- accept only `nimicoding.high-risk-review.v1` payloads with `ok: true`
|
|
303
|
+
- require `reviewStatus: ready_for_manager_review`
|
|
304
|
+
- mechanically validate the provided acceptance artifact and require an explicit `Disposition:` line
|
|
305
|
+
- project a local-only manager decision payload and optionally write it under `.nimi/local/handoff-results/`
|
|
306
|
+
- fail closed if the review payload is malformed, not local-only, or points at another project
|
|
307
|
+
- never auto-promote the manager decision into canonical semantic truth without explicit admission
|
|
308
|
+
|
|
309
|
+
Current mechanical validator behavior is intentionally narrow:
|
|
310
|
+
|
|
311
|
+
- require an explicit artifact path for each validator command
|
|
312
|
+
- emit machine-readable `validator-cli-result.v1` JSON on both success and refusal
|
|
313
|
+
- validate only the package-owned seed contract shape for execution-packet, orchestration-state, prompt, worker-output, and acceptance
|
|
314
|
+
- fail closed on missing required sections, malformed YAML, or seed-contract drift
|
|
315
|
+
- avoid semantic acceptance, topic orchestration, scheduler ownership, or provider execution claims
|
|
316
|
+
|
|
317
|
+
The package now carries package-owned bootstrap source under `config/**`,
|
|
318
|
+
`contracts/**`, `methodology/**`, and `spec/**`. `nimicoding start`
|
|
319
|
+
projects those files into a host project's `/.nimi/**`
|
|
320
|
+
surface at runtime. The package also carries adapter overlays under
|
|
321
|
+
`adapters/**/profile.yaml` so external execution hosts such as
|
|
322
|
+
`oh-my-codex` can be admitted as constrained bridges instead of semantic
|
|
323
|
+
owners while keeping external execution closeout local-only, root-bounded,
|
|
324
|
+
and non-semantic until an explicit manager-owned admission writes canonical
|
|
325
|
+
summary truth into `.nimi/spec/high-risk-admissions.yaml`.
|
|
326
|
+
|
|
327
|
+
Boundary-complete in this package does not mean promoted-runtime parity. The
|
|
328
|
+
package-owned source lives directly under `config/**`, `contracts/**`,
|
|
329
|
+
`methodology/**`, and `spec/**`. Only generated or adopted host projects use
|
|
330
|
+
`.nimi/**`. Standalone does not add `run-*` commands, provider invocation,
|
|
331
|
+
scheduler logic, or transport adapters in this cut.
|
|
332
|
+
|
|
333
|
+
## Intended Direction
|
|
334
|
+
|
|
335
|
+
The expected future experience is roughly:
|
|
336
|
+
|
|
337
|
+
1. install `@nimiplatform/nimi-coding`
|
|
338
|
+
2. run `nimicoding start`
|
|
339
|
+
3. confirm or accept managed AI entrypoints
|
|
340
|
+
4. let an external AI host use seeded `.nimi/**` reconstruction guidance, manifest, host-profile, installer, delegated runtime contract, installer result contract, collapsed installer summary projection lifecycle contract, installer operational evidence guidance, and the authoritative handoff JSON contract to
|
|
341
|
+
reconstruct the project canonical tree
|
|
342
|
+
5. use the methodology for later high-risk work
|
|
343
|
+
|
|
344
|
+
## Development Posture
|
|
345
|
+
|
|
346
|
+
This repository is the standalone boundary package. Deferred runtime surfaces
|
|
347
|
+
such as packet-bound execution, provider-backed execution, scheduler,
|
|
348
|
+
notification, and automation remain outside the packaged scope.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Adapters
|
|
2
|
+
|
|
3
|
+
This directory holds optional runtime-adapter guidance for external execution
|
|
4
|
+
hosts.
|
|
5
|
+
|
|
6
|
+
Adapters in this package do not become methodology owners. They exist to map
|
|
7
|
+
project-local `.nimi/**` truth into a host-specific execution surface while
|
|
8
|
+
preserving these boundaries:
|
|
9
|
+
|
|
10
|
+
- `.nimi/**` remains the semantic owner.
|
|
11
|
+
- External hosts may own operational state, transport, routing, and execution
|
|
12
|
+
continuity.
|
|
13
|
+
- Native host review features may provide evidence or risk signals only.
|
|
14
|
+
- External hosts must not redefine acceptance, disposition, or canonical
|
|
15
|
+
project truth.
|
|
16
|
+
|
|
17
|
+
Admitted adapter sketches:
|
|
18
|
+
|
|
19
|
+
- [`codex`](./codex/README.md) — native Codex SDK host via `@openai/codex-sdk`
|
|
20
|
+
- [`oh-my-codex`](./oh-my-codex/README.md) — external execution host via JSON handoff
|
|
21
|
+
- [`claude`](./claude/README.md) — inline coding host via CLAUDE.md + PreToolUse hooks
|
|
22
|
+
|
|
23
|
+
The package-owned host-agnostic baseline for any external host lives in
|
|
24
|
+
`.nimi/contracts/external-host-compatibility.yaml`. Named adapter overlays may
|
|
25
|
+
specialize that baseline, but they do not replace it.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Claude Code Adapter
|
|
2
|
+
|
|
3
|
+
This adapter defines how to use `@nimiplatform/nimi-coding` with Claude Code
|
|
4
|
+
without turning Claude into the semantic owner.
|
|
5
|
+
|
|
6
|
+
## Intent
|
|
7
|
+
|
|
8
|
+
Use Claude Code for:
|
|
9
|
+
|
|
10
|
+
- inline coding with direct filesystem access
|
|
11
|
+
- exploration, planning, and execution in a single session
|
|
12
|
+
- review and decision projection (manager-ready, not manager-owned)
|
|
13
|
+
- AGENTS.md-governed module-scoped work via PreToolUse hooks
|
|
14
|
+
|
|
15
|
+
Keep `nimicoding` responsible for:
|
|
16
|
+
|
|
17
|
+
- project-local `.nimi/**` truth
|
|
18
|
+
- authority boundaries
|
|
19
|
+
- handoff constraints
|
|
20
|
+
- packet, prompt, worker-output, and acceptance schema ownership
|
|
21
|
+
- fail-closed validation
|
|
22
|
+
|
|
23
|
+
## Integration Mode
|
|
24
|
+
|
|
25
|
+
Claude Code integrates differently from oh-my-codex:
|
|
26
|
+
|
|
27
|
+
| Concern | oh-my-codex | Claude Code |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Host class | external execution host | inline coding host |
|
|
30
|
+
| Instruction format | AGENTS.md (native) | CLAUDE.md (native) + AGENTS.md (hook-injected) |
|
|
31
|
+
| Module context | automatic on every interaction | PreToolUse hook on Read/Edit/Write |
|
|
32
|
+
| Operational state | `.omx/` | `.claude/` |
|
|
33
|
+
| Execution mode | external handoff via JSON | inline in-repo execution |
|
|
34
|
+
| Review capability | execution only | execution + inline review |
|
|
35
|
+
|
|
36
|
+
## Boundary
|
|
37
|
+
|
|
38
|
+
Treat the systems as layered rather than merged:
|
|
39
|
+
|
|
40
|
+
- `@nimiplatform/nimi-coding` is the semantic kernel.
|
|
41
|
+
- Claude Code is a constrained inline coding host.
|
|
42
|
+
- This adapter is only the bridge.
|
|
43
|
+
|
|
44
|
+
Claude Code may read `.nimi/**` and produce execution artifacts, but it must not:
|
|
45
|
+
|
|
46
|
+
- become the owner of `.nimi/spec/**`
|
|
47
|
+
- treat cutover readiness as an authority flip
|
|
48
|
+
- decide semantic acceptance or final disposition
|
|
49
|
+
- redefine methodology state from `.claude/**` operational state
|
|
50
|
+
- bypass `nimicoding doctor`, `handoff`, or validator gates
|
|
51
|
+
- use hooks as a replacement for AGENTS.md authority
|
|
52
|
+
|
|
53
|
+
## Context Channel
|
|
54
|
+
|
|
55
|
+
Claude Code receives module-level AGENTS.md content through a PreToolUse hook:
|
|
56
|
+
|
|
57
|
+
1. Hook fires on **Read**, **Edit**, and **Write** tool calls
|
|
58
|
+
2. Script walks up from the target file to find the nearest `AGENTS.md`
|
|
59
|
+
3. Content is injected as `additionalContext` before the tool executes
|
|
60
|
+
4. Root `AGENTS.md` is already synced into `CLAUDE.md` (not re-injected)
|
|
61
|
+
5. **Grep/Glob/Bash** do not trigger injection — manual AGENTS.md reads
|
|
62
|
+
are still needed for search-based exploration
|
|
63
|
+
|
|
64
|
+
The `CLAUDE.md` managed block (marker `nimicoding:managed:claude`) provides
|
|
65
|
+
the baseline methodology context. Module-level AGENTS.md provides scoped
|
|
66
|
+
constraints on top of that baseline.
|
|
67
|
+
|
|
68
|
+
## Coverage Gap
|
|
69
|
+
|
|
70
|
+
| Tool | Hook fires? | Module AGENTS.md visible? |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| Read | Yes | Automatic |
|
|
73
|
+
| Edit | Yes | Automatic |
|
|
74
|
+
| Write | Yes | Automatic |
|
|
75
|
+
| Grep | No | Manual read needed |
|
|
76
|
+
| Glob | No | Manual read needed |
|
|
77
|
+
| Bash | No | Manual read needed |
|
|
78
|
+
| Agent (subagent) | No | Manual read needed |
|
|
79
|
+
|
|
80
|
+
## Mapping
|
|
81
|
+
|
|
82
|
+
| Claude concern | Adapter rule | `nimicoding` owner |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| exploration/planning | hook-injected module context | `.nimi/methodology/skill-handoff.yaml` |
|
|
85
|
+
| prompt handoff | consume exported prompt/context | `.nimi/methodology/skill-handoff.yaml` |
|
|
86
|
+
| worker output | write candidate artifact only under declared local roots | `.nimi/contracts/worker-output.schema.yaml` |
|
|
87
|
+
| evidence | write candidate artifact only under declared local roots | packet/evidence contract family |
|
|
88
|
+
| inline review | project decision material, do not decide | manager-reviewed `nimicoding` semantics |
|
|
89
|
+
| final disposition | Claude must not decide | manager-reviewed `nimicoding` semantics |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
adapter_profile:
|
|
3
|
+
id: claude
|
|
4
|
+
host_class: inline_coding_host
|
|
5
|
+
upstream_seed_profile: external_ai_host
|
|
6
|
+
purpose: >
|
|
7
|
+
Constrain Claude Code to act as an inline coding host for nimicoding
|
|
8
|
+
methodology execution, with AGENTS.md authority injected via PreToolUse
|
|
9
|
+
hooks and CLAUDE.md as the native entrypoint, without promoting Claude
|
|
10
|
+
operational state into semantic truth.
|
|
11
|
+
semantic_owner:
|
|
12
|
+
- .nimi/methodology
|
|
13
|
+
- .nimi/spec
|
|
14
|
+
- .nimi/contracts
|
|
15
|
+
- .nimi/config
|
|
16
|
+
operational_owner:
|
|
17
|
+
- .claude
|
|
18
|
+
- .nimi/local
|
|
19
|
+
- .nimi/cache
|
|
20
|
+
admitted_skill_surfaces:
|
|
21
|
+
- spec_reconstruction
|
|
22
|
+
- doc_spec_audit
|
|
23
|
+
- audit_sweep
|
|
24
|
+
- high_risk_execution
|
|
25
|
+
- inline_review
|
|
26
|
+
- authority_convergence_audit
|
|
27
|
+
context_integration:
|
|
28
|
+
native_entrypoint: CLAUDE.md
|
|
29
|
+
module_context_channel: PreToolUse_hook_agents_md_injection
|
|
30
|
+
managed_block_marker: "nimicoding:managed:claude"
|
|
31
|
+
hook_matcher: Read|Edit|Write
|
|
32
|
+
hook_script: .claude/hooks/inject-agents-md.sh
|
|
33
|
+
agents_md_authority: >
|
|
34
|
+
AGENTS.md files remain the authoritative module-level rules.
|
|
35
|
+
CLAUDE.md defers to AGENTS.md on conflict. The hook injects the
|
|
36
|
+
nearest AGENTS.md as additionalContext on Read/Edit/Write tool
|
|
37
|
+
calls. Grep/Glob/Bash do not trigger injection.
|
|
38
|
+
prompt_handoff:
|
|
39
|
+
bootstrap_surface:
|
|
40
|
+
- nimicoding handoff --skill spec_reconstruction --prompt
|
|
41
|
+
- nimicoding handoff --skill doc_spec_audit --prompt
|
|
42
|
+
- nimicoding handoff --skill audit_sweep --prompt
|
|
43
|
+
- nimicoding handoff --skill high_risk_execution --prompt
|
|
44
|
+
future_surface:
|
|
45
|
+
status: active_via_hooks
|
|
46
|
+
commands: []
|
|
47
|
+
channel: CLAUDE.md managed block + PreToolUse AGENTS.md hooks
|
|
48
|
+
output_handoff:
|
|
49
|
+
worker_output_target: .nimi/local/outputs/** candidate artifact
|
|
50
|
+
evidence_target: .nimi/local/evidence/** candidate artifact
|
|
51
|
+
closeout_target: local-only closeout payload unless later admitted
|
|
52
|
+
authority_convergence_audit:
|
|
53
|
+
execution_projection: claude_task_subagent_auditor
|
|
54
|
+
dispatch_source: nimicoding topic audit dispatch
|
|
55
|
+
output_target: .nimi/local/outputs/** candidate audit evidence
|
|
56
|
+
semantic_effect: none_until_manager_records_topic_audit_result
|
|
57
|
+
required_prompt_posture:
|
|
58
|
+
- audit_only_no_code_or_spec_edits
|
|
59
|
+
- report_PASS_NEEDS_REVISION_or_FAIL
|
|
60
|
+
- list_blocking_findings_concerns_deferred_non_blockers_and_authority_refs
|
|
61
|
+
hard_constraints:
|
|
62
|
+
- claude_must_not_become_semantic_owner
|
|
63
|
+
- claude_must_not_write_canonical_.nimi/spec_truth_directly_without_validator_admission
|
|
64
|
+
- claude_must_not_define_acceptance_disposition_or_finding_judgment
|
|
65
|
+
- claude_operational_state_must_remain_operational_only
|
|
66
|
+
- claude_hooks_must_not_replace_agents_md_authority
|
|
67
|
+
- unresolved_authority_or_missing_context_must_fail_closed
|
|
68
|
+
- claude_subagent_authority_convergence_output_must_remain_candidate_evidence
|
|
69
|
+
current_gaps:
|
|
70
|
+
- automatic_semantic_admission_automation_not_packaged_in_standalone
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Codex Adapter Sketch
|
|
2
|
+
|
|
3
|
+
This adapter defines native Codex support for `@nimiplatform/nimi-coding`.
|
|
4
|
+
|
|
5
|
+
It is intentionally separate from `oh_my_codex`. `oh_my_codex` is an external
|
|
6
|
+
adapter boundary; `codex` is the native Codex SDK host boundary.
|
|
7
|
+
|
|
8
|
+
## Boundary
|
|
9
|
+
|
|
10
|
+
- Codex SDK owns operational thread execution.
|
|
11
|
+
- `.nimi/**` remains semantic truth.
|
|
12
|
+
- Topic decisions come from `nimicoding topic run-next-step`.
|
|
13
|
+
- Run continuity is recorded by `nimicoding topic run-ledger`.
|
|
14
|
+
- Codex thread IDs are operational state and must not become semantic truth.
|
|
15
|
+
|
|
16
|
+
## SDK Surface
|
|
17
|
+
|
|
18
|
+
The admitted native surface is the official TypeScript package:
|
|
19
|
+
|
|
20
|
+
- package: `@openai/codex-sdk`
|
|
21
|
+
- primary API: `new Codex().startThread().run(prompt)`
|
|
22
|
+
- resume API: `new Codex().resumeThread(threadId).run(prompt)`
|
|
23
|
+
|
|
24
|
+
The first packaged runner must call the SDK directly. It must not shell out to
|
|
25
|
+
the Codex CLI and must not route through `oh_my_codex`.
|
|
26
|
+
|
|
27
|
+
## Execution Rule
|
|
28
|
+
|
|
29
|
+
The runner may call Codex only after `run-next-step` returns:
|
|
30
|
+
|
|
31
|
+
- `stop_class: continue`
|
|
32
|
+
- a mechanical `recommended_action`
|
|
33
|
+
- a concrete `next_command_ref`
|
|
34
|
+
|
|
35
|
+
`continue` means the next package-owned command is placeholder-free and
|
|
36
|
+
mechanically determined. It may include lifecycle transitions such as admitting
|
|
37
|
+
the uniquely selected wave or freezing the uniquely matching draft packet; those
|
|
38
|
+
transitions do not by themselves create a human gate.
|
|
39
|
+
|
|
40
|
+
All other stop classes must be represented as run-ledger events and returned to
|
|
41
|
+
the manager/operator without hidden continuation.
|
|
42
|
+
|
|
43
|
+
## Native Review Boundary
|
|
44
|
+
|
|
45
|
+
Codex native review features are admitted only as lower-layer host capabilities:
|
|
46
|
+
|
|
47
|
+
- automatic approval review may evaluate permission prompts and risk posture
|
|
48
|
+
- GitHub automatic review may provide PR findings
|
|
49
|
+
- both outputs may be recorded as `.nimi/local/evidence/**` candidate evidence
|
|
50
|
+
|
|
51
|
+
They must not admit a wave, freeze a packet, record a result verdict, close a
|
|
52
|
+
wave, close a topic, or satisfy true-close. Those transitions remain
|
|
53
|
+
`nimicoding topic` command semantics with package-owned artifact lineage.
|