Skip to content

feat: migrate skill-channel personal scalars to native userConfig (4 plugins) - #325

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/userconfig-skill-channel
Jul 18, 2026
Merged

feat: migrate skill-channel personal scalars to native userConfig (4 plugins)#325
kyle-sexton merged 1 commit into
mainfrom
feat/userconfig-skill-channel

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Part of #315 (userConfig wave). No linked issue closes with this PR — closing #315 is gated on the hook-channel PR #323 landing and the wave acceptance sweep.

What

Completes the #315 scalar migrations outside the shared hook-utils wave (#323). These scalars are read by skill-invoked scripts or skill content, where the CLAUDE_PLUGIN_OPTION_* mirror does not reach — each value now flows through non-sensitive ${user_config.*} substitution in the skill body into an explicit script flag, or (for the two skill-scoped guard hooks, which ARE hook processes) through the mirror directly.

Per plugin

  • source-control 0.7.0worktree_stale_days (default 14), babysit_self_logins (csv, default empty), fetch_logs_max_bytes (default 52428800). babysit-readiness-gate.sh gains an additive --extra-self flag — preserving the retired env var's add-to-personal-login semantics; the pre-existing --self full-override contract is unchanged. fetch-failed-logs.sh gains --max-bytes. Skill bodies carry the substituted values (reference/context files are not substituted, so the values enter context via SKILL.md); every instruction includes the unexpanded-token fallback.
  • knowledge 0.7.0yt_dlp_js_runtimes (default "node"), yt_dlp_cookies_file, yt_dlp_cookies_from_browser, max_concurrent_acquires (default 1, max 3), wired through new run.mjs launcher flags on the plugin's existing library_dir--work-root precedent; the YOUTUBE_* env vars remain only as the launcher-to-child internal interface. Course-platform credentials (TEACHABLE_*/COURSE_*) deliberately stay in shell env — sensitive: true persists as plaintext in ~/.claude/.credentials.json on Windows — and that misfit is now documented at the site (the audit's dim-6 requirement).
  • disk-hygiene 0.3.0disk_hygiene_enabled (default true) read by the skill-scoped guard via CLAUDE_PLUGIN_OPTION_DISK_HYGIENE_ENABLED.
  • repo-hygiene 0.2.0clean_destructive_guard_enabled (default true) via CLAUDE_PLUGIN_OPTION_CLEAN_DESTRUCTIVE_GUARD_ENABLED.
  • planning — the audit's use_ask_user_question description-copy defect no longer reproduces (fixed upstream before this wave); no change shipped.

BREAKING (consumer-visible): WORKTREE_STALE_DAYS, BABYSIT_SELF_LOGINS, FETCH_LOGS_MAX_BYTES, HOOK_DISK_HYGIENE_ENABLED, HOOK_CLEAN_DESTRUCTIVE_GUARD_ENABLED, and the four YOUTUBE_* consumer channels are no longer read from consumer-set env; re-express non-default values as the matching userConfig options. Zero-config behavior unchanged everywhere. FETCH_LOGS_SCRATCH / FETCH_LOGS_REPO remain env (out of #315 scope).

Verification

  • babysit-readiness-gate suite 47 PASS (including the new --extra-self path); repo-hygiene guard suite 30 PASS; disk-hygiene pytest OK; knowledge vitest 33/33 on the four affected files + tsc --noEmit clean.
  • fetch-failed-logs suite requires zip (absent on this machine — it self-skips; CI runs it). The --max-bytes change is a one-line default-substitution swap plus a validated flag parse.
  • scripts/validate-plugins.sh (manifests + catalog, strict) and node scripts/generate-catalog.mjs --check green; markdownlint 0 errors on every edited file; residual grep confirms no consumer-facing doc still instructs setting a retired env var.
  • knowledge package-lock.json verified pristine (a subagent's local npm install was reverted before commit).

Related

🤖 Generated with Claude Code

…plugins)

Completes the #315 scalar migrations outside the shared hook-utils wave.
These scalars are read by skill-invoked scripts or skill content, where the
CLAUDE_PLUGIN_OPTION mirror does not reach, so each value flows through
non-sensitive ${user_config.*} substitution in the skill body into an
explicit script flag (or, for the two skill-scoped guard hooks, through the
mirror directly).

- source-control 0.7.0: worktree_stale_days, babysit_self_logins,
  fetch_logs_max_bytes options. babysit-readiness-gate.sh gains an additive
  --extra-self flag (preserving the env var's add-to-personal-login
  semantics; --self stays a full override); fetch-failed-logs.sh gains
  --max-bytes. Skill bodies carry the substituted values; reference docs
  point at the flags.
- knowledge 0.7.0: yt_dlp_js_runtimes, yt_dlp_cookies_file,
  yt_dlp_cookies_from_browser, max_concurrent_acquires options wired through
  new run.mjs launcher flags on the existing library_dir --work-root
  pattern; the YOUTUBE_* env vars remain only as the launcher-to-child
  internal interface. Course-platform credentials deliberately stay in shell
  env until keychain-backed sensitive storage lands on Windows — misfit now
  documented at the site.
- disk-hygiene 0.3.0: disk_hygiene_enabled guard toggle via the mirror.
- repo-hygiene 0.2.0: clean_destructive_guard_enabled guard toggle via the
  mirror.
- planning's use_ask_user_question description defect (audit finding) no
  longer reproduces — fixed upstream before this wave; no change shipped.

BREAKING: WORKTREE_STALE_DAYS, BABYSIT_SELF_LOGINS, FETCH_LOGS_MAX_BYTES,
HOOK_DISK_HYGIENE_ENABLED, HOOK_CLEAN_DESTRUCTIVE_GUARD_ENABLED, and the
four YOUTUBE_* consumer channels are no longer read from consumer-set env.
Zero-config behavior unchanged everywhere.

Tests: babysit-readiness-gate 47 PASS; repo-hygiene guard 30 PASS;
disk-hygiene pytest OK; knowledge vitest 33/33 on affected files + tsc
clean; fetch-failed-logs suite requires zip (absent locally — CI covers);
manifests + catalog validate; markdownlint clean on all edited files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton enabled auto-merge (squash) July 18, 2026 02:43
@kyle-sexton
kyle-sexton merged commit 38f2d31 into main Jul 18, 2026
19 of 20 checks passed
@kyle-sexton
kyle-sexton deleted the feat/userconfig-skill-channel branch July 18, 2026 02:46

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

Copy link
Copy Markdown

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: 6b33330b4a

ℹ️ 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 +95 to +98
if (Object.keys(overlay).length === 0) {
return baseEnv;
}
return { ...baseEnv, YOUTUBE_WORK_ROOT: workRoot };
return { ...baseEnv, ...overlay };

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 Strip retired YouTube env vars before spawning

With this merge the child still inherits the caller's full shell environment, while resolveYtDlpAuthArgs() and resolveMaxConcurrentAcquires() continue to read YOUTUBE_YT_DLP_* and YOUTUBE_MAX_CONCURRENT_ACQUIRES. In any install where a user still has one of those retired variables exported and leaves the matching userConfig option at its default (or only passes a different launcher flag), the migrated launcher silently keeps applying the stale shell value instead of the plugin option/default. Sanitize those retired names out of baseEnv before applying the launcher overlay.

Useful? React with 👍 / 👎.

kyle-sexton added a commit that referenced this pull request Jul 18, 2026
…ave)

Resolve the plugin.json / CHANGELOG / README conflicts from main's #325
(skill-channel userConfig migration); rebump source-control to 0.8.0 (main
shipped 0.7.0).

- Prefix all 15 babysit userConfig keys `babysit_*` to match #325's
  feature-prefixed convention; `self_logins` unifies with #325's
  `babysit_self_logins`. Keep main's `worktree_stale_days` and
  `fetch_logs_max_bytes`.
- Additive self-identity across every consumer: `--extra-self` (gate, from
  #325), `--author @me,<extras>` (discovery), `--self-logins @me,<extras>`
  (merge gate) each fold `babysit_self_logins` onto your gh login.
- Fix F4: review-trigger candidacy no longer stalls when no CI gateway context
  is configured (ci_gateway_green true when unset).
- Fix F5: pr_queue_snapshot stores the resolved --state-dir so a `~`-prefixed
  dir is shared with the other state CLIs.
- Fix F6: babysit_merge resolves `@me` in --self-logins (after the
  argument-shape refusals; fail-closed if unresolvable) so own PRs are exempt
  from the unprotected-base hold. Reported by Codex on #322.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 18, 2026
Adds opt-in `worker` and `autopilot` tiers to `/source-control:babysit-prs` on
top of the safe default, backed by a stdlib-only decomposed Python engine and a
deterministic, head-SHA-pinned merge gate (mergeStateStatus == CLEAN cross-check,
never `--admin`, never force-push). State root moves from `CODEX_HOME` to
`${CLAUDE_PLUGIN_DATA}`; 15 `babysit_`-prefixed `userConfig` keys replace the
`BABYSIT_*` env seams; `bin/` wrappers expose the guarded mutations as
auto-mode-durable bare commands. Self-identity is additive across discovery,
readiness gate, and merge gate, reconciled with #325's userConfig wave
(`babysit_self_logins` composes on your `gh api user` login).

Breaking: the safe default narrows discovery to your own PRs under the current
repo's owner and runs Python-free; `worker`/`autopilot` widen scope explicitly
and declare Python 3.11+.
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.

1 participant