diff --git a/OBSIDIAN_KNOWLEDGE_WORKFLOW.md b/OBSIDIAN_KNOWLEDGE_WORKFLOW.md new file mode 100644 index 0000000..bc94405 --- /dev/null +++ b/OBSIDIAN_KNOWLEDGE_WORKFLOW.md @@ -0,0 +1,43 @@ +# Obsidian Knowledge Workflow (Recommended) + +## Decision + +Use **Obsidian Canvas** as the primary workspace, then add mind map views only for summary snapshots. + +Reason: +- Canvas handles mixed artifacts better (notes, links, files, tasks, prompts). +- Your autoresearch flow needs iterative evidence tracking, not only tree structures. +- Canvas works well with role-based agent outputs from OpenCode. + +## Suggested structure + +Create a vault folder: + +- `Research/Inbox/` +- `Research/Sources/` +- `Research/Summaries/` +- `Research/Canvas/` + +Create one canvas per initiative: + +- `Research/Canvas/.canvas` + +## Autoresearch loop + +1. Run OpenCode agent/research tasks. +2. Save output markdown into `Research/Sources/`. +3. Generate a short synthesis note in `Research/Summaries/`. +4. Place both on Canvas: + - source nodes + - synthesis nodes + - decision nodes +5. Link unresolved questions back to next OpenCode task. + +## Optional mind map usage + +Use mind maps only for: +- executive brief snapshots +- taxonomy views +- fast planning overviews + +Do not use mind maps as the system of record for evidence and citations. diff --git a/README.md b/README.md index 77aab25..79591e9 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This folder is safe to commit to GitHub. It contains config and installers, but - `scripts/install-linux.sh` - `scripts/install-windows.ps1` - `.env.example` +- `OBSIDIAN_KNOWLEDGE_WORKFLOW.md` ## How to use @@ -18,6 +19,23 @@ This folder is safe to commit to GitHub. It contains config and installers, but 4. Copy `.env.example` to `.env` and fill keys locally. 5. Run `opencode auth login ` or `/connect` in OpenCode. +### Optional enhancements toggles + +Linux: + +```bash +INSTALL_PROMPTFOO=1 INSTALL_OPENVIKING=1 INSTALL_IMPECCABLE=1 bash scripts/install-linux.sh +``` + +Windows PowerShell: + +```powershell +$env:INSTALL_PROMPTFOO="1" +$env:INSTALL_OPENVIKING="1" +$env:INSTALL_IMPECCABLE="1" +.\scripts\install-windows.ps1 +``` + ## Important - Do not commit `.env`. diff --git a/scripts/install-linux.sh b/scripts/install-linux.sh index 08f8803..2ce1a68 100755 --- a/scripts/install-linux.sh +++ b/scripts/install-linux.sh @@ -4,6 +4,11 @@ set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" TEMPLATES_DIR="$ROOT_DIR/templates" TARGET_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/opencode" +TOOLS_DIR="$HOME/.local/share/opencode-tools" + +INSTALL_PROMPTFOO="${INSTALL_PROMPTFOO:-1}" +INSTALL_OPENVIKING="${INSTALL_OPENVIKING:-0}" +INSTALL_IMPECCABLE="${INSTALL_IMPECCABLE:-0}" echo "Installing OpenCode config to: $TARGET_DIR" mkdir -p "$TARGET_DIR" @@ -19,7 +24,40 @@ else echo "Skipping package install: bun/npm not found" fi +if [[ "$INSTALL_PROMPTFOO" == "1" ]]; then + echo "Installing Promptfoo..." + if command -v npm >/dev/null 2>&1; then + npm install -g promptfoo + elif command -v bun >/dev/null 2>&1; then + bun add -g promptfoo + else + echo "Skipping Promptfoo install: bun/npm not found" + fi +fi + +if [[ "$INSTALL_OPENVIKING" == "1" ]]; then + echo "Installing OpenViking files to $TOOLS_DIR/openviking..." + mkdir -p "$TOOLS_DIR" + if [[ -d "$TOOLS_DIR/openviking/.git" ]]; then + git -C "$TOOLS_DIR/openviking" pull --ff-only + else + git clone https://github.com/volcengine/OpenViking "$TOOLS_DIR/openviking" + fi + echo "OpenViking repo synced. Use its README to run Docker/services." +fi + +if [[ "$INSTALL_IMPECCABLE" == "1" ]]; then + echo "Installing Impeccable skills repo to $TOOLS_DIR/impeccable..." + mkdir -p "$TOOLS_DIR" + if [[ -d "$TOOLS_DIR/impeccable/.git" ]]; then + git -C "$TOOLS_DIR/impeccable" pull --ff-only + else + git clone https://github.com/pbakaus/impeccable "$TOOLS_DIR/impeccable" + fi +fi + echo "Done." echo "Next steps:" echo "1) Add keys locally with: opencode auth login " echo "2) Verify with: bunx oh-my-opencode doctor --verbose" +echo "3) Optional toggles: INSTALL_PROMPTFOO=1 INSTALL_OPENVIKING=1 INSTALL_IMPECCABLE=1" diff --git a/scripts/install-windows.ps1 b/scripts/install-windows.ps1 index b11bfe7..06fc64a 100644 --- a/scripts/install-windows.ps1 +++ b/scripts/install-windows.ps1 @@ -3,6 +3,11 @@ $ErrorActionPreference = "Stop" $RootDir = Split-Path -Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -Parent $TemplatesDir = Join-Path $RootDir "templates" $TargetDir = Join-Path $env:USERPROFILE ".config\opencode" +$ToolsDir = Join-Path $env:USERPROFILE ".opencode-tools" + +if (-not $env:INSTALL_PROMPTFOO) { $env:INSTALL_PROMPTFOO = "1" } +if (-not $env:INSTALL_OPENVIKING) { $env:INSTALL_OPENVIKING = "0" } +if (-not $env:INSTALL_IMPECCABLE) { $env:INSTALL_IMPECCABLE = "0" } Write-Host "Installing OpenCode config to: $TargetDir" New-Item -ItemType Directory -Path $TargetDir -Force | Out-Null @@ -22,7 +27,40 @@ if (Get-Command bun -ErrorAction SilentlyContinue) { Write-Host "Skipping package install: bun/npm not found" } +if ($env:INSTALL_PROMPTFOO -eq "1") { + Write-Host "Installing Promptfoo..." + if (Get-Command npm -ErrorAction SilentlyContinue) { + npm install -g promptfoo + } elseif (Get-Command bun -ErrorAction SilentlyContinue) { + bun add -g promptfoo + } else { + Write-Host "Skipping Promptfoo install: bun/npm not found" + } +} + +if ($env:INSTALL_OPENVIKING -eq "1") { + $OpenVikingDir = Join-Path $ToolsDir "openviking" + New-Item -ItemType Directory -Path $ToolsDir -Force | Out-Null + if (Test-Path (Join-Path $OpenVikingDir ".git")) { + git -C $OpenVikingDir pull --ff-only + } else { + git clone https://github.com/volcengine/OpenViking $OpenVikingDir + } + Write-Host "OpenViking repo synced. Use its README to run Docker/services." +} + +if ($env:INSTALL_IMPECCABLE -eq "1") { + $ImpeccableDir = Join-Path $ToolsDir "impeccable" + New-Item -ItemType Directory -Path $ToolsDir -Force | Out-Null + if (Test-Path (Join-Path $ImpeccableDir ".git")) { + git -C $ImpeccableDir pull --ff-only + } else { + git clone https://github.com/pbakaus/impeccable $ImpeccableDir + } +} + Write-Host "Done." Write-Host "Next steps:" Write-Host "1) Add keys locally with: opencode auth login " Write-Host "2) Verify with: bunx oh-my-opencode doctor --verbose" +Write-Host "3) Optional env toggles: INSTALL_PROMPTFOO=1 INSTALL_OPENVIKING=1 INSTALL_IMPECCABLE=1"