Skip to content

Commit 3a58fa8

Browse files
committed
v1.11.0: ccms, ccw, workspace-scope-guard, spec-build/review, domain-based specs, alias idempotency fix
New features: ccms session history search (Rust), ccw writing-mode alias, workspace-scope-guard plugin, /spec-build and /spec-review skills, inject-cwd hook, CWD statusline widget, Rust runtime. Spec workflow overhaul: version-based → domain-based organization, ROADMAP → MILESTONES, acceptance criteria markers ([ ]/[~]/[x]). Bug fix: setup-aliases.sh idempotency — block-marker delete-and-rewrite replaces cleanup+guard that left aliases missing on re-run. Also: LSP declarative config, git-state-injector cwd injection, system prompt formatting, __pycache__ gitignore.
1 parent 27d8e6c commit 3a58fa8

File tree

43 files changed

+1912
-368
lines changed

Some content is hidden

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

43 files changed

+1912
-368
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,74 @@
11
# CodeForge Devcontainer Changelog
22

3+
## [v1.11.0] - 2026-02-17
4+
5+
### Added
6+
7+
#### New Feature: ccms (Session History Search)
8+
- **`ccms` devcontainer feature** — Rust-based CLI for searching Claude Code session JSONL files. Installed via `cargo install`. Supports boolean queries, role filtering, time scoping, project isolation, and JSON output
9+
- **`session-search.md` rule** — global rule requiring project-scoped `ccms` usage and documenting CLI flags/query syntax
10+
- **Rust runtime** — added `ghcr.io/devcontainers/features/rust:1` as a devcontainer feature (required by ccms)
11+
- **System prompt `<session_search>` section** — inline reference for ccms usage with key flags and examples
12+
- **Context management updated**`<context_management>` now references ccms as the primary recovery tool for compacted sessions (three-source recovery: session history → source files → plan/requirement files)
13+
14+
#### New Feature: ccw (Writing Mode)
15+
- **`ccw` alias** — launches Claude with `writing-system-prompt.md` for creative-writing tasks
16+
- **`writing-system-prompt.md`** — dedicated system prompt for writing mode, distributed via file-manifest
17+
18+
#### New Plugin: workspace-scope-guard
19+
- **`workspace-scope-guard`** — safety plugin that blocks writes and warns on reads outside the working directory. Registered in marketplace.json and enabled by default in settings.json
20+
21+
#### New Skills: spec-build, spec-review (code-directive plugin — 28 skills total)
22+
- **`/spec-build`** — orchestrates the full implementation lifecycle from an approved spec: plan, build, review, and close in one pass. 5-phase workflow with acceptance criteria markers (`[ ]``[~]``[x]`)
23+
- **`/spec-review`** — standalone deep implementation review against a spec. Reads code, verifies requirements and acceptance criteria, recommends `/spec-update` when done
24+
25+
#### New Hook: inject-cwd.py
26+
- **`inject-cwd.py`** (PostToolUse, all tools) — injects current working directory into every tool response via `additionalContext`
27+
28+
#### Status Line: CWD Widget
29+
- **`ccstatusline-cwd`** — new custom-command widget showing the basename of Claude Code's working directory. Layout expanded from 7 to 8 lines (16 → 17 widgets)
30+
31+
### Changed
32+
33+
#### setup-aliases.sh Idempotency Fix
34+
- **Block-marker strategy** — replaced cleanup+guard approach (which left aliases missing on re-run) with a delete-and-rewrite strategy using `START`/`END` block markers. The managed block is removed wholesale by sed range match, then always re-written fresh — no guard/`continue` needed
35+
- **Legacy cleanup expanded** — added removal of v1.10.0 orphaned aliases/exports/`_CLAUDE_BIN`/`cc-tools()` that existed outside block markers, in addition to pre-v1.10.0 function forms
36+
- **cc-tools expanded** — added `ccw`, `ccms`, `cargo` to the tool listing
37+
38+
#### Spec Workflow: Version-Based → Domain-Based Organization
39+
- **Directory structure** — specs now live in domain subfolders (`.specs/{domain}/{feature}.md`) instead of version directories (`.specs/v0.1.0/feature.md`)
40+
- **ROADMAP.md → MILESTONES.md** — version tracker renamed to milestone tracker throughout all skills, templates, and system prompt
41+
- **`**Version:**``**Domain:**`** — spec template metadata field renamed across spec-new template, spec-writer agent, specification-writing skill, spec-update, spec-check
42+
- **`roadmap-template.md``milestones-template.md`** — reference template replaced
43+
- **Acceptance criteria markers** — three-state progress tracking: `[ ]` (not started), `[~]` (implemented, not yet verified), `[x]` (verified). Used by `/spec-build` phases and recognized by `/spec-check` and `/spec-update`
44+
- **Spec lifecycle expanded**`/spec-review` inserted before `/spec-update` in the recommended post-implementation workflow. `spec-reminder.py` advisory message updated accordingly
45+
- **Agent skill lists** — architect, generalist, and spec-writer agents gained `/spec-review` access
46+
47+
#### LSP Plugin: Declarative Server Configuration
48+
- **`codeforge-lsp/plugin.json`** — added `lspServers` block with pyright (Python), typescript-language-server (JS/TS), and gopls (Go) declarative configurations replacing implicit setup
49+
50+
#### git-state-injector.py Enhancements
51+
- **Working directory injection** — always outputs cwd with scope restriction message, even outside git repos
52+
- **cwd from hook input** — reads `cwd` from Claude Code's hook JSON input (falls back to `os.getcwd()`)
53+
54+
#### System Prompt Formatting
55+
- **Line unwrapping** — long wrapped lines consolidated to single lines throughout (no content changes, only formatting)
56+
57+
#### Documentation
58+
- **CLAUDE.md** — added `ccw`, `ccms` commands; added `writing-system-prompt.md` to directory tree and config table; added workspace-scope-guard to plugin list; skill count 17 → 28; added Rust to `version: "none"` support; updated setup-aliases.sh description
59+
- **README.md** — added Safety Plugins section; updated spec workflow commands/lifecycle/structure for domain-based organization; added `/spec-build` and `/spec-review` to skill table; fixed system prompt override path (`system-prompt.md``main-system-prompt.md`)
60+
- **claude-guide agent** — fixed system prompt path reference (`system-prompt.md``main-system-prompt.md`)
61+
- **doc-writer agent** — "Version ships" → "Milestone ships" terminology
62+
- **marketplace.json** — skill count updated (16 → 28); workspace-scope-guard added
63+
- **skill-suggester.py** — added keyword mappings for `spec-build` and `spec-review`
64+
- **spec-workflow.md rule** — added `/spec-build` and `/spec-review` rules (#10, #11); added acceptance criteria markers section; updated directory convention to domain-based
65+
66+
### Removed
67+
68+
- **`spec-init/references/roadmap-template.md`** — replaced by `milestones-template.md`
69+
70+
---
71+
372
## [v1.10.0] - 2026-02-13
473

574
### Added

.devcontainer/CLAUDE.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
1414
│ │ └── defaults/ # Files copied per manifest
1515
│ │ ├── settings.json # Claude Code settings
1616
│ │ ├── keybindings.json # Claude Code keybindings
17-
│ │ └── main-system-prompt.md
17+
│ │ ├── main-system-prompt.md
18+
│ │ └── writing-system-prompt.md
1819
│ ├── features/ # Custom devcontainer features
1920
│ ├── plugins/ # Local plugin marketplace
2021
│ │ └── devs-marketplace/
2122
│ └── scripts/ # Setup scripts
2223
├── .claude/ # Runtime Claude config (created on first run)
2324
│ ├── settings.json # Active settings (managed by file-manifest.json)
2425
│ ├── keybindings.json # Active keybindings
25-
│ └── system-prompt.md # Active system prompt
26+
│ └── main-system-prompt.md # Active system prompt
2627
└── .gh/ # GitHub CLI config (persists across rebuilds)
2728
└── hosts.yml # Authenticated hosts
2829
```
@@ -37,6 +38,7 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
3738
| `config/defaults/settings.json` | Claude Code defaults: model, tokens, permissions, plugins |
3839
| `config/defaults/keybindings.json` | Claude Code keybindings (empty by default — customizable) |
3940
| `config/defaults/main-system-prompt.md` | Default system prompt defining assistant behavior |
41+
| `config/defaults/writing-system-prompt.md` | Creative-writing system prompt used by `ccw` alias |
4042

4143
> **Note**: Config file copying is controlled by `config/file-manifest.json`. Each entry specifies `overwrite`: `"if-changed"` (default, sha256-based), `"always"`, or `"never"`. Persistent changes go in `.devcontainer/config/defaults/settings.json`.
4244
@@ -47,12 +49,14 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
4749
| `claude` | Run Claude Code with auto-configuration (prefers native binary at `~/.local/bin/claude`) |
4850
| `cc` | Shorthand for `claude` with config |
4951
| `ccraw` | Vanilla Claude Code without any config (bypasses function override) |
52+
| `ccw` | Shorthand for `claude` with writing system prompt |
5053
| `ccusage` | Analyze token usage history |
5154
| `ccburn` | Real-time token burn rate visualization |
5255
| `agent-browser` | Headless Chromium for browser automation (Playwright-based) |
5356
| `gh` | GitHub CLI for repo operations |
5457
| `uv` | Fast Python package manager |
5558
| `ast-grep` | Structural code search |
59+
| `ccms` | Search Claude Code session history (project-scoped) |
5660
| `cc-tools` | List all installed tools with version info |
5761
| `check-setup` | Verify CodeForge setup health |
5862

@@ -103,14 +107,17 @@ When `version` is set to `"none"`, the feature's `install.sh` exits immediately
103107
The auto-formatter and auto-linter plugins gracefully skip missing tools at runtime.
104108

105109
**All local features support this pattern:**
106-
ast-grep, biome, ccstatusline, claude-monitor, dprint, hadolint, lsp-servers, mcp-qdrant, mcp-reasoner, notify-hook, ruff, shfmt, shellcheck, splitrail, tmux
110+
ast-grep, biome, ccms, ccstatusline, claude-monitor, dprint, hadolint, lsp-servers, mcp-qdrant, mcp-reasoner, notify-hook, ruff, shfmt, shellcheck, splitrail, tmux
107111

108112
**External features with `version: "none"` support:**
109113
`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)
110114

111115
**External features without `version: "none"` support:**
112116
`ghcr.io/devcontainers-extra/features/uv`, `ghcr.io/anthropics/devcontainer-features/claude-code`, `ghcr.io/nickmccurdy/bun`
113117

118+
**External features with `version: "none"` support (Rust):**
119+
`ghcr.io/devcontainers/features/rust` (official Microsoft feature)
120+
114121
> **Convention**: Every new local feature must include a `version` option (default `"latest"`) in its `devcontainer-feature.json` and a skip guard at the top of `install.sh`:
115122
> ```bash
116123
> if [ "${VERSION}" = "none" ]; then
@@ -127,7 +134,7 @@ Scripts in `./scripts/` run via `postStartCommand`:
127134
|--------|---------|
128135
| `setup.sh` | Main orchestrator |
129136
| `setup-config.sh` | Copies config files per `config/file-manifest.json` to destinations |
130-
| `setup-aliases.sh` | Creates `cc`/`claude`/`ccraw` shell aliases (prefers native binary at `~/.local/bin/claude` via `_CLAUDE_BIN`) |
137+
| `setup-aliases.sh` | Creates `cc`/`claude`/`ccraw`/`ccw` shell aliases (prefers native binary at `~/.local/bin/claude` via `_CLAUDE_BIN`) |
131138
| `setup-plugins.sh` | Registers local marketplace + installs official Anthropic plugins |
132139
| `setup-update-claude.sh` | Installs native Claude Code binary on first run; background auto-updates on subsequent starts |
133140
| `setup-terminal.sh` | Configures VS Code Shift+Enter keybinding for Claude Code multi-line input |
@@ -157,6 +164,7 @@ Plugins are declared in `config/defaults/settings.json` under `enabledPlugins` a
157164
- `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)
158165
- `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)
159166
- `code-directive@devs-marketplace` — 17 custom agents, 17 skills, syntax validation, skill suggestions, agent redirect hook
167+
- `workspace-scope-guard@devs-marketplace` — Blocks writes and warns on reads outside the working directory
160168

161169
### Local Marketplace
162170

@@ -172,20 +180,21 @@ plugins/devs-marketplace/
172180
├── auto-formatter/ # Batch formatter (Stop hook)
173181
├── auto-linter/ # Pyright linter
174182
├── code-directive/ # Agents, skills + hooks
183+
├── workspace-scope-guard/ # Workspace scope enforcement
175184
└── ...
176185
```
177186

178187
## Agents & Skills
179188

180-
The `code-directive` plugin includes 17 custom agent definitions and 17 coding reference skills.
189+
The `code-directive` plugin includes 17 custom agent definitions and 28 coding reference skills.
181190

182191
**Agents** (`plugins/devs-marketplace/plugins/code-directive/agents/`):
183192
architect, bash-exec, claude-guide, debug-logs, dependency-analyst, doc-writer, explorer, generalist, git-archaeologist, migrator, perf-profiler, refactorer, researcher, security-auditor, spec-writer, statusline-config, test-writer
184193

185194
The `redirect-builtin-agents.py` hook (PreToolUse/Task) transparently swaps built-in agent types to these custom agents (e.g., Explore→explorer, Plan→architect).
186195

187196
**Skills** (`plugins/devs-marketplace/plugins/code-directive/skills/`):
188-
claude-agent-sdk, claude-code-headless, debugging, docker, docker-py, fastapi, git-forensics, performance-profiling, pydantic-ai, refactoring-patterns, security-checklist, skill-building, spec-refine, specification-writing, sqlite, svelte5, testing
197+
api-design, ast-grep-patterns, claude-agent-sdk, claude-code-headless, debugging, dependency-management, docker, docker-py, documentation-patterns, fastapi, git-forensics, migration-patterns, performance-profiling, pydantic-ai, refactoring-patterns, security-checklist, skill-building, spec-build, spec-check, spec-init, spec-new, spec-refine, spec-review, spec-update, specification-writing, sqlite, svelte5, testing
189198

190199
## VS Code Keybinding Conflicts
191200

.devcontainer/README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ For conflicting shortcuts, use Meta (Alt) variants or add custom keybindings.
243243

244244
### System Prompt
245245

246-
The default system prompt is in `.devcontainer/config/defaults/main-system-prompt.md`. Override it by creating a `.claude/system-prompt.md` in your project directory.
246+
The default system prompt is in `.devcontainer/config/defaults/main-system-prompt.md`. Override it by creating a `.claude/main-system-prompt.md` in your project directory.
247247

248248
## Custom Features
249249

@@ -265,6 +265,14 @@ CodeForge includes several custom devcontainer features:
265265
| `mcp-qdrant` | Qdrant vector database MCP server (optional) |
266266
| `mcp-reasoner` | Enhanced AI reasoning MCP server (optional) |
267267

268+
## Safety Plugins
269+
270+
| Plugin | Description |
271+
|--------|-------------|
272+
| `dangerous-command-blocker` | Blocks destructive bash commands (rm -rf, sudo rm, chmod 777, force push) |
273+
| `protected-files-guard` | Blocks modifications to .env, lock files, .git/, and credentials |
274+
| `workspace-scope-guard` | Enforces working directory scope — blocks writes and warns on reads outside the project |
275+
268276
## Agents & Skills
269277

270278
The `code-directive` plugin includes specialized agent definitions and coding reference skills.
@@ -307,7 +315,7 @@ CodeForge includes a specification-driven development workflow. Every non-trivia
307315

308316
```bash
309317
/spec-init # Bootstrap .specs/ directory (first time only)
310-
/spec-new auth-flow v0.2.0 # Create a feature spec
318+
/spec-new auth-flow # Create a feature spec (domain is inferred)
311319
/spec-refine auth-flow # Validate assumptions with user
312320
# ... implement the feature ...
313321
/spec-update auth-flow # As-built update after implementation
@@ -317,7 +325,7 @@ CodeForge includes a specification-driven development workflow. Every non-trivia
317325
### The Lifecycle
318326

319327
1. **Backlog** — features live in `.specs/BACKLOG.md` with priority grades (P0–P3)
320-
2. **Roadmap** — when starting a version, pull features from backlog into `.specs/ROADMAP.md`
328+
2. **Milestone** — when starting a milestone, pull features from backlog into `.specs/MILESTONES.md`
321329
3. **Spec**`/spec-new` creates a spec from the standard template with all requirements tagged `[assumed]`
322330
4. **Refine**`/spec-refine` walks through every assumption with the user, converting `[assumed]``[user-approved]`. The spec's approval status moves from `draft``user-approved`. **No implementation begins until approved.**
323331
5. **Implement** — build the feature using the spec's acceptance criteria as the definition of done
@@ -337,26 +345,29 @@ A spec-reminder advisory hook fires at Stop when code was modified but specs wer
337345

338346
| Skill | Purpose |
339347
|-------|---------|
340-
| `/spec-init` | Bootstrap `.specs/` directory with ROADMAP and BACKLOG |
348+
| `/spec-init` | Bootstrap `.specs/` directory with MILESTONES and BACKLOG |
341349
| `/spec-new` | Create a feature spec from the standard template |
342350
| `/spec-refine` | Validate assumptions and get user approval (required before implementation) |
343351
| `/spec-update` | As-built update after implementation |
344352
| `/spec-check` | Audit all specs for health issues |
353+
| `/spec-build` | Orchestrate full implementation from an approved spec (plan, build, review, close) |
354+
| `/spec-review` | Standalone deep implementation review against a spec |
345355
| `/specification-writing` | EARS format templates and acceptance criteria patterns |
346356

347357
### Directory Structure
348358

349359
```
350360
.specs/
351-
├── ROADMAP.md # Current version scope
352-
├── BACKLOG.md # Priority-graded feature backlog
353-
├── v0.1.0.md # Single-file spec (small versions)
354-
└── v0.2.0/ # Multi-feature version
355-
├── _overview.md # Parent linking sub-specs
356-
└── feature.md # Individual feature spec
361+
├── MILESTONES.md # Milestone tracker linking to feature specs
362+
├── BACKLOG.md # Priority-graded feature backlog
363+
├── auth/ # Domain folder
364+
│ ├── login-flow.md # Feature spec
365+
│ └── oauth.md # Feature spec
366+
└── search/ # Domain folder
367+
└── full-text.md # Feature spec
357368
```
358369

359-
Specs aim for ~200 lines each. Split by feature boundary when longer; link via a parent overview.
370+
All specs live in domain subfolders. Specs aim for ~200 lines each; split into separate specs in the domain folder when longer.
360371

361372
## Project Manager
362373

0 commit comments

Comments
 (0)