feat(ghost): replace symlink farm with native project discovery control#62
Merged
feat(ghost): replace symlink farm with native project discovery control#62
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
ocx | 20c5aa0 | Jan 20 2026, 04:08 AM |
Remove symlink farm architecture from ghost mode, replacing it with OpenCode's native OPENCODE_DISABLE_PROJECT_DISCOVERY environment variable. Changes: - Delete symlink-farm.ts, pattern-filter.ts, file-sync.ts + tests - Simplify opencode.ts (512 → 304 lines) - Remove exclude/include/maxFiles from ghost schema - Update AGENTS.md documentation BREAKING CHANGE: Profiles with AGENTS.md must add `instructions: ["./AGENTS.md"]` to their opencode.jsonc configuration. Depends on: anomalyco/opencode#8093
9847cb4 to
a467487
Compare
The ghost-include-opencode.test.ts file was testing the now-deleted symlink farm functionality and was causing test failures due to missing module imports.
Owner
Author
Testing SummaryTested with OpenCode fork containing PR #8093 ( Test Environment
Recreation Steps# 1. Build OCX
cd ~/workspace/kdcokenny/ocx/packages/cli && bun run build && cd ../..
# 2. Build OpenCode fork
cd /path/to/opencode/packages/opencode && bun run build
# 3. Create test project
mkdir -p /tmp/ocx-test/src/components
echo "ROOT" > /tmp/ocx-test/AGENTS.md
echo "SRC" > /tmp/ocx-test/src/AGENTS.md
echo "COMP" > /tmp/ocx-test/src/components/AGENTS.md
cd /tmp/ocx-test && git init
# 4. Set OpenCode binary
export OPENCODE_BIN="/path/to/opencode/dist/opencode-darwin-arm64/bin/opencode"
# 5. Run tests
~/workspace/kdcokenny/ocx/packages/cli/dist/index.js ghost opencode run "List AGENTS.md contents and MCP servers"Test Results
Dependencies
SummaryAll tests passed. The new architecture:
|
- Remove symlink farm, file sync, maxFiles references - Add OPENCODE_BIN env var documentation - Add exclude/include pattern documentation - Update 'How It Works' section - Update verification tests in CONTRIBUTING.md
cc85bb4 to
05b3a21
Compare
…OJECT_CONFIG Align with upstream OpenCode PR #8093 which renamed the environment variable in commit 31aae19. Updated files: - packages/cli/src/commands/ghost/opencode.ts - packages/cli/tests/ghost/ghost-opencode.test.ts - AGENTS.md - README.md - docs/CLI.md
Allow each ghost profile to specify its own OpenCode binary path via the `bin` option in ghost.jsonc. Resolution order: 1. ghost.jsonc `bin` option (per-profile) 2. OPENCODE_BIN environment variable (global) 3. "opencode" (default, from PATH) Changes: - Add bin property to ghostConfigSchema - Update opencode.ts to use config.bin in fallback chain - Add documentation in AGENTS.md - Add tests for bin fallback behavior
Update all documentation to include the new ghost.jsonc `bin` option for specifying custom OpenCode binary paths. Updated files: - docs/CLI.md: Added bin to schema table and Custom OpenCode Binary section - README.md: Updated env var table and ghost.jsonc example - CONTRIBUTING.md: Recommend bin config as preferred approach Also fixes: Remove non-existent maxFiles field from README example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the symlink farm architecture from ghost mode, replacing it with OpenCode's native
OPENCODE_DISABLE_PROJECT_CONFIGenvironment variable.Dependencies
Changes
symlink-farm.ts,pattern-filter.ts,file-sync.ts+ tests (~1000 lines)opencode.ts(512 → 304 lines, -40%)exclude,include,maxFilesfieldsMigration
Profiles with instruction files must add to their
opencode.jsonc:{ "instructions": ["./AGENTS.md"] // and/or CLAUDE.md, CONTEXT.md }New Flow
OpenCode now runs directly in the project directory with:
OPENCODE_DISABLE_PROJECT_CONFIG=trueOPENCODE_CONFIG_DIRpointing to profile