@deftai/directive-content 0.115.0 → 0.116.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/UPGRADING.md CHANGED
@@ -211,16 +211,27 @@ npm config get registry
211
211
  ```
212
212
 
213
213
  The scoped value wins when `@deftai:registry` is set; otherwise npm uses the
214
- default `registry`. If either effective value is not
214
+ default `registry`. `--registry` does not beat `@deftai:registry` (npm/cli#7659).
215
+ `npm view @deftai/directive` from a consumer cwd whose `.npmrc` maps `@deftai`
216
+ to GitHub Packages therefore cannot hit public npm unless you change cwd,
217
+ `--userconfig`, or the scoped key.
218
+
219
+ If either effective value is not
215
220
  `https://registry.npmjs.org/`, choose a recovery path allowed by your
216
- organization policy:
221
+ corporate policy:
217
222
 
218
- - **One command:** request the required release directly from public npm:
223
+ - **Leave the project directory** so the project `.npmrc` is not loaded
224
+ (for example `$HOME`), then install:
219
225
 
220
226
  ```bash
221
- npm i -g @deftai/directive@<version> --registry=https://registry.npmjs.org/
227
+ cd "$HOME" && npm i -g @deftai/directive@<version>
222
228
  ```
223
229
 
230
+ - **One-shot userconfig from outside the project:** after leaving the project
231
+ directory, write a file containing
232
+ `@deftai:registry=https://registry.npmjs.org/` and pass `--userconfig` to
233
+ that file. `--userconfig` does not beat a project `.npmrc` `@deftai:registry`.
234
+
224
235
  - **Durable scoped routing:** add this line to the user or project `.npmrc` so
225
236
  only the `@deftai` scope bypasses the default mirror:
226
237
 
@@ -237,8 +248,8 @@ IT or the registry administrator to synchronize all Directive packages:
237
248
  non-public effective registry produces an advisory warning but does not make
238
249
  doctor fail; configured registry URLs are not printed because they can contain
239
250
  internal hostnames or credentials. With `--network`, the release-availability
240
- probe always queries the canonical public registry explicitly, independent of
241
- the configured mirror.
251
+ probe isolates with a temp cwd whose project `.npmrc` sets `@deftai:registry`
252
+ to public npm, because `--registry` does not beat the scoped key.
242
253
 
243
254
  2. **Refresh the project deposit** from your project root:
244
255
 
package/coding/review.md CHANGED
@@ -40,8 +40,16 @@ Legend (from RFC2119): !=MUST, ~=SHOULD, ≉=SHOULD NOT, ⊗=MUST NOT, ?=MAY.
40
40
  - ! Agents MUST NOT claim merge-ready while any P0 or P1 from the current review remains open
41
41
  - ⊗ Elevate P2-only findings into a merge block without operator agreement
42
42
 
43
+ ## Policy-anchored classification (#3452)
44
+
45
+ - ! Invariant-shaped findings (concurrency, error handling, containment/security) MUST NOT be classified out-of-model until a written policy (assumptions / guarantees / non-goals) exists on the **current HEAD** of the file under review. Absent -> write the anchor first. Anchor-wrong -> revise the anchor, then classify
46
+ - ! Classify then act: in-model -> patch; out-of-model -> accepted-risk reply citing the HEAD anchor. Deterministic arity/wiring claims MUST check the head blob before confirmation
47
+ - ! One consolidated push per review round; local review pass before push; never push per finding. Riders allowed on mechanical rebases
48
+ - ! More than 3 review rounds on the same file: escalate to a design pass, not round K+1 and not parking. Compose with the adapter same-fingerprint stop; do not invent a second detector
49
+
43
50
  ## Anti-Patterns
44
51
 
52
+ - ⊗ Classify invariant-shaped findings out-of-model with no HEAD policy (#3452)
45
53
  - ⊗ Start fixing individual findings as you encounter them — read and plan the full batch first
46
54
  - ⊗ Push one commit per finding
47
55
  - ⊗ Push while a bot or human review of the current head is still in flight
package/commands.md CHANGED
@@ -652,6 +652,7 @@ flowchart TD
652
652
  - Step 3 (`Pre-flight vBRIEF lifecycle sync`) fetches GitHub issue states via REST. On HTTP 403 rate-limit exhaustion it sleeps once (capped at 120s) and retries before failing.
653
653
  - When Step 3 still fails with rate-limit exhaustion, stderr includes a `gh api rate_limit` probe (`core.remaining`, reset time) and recovery guidance. After local `task xbrief:validate` exits 0, operators may pass `--allow-vbrief-drift` to skip Step 3 for that cut — reserved for transient SCM bucket stalls, not unreviewed lifecycle drift.
654
654
  - `task swarm:*` -- readiness, launch, pre-dispatch deny gate (#3228), review-clean verification, and cohort completion.
655
+ - **Policy-anchored review-response (#3452):** classify invariant-shaped findings against a written HEAD policy before patching; one consolidated push per review round; more than 3 rounds on one file escalate to a #3434 design pass. Compose with the #3448 Same-fingerprint stop -- do not invent a second detector. Working name `review-response`. Depth: `skills/deft-directive-review-cycle/SKILL.md` and `coding/review.md`.
655
656
  - **Operator follow-up after dual-stop / hard stop (#3273 / #3448):** one-shot *pursue residual* / *follow-up hard-stop* / *same as conf-hold* / *continue dual-stopped PR* is one pass then re-stop. Standing *until floor or loop* / *until greptile meets policy* / *pursue residuals until told otherwise* keeps class A leftovers on open cohort/plan units moving until the resolved `#3095` floor or the **Same-fingerprint stop** in `skills/deft-directive-review-cycle/SKILL.md` Dual stop (not a separate task verb). Steps in `skills/deft-directive-swarm` and `skills/deft-directive-review-cycle` § Operator follow-up after dual-stop / hard stop.
656
657
 
657
658
  - `task slice:*` -- feature-slice helpers.
@@ -193,7 +193,7 @@ seat: codex launcher: codex
193
193
 
194
194
  - ! For spend N≥3, the panel-deposit or a sibling-seat record names three claimed families before the first sibling spawn. Parent claims the family at dispatch. ⊗ Classify family from a model slug.
195
195
  - ! A same-family sibling set is not a panel. ⊗ Lean it. Printed recovery is re-seat (or halt), not wait for Stop 5.
196
- - ! Grok Build launcher tree: Grok seat via `spawn_subagent` (or `grok`); Claude seat via `claude` CLI; Codex seat via `codex exec`. Every arc uses one dest at origin/<default> after fetch; github-only is no-ingest, not no-worktree. Probe `claude` / `codex` on PATH before offering paste-ready. Paste-ready is the fallback when a named family's CLI is absent. Close stdin on CLI spawns (Windows `cmd /c "… <nul"`; Unix `… </dev/null`). Pointer: [`docs/grok-build-subscription-setup.md`](../docs/grok-build-subscription-setup.md).
196
+ - ! Grok Build launcher tree: Grok seat via `spawn_subagent` (or `grok`); Claude seat via `claude` CLI; Codex seat via `codex exec`. Every arc uses one dest at origin/<default> after fetch; github-only is no-ingest, not no-worktree. Probe `claude` / `codex` on PATH before offering paste-ready. Paste-ready is the fallback when a named family's CLI is absent. Close stdin on CLI spawns (Windows `cmd /c "… <nul"`; Unix `… </dev/null`). Pointer: [`docs/grok-build-subscription-setup.md`](../docs/grok-build-subscription-setup.md). Critic spawn argv lives under that playbook's Design-critique dispatch heading, not this contract.
197
197
  - ! `evaluatePanelSeatComposition` (`packages/core/src/design-critique/panel-seat-families.ts`) refuses a same-family N≥3 set and refuses paste-ready-first when `claude` / `codex` resolve. It takes claimed families and PATH probe results. It does not observe live comments and does not count siblings.
198
198
  - ! After a dispatch-composition miss, offer a prevention issue. On yolo, file it. ⊗ Only re-seat.
199
199
 
@@ -145,6 +145,16 @@ This file has been migrated to `xbrief/PROJECT-DEFINITION.xbrief.json`.
145
145
 
146
146
  ---
147
147
 
148
+ ## Process-only (keep Phase 2 identity)
149
+
150
+ When Phase 2 identity already exists (xbrief/PROJECT-DEFINITION.xbrief.json) and you want Directive as the process layer without a spec write, pick **Process-only (keep Phase 2 identity)** on the setup Phase 2 gate (option 2) or the matching interview leave-strategy. Do not use Back or Other for that exit.
151
+
152
+ Then-path: session ritual / deft check / later Add scope when a slice is ready. Skip Lifecycle Bridge, export, Acceptance Gate, and build. GitHub issues stay cache/queue inputs. Docs stay described content.
153
+
154
+ ⊗ Treat existing docs or GitHub issues as the next-build plan. Work selection stays plan-sequence then triage:queue. An active running xBRIEF is still required before xbrief:preflight / swarm dispatch.
155
+
156
+ ---
157
+
148
158
  ## 4. Pre-Cutover Detection Guard
149
159
 
150
160
  On first interactive session after adding Deft, the agent-driven path runs a **pre-cutover detection guard** from `skills/deft-directive-setup/SKILL.md` and `skills/deft-directive-build/SKILL.md`. The guard detects legacy artifacts and redirects to the migration command instead of silently proceeding with a mismatched project layout.
@@ -131,6 +131,44 @@ Run from a **Grok** `run_terminal_command` child after the new session. Close st
131
131
 
132
132
  When a Grok Build parent runs an N≥3 design-critique panel, this playbook's CLIs are the other-family launchers. Probe `claude` / `codex` on PATH and CLI-spawn those seats. Paste-ready is the fallback when a CLI is absent, not the default recovery. Normative stop: [`contracts/design-critique.md`](../contracts/design-critique.md) Envelope and ceiling (#4067).
133
133
 
134
+ The Verification pong above stays the auth probe. Critic spawn is a second recipe. Do not launch a critic by copying the issue-body spawn snippet. Recipe source: field instance 5628651806 plus the critic inventory.
135
+
136
+ ### Critic spawn (second recipe)
137
+
138
+ Write the envelope to a dest file. Never put the prompt on stdin. Claude `-p` and Codex's trailing arg are prompt text, not an automatic file read — pass `Read and follow <envelope-path>`. Grok last-resort uses `--prompt-file`.
139
+
140
+ Close-stdin is the spawned child's stdio, not this host's `cmd /c "… <nul"` (not enough on the Grok wrapper) and not PowerShell `RedirectStandardInput "NUL"` (resolves to `<cwd>\NUL`). Node `spawn` with `stdio: "ignore"` or an open fd (`fs.openSync`, then pass the integer fd). `stdio: ["ignore", writeStream, writeStream]` throws `ERR_INVALID_ARG_VALUE` on Node 24 because `fd` is null. Parent Node waits until the child exits. `detached` + `unref` plus parent exit closes the fd; the critic dies with a 0-byte log.
141
+
142
+ Dest is per-arc (`ensureArcDest`) at origin/<default> after fetch. Not primary. Not another panel dest.
143
+
144
+ **Claude** (cwd = dest). Unset Process-scope `ANTHROPIC_API_KEY` and `CLAUDE_API_KEY`.
145
+
146
+ ```text
147
+ claude -p "Read and follow <envelope-path>" --model opus --permission-mode bypassPermissions --output-format text
148
+ ```
149
+
150
+ - ⊗ `--bare` (skips OAuth/keychain; with Process-scope `ANTHROPIC_API_KEY` unset the child prints not-logged-in).
151
+ - ⊗ `--dangerously-skip-permissions` as a synonym for `--permission-mode bypassPermissions`.
152
+ - `--model opus` is the CLI alias. Self-attest the `model:` slug the critic actually posts. Do not treat a comment slug as argv.
153
+
154
+ **Codex** (`-C` dest):
155
+
156
+ ```text
157
+ codex exec --ephemeral --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox -C <dest> "Read and follow <envelope-path>"
158
+ ```
159
+
160
+ On ChatGPT omit `-m gpt-5.6` (HTTP 400). Self-attest the model the CLI ran.
161
+
162
+ **Grok.** Seat remains `spawn_subagent`. The host schema omits `process_only`. `subagent_type: plan` cannot post (read-only, no Shell) — dispatch-fail, not a hung critic. grok CLI is last-resort after a recorded native deny:
163
+
164
+ ```text
165
+ grok --cwd <dest> --prompt-file <path> --permission-mode bypassPermissions --always-approve --output-format plain
166
+ ```
167
+
168
+ ⊗ Dual-launch native + CLI. ⊗ Retarget the contract Grok seat to CLI.
169
+
170
+ Keep process-only plus one `gh issue comment --body-file` post. `claude agents` may report print-mode as `kind: interactive`; do not kill it as a TTY leftover.
171
+
134
172
  ## Out of scope
135
173
 
136
174
  - [#4027](https://github.com/deftai/directive/issues/4027) — N≥3 design-critique lean-timing. This playbook is host auth. Do not launch a 3-panel unless the operator asks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive-content",
3
- "version": "0.115.0",
3
+ "version": "0.116.0",
4
4
  "deftConsumerDeposit": true,
5
5
  "description": "Shippable Directive framework content in the consumer .deft/core/ layout (C1 flatten), plus the engine surfaces (.githooks/, Taskfile.yml, tasks/) the deposit wires. Python-free per #2022 Phase 3. Refs #11, #1669, #1967.",
6
6
  "license": "MIT",