Skip to content

refactor: convert to Bun workspaces monorepo#10

Open
kjanat wants to merge 17 commits intomasterfrom
workspace
Open

refactor: convert to Bun workspaces monorepo#10
kjanat wants to merge 17 commits intomasterfrom
workspace

Conversation

@kjanat
Copy link
Copy Markdown
Owner

@kjanat kjanat commented Apr 8, 2026

Summary

  • Restructure into Bun workspaces monorepo: core library → packages/dreamcli/, docs → apps/docs/, gh-project tool → tools/gh-project/, examples split into examples/standalone/ and examples/gh/
  • Centralize all dependency versions in package.json catalog; bump wrangler, pin biome, add vitepress override
  • Replace shell-based release-meta.sh with TypeScript release-meta.ts; modernize CI workflows for new workspace layout
  • Drop completed re-foundation specs, trim goals, refresh AGENTS.md, fix all Twoslash compilation errors in docs

Test plan

  • bun run ci passes (typecheck + lint + format + meta + test + docs + build)
  • bun run test passes across all workspaces
  • bun run docs:build succeeds without Twoslash errors
  • bun run bd produces correct build artifacts in packages/dreamcli/dist/
  • Verify examples/gh still typechecks and tests pass
  • Verify publish workflows reference correct paths

kjanat added 8 commits April 7, 2026 22:06
Single published package stays intact — no breaking changes.
Subpath exports, hash imports, and CI all updated.

Layout:
  packages/dreamcli/  — library (src, build, tests)
  apps/docs/          — VitePress docs site
  tools/gh-project/   — project workflow CLI
  examples/standalone/ — teaching examples
  examples/gh/        — walkthrough workspace

Root orchestrates via `bun run --filter`, catalog
centralizes shared dep versions. All 2255 tests,
typecheck, lint, format, docs build, and package
build pass.
Bun workspaces and npm both use this for provenance
linking. Also reorder gh-project fields to match the
other workspace manifests.
Update AGENTS.md files for monorepo layout, add
gh-project knowledge base. Use literal glyphs in
check-version-sync, add void to floating promise.
Wrangler 4.80→4.81 (workerd 20260401→20260405), pin biome
exact, override vitepress to next channel, volta node
25.8.2→25.9.0, disable exact installs for devtools.
Single source of truth for every shared version — no
more per-package pinning. Root devDeps (biome, dprint,
knip, wrangler) also moved to catalog.
PRD and spec served their purpose — all milestones
landed. Sort docs config import alphabetically.
Rework SettingsGear (gear animation, compact toggles),
extract custom.css, add JSR/npm social links and hero
gradient. Condense GOALS.md from verbose PRD to focused
goals. Replace release-meta.sh with TS, relocate
gh-project script, add check/typecheck/test:bun scripts,
use --cwd for docs commands. Update schema and deps.
Remove explicit `lib` from Twoslash compilerOptions — the
VFS can't resolve lib .d.ts files, but default resolution
works. Strip shebangs from example source in generated
fences, tolerate known-unresolvable imports (node:*,
Bun.*, vitest, yaml) via @errors directives, and add
global `expect` shim for testing snippets.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
dreamcli 2fce8c4 Commit Preview URL

Branch Preview URL
Apr 08 2026, 12:52 PM

@coderabbitai coderabbitai bot added kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX area: schema Schema builders, schema DSL, and JSON Schema export area: build Build, CI, release automation, scripts, and packaging labels Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2a90c7e1-6191-43c7-b1a7-2767ea969024

📥 Commits

Reviewing files that changed from the base of the PR and between 75e5170 and 8aa03e8.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • bunfig.toml
📜 Recent review details
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 10
File: AGENTS.md:122-123
Timestamp: 2026-04-08T13:09:11.245Z
Learning: In repository kjanat/dreamcli, Bun's `--filter` flag auto-compresses log output to approximately 10 lines per ran command, while `--cwd` is treated as a regular command invocation with full log output. Both are used intentionally in root `package.json` scripts for different use cases: `--filter` for concise/summary output, `--cwd` for verbose/full output.
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:33.218Z
Learning: Use LF (Unix-style) line endings
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:33.218Z
Learning: Do not edit `apps/docs/.vitepress/dist/` or `apps/docs/.vitepress/cache/`; these are build artifacts
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:33.218Z
Learning: Do not treat `apps/docs/.vitepress/data/` as docs-only; scripts import it for generated source and docs artifacts
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:33.218Z
Learning: Use `bun run gh-project:*` commands for GitHub project mutations instead of ad hoc mutations
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:42.840Z
Learning: Do not patch generated example or reference pages when the real source lives in repo-root `examples/` or `.vitepress/data/`
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:42.840Z
Learning: Recognize that docs code is not isolated from source generation and may be imported by scripts like `scripts/build-meta-descriptions.ts`
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:49.410Z
Learning: Keep examples pedagogical and runnable as they serve as docs content
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:49.410Z
Learning: Walkthrough-only complexity should be placed in examples/gh rather than bloating single-file examples
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:49.410Z
Learning: Do not edit generated docs pages in ../apps/docs/examples/ and ../apps/docs/reference/ directly; edit the source example files instead
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:49.410Z
Learning: Do not treat .cache/ directory as source of truth
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:52:49.410Z
Learning: The examples/gh package is typechecked and tested in CI, so edits carry real consumer signal
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/cli/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:53:02.360Z
Learning: Implement the dispatch flow as: argv -> strip --json flag -> match subcommand (nested) -> resolve -> middleware -> action -> output, with error handling for unknown commands and no-action scenarios
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/completion/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:53:16.575Z
Learning: Shell completion generators should be organized per-shell under `shells/` directory with a barrel `index.ts` that re-exports public API and dispatches via `generateCompletion()`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:53:29.060Z
Learning: Help text must be generated from schema metadata; keep formatting rules derived, not duplicated per caller
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:53:29.060Z
Learning: Do not pull TTY or color logic into help formatting; that belongs in output
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:53:29.060Z
Learning: Do not special-case caller behavior when schema metadata already expresses it
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:53:39.378Z
Learning: Ensure the package-level schema artifact is included in the build; root `dreamcli.schema.json` must be emitted from this module's surface
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:17.964Z
Learning: Split monolithic modules into focused single-responsibility files; when a file exceeds ~400 lines (like `coerce.ts` at 429 lines), consider further modularization of internal concerns
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:25.088Z
Learning: Maintain two parallel paths from the same string input: compile-time template literal type parsing in `parse.ts` and runtime string parsing in `runtime.ts` that must agree — a string that type-checks must also produce the correct runtime behavior
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:25.088Z
Learning: Import from `schema/` module (flag, arg, command builders) in schema-dsl, not vice versa, maintaining a one-directional dependency where schema-dsl depends on schema
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:35.939Z
Learning: When adding a new flag type, add variant to `FlagKind` union in flag.ts, add factory method on FlagBuilder, update `InferFlag` conditional type, wire through resolve/coerce.ts, and add tests
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:35.939Z
Learning: Place Activity types in activity.ts (not in output/) because `Out` interface needs them in `CommandBuilder.action()` signature
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:35.939Z
Learning: Use multi-file module structure for schema in `core/` with separate files for command, flag, arg, activity, middleware, and prompt builders; all others except resolve, output, completion use single index.ts
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:46.295Z
Learning: `runCommand(cmd, argv, options?)` should be a thin in-process wrapper over the shared executor that creates captured output, forwards injected execution options, and returns captured output
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:46.295Z
Learning: The `RunOptions` interface should provide injectable testing seams including: `env` (environment variables), `config` (JSON configuration), `answers` (prompt responses), `prompter` (full PromptEngine override), `verbosity` ('normal' | 'quiet'), `jsonMode` (boolean), `isTTY` (boolean), and `help` (HelpOptions)
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:46.295Z
Learning: The `mergedSchema` field on `RunOptions` is internal and used only by the CLI dispatch layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:46.295Z
Learning: `CaptureOutputChannel` from output/ should be wired into testkit for output and activity capture
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:46.295Z
Learning: The execution pipeline should be shared with CLI via `execution/index.ts` (internal)
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:57.019Z
Learning: `ExitError` thrown by `adapter.exit()` must be caught by CLI dispatch layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T15:54:57.019Z
Learning: The runtime module is not truly independent of core — it imports `WriteFn` from `core/output/` and `ReadFn` from `core/prompt/`
🔇 Additional comments (2)
bunfig.toml (2)

7-8: No new issue on this hunk.

No actionable defect identified here from the provided context.


9-10: Yer policy comment is still stale and misleading.

Line 9 says there are no dependencies, but this PR explicitly moves to a Bun workspace monorepo with shared dependency management. Keep exact = false if intentional, but rewrite the comment to reflect actual policy.

Suggested wording tweak
-# We don't have ANY dependencies, so this doesn't matter. I want up-to-date devtools.
+# Prefer range-based specs for faster devtool updates in this monorepo.
+# Reproducibility is enforced by the lockfile in CI.
 exact         = false

📝 Walkthrough

refactor: convert to Bun workspaces monorepo

Reorganize the repository from a single-package layout into a Bun workspaces monorepo and modernize tooling, docs, CI, and publishing to match the new layout.

  • Monorepo layout

    • packages/dreamcli/ — core library with package.json, tsconfig, build/test/typecheck scripts, dist output, and dreamcli.schema.json
    • apps/docs/ — VitePress docs site as @kjanat/dreamcli-docs with its own package.json, tsconfig, Vitest config, and site build artifacts
    • tools/gh-project/ — gh-project tooling moved into tools
    • examples/standalone/ and examples/gh/ — examples split into standalone teaching examples and the walkthrough package
    • root package.json converted to a private monorepo (private: true) with workspace globs and a centralized catalog for dependency versions; adds overrides (vitepress: next)
  • Dependency & install behavior

    • Centralize dependency versions in root package.json catalog; bump wrangler and other entries
    • bunfig.toml: set [install].auto="force", linker="hoisted", exact=false to force Bun install and use hoisted linker
    • Use workspace:* and catalog: references in workspace manifests
  • Builds, publishing, and release metadata

    • Replace bash release-meta.sh with TypeScript scripts (scripts/release-meta.ts) and update workflows to call node scripts
    • Publish workflows updated to run from packages/dreamcli (working-directory adjustments), pack/publish artifacts at package subpaths, and run emit/check scripts from package context
    • packages/dreamcli exports mapping updated to support npm JSON export and Deno/JSR re-export via src/schema.ts
  • CI / Workflows

    • CI workflows modernized to work with Bun workspaces: workspace-scoped bun run --filter invocations, working-directory set to packages/dreamcli for test/coverage steps, Deno smoke tests use packages/dreamcli/deno.json
    • Docs workflow adjusted to watch apps/docs/** and packages/dreamcli/src/** and publish from apps/docs/.vitepress/dist
  • Documentation & docs toolchain

    • Centralize docs paths in apps/docs/.vitepress/data/paths.ts (root/project/package paths and gitRef resolution)
    • Move docs source and tests to apps/docs; add apps/docs package manifest and Vitest config
    • Rework VitePress config to derive pkg/jsr/tsconfig from package paths and add Contracts section, reorganize sidebar, and update footer social links
    • Fix Twoslash issues: inherit tsconfig paths/typeRoots, remove explicit lib in snippets, add global expect shim, declare-module shims for node:fs where needed, strip shebangs from example sources, and tolerate certain unresolved imports
    • UI/style changes: add custom CSS (social link colors, mermaid spacing, twoslash styles), reorganize twoslash settings UI, and update mobile CSS minor fixes
    • Add robots.txt for docs
  • Tooling & editor integration

    • .dprint.jsonc: update formatter associations to apps/docs/**, expand TypeScript/template associations, add ruff plugin and config
    • .zed/settings.json: update LSP/dprint launcher to bunx, add external formatter fallback, and Biome code-action namespaced keys
  • Tests & examples

    • Update test fixtures and documentation example imports to reference @kjanat/dreamcli and apps/docs twoslash fixtures
    • Add package-level tsconfig.json files (packages/dreamcli, apps/docs, examples/gh)
    • Vitest configs updated to scope tests/coverage to package src only
    • examples manifests updated to use workspace:* for @kjanat/dreamcli and provide typecheck/run scripts
  • Schema & artifacts

    • Add packages/dreamcli/dreamcli.schema.json and packages/dreamcli/src/schema.ts (JSON re-export) and add emit-definition-schema script adjustments to use package aliases
    • tsdown/tsdoc tooling updated to use dprint on success for package.json formatting
  • Housekeeping

    • Remove obsolete note-to-self.ts and re-foundation specs; shorten GOALS.md and README to reflect monorepo focus and add packages table
    • Update AGENTS.md, examples/AGENTS.md, DISCOVERIES.md to reflect new workspace layout and contributor guidance
    • Update .gitignore, knip.json, and other ancillary configs to include workspace paths and ignore patterns

Test plan (intended)

  • bun run ci (typecheck + lint + format + meta + test + docs + build)
  • bun run test across workspaces
  • bun run docs:build without Twoslash errors
  • bun run bd (build) produces artifacts at packages/dreamcli/dist/
  • Verify examples/gh typechecks and tests pass
  • Verify publish workflows reference correct paths

This change is primarily a repo restructure and tooling modernization to support a Bun workspaces monorepo, with focused fixes to Twoslash/docs generation, CI/workflow paths, and package export mappings (including the published definition-schema).

Walkthrough

Restructures the repository into a monorepo: adds packages/dreamcli, apps/docs, and example workspaces; updates CI/workflows, formatter/editor configs, docs build paths, package manifests, and schema assets; introduces generated schema and centralized docs path utilities; removes obsolete scripts and adjusts many import paths to package-scoped aliases.

Changes

Cohort / File(s) Summary
Monorepo Root & Workspaces
package.json, bunfig.toml, knip.json
Converted root to a private monorepo, added workspaces (packages/*, apps/*, tools/*, examples/*), relaxed bun install exactness, and expanded knip workspace list.
Formatter & Editor
.dprint.jsonc, .zed/settings.json
Adjusted dprint associations to apps/docs/**, added ruff config and plugin, expanded biome/prettier associations, added *.ts.tpl filetype, and changed dprint LSP launcher to bunx.
CI / Workflows
.github/workflows/*.yml
Scoped typecheck/test/coverage/publish steps to packages/dreamcli via workspace filters or working-directory changes; replaced several bash scripts with Node TS; updated Pages artifact path to apps/docs/.vitepress/dist.
Packages: @kjanat/dreamcli
packages/dreamcli/package.json, tsconfig.json, deno.json, dreamcli.schema.json, src/schema.ts, README.md, LICENSE, scripts/*, tsdown.config.ts, vitest.config.ts
Added package manifest with exports/imports and subpaths, introduced JSON schema and a TS re-export, package-level TS/Deno configs, README and license, and build/test tooling adjustments.
Docs App: @kjanat/dreamcli-docs
apps/docs/package.json, tsconfig.json, vitest.config.ts, apps/docs/.vitepress/..., apps/docs/public/*
Created docs workspace, centralized path utilities (.vitepress/data/paths.ts), updated VitePress config to reference package metadata and schema, added theme CSS/components, adjusted twoslash fixtures/tests and import paths.
Docs Content & Examples
apps/docs/**, examples/**, examples/standalone/*
Updated Twoslash directives and imports to new docs paths, moved single-file examples to examples/standalone/, added example workspace manifests and tsconfigs, and reformatted various docs content.
Build / Packaging Workflows
.github/workflows/publish-*.yml, .github/workflows/pkg-pr-new.yml
Changed release metadata steps to Node TS, set publish working directories to packages/dreamcli, adjusted packaging artifact paths, and scoped pkg-pr-new publish invocation to the package directory.
Misc / Removed
.gitignore, note-to-self.ts, various small docs
Removed note-to-self.ts, stopped ignoring dreamcli.schema.json, added Python cache ignores, updated many relative paths and small docs to reflect new layout.

Possibly related PRs

Suggested labels

area: cli

Poem

Avast! The repo's been lashed and stowed,
New decks and cabins neatly rowed,
Schemas hoisted, docs set to sail,
CI trimmed the rags and patched the sail.
Yo-ho—a tidier voyage, damn good haul!

🚥 Pre-merge checks | ✅ 5 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Changelog Update ⚠️ Warning PR contains substantial source code modifications and new files, but CHANGELOG.md under [Unreleased] section lacks corresponding documentation entries. Update packages/dreamcli/CHANGELOG.md [Unreleased] section with entries documenting the monorepo refactoring, new workspace structure, and source file changes.
Agents.Md Documentation Updated ⚠️ Warning scripts/AGENTS.md references obsolete release-meta.sh script; actual codebase uses release-meta.ts after PR migration to Bun monorepo. Update scripts/AGENTS.md to replace all release-meta.sh references with release-meta.ts and correct STRUCTURE section to reflect actual files.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title 'refactor: convert to Bun workspaces monorepo' is concise (44 chars), follows conventional commits with lowercase 'refactor:' prefix, and accurately describes the primary structural change.
Description check ✅ Passed Description directly addresses the changeset—detailing the monorepo restructuring, dependency centralization, CI workflow updates, and documentation fixes that align with the file summaries.
Goals.Md Completion Sync ✅ Passed PR be purely infrastructure-focused—converting to Bun workspaces monorepo with zero core feature code modifications. GOALS.md rewrite was appropriate project housekeeping; no new functionality required marking as done.
No Stale Completed Goals ✅ Passed GOALS.md documents current DreamCLI capabilities that are verifiably implemented in the codebase, not stale promises.
Semver Version Bump Validation ✅ Passed PR correctly implements MAJOR version bump 1.0.0→2.0.0 for breaking monorepo restructure with import path changes, package redistribution, and workspace reorganization. Subsequent PATCH to 2.0.1 appropriate.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch workspace

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
GOALS.md (1)

1-199: ⚠️ Potential issue | 🟠 Major

Restore explicit completion tracking in GOALS.md

This rewrite removes goal-status mechanics (checkboxes/status markers), so implemented items from this PR can’t be marked completed in-file. Please add a tracked section (or annotate relevant goals) with explicit done status for the work delivered here.

As per coding guidelines: “If GOALS.md exists in the repository and the PR implements, modifies, or completes functionality that corresponds to any listed goal, then GOALS.md MUST be updated in this PR to mark completed goals as done.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@GOALS.md` around lines 1 - 199, Add a "Progress / PR changes" subsection to
GOALS.md that explicitly marks which goals this PR implements (use checkboxes or
a short status line per goal), e.g., reference and mark completed items under
the headings "What we promise" such as "Perfect inference in handlers",
"Guaranteed resolution before action", "Prompting without spaghetti", or any
other specific bullets touched by this PR; update those goal lines with a clear
completed marker and a one-line note linking to the PR (or brief description) so
the repository checklist requirement is satisfied.
.github/workflows/ci.yml (1)

65-78: ⚠️ Potential issue | 🟠 Major

Ye’ve dropped workspace tests from the matrix.

Running Vitest only from packages/dreamcli skips other workspace tests — at minimum apps/docs. docs:build will not execute .vitepress/data/*.test.ts, so docs API/example drift can slip past CI, and this no longer matches the stated bun run test across workspaces objective. Either restore a root workspace test lane or add explicit apps/docs test steps here.

Based on learnings, Docs tests in .vitepress/data/*.test.ts verify API inventory, docs claims, example parsing, and symbol page generation.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 65 - 78, CI currently runs Vitest only
from packages/dreamcli which skips workspace tests (notably apps/docs); update
the workflow to either restore a root-level workspace test step that runs vitest
across the repo (e.g., change the Bun step using "bunx --bun vitest run" and the
Node step using "npx vitest run" to run at the repository root) or add explicit
test steps for apps/docs (add steps that run the appropriate test command—e.g.,
"bun --cwd apps/docs test" for Bun and "npx vitest run" with working-directory
set to apps/docs for Node) and keep the existing packages/dreamcli and
examples/gh steps; ensure the new steps respect the matrix.runtime conditionals
(if: matrix.runtime == 'bun' / 'node') so docs tests (.vitepress/data/*.test.ts)
are executed in CI.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Around line 122-123: Update the sentence that reads "root `package.json` is
`dreamcli-monorepo` (private). Scripts proxy to workspace packages via
`--filter`." to reflect that root scripts may use multiple invocation methods
(for example `--filter`, `--cwd`, or direct repo-root scripts) rather than only
`--filter`; replace "proxy to workspace packages via `--filter`" with a short
phrase such as "invoke workspace packages via `--filter`, `--cwd`, or direct
root scripts" so automation readers understand the root can use any of these
approaches.
- Around line 94-101: Update the stale generated-artifact references in the
AGENTS.md guidance so they point to the monorepo locations: replace the old
pre-monorepo mentions with "packages/dreamcli/dreamcli.schema.json" and
"packages/dreamcli/src/core/json-schema/meta-descriptions.generated.ts" wherever
the doc warns not to hand-edit generated artifacts (the line currently
referencing dreamcli.schema.json and
src/core/json-schema/meta-descriptions.generated.ts should be updated to these
package paths) to ensure the guide directs readers to the correct generated
files.

In `@apps/docs/.vitepress/config.ts`:
- Around line 19-20: Replace the ad-hoc repo root derivation in this config by
importing the centralized paths from the Vitepress data module: remove the
computed projectRoot and packageRoot variables and instead import rootDirPath
and packageRoot from ./data/paths.ts (use the exported names exactly) and use
those imports wherever projectRoot/packageRoot were used; ensure you only
reference the centralized symbols (rootDirPath, packageRoot) to avoid drift.
- Around line 47-56: The compilerOptions object is missing a paths map and the
'deno' type that breaks twoslash source-path resolution and Deno examples;
update the compilerOptions in config.ts (the compilerOptions constant using
baseUrl/packageRoot) to include a paths entry that maps "@kjanat/dreamcli/*"
(and similar package scopes used in the repo) to the repo src (so CI resolves to
src/*.ts rather than dist/*.d.mts), and restore 'deno' in the types array
alongside 'bun','node','vue','vite/client','vitest/globals' so Deno globals
(Deno.*) work in examples. Ensure the mapping keys exactly match the package
import specifiers used in snippets and that baseUrl/packageRoot remain set as
before.

In `@apps/docs/.vitepress/data/examples.test.ts`:
- Line 60: The test assertion in apps/docs/.vitepress/data/examples.test.ts
currently checks that page contains 'npx tsx examples/basic.ts Alice --loud
--times 3' but the example file was moved to examples/standalone/basic.ts;
update the expectation string in the test (the assertion using the variable page
in examples.test.ts) to 'npx tsx examples/standalone/basic.ts Alice --loud
--times 3' so the Usage docblock matches the actual file path.

In `@apps/docs/.vitepress/data/paths.ts`:
- Around line 13-19: Add a centralized watch glob export for the examples tree
in apps/docs/.vitepress/data/paths.ts (e.g., export const examplesWatchGlob =
`${examplesRoot}/**/*.ts`) and update apps/docs/examples/examples.data.ts to
import and use that new examplesWatchGlob instead of the hardcoded
'../../examples/**/*.ts' so edits under examples/standalone trigger reloads;
ensure the new export uses the existing examplesRoot symbol and keep the pattern
consistent with other path exports.

In `@apps/docs/.vitepress/theme/custom.css`:
- Around line 13-17: The CSS rule using -webkit-user-drag on .VPImage.image-src
and .VPImage.logo only affects WebKit/Blink browsers; update the styles to
provide broader protection by adding an alternative (e.g., add pointer-events:
none to .VPImage.image-src and .VPImage.logo if disabling all interactions is
acceptable) or implement a JS fallback that prevents dragstart on those
selectors (attach a dragstart event listener to .VPImage.image-src and
.VPImage.logo and call event.preventDefault()). Ensure the change targets the
same selectors (.VPImage.image-src, .VPImage.logo) so Firefox users also get
prevented-from-drag behavior.

In `@apps/docs/.vitepress/twoslash/testing-fixtures.ts`:
- Around line 3-24: The file apps/docs/.vitepress/twoslash/testing-fixtures.ts
uses 2-space indentation; convert all leading spaces to tabs to comply with the
repo style guide. Update the indentation for the declare global block and its
interfaces (ExpectResult, Expect, and the const expect declaration) so every
indentation level uses tabs rather than spaces throughout the file.

In `@apps/docs/examples/examples.data.ts`:
- Line 14: The watch glob in this module is hardcoded to ../../examples/**/*.ts
while collectExamples() uses examplesRoot from paths.ts (which points to
${rootDir}/examples/standalone); change the watch definition to derive its path
from the same constant by using examplesRoot and/or rootDirPath so both watch
and collectExamples() reference the same source of truth (update the watch:
[...] entry to compute the glob from examplesRoot instead of a hardcoded
../../examples/**/*.ts).

In `@bunfig.toml`:
- Around line 8-9: Update the misleading comment that says "We don't have ANY
dependencies, so this doesn't matter." to accurately describe the repo's
dependency policy now that a workspace monorepo and shared dependency management
are introduced; keep the configuration key exact = false if you intend range
updates for dev tooling, and replace the comment with something like "Prefer
range updates for dev tooling in this monorepo; lockfile preserves reproducible
installs" near the exact = false declaration so the policy and intent are clear.

In `@packages/dreamcli/package.json`:
- Around line 95-97: Remove the "vite" entry from the package's
optionalDependencies in package.json so tooling is not leaked into the runtime
surface; instead ensure any build/dev tooling is declared only where needed
(e.g., apps/docs/package.json or devDependencies) and update the package.json's
optionalDependencies block (remove the "vite": "catalog:" line) so library
consumers won't download Vite at install time.

In `@packages/dreamcli/README.md`:
- Around line 481-489: Update the README section that lists package exports:
change the heading and wording so it doesn’t claim “Three subpath exports” and
add the missing schema entrypoint by including a row for
`@kjanat/dreamcli/schema` (describing the published schema artifact and its
purpose) alongside the existing entries `@kjanat/dreamcli`,
`@kjanat/dreamcli/testkit`, and `@kjanat/dreamcli/runtime`; ensure the root
import wording clarifies that `@kjanat/dreamcli` is the root package and the
others are subpath exports.

In `@packages/dreamcli/src/runtime/support.test.ts`:
- Line 44: The three occurrences of the expression using readUtf8(new URL(...,
import.meta.url)) in support.test.ts are formatted inconsistently; pick one
style (prefer single-line) and make all instances consistent by collapsing the
multi-line URL expressions (the ones around readUtf8, new URL and
import.meta.url) into the single-line form readUtf8(new URL(...,
import.meta.url)) wherever they appear (e.g., the variable initializing docs and
the other two readUtf8 calls), preserving the same arguments and imports.

---

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 65-78: CI currently runs Vitest only from packages/dreamcli which
skips workspace tests (notably apps/docs); update the workflow to either restore
a root-level workspace test step that runs vitest across the repo (e.g., change
the Bun step using "bunx --bun vitest run" and the Node step using "npx vitest
run" to run at the repository root) or add explicit test steps for apps/docs
(add steps that run the appropriate test command—e.g., "bun --cwd apps/docs
test" for Bun and "npx vitest run" with working-directory set to apps/docs for
Node) and keep the existing packages/dreamcli and examples/gh steps; ensure the
new steps respect the matrix.runtime conditionals (if: matrix.runtime == 'bun' /
'node') so docs tests (.vitepress/data/*.test.ts) are executed in CI.

In `@GOALS.md`:
- Around line 1-199: Add a "Progress / PR changes" subsection to GOALS.md that
explicitly marks which goals this PR implements (use checkboxes or a short
status line per goal), e.g., reference and mark completed items under the
headings "What we promise" such as "Perfect inference in handlers", "Guaranteed
resolution before action", "Prompting without spaghetti", or any other specific
bullets touched by this PR; update those goal lines with a clear completed
marker and a one-line note linking to the PR (or brief description) so the
repository checklist requirement is satisfied.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 768dfb2e-d943-41be-ae21-1b4be294e02b

📥 Commits

Reviewing files that changed from the base of the PR and between c111e77 and 2e11c10.

⛔ Files ignored due to path filters (31)
  • apps/docs/.vitepress/theme/components/jsr.svg is excluded by !**/*.svg
  • apps/docs/.vitepress/theme/explorations/theme-sketch-1-brand-forward-dark.svg is excluded by !**/*.svg
  • apps/docs/.vitepress/theme/explorations/theme-sketch-1-brand-forward.svg is excluded by !**/*.svg
  • apps/docs/.vitepress/theme/explorations/theme-sketch-2-neutral-accents-dark.svg is excluded by !**/*.svg
  • apps/docs/.vitepress/theme/explorations/theme-sketch-2-neutral-accents.svg is excluded by !**/*.svg
  • apps/docs/.vitepress/theme/explorations/theme-sketch-3-warm-cool-dark.svg is excluded by !**/*.svg
  • apps/docs/.vitepress/theme/explorations/theme-sketch-3-warm-cool.svg is excluded by !**/*.svg
  • apps/docs/public/animations/loadingbar.svg is excluded by !**/*.svg
  • apps/docs/public/animations/spinner.svg is excluded by !**/*.svg
  • apps/docs/public/app-icon-192.png is excluded by !**/*.png
  • apps/docs/public/app-icon-512.png is excluded by !**/*.png
  • apps/docs/public/app-icon.svg is excluded by !**/*.svg
  • apps/docs/public/apple-touch-icon.png is excluded by !**/*.png
  • apps/docs/public/favicon-dark.svg is excluded by !**/*.svg
  • apps/docs/public/favicon.ico is excluded by !**/*.ico
  • apps/docs/public/favicon.svg is excluded by !**/*.svg
  • apps/docs/public/icons/middleware-dark.svg is excluded by !**/*.svg
  • apps/docs/public/icons/middleware-light.svg is excluded by !**/*.svg
  • apps/docs/public/icons/resolution-chain-dark.svg is excluded by !**/*.svg
  • apps/docs/public/icons/resolution-chain-light.svg is excluded by !**/*.svg
  • apps/docs/public/icons/structured-output-dark.svg is excluded by !**/*.svg
  • apps/docs/public/icons/structured-output-light.svg is excluded by !**/*.svg
  • apps/docs/public/icons/test-harness-dark.svg is excluded by !**/*.svg
  • apps/docs/public/icons/test-harness-light.svg is excluded by !**/*.svg
  • apps/docs/public/icons/type-inference-dark.svg is excluded by !**/*.svg
  • apps/docs/public/icons/type-inference-light.svg is excluded by !**/*.svg
  • apps/docs/public/icons/zero-deps-dark.svg is excluded by !**/*.svg
  • apps/docs/public/icons/zero-deps-light.svg is excluded by !**/*.svg
  • apps/docs/public/logo-dark.svg is excluded by !**/*.svg
  • apps/docs/public/logo-light.svg is excluded by !**/*.svg
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (269)
  • .dprint.jsonc
  • .github/workflows/ci.yml
  • .github/workflows/docs.yml
  • .github/workflows/pkg-pr-new.yml
  • .github/workflows/publish-jsr.yml
  • .github/workflows/publish-npm.yml
  • .gitignore
  • .zed/settings.json
  • AGENTS.md
  • DISCOVERIES.md
  • GOALS.md
  • README.md
  • apps/docs/.vitepress/AGENTS.md
  • apps/docs/.vitepress/config.ts
  • apps/docs/.vitepress/data/api-index.test.ts
  • apps/docs/.vitepress/data/api-index.ts
  • apps/docs/.vitepress/data/docs-contract.test.ts
  • apps/docs/.vitepress/data/examples.test.ts
  • apps/docs/.vitepress/data/examples.ts
  • apps/docs/.vitepress/data/meta-schema-descriptions.test.ts
  • apps/docs/.vitepress/data/meta-schema-descriptions.ts
  • apps/docs/.vitepress/data/paths.ts
  • apps/docs/.vitepress/data/reference-model.ts
  • apps/docs/.vitepress/data/symbol-loader.ts
  • apps/docs/.vitepress/data/symbol-pages.test.ts
  • apps/docs/.vitepress/data/symbol-pages.ts
  • apps/docs/.vitepress/data/typedoc.test.ts
  • apps/docs/.vitepress/data/typedoc.ts
  • apps/docs/.vitepress/theme/components/SettingsGear.vue
  • apps/docs/.vitepress/theme/composables/use-doc-settings.ts
  • apps/docs/.vitepress/theme/custom.css
  • apps/docs/.vitepress/theme/index.ts
  • apps/docs/.vitepress/theme/settings.css
  • apps/docs/.vitepress/theme/twoslash-mobile.css
  • apps/docs/.vitepress/twoslash/testing-fixtures.ts
  • apps/docs/.vitepress/vite-plugins/index.ts
  • apps/docs/.vitepress/vite-plugins/shiki-class-css.ts
  • apps/docs/.vitepress/vite-plugins/shiki-dedupe-popup-styles.ts
  • apps/docs/.vitepress/vite-plugins/shiki-jsdoc-tags.ts
  • apps/docs/.vitepress/vite-plugins/source-artifacts.ts
  • apps/docs/AGENTS.md
  • apps/docs/concepts/anatomy.md
  • apps/docs/concepts/errors.md
  • apps/docs/concepts/exit-codes.md
  • apps/docs/concepts/input.md
  • apps/docs/concepts/output.md
  • apps/docs/concepts/testing.md
  • apps/docs/examples/[slug].md
  • apps/docs/examples/[slug].paths.ts
  • apps/docs/examples/examples.data.ts
  • apps/docs/examples/index.md
  • apps/docs/guide/arguments.md
  • apps/docs/guide/commands.md
  • apps/docs/guide/completions.md
  • apps/docs/guide/config.md
  • apps/docs/guide/errors.md
  • apps/docs/guide/flags.md
  • apps/docs/guide/getting-started.md
  • apps/docs/guide/limitations.md
  • apps/docs/guide/middleware.md
  • apps/docs/guide/migration.md
  • apps/docs/guide/output.md
  • apps/docs/guide/prompts.md
  • apps/docs/guide/rationale.md
  • apps/docs/guide/runtime.md
  • apps/docs/guide/schema-export.md
  • apps/docs/guide/semantics.md
  • apps/docs/guide/testing.md
  • apps/docs/guide/troubleshooting.md
  • apps/docs/guide/walkthrough.md
  • apps/docs/guide/why.md
  • apps/docs/index.md
  • apps/docs/package.json
  • apps/docs/public/manifest.json
  • apps/docs/reference/api.data.ts
  • apps/docs/reference/api.md
  • apps/docs/reference/changelog.md
  • apps/docs/reference/example-hover-prototype.md
  • apps/docs/reference/main.md
  • apps/docs/reference/output-contract.md
  • apps/docs/reference/planner-contract.md
  • apps/docs/reference/resolver-contract.md
  • apps/docs/reference/runtime.md
  • apps/docs/reference/schema.md
  • apps/docs/reference/semantic-delta-log.md
  • apps/docs/reference/support-matrix.md
  • apps/docs/reference/symbols/main/[slug].md
  • apps/docs/reference/symbols/main/[slug].paths.ts
  • apps/docs/reference/symbols/runtime/[slug].md
  • apps/docs/reference/symbols/runtime/[slug].paths.ts
  • apps/docs/reference/symbols/testkit/[slug].md
  • apps/docs/reference/symbols/testkit/[slug].paths.ts
  • apps/docs/reference/testkit.md
  • apps/docs/tsconfig.json
  • apps/docs/vitest.config.ts
  • bunfig.toml
  • examples/AGENTS.md
  • examples/gh/package.json
  • examples/gh/tsconfig.json
  • examples/standalone/basic.ts
  • examples/standalone/interactive.ts
  • examples/standalone/json-mode.ts
  • examples/standalone/middleware.ts
  • examples/standalone/multi-command.ts
  • examples/standalone/package.json
  • examples/standalone/spinner-progress.ts
  • examples/standalone/testing.ts
  • knip.json
  • note-to-self.ts
  • package.json
  • packages/dreamcli/.attw.json
  • packages/dreamcli/CHANGELOG.md
  • packages/dreamcli/LICENSE
  • packages/dreamcli/README.md
  • packages/dreamcli/deno.json
  • packages/dreamcli/dreamcli.schema.json
  • packages/dreamcli/package.json
  • packages/dreamcli/scripts/emit-definition-schema.ts
  • packages/dreamcli/src/core/cli/AGENTS.md
  • packages/dreamcli/src/core/cli/cli-completion-contract.test.ts
  • packages/dreamcli/src/core/cli/cli-completion-e2e.test.ts
  • packages/dreamcli/src/core/cli/cli-completions.test.ts
  • packages/dreamcli/src/core/cli/cli-config.test.ts
  • packages/dreamcli/src/core/cli/cli-default.test.ts
  • packages/dreamcli/src/core/cli/cli-dispatch.test.ts
  • packages/dreamcli/src/core/cli/cli-json.test.ts
  • packages/dreamcli/src/core/cli/cli-middleware.test.ts
  • packages/dreamcli/src/core/cli/cli-nesting.test.ts
  • packages/dreamcli/src/core/cli/cli-package-json.test.ts
  • packages/dreamcli/src/core/cli/cli-plugin.test.ts
  • packages/dreamcli/src/core/cli/cli-propagate.test.ts
  • packages/dreamcli/src/core/cli/cli-tty.test.ts
  • packages/dreamcli/src/core/cli/cli.test.ts
  • packages/dreamcli/src/core/cli/dispatch.ts
  • packages/dreamcli/src/core/cli/index.ts
  • packages/dreamcli/src/core/cli/planner.test.ts
  • packages/dreamcli/src/core/cli/planner.ts
  • packages/dreamcli/src/core/cli/plugin.ts
  • packages/dreamcli/src/core/cli/propagate.ts
  • packages/dreamcli/src/core/cli/root-help.ts
  • packages/dreamcli/src/core/cli/root-surface.ts
  • packages/dreamcli/src/core/cli/runtime-preflight.test.ts
  • packages/dreamcli/src/core/cli/runtime-preflight.ts
  • packages/dreamcli/src/core/completion/AGENTS.md
  • packages/dreamcli/src/core/completion/completion-test-helpers.ts
  • packages/dreamcli/src/core/completion/completion.test.ts
  • packages/dreamcli/src/core/completion/index.ts
  • packages/dreamcli/src/core/completion/shells/bash.ts
  • packages/dreamcli/src/core/completion/shells/fish.ts
  • packages/dreamcli/src/core/completion/shells/powershell.ts
  • packages/dreamcli/src/core/completion/shells/shared.ts
  • packages/dreamcli/src/core/completion/shells/zsh.ts
  • packages/dreamcli/src/core/config/AGENTS.md
  • packages/dreamcli/src/core/config/config.test.ts
  • packages/dreamcli/src/core/config/index.ts
  • packages/dreamcli/src/core/config/package-json.test.ts
  • packages/dreamcli/src/core/config/package-json.ts
  • packages/dreamcli/src/core/errors/errors.test.ts
  • packages/dreamcli/src/core/errors/index.ts
  • packages/dreamcli/src/core/execution/index.ts
  • packages/dreamcli/src/core/help/AGENTS.md
  • packages/dreamcli/src/core/help/help.test.ts
  • packages/dreamcli/src/core/help/index.ts
  • packages/dreamcli/src/core/json-schema/AGENTS.md
  • packages/dreamcli/src/core/json-schema/index.ts
  • packages/dreamcli/src/core/json-schema/json-schema.test.ts
  • packages/dreamcli/src/core/json-schema/meta-descriptions.generated.ts
  • packages/dreamcli/src/core/output/AGENTS.md
  • packages/dreamcli/src/core/output/activity.ts
  • packages/dreamcli/src/core/output/contracts.test.ts
  • packages/dreamcli/src/core/output/contracts.ts
  • packages/dreamcli/src/core/output/display-value.ts
  • packages/dreamcli/src/core/output/index.ts
  • packages/dreamcli/src/core/output/output-activity-dispatch.test.ts
  • packages/dreamcli/src/core/output/output-progress.test.ts
  • packages/dreamcli/src/core/output/output-spinner.test.ts
  • packages/dreamcli/src/core/output/output-table.test.ts
  • packages/dreamcli/src/core/output/output-tty.test.ts
  • packages/dreamcli/src/core/output/output.test.ts
  • packages/dreamcli/src/core/output/renderers.ts
  • packages/dreamcli/src/core/output/writer.ts
  • packages/dreamcli/src/core/parse/AGENTS.md
  • packages/dreamcli/src/core/parse/index.ts
  • packages/dreamcli/src/core/parse/parse.test.ts
  • packages/dreamcli/src/core/prompt/AGENTS.md
  • packages/dreamcli/src/core/prompt/index.ts
  • packages/dreamcli/src/core/prompt/prompt.test.ts
  • packages/dreamcli/src/core/resolve/AGENTS.md
  • packages/dreamcli/src/core/resolve/args.ts
  • packages/dreamcli/src/core/resolve/coerce.ts
  • packages/dreamcli/src/core/resolve/config.ts
  • packages/dreamcli/src/core/resolve/contracts.test.ts
  • packages/dreamcli/src/core/resolve/contracts.ts
  • packages/dreamcli/src/core/resolve/errors.ts
  • packages/dreamcli/src/core/resolve/flags.ts
  • packages/dreamcli/src/core/resolve/index.ts
  • packages/dreamcli/src/core/resolve/property.test.ts
  • packages/dreamcli/src/core/resolve/property.ts
  • packages/dreamcli/src/core/resolve/resolve-aggregation.test.ts
  • packages/dreamcli/src/core/resolve/resolve-arg-env.test.ts
  • packages/dreamcli/src/core/resolve/resolve-config.test.ts
  • packages/dreamcli/src/core/resolve/resolve-env.test.ts
  • packages/dreamcli/src/core/resolve/resolve-errors.test.ts
  • packages/dreamcli/src/core/resolve/resolve-integration.test.ts
  • packages/dreamcli/src/core/resolve/resolve-interactive.test.ts
  • packages/dreamcli/src/core/resolve/resolve-prompt.test.ts
  • packages/dreamcli/src/core/resolve/resolve-stdin.test.ts
  • packages/dreamcli/src/core/resolve/resolve.test.ts
  • packages/dreamcli/src/core/schema-dsl/AGENTS.md
  • packages/dreamcli/src/core/schema-dsl/index.ts
  • packages/dreamcli/src/core/schema-dsl/parse.ts
  • packages/dreamcli/src/core/schema-dsl/runtime.ts
  • packages/dreamcli/src/core/schema-dsl/schema-dsl.test.ts
  • packages/dreamcli/src/core/schema-dsl/to-json-schema.ts
  • packages/dreamcli/src/core/schema/AGENTS.md
  • packages/dreamcli/src/core/schema/activity.ts
  • packages/dreamcli/src/core/schema/arg.test.ts
  • packages/dreamcli/src/core/schema/arg.ts
  • packages/dreamcli/src/core/schema/command.test.ts
  • packages/dreamcli/src/core/schema/command.ts
  • packages/dreamcli/src/core/schema/derive.test.ts
  • packages/dreamcli/src/core/schema/flag.test.ts
  • packages/dreamcli/src/core/schema/flag.ts
  • packages/dreamcli/src/core/schema/index.ts
  • packages/dreamcli/src/core/schema/middleware.test.ts
  • packages/dreamcli/src/core/schema/middleware.ts
  • packages/dreamcli/src/core/schema/prompt.test.ts
  • packages/dreamcli/src/core/schema/prompt.ts
  • packages/dreamcli/src/core/schema/run.ts
  • packages/dreamcli/src/core/testkit/AGENTS.md
  • packages/dreamcli/src/core/testkit/executor-contract.test.ts
  • packages/dreamcli/src/core/testkit/index.ts
  • packages/dreamcli/src/core/testkit/middleware-context-e2e.test.ts
  • packages/dreamcli/src/core/testkit/output-e2e.test.ts
  • packages/dreamcli/src/core/testkit/testkit-json.test.ts
  • packages/dreamcli/src/core/testkit/testkit-nesting.test.ts
  • packages/dreamcli/src/core/testkit/testkit-prompt.test.ts
  • packages/dreamcli/src/core/testkit/testkit-stdin.test.ts
  • packages/dreamcli/src/core/testkit/testkit-tty.test.ts
  • packages/dreamcli/src/core/testkit/testkit.test.ts
  • packages/dreamcli/src/index.test.ts
  • packages/dreamcli/src/index.ts
  • packages/dreamcli/src/runtime.ts
  • packages/dreamcli/src/runtime/AGENTS.md
  • packages/dreamcli/src/runtime/adapter.ts
  • packages/dreamcli/src/runtime/auto.test.ts
  • packages/dreamcli/src/runtime/auto.ts
  • packages/dreamcli/src/runtime/bun.test.ts
  • packages/dreamcli/src/runtime/bun.ts
  • packages/dreamcli/src/runtime/deno.test.ts
  • packages/dreamcli/src/runtime/deno.ts
  • packages/dreamcli/src/runtime/detect.test.ts
  • packages/dreamcli/src/runtime/detect.ts
  • packages/dreamcli/src/runtime/index.ts
  • packages/dreamcli/src/runtime/node-builtins.d.ts
  • packages/dreamcli/src/runtime/node.ts
  • packages/dreamcli/src/runtime/paths.ts
  • packages/dreamcli/src/runtime/runtime.test.ts
  • packages/dreamcli/src/runtime/support.test.ts
  • packages/dreamcli/src/runtime/support.ts
  • packages/dreamcli/src/runtime/test-helpers.ts
  • packages/dreamcli/src/testkit.ts
  • packages/dreamcli/src/version.ts
  • packages/dreamcli/tsconfig.json
  • packages/dreamcli/tsdown.config.ts
  • packages/dreamcli/vitest.config.ts
  • scripts/build-meta-descriptions.ts
  • scripts/check-version-sync.ts
  • scripts/deno-smoke-test.ts
💤 Files with no reviewable changes (2)
  • DISCOVERIES.md
  • note-to-self.ts

Comment on lines +94 to +101
- Do not add runtime deps to `packages/dreamcli`
- Do not use `process.*` or runtime-specific APIs in `packages/dreamcli/src/core/`
- Do not import through barrels when it would create cycles; direct-file imports are intentional in
`cli/`, `completion/`, `output/`, `prompt/`, `resolve/`, and `runtime/`
- Do not hand-edit `dreamcli.schema.json` or `src/core/json-schema/meta-descriptions.generated.ts`
- Do not edit `docs/.vitepress/dist/` or `docs/.vitepress/cache/`
- Do not treat `docs/.vitepress/data/` as docs-only; scripts import it for generated source and docs
artifacts
- Do not edit `apps/docs/.vitepress/dist/` or `apps/docs/.vitepress/cache/`
- Do not treat `apps/docs/.vitepress/data/` as docs-only; scripts import it for generated source and
docs artifacts
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

Fix the stale generated-artifact paths.

Arrr, Line 98 still points at the pre-monorepo locations. In this layout, that warning should name packages/dreamcli/dreamcli.schema.json and packages/dreamcli/src/core/json-schema/meta-descriptions.generated.ts, or the guide sends folks to the wrong files.

🏴‍☠️ Proposed doc fix
-- Do not hand-edit `dreamcli.schema.json` or `src/core/json-schema/meta-descriptions.generated.ts`
+- Do not hand-edit `packages/dreamcli/dreamcli.schema.json` or `packages/dreamcli/src/core/json-schema/meta-descriptions.generated.ts`

Based on learnings: "Do not hand-edit generated artifacts when a script is already the source of truth (e.g., do not hand-edit src/core/json-schema/meta-descriptions.generated.ts or dreamcli.schema.json)".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 94 - 101, Update the stale generated-artifact
references in the AGENTS.md guidance so they point to the monorepo locations:
replace the old pre-monorepo mentions with
"packages/dreamcli/dreamcli.schema.json" and
"packages/dreamcli/src/core/json-schema/meta-descriptions.generated.ts" wherever
the doc warns not to hand-edit generated artifacts (the line currently
referencing dreamcli.schema.json and
src/core/json-schema/meta-descriptions.generated.ts should be updated to these
package paths) to ensure the guide directs readers to the correct generated
files.

Comment on lines +122 to +123
- **Monorepo**: Bun workspaces (`packages/*`, `apps/*`, `tools/*`, `examples/*`). Root `package.json`
is `dreamcli-monorepo` (private). Scripts proxy to workspace packages via `--filter`.
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Apr 8, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Tighten the root-script note.

Arrr, Lines 122-123 say root scripts proxy via --filter, but the current root package also uses --cwd and direct repo-root scripts. Widening that wording will keep automation from assuming every workspace hop is filter-based.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 122 - 123, Update the sentence that reads "root
`package.json` is `dreamcli-monorepo` (private). Scripts proxy to workspace
packages via `--filter`." to reflect that root scripts may use multiple
invocation methods (for example `--filter`, `--cwd`, or direct repo-root
scripts) rather than only `--filter`; replace "proxy to workspace packages via
`--filter`" with a short phrase such as "invoke workspace packages via
`--filter`, `--cwd`, or direct root scripts" so automation readers understand
the root can use any of these approaches.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

--filter auto-compresses the log output to ~10 lines per ran command... --cwd is just treated as a regular command, and gives full log output. we use both for different usecases

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@kjanat, arr, that be a fine distinction worth rememberin' — --filter compressin' the log to ~10 lines per command for clean summary output, while --cwd lets the full log pour forth for commands that need it. Makes perfect sense to use both deliberately!

Would ye like the AGENTS.md note updated to capture that distinction so future automation readers (and crew members) know which to reach for and why? Something like:

- **Monorepo**: Bun workspaces (`packages/*`, `apps/*`, `tools/*`, `examples/*`). Root `package.json`
  is `dreamcli-monorepo` (private). Root scripts invoke workspace packages via `--filter` (compresses
  log to ~10 lines per command) or `--cwd` (full log output), depending on the use case.

Either way, I'll stash this knowledge in me long-term memory so I don't misread it in future reviews!


✏️ Learnings added
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 10
File: AGENTS.md:122-123
Timestamp: 2026-04-08T13:09:11.245Z
Learning: In repository kjanat/dreamcli, Bun's `--filter` flag auto-compresses log output to approximately 10 lines per ran command, while `--cwd` is treated as a regular command invocation with full log output. Both are used intentionally in root `package.json` scripts for different use cases: `--filter` for concise/summary output, `--cwd` for verbose/full output.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 1
File: AGENTS.md:12-12
Timestamp: 2026-02-10T16:25:08.867Z
Learning: In repository kjanat/dreamcli, prefer using the filename syntax (e.g., GOALS.md) when referencing files in Markdown documentation, and treat references that do not follow this style as non-issues. This pattern applies to all Markdown files across the project.

Comment on lines 47 to 56
const compilerOptions = {
baseUrl: projectRoot,
lib: tsc.compilerOptions?.lib ?? ['ESNext'],
paths: tsc.compilerOptions?.paths ?? {},
baseUrl: packageRoot,
moduleDetection: ModuleDetectionKind.Force,
module: ModuleKind.ESNext,
moduleResolution: ModuleResolutionKind.Bundler,
allowImportingTsExtensions: tsc.compilerOptions?.allowImportingTsExtensions,
allowImportingTsExtensions: true,
noEmit: true,
resolveJsonModule: tsc.compilerOptions?.resolveJsonModule,
types: [...(tsc.compilerOptions?.types ?? []), 'vitest/globals'],
resolveJsonModule: true,
types: ['bun', 'node', 'vue', 'vite/client', 'vitest/globals'],
};
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

Restore Twoslash source-path resolution.

Docs CI builds before packages/dreamcli/dist exists. Without the repo paths map here, @kjanat/dreamcli* resolves through the package export surface to dist/*.d.mts, so snippets fall back to missing declarations instead of src/*.ts. Ye also dropped deno from types, which will break Deno.* examples.

⚓ Proposed fix
 const compilerOptions = {
-	baseUrl: packageRoot,
+	baseUrl: projectRoot,
+	paths: {
+		'@kjanat/dreamcli': ['./packages/dreamcli/src/index.ts'],
+		'@kjanat/dreamcli/runtime': ['./packages/dreamcli/src/runtime.ts'],
+		'@kjanat/dreamcli/testkit': ['./packages/dreamcli/src/testkit.ts'],
+		'@kjanat/dreamcli/schema': ['./packages/dreamcli/dreamcli.schema.json'],
+		'@kjanat/dreamcli/package.json': ['./packages/dreamcli/package.json'],
+	},
 	moduleDetection: ModuleDetectionKind.Force,
 	module: ModuleKind.ESNext,
 	moduleResolution: ModuleResolutionKind.Bundler,
 	allowImportingTsExtensions: true,
 	noEmit: true,
 	resolveJsonModule: true,
-	types: ['bun', 'node', 'vue', 'vite/client', 'vitest/globals'],
+	types: ['bun', 'node', 'deno', 'vitest', 'vitest/globals', 'vue', 'vite/client'],
 };
📝 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
const compilerOptions = {
baseUrl: projectRoot,
lib: tsc.compilerOptions?.lib ?? ['ESNext'],
paths: tsc.compilerOptions?.paths ?? {},
baseUrl: packageRoot,
moduleDetection: ModuleDetectionKind.Force,
module: ModuleKind.ESNext,
moduleResolution: ModuleResolutionKind.Bundler,
allowImportingTsExtensions: tsc.compilerOptions?.allowImportingTsExtensions,
allowImportingTsExtensions: true,
noEmit: true,
resolveJsonModule: tsc.compilerOptions?.resolveJsonModule,
types: [...(tsc.compilerOptions?.types ?? []), 'vitest/globals'],
resolveJsonModule: true,
types: ['bun', 'node', 'vue', 'vite/client', 'vitest/globals'],
};
const compilerOptions = {
baseUrl: projectRoot,
paths: {
'@kjanat/dreamcli': ['./packages/dreamcli/src/index.ts'],
'@kjanat/dreamcli/runtime': ['./packages/dreamcli/src/runtime.ts'],
'@kjanat/dreamcli/testkit': ['./packages/dreamcli/src/testkit.ts'],
'@kjanat/dreamcli/schema': ['./packages/dreamcli/dreamcli.schema.json'],
'@kjanat/dreamcli/package.json': ['./packages/dreamcli/package.json'],
},
moduleDetection: ModuleDetectionKind.Force,
module: ModuleKind.ESNext,
moduleResolution: ModuleResolutionKind.Bundler,
allowImportingTsExtensions: true,
noEmit: true,
resolveJsonModule: true,
types: ['bun', 'node', 'deno', 'vitest', 'vitest/globals', 'vue', 'vite/client'],
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/.vitepress/config.ts` around lines 47 - 56, The compilerOptions
object is missing a paths map and the 'deno' type that breaks twoslash
source-path resolution and Deno examples; update the compilerOptions in
config.ts (the compilerOptions constant using baseUrl/packageRoot) to include a
paths entry that maps "@kjanat/dreamcli/*" (and similar package scopes used in
the repo) to the repo src (so CI resolves to src/*.ts rather than dist/*.d.mts),
and restore 'deno' in the types array alongside
'bun','node','vue','vite/client','vitest/globals' so Deno globals (Deno.*) work
in examples. Ensure the mapping keys exactly match the package import specifiers
used in snippets and that baseUrl/packageRoot remain set as before.

`- Source: [\`examples/standalone/basic.ts\`](https://github.com/kjanat/dreamcli/blob/${gitRef}/examples/standalone/basic.ts)`,
);
expect(page).toContain('## Usage');
expect(page).toContain('npx tsx examples/basic.ts Alice --loud --times 3');
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the Usage section in examples/standalone/basic.ts

echo "=== Usage section in examples/standalone/basic.ts ==="
rg -A 3 'Usage:' examples/standalone/basic.ts

Repository: kjanat/dreamcli

Length of output: 258


Update the Usage section in the example docblock to reflect the actual file path.

The Usage: section in examples/standalone/basic.ts still references npx tsx examples/basic.ts, but the file be at examples/standalone/basic.ts now. This be confusin' fer users tryin' to run the example. Fix the docblock to say npx tsx examples/standalone/basic.ts instead—yer documentation be precious, keep it shipshape and accurate, savvy?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/.vitepress/data/examples.test.ts` at line 60, The test assertion in
apps/docs/.vitepress/data/examples.test.ts currently checks that page contains
'npx tsx examples/basic.ts Alice --loud --times 3' but the example file was
moved to examples/standalone/basic.ts; update the expectation string in the test
(the assertion using the variable page in examples.test.ts) to 'npx tsx
examples/standalone/basic.ts Alice --loud --times 3' so the Usage docblock
matches the actual file path.

collectExamples,
type ExampleEntry,
} from '@kjanat/dreamcli-docs/vitepress/data/examples.ts';
import { examplesRoot, rootDirPath } from '@kjanat/dreamcli-docs/vitepress/data/paths.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 | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Check whether apps/examples exists:"
fd -t d '^examples$' apps || true

echo
echo "Locate examples.data.ts and print watch path:"
fd -p 'examples.data.ts' | xargs -I{} sh -c "echo '--- {}'; sed -n '1,80p' {} | nl -ba | sed -n '20,40p'"

echo
echo "Inspect resolved canonical examples root from docs path helpers:"
fd -p 'paths.ts' | rg -n "apps/docs/.vitepress/data/paths.ts|vitepress/data/paths.ts" || true
fd -p 'paths.ts' | xargs -I{} sh -c "echo '--- {}'; rg -n 'examplesRoot|rootDirPath' {}"

Repository: kjanat/dreamcli

Length of output: 720


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Content of apps/docs/examples/examples.data.ts (lines 1-50) ==="
head -50 apps/docs/examples/examples.data.ts | cat -n

echo
echo "=== Content of apps/docs/.vitepress/data/paths.ts ==="
cat apps/docs/.vitepress/data/paths.ts | cat -n

Repository: kjanat/dreamcli

Length of output: 2876


Scallywag watch glob needs alignin' with the true examples root, savvy?

The watch glob be watchin' ../../examples/**/*.ts but collectExamples() be loadin' from examplesRoot which resolves to ${rootDir}/examples/standalone. This drift be breakin' HMR for example changes—ye needna fix it by derivin' the watch path from the same source of truth in paths.ts.

Evidence: Path mismatch
watch glob resolves to:         ${rootDir}/examples/**/*.ts
collectExamples() loads from:   ${rootDir}/examples/standalone

Ye need either:

  • Update watch: ['../../examples/standalone/**/*.ts'], or
  • Better yet, derive watch from the constant defined in paths.ts to keep 'em in lockstep
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/examples/examples.data.ts` at line 14, The watch glob in this
module is hardcoded to ../../examples/**/*.ts while collectExamples() uses
examplesRoot from paths.ts (which points to ${rootDir}/examples/standalone);
change the watch definition to derive its path from the same constant by using
examplesRoot and/or rootDirPath so both watch and collectExamples() reference
the same source of truth (update the watch: [...] entry to compute the glob from
examplesRoot instead of a hardcoded ../../examples/**/*.ts).

Comment on lines +8 to +9
# We don't have ANY dependencies, so this doesn't matter. I want up-to-date devtools.
exact = false
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

Misleading policy comment should be corrected

Line 8 says there are no dependencies, but this PR explicitly introduces a workspace monorepo with shared dependency management. Keep exact = false if that’s the intended update strategy, but rewrite the comment so it reflects the real policy (e.g., “prefer range updates for dev tooling; lockfile preserves reproducibility”).

Proposed wording update
-# We don't have ANY dependencies, so this doesn't matter. I want up-to-date devtools.
+# Intentionally allow range-based dependency specs for faster devtool updates.
+# Reproducibility is still enforced via the lockfile in CI.
 exact         = false
📝 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
# We don't have ANY dependencies, so this doesn't matter. I want up-to-date devtools.
exact = false
# Intentionally allow range-based dependency specs for faster devtool updates.
# Reproducibility is still enforced via the lockfile in CI.
exact = false
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bunfig.toml` around lines 8 - 9, Update the misleading comment that says "We
don't have ANY dependencies, so this doesn't matter." to accurately describe the
repo's dependency policy now that a workspace monorepo and shared dependency
management are introduced; keep the configuration key exact = false if you
intend range updates for dev tooling, and replace the comment with something
like "Prefer range updates for dev tooling in this monorepo; lockfile preserves
reproducible installs" near the exact = false declaration so the policy and
intent are clear.

Comment on lines +95 to +97
"optionalDependencies": {
"vite": "catalog:"
},
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

Do not leak vite into the published runtime surface.

optionalDependencies is still a runtime dependency bucket. vite already lives in apps/docs/package.json; keeping it here makes library consumers download tooling they do not need.

⚓ Proposed fix
-	"optionalDependencies": {
-		"vite": "catalog:"
-	},

As per coding guidelines, packages/dreamcli/package.json: Do not add runtime dependencies to packages/dreamcli.

📝 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
"optionalDependencies": {
"vite": "catalog:"
},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dreamcli/package.json` around lines 95 - 97, Remove the "vite" entry
from the package's optionalDependencies in package.json so tooling is not leaked
into the runtime surface; instead ensure any build/dev tooling is declared only
where needed (e.g., apps/docs/package.json or devDependencies) and update the
package.json's optionalDependencies block (remove the "vite": "catalog:" line)
so library consumers won't download Vite at install time.

Comment on lines +481 to +489
## Package structure

Three subpath exports, each with a focused API surface:

| Import | Purpose |
| -------------------------- | -------------------------------------------------------------------------------------- |
| `@kjanat/dreamcli` | Schema builders, CLI runner, output, parsing, resolution, errors |
| `@kjanat/dreamcli/testkit` | `runCommand()`, `createCaptureOutput()`, `createTestPrompter()`, `createTestAdapter()` |
| `@kjanat/dreamcli/runtime` | `createAdapter()`, `RuntimeAdapter`, runtime detection, platform adapters |
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

Document the schema entrypoint too.

Arrr, this section says "Three subpath exports," but the package also exposes @kjanat/dreamcli/schema. As written, consumers never learn where the published schema artifact lives, and the heading is off because the root import is not a subpath.

🏴‍☠️ Proposed doc fix
 ## Package structure
 
-Three subpath exports, each with a focused API surface:
+Four public entry points, each with a focused API surface:
 
 | Import                     | Purpose                                                                                |
 | -------------------------- | -------------------------------------------------------------------------------------- |
 | `@kjanat/dreamcli`         | Schema builders, CLI runner, output, parsing, resolution, errors                       |
+| `@kjanat/dreamcli/schema`  | Published JSON schema artifact (`dreamcli.schema.json`)                                |
 | `@kjanat/dreamcli/testkit` | `runCommand()`, `createCaptureOutput()`, `createTestPrompter()`, `createTestAdapter()` |
 | `@kjanat/dreamcli/runtime` | `createAdapter()`, `RuntimeAdapter`, runtime detection, platform adapters              |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dreamcli/README.md` around lines 481 - 489, Update the README
section that lists package exports: change the heading and wording so it doesn’t
claim “Three subpath exports” and add the missing schema entrypoint by including
a row for `@kjanat/dreamcli/schema` (describing the published schema artifact
and its purpose) alongside the existing entries `@kjanat/dreamcli`,
`@kjanat/dreamcli/testkit`, and `@kjanat/dreamcli/runtime`; ensure the root
import wording clarifies that `@kjanat/dreamcli` is the root package and the
others are subpath exports.


it('documents the guide runtime support matrix', async () => {
const docs = await readUtf8(new URL('../../docs/guide/runtime.md', import.meta.url));
const docs = await readUtf8(new URL('../../../../apps/docs/guide/runtime.md', import.meta.url));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Arrr, ye be mixin' yer formatting styles, matey!

Line 44 keeps the new URL(...) all snug on one line, but lines 54-56 and 65-67 be splittin' it across multiple lines like a broken mast. All three follow the same pattern—readUtf8(new URL(..., import.meta.url))—so they ought to match, savvy?

Pick one style and stick to it, ye scallywag! Either hoist 'em all to single-line or break 'em all to multi-line for consistency.

⚓ Proposed fix to harmonize formatting (single-line option)
 it('documents the reference runtime support matrix', async () => {
-  const docs = await readUtf8(
-    new URL('../../../../apps/docs/reference/runtime.md', import.meta.url),
-  );
+  const docs = await readUtf8(new URL('../../../../apps/docs/reference/runtime.md', import.meta.url));

   for (const runtime of SUPPORTED_RUNTIMES) {
 it('mentions the same minimum versions in getting started', async () => {
-  const docs = await readUtf8(
-    new URL('../../../../apps/docs/guide/getting-started.md', import.meta.url),
-  );
+  const docs = await readUtf8(new URL('../../../../apps/docs/guide/getting-started.md', import.meta.url));

   for (const runtime of SUPPORTED_RUNTIMES) {

Also applies to: 54-67

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dreamcli/src/runtime/support.test.ts` at line 44, The three
occurrences of the expression using readUtf8(new URL(..., import.meta.url)) in
support.test.ts are formatted inconsistently; pick one style (prefer
single-line) and make all instances consistent by collapsing the multi-line URL
expressions (the ones around readUtf8, new URL and import.meta.url) into the
single-line form readUtf8(new URL(..., import.meta.url)) wherever they appear
(e.g., the variable initializing docs and the other two readUtf8 calls),
preserving the same arguments and imports.

@coderabbitai coderabbitai bot added area: cli CLI dispatch, planning, root UX, or plugins release Release planning, versioning, changelog, or publish flow and removed kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX area: schema Schema builders, schema DSL, and JSON Schema export area: build Build, CI, release automation, scripts, and packaging labels Apr 8, 2026
Inherit paths + typeRoots from tsconfig so Twoslash resolves
@kjanat/dreamcli to source and finds vitest in package-level
node_modules. Remove bandaid // @errors annotations.
@coderabbitai coderabbitai bot added kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX and removed area: cli CLI dispatch, planning, root UX, or plugins release Release planning, versioning, changelog, or publish flow labels Apr 8, 2026
@coderabbitai coderabbitai bot added kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX area: schema Schema builders, schema DSL, and JSON Schema export area: build Build, CI, release automation, scripts, and packaging and removed area: cli CLI dispatch, planning, root UX, or plugins labels Apr 8, 2026
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: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/.vitepress/theme/components/SettingsGear.vue (1)

183-253: 🧹 Nitpick | 🔵 Trivial

Add a reduced-motion fallback for the new spin/scale animations.

These new transforms are flashy (nice), but users with reduced-motion preferences should get a calmer path.

Patch
+	`@media` (prefers-reduced-motion: reduce) {
+		.settings-gear-btn svg,
+		.settings-gear-btn svg path,
+		.settings-gear-btn svg circle,
+		.settings-dropdown-enter-active,
+		.settings-dropdown-leave-active {
+			transition: none !important;
+		}
+
+		.settings-gear-btn:hover svg path,
+		.settings-gear-btn:hover svg circle,
+		.settings-gear.open .settings-gear-btn svg,
+		.settings-gear.open .settings-gear-btn svg circle,
+		.settings-gear.open .settings-gear-btn:hover svg path,
+		.settings-dropdown-enter-from,
+		.settings-dropdown-leave-to {
+			transform: none !important;
+		}
+	}

Also applies to: 385-403

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/.vitepress/theme/components/SettingsGear.vue` around lines 183 -
253, Add a prefers-reduced-motion fallback so users who request reduced motion
don’t get the spin/scale animations: wrap rules that apply
transforms/transitions for .settings-gear-btn, .settings-gear.open,
.settings-gear-btn svg, .settings-gear-btn svg path and .settings-gear-btn svg
circle in a `@media` (prefers-reduced-motion: reduce) block (or explicitly
override them there) to remove or neutralize transform/animation properties (set
transitions to none and transforms to none or static values) so the gear stays
still and no motion occurs for reduced-motion users; apply same change for the
duplicated block referenced at the other occurrence.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.dprint.jsonc:
- Around line 62-63: The ruff plugin
"https://plugins.dprint.dev/ruff-0.7.8.wasm" requires dprint >= 0.54.0 but the
project is pinned to v0.53.2; update the dprint version in package.json (the
"dprint" dependency or devDependency) to ">=0.54.0" (preferably the latest
compatible release), reinstall/update lockfile (npm/yarn/pnpm) so the new dprint
is used, then verify .dprint.jsonc still references the ruff plugin URL and run
dprint to confirm the plugin loads.

In @.gitignore:
- Line 235: The .gitignore entry ".*_cache" is missing a trailing newline; open
the file and add a single newline character after the final line (after the
".*_cache" entry) so the file ends with a POSIX-compliant newline.

In @.zed/settings.json:
- Around line 11-15: Replace the salty inline comment in the "formatter" array
(the line between the language_server { "name": "dprint" } entry and the
external fallback entry) with a professional phrasing such as "which
occasionally misbehaves" so the config remains defensive (LSP primary, CLI
fallback) but uses neutral language; leave the "formatter" structure, the
language_server name "dprint" and the external command/arguments for the CLI
fallback unchanged.

In `@apps/docs/.vitepress/theme/components/SettingsGear.vue`:
- Around line 154-155: The divider currently rendered as <span class="divider"
/> inside the element with role="menu" needs proper menu semantics: replace or
augment the span so it exposes role="separator" (and include
aria-orientation="vertical" or "horizontal" as appropriate for the menu layout)
so assistive tech recognizes it as a menu separator; locate the divider in
SettingsGear.vue (the element with class "divider" inside the role="menu") and
update its attributes to role="separator" and the appropriate aria-orientation.

In `@apps/docs/.vitepress/theme/custom.css`:
- Around line 1-11: The --jsr-color values are inconsistent between :root
(oklch(78.9% 0.154 211.53)) and :root.dark (`#f7df1e`); update the light-mode
variable to match the dark-mode yellow branding by replacing the oklch value
with the correct oklch equivalent (oklch(88.3% 84.846 96.09)) or alternatively
use the same hex (`#f7df1e`) for both --jsr-color entries so the JSR color is
identical across light and dark themes; edit the --jsr-color in :root to one of
these consistent values.

In `@ruff.toml`:
- Line 1: Remove the unused ruff configuration file (ruff.toml) from the
repository because Ruff is not declared as a dependency or used in CI for this
JavaScript/TypeScript project; delete the ruff.toml file entirely (do not add it
back) unless you intend to add Ruff as a dev dependency and wire it into CI—if
you do plan to use Ruff, instead add it to package.json/bun.lock and update CI,
otherwise simply remove ruff.toml to avoid dead config and confusion (note: the
Python scaffold at skills/cli-creation/scripts/scaffold_cli.py does not require
Ruff).

---

Outside diff comments:
In `@apps/docs/.vitepress/theme/components/SettingsGear.vue`:
- Around line 183-253: Add a prefers-reduced-motion fallback so users who
request reduced motion don’t get the spin/scale animations: wrap rules that
apply transforms/transitions for .settings-gear-btn, .settings-gear.open,
.settings-gear-btn svg, .settings-gear-btn svg path and .settings-gear-btn svg
circle in a `@media` (prefers-reduced-motion: reduce) block (or explicitly
override them there) to remove or neutralize transform/animation properties (set
transitions to none and transforms to none or static values) so the gear stays
still and no motion occurs for reduced-motion users; apply same change for the
duplicated block referenced at the other occurrence.
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: cf06c988-11a0-45bb-b9ae-d9425ac4401f

📥 Commits

Reviewing files that changed from the base of the PR and between c1d52ee and 7ab02ec.

📒 Files selected for processing (8)
  • .dprint.jsonc
  • .gitignore
  • .zed/settings.json
  • apps/docs/.vitepress/theme/components/SettingsGear.vue
  • apps/docs/.vitepress/theme/custom.css
  • apps/docs/.vitepress/theme/twoslash-mobile.css
  • packages/dreamcli/deno.json
  • ruff.toml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx,json,md}

📄 CodeRabbit inference engine (AGENTS.md)

Use tabs for indentation

Files:

  • packages/dreamcli/deno.json
🧠 Learnings (3)
📓 Common learnings
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 10
File: AGENTS.md:122-123
Timestamp: 2026-04-08T13:09:11.245Z
Learning: In repository kjanat/dreamcli, Bun's `--filter` flag auto-compresses log output to approximately 10 lines per ran command, while `--cwd` is treated as a regular command invocation with full log output. Both are used intentionally in root `package.json` scripts for different use cases: `--filter` for concise/summary output, `--cwd` for verbose/full output.
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:14.641Z
Learning: Use LF (line feed) line endings instead of CRLF
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:14.641Z
Learning: Do not replace `bun run gh-project:*` commands with ad hoc GitHub project mutations; use the established workflow helper
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:23.670Z
Learning: Do not assume docs code is isolated from source generation; `scripts/build-meta-descriptions.ts` imports documentation code
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:23.670Z
Learning: Ensure root `dreamcli.schema.json` is copied into docs site output during build, as it is required for docs
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:30.624Z
Learning: Do not edit generated docs pages when the source of truth is an example file; update the example source instead
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:30.624Z
Learning: Do not let examples drift into pseudo-internal usage that real consumers cannot copy
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:30.624Z
Learning: Do not treat `.cache/` as source material
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: All I/O flows through a narrow `RuntimeAdapter` surface to keep it testable with virtual filesystems
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: Config roots must be plain objects even if a loader can parse other JSON or YAML values
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: JSON is always built in and ordered first in search-path and loader resolution
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: All `package.json` metadata walk-up and CLI name inference should return `null` for malformed or missing package metadata rather than hard failures
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: Do not skip plain-object validation at the discovery boundary in config loading
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: Do not couple config discovery to command schema or resolve precedence logic
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/config/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:51:56.261Z
Learning: Path joining and parent-walk helper functions should use string logic rather than `node:path` to stay runtime-neutral
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:01.325Z
Learning: Help text must be generated from schema metadata; keep formatting rules derived, not duplicated per caller
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:01.325Z
Learning: Do not special-case caller behavior when schema metadata already expresses it
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:09.970Z
Learning: Source build-time schema description data from docs data modules, not hand-maintained constants
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:09.970Z
Learning: Ensure package-level schema artifact is built; root `dreamcli.schema.json` must be emitted from this surface
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/output/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:21.606Z
Learning: OutputChannel supports five output modes (normal, JSON, quiet, non-TTY, capture) with mode-specific behavior for log/json output and activity handles; dispatch logic must match the documented mode table
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/output/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:21.606Z
Learning: Create public factory functions `createOutput()` and `createCaptureOutput()` to instantiate OutputChannel instances with mode dispatch and testkit support; keep OutputChannel and CaptureOutputChannel marked as `internal`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/output/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:21.606Z
Learning: ActivityEvent type must support 10 variants including distinct `progress:increment` and `progress:update` events to allow fine-grained assertion in tests
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/output/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:21.606Z
Learning: Maintain a strict dependency graph with no cycles: `writer.ts` <- `contracts.ts` <- `activity.ts` <- `index.ts` with `index.ts` also consuming `renderers.ts` and `display-value.ts`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:34.905Z
Learning: Perform choice merging before the engine sees config; engines should not infer enum choices themselves
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:34.905Z
Learning: Do not move non-TTY gating into the prompt engine; CLI and resolve layers should decide when prompts are allowed
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:46.799Z
Learning: Maintain two-pass resolution architecture: Pass 1 resolves CLI → env → config, then invoke interactive resolver if available, then Pass 2 resolves prompt → default → required validation
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:46.799Z
Learning: Implement resolution order precedence: CLI argv → environment variable → config file → interactive prompt → default value, with first non-undefined value winning
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:46.799Z
Learning: Use `coerceValue()` with `CoerceSource` discriminated union for unified value coercion across different sources (env, config, prompt) with source-specific behavior
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:52.582Z
Learning: Compile-time and runtime parsing paths must agree — a string that type-checks must also produce the correct runtime behavior
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:52:52.582Z
Learning: Import from `schema/` module (flag, arg, command builders) — avoid circular dependencies since schema-dsl depends on schema, not vice versa
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:53:02.782Z
Learning: When adding a new flag type: add variant to `FlagKind` union, add factory method on FlagBuilder, update `InferFlag` conditional type, wire through `resolve/coerce.ts`, and add tests
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:53:08.739Z
Learning: The `mergedSchema` field on `RunOptions` is internal and should only be used by the CLI dispatch layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:53:08.739Z
Learning: The `runCommand(cmd, argv, options?)` function is the primary entry point for the testkit module, returning a `Promise<RunResult>` with captured output and execution metadata
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:53:18.616Z
Learning: `ExitError` is thrown by `adapter.exit()` and caught by CLI dispatch layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-08T21:53:18.616Z
Learning: Runtime module is not truly independent of core — imports `WriteFn` from `core/output/` and `ReadFn` from `core/prompt/`
📚 Learning: 2026-04-06T11:48:17.901Z
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 9
File: deno.json:26-40
Timestamp: 2026-04-06T11:48:17.901Z
Learning: For Deno/JSR projects using `deno.json`, it is valid to declare public subpath exports that map to JSON files (e.g., `"./schema": "./dreamcli.schema.json"`). During code review, do not flag JSON file subpath exports in `deno.json` as invalid; Deno’s toolchain (e.g., `deno publish --dry-run` / `deno check`) supports JSON exports natively and should be used to confirm validity if needed.

Applied to files:

  • packages/dreamcli/deno.json
📚 Learning: 2026-04-06T11:32:59.137Z
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 9
File: .zed/settings.json:49-52
Timestamp: 2026-04-06T11:32:59.137Z
Learning: In kjanat/dreamcli, do not treat the `.zed/settings.json` → `.attw.json` JSON-schema reference (the gist URL owned/controlled by repo maintainer kjanat) as a fragile external dependency. Assume the gist is intentionally maintained by the maintainer and do not recommend moving the schema to the repo or to a “more stable” location in this file.

Applied to files:

  • .zed/settings.json
🔇 Additional comments (17)
packages/dreamcli/deno.json (4)

13-13: Aye, this smoke-task path fix be clean.

Using the package-local relative path here pairs nicely with CI calling the task via config, so ye avoid path drift between direct script calls and task calls. Nicely tightened.


31-31: Schema entrypoint remap is consistent and shipshape.

Routing both exports and TS path mapping through ./src/schema.ts keeps resolution aligned while preserving the same schema payload contract for consumers.

Also applies to: 40-40


45-53: Aye, explicit publish includes be a solid hardening move.

Including package.json and deno.json alongside schema and source makes the JSR package shape less brittle and easier to reason about.


60-60: Exclusion cleanup looks tidy and intentional.

This keeps noise files out without poking holes in the publish include set ye defined above. Good cleanup.

.gitignore (1)

234-234: ⚠️ Potential issue | 🟡 Minor

Arrr, ye Python cache pattern be too narrow, matey!

The pattern __pycache__ only catches Python bytecode at the root, but in yer monorepo them __pycache__/ directories'll spawn in every workspace with Python files. Use the proper recursive pattern to catch 'em all:

⚓ Proposed fix fer proper Python cache ignorin'
-__pycache__
+**/__pycache__/

This'll properly ignore examples/standalone/__pycache__/, packages/dreamcli/__pycache__/, and any other Python cache directories in yer workspaces, savvy?

			> Likely an incorrect or invalid review comment.
apps/docs/.vitepress/theme/twoslash-mobile.css (2)

6-9: Aye, clean commentary-only touch-up.

These line edits are documentation-only and don’t alter behavior.

Also applies to: 15-18


76-76: Aye, no-op CSS normalization at Line 76.

Switching content from single to double quotes is behaviorally identical. Ship it.

apps/docs/.vitepress/theme/components/SettingsGear.vue (1)

156-168: Aye, runtime pill wiring is solid.

Using rt.short for compact labels while keeping rt.value for state and selection is clean and correct.

apps/docs/.vitepress/theme/custom.css (3)

13-17: Aye, this scurvy dog of a property still be limpin' on one leg!

-webkit-user-drag: none only works in WebKit/Blink browsers — Firefox be ignorin' this property entirely. This were already flagged in a previous review, matey!


19-32: Shiver me timbers, this be some fine sailin'!

Yer social link hover states be shipshape and Bristol fashion! Ye've included both :hover and :focus-visible, makin' it accessible fer keyboard navigators. The use o' CSS variables keeps it DRY as a ship's biscuit. Well done, ye scallywag!


34-36: Har har! A smooth transition be the mark of a proper seafarer!

This selector be clever as a fox — it catches all yer social icons with one net using the [class^="vpi-social-"] attribute selector. The 0.25s transition duration be just right fer a smooth color change without makin' users wait. No complaints from this salty dog!

.dprint.jsonc (4)

12-12: Arrr, the *.ts.tpl addition be ship-shape!

Aye, ye've properly hooked the template files into Biome's formatter. This aligns with the relevant context showin' those skills/cli-creation/assets/templates/*.ts.tpl files. They'll now get consistent formatting with the rest of yer TypeScript. Good work, matey!


50-50: The broader globs be intentional but warrant a weather eye, cap'n.

Ye've widened the Prettier associations from specific apps/docs/** paths to repo-wide **/docs/**/*.md and **/.vitepress/twoslash/*.ts. This be fine fer catchin' any docs folders across the monorepo, but it could snag unexpected files if some scallywag adds a docs/ folder in a package later.

The biome/markdown/markup exclusions use the specific !apps/docs/** path while prettier uses the broad **/docs/** - this asymmetry be intentional (prettier formats docs, biome doesn't), just make sure yer crew knows the reasoning.


52-52: Ruff config be lookin' tidy fer Python formatting.

The preview: true enables Ruff's preview features, and indentWidth: 4 be the standard Python indentation. This supports the new Python scaffold script mentioned in the PR objectives. Nice addition to the fleet!


53-53: Smart to exclude **/*.schema.json from the formattin' plunder.

Generated schema files like packages/dreamcli/dreamcli.schema.json (which uses its own JSON.stringify formattin' per the context snippet) won't be touched by dprint. This prevents unnecessary churn on build artifacts. Approved, ye salty dog!

.zed/settings.json (2)

9-9: Aye, the *.ts.tpl TypeScript mapping be consistent with the dprint config!

This ensures Zed treats template files as TypeScript fer syntax highlightin' and language server features. Perfect harmony between yer editor and formatter configs. Well done, sailor!


42-47: The bunx dprint LSP config looks correct, matey.

Usin' bunx as the binary path with ["dprint", "lsp"] as arguments should properly invoke the dprint language server through Bun's package runner. This be the right pattern fer monorepo tooling where dprint may not be globally installed.

Comment on lines +62 to +63
"https://plugins.dprint.dev/prettier-0.67.1.json@59ebff9da99fa283ba37ed5c131e73d5acc6b57bb90ba4cd1230b4fbadb19dd1",
"https://plugins.dprint.dev/ruff-0.7.8.wasm"
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 | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

dprint ruff plugin 0.7.8 compatibility

💡 Result:

dprint-plugin-ruff v0.7.8 is the current published Ruff plugin build in the official dprint plugin registry (https://plugins.dprint.dev/ruff-0.7.8.wasm). [1]

Compatibility-wise, it’s intended to be used as a normal dprint Wasm plugin (installed via dprint add ruff) and formats .py and .pyi files through Ruff. [2]

If you’re on an older dprint CLI and the plugin fails to load (typical “plugin schema/version mismatch” scenario), upgrade dprint; the upstream dprint repo shows dprint v0.54.0 released on April 8, 2026. [3]

Sources:
[1] dprint plugin registry listing (shows ruff-0.7.8.wasm) (plugins.dprint.dev)
[2] dprint Ruff plugin docs (dprint.dev)
[3] dprint GitHub repo (latest release shown as 0.54.0, Apr 8, 2026) (github.com)

Citations:


🏁 Script executed:

# Look for dprint version in common configuration files
fd -e json -e lock -e txt | head -20

Repository: kjanat/dreamcli

Length of output: 485


🏁 Script executed:

# Check for dprint.jsonc config and look for version constraints
cat .dprint.jsonc | head -80

Repository: kjanat/dreamcli

Length of output: 2146


🏁 Script executed:

# Search for dprint version specifications
rg "dprint" --type json --type lock

Repository: kjanat/dreamcli

Length of output: 3272


🏁 Script executed:

# Check if there's a package.json or similar that might specify dprint version
git ls-files | grep -E "(package\.json|Cargo\.toml|dprint\.lock|\.tool-versions|\.nvmrc)"

Repository: kjanat/dreamcli

Length of output: 213


Aye, hold yer horses on that ruff plugin—it won't set sail with this dprint version.

The ruff-0.7.8.wasm requires dprint v0.54.0 or later, but yer project be locked at v0.53.2. Upgrade dprint to 0.54.0+ in package.json or the whole rigging goes down. Prettier 0.67.1 be fine, but the ruff addition? Dead in the water without the dprint bump.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.dprint.jsonc around lines 62 - 63, The ruff plugin
"https://plugins.dprint.dev/ruff-0.7.8.wasm" requires dprint >= 0.54.0 but the
project is pinned to v0.53.2; update the dprint version in package.json (the
"dprint" dependency or devDependency) to ">=0.54.0" (preferably the latest
compatible release), reinstall/update lockfile (npm/yarn/pnpm) so the new dprint
is used, then verify .dprint.jsonc still references the ruff plugin URL and run
dprint to confirm the plugin loads.

/.bucket/
.playwright-mcp/
__pycache__
.*_cache No newline at end of file
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

Avast! Ye be missin' the final newline, ye scallywag!

POSIX text files ought to end with a newline character, or Git'll be grumblin' at ye. Add a blank line after this last entry to keep yer repo shipshape.

🏴‍☠️ Fix to add the missin' newline
 .*_cache
+
📝 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
.*_cache
.*_cache
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore at line 235, The .gitignore entry ".*_cache" is missing a
trailing newline; open the file and add a single newline character after the
final line (after the ".*_cache" entry) so the file ends with a POSIX-compliant
newline.

Comment on lines +11 to +15
"formatter": [
{ "language_server": { "name": "dprint" } },
// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

The formatter fallback chain be clever, though that comment be a wee bit salty.

Havin' the LSP as primary with CLI fallback be a solid defensive pattern. However, that comment on line 13 be usin' rather... colorful language fer a config file that might get shared or copied. Consider softenin' it to somethin' like "which occasionally misbehaves" if ye want to keep things professional-like.

That said, it's yer local editor config, so I won't be hoistin' the black flag over it.

🏴‍☠️ Optional: Tame the salty language
 	"formatter": [
 		{ "language_server": { "name": "dprint" } },
-		// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
+		// Fallback to the dprint CLI in case the LSP misbehaves
 		{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
 	],
📝 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
"formatter": [
{ "language_server": { "name": "dprint" } },
// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
],
"formatter": [
{ "language_server": { "name": "dprint" } },
// Fallback to the dprint CLI in case the LSP misbehaves
{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.zed/settings.json around lines 11 - 15, Replace the salty inline comment in
the "formatter" array (the line between the language_server { "name": "dprint" }
entry and the external fallback entry) with a professional phrasing such as
"which occasionally misbehaves" so the config remains defensive (LSP primary,
CLI fallback) but uses neutral language; leave the "formatter" structure, the
language_server name "dprint" and the external command/arguments for the CLI
fallback unchanged.

Comment on lines +154 to +155
<span class="divider" />

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

Give the divider proper menu semantics, matey.

At Line 154, the divider sits inside role="menu" as a plain span. Use a semantic separator role so assistive tech treats it correctly.

Patch
-				<span class="divider" />
+				<span class="divider" role="separator" aria-orientation="vertical" />
📝 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
<span class="divider" />
<span class="divider" role="separator" aria-orientation="vertical" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/.vitepress/theme/components/SettingsGear.vue` around lines 154 -
155, The divider currently rendered as <span class="divider" /> inside the
element with role="menu" needs proper menu semantics: replace or augment the
span so it exposes role="separator" (and include aria-orientation="vertical" or
"horizontal" as appropriate for the menu layout) so assistive tech recognizes it
as a menu separator; locate the divider in SettingsGear.vue (the element with
class "divider" inside the role="menu") and update its attributes to
role="separator" and the appropriate aria-orientation.

Comment on lines +1 to +11
:root {
--npm-color: #cb3837;
--github-color: #181717;
--jsr-color: oklch(78.9% 0.154 211.53);
}

:root.dark {
--npm-color: #cb3837;
--github-color: #f0f0f0;
--jsr-color: #f7df1e;
}
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 | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if VitePress or project has documented browser support requirements

# Look for browserslist config or browser support docs
fd -t f 'browserslist|\.browserslistrc' 
rg -n 'browser.*support|supported.*browser' --type md -g '!node_modules' -C2

Repository: kjanat/dreamcli

Length of output: 41


🏁 Script executed:

# Check the full CSS file
cat -n apps/docs/.vitepress/theme/custom.css

Repository: kjanat/dreamcli

Length of output: 1032


🏁 Script executed:

# Check project configuration for browser support hints
head -50 package.json

Repository: kjanat/dreamcli

Length of output: 2017


🏁 Script executed:

# Look for .browserslistrc, .babelrc, or tsconfig browser targets
find . -maxdepth 2 -type f \( -name ".browserslistrc" -o -name "babel.config.*" -o -name "tsconfig.json" -o -name ".babelrc*" \)

Repository: kjanat/dreamcli

Length of output: 74


🏁 Script executed:

# Check VitePress config for any browser target specifications
fd -t f vite.config -o vitePressConfig -o vitepress.config

Repository: kjanat/dreamcli

Length of output: 208


🏁 Script executed:

# Check tsconfig.json for browser target
cat tsconfig.json | head -30

Repository: kjanat/dreamcli

Length of output: 829


🏁 Script executed:

# Look for VitePress config files
fd -t f 'vite\.config|vitepress\.config' apps/docs

Repository: kjanat/dreamcli

Length of output: 41


🏁 Script executed:

# Check apps/docs for package.json or config
ls -la apps/docs/ | head -20

Repository: kjanat/dreamcli

Length of output: 824


🏁 Script executed:

# Check VitePress config
ls -la apps/docs/.vitepress/

Repository: kjanat/dreamcli

Length of output: 517


🏁 Script executed:

# Look for the actual config file
find apps/docs/.vitepress -maxdepth 1 -type f -name "*.ts" -o -name "*.js" -o -name "*.json"

Repository: kjanat/dreamcli

Length of output: 89


🏁 Script executed:

# Check the actual JSR color value - convert oklch to verify what it should be
# Also check what `#f7df1e` looks like
python3 << 'EOF'
# oklch(78.9% 0.154 211.53) - let's verify if it's a reasonable color for JSR
# oklch uses: lightness%, chroma, hue (in degrees)
import colorsys

# `#f7df1e` is JSR's yellow from their branding
# Let's verify what this looks like in oklch
# `#f7df1e` = RGB(247, 223, 30)
r, g, b = 247/255, 223/255, 30/255
h, s, v = colorsys.rgb_to_hsv(r, g, b)
print(f"#f7df1e - HSV: H={h*360:.1f}° S={s*100:.1f}% V={v*100:.1f}%")

# oklch(78.9% 0.154 211.53) is described as a bluish color in CSS Color Level 4
# 211.53° hue is indeed blue territory, not yellow
# This looks like the light mode color should NOT be blue
print("\noklch(78.9% 0.154 211.53) - Hue 211.53° is cyan/blue territory, not yellow")
print("Light mode JSR color (oklch) appears to be a different color than dark mode (`#f7df1e`)")
EOF

Repository: kjanat/dreamcli

Length of output: 259


🏁 Script executed:

# Convert `#f7df1e` to oklch to see what the light mode should actually be
python3 << 'EOF'
# More precise conversion to oklch
# `#f7df1e` in RGB
hex_color = "#f7df1e"
r = int(hex_color[1:3], 16) / 255
g = int(hex_color[3:5], 16) / 255
b = int(hex_color[5:7], 16) / 255

# Convert RGB to sRGB linearized
def lin_srgb(c):
    return c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4

r_lin = lin_srgb(r)
g_lin = lin_srgb(g)
b_lin = lin_srgb(b)

# Convert to XYZ
x = r_lin * 0.4124 + g_lin * 0.3576 + b_lin * 0.1805
y = r_lin * 0.2126 + g_lin * 0.7152 + b_lin * 0.0722
z = r_lin * 0.0193 + g_lin * 0.1192 + b_lin * 0.9505

# Convert XYZ to Lab
epsilon = 0.008856
kappa = 903.3

fy = y / 1.0
fx = x / 0.95047
fz = z / 1.08883

if fy > epsilon:
    fy = fy ** (1/3)
else:
    fy = (kappa * fy + 16) / 116

if fx > epsilon:
    fx = fx ** (1/3)
else:
    fx = (kappa * fx + 16) / 116

if fz > epsilon:
    fz = fz ** (1/3)
else:
    fz = (kappa * fz + 16) / 116

l = 116 * fy - 16
a = 500 * (fx - fy)
b_val = 200 * (fy - fz)

# Convert Lab to LCH
import math
c = math.sqrt(a**2 + b_val**2)
h = math.degrees(math.atan2(b_val, a))
if h < 0:
    h += 360

print(f"#f7df1e in oklch should be approximately:")
print(f"oklch({l:.1f}% {c:.3f} {h:.2f})")
print(f"\nBut the code has: oklch(78.9% 0.154 211.53)")
print(f"These are NOT the same color!")
EOF

Repository: kjanat/dreamcli

Length of output: 201


Arr! That JSR color be dead wrong in light mode, ye scallywag!

The oklch() color on line 4 ain't matchin' the dark mode yellow at all! Ye be usin' oklch(78.9% 0.154 211.53) (a sickly bluish hue with barely any punch), when it should be oklch(88.3% 84.846 96.09) to match the #f7df1e yellow from dark mode.

The JSR branding be yellow in both modes, savvy? But right now, yer light mode visitors be seein' a blue icon while dark mode folk see the proper yellow. That be inconsistent branding, and that be wrong.

Either convert the dark mode #f7df1e to proper oklch format, or keep both in hex for consistency. But don't be leavin' completely different colors in each mode!

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/.vitepress/theme/custom.css` around lines 1 - 11, The --jsr-color
values are inconsistent between :root (oklch(78.9% 0.154 211.53)) and :root.dark
(`#f7df1e`); update the light-mode variable to match the dark-mode yellow branding
by replacing the oklch value with the correct oklch equivalent (oklch(88.3%
84.846 96.09)) or alternatively use the same hex (`#f7df1e`) for both --jsr-color
entries so the JSR color is identical across light and dark themes; edit the
--jsr-color in :root to one of these consistent values.

@@ -0,0 +1 @@
preview = 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 | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify Ruff version is pinned in project dependencies

# Check package.json for Ruff pinning (might be in devDependencies or catalog)
echo "=== Searchin' for Ruff in package.json manifests ==="
fd -e json 'package.json' --exec jq -r 'select(.devDependencies.ruff or .dependencies.ruff or .catalog.ruff) | {file: input_filename, ruff: (.devDependencies.ruff // .dependencies.ruff // .catalog.ruff)}'

# Check for Python requirements files
echo -e "\n=== Searchin' for Ruff in Python requirements ==="
fd -e txt 'requirements' --exec grep -H "ruff" {} \;

# Check for pyproject.toml dependencies
echo -e "\n=== Searchin' for Ruff in pyproject.toml ==="
fd 'pyproject.toml' --exec grep -A2 "ruff" {} \;

# Check bun.lockb for resolved Ruff version (if using Bun package manager)
echo -e "\n=== Checkin' if bun.lock exists ==="
fd -t f 'bun.lockb'

Repository: kjanat/dreamcli

Length of output: 245


🏁 Script executed:

#!/bin/bash
# Identify project structure and dependency management

echo "=== Root-level config/lock files ==="
ls -la | grep -E '\.(lock|txt|toml|yaml|yml|json)$|^-.*\.(lock|txt|toml|yaml|yml|json)' || echo "None found with pattern matching"
find . -maxdepth 1 -type f \( -name "*.lock*" -o -name "*requirements*" -o -name "pyproject.toml" -o -name "package.json" -o -name "poetry.lock" -o -name "Pipfile*" -o -name "uv.lock" \) | head -20

echo -e "\n=== Checking for README documentation ==="
fd -i 'readme' . -maxdepth 1 -exec head -50 {} \;

echo -e "\n=== Search for Ruff invocations in codebase ==="
rg -i "ruff" --type-list | head -5
rg -i "ruff" . --max-count=10

echo -e "\n=== Check if ruff.toml is the only config file added in this PR ==="
git ls-files --others --exclude-standard | grep -E '\.(toml|ini|yaml|yml)$' || echo "No untracked config files"

Repository: kjanat/dreamcli

Length of output: 1796


🏁 Script executed:

#!/bin/bash
# Check package.json for Ruff and understand project dependencies

echo "=== Full package.json contents ==="
cat package.json

echo -e "\n=== Search bun.lock for any Ruff entries ==="
grep -i "ruff" bun.lock || echo "No Ruff found in bun.lock"

echo -e "\n=== Search for Ruff in GitHub Actions / CI workflows ==="
find . -path "./.git" -prune -o -name "*.yml" -o -name "*.yaml" | xargs grep -l "ruff" 2>/dev/null || echo "No Ruff in CI workflows"

echo -e "\n=== Check if any Python files exist in project ==="
fd -e py -e pyi . | head -20 || echo "No Python files found"

echo -e "\n=== Verify ruff.toml is actually being used ==="
rg "ruff" --type sh --type yaml --type toml . | head -20 || echo "No references to ruff in config/script files"

Repository: kjanat/dreamcli

Length of output: 3472


🏁 Script executed:

#!/bin/bash
# Check git history for ruff.toml and examine the Python file

echo "=== Git log for ruff.toml (recent commits) ==="
git log --oneline -20 -- ruff.toml || echo "Not in git history"

echo -e "\n=== Check if ruff.toml was added in this specific branch ==="
git diff HEAD~1 -- ruff.toml 2>/dev/null || git status -- ruff.toml 2>/dev/null || echo "Cannot determine status"

echo -e "\n=== Examine the Python file that exists in project ==="
cat "skills/cli-creation/scripts/scaffold_cli.py"

echo -e "\n=== Check if there are any Makefile or setup scripts referencing Ruff ==="
fd -e makefile -e mk -e sh . | xargs grep -l "ruff" 2>/dev/null || echo "No Ruff in makefiles/scripts"

Repository: kjanat/dreamcli

Length of output: 12086


Arrr, ye've got a phantom config file there, matey!

The ruff.toml file be sittin' in yer repo with nary a purpose. Ruff ain't declared as a dependency anywhere (not in package.json, not in bun.lock, not in yer ci pipeline), and this be a JavaScript/TypeScript project usin' Biome for linting, not Ruff. The Python file in skills/cli-creation/scripts/scaffold_cli.py be just a scaffold generator—not actual code that needs linting.

Unless ye be plannin' to actively add Ruff as a dev dependency and invoke it in CI, remove this file entirely. Dead configuration just clutters the ship and confuses the crew.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ruff.toml` at line 1, Remove the unused ruff configuration file (ruff.toml)
from the repository because Ruff is not declared as a dependency or used in CI
for this JavaScript/TypeScript project; delete the ruff.toml file entirely (do
not add it back) unless you intend to add Ruff as a dev dependency and wire it
into CI—if you do plan to use Ruff, instead add it to package.json/bun.lock and
update CI, otherwise simply remove ruff.toml to avoid dead config and confusion
(note: the Python scaffold at skills/cli-creation/scripts/scaffold_cli.py does
not require Ruff).

Replace node:child_process and node:fs with Bun shell ($) and
Bun.file/write/spawn in paths.ts and build-meta-descriptions.ts.
Pipe dprint via stdin instead of temp files. Resolve package
paths through import.meta.resolve for correctness in monorepo.

Also: fix Zed biome code-action keys (source. prefix), add
*.ts/*.js to dprint associations, bump @typescript/native-preview,
add dreamcli-docs tsconfig path mapping.
@coderabbitai coderabbitai bot added area: cli CLI dispatch, planning, root UX, or plugins and removed kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX area: schema Schema builders, schema DSL, and JSON Schema export area: build Build, CI, release automation, scripts, and packaging labels Apr 9, 2026
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: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.dprint.jsonc:
- Line 52: The repo currently enables "ruff" in .dprint.jsonc despite only
having a single helper Python script
(skills/cli-creation/scripts/scaffold_cli.py); either remove the "ruff" entry
from .dprint.jsonc to avoid adding unnecessary Python tooling, or keep it
intentionally by adding a minimal pyproject.toml (or README note) declaring ruff
configuration and scope so the linting is justified; locate the "ruff" key in
.dprint.jsonc and apply one of these two fixes.

In @.zed/settings.json:
- Around line 11-14: The fallback formatter entry currently calls the bare
"dprint" executable while the language_server formatter for "dprint" is routed
through "bunx"; update the external formatter entry so it invokes bunx (e.g.,
change the external { "command": "dprint", ... } to use "bunx" as the command
and pass "dprint", "fmt", "--stdin", "{buffer_path}" as arguments) so both the
language_server (name "dprint") and the external formatter use the same bundled
tool path.

In `@apps/docs/.vitepress/data/paths.ts`:
- Around line 10-11: The current dreamcliRoot calculation uses
fileURLToPath(import.meta.resolve(...)) followed by .split('/src/')[0], which
breaks on Windows; change it to derive the package root via the package.json
path instead: keep dreamcliPackageJson =
fileURLToPath(import.meta.resolve('@kjanat/dreamcli/package.json')) and set
dreamcliRoot by calling path.dirname(dreamcliPackageJson) (import dirname or use
path.dirname) so path handling is platform-neutral; update any uses of
dreamcliRoot accordingly (references: dreamcliRoot, dreamcliPackageJson,
fileURLToPath, import.meta.resolve).
- Around line 35-38: The try-catch currently returns the unawaited promise from
$`git rev-parse HEAD`.text(), so rejections escape the catch; change the code to
await the process inside the try (e.g., const s = await $`git rev-parse
HEAD`.text(); return s.trim();), keep the catch returning 'HEAD', and ensure the
enclosing function is declared async so the await is valid.

In `@apps/docs/package.json`:
- Around line 23-25: Update the three npm script entries "build", "dev", and
"preview" to remove the redundant "@next" suffix from the vitepress invocation;
replace occurrences of "vitepress@next" with just "vitepress" in those script
values so the workspace lockfile override is relied upon (i.e., change the
"build", "dev", and "preview" script command strings to call "vitepress" without
"@next").
🪄 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: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: d980de0b-7166-4ad8-b452-baf05baba907

📥 Commits

Reviewing files that changed from the base of the PR and between 7ab02ec and 400100a.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • .dprint.jsonc
  • .zed/settings.json
  • apps/docs/.vitepress/data/examples.ts
  • apps/docs/.vitepress/data/paths.ts
  • apps/docs/.vitepress/data/typedoc.ts
  • apps/docs/package.json
  • package.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
{package.json,pyproject.toml,setup.py,Cargo.toml,go.mod,pom.xml,build.gradle,VERSION}

📄 CodeRabbit inference engine (Custom checks)

If any source code files (excluding tests, docs, CI, markdown, or comments-only changes) are modified, a version field MUST be updated in one of the following files if present in the repo: package.json, pyproject.toml, setup.py, Cargo.toml, go.mod, pom.xml, build.gradle, or a VERSION file

Files:

  • package.json
**/*.{ts,tsx,js,jsx,json,md,mjs,cjs}

📄 CodeRabbit inference engine (AGENTS.md)

Use tabs for indentation

Use LF (Unix-style) line endings

Files:

  • package.json
  • apps/docs/package.json
🧠 Learnings (4)
📓 Common learnings
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 10
File: AGENTS.md:122-123
Timestamp: 2026-04-08T13:09:11.245Z
Learning: In repository kjanat/dreamcli, Bun's `--filter` flag auto-compresses log output to approximately 10 lines per ran command, while `--cwd` is treated as a regular command invocation with full log output. Both are used intentionally in root `package.json` scripts for different use cases: `--filter` for concise/summary output, `--cwd` for verbose/full output.
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:43.353Z
Learning: Do not hand-edit `dreamcli.schema.json` or `src/core/json-schema/meta-descriptions.generated.ts`; these are generated files
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:43.353Z
Learning: Do not edit `apps/docs/.vitepress/dist/` or `apps/docs/.vitepress/cache/`; these are build artifacts
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:43.353Z
Learning: Do not treat `apps/docs/.vitepress/data/` as docs-only; scripts import it for generated source and docs artifacts
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:43.353Z
Learning: Do not replace `bun run gh-project:*` commands with ad hoc GitHub project mutations
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:52.971Z
Learning: Do not patch generated example or reference pages; edit the source in repo-root `examples/` or `.vitepress/data/` instead
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:52.971Z
Learning: Assume docs code is not isolated from source generation; code in `scripts/build-meta-descriptions.ts` may import docs files
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:59.792Z
Learning: Do not edit generated docs pages when the source of truth is an example file
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:59.792Z
Learning: Do not let examples drift into pseudo-internal usage that real consumers cannot copy
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:59.792Z
Learning: Do not treat `.cache/` as source or generate docs from cached content
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:24:59.792Z
Learning: `examples/gh/` is a real workspace package that is typechecked and tested separately in CI, so edits carry real consumer signal
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/cli/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:12.866Z
Learning: Orchestrate execution pipeline through `planner.ts` module, shared with testkit via `execution/` layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/completion/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:21.347Z
Learning: Each per-shell generator should receive `CLISchema` and `CompletionOptions`, call `walkCommandTree()`, and emit shell-specific functions (one per command node)
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/completion/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:21.347Z
Learning: Handle nested command groups such that `mycli db migrate` generates completions for each depth level
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:33.937Z
Learning: Help text must be generated from schema metadata; keep formatting rules derived, not duplicated per caller
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:33.937Z
Learning: Do not pull TTY or color logic into help formatting; that belongs in output layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:33.937Z
Learning: Do not special-case caller behavior when schema metadata already expresses it
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:33.937Z
Learning: Do not simplify wrapping or padding logic without checking narrow alignment regressions in tests
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:42.892Z
Learning: Regenerate descriptions from `meta-descriptions.generated.ts` using the build script at `../../../../../scripts/build-meta-descriptions.ts`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:42.892Z
Learning: Ensure the package-level schema artifact `dreamcli.schema.json` is emitted at the root during build from this module's surface
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/output/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:25:56.000Z
Learning: Maintain acyclic dependency graph: `writer.ts` <- `contracts.ts` <- `activity.ts` <- `index.ts` -> `writer.ts`, with `renderers.ts` and `display-value.ts` consumed by `index.ts`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/parse/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:02.285Z
Learning: Keep tokenizer schema-agnostic; resolve/default/env/config behavior belongs elsewhere
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/parse/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:02.285Z
Learning: Do not read env, config, prompts, or defaults in the parse layer; that is `resolve/`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/parse/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:02.285Z
Learning: Do not blur tokenization and parsing responsibilities to simplify a small change
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:08.095Z
Learning: Prompting should be a pluggable engine architecture, not hard-wired terminal code
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:16.565Z
Learning: Implement value resolution in strict precedence order: CLI argv -> environment variable -> config file -> interactive prompt -> default value
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:16.565Z
Learning: Use two-pass architecture: Pass 1 collects CLI/env/config, interactive resolver invoked if command has `.interactive()`, Pass 2 resolves prompts/defaults/validation
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:16.565Z
Learning: Test coverage should be aspect-split across 10+ test files covering resolution precedence, environment variables, config paths, prompts, interactive mode, error aggregation, args, stdin, contracts, and property paths
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:21.508Z
Learning: Maintain separation between schema-dsl module and schema/ module - schema-dsl layers on top of schema and should not create circular dependencies
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:21.508Z
Learning: Ensure compile-time and runtime parsing paths agree - strings that type-check must produce correct runtime behavior
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:31.821Z
Learning: Implement `FlagKind` union variant additions by: adding to union in flag.ts, creating factory method on FlagBuilder, updating InferFlag conditional type, wiring through resolve/coerce.ts, and adding tests
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:31.821Z
Learning: Import prompt types directly from `core/prompt/` in consumer modules, bypassing the barrel export to avoid circular dependencies
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:31.821Z
Learning: Define activity types in `activity.ts` rather than in output/ because `Out` interface in CommandBuilder needs them in the `action()` method signature
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:38.742Z
Learning: Execution pipeline is shared with CLI via `execution/index.ts` which is marked `internal`
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:50.025Z
Learning: `ExitError` is thrown by `adapter.exit()` and caught by the CLI dispatch layer
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T09:26:50.025Z
Learning: The runtime module is a multi-file platform abstraction layer that imports `WriteFn` from `core/output/` and `ReadFn` from `core/prompt/`
📚 Learning: 2026-04-06T11:32:59.137Z
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 9
File: .zed/settings.json:49-52
Timestamp: 2026-04-06T11:32:59.137Z
Learning: In kjanat/dreamcli, do not treat the `.zed/settings.json` → `.attw.json` JSON-schema reference (the gist URL owned/controlled by repo maintainer kjanat) as a fragile external dependency. Assume the gist is intentionally maintained by the maintainer and do not recommend moving the schema to the repo or to a “more stable” location in this file.

Applied to files:

  • .zed/settings.json
📚 Learning: 2026-04-08T13:09:11.245Z
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 10
File: AGENTS.md:122-123
Timestamp: 2026-04-08T13:09:11.245Z
Learning: In repository kjanat/dreamcli, Bun's `--filter` flag auto-compresses log output to approximately 10 lines per ran command, while `--cwd` is treated as a regular command invocation with full log output. Both are used intentionally in root `package.json` scripts for different use cases: `--filter` for concise/summary output, `--cwd` for verbose/full output.

Applied to files:

  • package.json
📚 Learning: 2026-04-07T08:45:53.051Z
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 9
File: package.json:121-129
Timestamp: 2026-04-07T08:45:53.051Z
Learning: When reviewing package.json `devEngines`, do not treat EBADDEVENGINES warnings as a breaking issue if the block intentionally uses Bun (e.g., `{ "name": "bun" }`) and the corresponding `onFail` values are soft (`onFail: "warn"` or `onFail: "ignore"`). npm may consider `bun` an invalid/unsupported engine name and warn, but with these `onFail` settings it won’t hard-fail—so the intent should be respected unless `onFail` is set to `fail` or similar hard-failure behavior.

Applied to files:

  • package.json
  • apps/docs/package.json
🔇 Additional comments (4)
.dprint.jsonc (4)

62-63: This ruff plugin still be stuck in the doldrums, cap'n—same issue as before!

The past review already flagged this: ruff-0.7.8.wasm requires dprint v0.54.0 or later, but the project be reported locked at v0.53.2. Unless ye've bumped the dprint version in package.json since that comment, this plugin won't load and yer formatting voyage ends in Davy Jones' locker.

#!/bin/bash
# Description: Check the dprint version specified in package.json files
# Expect: dprint version >= 0.54.0 for ruff-0.7.8 compatibility

echo "=== Searching for dprint version in package.json files ==="
fd -e json -g "package.json" --exec grep -l "dprint" {} \; 2>/dev/null | head -5 | xargs -I{} sh -c 'echo "File: {}"; cat {} | grep -A2 -B2 "dprint"'

echo ""
echo "=== Checking devDependencies for dprint ==="
fd -g "package.json" -d 2 --exec cat {} \; | grep -E '"dprint"' | head -5

12-12: Arr, these path updates be ship-shape for the monorepo voyage!

The exclusion patterns be correctly updated from docs/** to apps/docs/** across biome, markdown, and markup formatters. This keeps prettier handlin' the README and docs markdown whilst biome tackles the TypeScript seas. The new *.ts.tpl, *.ts, *.js additions to biome be proper seamanship.

Also applies to: 16-16, 26-26


50-50: Aye, the prettier globs be castable wider nets now.

**/docs/**/*.md will catch apps/docs/**/*.md just fine since ** matches any path depth includin' apps/. The consistency with exclusions be maintained. A clever bit of glob-work, this be.


53-53: Blimey, this exclusion be proper treasure!

Addin' **/*.schema.json to the excludes aligns perfectly with the repo's generated artifacts policy. The schema files be auto-generated and shouldn't be reformatted by dprint's meddlin' hooks. This perfectionist be extremely pleased with this attention to detail!

"associations": ["**/README.md", "**/docs/**/*.md", "**/.vitepress/twoslash/*.ts"]
},
"excludes": ["**/node_modules", "**/{*-,bun}lock(.*)?", "**/snapshots"],
"ruff": { "preview": true, "indentWidth": 4 },
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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Search for Python files that would be formatted by ruff
# Expect: Python files (.py, .pyi) if ruff configuration is warranted

echo "=== Python files in repository ==="
fd -e py -e pyi --type f

echo ""
echo "=== Count of Python files ==="
fd -e py -e pyi --type f | wc -l

Repository: kjanat/dreamcli

Length of output: 170


Ruff configuration stands, but with shallow Python waters ahead

Aye, ye've got Python files in this ship (skills/cli-creation/scripts/scaffold_cli.py), but 'tis but a single scaffolding script, not a full hold of Python cargo. Before ye weigh anchor with this ruff configuration, consider whether one wee helper script be worth the extra tooling weight. If this be the main Python file in sight, ye may be over-rigged for the haul.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.dprint.jsonc at line 52, The repo currently enables "ruff" in .dprint.jsonc
despite only having a single helper Python script
(skills/cli-creation/scripts/scaffold_cli.py); either remove the "ruff" entry
from .dprint.jsonc to avoid adding unnecessary Python tooling, or keep it
intentionally by adding a minimal pyproject.toml (or README note) declaring ruff
configuration and scope so the linting is justified; locate the "ruff" key in
.dprint.jsonc and apply one of these two fixes.

Comment on lines +11 to +14
"formatter": [
{ "language_server": { "name": "dprint" } },
// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
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

🧩 Analysis chain

🏁 Script executed:

cat -n .zed/settings.json | head -50

Repository: kjanat/dreamcli

Length of output: 1989


Hoist the same colors on both masts, ye scallywag.

Line 14 still calls bare dprint while the dprint LSP config at lines 42-47 channels it through bunx. If a deckhand lacks a global dprint installed, yer fallback formatter'll sink while the LSP sails smooth. Keep both paths pointin' at the bundled tool.

⚙️ Suggested fix
 	"formatter": [
 		{ "language_server": { "name": "dprint" } },
 		// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
-		{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
+		{ "external": { "command": "bunx", "arguments": ["dprint", "fmt", "--stdin", "{buffer_path}"] } }
 	],
📝 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
"formatter": [
{ "language_server": { "name": "dprint" } },
// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
{ "external": { "command": "dprint", "arguments": ["fmt", "--stdin", "{buffer_path}"] } }
"formatter": [
{ "language_server": { "name": "dprint" } },
// Fallback to the dprint CLI in case the lsp fucks up, which it does sometimes for some reason...
{ "external": { "command": "bunx", "arguments": ["dprint", "fmt", "--stdin", "{buffer_path}"] } }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.zed/settings.json around lines 11 - 14, The fallback formatter entry
currently calls the bare "dprint" executable while the language_server formatter
for "dprint" is routed through "bunx"; update the external formatter entry so it
invokes bunx (e.g., change the external { "command": "dprint", ... } to use
"bunx" as the command and pass "dprint", "fmt", "--stdin", "{buffer_path}" as
arguments) so both the language_server (name "dprint") and the external
formatter use the same bundled tool path.

Comment on lines +23 to +25
"build": "bunx --bun vitepress@next build",
"dev": "bunx --bun vitepress@next dev",
"preview": "bunx --bun vitepress@next preview",
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

🧩 Analysis chain

🏁 Script executed:

cat -n apps/docs/package.json

Repository: kjanat/dreamcli

Length of output: 1565


🏁 Script executed:

# Check if there's a bun lock file to see how `@next` versions are locked
cd apps/docs && find . -maxdepth 2 -name "bun.lock*" -o -name "package-lock.json" -o -name "yarn.lock" | head -20

Repository: kjanat/dreamcli

Length of output: 41


🏁 Script executed:

# Check the root workspace to understand catalog versioning
find . -maxdepth 2 -name "package.json" | head -5 | xargs grep -l "catalog"

Repository: kjanat/dreamcli

Length of output: 73


🏁 Script executed:

# Check the root package.json to see the catalog definitions
head -100 ./package.json | cat -n

Repository: kjanat/dreamcli

Length of output: 3882


🏁 Script executed:

# Search for vitepress version in the catalog or devDependencies
rg "vitepress" ./package.json -A 1 -B 1

Repository: kjanat/dreamcli

Length of output: 603


🏁 Script executed:

# Check the file encoding and line endings
file apps/docs/package.json
# Check for actual indentation characters
od -c apps/docs/package.json | head -50

Repository: kjanat/dreamcli

Length of output: 142


🏁 Script executed:

# Verify if the scripts would actually use the overridden vitepress@next or install fresh
# Check how bun resolves bunx with explicit version when overrides exist
rg "bunx.*vitepress" apps/docs/package.json

Repository: kjanat/dreamcli

Length of output: 196


🏁 Script executed:

# Check if there are any other scripts or configs that reference vitepress versions
rg "vitepress" apps/docs --type json

Repository: kjanat/dreamcli

Length of output: 545


🏁 Script executed:

# Search for bun.lock or bun lockfile to understand actual resolved versions
find . -name "bun.lock*" -o -name ".bun" | head -10

Repository: kjanat/dreamcli

Length of output: 69


🏁 Script executed:

# Let's check the bun.lock file to see what vitepress versions are actually locked
head -100 bun.lock | rg -i "vitepress" -A 2 -B 2

Repository: kjanat/dreamcli

Length of output: 405


🏁 Script executed:

# Let's get more context about the bun.lock to understand vitepress resolution
rg "vitepress" bun.lock | head -20

Repository: kjanat/dreamcli

Length of output: 6536


🏁 Script executed:

# Check if there's any documentation or comments in the workspace about vitepress@next usage
rg -i "vitepress.*next" . --type md --type ts --type js 2>/dev/null | head -20

Repository: kjanat/dreamcli

Length of output: 41


🏁 Script executed:

# Double-check the override behavior - does it truly pin the lockfile?
rg "\"vitepress\":" bun.lock | grep -v "vitepress/" | head -5

Repository: kjanat/dreamcli

Length of output: 1063


🏁 Script executed:

# Check if bun respects overrides when using bunx with explicit `@next`
# Let's verify the exact resolution by looking at the bun documentation or behavior
rg -i "override" . --type md | head -10

Repository: kjanat/dreamcli

Length of output: 957


🏁 Script executed:

# Let's also check git history or comments explaining why `@next` is used
git log --oneline -n 20 -- apps/docs/package.json 2>/dev/null || echo "Git history not available"

Repository: kjanat/dreamcli

Length of output: 117


Strip the @next suffix from the VitePress scripts—it's redundant.

The root workspace override already forces vitepress@next into the lockfile, so the explicit @next in these commands adds no value. Drop it for consistency with how other workspace packages resolve through catalog:, and let the lock file do its job cleanly.

📦 Suggested fix
-		"build": "bunx --bun vitepress@next build",
-		"dev": "bunx --bun vitepress@next dev",
-		"preview": "bunx --bun vitepress@next preview",
+		"build": "bunx --bun vitepress build",
+		"dev": "bunx --bun vitepress dev",
+		"preview": "bunx --bun vitepress preview",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/package.json` around lines 23 - 25, Update the three npm script
entries "build", "dev", and "preview" to remove the redundant "@next" suffix
from the vitepress invocation; replace occurrences of "vitepress@next" with just
"vitepress" in those script values so the workspace lockfile override is relied
upon (i.e., change the "build", "dev", and "preview" script command strings to
call "vitepress" without "@next").

Consolidate all project path constants in paths.ts and re-export
them — config.ts and source-artifacts.ts now import instead of
recomputing. Replace Bun.$`git …` with synchronous execSync and
normalize() so paths resolve without runtime async or Bun APIs.
Make gitRef synchronous (no reason for it to be a promise).
@coderabbitai coderabbitai bot added kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX area: schema Schema builders, schema DSL, and JSON Schema export area: build Build, CI, release automation, scripts, and packaging and removed area: cli CLI dispatch, planning, root UX, or plugins labels Apr 9, 2026
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.

♻️ Duplicate comments (1)
apps/docs/.vitepress/data/paths.ts (1)

13-25: ⚠️ Potential issue | 🟠 Major

These shared paths be still Windows-hostile.

normalize() gives rootDir platform separators, then these template literals shove / back in. That yields mixed paths like C:\repo/packages/dreamcli, and the startsWith(${packageRoot}/src/) check in apps/docs/.vitepress/vite-plugins/source-artifacts.ts Lines 69-75 stops matching, so schema rebuilds never fire on Windows.

⚓ Proposed fix
-import { normalize } from 'node:path';
+import { join, normalize } from 'node:path';
@@
-export const rootTsconfigPath = `${rootDir}/tsconfig.json`;
-export const docsRoot = `${rootDir}/apps/docs`;
-export const examplesRoot = `${rootDir}/examples/standalone`;
-export const packageRoot = `${rootDir}/packages/dreamcli`;
-export const packageJsonPath = `${packageRoot}/package.json`;
-export const packageDenoJsonPath = `${packageRoot}/deno.json`;
-export const tsconfigPath = `${packageRoot}/tsconfig.json`;
-export const definitionSchemaPath = `${packageRoot}/dreamcli.schema.json`;
-export const emitDefinitionSchemaPath = `${packageRoot}/scripts/emit-definition-schema.ts`;
-export const symbolPagesRoot = `${docsRoot}/reference/symbols`;
-export const generatedMetaSchemaDescriptionsPath = `${packageRoot}/src/core/json-schema/meta-descriptions.generated.ts`;
-export const toolsRoot = `${rootDir}/tools`;
-export const skillsRoot = `${rootDir}/skills`;
+export const rootTsconfigPath = join(rootDir, 'tsconfig.json');
+export const docsRoot = join(rootDir, 'apps', 'docs');
+export const examplesRoot = join(rootDir, 'examples', 'standalone');
+export const packageRoot = join(rootDir, 'packages', 'dreamcli');
+export const packageJsonPath = join(packageRoot, 'package.json');
+export const packageDenoJsonPath = join(packageRoot, 'deno.json');
+export const tsconfigPath = join(packageRoot, 'tsconfig.json');
+export const definitionSchemaPath = join(packageRoot, 'dreamcli.schema.json');
+export const emitDefinitionSchemaPath = join(packageRoot, 'scripts', 'emit-definition-schema.ts');
+export const symbolPagesRoot = join(docsRoot, 'reference', 'symbols');
+export const generatedMetaSchemaDescriptionsPath = join(
+	packageRoot,
+	'src',
+	'core',
+	'json-schema',
+	'meta-descriptions.generated.ts',
+);
+export const toolsRoot = join(rootDir, 'tools');
+export const skillsRoot = join(rootDir, 'skills');

As per coding guidelines, "Do not treat apps/docs/.vitepress/data/ as docs-only; scripts import it for generated source and docs artifacts."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/.vitepress/data/paths.ts` around lines 13 - 25, The exported path
constants (rootTsconfigPath, docsRoot, examplesRoot, packageRoot,
packageJsonPath, packageDenoJsonPath, tsconfigPath, definitionSchemaPath,
emitDefinitionSchemaPath, symbolPagesRoot, generatedMetaSchemaDescriptionsPath,
toolsRoot, skillsRoot) are constructed with string template literals that force
POSIX separators and produce mixed paths on Windows; replace those
template-literal constructions with platform-safe joins (use Node's
path.join/path.resolve or equivalent) so each constant is built via
path.join(rootDir, '...') or path.join(packageRoot, '...') to ensure consistent
separators and allow checks like startsWith(`${packageRoot}/src/`) to work
cross-platform. Ensure you import the path module where this file is defined and
update all exported constants to use path.join/path.resolve rather than
hardcoded "/" in template strings.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@apps/docs/.vitepress/data/paths.ts`:
- Around line 13-25: The exported path constants (rootTsconfigPath, docsRoot,
examplesRoot, packageRoot, packageJsonPath, packageDenoJsonPath, tsconfigPath,
definitionSchemaPath, emitDefinitionSchemaPath, symbolPagesRoot,
generatedMetaSchemaDescriptionsPath, toolsRoot, skillsRoot) are constructed with
string template literals that force POSIX separators and produce mixed paths on
Windows; replace those template-literal constructions with platform-safe joins
(use Node's path.join/path.resolve or equivalent) so each constant is built via
path.join(rootDir, '...') or path.join(packageRoot, '...') to ensure consistent
separators and allow checks like startsWith(`${packageRoot}/src/`) to work
cross-platform. Ensure you import the path module where this file is defined and
update all exported constants to use path.join/path.resolve rather than
hardcoded "/" in template strings.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: a55fe51d-8ca3-4fd7-8356-c2eb2263b518

📥 Commits

Reviewing files that changed from the base of the PR and between 400100a and 75e5170.

📒 Files selected for processing (3)
  • apps/docs/.vitepress/config.ts
  • apps/docs/.vitepress/data/paths.ts
  • apps/docs/.vitepress/vite-plugins/source-artifacts.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
apps/docs/.vitepress/data/**/*

📄 CodeRabbit inference engine (AGENTS.md)

Do not treat apps/docs/.vitepress/data/ as docs-only; scripts import it for generated source and docs artifacts

Files:

  • apps/docs/.vitepress/data/paths.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: kjanat
Repo: kjanat/dreamcli PR: 10
File: AGENTS.md:122-123
Timestamp: 2026-04-08T13:09:11.245Z
Learning: In repository kjanat/dreamcli, Bun's `--filter` flag auto-compresses log output to approximately 10 lines per ran command, while `--cwd` is treated as a regular command invocation with full log output. Both are used intentionally in root `package.json` scripts for different use cases: `--filter` for concise/summary output, `--cwd` for verbose/full output.
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:24:55.057Z
Learning: Do not replace `bun run gh-project:*` commands with ad hoc GitHub project mutations
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:24:55.057Z
Learning: Schema-first, fully typed TypeScript CLI framework design with zero runtime dependencies
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:24:55.057Z
Learning: Core runtime stays agnostic; host I/O goes through `RuntimeAdapter`, `WriteFn`, or `ReadFn` abstractions
Learnt from: CR
URL: 
File: AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:24:55.057Z
Learning: Read `DISCOVERIES.md` before planning, editing, or running task workflows
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:03.020Z
Learning: Do not patch generated example/reference pages - edit the real source in repo-root `examples/` or `.vitepress/data/` instead
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:03.020Z
Learning: Root `dreamcli.schema.json` is required for docs and must be copied into site output during build
Learnt from: CR
URL: 
File: apps/docs/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:03.020Z
Learning: Do not assume docs code is isolated from source generation - `scripts/build-meta-descriptions.ts` imports docs code
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:08.389Z
Learning: Do not edit generated docs pages when the source of truth is an example file; always edit the example source instead
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:08.389Z
Learning: Do not let examples drift into pseudo-internal usage that real consumers cannot copy
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:08.389Z
Learning: Do not treat `.cache/` as source during example development
Learnt from: CR
URL: 
File: examples/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:08.389Z
Learning: Do not bloat single-file examples with walkthrough-only complexity; move complex features to `examples/gh`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/cli/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:15.900Z
Learning: Orchestrate the execution pipeline in `planner.ts` and share it with testkit via `execution/`
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/cli/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:15.900Z
Learning: Create comprehensive test coverage across 16 test files covering core dispatch, help, errors, version, JSON mode, TTY detection, middleware, subcommand dispatch, default commands, nesting, completions, config discovery, flag propagation, plugin system, package.json integration, execution planning, and runtime preflight setup
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/completion/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:24.114Z
Learning: Walk command tree to generate `CommandNode[]` array using shared infrastructure, then pass to per-shell generators which receive `CLISchema` and `CompletionOptions` parameters and emit shell-specific functions for each command node depth level
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/completion/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:24.114Z
Learning: Handle nested command groups by generating completions for each depth level (e.g., `mycli db migrate` generates completions at each command level)
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/help/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:38.164Z
Learning: Help text must be generated from schema metadata; keep formatting rules derived, not duplicated per caller
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:45.091Z
Learning: Build-time schema description data must come from docs data modules, not hand-maintained constants
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/json-schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:25:45.091Z
Learning: Ensure the root `dreamcli.schema.json` artifact is emitted during the build process
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/parse/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:02.133Z
Learning: Keep tokenizer schema-agnostic; resolve/default/env/config behavior belongs elsewhere
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/parse/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:02.133Z
Learning: Do not blur tokenization and parsing responsibilities to simplify a small change
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:09.379Z
Learning: The prompt module must be a pluggable engine with terminal and test prompter implementations, not hard-wired terminal code
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:09.379Z
Learning: The prompt module must import `schema/prompt.ts` directly; this direct edge is intentional
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:09.379Z
Learning: Prompt engines must be stateless per `promptOne()` call
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/prompt/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:09.379Z
Learning: Choice merging must happen before the engine sees config; engines should not infer enum choices themselves
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:21.461Z
Learning: Maintain resolution order chain: CLI argv -> environment variable -> config file -> interactive prompt -> default value. Each source is tried in order; first non-undefined wins.
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:21.461Z
Learning: Implement two-pass architecture for flag resolution: Pass 1 collects CLI -> env -> config values. Pass 2 (after optional interactive resolver) handles prompt -> default -> required validation for remaining unresolved flags
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/resolve/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:21.461Z
Learning: Use `ResolveOptions` to inject all dependencies (env, config, prompter, answers) into resolve functions rather than having functions touch `process` directly
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:27.404Z
Learning: The schema-dsl module should depend on the schema module (importing flag, arg, and command builders) but not create circular dependencies
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema-dsl/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:27.404Z
Learning: The schema-dsl module layers on top of the schema module — consumers define schemas as strings that are parsed into typed CommandBuilder instances at both compile-time and runtime
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:35.735Z
Learning: Prompt types are consumed directly by `core/prompt/` and `core/resolve/` modules — they bypass the barrel export in index.ts
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:35.735Z
Learning: The `.middleware()` method intentionally drops the current handler and changes the type signature — this design forces re-registration of handlers after middleware addition
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/schema/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:35.735Z
Learning: Use a multi-file module structure in `core/schema/` with separate files for command, flag, arg, activity, middleware, and prompt types — only resolve, output, and completion modules use single index.ts
Learnt from: CR
URL: 
File: packages/dreamcli/src/core/testkit/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:42.280Z
Learning: Share execution pipeline with CLI via `execution/index.ts` marked as `internal`
Learnt from: CR
URL: 
File: packages/dreamcli/src/runtime/AGENTS.md:undefined-undefined
Timestamp: 2026-04-09T11:26:52.389Z
Learning: `ExitError` should be thrown by `adapter.exit()` method and caught by the CLI dispatch layer
🔇 Additional comments (2)
apps/docs/.vitepress/config.ts (2)

62-66: Use one JSR slug source, arr.

links.jsr still comes from pkg.name, while the social link hardcodes jsr.name. Reuse links.jsr and derive it from jsr.name so these URLs cannot drift apart again.

Also applies to: 230-233


2-2: Arrr, false alarm, matey—this import be all shipshape.

The @kjanat/dreamcli/package.json export be properly configured in packages/dreamcli/package.json. The subpath ./package.json exists in the exports map, so this import sails smooth as the seas.

			> Likely an incorrect or invalid review comment.

Switch install.auto to "force" so bun install always runs on
bun run, and set linker to "hoisted" for broader tool compat.
@coderabbitai coderabbitai bot added area: cli CLI dispatch, planning, root UX, or plugins and removed kind: feature New capability or product enhancement kind: breaking Breaking API, runtime, or packaging change area: docs VitePress app, guides, reference pages, and docs UX area: schema Schema builders, schema DSL, and JSON Schema export area: build Build, CI, release automation, scripts, and packaging labels Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI dispatch, planning, root UX, or plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant