Skip to content

fix: deep-review remediation (batch A) + problem-solver skill#103

Merged
CodeWithJuber merged 3 commits into
masterfrom
claude/loop-goal-worktree-issues-il3uk9
Jul 20, 2026
Merged

fix: deep-review remediation (batch A) + problem-solver skill#103
CodeWithJuber merged 3 commits into
masterfrom
claude/loop-goal-worktree-issues-il3uk9

Conversation

@CodeWithJuber

@CodeWithJuber CodeWithJuber commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What & why

Remediation of findings from the deep full review, plus a new bundled skill. Each commit
keeps all four guardrails green: 1069 tests pass, typecheck, biome, and docs check.

Commit 1 — Batch A (verified, low-risk fixes)

  • H4 — broke the static ESM import cycle recall → ledger_read → lessons_store → recall (import hasSecret from secrets.js directly; drop the re-export).
  • H2test/init.test.js pins settingsPath under a temp dir so the hook-guard
    merge never mutates the developer's real ~/.claude/settings.json.
  • H1release.yml is now closed-loop: per-ref concurrency, idempotent publish +
    Release creation, and a final step that FAILS the job when a tag didn't produce both a
    GitHub Release and (when publishing is enabled) an npm version. Orphan tags
    v0.22.2/v0.23.2/v0.24.0 documented in docs/RELEASING.md.
  • M1 — the top-level run() is guarded behind a symlink-resolving main-module check
    and run is exported, so importing the package root no longer executes the CLI;
    package.json sideEffects names the CLI entry accurately.
  • M4 — consolidated four byte-identical git() helpers + the ledger store's
    readJson into src/util.js.
  • LOW — dead plugin files entry, vestigial .gitlab-ci.yml, dangling @AGENTS.md
    import, off-palette Codex brandColor, literal NUL bytes → \0, non-zero stub exit.

Commit 2 — problem-solver skill

  • problem-solver (global/tools/problem-solver/) — a universal, framework-driven
    problem-solving cycle bundled through the plugin's skills directory. English naming.

Commit 3 — Phase 4 cleanups

  • M5applyPrimaryTool (repo_config.js) no longer dynamically imports the sync
    compiler; the sync runner is injected by cli.js, keeping the config leaf acyclic.
  • M12 — refreshed ARCHITECTURE.md for the missing v0.20–v0.24 modules (commit_gate,
    consensus, knowledge_router, deja, docs_impact).
  • LOWgit cat-file -e ref resolver passes -- before the ref.

Deferred to dedicated follow-up PRs (not in this PR)

  • H3 — the full 44-branch physical split of run() (2.4k-line god-function). Large,
    high-churn; the M1 main-module guard already shipped here.
  • M2 — flipping the FORGE_LEDGER_ONLY default and deleting the legacy memory stores.
    Carries data-loss risk (destructive consolidate/reconcile heuristics) and needs isolated review.
  • A few LOW items left as noted follow-ups (gitleaks binary checksum — couldn't verify the
    release asset names without authenticated GitHub access; strict:true typecheck ramp;
    unexporting internal-only symbols).

Checklist

  • npm test passes (1069 pass / 0 fail / 2 gated skips)
  • npm run check passes (Biome lint + format)
  • Conventional commit messages
  • CHANGELOG.md updated under ## [Unreleased]
  • No new runtime dependency
  • Substrate/docs updated where affected (docs/RELEASING.md, ARCHITECTURE.md)

Risk & rollback

  • Risk level: low
  • Rollback plan: revert the commits on this branch; no data migrations, no schema changes.

Extra checks

  • npm run typecheck passes
  • Input validated at boundaries; errors handled (no swallowing)
  • Logs contain no secrets/PII
  • If AI-assisted: I understand it, verified the APIs, and it stays test-covered

🤖 Generated with Claude Code

https://claude.ai/code/session_01C7htTiesXKLvAUtv6ET2jz

claude added 3 commits July 20, 2026 14:18
…helpers, cleanups)

Addresses safe, independently-verified findings from the deep review, keeping
the full suite (1069 pass), typecheck, biome, and `docs check` green.

HIGH
- H4: break the ESM import cycle recall->ledger_read->lessons_store->recall by
  importing hasSecret directly from secrets.js in lessons_store/cortex_distill/
  adjudicate and dropping recall.js's re-export.
- H2: test/init.test.js pins settingsPath under a temp dir so the hook-guard
  merge never touches the developer's real ~/.claude/settings.json.
- H1: release.yml is now closed-loop -- per-ref concurrency group, idempotent
  npm publish + GitHub Release creation, and a final step that fails the job
  when a tag did not produce both artifacts. Orphan tags v0.22.2/v0.23.2/v0.24.0
  documented in docs/RELEASING.md.

MEDIUM/LOW
- M1: guard the top-level run() in src/cli.js behind a symlink-resolving
  main-module check and export run, so importing the package root no longer
  executes the CLI; package.json sideEffects now names the CLI entry.
- M4: consolidate four byte-identical git() helpers and the ledger store's
  readJson into src/util.js (git, readJsonSafe).
- Remove dead package.json files "plugin" entry, vestigial .gitlab-ci.yml, and
  the dangling @AGENTS.md import in CLAUDE.md; fix off-palette Codex brandColor;
  replace literal NUL bytes with \0 escapes in reuse.js/diagnose.js; make the
  unimplemented-command stub exit non-zero.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7htTiesXKLvAUtv6ET2jz
A universal, framework-driven problem-solving cycle bundled through the plugin's
skills directory (plugin.json "skills": "./global/tools"): Clarify -> Classify ->
Diagnose -> Generate -> Decide -> Act & Sustain, with a frameworks reference
(5 Whys, Fishbone, First Principles, TRIZ, Cynefin, DMAIC/PDCA/8D/A3, Design
Thinking, Nine Windows, weighted decision matrix, pre-mortem), a disciplines
reference, and a fill-in canvas. Naming is English throughout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7htTiesXKLvAUtv6ET2jz
…file guard)

- M5: applyPrimaryTool (repo_config.js) no longer dynamically imports the sync
  compiler; the sync runner is injected by cli.js (the orchestration layer),
  keeping the config-leaf module acyclic. syncFn is now required at runtime.
- M12: refresh ARCHITECTURE.md for the v0.20-v0.24 modules that were absent from
  the reference -- commit_gate (forge precommit), consensus (forge verify --deep),
  knowledge_router, deja, and docs_impact (forge docs impact).
- LOW: ledger_store.js git cat-file -e ref resolver passes `--` before the ref.

Full suite (1069 pass), typecheck, biome, and docs check all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7htTiesXKLvAUtv6ET2jz
@CodeWithJuber
CodeWithJuber marked this pull request as ready for review July 20, 2026 14:44
@CodeWithJuber
CodeWithJuber merged commit 8136986 into master Jul 20, 2026
11 checks passed
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