chore: release v5.2.1 - SKILL workflow improvements

Major Changes:
- Redesigned /memory:load-skill-memory as manual activation tool
- Changed --regenerate to --update flag in skill-memory command
- Enhanced context search strategy with SKILL first priority

Details:
1. load-skill-memory command redesign:
   - Manual activation: user specifies SKILL name explicitly
   - Intent-driven doc loading: 5 levels based on task description
   - Memory-based validation: removed bash checks
   - File size: 355→132 lines (-62.8%)

2. Parameter naming consistency:
   - Renamed --regenerate to --update in skill-memory.md
   - Updated all references and examples

3. Context search strategy (global .claude):
   - Added SKILL packages as first priority tool
   - Emphasized use BEFORE Gemini analysis
   - Updated tool selection matrix and examples

See CHANGELOG.md for complete details.
This commit is contained in:
catlog22
2025-11-03 22:07:09 +08:00
parent 8926611964
commit f1c89127dc
2 changed files with 55 additions and 2490 deletions

View File

@@ -1,7 +1,7 @@
--- ---
name: skill-memory name: skill-memory
description: Generate SKILL package index from project documentation description: Generate SKILL package index from project documentation
argument-hint: "[path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute]" argument-hint: "[path] [--tool <gemini|qwen|codex>] [--update] [--mode <full|partial>] [--cli-execute]"
allowed-tools: SlashCommand(*), TodoWrite(*), Bash(*), Read(*), Write(*) allowed-tools: SlashCommand(*), TodoWrite(*), Bash(*), Read(*), Write(*)
--- ---
@@ -70,7 +70,7 @@ bash(git rev-parse --show-toplevel 2>/dev/null || pwd)
# Default values (use these unless user specifies otherwise): # Default values (use these unless user specifies otherwise):
# - tool: "gemini" # - tool: "gemini"
# - mode: "full" # - mode: "full"
# - regenerate: false (no --regenerate flag) # - update: false (no --update flag)
# - cli_execute: false (no --cli-execute flag) # - cli_execute: false (no --cli-execute flag)
``` ```
@@ -87,9 +87,9 @@ bash(find .workflow/docs/my_project -name "*.md" 2>/dev/null | wc -l || echo 0)
- `docs_exists`: `exists` or `not_exists` - `docs_exists`: `exists` or `not_exists`
- `existing_docs`: `5` (or `0` if no docs) - `existing_docs`: `5` (or `0` if no docs)
**Step 4: Handle --regenerate Flag (If Specified)** **Step 4: Handle --update Flag (If Specified)**
```bash ```bash
# If user specified --regenerate, delete existing docs directory # If user specified --update, delete existing docs directory
bash(rm -rf .workflow/docs/my_project 2>/dev/null || true) bash(rm -rf .workflow/docs/my_project 2>/dev/null || true)
# Verify deletion # Verify deletion
@@ -103,8 +103,8 @@ bash(test -d .workflow/docs/my_project && echo "still_exists" || echo "deleted")
- `TOOL`: `gemini` (default) or user-specified - `TOOL`: `gemini` (default) or user-specified
- `MODE`: `full` (default) or user-specified - `MODE`: `full` (default) or user-specified
- `CLI_EXECUTE`: `false` (default) or `true` if --cli-execute flag - `CLI_EXECUTE`: `false` (default) or `true` if --cli-execute flag
- `REGENERATE`: `false` (default) or `true` if --regenerate flag - `UPDATE`: `false` (default) or `true` if --update flag
- `EXISTING_DOCS`: `0` (after regenerate) or actual count - `EXISTING_DOCS`: `0` (after update) or actual count
**Completion Criteria**: **Completion Criteria**:
- All parameters extracted and validated - All parameters extracted and validated
@@ -133,7 +133,7 @@ SlashCommand(command="/memory:docs [targetPath] --tool [tool] --mode [mode] [--c
/memory:docs /d/my_app --tool gemini --mode full --cli-execute /memory:docs /d/my_app --tool gemini --mode full --cli-execute
``` ```
**Note**: The `--regenerate` flag is handled in Phase 1 by deleting existing documentation. This command always calls `/memory:docs` without the regenerate flag, relying on docs.md's built-in update detection. **Note**: The `--update` flag is handled in Phase 1 by deleting existing documentation. This command always calls `/memory:docs` without the update flag, relying on docs.md's built-in update detection.
**Input**: **Input**:
- `targetPath` from Phase 1 - `targetPath` from Phase 1
@@ -375,7 +375,7 @@ User triggers command
## Parameters ## Parameters
```bash ```bash
/memory:skill-memory [path] [--tool <gemini|qwen|codex>] [--regenerate] [--mode <full|partial>] [--cli-execute] /memory:skill-memory [path] [--tool <gemini|qwen|codex>] [--update] [--mode <full|partial>] [--cli-execute]
``` ```
- **path**: Target directory (default: current directory) - **path**: Target directory (default: current directory)
@@ -383,7 +383,7 @@ User triggers command
- `gemini`: Comprehensive documentation - `gemini`: Comprehensive documentation
- `qwen`: Architecture analysis - `qwen`: Architecture analysis
- `codex`: Implementation validation - `codex`: Implementation validation
- **--regenerate**: Force regenerate all documentation - **--update**: Force update all documentation
- When enabled: Deletes existing `.workflow/docs/{project_name}/` before regeneration - When enabled: Deletes existing `.workflow/docs/{project_name}/` before regeneration
- Ensures fresh documentation from source code - Ensures fresh documentation from source code
- **--mode**: Documentation mode (default: full) - **--mode**: Documentation mode (default: full)
@@ -407,16 +407,16 @@ User triggers command
3. Phase 3: Executes documentation generation via `/workflow:execute` 3. Phase 3: Executes documentation generation via `/workflow:execute`
4. Phase 4: Generates SKILL.md at `.claude/skills/{project_name}/SKILL.md` 4. Phase 4: Generates SKILL.md at `.claude/skills/{project_name}/SKILL.md`
### Example 2: Regenerate with Qwen ### Example 2: Update with Qwen
```bash ```bash
/memory:skill-memory /d/my_app --tool qwen --regenerate /memory:skill-memory /d/my_app --tool qwen --update
``` ```
**Workflow**: **Workflow**:
1. Phase 1: Parses target path, detects regenerate flag 1. Phase 1: Parses target path, detects update flag
2. Phase 2: Calls `/memory:docs /d/my_app --tool qwen --mode full` (regenerate handled in Phase 1) 2. Phase 2: Calls `/memory:docs /d/my_app --tool qwen --mode full` (update handled in Phase 1)
3. Phase 3: Executes documentation regeneration 3. Phase 3: Executes documentation update
4. Phase 4: Generates updated SKILL.md 4. Phase 4: Generates updated SKILL.md
### Example 3: Partial Mode (Modules Only) ### Example 3: Partial Mode (Modules Only)

File diff suppressed because it is too large Load Diff