Skip to content

Commit 5fc676e

Browse files
authored
Merge pull request #45 from AnExiledDev/staging
Merge staging: official plugins, guard fix, docs sync
2 parents ec73c17 + c0584b7 commit 5fc676e

File tree

14 files changed

+49
-59
lines changed

14 files changed

+49
-59
lines changed

.codeforge/config/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@
5353
"command": "/usr/local/bin/ccstatusline-wrapper"
5454
},
5555
"enabledPlugins": {
56-
"frontend-design@claude-plugins-official": true,
56+
"frontend-design@anthropics/claude-code": true,
57+
"code-review@anthropics/claude-code": true,
58+
"feature-dev@anthropics/claude-code": true,
59+
"pr-review-toolkit@anthropics/claude-code": true,
5760
"codeforge-lsp@devs-marketplace": true,
5861
"ticket-workflow@devs-marketplace": true,
5962
"notify-hook@devs-marketplace": true,

.devcontainer/CHANGELOG.md

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,5 @@
11
# CodeForge Devcontainer Changelog
22

3-
## [Unreleased]
4-
5-
### Security
6-
- Removed environment variable injection vector in agent redirect log path (S2-01)
7-
- Narrowed config deployment allowed destinations from `/usr/local` to `/usr/local/share` (S2-09)
8-
- Protected files guard now fails closed on unexpected errors instead of failing open (S2-04)
9-
10-
### Testing
11-
- **Plugin test suite** — 289 pytest tests covering 6 critical plugin scripts that previously had zero tests:
12-
- `block-dangerous.py` (62 tests) — all 33 dangerous command patterns with positive/negative/edge cases
13-
- `guard-workspace-scope.py` (40 tests) — blacklist, scope, allowlist, bash enforcement layers, primary command extraction
14-
- `guard-protected.py` (56 tests) — all protected file patterns (secrets, locks, keys, credentials, auth dirs)
15-
- `guard-protected-bash.py` (49 tests) — write target extraction, multi-target commands, and protected path integration
16-
- `guard-readonly-bash.py` (69 tests) — general-readonly and git-readonly modes, bypass prevention, global flag handling
17-
- `redirect-builtin-agents.py` (13 tests) — redirect mapping, passthrough, output structure
18-
- Added `test:plugins` and `test:all` npm scripts for running plugin tests
19-
- Python plugin tests (`pytest`) added to CI pipeline (Q3-08)
20-
21-
### Dangerous Command Blocker
22-
- **Force push block now suggests `git merge` as workaround** — error message explains how to avoid diverged history instead of leaving the agent to improvise destructive workarounds
23-
- **Block `--force-with-lease`** — was slipping through regex; all force push variants now blocked uniformly
24-
- **Block remote branch deletion**`git push origin --delete` and colon-refspec deletion (`git push origin :branch`) now blocked; deleting remote branches closes associated PRs
25-
- **Fixed README** — error handling was documented as "fails open" but code actually fails closed; corrected to match behavior
26-
- Dangerous command blocker handles prefix bypasses (`\rm`, `command rm`, `env rm`) and symbolic chmod (S2-03)
27-
28-
### Guards
29-
- Fixed greedy alternation in write-target regex — `>>` now matched before `>` (Q3-01)
30-
- Unified write-target extraction patterns across guards — protected-files bash guard expanded from 5 to 20 patterns (C1-02)
31-
- Multi-target command support — `rm`, `touch`, `mkdir`, `chmod`, `chown` with multiple file operands now check all targets
32-
- Bare `git stash` (equivalent to push) now blocked in read-only mode (Q3-04)
33-
- Fixed git global flag handling — `git -C /path stash list` no longer misidentifies the stash subcommand
34-
35-
### Documentation
36-
- **DevContainer CLI guide** — dedicated Getting Started page for terminal-only workflows without VS Code
37-
- **v2 Migration Guide** — path changes, automatic migration, manual steps, breaking changes, and troubleshooting
38-
- Documented 4 previously undocumented agents in agents.md: implementer, investigator, tester, documenter
39-
- Added missing git-workflow and prompt-snippets to configuration.md enabledPlugins example
40-
- Added CONFIG_SOURCE_DIR deprecation note in environment variables reference
41-
- Added cc-orc orchestrator command to first-session launch commands table
42-
- Tabbed client-specific instructions on the installation page
43-
- Dedicated port forwarding reference page covering VS Code auto-detect, devcontainer-bridge, and SSH tunneling
44-
453
## v2.0.0 — 2026-02-26
464

475
### .codeforge/ Configuration System
@@ -100,6 +58,8 @@
10058
- **worktree skill** — git worktree creation, management, cleanup, `EnterWorktree` tool, `.worktreeinclude` setup
10159

10260
### Plugins
61+
- **Expanded Anthropic official plugins** — added `code-review`, `feature-dev`, and `pr-review-toolkit` from `anthropics/claude-code`
62+
- **Migrated plugin identifiers** — switched from `@claude-plugins-official` to `@anthropics/claude-code` format
10363
- **Git workflow**`/ship` (commit/push/PR with code review and approval) and `/pr:review` (PR review by number/URL, posts findings as comment)
10464
- **Prompt snippets**`/ps` command for quick behavioral mode switches (noaction, brief, plan, go, review, ship, deep, hold, recall, wait); composable (`/ps noaction brief`)
10565

@@ -113,16 +73,20 @@
11373
- POSIX redirect, bash-required installer shell, quoted `${TARGET}`, directory pre-creation
11474

11575
### Testing
116-
- **241 pytest tests** covering 6 critical plugin scripts (previously zero tests):
117-
- `block-dangerous.py` (46), `guard-workspace-scope.py` (40), `guard-protected.py` (55), `guard-protected-bash.py` (24), `guard-readonly-bash.py` (63), `redirect-builtin-agents.py` (13)
76+
- **289 pytest tests** covering 6 critical plugin scripts (previously zero tests):
77+
- `block-dangerous.py` (62), `guard-workspace-scope.py` (40), `guard-protected.py` (56), `guard-protected-bash.py` (49), `guard-readonly-bash.py` (69), `redirect-builtin-agents.py` (13)
11878
- `test:plugins` and `test:all` npm scripts
79+
- Python plugin tests (`pytest`) added to CI pipeline (Q3-08)
11980

12081
### Authentication
12182
- `CLAUDE_AUTH_TOKEN` support in `.secrets` for long-lived tokens from `claude setup-token`
12283
- Auto-creates `.credentials.json` from token on container start (idempotent)
12384
- `CLAUDE_AUTH_TOKEN` in devcontainer.json secrets declaration
12485

12586
### Security
87+
- Removed environment variable injection vector in agent redirect log path (S2-01)
88+
- Narrowed config deployment allowed destinations from `/usr/local` to `/usr/local/share` (S2-09)
89+
- Protected files guard now fails closed on unexpected errors instead of failing open (S2-04)
12690
- Protected-files-guard blocks `.credentials.json` modifications
12791
- Replaced `eval` tilde expansion with `getent passwd` lookup (prevents shell injection)
12892
- Auth token JSON-escaped before writing; credential directory with restrictive umask (700)
@@ -153,8 +117,17 @@
153117
- Force push block now suggests `git merge` as workaround
154118
- Block `--force-with-lease` — all force push variants now blocked uniformly
155119
- Block remote branch deletion (`git push origin --delete`, colon-refspec `git push origin :branch`)
120+
- Handles prefix bypasses (`\rm`, `command rm`, `env rm`) and symbolic chmod (S2-03)
156121
- Fixed README — error handling documented as "fails open" but code actually fails closed
157122

123+
### Guards
124+
- **Allowed `.env.example` edits**`.env.example` is no longer blocked by the `.env.*` pattern; actual secret files (`.env.local`, `.env.production`, etc.) remain protected
125+
- Fixed greedy alternation in write-target regex — `>>` now matched before `>` (Q3-01)
126+
- Unified write-target extraction patterns across guards — protected-files bash guard expanded from 5 to 20 patterns (C1-02)
127+
- Multi-target command support — `rm`, `touch`, `mkdir`, `chmod`, `chown` with multiple file operands now check all targets
128+
- Bare `git stash` (equivalent to push) now blocked in read-only mode (Q3-04)
129+
- Fixed git global flag handling — `git -C /path stash list` no longer misidentifies the stash subcommand
130+
158131
### Session Context & Code Quality
159132
- **Commit reminder** — switched to advisory (was blocking); tiered logic for meaningful changes; only fires when session modified files
160133
- **Advisory test runner** — reads from correct tmp file prefix (`claude-cq-edited` instead of `claude-edited-files`)
@@ -198,6 +171,8 @@
198171
- Missing plugin pages for git-workflow and prompt-snippets
199172
- Port Forwarding reference, CLI guide cross-link, slimmed Installation page
200173
- Documented 4 workhorse agents, cc-orc command, CONFIG_SOURCE_DIR deprecation, CLAUDE_AUTH_TOKEN setup
174+
- Added missing git-workflow and prompt-snippets to configuration.md enabledPlugins example
175+
- Tabbed client-specific instructions on the installation page
201176
- MD040 compliance (language specifiers on fenced code blocks)
202177
- Architecture docs — `.checksums/` and `.markers/` in `.codeforge/` tree
203178
- Troubleshooting — "Reset to Defaults" renamed to "How to Reset", clarified `--reset` behavior

.devcontainer/CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ Declared in `settings.json` under `enabledPlugins`, auto-activated on start:
5050
- **git-workflow** — Standalone ship (commit/push/PR) + PR review
5151
- **notify-hook** — Desktop notifications on completion
5252
- **frontend-design** (Anthropic official) — UI/frontend design skill
53+
- **code-review** (Anthropic official) — Code review skill
54+
- **feature-dev** (Anthropic official) — Feature development skill
55+
- **pr-review-toolkit** (Anthropic official) — PR review commands + agents
5356
- **prompt-snippets** — Quick behavioral mode switches via /ps command
5457

5558
## Rules System

.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Intercepts file operations and checks target paths against a set of protected pa
1010

1111
| Category | Patterns | Reason |
1212
|----------|----------|--------|
13-
| Environment secrets | `.env`, `.env.*` | Contains secrets |
13+
| Environment secrets | `.env`, `.env.*` (except `.env.example`) | Contains secrets |
1414
| Git internals | `.git/` | Managed by git |
1515
| Lock files | `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `Gemfile.lock`, `poetry.lock`, `Cargo.lock`, `composer.lock`, `uv.lock` | Must be modified via package manager |
1616
| Certificates & keys | `.pem`, `.key`, `.crt`, `.p12`, `.pfx` | Sensitive cryptographic material |
@@ -60,7 +60,7 @@ The Bash guard parses commands for write-indicating patterns and extracts the ta
6060
| Scenario | Behavior |
6161
|----------|----------|
6262
| JSON parse failure | Fails closed (exit 2) — blocks the operation |
63-
| Other exceptions | Fails open (exit 0) — logs error, allows the operation |
63+
| Other exceptions | Fails closed (exit 2) — logs error, blocks the operation |
6464

6565
### Timeout
6666

.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected-bash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
PROTECTED_PATTERNS = [
1818
(r"(^|/)\.env$", "Blocked: .env contains secrets - edit manually if needed"),
1919
(
20-
r"(^|/)\.env\.[^/]+$",
20+
r"(^|/)\.env\.(?!example$)[^/]+$",
2121
"Blocked: .env.* files contain secrets - edit manually if needed",
2222
),
2323
(r"(^|/)\.git(/|$)", "Blocked: .git is managed by git"),

.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Environment secrets
1717
(r"(^|/)\.env$", "Blocked: .env contains secrets - edit manually if needed"),
1818
(
19-
r"(^|/)\.env\.[^/]+$",
19+
r"(^|/)\.env\.(?!example$)[^/]+$",
2020
"Blocked: .env.* files contain secrets - edit manually if needed",
2121
),
2222
# Git internals

.devcontainer/scripts/setup-plugins.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222
echo "[setup-plugins] Installing plugins..."
2323

2424
# --- Official Anthropic Plugins ---
25-
DEFAULT_OFFICIAL_PLUGINS="frontend-design@claude-plugins-official svelte@sveltejs/mcp"
25+
DEFAULT_OFFICIAL_PLUGINS="frontend-design@anthropics/claude-code code-review@anthropics/claude-code feature-dev@anthropics/claude-code pr-review-toolkit@anthropics/claude-code svelte@sveltejs/mcp"
2626
IFS=' ' read -ra OFFICIAL_PLUGINS <<< "${OFFICIAL_PLUGINS:-$DEFAULT_OFFICIAL_PLUGINS}"
2727

2828
for plugin in "${OFFICIAL_PLUGINS[@]}"; do

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ CodeForge operates in three layers, each building on the one below:
106106

107107
**DevContainer** — The foundation. A Python 3.14 container with Node.js, Rust, and Bun runtimes, plus 22 custom features that install development tools (ast-grep, tree-sitter, biome, ruff, and others).
108108

109-
**CodeForge Layer** — The intelligence. 13 plugins register hooks that validate commands, inject context, and enforce safety. 17 agents provide specialized personas. 35 skills offer on-demand reference material. System prompts and rules shape behavior.
109+
**CodeForge Layer** — The intelligence. 17 plugins register hooks that validate commands, inject context, and enforce safety. 21 agents provide specialized personas. 38 skills offer on-demand reference material. System prompts and rules shape behavior.
110110

111111
**Claude Code** — The AI assistant, executing tools and coordinating work. CodeForge enhances it through configuration — replacing built-in subagents, adding safety guardrails, and wiring up quality checks that run automatically.
112112

docs/src/content/docs/customization/configuration.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ The `enabledPlugins` section controls which plugins are active:
9696
"codeforge-lsp@devs-marketplace": true,
9797
"git-workflow@devs-marketplace": true,
9898
"prompt-snippets@devs-marketplace": true,
99-
"frontend-design@claude-plugins-official": true
99+
"frontend-design@anthropics/claude-code": true,
100+
"code-review@anthropics/claude-code": true,
101+
"feature-dev@anthropics/claude-code": true,
102+
"pr-review-toolkit@anthropics/claude-code": true
100103
}
101104
}
102105
```

docs/src/content/docs/features/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Out of the box, CodeForge gives you:
1717
- **38 domain knowledge packs** (skills) for frameworks, patterns, and workflows
1818
- **22 CLI tools** for session management, code quality, and development
1919
- **3 layers of code intelligence** — AST-based search, syntax parsing, and LSP semantic analysis
20-
- **14 plugins** that wire everything together with hooks, guards, and automation
20+
- **17 plugins** that wire everything together with hooks, guards, and automation
2121

2222
All of these features work together. An agent can load skills for domain expertise, use CLI tools for code quality checks, and leverage code intelligence for precise navigation — all orchestrated automatically.
2323

0 commit comments

Comments
 (0)