fix: correct script path references in skills and agents#11
Merged
Conversation
WHAT CHANGED:
1. opc/scripts/setup/wizard.py:
- Added CLAUDE_CC_DIR env var export (CC repository root)
- CLAUDE_CC_DIR = parent of CLAUDE_OPC_DIR
- WHY: Skills reference scripts at $CC_DIR/.claude/scripts/
but only CLAUDE_OPC_DIR was exported
2. Skills (7 files):
- commit, git-commits: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
for generate-reasoning.sh
- describe_pr: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
for aggregate-reasoning.sh
- recall-reasoning: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
for search-reasoning.sh
- tldr-stats: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR
for tldr_stats.py
- math-unified: $CLAUDE_PROJECT_DIR/.claude/scripts/cc_math/
→ $CLAUDE_OPC_DIR/scripts/cc_math/
- skill-developer: mixed $CLAUDE_PROJECT_DIR → $CLAUDE_OPC_DIR
(scripts) and $CLAUDE_CC_DIR (.claude/ resources)
3. Agents (8 files):
- braintrust-analyst, session-analyst: $CLAUDE_PROJECT_DIR
→ $CLAUDE_OPC_DIR for runtime.harness and braintrust scripts
- memory-extractor: $CLAUDE_PROJECT_DIR/opc → $CLAUDE_OPC_DIR
for core extraction scripts
- agentica-agent, plan-agent, validate-agent, scribe,
debug-agent: $CLAUDE_PROJECT_DIR → $CLAUDE_CC_DIR for
skill file reads (cat SKILL.md)
CONTEXT:
$CLAUDE_PROJECT_DIR is set by Claude Code to the user's current
working project (e.g. /Users/x/myapp). Skills and agents were
using it to locate CC's own scripts, which only works if the user
happens to be working inside the CC repo itself. This breaks for
any user who installed CC in a different directory.
Fixes parcadei#106
542129a to
592d193
Compare
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.
Ported from parcadei/Continuous-Claude-v3#138 by @tkavelli
Summary
CLAUDE_CC_DIRenvironment variable export in wizard (CC repository root)$CLAUDE_CC_DIRor$CLAUDE_OPC_DIRinstead of$CLAUDE_PROJECT_DIRfor CC-internal script referencesProblem
$CLAUDE_PROJECT_DIRis set by Claude Code to the user's current working project. Multiple skills and agents use it to locate CC's own scripts, which only works if the user happens to be working inside the CC repo itself.Path mapping
$CLAUDE_PROJECT_DIR/.claude/scripts/*.sh$CLAUDE_CC_DIR/.claude/scripts/*.sh$CLAUDE_PROJECT_DIR/.claude/scripts/cc_math/$CLAUDE_OPC_DIR/scripts/cc_math/$CLAUDE_PROJECT_DIR/.claude/skills/*/SKILL.md$CLAUDE_CC_DIR/.claude/skills/*/SKILL.mdTest plan
CLAUDE_CC_DIRandCLAUDE_OPC_DIRare exported/commit— verifygenerate-reasoning.shis found