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
@@ -3,7 +3,15 @@
3
3
  # Runs non-blocking in background by default via setup.sh
4
4
  # All failures are warnings — this script never blocks container startup
5
5
 
6
- echo "[update-claude] Checking for Claude Code updates..."
6
+ # Log to file (simple append — process substitution breaks under disown)
7
+ LOG_FILE="${TMPDIR:-/tmp}/claude-update.log"
8
+
9
+ log() { echo "[update-claude] $(date '+%Y-%m-%d %H:%M:%S') $*" | tee -a "$LOG_FILE"; }
10
+
11
+ log "Checking for Claude Code updates..."
12
+
13
+ # === Clear nesting guard (postStartCommand may inherit from VS Code extension) ===
14
+ unset CLAUDECODE
7
15
 
8
16
  # === TMPDIR ===
9
17
  _TMPDIR="${TMPDIR:-/tmp}"
@@ -11,124 +19,58 @@ _TMPDIR="${TMPDIR:-/tmp}"
11
19
  # === LOCK FILE (prevent concurrent updates) ===
12
20
  LOCK_FILE="${_TMPDIR}/claude-update.lock"
13
21
  if ! mkdir "$LOCK_FILE" 2>/dev/null; then
14
- echo "[update-claude] Another update is already running, skipping"
15
- exit 0
22
+ log "Another update is already running, skipping"
23
+ exit 0
16
24
  fi
17
25
 
18
26
  # === CLEANUP TRAP ===
19
27
  cleanup() {
20
- rm -f "${_TMPDIR}/claude-update" 2>/dev/null || true
21
- rm -f "${_TMPDIR}/claude-update-manifest.json" 2>/dev/null || true
22
- rm -rf "$LOCK_FILE" 2>/dev/null || true
28
+ rm -f "${_TMPDIR}/claude-update" 2>/dev/null || true
29
+ rm -f "${_TMPDIR}/claude-update-manifest.json" 2>/dev/null || true
30
+ rm -rf "$LOCK_FILE" 2>/dev/null || true
23
31
  }
24
32
  trap cleanup EXIT
25
33
 
26
34
  # === VERIFY CLAUDE IS INSTALLED ===
27
35
  if ! command -v claude &>/dev/null; then
28
- echo "[update-claude] Claude Code not found, skipping update"
29
- exit 0
36
+ log "Claude Code not found, skipping update"
37
+ exit 0
30
38
  fi
31
39
 
32
- # === DETECT INSTALL METHOD ===
33
- CLAUDE_PATH=$(command -v claude)
34
- if [[ "$CLAUDE_PATH" != "/usr/local/bin/claude" ]]; then
35
- echo "[update-claude] Non-native install detected ($CLAUDE_PATH), skipping"
36
- exit 0
37
- fi
38
-
39
- # === VALIDATE DEPENDENCIES ===
40
- for dep in curl jq sha256sum sudo; do
41
- if ! command -v "$dep" &>/dev/null; then
42
- echo "[update-claude] WARNING: $dep not available, skipping update"
43
- exit 0
44
- fi
45
- done
46
-
47
- # === GET CURRENT VERSION ===
48
- CURRENT_VERSION=$(claude --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")
49
- echo "[update-claude] Current version: ${CURRENT_VERSION}"
50
-
51
- # === FETCH LATEST VERSION ===
52
- BASE_URL="https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases"
53
-
54
- LATEST_VERSION=$(curl -fsSL "${BASE_URL}/stable" 2>/dev/null)
55
- if [ -z "$LATEST_VERSION" ]; then
56
- echo "[update-claude] WARNING: Failed to fetch latest version, skipping"
57
- exit 0
40
+ # === ENSURE NATIVE BINARY EXISTS ===
41
+ # 'claude install' puts the binary at ~/.local/bin/claude (symlink to ~/.local/share/claude/versions/*)
42
+ # Legacy manual installs used /usr/local/bin/claude check both, prefer ~/.local
43
+ if [ -x "$HOME/.local/bin/claude" ]; then
44
+ NATIVE_BIN="$HOME/.local/bin/claude"
45
+ elif [ -x "/usr/local/bin/claude" ]; then
46
+ NATIVE_BIN="/usr/local/bin/claude"
47
+ else
48
+ NATIVE_BIN=""
58
49
  fi
59
-
60
- echo "[update-claude] Latest version: ${LATEST_VERSION}"
61
-
62
- # === COMPARE VERSIONS ===
63
- if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
64
- echo "[update-claude] Already up to date (${CURRENT_VERSION})"
65
- exit 0
50
+ if [ -z "$NATIVE_BIN" ]; then
51
+ log "Native binary not found, installing..."
52
+ if claude install 2>&1 | tee -a "$LOG_FILE"; then
53
+ log "Native binary installed successfully"
54
+ else
55
+ log "WARNING: 'claude install' failed, skipping"
56
+ exit 0
57
+ fi
58
+ # Skip update check on first install — next start will handle it
59
+ exit 0
66
60
  fi
67
61
 
68
- echo "[update-claude] Updating from ${CURRENT_VERSION} to ${LATEST_VERSION}..."
69
-
70
- # === DETECT PLATFORM ===
71
- ARCH=$(uname -m)
72
- case "${ARCH}" in
73
- x86_64)
74
- PLATFORM="linux-x64"
75
- ;;
76
- aarch64|arm64)
77
- PLATFORM="linux-arm64"
78
- ;;
79
- *)
80
- echo "[update-claude] WARNING: Unsupported architecture: ${ARCH}, skipping"
81
- exit 0
82
- ;;
83
- esac
84
-
85
- # Detect musl (Alpine Linux)
86
- if ldd --version 2>&1 | grep -qi musl; then
87
- PLATFORM="${PLATFORM}-musl"
62
+ # === CHECK FOR UPDATES ===
63
+ CURRENT_VERSION=$("$NATIVE_BIN" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")
64
+ log "Current version: ${CURRENT_VERSION}"
65
+
66
+ # Use the official update command (handles download, verification, and versioned install)
67
+ if "$NATIVE_BIN" update 2>&1 | tee -a "$LOG_FILE"; then
68
+ UPDATED_VERSION=$("$NATIVE_BIN" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")
69
+ if [ "$CURRENT_VERSION" != "$UPDATED_VERSION" ]; then
70
+ log "Updated Claude Code: ${CURRENT_VERSION} → ${UPDATED_VERSION}"
71
+ else
72
+ log "Already up to date (${CURRENT_VERSION})"
73
+ fi
74
+ else
75
+ log "WARNING: 'claude update' failed, skipping"
88
76
  fi
89
-
90
- echo "[update-claude] Platform: ${PLATFORM}"
91
-
92
- # === DOWNLOAD MANIFEST ===
93
- MANIFEST_URL="${BASE_URL}/${LATEST_VERSION}/manifest.json"
94
-
95
- if ! curl -fsSL "${MANIFEST_URL}" -o ${_TMPDIR}/claude-update-manifest.json 2>/dev/null; then
96
- echo "[update-claude] WARNING: Failed to download manifest, skipping"
97
- exit 0
98
- fi
99
-
100
- # === EXTRACT AND VERIFY CHECKSUM ===
101
- EXPECTED_CHECKSUM=$(jq -r ".platforms.\"${PLATFORM}\".checksum" ${_TMPDIR}/claude-update-manifest.json)
102
- if [ -z "${EXPECTED_CHECKSUM}" ] || [ "${EXPECTED_CHECKSUM}" = "null" ]; then
103
- echo "[update-claude] WARNING: Platform ${PLATFORM} not found in manifest, skipping"
104
- exit 0
105
- fi
106
-
107
- # === DOWNLOAD BINARY ===
108
- BINARY_URL="${BASE_URL}/${LATEST_VERSION}/${PLATFORM}/claude"
109
-
110
- if ! curl -fsSL "${BINARY_URL}" -o ${_TMPDIR}/claude-update 2>/dev/null; then
111
- echo "[update-claude] WARNING: Failed to download binary, skipping"
112
- exit 0
113
- fi
114
-
115
- # === VERIFY CHECKSUM ===
116
- ACTUAL_CHECKSUM=$(sha256sum ${_TMPDIR}/claude-update | cut -d' ' -f1)
117
-
118
- if [ "${ACTUAL_CHECKSUM}" != "${EXPECTED_CHECKSUM}" ]; then
119
- echo "[update-claude] WARNING: Checksum verification failed, skipping"
120
- echo "[update-claude] Expected: ${EXPECTED_CHECKSUM}"
121
- echo "[update-claude] Actual: ${ACTUAL_CHECKSUM}"
122
- exit 0
123
- fi
124
-
125
- # === INSTALL (atomic replace) ===
126
- chmod +x ${_TMPDIR}/claude-update
127
- if ! sudo mv ${_TMPDIR}/claude-update /usr/local/bin/claude; then
128
- echo "[update-claude] WARNING: Failed to install update (sudo mv failed), skipping"
129
- exit 0
130
- fi
131
-
132
- # === VERIFY UPDATE ===
133
- INSTALLED_VERSION=$(claude --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || echo "unknown")
134
- echo "[update-claude] Updated Claude Code: ${CURRENT_VERSION} → ${INSTALLED_VERSION}"
@@ -21,8 +21,9 @@ fi
21
21
  : "${SETUP_PLUGINS:=true}"
22
22
  : "${SETUP_UPDATE_CLAUDE:=true}"
23
23
  : "${SETUP_PROJECTS:=true}"
24
+ : "${SETUP_TERMINAL:=true}"
24
25
 
25
- export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES SETUP_AUTH SETUP_PLUGINS SETUP_UPDATE_CLAUDE SETUP_PROJECTS
26
+ export CLAUDE_CONFIG_DIR CONFIG_SOURCE_DIR SETUP_CONFIG SETUP_ALIASES SETUP_AUTH SETUP_PLUGINS SETUP_UPDATE_CLAUDE SETUP_PROJECTS SETUP_TERMINAL
26
27
 
27
28
  SETUP_START=$(date +%s)
28
29
  SETUP_RESULTS=()
@@ -64,22 +65,8 @@ run_script "$SCRIPT_DIR/setup-config.sh" "$SETUP_CONFIG"
64
65
  run_script "$SCRIPT_DIR/setup-aliases.sh" "$SETUP_ALIASES"
65
66
  run_script "$SCRIPT_DIR/setup-plugins.sh" "$SETUP_PLUGINS"
66
67
  run_script "$SCRIPT_DIR/setup-projects.sh" "$SETUP_PROJECTS"
67
-
68
- # Non-blocking: check for Claude Code updates in background
69
- if [ "$SETUP_UPDATE_CLAUDE" = "true" ]; then
70
- if [ -f "$SCRIPT_DIR/setup-update-claude.sh" ]; then
71
- echo " Claude Code update checking in background..."
72
- echo " (If 'claude' fails, wait a moment and retry)"
73
- bash "$SCRIPT_DIR/setup-update-claude.sh" &
74
- disown
75
- SETUP_RESULTS+=("setup-update-claude:ok")
76
- else
77
- SETUP_RESULTS+=("setup-update-claude:missing")
78
- fi
79
- else
80
- echo " setup-update-claude... skipped (disabled)"
81
- SETUP_RESULTS+=("setup-update-claude:disabled")
82
- fi
68
+ run_script "$SCRIPT_DIR/setup-terminal.sh" "$SETUP_TERMINAL"
69
+ run_script "$SCRIPT_DIR/setup-update-claude.sh" "$SETUP_UPDATE_CLAUDE"
83
70
 
84
71
  echo ""
85
72
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
package/README.md CHANGED
@@ -65,9 +65,9 @@ tree-sitter (JS/TS/Python), ast-grep, Pyright, TypeScript LSP
65
65
 
66
66
  tmux, agent-browser, claude-monitor, ccusage, ccburn, ccstatusline, ast-grep, tree-sitter, lsp-servers, biome, notify-hook, mcp-qdrant, mcp-reasoner, splitrail
67
67
 
68
- ### Agents (17) & Skills (16)
68
+ ### Agents (17) & Skills (17)
69
69
 
70
- The `code-directive` plugin includes specialized agents (architect, explorer, test-writer, security-auditor, etc.) and domain-specific coding reference skills (fastapi, svelte5, docker, testing, etc.).
70
+ The `code-directive` plugin includes 17 specialized agents (architect, explorer, test-writer, security-auditor, etc.) and 17 domain-specific coding reference skills (fastapi, svelte5, docker, testing, spec-refine, etc.).
71
71
 
72
72
  ## Quick Start
73
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeforge-dev",
3
- "version": "1.9.0",
3
+ "version": "1.11.0",
4
4
  "description": "Complete development container that sets up Claude Code with modular devcontainer features, modern dev tools, and persistent configurations. Drop it into any project and get a production-ready AI development environment in minutes.",
5
5
  "main": "setup.js",
6
6
  "bin": {
@@ -1,13 +0,0 @@
1
- # Roadmap
2
-
3
- What each version delivers and why.
4
-
5
- | Version | Status | Summary |
6
- |---------|--------|---------|
7
- | v0.1.0 | planned | [Initial release — describe core features] |
8
-
9
- ## Versioning
10
-
11
- - **Major**: Breaking changes to public APIs or data models
12
- - **Minor**: New features, non-breaking changes
13
- - **Patch**: Bug fixes, documentation, internal refactors