Skip to content

Commit e5b18f6

Browse files
committed
Merge main, resolve changelog conflict, fix review feedback
- Resolve CHANGELOG.md merge conflict (testing section + main's fixes) - Fix run_main() return type in test_redirect_builtin_agents.py (CodeRabbit review) - Update block-dangerous tests for new source patterns: - --force-with-lease now intentionally blocked (was documented as bug) - Bare force push message changed to FORCE_PUSH_SUGGESTION - Add tests for remote branch deletion patterns (--delete, colon-refspec)
2 parents e0b9583 + 5cf554c commit e5b18f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1493
-1460
lines changed

.codeforge/config/main-system-prompt.md

Lines changed: 188 additions & 448 deletions
Large diffs are not rendered by default.

.devcontainer/CHANGELOG.md

Lines changed: 88 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,98 @@
1414
- `redirect-builtin-agents.py` (13 tests) — redirect mapping, passthrough, output structure
1515
- Added `test:plugins` and `test:all` npm scripts for running plugin tests
1616

17+
### Fixed
18+
19+
#### Dangerous Command Blocker
20+
- **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
21+
- **Block `--force-with-lease`** — was slipping through regex; all force push variants now blocked uniformly
22+
- **Block remote branch deletion**`git push origin --delete` and colon-refspec deletion (`git push origin :branch`) now blocked; deleting remote branches closes associated PRs
23+
- **Fixed README** — error handling was documented as "fails open" but code actually fails closed; corrected to match behavior
24+
25+
#### Documentation
26+
- **DevContainer CLI guide** — dedicated Getting Started page for terminal-only workflows without VS Code
27+
- **v2 Migration Guide** — path changes, automatic migration, manual steps, breaking changes, and troubleshooting
28+
- Documented 4 previously undocumented agents in agents.md: implementer, investigator, tester, documenter
29+
- Added missing git-workflow and prompt-snippets to configuration.md enabledPlugins example
30+
- Added CONFIG_SOURCE_DIR deprecation note in environment variables reference
31+
- Added cc-orc orchestrator command to first-session launch commands table
32+
- Tabbed client-specific instructions on the installation page
33+
- Dedicated port forwarding reference page covering VS Code auto-detect, devcontainer-bridge, and SSH tunneling
34+
1735
### Changed
1836

37+
#### Performance
38+
- Commented out Rust toolchain feature — saves ~1.23 GB image size; uncomment in `devcontainer.json` if needed
39+
- Commented out ccms feature pending replacement tool (requires Rust)
40+
- Updated Bun feature to install latest version (was pinned to outdated 1.3.9)
41+
- Added npm cache cleanup to 6 features: agent-browser, ast-grep, biome, claude-session-dashboard, lsp-servers, tree-sitter (saves ~96 MB runtime disk)
42+
43+
#### System Prompts
44+
- **Main system prompt redesigned** — reorganized from 672 to 462 lines with new section order prioritizing personality, core directives, and response guidelines at the top
45+
- **Added personality section** — defines communication style (casual-professional, direct, terse), humor rules, honesty approach, AuDHD-aware patterns, and good/bad response examples; replaces the empty `<identity>` tag
46+
- **Compressed specification management** — reduced from 98 to 28 lines; full template and enforcement workflow moved to loadable skills
47+
- **Compressed code standards** — removed textbook principle recitations (SOLID, DRY/KISS/YAGNI by name); kept only concrete actionable rules
48+
- **Removed browser automation section** — moved to loadable skill (relevant in <10% of sessions)
49+
- **Removed git worktrees section** — moved to loadable skill; EnterWorktree and `--worktree` flag documented in CLAUDE.md
50+
- **Added context-passing protocol** to orchestration — mandatory instructions for including gathered context, file paths, and constraints when spawning subagents
51+
- **Absorbed `<assumption_surfacing>` into `<core_directives>`** — key rules preserved, wrapper removed
52+
- **Absorbed `<professional_objectivity>` into `<personality>`** — technical accuracy stance woven into personality definition
53+
- **Deduplicated team composition examples** — consolidated into orchestration section only
54+
- **Consolidated "no filler" instructions** — previously stated three different ways across three sections
55+
56+
#### Agent System
57+
- **All 21 agents now have communication protocols** — read-only agents get "Handling Uncertainty" (make best judgment, flag assumptions); write-capable agents get "Question Surfacing Protocol" (BLOCKED + return for ambiguity)
58+
- **Architect agent: anti-fluff enforcement** — explicit banned patterns ("This approach follows best practices...", restating the problem, explaining why the approach is good), good/bad plan line examples
59+
- **Architect agent: team orchestration planning** — can now plan teammate composition, file ownership, task dependencies, and worktree usage when tasks warrant parallel work
60+
- **Architect agent: strengthened output format** — team plan section added, edit ordering section added, file references must be specific
61+
- **Generalist agent rewritten as last-resort** — description changed to "LAST RESORT agent. Only use when NO specialist agent matches", identity paragraph flags when a specialist might have been better
62+
- **Investigator agent: structured output guidance** — added instruction to include actionable next steps, not just observations
63+
- **Added Bash guard hooks** to researcher, debug-logs, and perf-profiler agents — prevents accidental state-changing commands in read-only agents
64+
- **Architect agent: major plan quality improvements** — complexity scaling framework (simple/moderate/complex), 20+ banned fluff patterns, concrete edit ordering (Models→Services→Routes→Tests→Config), rollback strategy requirement for schema/API changes, schema change detection, verification criteria per phase, 3 new examples (migration, multi-agent refactoring, ambiguous requirement)
65+
- **Merged tester agent into test-writer** — test-writer is now the single test agent; tester.md removed (test-writer was more comprehensive with better examples and Question Surfacing Protocol)
66+
- **Merged doc-writer agent into documenter** — documenter is now the single documentation agent with full spec lifecycle AND rich documentation patterns (README 5-question structure, API docs format, language-specific docstring examples, architectural docs, style guide); doc-writer.md removed
67+
- **Narrowed investigator description** — repositioned from catch-all "all read-only analysis" to "cross-domain investigations spanning 2+ specialist areas"; prevents over-selection when a focused specialist (explorer, researcher, git-archaeologist, etc.) is the better fit
68+
- **Improved agent descriptions for routing accuracy** — added missing trigger phrases to explorer, researcher, debug-logs, dependency-analyst, security-auditor, perf-profiler, refactorer, and test-writer; clarified overlap boundaries between security-auditor (code-level) and dependency-analyst (package-level), explorer (codebase-only) and researcher (web+code)
69+
- **Resolved communication protocol contradictions** — aligned all "ask the user/caller" instructions in agent behavioral rules with the new Handling Uncertainty / Question Surfacing Protocol sections, eliminating conflicting guidance about direct user interaction
70+
71+
#### Skill Engine: Auto-Suggestion
72+
- **Weighted scoring** — Skill suggestion phrases now carry confidence weights (0.0–1.0) instead of binary match/no-match. Specific phrases like "build a fastapi app" score 1.0; ambiguous phrases like "start building" score 0.2
73+
- **Negative patterns** — Skills can define substrings that instantly disqualify them. Prevents `fastapi` from triggering when discussing `pydantic-ai`, and `docker` from triggering for `docker-py` prompts
74+
- **Context guards** — Low-confidence matches (score < 0.6) require a confirming context word elsewhere in the prompt. "health check" only suggests `docker` if "docker", "container", or "compose" also appears
75+
- **Ranked results, capped at 3** — Suggestions are sorted by score (then priority tier), and only the top 3 are returned. Eliminates 6+ skill suggestion floods
76+
- **Priority tiers** — Explicit commands (priority 10) outrank technology skills (7), which outrank patterns (5) and generic skills (3) when scores tie
77+
78+
#### Claude Code Installation
79+
- **Claude Code now installs as a native binary** — uses Anthropic's official installer (`https://claude.ai/install.sh`) via new `./features/claude-code-native` feature, replacing the npm-based `ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5`
80+
- **In-session auto-updater now works without root** — native binary at `~/.local/bin/claude` is owned by the container user, so `claude update` succeeds without permission issues
81+
82+
#### System Prompt
83+
- **`<git_worktrees>` section** — Updated to document Claude Code native worktree convention (`<repo>/.claude/worktrees/`) as the recommended approach alongside the legacy `.worktrees/` convention. Added `EnterWorktree` tool guidance, `.worktreeinclude` file documentation, and path convention comparison table.
84+
85+
#### Configuration
86+
- Moved `.claude` directory from `/workspaces/.claude` to `~/.claude` (home directory)
87+
- Added Docker named volume for persistence across rebuilds (per-instance isolation via `${devcontainerId}`)
88+
- `CLAUDE_CONFIG_DIR` now defaults to `~/.claude`
89+
- `file-manifest.json` — added deployment entry for `orchestrator-system-prompt.md`
90+
- `setup-aliases.sh` — added `cc-orc` alias alongside existing `cc`, `claude`, `ccw`, `ccraw`
91+
- `CLAUDE.md` — documented `cc-orc` command and orchestrator system prompt in key configuration table
92+
93+
#### Agent System (previous)
94+
- Agent count increased from 17 to 21 (4 workhorse + 17 specialist)
95+
- Agent-system README updated with workhorse agent table, per-agent hooks for implementer and tester, and updated plugin structure
96+
1997
#### Port Forwarding
2098
- Dynamic port forwarding for all ports in VS Code — previously only port 7847 was statically forwarded; now all ports auto-forward with notification
2199

22100
#### Documentation
101+
- Updated **Port Forwarding reference** — VS Code dependency warning, devcontainer-bridge platform support matrix, CLI guide cross-link
102+
- Slimmed **Installation page** — moved troubleshooting to dedicated reference page, CLI details to new CLI guide
103+
- Full documentation review — accuracy, consistency, and completeness fixes across all 30+ pages
104+
- Trimmed disabled ccms usage section from commands reference
105+
- Clarified codeforge-lsp plugin description (declarative config, not "no configuration")
106+
- Improved magic-docs agent explanation in agent-system plugin docs
107+
- Clarified plugin count as "13 local + 1 official" in reference index
23108
- Updated prerequisites and installation docs to support all DevContainer clients (VS Code, CLI, JetBrains Gateway, DevPod, Codespaces)
24-
- Added tabbed client-specific instructions on the installation page
25-
- Added dedicated port forwarding reference page covering VS Code auto-detect, devcontainer-bridge, and SSH tunneling
26109
- **Ported `.devcontainer/docs/` to docs site** — migrated content from 5 legacy reference docs into the Starlight documentation site:
27110
- New **Keybindings** page (Customization) — VS Code/Claude Code shortcut conflicts and resolution options
28111
- New **Troubleshooting** page (Reference) — 12+ problem/solution entries for build, auth, plugins, and performance issues
@@ -35,6 +118,9 @@
35118

36119
### Fixed
37120

121+
#### Bun
122+
- Bun PATH not available in non-interactive shells — Bun is now accessible in all shell contexts
123+
38124
#### Session Context Plugin
39125
- **Commit reminder** no longer blocks Claude from stopping — switched from `decision: "block"` to advisory `systemMessage` wrapped in `<system-reminder>` tags
40126
- **Commit reminder** now uses tiered logic: meaningful changes (3+ files, 2+ source files, or test files) get an advisory suggestion; small changes are silent
@@ -155,34 +241,6 @@
155241
- **`documenter`** — consolidated documentation and specification agent (opus) merging doc-writer and spec-writer; handles README, API docs, docstrings, and the full spec lifecycle (create, refine, build, review, update, check)
156242
- **Question Surfacing Protocol** — all 4 workhorse agents carry an identical protocol requiring them to STOP and return `## BLOCKED: Questions` sections when hitting ambiguities, ensuring no assumptions are made without user input
157243

158-
### Changed
159-
160-
#### Skill Engine: Auto-Suggestion
161-
- **Weighted scoring** — Skill suggestion phrases now carry confidence weights (0.0–1.0) instead of binary match/no-match. Specific phrases like "build a fastapi app" score 1.0; ambiguous phrases like "start building" score 0.2
162-
- **Negative patterns** — Skills can define substrings that instantly disqualify them. Prevents `fastapi` from triggering when discussing `pydantic-ai`, and `docker` from triggering for `docker-py` prompts
163-
- **Context guards** — Low-confidence matches (score < 0.6) require a confirming context word elsewhere in the prompt. "health check" only suggests `docker` if "docker", "container", or "compose" also appears
164-
- **Ranked results, capped at 3** — Suggestions are sorted by score (then priority tier), and only the top 3 are returned. Eliminates 6+ skill suggestion floods
165-
- **Priority tiers** — Explicit commands (priority 10) outrank technology skills (7), which outrank patterns (5) and generic skills (3) when scores tie
166-
167-
#### Claude Code Installation
168-
- **Claude Code now installs as a native binary** — uses Anthropic's official installer (`https://claude.ai/install.sh`) via new `./features/claude-code-native` feature, replacing the npm-based `ghcr.io/anthropics/devcontainer-features/claude-code:1.0.5`
169-
- **In-session auto-updater now works without root** — native binary at `~/.local/bin/claude` is owned by the container user, so `claude update` succeeds without permission issues
170-
171-
#### System Prompt
172-
- **`<git_worktrees>` section** — Updated to document Claude Code native worktree convention (`<repo>/.claude/worktrees/`) as the recommended approach alongside the legacy `.worktrees/` convention. Added `EnterWorktree` tool guidance, `.worktreeinclude` file documentation, and path convention comparison table.
173-
174-
#### Configuration
175-
- Moved `.claude` directory from `/workspaces/.claude` to `~/.claude` (home directory)
176-
- Added Docker named volume for persistence across rebuilds (per-instance isolation via `${devcontainerId}`)
177-
- `CLAUDE_CONFIG_DIR` now defaults to `~/.claude`
178-
- `file-manifest.json` — added deployment entry for `orchestrator-system-prompt.md`
179-
- `setup-aliases.sh` — added `cc-orc` alias alongside existing `cc`, `claude`, `ccw`, `ccraw`
180-
- `CLAUDE.md` — documented `cc-orc` command and orchestrator system prompt in key configuration table
181-
182-
#### Agent System
183-
- Agent count increased from 17 to 21 (4 workhorse + 17 specialist)
184-
- Agent-system README updated with workhorse agent table, per-agent hooks for implementer and tester, and updated plugin structure
185-
186244
#### Authentication
187245
- Added `CLAUDE_AUTH_TOKEN` support in `.secrets` for long-lived tokens from `claude setup-token`
188246
- Auto-creates `.credentials.json` from token on container start (skips if already exists)

.devcontainer/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ git worktree add /workspaces/projects/.worktrees/<branch-name> -b <branch>
8080
| `ccraw` | Vanilla Claude Code (bypasses config) |
8181
| `ccw` | Claude Code with writing system prompt |
8282
| `cc-orc` | Claude Code in orchestrator mode (delegation-first) |
83-
| `ccms` | Search session history (project-scoped) |
83+
| ~~`ccms`~~ | _(commented out — replacement pending)_ |
8484
| `ccusage` / `ccburn` | Token usage analysis / burn rate |
8585
| `agent-browser` | Headless Chromium (Playwright-based) |
8686
| `check-setup` | Verify CodeForge setup health |

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Agent definitions in `plugins/devs-marketplace/plugins/agent-system/agents/` pro
331331
| `claude-guide` | Claude Code feature guidance |
332332
| `debug-logs` | Log analysis and error diagnosis |
333333
| `dependency-analyst` | Dependency analysis and upgrades |
334-
| `doc-writer` | Documentation authoring |
334+
| `documenter` | Documentation, specs, and spec lifecycle |
335335
| `explorer` | Fast codebase search and navigation |
336336
| `generalist` | General-purpose multi-step tasks |
337337
| `git-archaeologist` | Git history forensics |

.devcontainer/devcontainer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,25 @@
4646
}
4747
},
4848

49-
// Feature install order: external runtimes first (Node, uv, Rust, Bun),
49+
// Feature install order: external runtimes first (Node, uv, Bun),
5050
// then Claude Code native binary (no Node dependency), then custom features.
5151
// npm-dependent features (agent-browser, ccusage, ccburn, claude-session-dashboard,
5252
// biome, lsp-servers) must come after Node. uv-dependent features (ruff, claude-monitor) must
53-
// come after uv. cargo-dependent features (ccms) must come after Rust.
54-
// notify-hook is second-to-last (lightweight, no dependencies).
53+
// come after uv. notify-hook is second-to-last (lightweight, no dependencies).
5554
// dbr (devcontainer-bridge) is last — standalone binary, no dependencies.
5655
"overrideFeatureInstallOrder": [
5756
"ghcr.io/devcontainers/features/node",
5857
"ghcr.io/devcontainers/features/github-cli",
5958
"ghcr.io/devcontainers/features/docker-outside-of-docker",
6059
"ghcr.io/devcontainers-extra/features/uv",
6160
"ghcr.io/rails/devcontainer/features/bun",
62-
"ghcr.io/devcontainers/features/rust",
6361
"./features/claude-code-native",
6462
"./features/tmux",
6563
"./features/agent-browser",
6664
"./features/claude-monitor",
6765
"./features/ccusage",
6866
"./features/ccburn",
6967
"./features/ccstatusline",
70-
"./features/ccms",
7168
"./features/claude-session-dashboard",
7269
"./features/ast-grep",
7370
"./features/tree-sitter",
@@ -94,10 +91,13 @@
9491
"moby": false
9592
},
9693
"ghcr.io/devcontainers-extra/features/uv:1.0": {},
97-
"ghcr.io/rails/devcontainer/features/bun:1.0.2": {},
98-
"ghcr.io/devcontainers/features/rust:1.5.0": {
94+
"ghcr.io/rails/devcontainer/features/bun:1.0.2": {
9995
"version": "latest"
10096
},
97+
// Uncomment to add Rust toolchain:
98+
// "ghcr.io/devcontainers/features/rust:1.5.0": {
99+
// "version": "latest"
100+
// },
101101
// Uncomment to add Go runtime (not installed by default):
102102
// "ghcr.io/devcontainers/features/go:1": {},
103103
"./features/claude-code-native": {},
@@ -120,7 +120,8 @@
120120
"./features/ccstatusline": {
121121
"username": "automatic"
122122
},
123-
"./features/ccms": {},
123+
// Uncomment to add ccms (requires Rust):
124+
// "./features/ccms": {},
124125
"./features/claude-session-dashboard": {
125126
"version": "latest",
126127
"port": "7847",

.devcontainer/features/agent-browser/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
5858
echo "[agent-browser] WARNING: Global install failed, trying user install"
5959
su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
6060
}
61+
npm cache clean --force 2>/dev/null || true
6162

6263
# Download Chromium and install system dependencies
6364
echo "[agent-browser] Installing Chromium and system dependencies..."

.devcontainer/features/ast-grep/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,6 @@ npm install -g "${NPM_PACKAGE}" 2>/dev/null || {
5555
echo "[ast-grep] WARNING: Global install failed, trying user install"
5656
su - "${USERNAME}" -c "npm install -g ${NPM_PACKAGE}" 2>/dev/null || true
5757
}
58+
npm cache clean --force 2>/dev/null || true
5859

5960
echo "[ast-grep] Installed: $(ast-grep --version 2>/dev/null || echo 'unknown')"

.devcontainer/features/biome/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ if [ "${VERSION}" = "latest" ]; then
3333
else
3434
npm install -g "@biomejs/biome@${VERSION}"
3535
fi
36+
npm cache clean --force 2>/dev/null || true
3637

3738
# Verify installation
3839
biome --version

.devcontainer/features/claude-session-dashboard/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ echo "[claude-session-dashboard] Installing for user: ${USERNAME}"
7676
# === INSTALL VIA NPM ===
7777
echo "[claude-session-dashboard] Installing claude-session-dashboard@${DASHBOARD_VERSION} globally..."
7878
npm install -g "claude-session-dashboard@${DASHBOARD_VERSION}"
79+
npm cache clean --force 2>/dev/null || true
7980

8081
# === PERSISTENCE SYMLINK (POSTSTART HOOK) ===
8182
# Settings/cache live at ~/.claude-dashboard, which is ephemeral (/home/vscode).

.devcontainer/features/lsp-servers/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ install_npm_package "typescript" "typescript" "${TS_VERSION}"
8484
# Install TypeScript Language Server
8585
install_npm_package "typescript-language-server" "typescript-language-server" "${TSLSP_VERSION}"
8686

87+
npm cache clean --force 2>/dev/null || true
88+
8789
# Install gopls (Go LSP) - uses go install since it's a Go package
8890
echo "[lsp-servers] Installing gopls..."
8991
if command -v go &>/dev/null; then

0 commit comments

Comments
 (0)