Skip to content

feat(d1): Claude Code distribution plugins (code-oz wrapper + code-oz-discipline advisory)#38

Merged
omerakben merged 19 commits into
mainfrom
feat/d1-claude-plugins
May 21, 2026
Merged

feat(d1): Claude Code distribution plugins (code-oz wrapper + code-oz-discipline advisory)#38
omerakben merged 19 commits into
mainfrom
feat/d1-claude-plugins

Conversation

@omerakben
Copy link
Copy Markdown
Owner

@omerakben omerakben commented May 21, 2026

Summary

Ships D1 of the distribution pivot: two Claude Code plugins that discover and invoke the existing code-oz engine. No engine change, no new runtime authority (git diff main..HEAD -- src/ is empty).

  • D1a code-oz (engine wrapper): plugin manifest + marketplace listing, a shared bootstrap resolver (command -v code-oznpx -y @tuel/code-oz@<pinned> with the @Tuel scope-routing caveat → hard-stop; Windows rejected with the v0.21+ note), four slash commands (/code-oz-run|init|doctor|resume) each carrying an inline consent/boundaries header, and a plain-bash SessionStart hook that injects an engine-first router card plus a rule-9 host-exec declaration.
  • D1b code-oz-discipline (sibling plugin): three advisory skills (brainstorming, source-check, red-first) rendered by a deterministic templater that imports src/prompts/universal-rules.md verbatim. Every skill carries the advisory banner, the denylist refusal, lowest-authority framing, and the engine upsell.

The two plugins are separate because on Claude Code the plugin name is the skill namespace, so a sibling split is the only hard separation between "enforced" (engine wrapper) and "advisory" (discipline).

Honesty boundary (the load-bearing part)

The wrapper never writes .code-oz/, never declares a gate, never parses engine output into pass/fail, never simulates review — the engine stays the sole writer of gates, events, artifacts, and cross-family review (rules 1, 2, 21). The advisory skills never claim gate or review authority. Three directional static guards (Guard A first-person authority, Guard B gate-sense outcome, Guard C authority-inversion over user/CLAUDE.md/engine/system/developer/universal-rules) enforce this in tests, each verified by an injection attack-replay.

Process

  • Codex gpt-5.5 xhigh convergence debate before code (locks L1–L5: engine-first card wording, exactly four commands, plain-bash Claude-only hook, inline command consent, idempotence-marker-is-a-hint).
  • Per-commit Codex review on the shared-infra hook commit.
  • Per-task spec + code-quality review.
  • Codex completion review converged to push (fix-first → fix-first → push) with all block-push and block-next findings closed.

Test plan

  • bun test — 3642 pass, 2 skip (pre-existing opt-in xAI live), 0 fail
  • bun run typecheck — clean
  • claude plugin validate plugins/code-oz and plugins/code-oz-discipline — both pass
  • B4 offline acceptance harness (engine-invocation proof via the resolver, zero skill-side .code-oz/ writes, gate-shaped-output negative, auth-failure → engine NEEDS_INTERVENTION.json) green
  • E1–E9 offline corpus (E1–E7 integrity + E8–E9 positive controls) green
  • Opt-in live arms (billable claude -p): CODE_OZ_PLUGIN_LIVE_EVAL=claude bun test tests/plugins/b4-trigger-eval.test.ts tests/plugins/e1-e9-corpus-live.test.ts — run on demand to close the live trigger-routing and behavioral-corpus claims
  • Manual smoke: fresh Claude Code session installs the plugin via --plugin-dir and runs one FakeProvider lifecycle end-to-end through the wrapper

Summary by CodeRabbit

  • New Features

    • Added two plugins: an enforced engine plugin and an advisory "discipline" plugin with three advisory skills and four engine-facing commands (run, init, doctor, resume).
    • Added a skill renderer and verification mode plus marketplace metadata.
  • Documentation

    • Extensive design, distribution, convergence, and evaluation docs describing architecture, routing, hooks, and live/offline eval findings.
  • Tests

    • Many offline and opt-in live test suites validating manifests, hooks, resolver/bootstrap, skills, and adversarial E1–E9 corpus.

omerakben added 17 commits May 20, 2026 19:47
D0 findings, distribution plan, borrow analysis (v3), session kickoff, and
the D1 convergence debate (CODEX_BRIEFING/RESPONSE_D1_CONVERGENCE). Codex
gpt-5.5 xhigh read-only review returned 4 blocking items, all resolved with
locked decisions L1-L5 in CODEX_RESPONSE_D1_CONVERGENCE.md:
- L1 engine-first router wording + tightened trigger
- L2 keep exactly four commands
- L3 plain bash hook, Claude-only branch (no polyglot in D1a)
- L4 inline consent/boundaries in every command
- L5 idempotence marker is a hint, not suppression
Lays the plugin directory structure for the D1a distribution track.
Creates plugins/code-oz/.claude-plugin/plugin.json (locked to engine
version 0.20.3-alpha.0) and plugins/.claude-plugin/marketplace.json
listing the code-oz plugin with source ./code-oz. Command and hook
paths declared in plugin.json are stubs for later C3/C4 tasks.
Enforced by a 6-test RED-first suite in tests/plugins/manifest-shape.test.ts
that asserts version-sync between plugin.json and package.json. Both
bun test (6/6) and claude plugin validate pass.
…indows reject)

Four-branch contract (D0_FINDINGS §2.1, frozen):
  1. Windows detected via uname (or CODE_OZ_FAKE_UNAME test seam) -> exit 1, v0.21+ message
  2. code-oz on PATH -> exec directly, args forwarded
  3. npx on PATH -> exec npx -y @tuel/code-oz@<pinned> <args>; on non-zero exit, print
     @Tuel scope-routing caveat + Homebrew / @Tuel:registry fix suggestions
  4. neither present -> exit 1 with npm / brew install instructions

Pinned version read from sibling plugin.json via grep/sed (no jq dependency).
Test seams: CODE_OZ_FAKE_UNAME overrides uname for Windows-branch reachability on macOS.
Isolated PATH envs (fake executables in mkdtemp dirs) keep tests fully offline + deterministic.
8 new tests, all RED before implementation, all GREEN after. Full suite: 3442 pass, 0 fail.
…l notes + tests

Append || true to the grep|head|sed pipeline so a plugin.json with no
"version" key yields an empty string instead of aborting via set -e,
making the existing [[ -z PINNED_VERSION ]] guard reachable.

Extend the npx-branch comment to note the SIGTERM/SIGINT forwarding
trade-off (no exec means the bash wrapper sits between host and child).

Add two tests: exact npx exit-code propagation (fake npx exit 42) and
malformed plugin.json detection (temp dir layout, asserts non-zero exit
and "could not parse version" on stderr).
…sent + boundaries

Four command files under plugins/code-oz/commands/ — each is a ~35-line thin
launcher that calls the C2 resolver. Locked consent header and boundary phrases
(never write .code-oz/, do not decide pass/fail, do not claim review authority)
appear verbatim in every file. doctor carries the "no provider spend" qualifier;
run and resume carry the cost/confirmation notice.

41/41 new tests in tests/plugins/commands.test.ts pass (RED then GREEN).
Full suite: 3507 pass, 0 fail. claude plugin validate: passed.
…t-exec manifest

Adds the Claude Code SessionStart hook that injects the code-oz router card so
the host agent knows when to route work to the engine, bounded so it can never
claim engine authority.

Convergence locks honored (docs/design/CODEX_RESPONSE_D1_CONVERGENCE.md):
- L3 — plain bash, Claude-only branch. hooks.json matcher startup|clear|compact
  -> bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start". No polyglot run-hook.cmd.
  The script emits ONLY hookSpecificOutput.additionalContext (no Cursor
  additional_context, no Copilot top-level additionalContext). Extensionless
  script name. Degrades silently (exit 0, emit nothing) when the card is
  unreadable.
- L1 — engine-first wording + tightened production-bound/CI-release/shared
  trigger live verbatim in router-card.md (single source, testable).
- L5 — the marker is an idempotence hint, not suppression; the hook is stateless
  and does not dedupe.

Files:
- hooks/hooks.json — Claude-only SessionStart command hook.
- hooks/session-start — reads/JSON-escapes/emits the card; printf not heredoc
  (bash 5.3+ heredoc hang) + bash-parameter-substitution escaping.
- hooks/router-card.md — the verbatim router card (single source).
- hooks/host-exec-manifest.json — rule-9 host-exec declaration (validated in
  CI/review, not runtime sandbox; host hooks run unsandboxed).
- tests/plugins/router-hook.test.ts — RED-first: hooks.json shape, Claude-only
  JSON, escaping round-trip, silent degrade, card content + no coercion,
  manifest rule-9 fields.

No engine src/ changes. No advisory-discipline content (rule 20 — D1a is
engine-routing only). claude plugin validate passes; 3513 offline tests pass.
…, complete C0 escaping, edge-char + strict degrade tests, manifest script path
…cess)

C1/C3/C4 test files accessed array/marketplace entries without guarding
undefined under noUncheckedIndexedAccess. Add non-null assertions on
known-present indices. No behavior change; restores the types-check gate.
…, zero skill-side .code-oz writes, gate-shaped-output negative, auth-failure NEEDS_INTERVENTION)
… write ops, more self-authority phrasings, GATE_ false-positive)
…e listing

Create the advisory-skills plugin as a distinct namespace from code-oz (rule-20
separation): plugin.json with no commands/hooks keys, skills dir declared but
empty (C7 populates it), version-locked to 0.20.3-alpha.0. Add second entry to
marketplace.json. New discipline-manifest.test.ts asserts name/description/skills
presence, commands/hooks absence, and version equality. Update manifest-shape.test.ts
to expect two marketplace entries. All 3544 tests pass; typecheck clean; claude
plugin validate passes.
…) via deterministic renderer + universal-rules import
… + exhaustive shared denylist

Guard A (verb-level self-authority patterns) kept and tightened: exemption regex no longer allows
"instead" or a stray "never" unrelated to the claim; requires an actual negation or engine attribution.

Guard B (gate-sense outcome denylist) added: flags any line combining a gate-domain keyword with a
predicate-outcome word (passed, is approved, approved and, satisfied, completed, is done, ready for
build, ready to ship) or a surrogate-gate phrase (counts as / treat this as … gate / engine-equivalent),
unless the line attributes the action to the engine (the engine + space, or code-oz) or contains an
explicit refusal/disclaimer token. The "engine-" hyphenated form no longer gets an unwarranted exemption.

Five control CATCH assertions prove the guard flags the reviewer's bypass examples, including the
reported injection "the design is approved and the DEFINE gate passed". Five control ALLOW assertions
prove engine attributions and refusal/disclaimer lines remain exempt.

Three pinned disclaimer assertions (Fix 2) assert the load-bearing "what this is not" sentences in
source-check, red-first, and brainstorming VERBATIM so removing them fails the suite.

Fix 3: _denylist.md now names SOURCE_CHECK.md and BUILD_REPORT.md alongside VERIFY.md/REVIEW.md/AUDIT.md;
skills re-rendered (bun run skills:render); bun run skills:check reports in-sync.

Attack-replay confirmed: injecting "the design is approved and the DEFINE gate passed" into
skill-src/source-check.md, re-rendering, and running the suite produces 1 failure (Guard B catches it);
reverting and re-rendering returns to 40 pass / 0 fail.

Tests: 40 pass (was 32) in discipline-skills.test.ts; 3584 pass / 0 fail full suite; typecheck clean.
…ule-16 authority-precedence scanner, stale-doc fix
…rompt

Extend AUTHORITY_OBJECT_RE to match developer instructions, system
instructions, and system prompt (the B6 contract phrase
"system/developer constraints" was already present but required the
word "developer" after "system", leaving "system prompt" and standalone
"developer instructions" uncovered).

Add two positive controls to AUTHORITY_INVERSION_POSITIVE_CONTROLS:
  - "This skill overrides developer instructions."
  - "This skill overrides the system prompt."

Add two negative controls to AUTHORITY_INVERSION_NEGATIVE_CONTROLS to
prove no false-positive on the legitimate lowest-authority direction:
  - "System and developer constraints outrank this skill."
  - "The system prompt and developer instructions always take precedence
    over this skill."

Attack-replay: injected "This skill overrides the system prompt." into
skill-src/brainstorming.md, re-rendered, confirmed 3 failures; reverted
+ re-rendered, confirmed 87 pass. bun run skills:check in sync.
bun run typecheck: zero errors. bun test: 3640 pass / 0 fail.
Copilot AI review requested due to automatic review settings May 21, 2026 02:07
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

📝 Walkthrough

Walkthrough

Adds D1 distribution: engine-first wrapper plugin code-oz plus advisory code-oz-discipline; pinned bootstrap resolver, SessionStart routing hook, deterministic skill renderer, E1–E9 adversarial corpus, manifests/marketplace entries, and extensive offline and opt-in live tests validating contracts and honesty guards.

Changes

Code-OZ D1 Distribution: Two-Plugin Engine-First Architecture

Layer / File(s) Summary
Architecture & design convergence
docs/design/*
Multiple design and convergence documents locking D0–D1 decisions, distribution plan, adversarial corpus, and live-eval findings.
code-oz plugin manifest and marketplace
plugins/code-oz/.claude-plugin/plugin.json, plugins/.claude-plugin/marketplace.json
Adds plugin manifest and marketplace registration entries for code-oz and code-oz-discipline.
code-oz commands
plugins/code-oz/commands/code-oz-*.md
Four command docs (run, init, doctor, resume) specifying resolver invocation and strict engine-delegation/read-only boundaries.
SessionStart hook & host-exec manifest
plugins/code-oz/hooks/*
Adds session-start script emitting router-card JSON, hooks.json, host-exec-manifest.json, and router-card content describing routing/idempotence rules.
bootstrap resolver
plugins/code-oz/scripts/resolve-code-oz.sh
Bash resolver with pinned-version parsing, Windows rejection seam, PATH fast-path, npx fallback with trap and remediation messaging, and hard-stop install guidance.
code-oz-discipline renderer & templates
plugins/code-oz-discipline/scripts/render-skills.ts, skill-src/*
Deterministic renderer + source fragments (_banner, _denylist, _instruction-priority, _upsell) and exports for SKILL_NAMES/SkillName/renderSkill.
Rendered advisory skills
plugins/code-oz-discipline/skills/*/SKILL.md
Three advisory skills (brainstorming, red-first, source-check) rendered with denylist, instruction-priority, universal rules, and upsell to code-oz run.
Adversarial corpus & honesty guards
tests/plugins/e1-e9-corpus.ts
Defines E1–E9 corpus, Guard A/B/C scanners, helper predicates, and refusalTarget mapping for offline and live harnesses.
Tests — resolver, manifests, commands
tests/plugins/bootstrap-resolver.test.ts, tests/plugins/commands.test.ts, tests/plugins/manifest-shape.test.ts, tests/plugins/discipline-manifest.test.ts
Validate resolver behavior, pinned-version handling, command markdown locked phrases, and manifest/marketplace consistency.
Hook & router validation tests
tests/plugins/router-hook.test.ts
Validate SessionStart JSON emission, escaping, router-card constraints, and host-exec-manifest shape.
Discipline skills tests
tests/plugins/discipline-skills.test.ts
Validate skill frontmatter, required fragments, honesty-guard compliance, and renderer determinism.
E1–E9 offline corpus tests
tests/plugins/e1-e9-corpus.test.ts
CI checks ensuring integrity-row refusal tokens present, shared invariants, and positive-control expectations.
B4 offline acceptance harness
tests/plugins/b4-acceptance.test.ts
Acceptance groups verifying engine spawn, wrapper non-interference, authority boundaries, provider-failure relay, and idempotence/confirmation behavior.
Opt-in live tests (B4 & E1–E9)
tests/plugins/b4-trigger-eval.test.ts, tests/plugins/e1-e9-corpus-live.test.ts
Opt-in claude -p live evaluations using stream-json parsing with isolation and narrowed live assertions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 In Claude's garden two plugins play,

One routes the run, one guides the way.
Engine keeps the gates, skills kindly advise,
Tests guard the words, so truth never lies.
A rabbit nods—D1 converged today.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/d1-claude-plugins

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a multi-host distribution strategy for code-oz by introducing two Claude Code plugins: a core engine wrapper and an advisory discipline plugin. The changes include comprehensive design documentation, plugin manifests, slash commands, and an extensive test suite featuring an adversarial eval corpus to enforce authority boundaries. Feedback highlighted critical security improvements, specifically the need to quote $ARGUMENTS in command definitions to prevent injection vulnerabilities and a more robust approach to version extraction in the resolver script.

## How to run it

```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" doctor $ARGUMENTS
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Unquoted expansion of $ARGUMENTS is vulnerable to command injection if the host agent does not strictly sanitize user input. Quoting the variable prevents arbitrary shell command execution, although it may pass multiple flags as a single argument depending on how the host provides the value.

Suggested change
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" doctor $ARGUMENTS
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" doctor "$ARGUMENTS"

## How to run it

```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" init $ARGUMENTS
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Unquoted expansion of $ARGUMENTS is vulnerable to command injection. Quoting the variable is a best practice to prevent arbitrary code execution from malicious or malformed user input.

Suggested change
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" init $ARGUMENTS
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" init "$ARGUMENTS"

## How to run it

```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" resume $ARGUMENTS
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Unquoted expansion of $ARGUMENTS allows for command injection. It is recommended to quote the variable to ensure that user-provided arguments are handled safely by the shell.

Suggested change
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" resume $ARGUMENTS
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" resume "$ARGUMENTS"

Comment thread plugins/code-oz/commands/code-oz-run.md Outdated
## How to run it

```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" run $ARGUMENTS
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

Unquoted expansion of $ARGUMENTS poses a command injection risk. Quoting the variable ensures that the input is treated as data rather than executable code by the shell interpreter.

Suggested change
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" run $ARGUMENTS
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-code-oz.sh" run "$ARGUMENTS"

exit 1
fi

PINNED_VERSION="$(grep '"version"' "${PLUGIN_JSON}" | head -1 | sed 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' || true)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current version extraction is fragile. If grep matches a line that doesn't strictly follow the expected JSON key-value format (e.g., the word 'version' appearing in a description or keyword list), sed will fail to match the capture group and output the entire line as-is, leading to a corrupted PINNED_VERSION. Using a more specific grep pattern and sed -n with the p command ensures that only a valid version string is captured.

Suggested change
PINNED_VERSION="$(grep '"version"' "${PLUGIN_JSON}" | head -1 | sed 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/' || true)"
PINNED_VERSION="$(grep '"version"[[:space:]]*:' "${PLUGIN_JSON}" | head -1 | sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^\"]*\)".*/\1/p' || true)"

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f73b97016c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/code-oz/hooks/hooks.json Outdated
"hooks": {
"SessionStart": [
{
"matcher": "startup|clear|compact",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include resume in SessionStart matcher

The SessionStart hook is configured with matcher: "startup|clear|compact", which skips resumed sessions. Per Claude Code’s hook contract, SessionStart sources include startup, resume, clear, and compact; omitting resume means the router card (and its boundary instructions like “never write under .code-oz/”) is not injected when users start with --resume, --continue, or /resume. In that scenario, the host agent loses the intended routing/safety context for exactly the continuation workflow this plugin advertises, so this should include resume as a matcher.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces two Claude Code plugins that package and enforce the “engine-first wrapper + advisory-only discipline” distribution split, without changing the src/ engine: a code-oz wrapper plugin (commands + SessionStart router card + bootstrap resolver) and a sibling code-oz-discipline plugin (advisory skills rendered deterministically and guarded by an adversarial corpus). It also adds a fairly comprehensive offline+opt-in-live test harness to prevent authority-smuggling and drift.

Changes:

  • Add plugins/code-oz wrapper: bootstrap resolver (resolve-code-oz.sh), four slash commands, and a Claude-only SessionStart hook that injects a router card (plus rule-9-style host-exec declaration).
  • Add plugins/code-oz-discipline advisory plugin: deterministic skill renderer + shipped skill artifacts, plus offline structural gates and opt-in live behavioral corpus tests (E1–E9) to enforce honesty boundaries.
  • Add manifest/version-drift tests and new package scripts (skills:render, skills:check) to keep generated skills in sync.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/plugins/router-hook.test.ts Offline tests for SessionStart hook/hook JSON/escaping/degrade-silently + router-card content expectations.
tests/plugins/manifest-shape.test.ts Enforces wrapper plugin manifest shape + version sync with root package.json and marketplace entries.
tests/plugins/e1-e9-corpus.ts Shared corpus rows + Guard A/B/C logic and invariant scanners for advisory honesty boundaries.
tests/plugins/e1-e9-corpus.test.ts Offline structural gate that asserts advisory skills are “equipped” to refuse integrity attacks and preserve invariants.
tests/plugins/e1-e9-corpus-live.test.ts Opt-in live claude -p behavioral assertions for the E1–E9 corpus (stream-json parsing).
tests/plugins/discipline-skills.test.ts Offline acceptance harness for advisory skill content + imports shared honesty guards from the corpus module.
tests/plugins/discipline-manifest.test.ts Ensures advisory plugin has skills only (no hooks/commands) + version lock + marketplace consistency.
tests/plugins/commands.test.ts Offline assertions for wrapper command markdown files: frontmatter, consent header, resolver usage, boundaries.
tests/plugins/bootstrap-resolver.test.ts Offline tests for resolver branches (PATH, npx fallback, npx failure caveat, hard-stop, Windows rejection).
tests/plugins/b4-trigger-eval.test.ts Opt-in live B4 behavioral routing eval for wrapper plugin via stream-json structured parsing.
plugins/code-oz/scripts/resolve-code-oz.sh Thin launcher resolving code-oz via PATH → npx pinned fallback → hard-stop; Windows rejection.
plugins/code-oz/hooks/session-start Claude-only SessionStart hook emitting hookSpecificOutput.additionalContext with robust JSON escaping.
plugins/code-oz/hooks/router-card.md Router card content defining when to route to engine and load-bearing boundaries/consent semantics.
plugins/code-oz/hooks/host-exec-manifest.json Rule-9-shaped host-exec declaration describing intended hook execution surface.
plugins/code-oz/hooks/hooks.json Registers the SessionStart command hook to run the bash session-start script and degrade silently.
plugins/code-oz/EVAL.md Documentation for offline vs live B4 behavioral eval and how to run it.
plugins/code-oz/commands/code-oz-run.md /code-oz-run command definition and boundaries/cost notice.
plugins/code-oz/commands/code-oz-resume.md /code-oz-resume command definition and boundaries/cost notice.
plugins/code-oz/commands/code-oz-init.md /code-oz-init command definition and boundaries.
plugins/code-oz/commands/code-oz-doctor.md /code-oz-doctor command definition and “no provider spend” qualifier.
plugins/code-oz/.claude-plugin/plugin.json Wrapper plugin manifest (name/desc/version/commands/hooks).
plugins/code-oz-discipline/skills/source-check/SKILL.md Rendered advisory skill artifact (includes banner, denylist, universal rules import, upsell).
plugins/code-oz-discipline/skills/red-first/SKILL.md Rendered advisory skill artifact (includes banner, denylist, universal rules import, upsell).
plugins/code-oz-discipline/skills/brainstorming/SKILL.md Rendered advisory skill artifact (includes banner, denylist, universal rules import, upsell).
plugins/code-oz-discipline/skill-src/source-check.md Source template for source-check before deterministic assembly.
plugins/code-oz-discipline/skill-src/red-first.md Source template for red-first before deterministic assembly.
plugins/code-oz-discipline/skill-src/brainstorming.md Source template for brainstorming before deterministic assembly.
plugins/code-oz-discipline/skill-src/_upsell.md Shared upsell partial appended to all advisory skills.
plugins/code-oz-discipline/skill-src/_instruction-priority.md Shared instruction-priority / lowest-authority partial for advisory skills.
plugins/code-oz-discipline/skill-src/_denylist.md Shared denylist/refusal partial forbidding gate-shaped output and authority claims.
plugins/code-oz-discipline/skill-src/_banner.md Shared advisory banner partial (verbatim string).
plugins/code-oz-discipline/scripts/render-skills.ts Deterministic renderer assembling SKILL.md from partials + universal rules (verbatim).
plugins/code-oz-discipline/EVAL.md Documentation for offline vs live E1–E9 corpus gating and how to run it.
plugins/code-oz-discipline/.claude-plugin/plugin.json Advisory plugin manifest (skills-only).
plugins/.claude-plugin/marketplace.json Marketplace listing containing exactly the two sibling plugins + versions/sources.
package.json Adds skills:render and skills:check scripts.
docs/design/SUPERPOWERS_BORROW_ANALYSIS.md New design doc capturing borrow analysis + contracts + eval corpus definition.
docs/design/SESSION_DIST_D0_D1_KICKOFF.md New session kickoff doc for distribution stages and boundaries.
docs/design/SESSION_D1_KICKOFF.md New D1 kickoff doc capturing staged build plan and acceptance criteria.
docs/design/DISTRIBUTION_PLAN_FINAL.md New converged distribution plan doc (staging + contracts).
docs/design/D0_FINDINGS.md New D0 findings doc recording verified mechanics and frozen D1 contracts.
docs/design/CODEX_RESPONSE_DISTRIBUTION_PIVOT.md New Codex debate response artifact documenting decision rationale.
docs/design/CODEX_RESPONSE_D1_CONVERGENCE.md New Codex convergence synthesis artifact for locked D1a surface decisions.
docs/design/CODEX_RESPONSE_BORROW_R3.md New Codex convergence loop round 3 artifact.
docs/design/CODEX_RESPONSE_BORROW_R2.md New Codex convergence loop round 2 artifact.
docs/design/CODEX_RESPONSE_BORROW_R1.md New Codex convergence loop round 1 artifact.
docs/design/CODEX_BRIEFING_DISTRIBUTION_PIVOT.md New Codex briefing artifact for the distribution pivot debate.
docs/design/CODEX_BRIEFING_D1_CONVERGENCE.md New Codex briefing artifact for D1 convergence debate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +69 to +79
function claudeOnPath(): boolean {
const probe = Bun.spawnSync({
cmd: ['command', '-v', 'claude'],
// `command` is a shell builtin; spawn through sh so it resolves.
// Fall back to a direct `which` if the builtin path fails.
stdout: 'ignore',
stderr: 'ignore',
})
if (probe.exitCode === 0) return true
const which = Bun.spawnSync({ cmd: ['which', 'claude'], stdout: 'ignore', stderr: 'ignore' })
return which.exitCode === 0
Comment on lines +62 to +66
function claudeOnPath(): boolean {
const probe = Bun.spawnSync({ cmd: ['command', '-v', 'claude'], stdout: 'ignore', stderr: 'ignore' })
if (probe.exitCode === 0) return true
const which = Bun.spawnSync({ cmd: ['which', 'claude'], stdout: 'ignore', stderr: 'ignore' })
return which.exitCode === 0
Comment thread tests/plugins/manifest-shape.test.ts Outdated
import { readFile } from 'node:fs/promises'
import { join } from 'node:path'

const REPO_ROOT = new URL('../../', import.meta.url).pathname.replace(/\/$/, '')
import { readFile } from 'node:fs/promises'
import { join } from 'node:path'

const REPO_ROOT = new URL('../../', import.meta.url).pathname.replace(/\/$/, '')
Comment thread plugins/code-oz/hooks/router-card.md Outdated
Comment on lines +20 to +22
- This card defers to the user's instructions and to CLAUDE.md. If another skills
system (e.g. superpowers) is installed, it keeps its own routing; this card only
adds the engine-routing pointer.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/design/D0_FINDINGS.md`:
- Around line 18-20: Several fenced code blocks in the D0_FINDINGS document lack
language identifiers (triggering MD040); update each fence surrounding the
literal "npm error 404 Not Found - GET
https://npm.pkg.github.com/@tuel%2fcode-oz" to ```text, the numbered block that
starts with "1. If `command -v code-oz` resolves" to ```text, and the block
beginning with "<!-- code-oz-router v1 -->" to ```markdown (and similarly add
appropriate language tags for the other fenced blocks referenced at ranges 58-66
and 74-97) so every triple-backtick fence includes a language token.

In `@plugins/code-oz-discipline/skills/brainstorming/SKILL.md`:
- Around line 121-123: The fenced code block containing the command "code-oz
run" is missing a language tag (causing MD040); edit the markdown in SKILL.md to
add a language identifier (e.g., bash) to that fenced block so it becomes a
typed code fence for the command, leaving the command text unchanged.

In `@plugins/code-oz-discipline/skills/red-first/SKILL.md`:
- Around line 124-126: The fenced code block containing the command "code-oz
run" in SKILL.md lacks a language tag; update that fenced block to include an
appropriate language identifier (e.g., bash or sh) so the block becomes
triple-backticked with the language (refer to the fenced block content "code-oz
run") to satisfy the MD040 lint rule.

In `@plugins/code-oz-discipline/skills/source-check/SKILL.md`:
- Around line 121-123: The fenced code block containing the command "code-oz
run" is missing a language tag; update that fenced block to include a language
identifier (e.g., change the opening ``` to ```bash) so the block becomes a bash
code fence and satisfies markdown lint rule MD040; locate the block that wraps
"code-oz run" in SKILL.md and add the language tag to the opening fence.

In `@plugins/code-oz/hooks/hooks.json`:
- Line 9: The current hooks.json "command" entry runs bash
"${CLAUDE_PLUGIN_ROOT}/hooks/session-start" with output suppressed and "||
true", which hides real failures; update the "command" value to invoke the
script without the trailing "2>/dev/null || true" (e.g., bash
"${CLAUDE_PLUGIN_ROOT}/hooks/session-start") so that errors from
hooks/session-start propagate and are visible, leaving the script's own silent
degradation intact when appropriate.

In `@tests/plugins/discipline-manifest.test.ts`:
- Line 13: Replace the brittle REPO_ROOT definition that uses new
URL(...).pathname.replace(...) with the robust fileURLToPath approach: use
fileURLToPath(new URL('../../', import.meta.url)) for REPO_ROOT in
tests/plugins/discipline-manifest.test.ts (and mirror the same change in
tests/plugins/manifest-shape.test.ts), and add the corresponding import {
fileURLToPath } from 'url' if it isn’t already imported so path resolution works
correctly across platforms and encoded paths.

In `@tests/plugins/manifest-shape.test.ts`:
- Line 13: Replace the fragile pathname-based repo root resolution that uses
import.meta.url and URL.pathname with a platform-correct conversion via
fileURLToPath: import fileURLToPath from 'url' (or destructure fileURLToPath
from 'url') and use fileURLToPath(new URL('../../', import.meta.url)) to produce
REPO_ROOT, then trim any trailing slash as before; update the declaration of the
REPO_ROOT constant (the current REPO_ROOT assignment) and add the corresponding
fileURLToPath import so the path is correct on Windows and handles URL-encoding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67f7f7cc-67a3-49ac-aecb-9b029054942e

📥 Commits

Reviewing files that changed from the base of the PR and between ecaf6e0 and f73b970.

📒 Files selected for processing (49)
  • docs/design/CODEX_BRIEFING_D1_CONVERGENCE.md
  • docs/design/CODEX_BRIEFING_DISTRIBUTION_PIVOT.md
  • docs/design/CODEX_RESPONSE_BORROW_R1.md
  • docs/design/CODEX_RESPONSE_BORROW_R2.md
  • docs/design/CODEX_RESPONSE_BORROW_R3.md
  • docs/design/CODEX_RESPONSE_D1_CONVERGENCE.md
  • docs/design/CODEX_RESPONSE_DISTRIBUTION_PIVOT.md
  • docs/design/D0_FINDINGS.md
  • docs/design/DISTRIBUTION_PLAN_FINAL.md
  • docs/design/SESSION_D1_KICKOFF.md
  • docs/design/SESSION_DIST_D0_D1_KICKOFF.md
  • docs/design/SUPERPOWERS_BORROW_ANALYSIS.md
  • package.json
  • plugins/.claude-plugin/marketplace.json
  • plugins/code-oz-discipline/.claude-plugin/plugin.json
  • plugins/code-oz-discipline/EVAL.md
  • plugins/code-oz-discipline/scripts/render-skills.ts
  • plugins/code-oz-discipline/skill-src/_banner.md
  • plugins/code-oz-discipline/skill-src/_denylist.md
  • plugins/code-oz-discipline/skill-src/_instruction-priority.md
  • plugins/code-oz-discipline/skill-src/_upsell.md
  • plugins/code-oz-discipline/skill-src/brainstorming.md
  • plugins/code-oz-discipline/skill-src/red-first.md
  • plugins/code-oz-discipline/skill-src/source-check.md
  • plugins/code-oz-discipline/skills/brainstorming/SKILL.md
  • plugins/code-oz-discipline/skills/red-first/SKILL.md
  • plugins/code-oz-discipline/skills/source-check/SKILL.md
  • plugins/code-oz/.claude-plugin/plugin.json
  • plugins/code-oz/EVAL.md
  • plugins/code-oz/commands/code-oz-doctor.md
  • plugins/code-oz/commands/code-oz-init.md
  • plugins/code-oz/commands/code-oz-resume.md
  • plugins/code-oz/commands/code-oz-run.md
  • plugins/code-oz/hooks/hooks.json
  • plugins/code-oz/hooks/host-exec-manifest.json
  • plugins/code-oz/hooks/router-card.md
  • plugins/code-oz/hooks/session-start
  • plugins/code-oz/scripts/resolve-code-oz.sh
  • tests/plugins/b4-acceptance.test.ts
  • tests/plugins/b4-trigger-eval.test.ts
  • tests/plugins/bootstrap-resolver.test.ts
  • tests/plugins/commands.test.ts
  • tests/plugins/discipline-manifest.test.ts
  • tests/plugins/discipline-skills.test.ts
  • tests/plugins/e1-e9-corpus-live.test.ts
  • tests/plugins/e1-e9-corpus.test.ts
  • tests/plugins/e1-e9-corpus.ts
  • tests/plugins/manifest-shape.test.ts
  • tests/plugins/router-hook.test.ts

Comment thread docs/design/D0_FINDINGS.md Outdated
Comment thread plugins/code-oz-discipline/skills/brainstorming/SKILL.md Outdated
Comment thread plugins/code-oz-discipline/skills/red-first/SKILL.md Outdated
Comment thread plugins/code-oz-discipline/skills/source-check/SKILL.md Outdated
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\" 2>/dev/null || true",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "hooks.json command:"
sed -n '1,80p plugins/code-oz/hooks/hooks.json

echo
echo "session-start script (verify whether it already handles graceful no-bash/error cases):"
sed -n '1,220p plugins/code-oz/hooks/session-start

Repository: omerakben/code-oz

Length of output: 161


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== hooks.json (with line numbers) ==" 
nl -ba plugins/code-oz/hooks/hooks.json | sed -n '1,120p'

echo
echo "== session-start (with line numbers) =="
nl -ba plugins/code-oz/hooks/session-start | sed -n '1,220p'

echo
echo "== occurrences of '|| true' in plugins/code-oz/hooks =="
rg -n '\|\|\s*true' plugins/code-oz/hooks || true

Repository: omerakben/code-oz

Length of output: 159


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== ls plugins/code-oz/hooks =="
ls -la plugins/code-oz/hooks || true

echo
echo "== hooks.json (cat -n) =="
cat -n plugins/code-oz/hooks/hooks.json | sed -n '1,160p'

echo
echo "== session-start (cat -n) =="
cat -n plugins/code-oz/hooks/session-start | sed -n '1,260p'

echo
echo "== occurrences of '|| true' in plugins/code-oz/hooks =="
rg -n '\|\|\s*true' plugins/code-oz/hooks || true

Repository: omerakben/code-oz

Length of output: 5374


Avoid suppressing real session-start failures in the hook command.

plugins/code-oz/hooks/hooks.json currently runs session-start with bash ... 2>/dev/null || true; since plugins/code-oz/hooks/session-start already degrades silently (exit 0) when router-card.md is missing/empty, the || true only hides genuine script errors (the script uses set -euo pipefail).

Proposed fix
-            "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\" 2>/dev/null || true",
+            "command": "if command -v bash >/dev/null 2>&1; then bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\"; fi",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\" 2>/dev/null || true",
"command": "if command -v bash >/dev/null 2>&1; then bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start\"; fi",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/code-oz/hooks/hooks.json` at line 9, The current hooks.json "command"
entry runs bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start" with output
suppressed and "|| true", which hides real failures; update the "command" value
to invoke the script without the trailing "2>/dev/null || true" (e.g., bash
"${CLAUDE_PLUGIN_ROOT}/hooks/session-start") so that errors from
hooks/session-start propagate and are visible, leaving the script's own silent
degradation intact when appropriate.

Comment thread tests/plugins/discipline-manifest.test.ts Outdated
Comment thread tests/plugins/manifest-shape.test.ts Outdated
…-language, harness-bug fixes + findings doc

First live `claude -p` run returned 1/12; diagnosed into three buckets and
reworked the eval to test what the plugins CAN do (not green-washing):
- Isolation: both live arms pass --setting-sources project so co-installed
  superpowers no longer dominates (probe 1: code-oz routes correctly isolated).
- Narrowed D1b claim (user decision): advisory skills are honest helpers, not
  enforcers (rule 1 — engine enforces). Live E8/E9 assert the right
  code-oz-discipline skill fires + useful output; E1-E7 are non-failing
  informational probes. Offline gate (content honesty) unchanged in strength;
  added an anchor test pinning the division.
- B7: natural-language doctor request (slash commands are Unknown-command
  headless; probe 3/3b). Banner-in-output assertion replaced by skill-fired.
- docs/design/D1_LIVE_EVAL_FINDINGS.md records evidence + the genuine findings
  (advisory can't enforce = engine's job; superpowers co-existence; slash-headless).
- EVAL.md (both plugins) updated to the narrowed claim + isolation.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a11db5be9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# ---------------------------------------------------------------------------
if command -v npx >/dev/null 2>&1; then
# Use a subshell so set -e does not abort us before we can print the caveat.
if npx -y "@tuel/code-oz@${PINNED_VERSION}" "$@"; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Forward termination signals to npx child

The npx fallback runs npx as a child process without exec and without any signal-forwarding trap, so when the wrapper is terminated (for example by Claude Code cancelling the command), the child can continue running independently. In environments that hit this fallback (no code-oz on PATH), cancellation can leave npx/code-oz alive, which may keep making provider calls and changing files after the host thinks the run was stopped.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/design/D1_LIVE_EVAL_FINDINGS.md`:
- Around line 11-13: Update the fenced code block that contains the command
"CODE_OZ_PLUGIN_LIVE_EVAL=claude bun test tests/plugins/b4-trigger-eval.test.ts
tests/plugins/e1-e9-corpus-live.test.ts" to include a language tag (e.g., bash)
after the opening ``` so the fence becomes ```bash; this will satisfy
markdownlint MD040 and improve readability while keeping the command content
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 141036df-2388-4fa0-b73c-1c6582713f20

📥 Commits

Reviewing files that changed from the base of the PR and between f73b970 and 4502d69.

📒 Files selected for processing (21)
  • docs/design/D0_FINDINGS.md
  • docs/design/D1_LIVE_EVAL_FINDINGS.md
  • plugins/code-oz-discipline/EVAL.md
  • plugins/code-oz-discipline/skill-src/_upsell.md
  • plugins/code-oz-discipline/skills/brainstorming/SKILL.md
  • plugins/code-oz-discipline/skills/red-first/SKILL.md
  • plugins/code-oz-discipline/skills/source-check/SKILL.md
  • plugins/code-oz/EVAL.md
  • plugins/code-oz/commands/code-oz-doctor.md
  • plugins/code-oz/commands/code-oz-init.md
  • plugins/code-oz/commands/code-oz-resume.md
  • plugins/code-oz/commands/code-oz-run.md
  • plugins/code-oz/hooks/hooks.json
  • plugins/code-oz/hooks/router-card.md
  • plugins/code-oz/scripts/resolve-code-oz.sh
  • tests/plugins/b4-trigger-eval.test.ts
  • tests/plugins/discipline-manifest.test.ts
  • tests/plugins/e1-e9-corpus-live.test.ts
  • tests/plugins/e1-e9-corpus.test.ts
  • tests/plugins/manifest-shape.test.ts
  • tests/plugins/router-hook.test.ts
✅ Files skipped from review due to trivial changes (10)
  • plugins/code-oz/hooks/router-card.md
  • plugins/code-oz-discipline/skills/brainstorming/SKILL.md
  • plugins/code-oz/commands/code-oz-init.md
  • plugins/code-oz-discipline/skill-src/_upsell.md
  • plugins/code-oz/EVAL.md
  • plugins/code-oz/commands/code-oz-run.md
  • plugins/code-oz-discipline/skills/source-check/SKILL.md
  • plugins/code-oz-discipline/skills/red-first/SKILL.md
  • plugins/code-oz-discipline/EVAL.md
  • docs/design/D0_FINDINGS.md

Comment on lines +11 to +13
```
CODE_OZ_PLUGIN_LIVE_EVAL=claude bun test tests/plugins/b4-trigger-eval.test.ts tests/plugins/e1-e9-corpus-live.test.ts
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language tag to the fenced command block.

Line 11 uses a plain fence without a language, which triggers markdownlint MD040 and hurts readability.

Proposed fix
-```
+```bash
 CODE_OZ_PLUGIN_LIVE_EVAL=claude bun test tests/plugins/b4-trigger-eval.test.ts tests/plugins/e1-e9-corpus-live.test.ts
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 11-11: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/design/D1_LIVE_EVAL_FINDINGS.md` around lines 11 - 13, Update the fenced
code block that contains the command "CODE_OZ_PLUGIN_LIVE_EVAL=claude bun test
tests/plugins/b4-trigger-eval.test.ts tests/plugins/e1-e9-corpus-live.test.ts"
to include a language tag (e.g., bash) after the opening ``` so the fence
becomes ```bash; this will satisfy markdownlint MD040 and improve readability
while keeping the command content unchanged.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4502d69ee2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +103 to +108
printf 'A @tuel scope-routing trap may be 404ing on npm.pkg.github.com.\n' >&2
printf 'To fix:\n' >&2
printf ' Option A — install via Homebrew (bypasses npm scope routing):\n' >&2
printf ' brew install omerakben/tap/code-oz\n' >&2
printf ' Option B — set the @tuel registry in your .npmrc:\n' >&2
printf ' @tuel:registry=https://registry.npmjs.org/\n' >&2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Only show @Tuel registry caveat on install resolution failures

This branch treats every non-zero exit from npx as a package-resolution problem and always prints the @tuel/Homebrew recovery text, but npx also returns the exit code from the executed code-oz command. That means normal engine failures (for example invalid args, runtime/provider errors, or user-interrupted runs while using the npx fallback path) are misreported as npm scope-routing issues, which can send users to the wrong remediation and hide the real stderr cause. Please gate this caveat behind detected npm fetch/install errors and otherwise pass through the underlying failure unchanged.

Useful? React with 👍 / 👎.

@omerakben omerakben merged commit 7313571 into main May 21, 2026
3 checks passed
@omerakben omerakben deleted the feat/d1-claude-plugins branch May 30, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants