Skip to content

Commit 8c9683e

Browse files
committed
Fix review issues: corrupted checksums, var ordering, stale links
Review fixes from 4-agent code review: - setup.js: Handle corrupted checksums JSON gracefully (try/catch) - setup.js: Generate checksums from source, not destination on fresh install - setup.js: Use regex with /g flag in expandVars for multiple occurrences - setup.sh: Fix variable ordering — set CODEFORGE_DIR before CONFIG_SOURCE_DIR - setup.sh: Unset CONFIG_SOURCE_DIR after deprecation guard fires - .gitignore: Remove duplicate .devcontainer/ un-ignore and stale config paths - architecture.md: Add missing orchestrator-system-prompt.md and migration step - README.md: Fix dead links to removed docs/ directory, point to docs site
1 parent ea1c2dd commit 8c9683e

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

.devcontainer/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ The `setup-projects.sh` script auto-detects projects under `/workspaces/` and ma
432432

433433
## Troubleshooting
434434

435-
Common issues and solutions. For detailed troubleshooting, see [docs/troubleshooting.md](docs/troubleshooting.md).
435+
Common issues and solutions. For detailed troubleshooting, see the [Troubleshooting](https://anexileddev.github.io/CodeForge/reference/troubleshooting/) page on the docs site.
436436

437437
| Problem | Solution |
438438
|---------|----------|
@@ -447,11 +447,11 @@ Common issues and solutions. For detailed troubleshooting, see [docs/troubleshoo
447447
## Further Reading
448448

449449
**CodeForge Documentation**:
450-
- [Configuration Reference](docs/configuration-reference.md) — all env vars and config options
451-
- [Plugin System](docs/plugins.md) — plugin architecture and per-plugin docs
452-
- [Optional Features](docs/optional-features.md) — mcp-qdrant and other optional components, disabling features
453-
- [Keybinding Customization](docs/keybindings.md) — resolving VS Code conflicts
454-
- [Troubleshooting](docs/troubleshooting.md) — common issues and solutions
450+
- [Configuration Reference](https://anexileddev.github.io/CodeForge/customization/configuration/) — all env vars and config options
451+
- [Plugin System](https://anexileddev.github.io/CodeForge/plugins/) — plugin architecture and per-plugin docs
452+
- [Optional Features](https://anexileddev.github.io/CodeForge/customization/optional-features/) — mcp-qdrant and other optional components, disabling features
453+
- [Keybinding Customization](https://anexileddev.github.io/CodeForge/customization/keybindings/) — resolving VS Code conflicts
454+
- [Troubleshooting](https://anexileddev.github.io/CodeForge/reference/troubleshooting/) — common issues and solutions
455455

456456
**External**:
457457
- [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)

.devcontainer/scripts/setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ if [ "$CONFIG_SOURCE_DIR" = "$DEVCONTAINER_DIR/config" ] || [ "$CONFIG_SOURCE_DI
4747
echo "[setup] WARNING: CONFIG_SOURCE_DIR pointing to .devcontainer/config is deprecated (moved to .codeforge in v2.0)"
4848
echo "[setup] Redirecting to .codeforge."
4949
CODEFORGE_DIR="${WORKSPACE_ROOT:?}/.codeforge"
50+
unset CONFIG_SOURCE_DIR
5051
if [ -f "$ENV_FILE" ]; then
5152
sed -i 's|^CONFIG_SOURCE_DIR=.*\.devcontainer/config.*|# CONFIG_SOURCE_DIR removed (v2.0: now uses .codeforge)|' "$ENV_FILE"
5253
echo "[setup] .env updated — CONFIG_SOURCE_DIR line commented out."
@@ -55,8 +56,8 @@ fi
5556

5657
# Apply defaults for any unset variables
5758
: "${CLAUDE_CONFIG_DIR:=$HOME/.claude}"
58-
: "${CONFIG_SOURCE_DIR:=$DEVCONTAINER_DIR/config}"
5959
: "${CODEFORGE_DIR:=${WORKSPACE_ROOT:?}/.codeforge}"
60+
: "${CONFIG_SOURCE_DIR:=$CODEFORGE_DIR}"
6061
: "${SETUP_CONFIG:=true}"
6162
: "${SETUP_ALIASES:=true}"
6263
: "${SETUP_AUTH:=true}"

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ node_modules/
6767
.*
6868
!.devcontainer/
6969
!.devcontainer/**/.claude-plugin/
70-
!.devcontainer/
71-
!.devcontainer/**/.claude-plugin/**/.claude-plugin/
7270
!.codeforge/
7371
!.git/
7472
!.github/
@@ -81,8 +79,6 @@ node_modules/
8179
.codeforge/.markers/
8280
# Un-ignore .codeforge-preserve (user-editable, should be tracked)
8381
!.codeforge/.codeforge-preserve
84-
.devcontainer/config/claude/output-styles/strict-development.md
85-
.devcontainer/config/claude/mcp.json
8682

8783
# Docs
8884
docs/node_modules/

docs/src/content/docs/reference/architecture.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ CodeForge ships 38 skills across the skill-engine, spec-workflow, ticket-workflo
161161
| +-- settings.json # Claude Code settings (model, plugins, env vars)
162162
| +-- keybindings.json # Keyboard shortcuts
163163
| +-- main-system-prompt.md # Development system prompt
164+
| +-- orchestrator-system-prompt.md # Orchestrator mode system prompt
164165
| +-- writing-system-prompt.md # Writing mode system prompt
165166
| +-- rules/ # Default rules deployed to .claude/rules/
166167
| +-- spec-workflow.md
@@ -206,14 +207,15 @@ devcontainer.json
206207
|
207208
v
208209
[postStartCommand] setup.sh orchestrates:
209-
1. setup-migrate-claude.sh -- Migrate Claude config from old location
210-
2. setup-auth.sh -- Git/NPM authentication
211-
3. setup-config.sh -- Deploy settings, prompts, rules via file-manifest.json
212-
4. setup-aliases.sh -- Write shell aliases to .bashrc/.zshrc
213-
5. setup-plugins.sh -- Sync plugins from marketplace
214-
6. setup-projects.sh -- Detect projects, configure Project Manager
215-
7. setup-terminal.sh -- Configure terminal settings
216-
8. setup-update-claude.sh -- Update Claude Code if needed (background)
210+
1. setup-migrate-claude.sh -- Migrate Claude config from old location
211+
2. setup-migrate-codeforge.sh -- Migrate legacy config to .codeforge/
212+
3. setup-auth.sh -- Git/NPM authentication
213+
4. setup-config.sh -- Deploy settings, prompts, rules via file-manifest.json
214+
5. setup-aliases.sh -- Write shell aliases to .bashrc/.zshrc
215+
6. setup-plugins.sh -- Sync plugins from marketplace
216+
7. setup-projects.sh -- Detect projects, configure Project Manager
217+
8. setup-terminal.sh -- Configure terminal settings
218+
9. setup-update-claude.sh -- Update Claude Code if needed (background)
217219
```
218220

219221
### Session Lifecycle

setup.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,18 @@ function readChecksums(codeforgeDir) {
125125
}
126126

127127
const latest = files[files.length - 1];
128-
return JSON.parse(fs.readFileSync(path.join(checksumsDir, latest), "utf-8"));
128+
try {
129+
return JSON.parse(
130+
fs.readFileSync(path.join(checksumsDir, latest), "utf-8"),
131+
);
132+
} catch {
133+
console.log(
134+
" Warning: Could not read checksums from " +
135+
latest +
136+
", treating as fresh install.",
137+
);
138+
return { files: {} };
139+
}
129140
}
130141

131142
// ── syncCodeforgeDirectory ───────────────────────────────────────
@@ -447,7 +458,7 @@ function main() {
447458

448459
if (fs.existsSync(codeforgeSrc)) {
449460
copyDirectory(codeforgeSrc, codeforgeDest);
450-
const checksums = generateChecksums(codeforgeDest);
461+
const checksums = generateChecksums(codeforgeSrc);
451462
writeChecksums(codeforgeDest, packageVersion, checksums);
452463
}
453464

@@ -483,9 +494,9 @@ function configApply() {
483494

484495
function expandVars(val) {
485496
return val
486-
.replace("${CLAUDE_CONFIG_DIR}", claudeConfigDir)
487-
.replace("${WORKSPACE_ROOT}", workspaceRoot)
488-
.replace("${HOME}", process.env.HOME || "/home/vscode");
497+
.replace(/\$\{CLAUDE_CONFIG_DIR\}/g, claudeConfigDir)
498+
.replace(/\$\{WORKSPACE_ROOT\}/g, workspaceRoot)
499+
.replace(/\$\{HOME\}/g, process.env.HOME || "/home/vscode");
489500
}
490501

491502
console.log("");

0 commit comments

Comments
 (0)