fix: 使用绝对路径确保 skill 在全局安装时正常工作

问题
- 原有代码使用相对路径 (cd reference &&)
- skill 安装在 ~/.claude/skills/ 后相对路径会失效

修复
- 所有文件操作使用绝对路径: ~/.claude/skills/command-guide/reference/
- CLI 命令改用 --include-directories 参数指向绝对路径
- 更新示例输出中的路径为绝对路径

影响
- handleSimpleQuery: basePath 使用绝对路径
- locateCommandFile: 使用 basePath 参数
- executeCLIAnalysis: 使用 --include-directories 替代 cd
- resolveEntityPath: glob 使用绝对路径
- buildCLIPrompt: CONTEXT 使用 @**/* + --include-directories

版本更新
- v1.3.0 → v1.3.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-11-06 16:37:21 +08:00
parent 1897ba4e82
commit 38b070551c
2 changed files with 49 additions and 26 deletions

View File

@@ -123,15 +123,16 @@ Comprehensive command guide for Claude DMS3 workflow system covering 69 commands
1. Detect complexity indicators (多个命令对比、工作流程分析、最佳实践)
2. Construct analysis prompt for gemini/qwen:
```bash
cd reference && gemini -p "
gemini -p "
PURPOSE: Analyze command documentation to answer user query
TASK: [extracted user question with context]
MODE: analysis
CONTEXT: @agents/**/* @commands/**/*
CONTEXT: @**/*
EXPECTED: Comprehensive answer with examples and recommendations
RULES: $(cat ~/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt) | Focus on practical usage | analysis=READ-ONLY
" -m gemini-3-pro-preview-11-2025
" -m gemini-3-pro-preview-11-2025 --include-directories ~/.claude/skills/command-guide/reference
```
Note: Use absolute path `~/.claude/skills/command-guide/reference` for reference documentation access
3. Return CLI analysis results to user
**Query Classification**:
@@ -192,7 +193,11 @@ Complete backup of all command and agent documentation for deep analysis:
- `task/` - Task management commands (4 files)
- `workflow/` - Workflow commands (46 files)
**Usage**: Mode 6 queries these files directly for detailed command/agent analysis, or uses CLI tools (gemini/qwen) for complex cross-command analysis.
**Installation Path**: `~/.claude/skills/command-guide/` (skill designed for global installation)
**Absolute Reference Path**: `~/.claude/skills/command-guide/reference/`
**Usage**: Mode 6 queries these files directly for detailed command/agent analysis, or uses CLI tools (gemini/qwen) with absolute paths for complex cross-command analysis.
---
@@ -264,10 +269,15 @@ Team members get latest indexes via `git pull`.
---
**Version**: 1.3.0 (Deep command analysis with reference documentation backup)
**Version**: 1.3.1 (Path configuration for global installation)
**Last Updated**: 2025-11-06
**Maintainer**: Claude DMS3 Team
**Changelog v1.3.1**:
- ✅ Updated all paths to use absolute paths (`~/.claude/skills/command-guide/`)
- ✅ CLI commands now use `--include-directories` with absolute reference path
- ✅ Ensures skill works correctly when installed in `~/.claude/skills/`
**Changelog v1.3.0**:
- ✅ Added Mode 6: Deep Command Analysis with CLI-assisted queries
- ✅ Created reference documentation backup (80 files: 11 agents + 69 commands)