Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Sep 5, 2025

Summary by CodeRabbit

  • New Features

    • Dev container now supports optional local Baseplate extension and documentation mounts via environment variables, auto-configured on initialization.
    • Adds Prisma and a local extension to the default VS Code extensions.
    • Enables Emacs-style keybindings in the integrated shell.
  • Documentation

    • Expanded devcontainer guide: local extension/docs workflows, tooling/versioning examples, VS Code extensions, and domain allow-listing.
    • Overhauled Baseplate Documentation guidance and added Development Server MCP usage and workflows.
  • Chores

    • Added ignores for devcontainer mounts and pnpm store.
    • Sample env variables provided; permissions updated to allow local docs directory.

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2025

⚠️ No Changeset found

Latest commit: 23eeefb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Sep 5, 2025

Walkthrough

Adds devcontainer initialization via a new setup-mounts script, introduces optional local mounts for a Baseplate extension and docs, updates devcontainer settings and README, tweaks shell keybindings, extends VS Code extensions, updates .env.example, augments .gitignore, adds a docs permissions entry, and expands CLAUDE.md.

Changes

Cohort / File(s) Summary
Devcontainer initialization and mounts
/.devcontainer/devcontainer.json, /.devcontainer/setup-mounts.sh, /.devcontainer/README.md
Adds initializeCommand to run setup-mounts.sh; binds local extension.vsix and docs mounts; documents local extension/docs workflows; removes node_modules volume guidance and chown step.
Shell keybindings
/.devcontainer/.zshrc
Enables Emacs keybindings via bindkey -e to align with autosuggest accept mapping.
Environment examples
/.env.example
Adds commented examples for BASEPLATE_DEV_EXTENSION_PATH and BASEPLATE_DEV_DOCS_PATH; ensures trailing newline.
Git ignore updates
/.gitignore
Ignores .pnpm-store and /.devcontainer/mounts.
Claude settings
/.claude/settings.json
Adds top-level permissions.additionalDirectories: ["~/baseplate-docs"].
Documentation overhaul
/CLAUDE.md
Reworks Baseplate documentation section; adds local docs structure, MCP fallback, and development server MCP usage details and examples.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer Host
  participant VC as VS Code Devcontainer
  participant Init as initializeCommand (setup-mounts.sh)
  participant FS as .devcontainer/mounts
  participant Cnt as Container

  Dev->>VC: Open repo in Dev Container
  VC->>Init: Run setup-mounts.sh
  Init->>Init: Load .env (BASEPLATE_DEV_EXTENSION_PATH / BASEPLATE_DEV_DOCS_PATH)
  Init->>FS: Ensure mounts dir
  alt Extension path valid
    Init->>FS: Symlink mounts/extension.vsix -> local path
  else
    Init->>FS: Create empty mounts/extension.vsix
  end
  alt Docs path valid
    Init->>FS: Symlink mounts/docs -> local docs (…/docs)
  else
    Init->>FS: Create mounts/docs directory
  end
  Init-->>VC: "Mount setup completed successfully"
  VC->>Cnt: Start container with bind mounts to /home/vscode/baseplate-*
  VC->>Cnt: Install extensions (incl. Prisma, local VSIX)
  Note over Cnt: Post-create commands proceed unchanged
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kingston/eng-862-incorporate-baseplate-docs-mcp-and-baseplate-extension-into

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link

vercel bot commented Sep 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
baseplate-project-builder-web Ready Ready Preview Comment Sep 5, 2025 3:21pm

@kingston kingston merged commit 0770931 into main Sep 5, 2025
10 of 11 checks passed
@kingston kingston deleted the kingston/eng-862-incorporate-baseplate-docs-mcp-and-baseplate-extension-into branch September 5, 2025 15:27
Copy link

@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)
.devcontainer/README.md (1)

12-13: Fix volume docs to match actual mounts

Node modules aren’t persisted anymore; update the bullet to avoid confusion.

Apply this diff:

-- **Persistent volumes** for pnpm cache, node_modules, and command history
+- **Persistent volumes** for pnpm cache and command history
🧹 Nitpick comments (11)
.gitignore (1)

107-109: Make directory ignores explicit

Use trailing slashes to signal directories. Functionally equivalent but clearer.

-# Dev Container files
-.pnpm-store
-/.devcontainer/mounts
+# Dev Container files
+.pnpm-store/
+/.devcontainer/mounts/
.devcontainer/.zshrc (1)

19-21: Bind autosuggest in the intended keymap

Ensure the binding targets the Emacs map regardless of future keymap changes.

-bindkey -e
-bindkey '^E' autosuggest-accept
+bindkey -e
+bindkey -M emacs '^E' autosuggest-accept
.env.example (1)

21-27: Clarify expected file types/locations

Call out that the extension path should point to a .vsix file; clarify that the docs path is the repo root.

-# Path to local Baseplate VS Code extension for development (optional)
-# Uncomment and set to your local extension path to mount it in the dev container
-# BASEPLATE_DEV_EXTENSION_PATH=/path/to/your/local/baseplate-extension
+# Path to a local Baseplate VS Code extension package (.vsix) for development (optional)
+# Uncomment and set to your local .vsix file to mount it in the dev container
+# BASEPLATE_DEV_EXTENSION_PATH=/path/to/baseplate-extension.vsix
@@
-# Path to local Baseplate documentation repository for development (optional)
-# Uncomment and set to your local baseplate-docs repo path to mount it in the dev container
-# BASEPLATE_DEV_DOCS_PATH=/path/to/your/local/baseplate-docs
+# Path to local baseplate-docs repository root for development (optional)
+# Uncomment and set to your local baseplate-docs repo path to mount it in the dev container
+# BASEPLATE_DEV_DOCS_PATH=/path/to/your/local/baseplate-docs
.devcontainer/setup-mounts.sh (2)

20-31: Use forceful, idempotent symlink creation; keep placeholder predictable

ln -sfn avoids leftover links. Keeping an empty file is fine for a stable mount source.

-# Handle BASEPLATE_DEV_EXTENSION_PATH
-if [ -n "$BASEPLATE_DEV_EXTENSION_PATH" ] && [ -f "$BASEPLATE_DEV_EXTENSION_PATH" ]; then
+# Handle BASEPLATE_DEV_EXTENSION_PATH
+if [ -n "${BASEPLATE_DEV_EXTENSION_PATH:-}" ] && [ -f "$BASEPLATE_DEV_EXTENSION_PATH" ]; then
     echo "Linking extension from: $BASEPLATE_DEV_EXTENSION_PATH"
-    if [ -e "$MOUNTS_DIR/extension.vsix" ] || [ -L "$MOUNTS_DIR/extension.vsix" ]; then
-        rm -rf "$MOUNTS_DIR/extension.vsix"
-    fi
-    ln -s "$BASEPLATE_DEV_EXTENSION_PATH" "$MOUNTS_DIR/extension.vsix"
+    ln -sfn "$BASEPLATE_DEV_EXTENSION_PATH" "$MOUNTS_DIR/extension.vsix"
     echo "Extension linked to: $MOUNTS_DIR/extension.vsix"
 else
     echo "BASEPLATE_DEV_EXTENSION_PATH not set or file doesn't exist, creating empty extension.vsix"
-    touch "$MOUNTS_DIR/extension.vsix"
+    : > "$MOUNTS_DIR/extension.vsix"
 fi

33-44: Link the docs repo root, not a docs/ subfolder

Mounting the repo root is more flexible (tools can access configs, scripts, etc.). If you truly only need the docs subdir, feel free to ignore.

-# Handle BASEPLATE_DEV_DOCS_PATH
-if [ -n "$BASEPLATE_DEV_DOCS_PATH" ] && [ -d "$BASEPLATE_DEV_DOCS_PATH" ]; then
+# Handle BASEPLATE_DEV_DOCS_PATH
+if [ -n "${BASEPLATE_DEV_DOCS_PATH:-}" ] && [ -d "$BASEPLATE_DEV_DOCS_PATH" ]; then
     echo "Linking docs from: $BASEPLATE_DEV_DOCS_PATH"
-    if [ -e "$MOUNTS_DIR/docs" ] || [ -L "$MOUNTS_DIR/docs" ]; then
-        rm -rf "$MOUNTS_DIR/docs"
-    fi
-    ln -s "$BASEPLATE_DEV_DOCS_PATH/docs" "$MOUNTS_DIR/docs"
+    ln -sfn "$BASEPLATE_DEV_DOCS_PATH" "$MOUNTS_DIR/docs"
     echo "Docs linked to: $MOUNTS_DIR/docs"
 else
     echo "BASEPLATE_DEV_DOCS_PATH not set or directory doesn't exist, creating empty docs directory"
     mkdir -p "$MOUNTS_DIR/docs"
 fi

If you adopt this, ensure devcontainer.json mounts ${localWorkspaceFolder}/.devcontainer/mounts/docs to /home/vscode/baseplate-docs (no trailing /docs). I can open a follow-up patch if helpful.

.devcontainer/README.md (1)

167-171: Shell continuation bug in example

Inline comments after a trailing backslash break the continuation. Move the comment to its own line.

Suggested edit:

for domain in \
    "registry.npmjs.org" \
    # Add your domain here
    "your-new-domain.com" \
    # ... other domains
.devcontainer/devcontainer.json (2)

23-26: Guard against invalid local VSIX installs

If BASEPLATE_DEV_EXTENSION_PATH isn’t set, setup-mounts.sh creates an empty file. VS Code may error trying to install an empty VSIX.

Please verify container startup with no .env overrides on macOS and Windows. If it fails, remove the static VSIX entry and install conditionally. Minimal change:

-        "Prisma.prisma",
-        "/home/vscode/baseplate-extension/extension.vsix"
+        "Prisma.prisma"

Then document manual/local install steps in README (e.g., “Install from VSIX…”).


2-2: Name polish (optional)

Consider a more descriptive devcontainer name, e.g., “Baseplate Dev”.

-  "name": "Ubuntu",
+  "name": "Baseplate Dev",
CLAUDE.md (3)

304-306: Tighten phrasing

Minor wording improvement.

Apply this diff:

-If `~/baseplate-docs` is not accessible, use the baseplate-docs MCP server:
+If `~/baseplate-docs` is inaccessible, use the baseplate-docs MCP server:

311-316: Normalize command list formatting

Use code formatting for action names and add periods for consistency.

Apply this diff:

-**Document Retrieval:**
+**Document Retrieval:**
 
-- get-document - Retrieve full document content by URI (format: documents://collection-name/path/to/doc.md)
-- get-document-by-id - Retrieve document by its Outline ID
-- list-documents - List documents with optional filters
+- `get-document` — Retrieve full document content by URI (format: `documents://collection-name/path/to/doc.md`).
+- `get-document-by-id` — Retrieve document by its Outline ID.
+- `list-documents` — List documents with optional filters.

317-333: Consistency for “Search Tools” and “Usage Examples”

Same punctuation/formatting cleanup.

Apply this diff:

-**Search Tools:**
+**Search Tools:**
 
-- search-documents - Semantic search returning full documents
-- search-rag-documents - RAG search returning specific document chunks
+- `search-documents` — Semantic search returning full documents.
+- `search-rag-documents` — RAG search returning specific document chunks.

-**Usage Examples:**
+**Usage Examples:**
 
-- Find specific info: search-rag-documents with query "how to configure authentication"
-- Browse content: list-documents with collection filter
-- Read document: get-document with URI like "documents://design-docs/completed/auth-plugin-refactor.md"
+- Find specific info: `search-rag-documents` with query “how to configure authentication.”
+- Browse content: `list-documents` with collection filter.
+- Read document: `get-document` with URI like `documents://design-docs/completed/auth-plugin-refactor.md`.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b719540 and 23eeefb.

📒 Files selected for processing (8)
  • .claude/settings.json (1 hunks)
  • .devcontainer/.zshrc (1 hunks)
  • .devcontainer/README.md (2 hunks)
  • .devcontainer/devcontainer.json (2 hunks)
  • .devcontainer/setup-mounts.sh (1 hunks)
  • .env.example (1 hunks)
  • .gitignore (1 hunks)
  • CLAUDE.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

Use kebab-case for file names

Files:

  • CLAUDE.md
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-03T17:01:46.369Z
Learning: Use the Baseplate Docs MCP for up-to-date project information; add descriptions when creating documents
📚 Learning: 2025-09-03T17:01:46.369Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-03T17:01:46.369Z
Learning: Use the Baseplate Docs MCP for up-to-date project information; add descriptions when creating documents

Applied to files:

  • CLAUDE.md
🪛 LanguageTool
CLAUDE.md

[style] ~304-~304: Consider using “inaccessible” to avoid wordiness.
Context: ...CP (Fallback) If ~/baseplate-docs is not accessible, use the baseplate-docs MCP server: **...

(NOT_ABLE_PREMIUM)


[grammar] ~308-~308: There might be a mistake here.
Context: ...aseplate-docs**: Baseplate documentation - design-docs: Design documentation **D...

(QB_NEW_EN)


[grammar] ~313-~313: There might be a mistake here.
Context: ...uments://collection-name/path/to/doc.md) - get-document-by-id - Retrieve document b...

(QB_NEW_EN)


[grammar] ~314-~314: There might be a mistake here.
Context: ...id - Retrieve document by its Outline ID - list-documents - List documents with opt...

(QB_NEW_EN)


[grammar] ~319-~319: There might be a mistake here.
Context: ...Semantic search returning full documents - search-rag-documents - RAG search return...

(QB_NEW_EN)


[grammar] ~324-~324: There might be a mistake here.
Context: ...cument - Replace entire document content - inline-edit - Make specific edits within...

(QB_NEW_EN)


[grammar] ~325-~325: There might be a mistake here.
Context: ... - Make specific edits within a document - create-document - Create new document in...

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Lint
🔇 Additional comments (4)
.devcontainer/setup-mounts.sh (1)

1-47: initializeCommand correctly set to execute setup-mounts.sh on host
devcontainer.json (line 59) uses "initializeCommand": "./.devcontainer/setup-mounts.sh", ensuring the mount script runs on the host as intended.

.devcontainer/devcontainer.json (1)

49-54: Confirm cross-platform bind behavior for initializeCommand + mounts

initializeCommand runs on the host. On Windows (non-WSL), running a Bash script and creating symlinks may fail and break the bind paths.

Run a quick check on Windows:

  • Ensure setup-mounts.sh executes (via Git Bash/WSL).
  • Confirm .devcontainer/mounts/extension.vsix and docs resolve correctly before container creation.
  • If not, gate the local mounts behind existence checks or provide a PowerShell variant.
CLAUDE.md (2)

274-301: LGTM: Local docs preferred, MCP as fallback matches team guidance

Prioritizing ~/baseplate-docs with MCP fallback reflects the learning to use the Baseplate Docs MCP while encouraging local performance.


276-281: Path alignment check

Doc references ~/baseplate-docs, while the devcontainer mounts to /home/vscode/baseplate-docs (which expands from ~ in-container). This is consistent. Keep it that way; ensure README uses the same path.

Comment on lines +16 to 19
},
"permissions": {
"additionalDirectories": ["~/baseplate-docs"]
}
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Prefer absolute path over ~ expansion

Some tools don’t expand ~ in JSON configs. Align with the devcontainer mount target.

-  "permissions": {
-    "additionalDirectories": ["~/baseplate-docs"]
-  }
+  "permissions": {
+    "additionalDirectories": ["/home/vscode/baseplate-docs"]
+  }

To confirm what paths are actually used, check devcontainer.json for the docs mount:


🏁 Script executed:

#!/bin/bash
rg -nC2 -g '.devcontainer/devcontainer.json' 'mounts|baseplate-docs|extension.vsix|initializeCommand'

Length of output: 250


🏁 Script executed:

#!/bin/bash
# Locate any devcontainer.json and inspect for baseplate-docs mounts
find . -type f -name 'devcontainer.json' | while read file; do
  echo "Checking $file"
  rg -nC2 'mounts|baseplate-docs' "$file"
done

Length of output: 896


Use absolute path for baseplate-docs

In .claude/settings.json (around lines 16–19), replace "~/baseplate-docs" with "/home/vscode/baseplate-docs" to match the devcontainer bind mount:

  "permissions": {
-    "additionalDirectories": ["~/baseplate-docs"]
+    "additionalDirectories": ["/home/vscode/baseplate-docs"]
  }
📝 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
},
"permissions": {
"additionalDirectories": ["~/baseplate-docs"]
}
},
"permissions": {
"additionalDirectories": ["/home/vscode/baseplate-docs"]
}
🤖 Prompt for AI Agents
In .claude/settings.json around lines 16 to 19, the
permissions.additionalDirectories entry uses a tilde-based path which won’t
match the devcontainer bind mount; replace "~/baseplate-docs" with the absolute
path "/home/vscode/baseplate-docs" so the settings point to the
container-mounted directory.

Comment on lines +76 to +77
- `BASEPLATE_DEV_EXTENSION_PATH` - Optional path to the local Baseplate VS Code extension for development (mounted at `/baseplate-extension` in the container)
- `BASEPLATE_DEV_DOCS_PATH` - Optional path to the local Baseplate documentation repository for development (mounted at `/baseplate-docs` in the container)
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Correct mount paths and clarify what BASEPLATE_DEV_ expects*

Paths should match devcontainer.json targets and the extension expects a VSIX file, not a directory.

Apply this diff:

-- `BASEPLATE_DEV_EXTENSION_PATH` - Optional path to the local Baseplate VS Code extension for development (mounted at `/baseplate-extension` in the container)
-`- `BASEPLATE_DEV_DOCS_PATH` - Optional path to the local Baseplate documentation repository for development (mounted at `/baseplate-docs` in the container)
+`BASEPLATE_DEV_EXTENSION_PATH` - Optional path to a local Baseplate VS Code extension VSIX (mounted at `/home/vscode/baseplate-extension/extension.vsix` in the container)
+`BASEPLATE_DEV_DOCS_PATH` - Optional path to a local Baseplate documentation repository (mounted at `/home/vscode/baseplate-docs` in the container)

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .devcontainer/README.md around lines 76-77, the descriptions for
BASEPLATE_DEV_EXTENSION_PATH and BASEPLATE_DEV_DOCS_PATH are inaccurate: update
them to match the actual mount targets in devcontainer.json and clarify that
BASEPLATE_DEV_EXTENSION_PATH must point to a VSIX file (not a directory) which
will be mounted into the container at the extension target path defined in
devcontainer.json, and that BASEPLATE_DEV_DOCS_PATH should point to the local
docs repo directory mounted at the docs target path from devcontainer.json;
adjust the example values and wording accordingly so they exactly match the
devcontainer.json mount targets and explicitly state the VSIX requirement.

Comment on lines +135 to +147
### Local Extension Development

To develop the Baseplate VS Code extension alongside the main project:

1. Set the `BASEPLATE_DEV_EXTENSION_PATH` environment variable in your `.env` file at the repository root:

```bash
BASEPLATE_DEV_EXTENSION_PATH=/path/to/your/local/baseplate-extension
```

2. The extension directory will be mounted at `/baseplate-extension` in the container
3. The dev container will automatically detect and use the local extension if present

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Align “Local Extension Development” with actual behavior (VSIX vs directory + mount path)

The script mounts a VSIX at /home/vscode/baseplate-extension/extension.vsix; the README currently says a directory at /baseplate-extension.

Apply this diff:

-To develop the Baseplate VS Code extension alongside the main project:
+To develop the Baseplate VS Code extension alongside the main project:

-1. Set the `BASEPLATE_DEV_EXTENSION_PATH` environment variable in your `.env` file at the repository root:
+1. Set the `BASEPLATE_DEV_EXTENSION_PATH` environment variable in your `.env` file at the repository root (point it to a built `.vsix` file):

-   BASEPLATE_DEV_EXTENSION_PATH=/path/to/your/local/baseplate-extension
+   BASEPLATE_DEV_EXTENSION_PATH=/path/to/your/local/baseplate-extension/extension.vsix

-2. The extension directory will be mounted at `/baseplate-extension` in the container
-3. The dev container will automatically detect and use the local extension if present
+2. The VSIX will be mounted at `/home/vscode/baseplate-extension/extension.vsix` in the container
+3. The dev container will attempt to install the local VSIX if present
📝 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
### Local Extension Development
To develop the Baseplate VS Code extension alongside the main project:
1. Set the `BASEPLATE_DEV_EXTENSION_PATH` environment variable in your `.env` file at the repository root:
```bash
BASEPLATE_DEV_EXTENSION_PATH=/path/to/your/local/baseplate-extension
```
2. The extension directory will be mounted at `/baseplate-extension` in the container
3. The dev container will automatically detect and use the local extension if present
### Local Extension Development
To develop the Baseplate VS Code extension alongside the main project:
1. Set the `BASEPLATE_DEV_EXTENSION_PATH` environment variable in your `.env` file at the repository root (point it to a built `.vsix` file):
🤖 Prompt for AI Agents
In .devcontainer/README.md around lines 135 to 147, the "Local Extension
Development" section incorrectly instructs users to set
BASEPLATE_DEV_EXTENSION_PATH to a directory and claims the extension is mounted
at /baseplate-extension; update the text to say the dev workflow expects a VSIX
file, instruct users to set BASEPLATE_DEV_EXTENSION_PATH to the path of their
built VSIX (for example /path/to/baseplate-extension.vsix), and replace the line
about mounting a directory with the actual mount location used by the container
(/home/vscode/baseplate-extension/extension.vsix) and mention the container will
detect and install the VSIX if present.

Comment on lines +148 to +161
### Local Documentation Development

To work with the Baseplate documentation repository alongside the main project:

1. Set the `BASEPLATE_DEV_DOCS_PATH` environment variable in your `.env` file at the repository root:

```bash
BASEPLATE_DEV_DOCS_PATH=/path/to/your/local/baseplate-docs
```

2. The documentation directory will be mounted at `/baseplate-docs` in the container
3. You can directly edit and access documentation files during development
4. This provides better performance than using the MCP server for documentation access

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix docs mount path to match devcontainer.json

Use /home/vscode/baseplate-docs instead of /baseplate-docs.

Apply this diff:

-2. The documentation directory will be mounted at `/baseplate-docs` in the container
+2. The documentation directory will be mounted at `/home/vscode/baseplate-docs` in the container
📝 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
### Local Documentation Development
To work with the Baseplate documentation repository alongside the main project:
1. Set the `BASEPLATE_DEV_DOCS_PATH` environment variable in your `.env` file at the repository root:
```bash
BASEPLATE_DEV_DOCS_PATH=/path/to/your/local/baseplate-docs
```
2. The documentation directory will be mounted at `/baseplate-docs` in the container
3. You can directly edit and access documentation files during development
4. This provides better performance than using the MCP server for documentation access
### Local Documentation Development
To work with the Baseplate documentation repository alongside the main project:
1. Set the `BASEPLATE_DEV_DOCS_PATH` environment variable in your `.env` file at the repository root:
🤖 Prompt for AI Agents
In .devcontainer/README.md around lines 148 to 161, the documentation says the
docs directory is mounted at /baseplate-docs but devcontainer.json mounts it at
/home/vscode/baseplate-docs; update the README to use
/home/vscode/baseplate-docs wherever /baseplate-docs is referenced (step 2 and
any related instructions) so the path documented matches devcontainer.json and
the BASEPLATE_DEV_DOCS_PATH guidance.

Comment on lines +1 to +9
#!/bin/bash

# Source environment variables from ../.env if it exists
if [ -f ".env" ]; then
echo "Sourcing environment variables from .env"
source ".env"
else
echo "No .env file found, using default values"
fi
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Harden script execution and resolve paths relative to the repo

Add strict mode and resolve .env from the repo root based on the script location to avoid relying on $PWD. This also prevents silent success on errors.

-#!/bin/bash
+#!/bin/bash
+set -euo pipefail
+
+# Resolve repo root from this script's directory
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
+REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd -P)"
 
-# Source environment variables from ../.env if it exists
-if [ -f ".env" ]; then
-    echo "Sourcing environment variables from .env"
-    source ".env"
+# Source environment variables from .env at repo root if it exists
+ENV_FILE="${REPO_ROOT}/.env"
+if [ -f "${ENV_FILE}" ]; then
+    echo "Sourcing environment variables from ${ENV_FILE}"
+    set -a
+    # shellcheck disable=SC1090
+    source "${ENV_FILE}"
+    set +a
 else
     echo "No .env file found, using default values"
 fi
🤖 Prompt for AI Agents
In .devcontainer/setup-mounts.sh lines 1-9, enable strict mode and resolve .env
relative to the repository root using the script's directory so we don't depend
on $PWD; add at the top set -euo pipefail and ensure the script computes its dir
(via ${BASH_SOURCE[0]}) and uses that to locate ../.env (or the repo root)
before sourcing; if the .env is missing, print an error to stderr and exit
non-zero rather than silently continuing so failures are explicit.

Comment on lines +11 to +18
# Create mounts directory if it doesn't exist
MOUNTS_DIR="${PWD}/.devcontainer/mounts"
if [ ! -d "$MOUNTS_DIR" ]; then
echo "Creating mounts directory: $MOUNTS_DIR"
mkdir -p "$MOUNTS_DIR"
else
echo "Mounts directory already exists: $MOUNTS_DIR"
fi
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid PWD dependency for mounts dir

Derive mounts directory from the resolved repo root for robustness.

-# Create mounts directory if it doesn't exist
-MOUNTS_DIR="${PWD}/.devcontainer/mounts"
+# Create mounts directory if it doesn't exist
+MOUNTS_DIR="${REPO_ROOT}/.devcontainer/mounts"
 if [ ! -d "$MOUNTS_DIR" ]; then
     echo "Creating mounts directory: $MOUNTS_DIR"
     mkdir -p "$MOUNTS_DIR"
 else
     echo "Mounts directory already exists: $MOUNTS_DIR"
 fi
📝 Committable suggestion

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

Suggested change
# Create mounts directory if it doesn't exist
MOUNTS_DIR="${PWD}/.devcontainer/mounts"
if [ ! -d "$MOUNTS_DIR" ]; then
echo "Creating mounts directory: $MOUNTS_DIR"
mkdir -p "$MOUNTS_DIR"
else
echo "Mounts directory already exists: $MOUNTS_DIR"
fi
# Create mounts directory if it doesn't exist
MOUNTS_DIR="${REPO_ROOT}/.devcontainer/mounts"
if [ ! -d "$MOUNTS_DIR" ]; then
echo "Creating mounts directory: $MOUNTS_DIR"
mkdir -p "$MOUNTS_DIR"
else
echo "Mounts directory already exists: $MOUNTS_DIR"
fi
🤖 Prompt for AI Agents
In .devcontainer/setup-mounts.sh around lines 11 to 18, the mounts directory is
derived from PWD which can be incorrect; change it to compute the repository
root (e.g., using git rev-parse --show-toplevel or resolving the script path)
and build MOUNTS_DIR from that resolved repo root, then use mkdir -p on the new
path and keep the same logging branches; ensure fallback behavior if git is
unavailable and do not rely on $PWD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants