feat: update profile path resolution and enhance scripts for improved project adaptability
This commit is contained in:
@@ -2,12 +2,13 @@
|
||||
|
||||
This directory exposes a project-agnostic interface for canonical project knowledge.
|
||||
|
||||
The current implementation uses Markdown files under `project-knowledge/` and can optionally delegate to the Obsidian CLI when it is available. The agent should depend on this memory interface, not on Obsidian-specific behavior, so the backing tool can be replaced later.
|
||||
The current implementation resolves the canonical Markdown directory from `profiles/<profile>/workspace.json` and can optionally delegate to the Obsidian CLI when it is available. The agent should depend on this memory interface, not on Obsidian-specific behavior, so the backing tool can be replaced later.
|
||||
|
||||
## Backend Model
|
||||
|
||||
- `AIW_PROJECT_KNOWLEDGE_DIR` points to the canonical Markdown project knowledge directory.
|
||||
- `AIW_MEMORY_VAULT_DIR` and `AIW_OBSIDIAN_VAULT_DIR` are transition aliases.
|
||||
- `AIW_PROJECT_PROFILE` selects the profile, defaulting to `fidelity` in this repository.
|
||||
- `profiles/<profile>/workspace.json` defines the canonical Markdown project knowledge directory.
|
||||
- `AIW_PROJECT_KNOWLEDGE_DIR` can override the resolved directory for local experiments.
|
||||
- `AIW_MEMORY_BACKEND` defaults to `auto`.
|
||||
- `auto` uses Obsidian CLI when it is useful and available, then falls back to direct Markdown operations.
|
||||
- `files` forces direct Markdown operations.
|
||||
|
||||
@@ -4,7 +4,8 @@ set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
WORKSPACE_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
PROJECT_KNOWLEDGE_DIR="${AIW_PROJECT_KNOWLEDGE_DIR:-${AIW_MEMORY_VAULT_DIR:-${AIW_OBSIDIAN_VAULT_DIR:-$WORKSPACE_ROOT/project-knowledge}}}"
|
||||
PROFILE="${AIW_PROJECT_PROFILE:-fidelity}"
|
||||
PROJECT_KNOWLEDGE_DIR="${AIW_PROJECT_KNOWLEDGE_DIR:-$(python3 "$WORKSPACE_ROOT/scripts/aiw/profile.py" path knowledge --profile "$PROFILE")}"
|
||||
VAULT_DIR="$PROJECT_KNOWLEDGE_DIR"
|
||||
BACKEND="${AIW_MEMORY_BACKEND:-auto}"
|
||||
OBSIDIAN_CLI="$WORKSPACE_ROOT/scripts/obsidian/cli.sh"
|
||||
|
||||
Reference in New Issue
Block a user