Problem
The knowledge plugin's library_dir userConfig option only resolves literal paths. resolveWorkRoot() (skills/youtube-digest/extraction/lib/work-root.js) is:
return process.env.YOUTUBE_WORK_ROOT || process.env.CLAUDE_PROJECT_DIR || process.cwd();
No ~, env-var, or placeholder expansion anywhere in the chain — the skill contract prefixes relative values with the home directory, and absolute values pass through verbatim.
Consequence: pointing library_dir at a repo outside the home directory (the intended knowledge-corpus consolidation flow, e.g. D:/repos/github.com/melodic-software/knowledge-corpus) requires a literal machine-specific path in user-level settings.json. The guardrails plugin's hardcoded-path-check hook (correctly) blocks writing that value. The two plugins are in direct conflict for the primary supported use case.
Observed 2026-07-21 during a live digest session: config write blocked by the hook; session fell back to per-run --work-root flags.
Candidate solutions (decision open)
- Env-var indirection — allow
library_dir values like ${KNOWLEDGE_CORPUS_DIR}; expand in resolveWorkRoot()/launcher. Machine variance lives in OS user env vars, settings.json stays portable.
- Tilde expansion — support
~/... values; helps only when the corpus lives under home (does not cover the drive-split layout).
- ghq-derived scheme — support
ghq:owner/repo; resolve via ghq root + layout at runtime. Portable across machines that keep the ghq convention; matches the org's existing repo-layout doc.
Options 1 and 3 both solve the drive-split case; 3 is zero-config per machine but couples the seam to ghq presence. Evaluate against the plugin's portability posture before picking.
Acceptance sketch
- A non-home corpus root configurable without a machine-specific literal in settings.json
hardcoded-path-check passes on the resulting config
- Existing literal-path values keep working (back-compat)
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4RMR3G1rHAdNjxTqenVJL
Problem
The knowledge plugin's
library_diruserConfig option only resolves literal paths.resolveWorkRoot()(skills/youtube-digest/extraction/lib/work-root.js) is:No
~, env-var, or placeholder expansion anywhere in the chain — the skill contract prefixes relative values with the home directory, and absolute values pass through verbatim.Consequence: pointing
library_dirat a repo outside the home directory (the intended knowledge-corpus consolidation flow, e.g.D:/repos/github.com/melodic-software/knowledge-corpus) requires a literal machine-specific path in user-levelsettings.json. The guardrails plugin'shardcoded-path-checkhook (correctly) blocks writing that value. The two plugins are in direct conflict for the primary supported use case.Observed 2026-07-21 during a live digest session: config write blocked by the hook; session fell back to per-run
--work-rootflags.Candidate solutions (decision open)
library_dirvalues like${KNOWLEDGE_CORPUS_DIR}; expand inresolveWorkRoot()/launcher. Machine variance lives in OS user env vars, settings.json stays portable.~/...values; helps only when the corpus lives under home (does not cover the drive-split layout).ghq:owner/repo; resolve viaghq root+ layout at runtime. Portable across machines that keep the ghq convention; matches the org's existing repo-layout doc.Options 1 and 3 both solve the drive-split case; 3 is zero-config per machine but couples the seam to ghq presence. Evaluate against the plugin's portability posture before picking.
Acceptance sketch
hardcoded-path-checkpasses on the resulting config🤖 Generated with Claude Code
https://claude.ai/code/session_01Y4RMR3G1rHAdNjxTqenVJL