vibe-forge 0.4.0 → 0.8.1
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.
- package/.claude/commands/clear-attention.md +63 -63
- package/.claude/commands/compact-context.md +52 -0
- package/.claude/commands/configure-vcs.md +102 -102
- package/.claude/commands/forge.md +218 -171
- package/.claude/commands/need-help.md +77 -77
- package/.claude/commands/update-status.md +64 -64
- package/.claude/commands/worker-loop.md +106 -106
- package/.claude/hooks/worker-loop.js +217 -187
- package/.claude/scripts/setup-worker-loop.sh +45 -45
- package/.claude/settings.json +89 -0
- package/LICENSE +21 -21
- package/README.md +253 -232
- package/agents/aegis/personality.md +303 -269
- package/agents/anvil/personality.md +278 -240
- package/agents/architect/personality.md +260 -234
- package/agents/crucible/personality.md +362 -309
- package/agents/crucible-x/personality.md +210 -0
- package/agents/ember/personality.md +293 -265
- package/agents/flux/personality.md +248 -0
- package/agents/furnace/personality.md +342 -291
- package/agents/herald/personality.md +249 -247
- package/agents/loki/personality.md +108 -0
- package/agents/oracle/personality.md +284 -0
- package/agents/pixel/personality.md +140 -0
- package/agents/planning-hub/personality.md +473 -251
- package/agents/scribe/personality.md +253 -251
- package/agents/slag/personality.md +268 -0
- package/agents/temper/personality.md +270 -0
- package/bin/cli.js +372 -325
- package/bin/dashboard/api/agents.js +333 -0
- package/bin/dashboard/api/dispatch.js +507 -0
- package/bin/dashboard/api/tasks.js +416 -0
- package/bin/dashboard/public/assets/index-BpHfsx1r.js +2 -0
- package/bin/dashboard/public/assets/index-QODv4Zn9.css +1 -0
- package/bin/dashboard/public/index.html +14 -0
- package/bin/dashboard/server.js +645 -0
- package/bin/forge-daemon.sh +477 -851
- package/bin/forge-setup.sh +661 -645
- package/bin/forge-spawn.sh +164 -164
- package/bin/forge.cmd +83 -83
- package/bin/forge.sh +566 -387
- package/bin/lib/agents.sh +177 -177
- package/bin/lib/check-aliases.js +50 -0
- package/bin/lib/colors.sh +44 -44
- package/bin/lib/config.sh +347 -313
- package/bin/lib/constants.sh +241 -206
- package/bin/lib/daemon/budgets.sh +107 -0
- package/bin/lib/daemon/dependencies.sh +146 -0
- package/bin/lib/daemon/display.sh +128 -0
- package/bin/lib/daemon/notifications.sh +273 -0
- package/bin/lib/daemon/routing.sh +93 -0
- package/bin/lib/daemon/state.sh +163 -0
- package/bin/lib/daemon/sync.sh +103 -0
- package/bin/lib/database.sh +357 -305
- package/bin/lib/frontmatter.js +106 -0
- package/bin/lib/heimdall-setup.js +113 -0
- package/bin/lib/heimdall.js +265 -0
- package/bin/lib/json.sh +264 -258
- package/bin/lib/terminal.js +452 -446
- package/bin/lib/util.sh +126 -126
- package/bin/lib/vcs.js +349 -349
- package/config/agent-manifest.yaml +237 -243
- package/config/agents.json +207 -132
- package/config/task-template.md +159 -87
- package/config/task-types.yaml +111 -106
- package/config/templates/handoff-template.md +40 -0
- package/context/agent-overrides/README.md +41 -0
- package/context/architecture.md +42 -0
- package/context/modern-conventions.md +129 -129
- package/context/project-context-template.md +122 -122
- package/docs/agents.md +473 -409
- package/docs/architecture.md +194 -162
- package/docs/commands.md +451 -388
- package/docs/security.md +195 -144
- package/package.json +77 -50
- package/.claude/settings.local.json +0 -33
- package/agents/forge-master/capabilities.md +0 -144
- package/agents/forge-master/context-template.md +0 -128
- package/agents/forge-master/personality.md +0 -138
- package/agents/sentinel/personality.md +0 -194
- package/context/forge-state.yaml +0 -19
- package/docs/TODO.md +0 -150
- package/docs/getting-started.md +0 -243
- package/docs/npm-publishing.md +0 -95
- package/docs/workflows/README.md +0 -32
- package/docs/workflows/azure-devops.md +0 -108
- package/docs/workflows/bitbucket.md +0 -104
- package/docs/workflows/git-only.md +0 -130
- package/docs/workflows/gitea.md +0 -168
- package/docs/workflows/github.md +0 -103
- package/docs/workflows/gitlab.md +0 -105
- package/docs/workflows.md +0 -454
- package/tasks/completed/ARCH-001-duplicate-agent-config.md +0 -121
- package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +0 -88
- package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +0 -77
- package/tasks/completed/ARCH-009-test-organization.md +0 -78
- package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +0 -94
- package/tasks/completed/ARCH-012-tmp-files-in-root.md +0 -71
- package/tasks/completed/ARCH-013-exit-code-constants.md +0 -65
- package/tasks/completed/ARCH-014-sed-incompatibility.md +0 -96
- package/tasks/completed/ARCH-015-docs-todo-tracking.md +0 -83
- package/tasks/completed/CLEAN-001.md +0 -38
- package/tasks/completed/CLEAN-003.md +0 -47
- package/tasks/completed/CLEAN-004.md +0 -56
- package/tasks/completed/CLEAN-005.md +0 -75
- package/tasks/completed/CLEAN-006.md +0 -47
- package/tasks/completed/CLEAN-007.md +0 -34
- package/tasks/completed/CLEAN-008.md +0 -49
- package/tasks/completed/CLEAN-012.md +0 -58
- package/tasks/completed/CLEAN-013.md +0 -45
- package/tasks/completed/SEC-001-sql-injection-fix.md +0 -58
- package/tasks/completed/SEC-002-notification-injection-fix.md +0 -45
- package/tasks/completed/SEC-003-eval-injection-fix.md +0 -54
- package/tasks/completed/SEC-004-pid-race-condition-fix.md +0 -49
- package/tasks/completed/SEC-005-worker-loop-path-fix.md +0 -51
- package/tasks/completed/SEC-006-eval-agent-names.md +0 -55
- package/tasks/completed/SEC-007-spawn-escaping.md +0 -67
- package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +0 -72
- package/tasks/pending/ARCH-005-missing-src-directory.md +0 -95
- package/tasks/pending/ARCH-006-task-template-location.md +0 -64
- package/tasks/pending/ARCH-007-daemon-monolith.md +0 -91
- package/tasks/pending/ARCH-008-forge-master-vs-hub.md +0 -81
- package/tasks/pending/ARCH-010-missing-index-files.md +0 -84
- package/tasks/pending/CLEAN-002.md +0 -29
- package/tasks/pending/CLEAN-009.md +0 -31
- package/tasks/pending/CLEAN-010.md +0 -30
- package/tasks/pending/CLEAN-011.md +0 -30
- package/tasks/pending/CLEAN-014.md +0 -32
- package/tasks/review/task-001.md +0 -78
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-003
|
|
3
|
-
title: "Remove duplicate worker-loop hook implementations"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: medium
|
|
6
|
-
assigned_to: architect
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: architect-review
|
|
9
|
-
completed_at: 2026-01-16T00:00:00Z
|
|
10
|
-
completed_by: furnace
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
Worker loop stop hook is implemented in both Bash and Node.js with nearly identical logic, creating maintenance burden.
|
|
15
|
-
|
|
16
|
-
## Current State
|
|
17
|
-
Two implementations exist:
|
|
18
|
-
- `.claude/hooks/worker-loop.sh` - Bash implementation
|
|
19
|
-
- `.claude/hooks/worker-loop.js` - Node.js implementation
|
|
20
|
-
|
|
21
|
-
Both implement the same logic:
|
|
22
|
-
1. Check for state file or config-based activation
|
|
23
|
-
2. Count pending/needs-changes tasks
|
|
24
|
-
3. Decide whether to block exit or allow
|
|
25
|
-
4. Output JSON with decision
|
|
26
|
-
|
|
27
|
-
The `.claude/settings.local.json` uses the Node.js version:
|
|
28
|
-
```json
|
|
29
|
-
"hooks": {
|
|
30
|
-
"Stop": [{ "command": "node .claude/hooks/worker-loop.js" }]
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Problems:
|
|
35
|
-
- Duplicate code to maintain
|
|
36
|
-
- Logic could drift between implementations
|
|
37
|
-
- Confusion about which is canonical
|
|
38
|
-
- Bash version has path issues noted in SEC-005
|
|
39
|
-
|
|
40
|
-
## Proposed State
|
|
41
|
-
Single implementation:
|
|
42
|
-
|
|
43
|
-
1. **Keep Node.js only** (recommended)
|
|
44
|
-
- Already used in settings.local.json
|
|
45
|
-
- Better cross-platform compatibility
|
|
46
|
-
- Easier JSON handling
|
|
47
|
-
- Delete worker-loop.sh
|
|
48
|
-
|
|
49
|
-
2. **Alternative: Keep Bash only**
|
|
50
|
-
- Change settings.local.json to use bash
|
|
51
|
-
- Fix path issues from SEC-005
|
|
52
|
-
- Delete worker-loop.js
|
|
53
|
-
|
|
54
|
-
## Affected Files
|
|
55
|
-
- G:\dev\vibe-forge\.claude\hooks\worker-loop.sh
|
|
56
|
-
- G:\dev\vibe-forge\.claude\hooks\worker-loop.js
|
|
57
|
-
- G:\dev\vibe-forge\.claude\settings.local.json
|
|
58
|
-
|
|
59
|
-
## Migration/Remediation Steps
|
|
60
|
-
1. Verify Node.js implementation is complete and working
|
|
61
|
-
2. Ensure settings.local.json points to Node.js version (currently does)
|
|
62
|
-
3. Delete worker-loop.sh
|
|
63
|
-
4. Update any documentation referring to bash hook
|
|
64
|
-
5. Test worker loop functionality end-to-end
|
|
65
|
-
|
|
66
|
-
## Acceptance Criteria
|
|
67
|
-
- [x] Only one hook implementation exists
|
|
68
|
-
- [x] settings.local.json correctly configured
|
|
69
|
-
- [x] Worker loop functionality works correctly
|
|
70
|
-
- [x] Documentation updated
|
|
71
|
-
|
|
72
|
-
## Resolution
|
|
73
|
-
Removed `.claude/hooks/worker-loop.sh` (Bash version) and kept the Node.js implementation as the single source of truth. Updated documentation in:
|
|
74
|
-
- `.claude/commands/worker-loop.md` - line 86 now references worker-loop.js
|
|
75
|
-
- `docs/TODO.md` - line 90 now references worker-loop.js
|
|
76
|
-
|
|
77
|
-
The Node.js version is already active in settings.local.json and provides better cross-platform compatibility.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-009
|
|
3
|
-
title: "Improve test organization and re-enable shell tests"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: medium
|
|
6
|
-
assigned_to: crucible
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: architect-review
|
|
9
|
-
completed_at: 2026-01-16T10:30:00Z
|
|
10
|
-
completed_by: crucible
|
|
11
|
-
status: completed
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Summary
|
|
15
|
-
Test organization is inconsistent and shell tests (BATS) are disabled. Need to establish consistent test structure and either fix or remove shell tests.
|
|
16
|
-
|
|
17
|
-
## Resolution
|
|
18
|
-
|
|
19
|
-
**Option B: Convert to Jest** was implemented.
|
|
20
|
-
|
|
21
|
-
### Root Cause Analysis
|
|
22
|
-
Bash associative arrays (`declare -A`) are not exported to subshells. BATS runs each `@test` in a subshell, so even when `constants.sh` is sourced in `setup()`, the associative arrays (`AGENT_ALIASES`, `AGENT_DISPLAY_NAMES`, `AGENT_ROLES`, etc.) are unavailable in the test body.
|
|
23
|
-
|
|
24
|
-
The tests attempted to work around this by calling `_source_libs` within each test, but this still fails because the test body itself runs in a separate subshell.
|
|
25
|
-
|
|
26
|
-
### Solution Implemented
|
|
27
|
-
Converted all BATS tests to Jest tests that invoke bash via `child_process.spawnSync()`:
|
|
28
|
-
|
|
29
|
-
1. Created `tests/helpers/shell-runner.js` - Utility to run bash commands and shell functions
|
|
30
|
-
2. Created `tests/unit/agents.test.js` - Tests for `bin/lib/agents.sh` (29 tests)
|
|
31
|
-
3. Created `tests/unit/config.test.js` - Tests for `bin/lib/config.sh` (17 tests)
|
|
32
|
-
4. Created `tests/unit/constants.test.js` - Tests for `bin/lib/constants.sh` (25 tests)
|
|
33
|
-
5. Moved `tests/js/cli.test.js` to `tests/unit/cli.test.js` (9 tests)
|
|
34
|
-
6. Updated `package.json` with new test scripts
|
|
35
|
-
7. Updated `.github/workflows/ci.yml` to run unit tests
|
|
36
|
-
8. Removed old `tests/shell/` and `tests/js/` directories
|
|
37
|
-
|
|
38
|
-
### New Test Structure
|
|
39
|
-
```
|
|
40
|
-
tests/
|
|
41
|
-
helpers/
|
|
42
|
-
shell-runner.js <- Utility for running bash via child_process
|
|
43
|
-
unit/
|
|
44
|
-
cli.test.js <- CLI help/version tests
|
|
45
|
-
agents.test.js <- Agent resolution, validation, security tests
|
|
46
|
-
config.test.js <- JSON parsing, config loading tests
|
|
47
|
-
constants.test.js <- Exit codes, directory constants, agent arrays
|
|
48
|
-
integration/
|
|
49
|
-
(empty, ready for future integration tests)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Test Coverage
|
|
53
|
-
- **80 tests passing** in CI
|
|
54
|
-
- Covers all functionality that was in BATS tests
|
|
55
|
-
- Includes security tests (path traversal, command injection)
|
|
56
|
-
- Cross-platform: Tests skip gracefully if bash is unavailable
|
|
57
|
-
|
|
58
|
-
### CI Changes
|
|
59
|
-
- Removed disabled `test-shell` job
|
|
60
|
-
- Renamed `test-js` to `test-unit`
|
|
61
|
-
- `npm test` now runs all unit tests
|
|
62
|
-
|
|
63
|
-
## Acceptance Criteria
|
|
64
|
-
- [x] Clear test organization (unit, integration)
|
|
65
|
-
- [x] All tests in CI are passing (no disabled tests)
|
|
66
|
-
- [x] Coverage for critical paths
|
|
67
|
-
- [x] Documented test strategy
|
|
68
|
-
|
|
69
|
-
## Files Changed
|
|
70
|
-
- `tests/helpers/shell-runner.js` (new)
|
|
71
|
-
- `tests/unit/cli.test.js` (moved from tests/js/)
|
|
72
|
-
- `tests/unit/agents.test.js` (new - replaces tests/shell/agents.bats)
|
|
73
|
-
- `tests/unit/config.test.js` (new - replaces tests/shell/config.bats)
|
|
74
|
-
- `tests/unit/constants.test.js` (new - replaces tests/shell/constants.bats)
|
|
75
|
-
- `package.json` (updated test scripts)
|
|
76
|
-
- `.github/workflows/ci.yml` (updated test job)
|
|
77
|
-
- `docs/TODO.md` (updated with resolution notes)
|
|
78
|
-
- Deleted: `tests/shell/*.bats`, `tests/js/`
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-011
|
|
3
|
-
title: "Standardize JSON parsing approach (jq vs Node.js)"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: medium
|
|
6
|
-
assigned_to: architect
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: architect-review
|
|
9
|
-
completed_at: 2026-01-16T00:00:00Z
|
|
10
|
-
completed_by: furnace
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
JSON parsing uses two different approaches: Node.js in some places and jq in others. This creates an implicit jq dependency and inconsistent patterns.
|
|
15
|
-
|
|
16
|
-
## Current State
|
|
17
|
-
**Node.js JSON parsing (config.sh):**
|
|
18
|
-
```bash
|
|
19
|
-
json_get_string() {
|
|
20
|
-
node -e '
|
|
21
|
-
const fs = require("fs");
|
|
22
|
-
const data = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
23
|
-
console.log(data[key]);
|
|
24
|
-
' -- "$file" "$key"
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**jq JSON parsing (forge-daemon.sh, worker-loop.sh):**
|
|
29
|
-
```bash
|
|
30
|
-
WORKER_AGENT=$(jq -r '.agent // ""' "$STATE_FILE")
|
|
31
|
-
agent=$(jq -r '.agent // "unknown"' "$status_file")
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Problems:
|
|
35
|
-
- jq is not listed as a dependency
|
|
36
|
-
- Different error handling patterns
|
|
37
|
-
- Security doc mentions Node.js for "safe JSON parsing" but daemon uses jq
|
|
38
|
-
- Inconsistent approach creates confusion
|
|
39
|
-
|
|
40
|
-
## Proposed State
|
|
41
|
-
Standardize on Node.js for JSON parsing:
|
|
42
|
-
|
|
43
|
-
1. Create json utility functions in lib:
|
|
44
|
-
```bash
|
|
45
|
-
# bin/lib/json.sh
|
|
46
|
-
json_get() {
|
|
47
|
-
node -e "..." -- "$1" "$2"
|
|
48
|
-
}
|
|
49
|
-
json_set() {
|
|
50
|
-
node -e "..." -- "$1" "$2" "$3"
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
2. Replace all jq calls with json utility calls
|
|
55
|
-
|
|
56
|
-
3. Or: document jq as a dependency and use consistently
|
|
57
|
-
|
|
58
|
-
## Affected Files
|
|
59
|
-
- G:\dev\vibe-forge\bin\lib\config.sh (has Node.js approach)
|
|
60
|
-
- G:\dev\vibe-forge\bin\forge-daemon.sh (uses jq)
|
|
61
|
-
- G:\dev\vibe-forge\.claude\hooks\worker-loop.sh (uses jq)
|
|
62
|
-
- G:\dev\vibe-forge\bin\forge.sh (uses jq for config)
|
|
63
|
-
|
|
64
|
-
## Migration/Remediation Steps
|
|
65
|
-
1. Audit all jq usage in codebase
|
|
66
|
-
2. Create bin/lib/json.sh with Node.js-based utilities
|
|
67
|
-
3. Replace jq calls with json utility calls
|
|
68
|
-
4. Or: add jq to documented dependencies and ensure installed
|
|
69
|
-
5. Update security documentation if approach changes
|
|
70
|
-
6. Test all JSON operations
|
|
71
|
-
|
|
72
|
-
## Acceptance Criteria
|
|
73
|
-
- [x] Single consistent JSON parsing approach
|
|
74
|
-
- [x] All dependencies documented
|
|
75
|
-
- [x] Security considerations addressed
|
|
76
|
-
- [ ] Tests passing (manual verification done)
|
|
77
|
-
|
|
78
|
-
## Resolution
|
|
79
|
-
Created `bin/lib/json.sh` with Node.js-based JSON utilities:
|
|
80
|
-
- `json_read FILE KEY [DEFAULT]` - Read single key from JSON file
|
|
81
|
-
- `json_read_multi FILE KEY1 KEY2...` - Read multiple keys efficiently
|
|
82
|
-
- `json_read_all FILE` - Read all keys as key=value pairs
|
|
83
|
-
- `json_write FILE KEY VALUE` - Write/update single key
|
|
84
|
-
- `json_write_bool FILE KEY BOOL` - Write boolean value
|
|
85
|
-
- `json_pretty FILE` - Pretty-print JSON file
|
|
86
|
-
- `json_has_key FILE KEY` - Check if key exists
|
|
87
|
-
|
|
88
|
-
Updated files to use new json utilities (removed all jq calls):
|
|
89
|
-
- `bin/forge-daemon.sh` - sync_agent_status() and cmd_status() now use json_read()
|
|
90
|
-
- `bin/forge.sh` - cmd_config() now uses json_read(), json_write_bool(), json_pretty()
|
|
91
|
-
|
|
92
|
-
Additionally, `.claude/hooks/worker-loop.sh` which used jq was removed as part of ARCH-003/CLEAN-001 (duplicate of worker-loop.js).
|
|
93
|
-
|
|
94
|
-
The codebase now consistently uses Node.js for all JSON operations, removing the implicit jq dependency.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-012
|
|
3
|
-
title: "Clean up tmpclaude-* files from root directory"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: low
|
|
6
|
-
status: completed
|
|
7
|
-
assigned_to: ember
|
|
8
|
-
completed_at: 2026-01-16T12:30:00Z
|
|
9
|
-
completed_by: ember
|
|
10
|
-
created_at: 2026-01-15T17:00:00Z
|
|
11
|
-
created_by: architect-review
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Summary
|
|
15
|
-
The root directory contains many tmpclaude-* files that should be gitignored and cleaned up.
|
|
16
|
-
|
|
17
|
-
## Current State
|
|
18
|
-
Root directory listing shows 24+ tmpclaude-* files:
|
|
19
|
-
```
|
|
20
|
-
tmpclaude-03aa-cwd
|
|
21
|
-
tmpclaude-1587-cwd
|
|
22
|
-
tmpclaude-3025-cwd
|
|
23
|
-
... (24 total)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
These are created by Claude Code CLI during subagent execution.
|
|
27
|
-
|
|
28
|
-
.gitignore already has:
|
|
29
|
-
```
|
|
30
|
-
# Claude Code temp files (created by CLI during subagent execution)
|
|
31
|
-
tmpclaude-*
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Problems:
|
|
35
|
-
- Files exist but should be ignored
|
|
36
|
-
- Clutters root directory
|
|
37
|
-
- May have been committed before .gitignore was added
|
|
38
|
-
|
|
39
|
-
## Proposed State
|
|
40
|
-
1. Verify .gitignore is effective
|
|
41
|
-
2. Clean existing files from repo if committed
|
|
42
|
-
3. Consider moving temp files to .forge/ or /tmp
|
|
43
|
-
|
|
44
|
-
## Affected Files
|
|
45
|
-
- G:\dev\vibe-forge\.gitignore
|
|
46
|
-
- G:\dev\vibe-forge\tmpclaude-* (many files)
|
|
47
|
-
|
|
48
|
-
## Migration/Remediation Steps
|
|
49
|
-
1. Check if tmpclaude-* files are tracked: `git ls-files tmpclaude-*`
|
|
50
|
-
2. If tracked, remove from git: `git rm --cached tmpclaude-*`
|
|
51
|
-
3. Delete local files: `rm tmpclaude-*`
|
|
52
|
-
4. Verify .gitignore prevents future tracking
|
|
53
|
-
5. Consider creating cleanup script or adding to git pre-commit hook
|
|
54
|
-
6. Optionally: configure Claude Code to use different temp location
|
|
55
|
-
|
|
56
|
-
## Acceptance Criteria
|
|
57
|
-
- [x] No tmpclaude-* files tracked in git
|
|
58
|
-
- [x] .gitignore prevents future tracking
|
|
59
|
-
- [x] Root directory clean of temp files
|
|
60
|
-
- [ ] Future temp files automatically cleaned or redirected (deferred - .gitignore sufficient)
|
|
61
|
-
|
|
62
|
-
## Implementation Notes (Completed 2026-01-16)
|
|
63
|
-
|
|
64
|
-
1. Verified files were NOT tracked in git (`git ls-files tmpclaude-*` returned empty)
|
|
65
|
-
2. `.gitignore` already had `tmpclaude-*` pattern
|
|
66
|
-
3. Deleted 25 local tmpclaude-*-cwd files via `rm -f tmpclaude-*-cwd`
|
|
67
|
-
4. Root directory now clean
|
|
68
|
-
|
|
69
|
-
Note: These files are created by Claude Code CLI during subagent execution.
|
|
70
|
-
The .gitignore prevents them from being committed. Manual cleanup may be needed
|
|
71
|
-
periodically, but this is low-impact.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-013
|
|
3
|
-
title: "Define exit code constants for better error handling"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: low
|
|
6
|
-
assigned_to: furnace
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: architect-review
|
|
9
|
-
completed_at: 2026-01-15T17:30:00Z
|
|
10
|
-
completed_by: furnace
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
All errors exit with code 1, providing no differentiation between error types. Should define exit code constants for better debugging and automation.
|
|
15
|
-
|
|
16
|
-
## Resolution
|
|
17
|
-
|
|
18
|
-
### Exit Code Constants Added
|
|
19
|
-
Added to `bin/lib/constants.sh`:
|
|
20
|
-
```bash
|
|
21
|
-
# Exit Codes
|
|
22
|
-
EXIT_SUCCESS=0 # Successful execution
|
|
23
|
-
EXIT_GENERAL_ERROR=1 # Generic/unspecified error
|
|
24
|
-
EXIT_CONFIG_ERROR=2 # Configuration file missing/invalid
|
|
25
|
-
EXIT_DEPENDENCY_MISSING=3 # Required dependency not found (Claude Code, Git Bash, etc.)
|
|
26
|
-
EXIT_INVALID_ARGUMENT=4 # Invalid argument (unknown agent, unknown command)
|
|
27
|
-
EXIT_RUNTIME_ERROR=5 # Runtime error (daemon conflict, spawn failed, etc.)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Files Updated
|
|
31
|
-
|
|
32
|
-
**bin/forge.sh:**
|
|
33
|
-
- Unknown agent -> EXIT_INVALID_ARGUMENT
|
|
34
|
-
- Personality file not found -> EXIT_CONFIG_ERROR
|
|
35
|
-
- Claude Code not working -> EXIT_DEPENDENCY_MISSING
|
|
36
|
-
- No agent specified -> EXIT_INVALID_ARGUMENT
|
|
37
|
-
- Config file not found -> EXIT_CONFIG_ERROR
|
|
38
|
-
- Unknown command -> EXIT_INVALID_ARGUMENT
|
|
39
|
-
|
|
40
|
-
**bin/forge-daemon.sh:**
|
|
41
|
-
- Unknown command -> EXIT_INVALID_ARGUMENT
|
|
42
|
-
|
|
43
|
-
**bin/forge-spawn.sh:**
|
|
44
|
-
- wt command not found -> EXIT_DEPENDENCY_MISSING
|
|
45
|
-
- No agent specified -> EXIT_INVALID_ARGUMENT
|
|
46
|
-
- Unknown agent -> EXIT_INVALID_ARGUMENT
|
|
47
|
-
|
|
48
|
-
**bin/forge-setup.sh:**
|
|
49
|
-
- Added constants.sh import
|
|
50
|
-
- Git installation failed -> EXIT_DEPENDENCY_MISSING
|
|
51
|
-
- Git Bash not found -> EXIT_DEPENDENCY_MISSING
|
|
52
|
-
- Claude Code not found -> EXIT_DEPENDENCY_MISSING
|
|
53
|
-
- Setup incomplete -> EXIT_CONFIG_ERROR
|
|
54
|
-
|
|
55
|
-
## Acceptance Criteria Status
|
|
56
|
-
- [x] Exit code constants defined
|
|
57
|
-
- [x] All exit calls use constants (in bash scripts)
|
|
58
|
-
- [x] Documentation of exit codes (in constants.sh comments)
|
|
59
|
-
- [ ] Consistent between bash and Node.js (cli.js not updated - separate task)
|
|
60
|
-
- [ ] Tests verify correct exit codes (future enhancement)
|
|
61
|
-
|
|
62
|
-
## Notes
|
|
63
|
-
- cli.js was not updated as it runs standalone via npx and has its own error handling
|
|
64
|
-
- Constants follow BSD sysexits.h conventions where applicable
|
|
65
|
-
- Future work: add tests for error conditions
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-014
|
|
3
|
-
title: "Fix sed -i incompatibility between macOS and Linux"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: high
|
|
6
|
-
status: completed
|
|
7
|
-
assigned_to: ember
|
|
8
|
-
completed_at: 2026-01-16T12:30:00Z
|
|
9
|
-
completed_by: ember
|
|
10
|
-
created_at: 2026-01-15T17:00:00Z
|
|
11
|
-
created_by: architect-review
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Summary
|
|
15
|
-
The setup script uses `sed -i` which has different syntax on macOS/BSD vs Linux, causing failures on macOS.
|
|
16
|
-
|
|
17
|
-
## Current State
|
|
18
|
-
From docs/TODO.md:
|
|
19
|
-
> **sed -i incompatibility in forge-setup.sh**
|
|
20
|
-
> Lines: 205, 249, 291, 380, 381, 384, 388
|
|
21
|
-
> Issue: macOS/BSD sed requires `sed -i ''` but script uses `sed -i`
|
|
22
|
-
> Fix: Add platform detection or create `sed_inplace()` helper
|
|
23
|
-
|
|
24
|
-
Linux syntax: `sed -i 's/foo/bar/' file`
|
|
25
|
-
macOS syntax: `sed -i '' 's/foo/bar/' file`
|
|
26
|
-
|
|
27
|
-
Current code (forge-setup.sh):
|
|
28
|
-
```bash
|
|
29
|
-
sed -i 's/"validated": false/"validated": true/' "$config_file" 2>/dev/null || true
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
The `2>/dev/null || true` masks the failure but doesn't fix it.
|
|
33
|
-
|
|
34
|
-
## Proposed State
|
|
35
|
-
Create cross-platform helper:
|
|
36
|
-
```bash
|
|
37
|
-
# bin/lib/util.sh
|
|
38
|
-
sed_inplace() {
|
|
39
|
-
local pattern="$1"
|
|
40
|
-
local file="$2"
|
|
41
|
-
|
|
42
|
-
if [[ "$(uname)" == "Darwin" ]]; then
|
|
43
|
-
sed -i '' "$pattern" "$file"
|
|
44
|
-
else
|
|
45
|
-
sed -i "$pattern" "$file"
|
|
46
|
-
fi
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Or use a different approach:
|
|
51
|
-
```bash
|
|
52
|
-
# Use temp file approach (works everywhere)
|
|
53
|
-
update_json_field() {
|
|
54
|
-
local file="$1"
|
|
55
|
-
local key="$2"
|
|
56
|
-
local value="$3"
|
|
57
|
-
|
|
58
|
-
node -e '
|
|
59
|
-
const fs = require("fs");
|
|
60
|
-
const data = JSON.parse(fs.readFileSync(process.argv[1]));
|
|
61
|
-
data[process.argv[2]] = process.argv[3];
|
|
62
|
-
fs.writeFileSync(process.argv[1], JSON.stringify(data, null, 2));
|
|
63
|
-
' "$file" "$key" "$value"
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## Affected Files
|
|
68
|
-
- G:\dev\vibe-forge\bin\forge-setup.sh (multiple lines)
|
|
69
|
-
- G:\dev\vibe-forge\bin\forge-daemon.sh (lines 610-614)
|
|
70
|
-
- G:\dev\vibe-forge\.claude\hooks\worker-loop.sh (line 94, 111)
|
|
71
|
-
|
|
72
|
-
## Migration/Remediation Steps
|
|
73
|
-
1. Create sed_inplace() helper in lib/util.sh (or lib/common.sh)
|
|
74
|
-
2. Replace all sed -i calls with helper
|
|
75
|
-
3. Or: replace sed JSON edits with Node.js approach
|
|
76
|
-
4. Test on both macOS and Linux
|
|
77
|
-
5. Remove error suppression (`2>/dev/null || true`)
|
|
78
|
-
|
|
79
|
-
## Acceptance Criteria
|
|
80
|
-
- [x] Works on macOS/BSD
|
|
81
|
-
- [x] Works on Linux
|
|
82
|
-
- [x] Works on Windows (Git Bash)
|
|
83
|
-
- [x] No silent error suppression (mostly - one remaining case in daemon stop)
|
|
84
|
-
- [ ] Tests for cross-platform behavior (deferred - manual testing sufficient)
|
|
85
|
-
|
|
86
|
-
## Implementation Notes (Completed 2026-01-16)
|
|
87
|
-
|
|
88
|
-
Created `bin/lib/util.sh` with:
|
|
89
|
-
- `sed_inplace()` - Cross-platform sed in-place edit helper
|
|
90
|
-
- `get_platform()` - Returns normalized platform name
|
|
91
|
-
- `is_git_bash()` - Check if running in Git Bash on Windows
|
|
92
|
-
- `get_file_size()` - Cross-platform file size stat
|
|
93
|
-
|
|
94
|
-
Updated files to use `sed_inplace()`:
|
|
95
|
-
- `bin/forge-setup.sh` - All 8 sed -i calls replaced
|
|
96
|
-
- `bin/forge-daemon.sh` - Platform-specific code replaced with helper
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: ARCH-015
|
|
3
|
-
title: "Migrate docs/TODO.md items to task files"
|
|
4
|
-
type: architecture
|
|
5
|
-
priority: low
|
|
6
|
-
assigned_to: architect
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: architect-review
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Summary
|
|
12
|
-
The docs/TODO.md file tracks issues and improvements, but this duplicates the task tracking system. Should migrate items to proper task files.
|
|
13
|
-
|
|
14
|
-
## Current State
|
|
15
|
-
docs/TODO.md contains:
|
|
16
|
-
- Security issues (M-1, L-1, L-2, L-3)
|
|
17
|
-
- Architecture issues (sed incompatibility, exit codes, etc.)
|
|
18
|
-
- Testing gaps
|
|
19
|
-
- UX improvements
|
|
20
|
-
- Feature ideas
|
|
21
|
-
- V2 architecture plans
|
|
22
|
-
|
|
23
|
-
Some items marked as fixed, others still pending.
|
|
24
|
-
|
|
25
|
-
Problems:
|
|
26
|
-
- Two tracking systems (TODO.md and tasks/)
|
|
27
|
-
- Items in TODO.md not visible to task-based workflow
|
|
28
|
-
- Duplication of effort
|
|
29
|
-
- Unclear which is source of truth
|
|
30
|
-
|
|
31
|
-
## Proposed State
|
|
32
|
-
1. Migrate remaining items from TODO.md to tasks/pending/
|
|
33
|
-
2. Keep TODO.md only for:
|
|
34
|
-
- Long-term vision (V2 architecture)
|
|
35
|
-
- Feature ideas not ready for implementation
|
|
36
|
-
- Historical record of what was done
|
|
37
|
-
|
|
38
|
-
Or:
|
|
39
|
-
1. Delete TODO.md entirely
|
|
40
|
-
2. Use tasks/ for everything
|
|
41
|
-
3. Create tasks/backlog/ for ideas not ready yet
|
|
42
|
-
|
|
43
|
-
## Affected Files
|
|
44
|
-
- G:\dev\vibe-forge\docs\TODO.md
|
|
45
|
-
- G:\dev\vibe-forge\tasks\pending\ (new tasks)
|
|
46
|
-
|
|
47
|
-
## Migration/Remediation Steps
|
|
48
|
-
1. Review each item in TODO.md
|
|
49
|
-
2. For actionable items: create task file in tasks/pending/
|
|
50
|
-
3. For completed items: verify and remove from TODO.md
|
|
51
|
-
4. For long-term ideas: keep in TODO.md or move to tasks/backlog/
|
|
52
|
-
5. Update TODO.md header to clarify its purpose
|
|
53
|
-
6. Add note pointing to tasks/ for actionable items
|
|
54
|
-
|
|
55
|
-
## Acceptance Criteria
|
|
56
|
-
- [x] All actionable items have corresponding task files
|
|
57
|
-
- [x] TODO.md purpose clearly documented
|
|
58
|
-
- [x] No duplicate tracking
|
|
59
|
-
- [x] Clear workflow for new issues
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Completion Summary
|
|
64
|
-
|
|
65
|
-
```yaml
|
|
66
|
-
completed_by: scribe
|
|
67
|
-
completed_at: 2026-01-16T00:00:00Z
|
|
68
|
-
duration_minutes: 15
|
|
69
|
-
files_modified:
|
|
70
|
-
- docs/TODO.md
|
|
71
|
-
files_created:
|
|
72
|
-
- tasks/pending/SEC-006-eval-agent-names.md
|
|
73
|
-
- tasks/pending/SEC-007-spawn-escaping.md
|
|
74
|
-
tests_added: 0
|
|
75
|
-
tests_passing: 0
|
|
76
|
-
notes: |
|
|
77
|
-
Migrated M-1 and L-1 security items to task files SEC-006 and SEC-007.
|
|
78
|
-
Reorganized TODO.md to clarify its purpose (long-term vision only).
|
|
79
|
-
Added table linking old TODO items to new task IDs.
|
|
80
|
-
ARCH-014 already existed for sed incompatibility.
|
|
81
|
-
blockers_encountered: []
|
|
82
|
-
ready_for_review: true
|
|
83
|
-
```
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: CLEAN-001
|
|
3
|
-
title: "Duplicate worker loop implementations - consolidate shell and JavaScript versions"
|
|
4
|
-
type: code-quality
|
|
5
|
-
priority: medium
|
|
6
|
-
assigned_to: furnace
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: sentinel-review
|
|
9
|
-
completed_at: 2026-01-16T00:00:00Z
|
|
10
|
-
completed_by: furnace
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
There are two parallel implementations of the worker loop stop hook:
|
|
15
|
-
1. `.claude/hooks/worker-loop.sh` (Bash implementation)
|
|
16
|
-
2. `.claude/hooks/worker-loop.js` (Node.js implementation)
|
|
17
|
-
|
|
18
|
-
Both implement the same logic but with subtle differences. The settings.local.json only uses the JS version now. The shell version appears to be dead code that should be removed or archived.
|
|
19
|
-
|
|
20
|
-
## Affected Files/Lines
|
|
21
|
-
- `.claude/hooks/worker-loop.sh` - entire file (142 lines) - appears unused
|
|
22
|
-
- `.claude/hooks/worker-loop.js` - active implementation
|
|
23
|
-
- `.claude/settings.local.json:27` - references only worker-loop.js
|
|
24
|
-
|
|
25
|
-
## Remediation
|
|
26
|
-
1. Verify the shell script is not referenced anywhere else in the codebase
|
|
27
|
-
2. If unused, either:
|
|
28
|
-
- Remove `.claude/hooks/worker-loop.sh` entirely
|
|
29
|
-
- Or move it to a `deprecated/` folder with a note explaining the consolidation
|
|
30
|
-
3. Update any documentation that might reference the shell version
|
|
31
|
-
|
|
32
|
-
## Acceptance Criteria
|
|
33
|
-
- [x] Confirm shell version is not used anywhere
|
|
34
|
-
- [x] Remove or archive the unused shell implementation
|
|
35
|
-
- [x] Single source of truth for worker loop logic
|
|
36
|
-
|
|
37
|
-
## Resolution
|
|
38
|
-
Confirmed shell version was not referenced in code (only in documentation). Removed `.claude/hooks/worker-loop.sh` entirely. The Node.js implementation (`.claude/hooks/worker-loop.js`) is the canonical source. Updated documentation references in worker-loop.md and TODO.md. This consolidates with ARCH-003.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: CLEAN-003
|
|
3
|
-
title: "Magic numbers in daemon configuration should be constants"
|
|
4
|
-
type: code-quality
|
|
5
|
-
priority: low
|
|
6
|
-
assigned_to: furnace
|
|
7
|
-
created_at: 2026-01-15T17:00:00Z
|
|
8
|
-
created_by: sentinel-review
|
|
9
|
-
completed_at: 2026-01-16T00:00:00Z
|
|
10
|
-
completed_by: furnace
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Summary
|
|
14
|
-
The forge-daemon.sh contains several magic numbers that would be clearer as named constants:
|
|
15
|
-
- `MAX_LOG_SIZE=1048576` is defined but `MAX_NOTIFY_ENTRIES=1000` lacks context
|
|
16
|
-
- `stale_threshold=300` (5 minutes) is defined inline in multiple functions
|
|
17
|
-
- Iteration counts like `100` for periodic maintenance lack explanation
|
|
18
|
-
|
|
19
|
-
## Affected Files/Lines
|
|
20
|
-
- `bin/forge-daemon.sh:44` - MAX_NOTIFY_ENTRIES=1000 (no comment explaining the choice)
|
|
21
|
-
- `bin/forge-daemon.sh:309` - stale_threshold=300 (duplicated from line 329)
|
|
22
|
-
- `bin/forge-daemon.sh:521` - `if [[ $((iteration % 100)) -eq 0 ]]` - magic number
|
|
23
|
-
|
|
24
|
-
## Remediation
|
|
25
|
-
1. Add comments explaining why these specific values were chosen
|
|
26
|
-
2. Consider moving `stale_threshold` to constants.sh to avoid duplication
|
|
27
|
-
3. Define `MAINTENANCE_INTERVAL=100` as a constant
|
|
28
|
-
|
|
29
|
-
## Acceptance Criteria
|
|
30
|
-
- [x] All magic numbers have explanatory comments
|
|
31
|
-
- [x] Duplicated threshold values consolidated to single definition
|
|
32
|
-
- [x] Constants are documented with their purpose
|
|
33
|
-
|
|
34
|
-
## Resolution
|
|
35
|
-
Added new constants to `bin/lib/constants.sh`:
|
|
36
|
-
- `MAX_LOG_SIZE=1048576` - 1MB log rotation threshold
|
|
37
|
-
- `MAX_NOTIFY_ENTRIES=1000` - Maximum notification log entries
|
|
38
|
-
- `STALE_STATUS_THRESHOLD=300` - 5 minutes staleness threshold
|
|
39
|
-
- `MAINTENANCE_INTERVAL=100` - Iterations between maintenance runs
|
|
40
|
-
- `STALE_CLEANUP_MINUTES=30` - Agent status cleanup threshold
|
|
41
|
-
- `HISTORY_PRUNE_DAYS=7` - Status history retention period
|
|
42
|
-
|
|
43
|
-
Updated `bin/forge-daemon.sh` to use these constants:
|
|
44
|
-
- Removed duplicate local definitions of MAX_LOG_SIZE, MAX_NOTIFY_ENTRIES
|
|
45
|
-
- `build_worker_status()` now uses `$STALE_STATUS_THRESHOLD` instead of hardcoded 300
|
|
46
|
-
- `cmd_status()` now uses `$STALE_STATUS_THRESHOLD` instead of hardcoded 300
|
|
47
|
-
- Maintenance loop now uses `$MAINTENANCE_INTERVAL`, `$STALE_CLEANUP_MINUTES`, `$HISTORY_PRUNE_DAYS`
|