You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .devcontainer/CHANGELOG.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,74 @@
1
1
# CodeForge Devcontainer Changelog
2
2
3
+
## [v1.12.0] - 2026-02-18
4
+
5
+
### Added
6
+
7
+
#### Plugin README Documentation
8
+
-**9 new README files** for all marketplace plugins: auto-formatter, auto-linter, code-directive, codeforge-lsp, dangerous-command-blocker, notify-hook, protected-files-guard, ticket-workflow, workspace-scope-guard. Each documents purpose, hook lifecycle, protected patterns, and plugin structure
9
+
10
+
#### Protected Files Guard: Bash Hook
11
+
-**`guard-protected-bash.py`** — new PreToolUse/Bash hook blocking bash commands that write to protected file paths (companion to existing Edit/Write guard). Covers `>`, `>>`, `tee`, `cp`, `mv`, `sed -i` targeting `.env`, lock files, `.git`, certificates, and credentials
12
+
13
+
#### Devcontainer Secrets Declaration
14
+
-**`secrets` block** in devcontainer.json declaring `GH_TOKEN`, `NPM_TOKEN`, `GH_USERNAME`, `GH_EMAIL` with documentation URLs for VS Code Codespaces/devcontainer secret management
15
+
16
+
#### Post-Start Hook System
17
+
-**`run_poststart_hooks()`** in setup.sh — runs executable `.sh` scripts from `/usr/local/devcontainer-poststart.d/`; controlled by `SETUP_POSTSTART` env flag (default: true)
-**CLAUDE.md documentation** — full worktree section with layout, creation, detection, and compatibility details
22
+
-**setup-projects.sh** — `.worktrees/` explicit scanning at depth 3, `.git` file detection via `gitdir:` check, `"worktree"` tag in Project Manager
23
+
-**protected-files-guard** — `.git` regex updated from `\.git/` to `\.git(/|$)` to cover worktree `.git` pointer files
24
+
25
+
#### Other
26
+
-**`CLAUDECODE=null` env var** — unsets the detection flag in `remoteEnv` to allow nested Claude Code sessions (claude-in-claude)
27
+
-**Go runtime option** — commented-out `ghcr.io/devcontainers/features/go:1` entry in devcontainer.json for easy opt-in
28
+
29
+
### Changed
30
+
31
+
#### Feature Version Pinning
32
+
- All local features pinned from `"latest"` to explicit versions: agent-browser `0.11.1`, ast-grep `0.40.5`, biome `2.4.2`, ruff `0.15.1`, pyright `1.1.408`, typescript-language-server `5.1.3`, TypeScript `5.9.3`
33
+
- External features pinned to minor versions: node `1.6`, github-cli `1.0`, docker-outside-of-docker `1.7`, uv `1.0`, rust `1.4`, claude-code `1.1`
34
+
35
+
#### Default Shell: bash → zsh
36
+
- VS Code terminal default profile changed from bash to zsh
37
+
- Explicit `zsh` profile added to terminal profile list
38
+
- Claude Teams tmux profile shell changed from bash to zsh
39
+
40
+
#### Security Hardening
41
+
-**dangerous-command-blocker** — 7 new blocked patterns: Docker container escape (`--privileged`, host root mount), destructive Docker ops (`stop/rm/kill/rmi`), bare force push (no branch specified), `find -exec rm`, `find -delete`, `git clean -f`, `rm -rf ../`. JSON parse failures now fail closed (exit 2 instead of 0)
-**ccms build cache** — install.sh checks `.build-cache/bin/ccms` before cargo building; caches binary after first build for faster rebuilds; pinned to commit `f90d259a4476`
46
+
-**setup.sh** — `setup-update-claude.sh` now runs in background (non-blocking container start); script failure output displayed for diagnostics; new `background` status indicator in summary
47
+
-**inotify-tools moved to build time** — tmux feature installs inotify-tools via apt at build; setup-projects.sh no longer attempts runtime apt-get install
48
+
-**Container memory** — recommended from 4GB/8GB to 6GB/12GB in troubleshooting docs
49
+
50
+
#### Writing System Prompt
51
+
- New **Emotional Architecture** section — cognitive-emotional loop, controlled emotion principle, autism framing for POV characters
52
+
- Expanded metaphor guidance — secondary sources beyond primary domain, "would he think this?" test
53
+
- Refined show-don't-tell rules — naming emotion permitted when it adds weight, brief internal processing after major events required
54
+
- Character profile additions — emotional architecture and trigger fields
55
+
56
+
#### Other
57
+
-**connect-external-terminal.ps1** — tmux session directory respects `WORKSPACE_ROOT` env var with fallback
58
+
-**setup-projects.sh** — inotifywait exclude pattern narrowed from `\.git/` to `\.git` for worktree compatibility
59
+
-**README.md** — 5 new badges (changelog, last commit, npm downloads, Node.js, issues), updated tool/feature/skill counts, added Rust/Bun/ccw, changelog section
Copy file name to clipboardExpand all lines: .devcontainer/CLAUDE.md
+73-3Lines changed: 73 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
49
49
|`claude`| Run Claude Code with auto-configuration (prefers native binary at `~/.local/bin/claude`) |
50
50
|`cc`| Shorthand for `claude` with config |
51
51
|`ccraw`| Vanilla Claude Code without any config (bypasses function override) |
52
-
|`ccw`|Shorthand for `claude`with writing system prompt |
52
+
|`ccw`|Claude Code with the writing system prompt — uses `writing-system-prompt.md` instead of `main-system-prompt.md`, optimized for creative and technical writing tasks|
`ghcr.io/devcontainers/features/node`, `ghcr.io/devcontainers/features/github-cli`, `ghcr.io/devcontainers/features/docker-outside-of-docker`, `ghcr.io/devcontainers/features/go` (all official Microsoft features)
114
114
115
115
**External features without `version: "none"` support:**
|`setup-symlink-claude.sh`| Symlinks ~/.claude for third-party tool compatibility |
143
145
144
146
### External Terminal
@@ -148,6 +150,8 @@ Scripts in `./scripts/` run via `postStartCommand`:
148
150
.devcontainer/connect-external-terminal.sh
149
151
```
150
152
153
+
On Windows, use `connect-external-terminal.ps1` (PowerShell equivalent).
154
+
151
155
## Installed Plugins
152
156
153
157
Plugins are declared in `config/defaults/settings.json` under `enabledPlugins` and auto-activated on container start:
@@ -163,7 +167,7 @@ Plugins are declared in `config/defaults/settings.json` under `enabledPlugins` a
163
167
-`protected-files-guard@devs-marketplace` — Blocks edits to secrets/lock files
164
168
-`auto-formatter@devs-marketplace` — Batch-formats edited files at Stop (Ruff for Python, Biome for JS/TS/CSS/JSON/GraphQL/HTML; also supports shfmt, dprint, gofmt, rustfmt when installed)
165
169
-`auto-linter@devs-marketplace` — Auto-lints edited files at Stop (Pyright + Ruff for Python, Biome for JS/TS/CSS/GraphQL; also supports ShellCheck, hadolint, go vet, clippy when installed)
-`workspace-scope-guard@devs-marketplace` — Blocks writes and warns on reads outside the working directory
168
172
169
173
### Local Marketplace
@@ -223,6 +227,64 @@ Key environment variables set in the container:
223
227
|`GH_CONFIG_DIR`|`/workspaces/.gh`|
224
228
|`ANTHROPIC_MODEL`|`claude-opus-4-6`|
225
229
|`TMPDIR`|`/workspaces/.tmp`|
230
+
|`CLAUDECODE`|`null` (unset) |
231
+
232
+
Setting `"CLAUDECODE": null` in `remoteEnv` unsets this variable inside the container, which allows nested Claude Code sessions (claude-in-claude) that would otherwise be blocked by the outer session's detection flag.
233
+
234
+
All setup steps are controlled by boolean flags in `.devcontainer/.env`. Set any to `false` to disable:
-`setup-projects.sh` scans `.worktrees/` directories at depth 3 (inside container dirs like `projects/`)
280
+
- Worktrees are detected by their `.git` file (containing `gitdir:`) and tagged with both `"git"` and `"worktree"` in Project Manager
281
+
- Each worktree appears as an independent project in VS Code Project Manager
282
+
283
+
### Compatibility
284
+
285
+
-`workspace-scope-guard` resolves worktree paths correctly via `os.path.realpath()`
286
+
-`protected-files-guard` protects both `.git/` directories and `.git` files (worktree pointers)
287
+
- Read-only agents (e.g., git-archaeologist) can use `git worktree list` but cannot add/remove worktrees
226
288
227
289
## Modifying Behavior
228
290
@@ -232,3 +294,11 @@ Key environment variables set in the container:
232
294
4.**Add a custom config file**: Add an entry to `config/file-manifest.json` with `src`, `dest`, and optional `overwrite`/`destFilename`
233
295
5.**Add features**: Add to `"features"` in `devcontainer.json`
234
296
6.**Disable auto-setup**: Set variables to `false` in `.env`
297
+
298
+
## Rules System
299
+
300
+
Rules live in `config/defaults/rules/` and are copied to `.claude/rules/` by the file manifest (`config/file-manifest.json`) on every container start. Unlike CLAUDE.md (which loads on demand when entering a project), rules load automatically on every Claude Code session.
**Adding custom rules**: Create a `.md` file in `config/defaults/rules/`, then add a manifest entry in `config/file-manifest.json` pointing to `${CLAUDE_CONFIG_DIR}/rules` as the destination. The rule will be deployed on the next container start.
Copy file name to clipboardExpand all lines: .devcontainer/README.md
+33-7Lines changed: 33 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,7 +144,8 @@ claude --resume # Resume previous session
144
144
| Python 3.14 | Base language runtime |
145
145
| Node.js LTS | JavaScript runtime |
146
146
| TypeScript | Via Node.js |
147
-
| Go | Latest stable via devcontainer feature |
147
+
| Go | Optional — uncomment Go feature in `devcontainer.json` to enable |
148
+
| Rust | Latest stable via devcontainer feature |
148
149
| Bun | Fast JavaScript runtime and toolkit |
149
150
150
151
### Package Managers
@@ -203,7 +204,9 @@ Copy `.devcontainer/.env.example` to `.devcontainer/.env` and customize:
203
204
|`SETUP_AUTH`|`true`| Configure Git/NPM auth from `.secrets`|
204
205
|`SETUP_PLUGINS`|`true`| Install official plugins + register marketplace |
205
206
|`SETUP_UPDATE_CLAUDE`|`true`| Auto-update Claude Code on container start |
207
+
|`SETUP_TERMINAL`|`true`| Configure VS Code Shift+Enter keybinding for Claude Code terminal |
206
208
|`SETUP_PROJECTS`|`true`| Auto-detect projects for VS Code Project Manager |
209
+
|`SETUP_POSTSTART`|`true`| Run post-start hooks from `/usr/local/devcontainer-poststart.d/`|
207
210
|`PLUGIN_BLACKLIST`|`""`| Comma-separated plugin names to skip |
208
211
209
212
### Claude Code Settings
@@ -247,7 +250,7 @@ The default system prompt is in `.devcontainer/config/defaults/main-system-promp
247
250
248
251
## Custom Features
249
252
250
-
CodeForge includes several custom devcontainer features:
253
+
CodeForge includes custom devcontainer features. Any feature can be disabled by setting `"version": "none"` in `devcontainer.json` — the entry stays in place for easy re-enabling. Each feature's README documents its options and dependencies.
251
254
252
255
| Feature | Description |
253
256
|---------|-------------|
@@ -261,9 +264,14 @@ CodeForge includes several custom devcontainer features:
261
264
|`tree-sitter`| Parser with JS/TS/Python grammars |
262
265
|`lsp-servers`| Pyright and TypeScript language servers |
263
266
|`biome`| Fast JS/TS/JSON/CSS formatter (global install) |
267
+
|`ruff`| Fast Python linter and formatter |
268
+
|`shfmt`| Shell script formatter (disabled by default) |
269
+
|`shellcheck`| Static analysis for shell scripts (disabled by default) |
270
+
|`hadolint`| Dockerfile linter (disabled by default) |
271
+
|`dprint`| Pluggable formatter for Markdown/YAML/TOML (disabled by default) |
272
+
|`ccms`| Claude Code session history search |
264
273
|`notify-hook`| Desktop notifications on Claude completion |
265
274
|`mcp-qdrant`| Qdrant vector database MCP server (optional) |
266
-
|`mcp-reasoner`| Enhanced AI reasoning MCP server (optional) |
267
275
268
276
## Safety Plugins
269
277
@@ -273,9 +281,27 @@ CodeForge includes several custom devcontainer features:
273
281
|`protected-files-guard`| Blocks modifications to .env, lock files, .git/, and credentials |
274
282
|`workspace-scope-guard`| Enforces working directory scope — blocks writes and warns on reads outside the project |
275
283
284
+
### auto-code-quality (Not Active by Default)
285
+
286
+
A self-contained combined auto-formatter and auto-linter plugin available in the marketplace at `plugins/devs-marketplace/plugins/auto-code-quality/`. It bundles formatting and linting into a single plugin with a three-phase pipeline: collect edited files (PostToolUse), batch format (Stop), and batch lint (Stop). Supports the same languages as auto-formatter + auto-linter. **Do not enable alongside auto-formatter or auto-linter** — they overlap in functionality.
287
+
288
+
## Alias Management
289
+
290
+
Features create shell aliases during container build (e.g., `ccusage`, `ccburn`). Separately, `setup-aliases.sh` creates a managed block in `~/.bashrc` and `~/.zshrc` on every container start for `cc`, `claude`, `ccraw`, `ccw`, and `cc-tools`. Both coexist without conflict — feature aliases are installed at build time while setup aliases are refreshed at start time.
291
+
292
+
## Credential Management
293
+
294
+
Three methods for providing GitHub/NPM credentials, in order of precedence:
295
+
296
+
1.**Environment variables** — Set `GH_TOKEN`, `GH_USERNAME`, `GH_EMAIL`, `NPM_TOKEN` as environment variables (e.g., via Codespaces secrets or `localEnv` in `devcontainer.json`)
297
+
2.**`.secrets` file** — Create `.devcontainer/.secrets` with token values (see template at `.secrets.example`). Auto-configured by `setup-auth.sh` on container start
298
+
3.**Interactive login** — Run `gh auth login` for GitHub CLI, then set git identity manually
299
+
300
+
All methods persist across container rebuilds via the bind-mounted `/workspaces/.gh/` directory.
301
+
276
302
## Agents & Skills
277
303
278
-
The `code-directive` plugin includes specialized agent definitions and coding reference skills.
304
+
The `code-directive` plugin includes 17 custom agent definitions and 28 coding reference skills.
279
305
280
306
### Custom Agents (17)
281
307
@@ -301,11 +327,11 @@ Agent definitions in `plugins/devs-marketplace/plugins/code-directive/agents/` p
0 commit comments