Monorepo layout: introduce apps/ for end-user surfaces (#855) - #1188
Merged
Conversation
…o codev-web
- git mv packages/vscode -> apps/vscode, packages/dashboard -> apps/web
- pnpm-workspace.yaml: add apps/*
- packages/codev build:dashboard/dev:dashboard paths -> ../../apps/web
- rename @cluesmith/codev-dashboard -> @cluesmith/codev-web (name, dep, 3 test imports)
- apps/vscode tsconfig extends -> ../../packages/config; repository.directory
- CI test.yml working-directories; bump-vscode.sh/bump-all.sh paths
- .vscode/{launch,tasks,settings}.json; .gitignore build-output patterns
- regenerate pnpm-lock.yaml
- arch.md: Monorepo table shows apps/ vs packages/ split + artifact-canvas row; component list, diagrams, tree, dashboard-dist source path -> apps/web - CLAUDE.md + AGENTS.md: area/dashboard label package-name citation -> codev-web (kept byte-identical; label name + Dashboard concept unchanged per Decision 3)
…t, doc comments Caught by post-rename repo-wide grep sweep: - apps/vscode/scripts/publish.sh: self-referential usage paths - codev/protocols/release/protocol.md: release git-add cmd + CHANGELOG path (packages/vscode -> apps/vscode; other packages/* untouched) - docs/releases/UNRELEASED.md + template: vscode CHANGELOG instruction - lessons-learned.md: [From 823] path citation - default-branch.ts + architect-pane-layout.test.ts: source/test comment refs
…ming consistency Lone workspace member missing the codev- infix. Private package, consumed only via relative tsconfig extends (never by name) → name/docs-only change, zero runtime blast radius. Build (full tsc) + codev tests green.
…ard in CI, fix docs - Verified apps/vscode typechecks+bundles from new location (check-types + compile green) - Add check-types step to vscode CI job (closes the untypechecked-in-CI gap) - Fix arch.md vscode marketplace name: codev -> codev-vscode (cluesmith.codev-vscode) - Fix review How to Test Locally: per-package commands; check-types as tsconfig-fix proof
amrmelsayed
added a commit
that referenced
this pull request
Jul 16, 2026
amrmelsayed
added a commit
that referenced
this pull request
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIR Review: Introduce
apps/for end-user surfacesFixes #855
Summary
Adopted an
apps/vspackages/split so end-user client surfaces are adiscoverable peer set distinct from shared libraries. Moved
packages/vscode→apps/vscodeandpackages/dashboard→apps/web(with a package rename@cluesmith/codev-dashboard→@cluesmith/codev-web), addedapps/*to theworkspace glob, and fixed every operational reference to the old paths. Two
consistency fixes landed alongside at the reviewer's request: the package rename
above, and
@cluesmith/config→@cluesmith/codev-config(the lone workspacemember that broke the
@cluesmith/codev-*convention). The five shared libraries(
codev,core,types,config,artifact-canvas) stay inpackages/.Files Changed
283 files changed (+507 / -189). The bulk (257) are pure
git mvrenames ofthe two package trees (history preserved —
git log --followworks across therename). The substantive edits:
Content-modified (23):
pnpm-workspace.yaml(+2) — addapps/*pnpm-lock.yaml— regenerated importer keyspackages/codev/package.json(+3/-3) —build:dashboard/dev:dashboardpaths →../../apps/web;@cluesmith/codev-webdeppackages/config/package.json(+1/-1) — name →@cluesmith/codev-configapps/web/package.json,apps/vscode/package.json— name /repository.directoryapps/vscode/tsconfig.json,apps/vscode/tsconfig.webview.json—extends→../../packages/config/...apps/vscode/scripts/publish.sh— self-referential usage pathspackages/codev/src/__tests__/filePathLinkProvider.test.ts,.../open-files-shells-section.test.ts—@cluesmith/codev-web/lib/*import specifierspackages/codev/src/lib/default-branch.ts,.../e2e/architect-pane-layout.test.ts,packages/core/src/review-markers.ts— comment path refs.github/workflows/test.yml—working-directory→apps/web,apps/vscodescripts/bump-vscode.sh,scripts/bump-all.sh— vscode paths.vscode/launch.json,.vscode/tasks.json,.vscode/settings.json,.gitignore— build-output pathsCLAUDE.md,AGENTS.md(byte-identical) —area/dashboardlabel package-name citationcodev/resources/arch.md— Monorepo Structure (apps/ vs packages/ + artifact-canvas row), tree, diagrams,dashboard-distsource pathcodev/resources/lessons-learned.md— new Architecture lesson (this PR)codev/protocols/release/protocol.md,docs/releases/UNRELEASED.md+ template — release runbook vscode pathsAdded (3): the plan, this review, and
codev/state/pir-855_thread.md.Commits
9e2cc6b5[PIR Monorepo layout: introduce apps/ for end-user surfaces #855] Rename @cluesmith/config -> @cluesmith/codev-config for naming consistencydf1fcdba[PIR Monorepo layout: introduce apps/ for end-user surfaces #855] Update remaining path refs: release runbook, publish script, doc commentsc4e8876e[PIR Monorepo layout: introduce apps/ for end-user surfaces #855] Update builder thread: implement phase loga57fe07b[PIR Monorepo layout: introduce apps/ for end-user surfaces #855] Update arch.md + CLAUDE/AGENTS for apps/ layout7f57a7ff[PIR Monorepo layout: introduce apps/ for end-user surfaces #855] Move vscode+dashboard to apps/; rename dashboard package to codev-web89ae5464,fefa4325,5587aad1,ec65235c)Test Results
pnpm build: ✓ pass (fulltscacross all packages +build:dashboard+ skeleton copy)types/confighave no test scripts). All skips pre-existing.dashboard-dist),pnpm buildregenerated the SPA via the correctedcd ../../apps/webpath;npm packconfirmed all 4dashboard-dist/files ship in the publishable tarball; runtime serve path (tower-server.ts:301 → ../../../dashboard-dist) is unchanged (codev never moved).@cluesmith/codevstill embeds the web UI exactly as before.worktree.devCommandconfigured, so noafx devserver).See Flaky Tests below for the integration/CLI/e2e suites.
Architecture Updates
COLD
codev/resources/arch.md— updated (commita57fe07b). The MonorepoStructure section now documents the
apps/(end-user surfaces) vspackages/(shared libraries) split, adds the missing
artifact-canvasrow, and correctsthe directory tree, architecture diagrams, and the
dashboard-distsource path.HOT
codev/resources/arch-critical.md— no change needed. The hot tier is atits 10-fact cap, and its map already carries "Monorepo Structure — consult when
adding a package or build wiring," which points at the updated cold section. The
apps/ split is a navigational/structural fact, not a per-decision invariant that
warrants displacing an existing hot fact.
Lessons Learned Updates
COLD
codev/resources/lessons-learned.md— added one Architecture entry[From #855]capturing the non-obvious insight: in a pnpm monorepo packagemove, the breakage surface is relative filesystem paths (build-script
cd,tsconfig
extends, CIworking-directory, gitignore globs), not the packagegraph (
workspace:*/publish key off the name, so they survivegit mv); and apackage consumed only via a relative path has a name that is dead metadata
(pnpm-lock doesn't record it), which is both why renaming
@cluesmith/configwaszero-risk and why its name had drifted from convention unnoticed.
HOT
codev/resources/lessons-critical.md— no change needed. The existing hotlesson "After any rename or framework change, grep the whole repo across BOTH
codev/ and codev-skeleton/ before claiming 'all fixed'" already covers the
top-level discipline; the #855 entry is a spec-narrow sharpening that belongs in
the cold reference.
Things to Look At During PR Review
packages/codev/package.jsonbuild:dashboard— the one edit with realruntime consequence. Only the
cdtarget changed (../dashboard→../../apps/web); the../../packages/codev/dashboard-distcopy destination isunchanged because
apps/websits at the same depth-2 from root aspackages/dashboarddid. Verified end-to-end (see Test Results).dev-approval gate on reviewer request — the
codev-webpackage rename (Decision2, always in-plan) and the
@cluesmith/config→@cluesmith/codev-configrename(added mid-gate; recorded in the plan's "Files to Change" note and the thread).
change only. The
area/dashboardlabel,dashboard-distbuild identifier,DashboardStatetype, and product/UI copy are intentionally untouched.Retiring "Dashboard" → "Web" globally was explicitly deferred as a separate issue.
codev/specs|plans|reviews|projects|state|maintain,codev/projectlist.md, and shippeddocs/releases/v*still reference old pathsby design (point-in-time records); only live references were updated.
How to Test Locally
pir-855→ Review Diffpnpm install && pnpm build && pnpm testfrom the worktree — greenpackages/codev/dashboard-dist/populates after build (index.html + assets)git log --follow apps/web/package.jsonshows history across the renamegrep -rn "packages/dashboard\|packages/vscode" <live files>returns nothingoutside historical records
Flaky Tests
None skipped — but the environment-sensitive suites surfaced pre-existing
failures unrelated to this change (my diff's only non-test
packages/codev/srcedit is a single comment line in
default-branch.ts; these suites exercise PTYspawning, network, and port-binding — code paths this PR never touches):
vitest.e2e.config.ts): 3 failures, flaky — runs 1and 2 failed on different tests, all with
POST /api/terminals → 500(node-pty/shellper failing to spawn under concurrent local load). Non-determinism
across runs on identical code = environmental. Passes on CI's isolated runners.
vitest.cli.config.ts): 1 failure —adopt.e2e.test.ts › with existing CLAUDE.md preserves ittimes out at 30s(a timeout on the network/merge-heavy adopt path in a sandboxed env, not a
content assertion; operates on an isolated temp project, not the repo's CLAUDE.md).
webServerbinds port 4100(
reuseExistingServer: true) against a non-isolatedglobal.db, so running itmid-session would risk the live Tower. CI-appropriate only.
porch's gate
testscheck (the codev unit suite) is green; these suites are notpart of the gate checks.