An agentic skills framework & software development methodology that works.
fix: cleanup remaining code review issues
Clauded0806ba5af48
diff --git a/.opencode/plugin/superpowers.js b/.opencode/plugin/superpowers.jsindex 784c151cb..ddc4eef79 100644--- a/.opencode/plugin/superpowers.js+++ b/.opencode/plugin/superpowers.js@@ -14,7 +14,7 @@ import * as skillsCore from '../../lib/skills-core.js';const __dirname = path.dirname(fileURLToPath(import.meta.url));-export const SuperpowersPlugin = async ({ project, client, $, directory, worktree }) => {+export const SuperpowersPlugin = async ({ client, directory }) => {const homeDir = os.homedir();const projectSkillsDir = path.join(directory, '.opencode/skills');// Derive superpowers skills dir from plugin location (works for both symlinked and local installs)diff --git a/tests/opencode/test-skills-core.sh b/tests/opencode/test-skills-core.shindex 223f9edd1..b058d5fd5 100755--- a/tests/opencode/test-skills-core.sh+++ b/tests/opencode/test-skills-core.sh@@ -362,5 +362,79 @@ elseexit 1fi+# Test 5: Test checkForUpdates function+echo ""+echo "Test 5: Testing checkForUpdates..."++# Create a test git repo+mkdir -p "$TEST_HOME/test-repo"+cd "$TEST_HOME/test-repo"+git init --quiet+git config user.email "[email protected]"+git config user.name "Test"+echo "test" > file.txt+git add file.txt+git commit -m "initial" --quiet+cd "$SCRIPT_DIR"++# Test checkForUpdates on repo without remote (should return false, not error)+result=$(node -e "+const { execSync } = require('child_process');++function checkForUpdates(repoDir) {+ try {+ const output = execSync('git fetch origin && git status --porcelain=v1 --branch', {+ cwd: repoDir,+ timeout: 3000,+ encoding: 'utf8',+ stdio: 'pipe'+ });+ const statusLines = output.split('\n');+ for (const line of statusLines) {+ if (line.startsWith('## ') && line.includes('[behind ')) {+ return true;+ }+ }+ return false;+ } catch (error) {+ return false;+ }+}++// Test 1: Repo without remote should return false (graceful error handling)+const result1 = checkForUpdates('$TEST_HOME/test-repo');+console.log('NO_REMOTE:', result1);++// Test 2: Non-existent directory should return false+const result2 = checkForUpdates('$TEST_HOME/nonexistent');+console.log('NONEXISTENT:', result2);++// Test 3: Non-git directory should return false+const result3 = checkForUpdates('$TEST_HOME');+console.log('NOT_GIT:', result3);+" 2>&1)++if echo "$result" | grep -q 'NO_REMOTE: false'; then+ echo " [PASS] checkForUpdates handles repo without remote gracefully"+else+ echo " [FAIL] checkForUpdates should return false for repo without remote"+ echo " Result: $result"+ exit 1+fi++if echo "$result" | grep -q 'NONEXISTENT: false'; then+ echo " [PASS] checkForUpdates handles non-existent directory"+else+ echo " [FAIL] checkForUpdates should return false for non-existent directory"+ exit 1+fi++if echo "$result" | grep -q 'NOT_GIT: false'; then+ echo " [PASS] checkForUpdates handles non-git directory"+else+ echo " [FAIL] checkForUpdates should return false for non-git directory"+ exit 1+fi+echo ""echo "=== All skills-core library tests passed ==="