vibe-forge 0.4.0 → 0.8.2

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 (129) hide show
  1. package/.claude/commands/clear-attention.md +63 -63
  2. package/.claude/commands/compact-context.md +52 -0
  3. package/.claude/commands/configure-vcs.md +5 -5
  4. package/.claude/commands/forge.md +50 -3
  5. package/.claude/commands/need-help.md +77 -77
  6. package/.claude/commands/update-status.md +64 -64
  7. package/.claude/commands/worker-loop.md +106 -106
  8. package/.claude/hooks/worker-loop.js +37 -4
  9. package/.claude/scripts/setup-worker-loop.sh +45 -45
  10. package/.claude/settings.json +89 -0
  11. package/LICENSE +21 -21
  12. package/README.md +211 -232
  13. package/agents/aegis/personality.md +35 -1
  14. package/agents/anvil/personality.md +39 -1
  15. package/agents/architect/personality.md +26 -0
  16. package/agents/crucible/personality.md +54 -1
  17. package/agents/crucible-x/personality.md +210 -0
  18. package/agents/ember/personality.md +29 -1
  19. package/agents/flux/personality.md +248 -0
  20. package/agents/furnace/personality.md +52 -1
  21. package/agents/herald/personality.md +3 -1
  22. package/agents/loki/personality.md +108 -0
  23. package/agents/oracle/personality.md +284 -0
  24. package/agents/pixel/personality.md +140 -0
  25. package/agents/planning-hub/personality.md +222 -0
  26. package/agents/scribe/personality.md +3 -1
  27. package/agents/slag/personality.md +268 -0
  28. package/agents/{sentinel → temper}/personality.md +85 -9
  29. package/bin/cli.js +77 -30
  30. package/bin/dashboard/api/agents.js +333 -0
  31. package/bin/dashboard/api/dispatch.js +507 -0
  32. package/bin/dashboard/api/tasks.js +416 -0
  33. package/bin/dashboard/public/assets/index-BpHfsx1r.js +2 -0
  34. package/bin/dashboard/public/assets/index-QODv4Zn9.css +1 -0
  35. package/bin/dashboard/public/index.html +14 -0
  36. package/bin/dashboard/server.js +645 -0
  37. package/bin/forge-daemon.sh +176 -550
  38. package/bin/forge-setup.sh +28 -11
  39. package/bin/forge-spawn.sh +5 -5
  40. package/bin/forge.cmd +83 -83
  41. package/bin/forge.sh +210 -31
  42. package/config/agent-manifest.yaml +237 -243
  43. package/config/agents.json +207 -132
  44. package/config/task-types.yaml +111 -106
  45. package/context/agent-overrides/README.md +41 -0
  46. package/context/architecture.md +42 -0
  47. package/context/modern-conventions.md +129 -129
  48. package/docs/agents.md +473 -409
  49. package/docs/architecture.md +194 -162
  50. package/docs/commands.md +451 -388
  51. package/docs/security.md +195 -144
  52. package/package.json +38 -11
  53. package/src/lib/check-aliases.js +50 -0
  54. package/{bin → src}/lib/colors.sh +2 -1
  55. package/src/lib/config.sh +347 -0
  56. package/{bin → src}/lib/constants.sh +48 -13
  57. package/src/lib/daemon/budgets.sh +107 -0
  58. package/src/lib/daemon/dependencies.sh +146 -0
  59. package/src/lib/daemon/display.sh +128 -0
  60. package/src/lib/daemon/notifications.sh +273 -0
  61. package/src/lib/daemon/routing.sh +93 -0
  62. package/src/lib/daemon/state.sh +163 -0
  63. package/src/lib/daemon/sync.sh +103 -0
  64. package/{bin → src}/lib/database.sh +52 -0
  65. package/src/lib/frontmatter.js +106 -0
  66. package/src/lib/heimdall-setup.js +113 -0
  67. package/src/lib/heimdall.js +265 -0
  68. package/src/lib/index.sh +25 -0
  69. package/{bin → src}/lib/json.sh +7 -1
  70. package/{bin → src}/lib/terminal.js +7 -1
  71. package/.claude/settings.local.json +0 -33
  72. package/agents/forge-master/capabilities.md +0 -144
  73. package/agents/forge-master/context-template.md +0 -128
  74. package/agents/forge-master/personality.md +0 -138
  75. package/bin/lib/config.sh +0 -313
  76. package/config/task-template.md +0 -87
  77. package/context/forge-state.yaml +0 -19
  78. package/docs/TODO.md +0 -150
  79. package/docs/getting-started.md +0 -243
  80. package/docs/npm-publishing.md +0 -95
  81. package/docs/workflows/README.md +0 -32
  82. package/docs/workflows/azure-devops.md +0 -108
  83. package/docs/workflows/bitbucket.md +0 -104
  84. package/docs/workflows/git-only.md +0 -130
  85. package/docs/workflows/gitea.md +0 -168
  86. package/docs/workflows/github.md +0 -103
  87. package/docs/workflows/gitlab.md +0 -105
  88. package/docs/workflows.md +0 -454
  89. package/tasks/completed/ARCH-001-duplicate-agent-config.md +0 -121
  90. package/tasks/completed/ARCH-002-mixed-bash-node-implementation.md +0 -88
  91. package/tasks/completed/ARCH-003-worker-loop-hook-duplication.md +0 -77
  92. package/tasks/completed/ARCH-009-test-organization.md +0 -78
  93. package/tasks/completed/ARCH-011-jq-vs-nodejs-json.md +0 -94
  94. package/tasks/completed/ARCH-012-tmp-files-in-root.md +0 -71
  95. package/tasks/completed/ARCH-013-exit-code-constants.md +0 -65
  96. package/tasks/completed/ARCH-014-sed-incompatibility.md +0 -96
  97. package/tasks/completed/ARCH-015-docs-todo-tracking.md +0 -83
  98. package/tasks/completed/CLEAN-001.md +0 -38
  99. package/tasks/completed/CLEAN-003.md +0 -47
  100. package/tasks/completed/CLEAN-004.md +0 -56
  101. package/tasks/completed/CLEAN-005.md +0 -75
  102. package/tasks/completed/CLEAN-006.md +0 -47
  103. package/tasks/completed/CLEAN-007.md +0 -34
  104. package/tasks/completed/CLEAN-008.md +0 -49
  105. package/tasks/completed/CLEAN-012.md +0 -58
  106. package/tasks/completed/CLEAN-013.md +0 -45
  107. package/tasks/completed/SEC-001-sql-injection-fix.md +0 -58
  108. package/tasks/completed/SEC-002-notification-injection-fix.md +0 -45
  109. package/tasks/completed/SEC-003-eval-injection-fix.md +0 -54
  110. package/tasks/completed/SEC-004-pid-race-condition-fix.md +0 -49
  111. package/tasks/completed/SEC-005-worker-loop-path-fix.md +0 -51
  112. package/tasks/completed/SEC-006-eval-agent-names.md +0 -55
  113. package/tasks/completed/SEC-007-spawn-escaping.md +0 -67
  114. package/tasks/pending/ARCH-004-git-bash-detection-duplication.md +0 -72
  115. package/tasks/pending/ARCH-005-missing-src-directory.md +0 -95
  116. package/tasks/pending/ARCH-006-task-template-location.md +0 -64
  117. package/tasks/pending/ARCH-007-daemon-monolith.md +0 -91
  118. package/tasks/pending/ARCH-008-forge-master-vs-hub.md +0 -81
  119. package/tasks/pending/ARCH-010-missing-index-files.md +0 -84
  120. package/tasks/pending/CLEAN-002.md +0 -29
  121. package/tasks/pending/CLEAN-009.md +0 -31
  122. package/tasks/pending/CLEAN-010.md +0 -30
  123. package/tasks/pending/CLEAN-011.md +0 -30
  124. package/tasks/pending/CLEAN-014.md +0 -32
  125. package/tasks/review/task-001.md +0 -78
  126. /package/{bin → src}/lib/agents.sh +0 -0
  127. /package/{bin → src}/lib/util.sh +0 -0
  128. /package/{bin → src}/lib/vcs.js +0 -0
  129. /package/{context → templates}/project-context-template.md +0 -0
@@ -1,67 +0,0 @@
1
- ---
2
- id: SEC-007
3
- title: "Escape variables in Windows Terminal spawn command"
4
- type: security
5
- priority: low
6
- assigned_to: aegis
7
- created_at: 2026-01-16T00:00:00Z
8
- created_by: scribe-docs-migration
9
- ---
10
-
11
- ## Summary
12
- Variables passed to Windows Terminal command are not properly escaped for nested shell invocation.
13
-
14
- ## Current State
15
- From docs/TODO.md (L-1 - Low Priority):
16
- > **Windows Terminal command escaping**
17
- > File: `bin/forge-spawn.sh` lines 55-57
18
- > Issue: `$display_name` and `$FORGE_ROOT` not escaped for nested shell invocation
19
- > Fix: Use `printf %q` for proper escaping
20
-
21
- Current code:
22
- ```bash
23
- wt.exe "${wt_args[@]}" "$bash_path" -c "cd \"$win_forge_root\" && ./bin/forge.sh start \"$agent\""
24
- ```
25
-
26
- The `$win_forge_root` and other variables could contain characters that break the nested shell command.
27
-
28
- ## Affected Files
29
- - `bin/forge-spawn.sh` lines 55-57 (and nearby)
30
-
31
- ## Proposed Fix
32
- Use `printf %q` to properly escape variables before embedding in the command string:
33
- ```bash
34
- escaped_path=$(printf %q "$win_forge_root")
35
- escaped_agent=$(printf %q "$agent")
36
- wt.exe "${wt_args[@]}" "$bash_path" -c "cd $escaped_path && ./bin/forge.sh start $escaped_agent"
37
- ```
38
-
39
- ## Risk Assessment
40
- Low risk because:
41
- - $agent is already validated through resolve_agent whitelist
42
- - $FORGE_ROOT is set from script directory, not user input
43
-
44
- Still worth fixing for defense in depth.
45
-
46
- ## Acceptance Criteria
47
- - [x] Variables properly escaped with printf %q
48
- - [x] Works with paths containing spaces
49
- - [x] Works with paths containing special characters
50
- - [ ] Test on Windows with various path types (manual testing required)
51
-
52
- ## Resolution
53
-
54
- **Status: Fixed**
55
-
56
- Updated `bin/forge-spawn.sh` lines 76-87 to use `printf %q` for proper escaping:
57
-
58
- ```bash
59
- # SECURITY: Use printf %q to properly escape paths for nested shell invocation
60
- local escaped_path escaped_agent
61
- escaped_path=$(printf %q "$win_forge_root")
62
- escaped_agent=$(printf %q "$agent")
63
-
64
- wt.exe "${wt_args[@]}" "$bash_path" -c "cd $escaped_path && ./bin/forge.sh start $escaped_agent"
65
- ```
66
-
67
- This ensures paths with spaces, special characters, or shell metacharacters are properly escaped for the nested shell invocation.
@@ -1,72 +0,0 @@
1
- ---
2
- id: ARCH-004
3
- title: "Consolidate Git Bash detection logic"
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
- Git Bash path detection is implemented in four different places with slightly different logic and paths checked.
13
-
14
- ## Current State
15
- Git Bash detection exists in:
16
-
17
- 1. **bin/cli.js** - getBashPath() function (lines 105-136)
18
- - Checks 3 hardcoded paths
19
- - Uses `where git` fallback
20
- - Returns null if not found
21
-
22
- 2. **bin/forge.cmd** - Batch script (lines 42-74)
23
- - Checks 4 hardcoded paths (different from cli.js)
24
- - Uses `where git` fallback
25
- - Shows error if not found
26
-
27
- 3. **bin/forge-setup.sh** - find_git_bash() function (lines 59-134)
28
- - Checks 6+ paths including $LOCALAPPDATA
29
- - Uses `where git` fallback
30
- - Offers to install via winget
31
-
32
- 4. **bin/lib/terminal.js** - findGitBash() function (lines 195-223)
33
- - Checks 3 hardcoded paths
34
- - Uses `where git` fallback
35
- - Returns null if not found
36
-
37
- Problems:
38
- - Different paths checked in each implementation
39
- - Logic duplicated 4 times
40
- - Different fallback behaviors
41
- - D: drive paths only in some implementations
42
- - $LOCALAPPDATA only in some implementations
43
-
44
- ## Proposed State
45
- Single shared implementation:
46
-
47
- 1. Create `bin/lib/git-bash.js` with comprehensive path detection
48
- 2. Export for use in cli.js and terminal.js
49
- 3. Provide bash-callable interface for shell scripts
50
- 4. Or: store detected path in config, read from all scripts
51
-
52
- ## Affected Files
53
- - G:\dev\vibe-forge\bin\cli.js
54
- - G:\dev\vibe-forge\bin\forge.cmd
55
- - G:\dev\vibe-forge\bin\forge-setup.sh
56
- - G:\dev\vibe-forge\bin\lib\terminal.js
57
-
58
- ## Migration/Remediation Steps
59
- 1. Create unified git-bash.js module with all known paths
60
- 2. Export as CLI: `node git-bash.js` -> outputs path
61
- 3. Update cli.js to use shared module
62
- 4. Update terminal.js to use shared module
63
- 5. Update forge-setup.sh to call Node.js module
64
- 6. Update forge.cmd to read from config (set during init)
65
- 7. Ensure all 6+ paths are checked consistently
66
-
67
- ## Acceptance Criteria
68
- - [ ] Single source of truth for Git Bash detection
69
- - [ ] All known paths (C:, D:, LOCALAPPDATA) checked consistently
70
- - [ ] Detection works from bash and Node.js
71
- - [ ] All tests passing
72
- - [ ] Windows functionality unchanged
@@ -1,95 +0,0 @@
1
- ---
2
- id: ARCH-005
3
- title: "Establish proper source code organization with src/ directory"
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 codebase lacks a conventional src/ directory structure. All source files are in bin/ or bin/lib/, mixing executable entry points with library code.
13
-
14
- ## Current State
15
- Current structure:
16
- ```
17
- bin/
18
- cli.js <- Entry point
19
- forge.sh <- Entry point
20
- forge.cmd <- Entry point
21
- forge-setup.sh <- Could be library
22
- forge-spawn.sh <- Could be library
23
- forge-daemon.sh <- Could be library
24
- lib/
25
- colors.sh <- Library
26
- constants.sh <- Library
27
- config.sh <- Library
28
- agents.sh <- Library
29
- database.sh <- Library
30
- terminal.js <- Library
31
- ```
32
-
33
- Problems:
34
- - Entry points mixed with implementation files
35
- - No clear distinction between bin/ (executables) and src/ (source)
36
- - .gitignore references src/ as a tool internal (line 232) but no src/ exists
37
- - Node convention is bin/ for CLI entry points, src/ for implementation
38
-
39
- ## Proposed State
40
- Reorganize to:
41
- ```
42
- bin/
43
- cli.js <- Entry point (thin wrapper)
44
- forge <- Symlink or wrapper to src/cli/forge.sh
45
- src/
46
- cli/
47
- forge.sh <- Main CLI implementation
48
- setup.sh <- Setup logic
49
- spawn.sh <- Spawn logic
50
- daemon.sh <- Daemon logic
51
- lib/
52
- colors.sh <- Shared utilities
53
- constants.sh <- Constants
54
- config.sh <- Config utilities
55
- agents.sh <- Agent utilities
56
- database.sh <- DB utilities
57
- terminal.js <- Terminal utilities
58
- git-bash.js <- Git bash detection
59
- ```
60
-
61
- Or for Node.js migration:
62
- ```
63
- bin/
64
- vibe-forge.js <- CLI entry point
65
- src/
66
- cli/
67
- index.js <- Command routing
68
- init.js <- Init command
69
- start.js <- Start command
70
- spawn.js <- Spawn command
71
- lib/
72
- config.js
73
- agents.js
74
- terminal.js
75
- ```
76
-
77
- ## Affected Files
78
- - All files in G:\dev\vibe-forge\bin\
79
- - G:\dev\vibe-forge\package.json (files array)
80
-
81
- ## Migration/Remediation Steps
82
- 1. Create src/ directory
83
- 2. Move bin/lib/* to src/lib/
84
- 3. Update imports/sources in bin/*.sh scripts
85
- 4. Update package.json files array if needed
86
- 5. Ensure tests still work
87
- 6. Update documentation
88
-
89
- ## Acceptance Criteria
90
- - [ ] Clear separation between entry points and implementation
91
- - [ ] src/ directory exists with organized code
92
- - [ ] bin/ contains only entry point wrappers
93
- - [ ] All imports updated
94
- - [ ] Tests passing
95
- - [ ] Documentation updated
@@ -1,64 +0,0 @@
1
- ---
2
- id: ARCH-006
3
- title: "Move task-template.md to templates directory"
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
- Task template is stored in config/ but is not a configuration file - it's a template. Should be in a dedicated templates directory.
13
-
14
- ## Current State
15
- ```
16
- config/
17
- agents.json <- Configuration
18
- agent-manifest.yaml <- Configuration (or docs)
19
- task-types.yaml <- Configuration
20
- task-template.md <- Template (not config!)
21
- ```
22
-
23
- The task-template.md is referenced from:
24
- - .claude/commands/forge.md (line 124): `@_vibe-forge/config/task-template.md`
25
-
26
- ## Proposed State
27
- Create templates/ directory:
28
- ```
29
- config/
30
- agents.json
31
- task-types.yaml
32
- templates/
33
- task-template.md
34
- project-context-template.md <- Move from context/
35
- ```
36
-
37
- Or alternatively, rename to config/templates/:
38
- ```
39
- config/
40
- agents.json
41
- task-types.yaml
42
- templates/
43
- task.md
44
- project-context.md
45
- ```
46
-
47
- ## Affected Files
48
- - G:\dev\vibe-forge\config\task-template.md
49
- - G:\dev\vibe-forge\context\project-context-template.md
50
- - G:\dev\vibe-forge\.claude\commands\forge.md
51
-
52
- ## Migration/Remediation Steps
53
- 1. Create templates/ directory
54
- 2. Move config/task-template.md to templates/
55
- 3. Move context/project-context-template.md to templates/
56
- 4. Update reference in .claude/commands/forge.md
57
- 5. Update any other references (forge-setup.sh uses context template)
58
- 6. Update package.json files array if needed
59
-
60
- ## Acceptance Criteria
61
- - [ ] Templates in dedicated templates/ directory
62
- - [ ] All references updated
63
- - [ ] Functionality unchanged
64
- - [ ] Package includes templates directory
@@ -1,91 +0,0 @@
1
- ---
2
- id: ARCH-007
3
- title: "Split forge-daemon.sh into focused modules"
4
- type: architecture
5
- priority: medium
6
- assigned_to: architect
7
- created_at: 2026-01-15T17:00:00Z
8
- created_by: architect-review
9
- ---
10
-
11
- ## Summary
12
- forge-daemon.sh is a 776-line monolith containing multiple unrelated responsibilities. Should be split into focused modules for better maintainability.
13
-
14
- ## Current State
15
- forge-daemon.sh contains:
16
- 1. **Utility functions** (lines 56-111)
17
- - Log rotation
18
- - Notification trimming
19
- - Safe file move
20
-
21
- 2. **Notification system** (lines 117-263)
22
- - notify()
23
- - send_system_notification() - platform-specific
24
- - check_new_pending_tasks()
25
- - check_attention_needed()
26
-
27
- 3. **Status synchronization** (lines 265-345)
28
- - sync_agent_status_to_db()
29
- - build_worker_status()
30
-
31
- 4. **State management** (lines 351-463)
32
- - update_state()
33
- - build_attention_details()
34
- - route_completed_to_review()
35
- - route_approved_to_merged()
36
- - determine_daemon_state()
37
- - get_poll_interval()
38
-
39
- 5. **Daemon loop** (lines 473-533)
40
- - daemon_loop()
41
-
42
- 6. **Commands** (lines 539-742)
43
- - cmd_start()
44
- - cmd_stop()
45
- - cmd_status()
46
- - cmd_notifications()
47
- - cmd_clear_notifications()
48
-
49
- ## Proposed State
50
- Split into focused modules:
51
- ```
52
- bin/lib/
53
- daemon/
54
- notifications.sh <- Notification logic
55
- sync.sh <- Agent status sync
56
- state.sh <- State file management
57
- routing.sh <- Task routing logic
58
- bin/
59
- forge-daemon.sh <- Thin wrapper using modules
60
- ```
61
-
62
- Or for Node.js migration:
63
- ```
64
- src/daemon/
65
- index.js <- Main daemon loop
66
- notifications.js <- Notification system
67
- sync.js <- Agent status sync
68
- state.js <- State management
69
- routing.js <- Task routing
70
- ```
71
-
72
- ## Affected Files
73
- - G:\dev\vibe-forge\bin\forge-daemon.sh
74
- - G:\dev\vibe-forge\bin\lib\database.sh (related)
75
-
76
- ## Migration/Remediation Steps
77
- 1. Create bin/lib/daemon/ directory
78
- 2. Extract notification functions to notifications.sh
79
- 3. Extract sync functions to sync.sh
80
- 4. Extract state functions to state.sh
81
- 5. Extract routing functions to routing.sh
82
- 6. Update forge-daemon.sh to source modules
83
- 7. Ensure all tests pass
84
- 8. Update documentation
85
-
86
- ## Acceptance Criteria
87
- - [ ] forge-daemon.sh under 200 lines
88
- - [ ] Each module has single responsibility
89
- - [ ] No circular dependencies between modules
90
- - [ ] Tests passing
91
- - [ ] Daemon functionality unchanged
@@ -1,81 +0,0 @@
1
- ---
2
- id: ARCH-008
3
- title: "Resolve forge-master vs hub naming inconsistency"
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 planning/coordination agent is referred to by different names in different places, causing confusion and potential issues.
13
-
14
- ## Current State
15
- Naming inconsistencies:
16
-
17
- 1. **agents/forge-master/** - Directory uses "forge-master"
18
- - Contains personality.md, capabilities.md, context-template.md
19
-
20
- 2. **agents/planning-hub/** - Different directory uses "planning-hub"
21
- - Contains personality.md
22
-
23
- 3. **config/agents.json** - Uses "hub"
24
- ```json
25
- "hub": {
26
- "name": "Planning Hub",
27
- "personality_file": "agents/planning-hub/personality.md"
28
- }
29
- ```
30
-
31
- 4. **config/agent-manifest.yaml** - Uses "forge-master"
32
- ```yaml
33
- core_agents:
34
- forge-master:
35
- name: "Forge Master"
36
- ```
37
-
38
- 5. **bin/lib/constants.sh** - Uses "hub" with "master" alias
39
- ```bash
40
- VALID_AGENTS=(..., "hub")
41
- AGENT_ALIASES=([...], ["master"]="hub", ["forge-master"]="hub")
42
- ```
43
-
44
- 6. **Documentation** - Mixed usage
45
-
46
- Problems:
47
- - Two separate personality files that may differ
48
- - Confusion about canonical name
49
- - Extra data in forge-master/ (capabilities.md, context-template.md) not in planning-hub/
50
-
51
- ## Proposed State
52
- Single consistent name:
53
-
54
- 1. Pick canonical name: "hub" (shorter, already used in code)
55
- 2. Pick personality directory: agents/hub/ or agents/planning-hub/
56
- 3. Consolidate personality content
57
- 4. Keep aliases for discoverability
58
-
59
- ## Affected Files
60
- - G:\dev\vibe-forge\agents\forge-master\
61
- - G:\dev\vibe-forge\agents\planning-hub\
62
- - G:\dev\vibe-forge\config\agents.json
63
- - G:\dev\vibe-forge\config\agent-manifest.yaml
64
- - G:\dev\vibe-forge\bin\lib\constants.sh
65
- - G:\dev\vibe-forge\.claude\commands\forge.md
66
-
67
- ## Migration/Remediation Steps
68
- 1. Decide on canonical directory (planning-hub/ or hub/)
69
- 2. Merge content from forge-master/ into canonical directory
70
- 3. Delete or deprecate non-canonical directory
71
- 4. Update agents.json personality_file path
72
- 5. Update constants.sh fallback
73
- 6. Update agent-manifest.yaml (or delete per ARCH-001)
74
- 7. Search for all references and update
75
-
76
- ## Acceptance Criteria
77
- - [ ] Single directory for hub/planning agent
78
- - [ ] Consistent naming across all config files
79
- - [ ] All content consolidated (personality, capabilities, context-template)
80
- - [ ] Aliases still work (master, forge-master, planning, hub)
81
- - [ ] Tests passing
@@ -1,84 +0,0 @@
1
- ---
2
- id: ARCH-010
3
- title: "Add index files for cleaner module imports"
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 bin/lib/ directory lacks index files, requiring explicit file paths for imports. Node convention uses index.js for cleaner module exports.
13
-
14
- ## Current State
15
- ```
16
- bin/lib/
17
- colors.sh
18
- constants.sh
19
- config.sh
20
- agents.sh
21
- database.sh
22
- terminal.js
23
- ```
24
-
25
- Each bash script sources files explicitly:
26
- ```bash
27
- source "$SCRIPT_DIR/lib/colors.sh"
28
- source "$SCRIPT_DIR/lib/constants.sh"
29
- source "$SCRIPT_DIR/lib/config.sh"
30
- source "$SCRIPT_DIR/lib/agents.sh"
31
- ```
32
-
33
- Problems:
34
- - No single entry point for bash libraries
35
- - If migrating to Node.js, no index.js for module export
36
- - Repetitive sourcing in every script
37
-
38
- ## Proposed State
39
- For bash:
40
- ```bash
41
- # bin/lib/index.sh
42
- #!/usr/bin/env bash
43
- LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
- source "$LIB_DIR/colors.sh"
45
- source "$LIB_DIR/constants.sh"
46
- source "$LIB_DIR/config.sh"
47
- source "$LIB_DIR/agents.sh"
48
- # database.sh loaded only when needed
49
- ```
50
-
51
- Usage:
52
- ```bash
53
- source "$SCRIPT_DIR/lib/index.sh"
54
- ```
55
-
56
- For Node.js (if migrating):
57
- ```javascript
58
- // bin/lib/index.js
59
- module.exports = {
60
- terminal: require('./terminal'),
61
- config: require('./config'),
62
- agents: require('./agents'),
63
- };
64
- ```
65
-
66
- ## Affected Files
67
- - G:\dev\vibe-forge\bin\lib\ (new index.sh)
68
- - G:\dev\vibe-forge\bin\forge.sh
69
- - G:\dev\vibe-forge\bin\forge-setup.sh
70
- - G:\dev\vibe-forge\bin\forge-spawn.sh
71
- - G:\dev\vibe-forge\bin\forge-daemon.sh
72
-
73
- ## Migration/Remediation Steps
74
- 1. Create bin/lib/index.sh with all common sources
75
- 2. Consider lazy loading for database.sh (only for daemon)
76
- 3. Update all scripts to use single source
77
- 4. If migrating to Node.js, create index.js
78
- 5. Test all scripts still work
79
-
80
- ## Acceptance Criteria
81
- - [ ] Single source command for common libraries
82
- - [ ] Reduced boilerplate in scripts
83
- - [ ] Functionality unchanged
84
- - [ ] Tests passing
@@ -1,29 +0,0 @@
1
- ---
2
- id: CLEAN-002
3
- title: "Inconsistent task path references between shell and JS implementations"
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
- ---
10
-
11
- ## Summary
12
- The worker-loop.sh and worker-loop.js have inconsistent task directory paths:
13
- - Shell version uses `$FORGE_ROOT/tasks/pending/` (relative to FORGE_ROOT)
14
- - JS version uses `path.join(forgeRoot, '_vibe-forge', 'tasks')` (adds _vibe-forge prefix)
15
-
16
- This inconsistency could cause issues if both were used, and indicates the implementations have diverged.
17
-
18
- ## Affected Files/Lines
19
- - `.claude/hooks/worker-loop.sh:65-66` - uses `$TASKS_DIR="$FORGE_ROOT/tasks"`
20
- - `.claude/hooks/worker-loop.js:116` - uses `path.join(forgeRoot, '_vibe-forge', 'tasks')`
21
-
22
- ## Remediation
23
- 1. Determine the correct path structure based on project layout
24
- 2. Ensure the active JS implementation uses the correct path
25
- 3. Document the expected directory structure
26
-
27
- ## Acceptance Criteria
28
- - [ ] Consistent task directory path used across all implementations
29
- - [ ] Path works correctly in both standalone and embedded (_vibe-forge subdir) modes
@@ -1,31 +0,0 @@
1
- ---
2
- id: CLEAN-009
3
- title: "Inconsistent agent naming between agent-manifest.yaml and constants.sh"
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
- ---
10
-
11
- ## Summary
12
- The agent-manifest.yaml and constants.sh have inconsistent agent definitions:
13
- - agent-manifest.yaml defines `forge-master` as an agent
14
- - constants.sh defines `hub` as the canonical name with aliases like "planning", "master", "forge-master"
15
- - agent-manifest.yaml references personalities at `/agents/forge-master/` but constants.sh expects `agents/planning-hub/`
16
-
17
- ## Affected Files/Lines
18
- - `config/agent-manifest.yaml:8-19` - defines forge-master with personality at `/agents/forge-master/personality.md`
19
- - `bin/lib/constants.sh:114-118` - defines hub with personality at `agents/planning-hub/personality.md`
20
- - `config/agent-manifest.yaml:123-160` - defines planning_agents (sage, oracle, quartermaster) not in constants.sh
21
-
22
- ## Remediation
23
- 1. Decide on single source of truth for agent definitions
24
- 2. Either update constants.sh to match agent-manifest.yaml or vice versa
25
- 3. Consider using agents.json as the canonical source and generating constants.sh fallbacks from it
26
- 4. Ensure personality file paths are consistent
27
-
28
- ## Acceptance Criteria
29
- - [ ] Single source of truth for agent definitions
30
- - [ ] Consistent naming between config files and code
31
- - [ ] All referenced personality files exist at specified paths
@@ -1,30 +0,0 @@
1
- ---
2
- id: CLEAN-010
3
- title: "Unused planning_agents in agent-manifest.yaml"
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
- ---
10
-
11
- ## Summary
12
- The agent-manifest.yaml defines several planning_agents (sage, oracle, quartermaster) that don't appear to be implemented or used anywhere in the codebase:
13
- - No corresponding entries in constants.sh
14
- - No personality files in agents/ directory for these agents
15
- - Not referenced in forge.md or other command files
16
-
17
- These may be planned features or dead configuration.
18
-
19
- ## Affected Files/Lines
20
- - `config/agent-manifest.yaml:124-162` - sage, oracle, quartermaster definitions
21
-
22
- ## Remediation
23
- 1. If these are planned features, add a comment indicating they are not yet implemented
24
- 2. If they are dead configuration, remove them to reduce confusion
25
- 3. If they should be working, create the missing personality files and update constants.sh
26
-
27
- ## Acceptance Criteria
28
- - [ ] Planning agents are either implemented or clearly marked as TODO
29
- - [ ] No orphaned configuration without corresponding implementation
30
- - [ ] Documentation updated to reflect actual vs. planned agents
@@ -1,30 +0,0 @@
1
- ---
2
- id: CLEAN-011
3
- title: "Duplicate color definitions between cli.js and colors.sh"
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
- ---
10
-
11
- ## Summary
12
- Color codes are defined in two places:
13
- - `bin/lib/colors.sh` - Bash color definitions
14
- - `bin/cli.js:26-33` - JavaScript color definitions
15
-
16
- The cli.js has a comment explaining why it's self-contained (runs via npx before rest is installed), but the color values themselves could potentially drift.
17
-
18
- ## Affected Files/Lines
19
- - `bin/lib/colors.sh:9-22` - Bash color definitions (RED, GREEN, YELLOW, BLUE, CYAN, NC)
20
- - `bin/cli.js:26-33` - JavaScript color definitions (reset, red, green, yellow, blue, cyan)
21
-
22
- ## Remediation
23
- The duplication is intentional per the comment in cli.js. No code changes needed, but:
24
- 1. Add a comment in colors.sh noting the JavaScript equivalent exists
25
- 2. If colors are updated in one place, update the other
26
- 3. Consider adding a test to verify they match
27
-
28
- ## Acceptance Criteria
29
- - [ ] Cross-reference comment added to colors.sh
30
- - [ ] Document the intentional duplication in code comments