Loading...
Loading...
Compare original and translation side by side
--clear--clearquestions:
- question: "Which work areas do you want to configure? (Select all relevant)"
header: "Work Areas"
multiSelect: true
options:
- label: "Bug fixes"
description: "Fix errors, exceptions, crashes"
- label: "Feature completion"
description: "Finish incomplete features"
- label: "Performance"
description: "Speed, memory, efficiency"
- label: "Error handling"
description: "Edge cases, validation"
- label: "Security"
description: "Vulnerability fixes, auth improvements"
- label: "Documentation"
description: "README, docstrings, comments"
- label: "Dependency upgrades"
description: "Version bumps, lock files"
- label: "Code formatting"
description: "Linting, style changes"
- label: "Test expansion"
description: "Adding tests for existing code"
- label: "Refactoring"
description: "Code restructuring, DRY improvements"
- label: "API changes"
description: "Endpoints, contracts, interfaces"
- label: "Database changes"
description: "Schema, migrations, queries"questions:
- question: "Which work areas do you want to configure? (Select all relevant)"
header: "Work Areas"
multiSelect: true
options:
- label: "Bug fixes"
description: "Fix errors, exceptions, crashes"
- label: "Feature completion"
description: "Finish incomplete features"
- label: "Performance"
description: "Speed, memory, efficiency"
- label: "Error handling"
description: "Edge cases, validation"
- label: "Security"
description: "Vulnerability fixes, auth improvements"
- label: "Documentation"
description: "README, docstrings, comments"
- label: "Dependency upgrades"
description: "Version bumps, lock files"
- label: "Code formatting"
description: "Linting, style changes"
- label: "Test expansion"
description: "Adding tests for existing code"
- label: "Refactoring"
description: "Code restructuring, DRY improvements"
- label: "API changes"
description: "Endpoints, contracts, interfaces"
- label: "Database changes"
description: "Schema, migrations, queries"questions:
- question: "For '[ITEM]': Should RU prioritize or avoid this?"
header: "Classify"
multiSelect: false
options:
- label: "Encourage (Prioritize)"
description: "RU should actively seek this type of work"
- label: "Forbid (Avoid)"
description: "RU should not work on this unless necessary"
- label: "Skip (No preference)"
description: "Leave neutral, neither prioritize nor avoid"guidance.encouraged[]guidance.forbidden[]questions:
- question: "For '[ITEM]': Should RU prioritize or avoid this?"
header: "Classify"
multiSelect: false
options:
- label: "Encourage (Prioritize)"
description: "RU should actively seek this type of work"
- label: "Forbid (Avoid)"
description: "RU should not work on this unless necessary"
- label: "Skip (No preference)"
description: "Leave neutral, neither prioritize nor avoid"guidance.encouraged[]guidance.forbidden[]questions:
- question: "Do you want to add custom work areas?"
header: "Custom"
multiSelect: false
options:
- label: "No, use selected items only"
description: "Proceed with the items already configured"
- label: "Yes, add custom items"
description: "I'll type specific topics to configure"questions:
- question: "Do you want to add custom work areas?"
header: "Custom"
multiSelect: false
options:
- label: "No, use selected items only"
description: "Proceed with the items already configured"
- label: "Yes, add custom items"
description: "I'll type specific topics to configure"questions:
- question: "'[ITEM]' is marked both Encouraged AND Forbidden. Which takes priority?"
header: "Conflict"
multiSelect: false
options:
- label: "Encourage wins"
description: "Prioritize this work, remove from forbidden"
- label: "Forbid wins"
description: "Avoid this work, remove from encouraged"
- label: "Remove both"
description: "Leave neutral, no guidance for this item"questions:
- question: "'[ITEM]' is marked both Encouraged AND Forbidden. Which takes priority?"
header: "Conflict"
multiSelect: false
options:
- label: "Encourage wins"
description: "Prioritize this work, remove from forbidden"
- label: "Forbid wins"
description: "Avoid this work, remove from encouraged"
- label: "Remove both"
description: "Leave neutral, no guidance for this item"/usr/bin/env bash << 'RU_CONFIGURE_SAVE'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"/usr/bin/env bash << 'RU_CONFIGURE_SAVE'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"undefinedundefined┌─────────────────────────────────────────────────────────────┐
│ Step 1: Work Area Selection (neutral, multiSelect) │
│ [ ] Bug fixes [ ] Features [ ] Performance │
│ [ ] Docs [ ] Deps [ ] Formatting │
│ [ ] Tests [ ] Security [ ] Refactoring │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Step 2: Classify Each (for each selected item) │
│ "For 'Bug fixes': Encourage / Forbid / Skip?" │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Step 3: Custom Items (optional) │
│ "Add custom work areas?" → If yes, classify each │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Step 4: Conflict Resolution (if any) │
│ "'X' is both Encouraged AND Forbidden. Which wins?" │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Step 5: Save config + Display summary │
└─────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────┐
│ 步骤1:工作区域选择(中立,可多选) │
│ [ ] Bug修复 [ ] 功能开发 [ ] 性能优化 │
│ [ ] 文档 [ ] 依赖升级 [ ] 代码格式化 │
│ [ ] 测试 [ ] 安全 [ ] 代码重构 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 步骤2:为每个选中项分类 │
│ "对于 'Bug修复':鼓励 / 禁止 / 跳过?" │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 步骤3:自定义项(可选) │
│ "是否添加自定义工作区域?" → 是则为每个自定义项分类 │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 步骤4:冲突解决(如有) │
│ "'X' 同时被标记为鼓励和禁止,以哪个为准?" │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ 步骤5:保存配置 + 展示摘要 │
└─────────────────────────────────────────────────────────────┘/usr/bin/env bash << 'ADD_GUIDANCE_ITEM'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"
TYPE="${1:-forbidden}" # "forbidden" or "encouraged"
ITEM="${2:-}" # Item to add
if [[ -z "$ITEM" ]]; then
exit 0
fi/usr/bin/env bash << 'ADD_GUIDANCE_ITEM'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"
TYPE="${1:-forbidden}" # "forbidden" or "encouraged"
ITEM="${2:-}" # Item to add
if [[ -z "$ITEM" ]]; then
exit 0
fiundefinedundefined--clear/usr/bin/env bash << 'CLEAR_GUIDANCE'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"
if [[ -f "$CONFIG_FILE" ]]; then
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
jq --arg ts "$TIMESTAMP" \
'.guidance = {forbidden: [], encouraged: [], timestamp: $ts}' \
"$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
echo "Guidance cleared."
fi
CLEAR_GUIDANCE--clear/usr/bin/env bash << 'CLEAR_GUIDANCE'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"
if [[ -f "$CONFIG_FILE" ]]; then
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
jq --arg ts "$TIMESTAMP" \
'.guidance = {forbidden: [], encouraged: [], timestamp: $ts}' \
"$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
echo "Guidance cleared."
fi
CLEAR_GUIDANCE| Issue | Cause | Solution |
|---|---|---|
| jq error | Config file malformed | Run |
| No options appearing | AskUserQuestion issue | Check that multiSelect is set |
| Config not saved | .claude dir missing | Create with |
| Conflicts not shown | Same item different case | Use exact same text for items |
| Custom input empty | Skipped text prompt | Re-run wizard and enter items |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| jq错误 | 配置文件格式错误 | 运行 |
| 无选项展示 | AskUserQuestion异常 | 检查是否设置了multiSelect参数 |
| 配置未保存 | .claude目录不存在 | 执行 |
| 冲突未展示 | 同一项目大小写不同 | 对所有项使用完全一致的文本 |
| 自定义输入为空 | 跳过了文本输入提示 | 重新运行向导并输入内容 |