codeforge-dev 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/.devcontainer/.env +3 -0
  2. package/.devcontainer/CHANGELOG.md +125 -0
  3. package/.devcontainer/CLAUDE.md +41 -11
  4. package/.devcontainer/README.md +73 -3
  5. package/.devcontainer/config/defaults/main-system-prompt.md +187 -201
  6. package/.devcontainer/config/defaults/rules/session-search.md +66 -0
  7. package/.devcontainer/config/defaults/rules/spec-workflow.md +48 -13
  8. package/.devcontainer/config/defaults/settings.json +2 -1
  9. package/.devcontainer/config/defaults/writing-system-prompt.md +143 -0
  10. package/.devcontainer/config/file-manifest.json +12 -0
  11. package/.devcontainer/connect-external-terminal.sh +17 -17
  12. package/.devcontainer/devcontainer.json +150 -144
  13. package/.devcontainer/features/ccms/README.md +50 -0
  14. package/.devcontainer/features/ccms/devcontainer-feature.json +21 -0
  15. package/.devcontainer/features/ccms/install.sh +105 -0
  16. package/.devcontainer/features/ccstatusline/install.sh +24 -2
  17. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +8 -1
  18. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +5 -3
  19. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +1 -1
  20. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +7 -7
  21. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +1 -0
  22. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +22 -12
  23. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +11 -1
  24. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
  25. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/advisory-test-runner.py +186 -13
  26. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +15 -4
  27. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/inject-cwd.py +37 -0
  28. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +24 -0
  29. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py +4 -2
  30. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/SKILL.md +1 -1
  31. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/SKILL.md +353 -0
  32. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/references/review-checklist.md +175 -0
  33. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-check/SKILL.md +28 -15
  34. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/SKILL.md +16 -13
  35. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/backlog-template.md +19 -3
  36. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/milestones-template.md +32 -0
  37. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/SKILL.md +28 -20
  38. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/references/template.md +35 -6
  39. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-refine/SKILL.md +194 -0
  40. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-review/SKILL.md +229 -0
  41. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-update/SKILL.md +24 -2
  42. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +20 -13
  43. package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +38 -5
  44. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/.claude-plugin/plugin.json +7 -0
  45. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/hooks/hooks.json +17 -0
  46. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/__pycache__/guard-workspace-scope.cpython-314.pyc +0 -0
  47. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +132 -0
  48. package/.devcontainer/scripts/check-setup.sh +24 -25
  49. package/.devcontainer/scripts/setup-aliases.sh +95 -90
  50. package/.devcontainer/scripts/setup-projects.sh +172 -131
  51. package/.devcontainer/scripts/setup-terminal.sh +48 -0
  52. package/.devcontainer/scripts/setup-update-claude.sh +49 -107
  53. package/.devcontainer/scripts/setup.sh +4 -17
  54. package/README.md +2 -2
  55. package/package.json +1 -1
  56. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/roadmap-template.md +0 -13
@@ -20,5 +20,8 @@ SETUP_PLUGINS=true
20
20
  # Setup: auto-update Claude Code CLI to latest on container start (runs in background)
21
21
  SETUP_UPDATE_CLAUDE=true
22
22
 
23
+ # Setup: configure VS Code Shift+Enter keybinding for Claude Code terminal
24
+ SETUP_TERMINAL=true
25
+
23
26
  # Plugin blacklist (comma-separated plugin names to skip during auto-install)
24
27
  PLUGIN_BLACKLIST=""
@@ -1,5 +1,130 @@
1
1
  # CodeForge Devcontainer Changelog
2
2
 
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
+
72
+ ## [v1.10.0] - 2026-02-13
73
+
74
+ ### Added
75
+
76
+ #### New Skill: spec-refine (code-directive plugin — 26 skills total)
77
+ - **`/spec-refine`** — iterative 6-phase spec refinement: assumption mining, requirement validation (`[assumed]` → `[user-approved]`), acceptance criteria review, scope audit, and final approval gate
78
+
79
+ #### setup-terminal.sh
80
+ - New setup script configures VS Code Shift+Enter keybinding for Claude Code multi-line terminal input (idempotent, merges into existing keybindings.json)
81
+
82
+ ### Changed
83
+
84
+ #### Native Binary Preference
85
+ - **setup-aliases.sh** — introduces `_CLAUDE_BIN` variable resolution: prefers `~/.local/bin/claude` (official `claude install` location), falls back to `/usr/local/bin/claude`, then PATH. All aliases (`cc`, `claude`, `ccraw`) use `"$_CLAUDE_BIN"`
86
+ - **setup-update-claude.sh** — complete rewrite: delegates to `claude install` (first run) and `claude update` (subsequent starts) instead of manual binary download/checksum/swap. Logs to `/tmp/claude-update.log`
87
+
88
+ #### Smart Test Selection
89
+ - **advisory-test-runner.py** — rewritten to run only affected tests based on edited files. Maps source files to test files (pytest directory mirroring, vitest `--related`, jest `--findRelatedTests`, Go package mapping). Timeout reduced from 60s to 15s. Skips entirely if no files edited
90
+ - **hooks.json** — advisory-test-runner timeout reduced from 65s to 20s
91
+
92
+ #### Two-Level Project Detection
93
+ - **setup-projects.sh** — two-pass scanning: depth-1 directories with project markers registered directly; directories without markers treated as containers and children scanned. Recursive inotifywait with noise exclusion. Clean process group shutdown
94
+
95
+ #### Spec Approval Workflow
96
+ - **spec-writer agent** — adds `**Approval:** draft` field, requires `[assumed]` tagging on all requirements, adds `## Resolved Questions` section, references `/spec-refine` before implementation
97
+ - **spec-new skill** — pre-fills `**Approval:** draft`, notes features should come from backlog
98
+ - **spec-check skill** — adds Unapproved (high) and Assumed Requirements (medium) issue checks, Approval column in health table, approval summary
99
+ - **spec-update skill** — minor alignment with approval workflow
100
+ - **spec-init templates** — backlog template expanded with P0–P3 priority grades + Infrastructure section; roadmap template rewritten with pull-from-backlog workflow
101
+ - **specification-writing skill** — updated with approval field and requirement tagging guidance
102
+
103
+ #### Spec Workflow Completeness
104
+ - **spec-workflow.md (global rule)** — softened 200-line hard cap to "aim for ~200"; added approval workflow rules (spec-refine gate, requirement tags, spec-reminder hook); added `**Approval:**` and `## Resolved Questions` to standard template
105
+ - **main-system-prompt.md** — softened 4× hard "≤200 lines" references to "~200 lines"
106
+ - **spec-new skill** — fixed "capped at 200" internal contradiction; added explanation of what `/spec-refine` does and why
107
+ - **spec-new template** — added Approval Workflow section explaining `[assumed]`/`[user-approved]` tags and `draft`/`user-approved` status
108
+ - **spec-update skill** — added approval gate warning for draft specs; added spec-reminder hook documentation; added approval validation to checklist
109
+ - **spec-check skill** — added `implemented + draft` (High) and `inconsistent approval` (High) checks
110
+ - **spec-init skill** — expanded next-steps with full lifecycle (backlog → roadmap → spec → refine → implement → update → check)
111
+ - **spec-reminder.py** — added `/spec-refine` mention in advisory message for draft specs
112
+
113
+ #### Documentation Sizing
114
+ - **Relaxed 200-line hard cap** to "aim for ~200 lines" across global rule, system prompt, spec-new skill, architect agent, doc-writer agent, documentation-patterns skill, and spec-check skill
115
+
116
+ #### Other
117
+ - **setup.sh** — added `SETUP_TERMINAL` flag, normalized update-claude invocation via `run_script` helper
118
+ - **check-setup.sh** — removed checks for disabled features (shfmt, shellcheck, hadolint, dprint); checks RC files for alias instead of `type cc`
119
+ - **connect-external-terminal.sh** — uses `${WORKSPACE_ROOT:-/workspaces}` instead of hardcoded path
120
+ - **devcontainer.json** — formatting normalization
121
+ - **main-system-prompt.md** — updates for spec approval workflow and requirement tagging
122
+
123
+ ### Removed
124
+ - **test-project/README.md** — deleted (no longer needed)
125
+
126
+ ---
127
+
3
128
  ## [v1.9.0] - 2026-02-10
4
129
 
5
130
  ### Added
@@ -14,7 +14,8 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
14
14
  │ │ └── defaults/ # Files copied per manifest
15
15
  │ │ ├── settings.json # Claude Code settings
16
16
  │ │ ├── keybindings.json # Claude Code keybindings
17
- │ │ └── main-system-prompt.md
17
+ │ │ ├── main-system-prompt.md
18
+ │ │ └── writing-system-prompt.md
18
19
  │ ├── features/ # Custom devcontainer features
19
20
  │ ├── plugins/ # Local plugin marketplace
20
21
  │ │ └── devs-marketplace/
@@ -22,7 +23,7 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
22
23
  ├── .claude/ # Runtime Claude config (created on first run)
23
24
  │ ├── settings.json # Active settings (managed by file-manifest.json)
24
25
  │ ├── keybindings.json # Active keybindings
25
- │ └── system-prompt.md # Active system prompt
26
+ │ └── main-system-prompt.md # Active system prompt
26
27
  └── .gh/ # GitHub CLI config (persists across rebuilds)
27
28
  └── hosts.yml # Authenticated hosts
28
29
  ```
@@ -37,6 +38,7 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
37
38
  | `config/defaults/settings.json` | Claude Code defaults: model, tokens, permissions, plugins |
38
39
  | `config/defaults/keybindings.json` | Claude Code keybindings (empty by default — customizable) |
39
40
  | `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 |
40
42
 
41
43
  > **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`.
42
44
 
@@ -44,13 +46,17 @@ CodeForge devcontainer for AI-assisted development with Claude Code.
44
46
 
45
47
  | Command | Purpose |
46
48
  |---------|---------|
47
- | `claude` | Run Claude Code with auto-configuration (creates local `.claude/` if needed) |
49
+ | `claude` | Run Claude Code with auto-configuration (prefers native binary at `~/.local/bin/claude`) |
48
50
  | `cc` | Shorthand for `claude` with config |
49
51
  | `ccraw` | Vanilla Claude Code without any config (bypasses function override) |
52
+ | `ccw` | Shorthand for `claude` with writing system prompt |
50
53
  | `ccusage` | Analyze token usage history |
54
+ | `ccburn` | Real-time token burn rate visualization |
55
+ | `agent-browser` | Headless Chromium for browser automation (Playwright-based) |
51
56
  | `gh` | GitHub CLI for repo operations |
52
57
  | `uv` | Fast Python package manager |
53
58
  | `ast-grep` | Structural code search |
59
+ | `ccms` | Search Claude Code session history (project-scoped) |
54
60
  | `cc-tools` | List all installed tools with version info |
55
61
  | `check-setup` | Verify CodeForge setup health |
56
62
 
@@ -89,8 +95,19 @@ Every local feature supports `"version": "none"` to skip installation entirely.
89
95
 
90
96
  When `version` is set to `"none"`, the feature's `install.sh` exits immediately with a skip message. The feature entry stays in `devcontainer.json` so re-enabling is a one-word change.
91
97
 
98
+ **Currently disabled features** (not needed for Python/JS/TS workflow):
99
+
100
+ | Feature | Handles | Reason |
101
+ |---------|---------|--------|
102
+ | `shfmt` | Shell formatting | Not needed — Python/JS/TS only |
103
+ | `shellcheck` | Shell linting | Not needed — Python/JS/TS only |
104
+ | `hadolint` | Dockerfile linting | Not needed — Python/JS/TS only |
105
+ | `dprint` | Markdown/YAML/TOML/Dockerfile formatting | Not needed — Python/JS/TS only |
106
+
107
+ The auto-formatter and auto-linter plugins gracefully skip missing tools at runtime.
108
+
92
109
  **All local features support this pattern:**
93
- 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
94
111
 
95
112
  **External features with `version: "none"` support:**
96
113
  `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)
@@ -98,6 +115,9 @@ ast-grep, biome, ccstatusline, claude-monitor, dprint, hadolint, lsp-servers, mc
98
115
  **External features without `version: "none"` support:**
99
116
  `ghcr.io/devcontainers-extra/features/uv`, `ghcr.io/anthropics/devcontainer-features/claude-code`, `ghcr.io/nickmccurdy/bun`
100
117
 
118
+ **External features with `version: "none"` support (Rust):**
119
+ `ghcr.io/devcontainers/features/rust` (official Microsoft feature)
120
+
101
121
  > **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`:
102
122
  > ```bash
103
123
  > if [ "${VERSION}" = "none" ]; then
@@ -114,12 +134,20 @@ Scripts in `./scripts/` run via `postStartCommand`:
114
134
  |--------|---------|
115
135
  | `setup.sh` | Main orchestrator |
116
136
  | `setup-config.sh` | Copies config files per `config/file-manifest.json` to destinations |
117
- | `setup-aliases.sh` | Creates `cc`/`claude`/`ccraw` shell aliases |
137
+ | `setup-aliases.sh` | Creates `cc`/`claude`/`ccraw`/`ccw` shell aliases (prefers native binary at `~/.local/bin/claude` via `_CLAUDE_BIN`) |
118
138
  | `setup-plugins.sh` | Registers local marketplace + installs official Anthropic plugins |
119
- | `setup-update-claude.sh` | Background auto-update of Claude Code binary |
139
+ | `setup-update-claude.sh` | Installs native Claude Code binary on first run; background auto-updates on subsequent starts |
140
+ | `setup-terminal.sh` | Configures VS Code Shift+Enter keybinding for Claude Code multi-line input |
120
141
  | `setup-projects.sh` | Auto-detects projects for VS Code Project Manager |
121
142
  | `setup-symlink-claude.sh` | Symlinks ~/.claude for third-party tool compatibility |
122
143
 
144
+ ### External Terminal
145
+
146
+ `connect-external-terminal.sh` connects to the running devcontainer from an external terminal with tmux support for Claude Code Agent Teams split-pane workflows. Run from the host:
147
+ ```bash
148
+ .devcontainer/connect-external-terminal.sh
149
+ ```
150
+
123
151
  ## Installed Plugins
124
152
 
125
153
  Plugins are declared in `config/defaults/settings.json` under `enabledPlugins` and auto-activated on container start:
@@ -133,9 +161,10 @@ Plugins are declared in `config/defaults/settings.json` under `enabledPlugins` a
133
161
  - `notify-hook@devs-marketplace` — Desktop notifications on completion
134
162
  - `dangerous-command-blocker@devs-marketplace` — Blocks destructive bash commands
135
163
  - `protected-files-guard@devs-marketplace` — Blocks edits to secrets/lock files
136
- - `auto-formatter@devs-marketplace` — Batch-formats edited files at Stop (Ruff/Black for Python, gofmt for Go, Biome for JS/TS/CSS/JSON/GraphQL/HTML, shfmt for Shell, dprint for Markdown/YAML/TOML/Dockerfile, rustfmt for Rust)
137
- - `auto-linter@devs-marketplace` — Auto-lints edited files at Stop (Pyright + Ruff for Python, Biome for JS/TS/CSS/GraphQL, ShellCheck for Shell, go vet for Go, hadolint for Dockerfile, clippy for Rust)
138
- - `code-directive@devs-marketplace` — 17 custom agents, 16 skills, syntax validation, skill suggestions, agent redirect hook
164
+ - `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
+ - `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)
166
+ - `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
139
168
 
140
169
  ### Local Marketplace
141
170
 
@@ -151,12 +180,13 @@ plugins/devs-marketplace/
151
180
  ├── auto-formatter/ # Batch formatter (Stop hook)
152
181
  ├── auto-linter/ # Pyright linter
153
182
  ├── code-directive/ # Agents, skills + hooks
183
+ ├── workspace-scope-guard/ # Workspace scope enforcement
154
184
  └── ...
155
185
  ```
156
186
 
157
187
  ## Agents & Skills
158
188
 
159
- The `code-directive` plugin includes 17 custom agent definitions and 16 coding reference skills.
189
+ The `code-directive` plugin includes 17 custom agent definitions and 28 coding reference skills.
160
190
 
161
191
  **Agents** (`plugins/devs-marketplace/plugins/code-directive/agents/`):
162
192
  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
@@ -164,7 +194,7 @@ architect, bash-exec, claude-guide, debug-logs, dependency-analyst, doc-writer,
164
194
  The `redirect-builtin-agents.py` hook (PreToolUse/Task) transparently swaps built-in agent types to these custom agents (e.g., Explore→explorer, Plan→architect).
165
195
 
166
196
  **Skills** (`plugins/devs-marketplace/plugins/code-directive/skills/`):
167
- claude-agent-sdk, claude-code-headless, debugging, docker, docker-py, fastapi, git-forensics, performance-profiling, pydantic-ai, refactoring-patterns, security-checklist, skill-building, 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
168
198
 
169
199
  ## VS Code Keybinding Conflicts
170
200
 
@@ -243,7 +243,7 @@ For conflicting shortcuts, use Meta (Alt) variants or add custom keybindings.
243
243
 
244
244
  ### System Prompt
245
245
 
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.
247
247
 
248
248
  ## Custom Features
249
249
 
@@ -265,6 +265,14 @@ CodeForge includes several custom devcontainer features:
265
265
  | `mcp-qdrant` | Qdrant vector database MCP server (optional) |
266
266
  | `mcp-reasoner` | Enhanced AI reasoning MCP server (optional) |
267
267
 
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
+
268
276
  ## Agents & Skills
269
277
 
270
278
  The `code-directive` plugin includes specialized agent definitions and coding reference skills.
@@ -293,11 +301,73 @@ Agent definitions in `plugins/devs-marketplace/plugins/code-directive/agents/` p
293
301
  | `statusline-config` | ccstatusline configuration |
294
302
  | `test-writer` | Test authoring with pass verification |
295
303
 
296
- ### Skills (16)
304
+ ### Skills (17)
297
305
 
298
306
  Skills in `plugins/devs-marketplace/plugins/code-directive/skills/` provide domain-specific coding references:
299
307
 
300
- `claude-agent-sdk` · `claude-code-headless` · `debugging` · `docker` · `docker-py` · `fastapi` · `git-forensics` · `performance-profiling` · `pydantic-ai` · `refactoring-patterns` · `security-checklist` · `skill-building` · `specification-writing` · `sqlite` · `svelte5` · `testing`
308
+ `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`
309
+
310
+ ## Specification Workflow
311
+
312
+ CodeForge includes a specification-driven development workflow. Every non-trivial feature gets a spec before implementation begins.
313
+
314
+ ### Quick Start
315
+
316
+ ```bash
317
+ /spec-init # Bootstrap .specs/ directory (first time only)
318
+ /spec-new auth-flow # Create a feature spec (domain is inferred)
319
+ /spec-refine auth-flow # Validate assumptions with user
320
+ # ... implement the feature ...
321
+ /spec-update auth-flow # As-built update after implementation
322
+ /spec-check # Audit all specs for health
323
+ ```
324
+
325
+ ### The Lifecycle
326
+
327
+ 1. **Backlog** — features live in `.specs/BACKLOG.md` with priority grades (P0–P3)
328
+ 2. **Milestone** — when starting a milestone, pull features from backlog into `.specs/MILESTONES.md`
329
+ 3. **Spec** — `/spec-new` creates a spec from the standard template with all requirements tagged `[assumed]`
330
+ 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.**
331
+ 5. **Implement** — build the feature using the spec's acceptance criteria as the definition of done
332
+ 6. **Update** — `/spec-update` performs the as-built update: sets status, checks off criteria, adds implementation notes
333
+ 7. **Health check** — `/spec-check` audits all specs for staleness, missing sections, unapproved status, and other issues
334
+
335
+ ### Approval Workflow
336
+
337
+ Specs use a two-level approval system:
338
+
339
+ - **Requirement-level:** each requirement starts as `[assumed]` (AI hypothesis) and becomes `[user-approved]` after explicit user validation via `/spec-refine`
340
+ - **Spec-level:** the `**Approval:**` field starts as `draft` and becomes `user-approved` when all requirements pass review
341
+
342
+ A spec-reminder advisory hook fires at Stop when code was modified but specs weren't updated.
343
+
344
+ ### Skills Reference
345
+
346
+ | Skill | Purpose |
347
+ |-------|---------|
348
+ | `/spec-init` | Bootstrap `.specs/` directory with MILESTONES and BACKLOG |
349
+ | `/spec-new` | Create a feature spec from the standard template |
350
+ | `/spec-refine` | Validate assumptions and get user approval (required before implementation) |
351
+ | `/spec-update` | As-built update after implementation |
352
+ | `/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 |
355
+ | `/specification-writing` | EARS format templates and acceptance criteria patterns |
356
+
357
+ ### Directory Structure
358
+
359
+ ```
360
+ .specs/
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
368
+ ```
369
+
370
+ All specs live in domain subfolders. Specs aim for ~200 lines each; split into separate specs in the domain folder when longer.
301
371
 
302
372
  ## Project Manager
303
373