Compare commits

...

4 Commits

Author SHA1 Message Date
7058eb2e50 feat(dashboard): add dashboard skill for milestone/issue overview
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 23:45:55 +01:00
f99f8f072e chore: update model names and gitea allowed-tools
- Use full model names (claude-haiku-4-5, etc.) in create-capability
- Add allowed-tools to gitea skill for tea/jq commands
- Set default model to opus in settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 23:45:51 +01:00
8f4fb16a09 fix(worktrees): fix tea issues title parsing for branch names
- tea issues output has title on line 2, not line 1
- Update sed command to extract from correct line
- Fixes branches being named "issue-N-" or "issue-N-untitled"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 23:45:37 +01:00
3983a6ba24 feat(code-reviewer): auto-merge approved PRs with rebase
- Add step 5 to merge approved PRs using tea pulls merge --style rebase
- Clean up branch after merge with tea pulls clean
- Update role description and outputs to reflect merge responsibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 23:45:32 +01:00
7 changed files with 158 additions and 9 deletions

View File

@@ -21,7 +21,8 @@ Review one PR completely:
2. Analyze the code changes
3. Check for quality, bugs, tests, documentation
4. Post concise review comment (issues with file:line, no fluff)
5. Return verdict (approved or needs-work)
5. If approved: merge with rebase and delete branch
6. Return verdict (approved or needs-work)
## When Invoked
@@ -32,6 +33,7 @@ You receive:
You produce:
- Concise review comment on PR (issues with file:line, no thanking/fluff)
- If approved: merged PR and deleted branch
- Verdict for orchestrator
## Process
@@ -182,7 +184,20 @@ Implementation looks solid. No blocking issues found.
- Consider adding rate limiting
```
### 5. Output Result
### 5. If Approved: Merge and Clean Up
**Only if verdict is approved**, merge the PR and delete the branch:
```bash
tea pulls merge <PR_NUMBER> --style rebase
tea pulls clean <PR_NUMBER>
```
This rebases the PR onto main and deletes the source branch.
**If merge fails:** Still output the result with verdict "approved" but note the merge failure in the summary.
### 6. Output Result
**CRITICAL**: Your final output must be exactly this format:
@@ -194,7 +209,7 @@ summary: <1-2 sentences>
```
**Verdict values:**
- `approved` - PR is ready to merge
- `approved` - PR is ready to merge (and was merged if step 5 succeeded)
- `needs-work` - PR has issues that must be fixed
**Important:**

View File

@@ -29,5 +29,6 @@
},
"enabledPlugins": {
"gopls-lsp@claude-plugins-official": true
}
},
"model": "opus"
}

View File

@@ -95,9 +95,9 @@ Create new capabilities following latest Anthropic best practices (progressive d
| Model | Use For | Cost vs Haiku |
|-------|---------|---------------|
| `haiku` | Most skills and agents (DEFAULT) | Baseline |
| `sonnet` | When Haiku would struggle (<80% success rate) | 12x more expensive |
| `opus` | Deep reasoning, architectural analysis | 60x more expensive |
| `claude-haiku-4-5` | Most skills and agents (DEFAULT) | Baseline |
| `claude-sonnet-4-5` | When Haiku would struggle (<80% success rate) | 12x more expensive |
| `claude-opus-4-5` | Deep reasoning, architectural analysis | 60x more expensive |
**Ask for justification if not Haiku:**
- "This looks like a simple workflow. Should we try Haiku first?"

47
skills/dashboard/SKILL.md Normal file
View File

@@ -0,0 +1,47 @@
---
name: dashboard
description: >
Display milestones with unblocked issues at a glance.
Use when you want to see project progress and which issues are ready to work on.
Invoke with /dashboard [milestone-name-filter]
model: claude-haiku-4-5
user-invocable: true
context: fork
allowed-tools:
- Bash(~/.claude/skills/dashboard/scripts/generate-dashboard.sh*)
---
# Dashboard
@~/.claude/skills/gitea/SKILL.md
Display all milestones and their unblocked issues. Issues are considered unblocked if they have no open blockers in their dependency list.
## Workflow
1. **Run the dashboard script** with the milestone filter argument (if provided):
```bash
~/.claude/skills/dashboard/scripts/generate-dashboard.sh "$1"
```
2. **Display the output** to the user
The script automatically:
- Fetches all milestones from the repository
- For each milestone, gets all open issues
- For each issue, checks dependencies with `tea issues deps list`
- Categorizes issues as unblocked (no open dependencies) or blocked (has open dependencies)
- Displays results grouped by milestone in this format:
```
## Milestone: Release 1.0
✓ Unblocked (3):
#42 Implement feature X
#43 Fix bug in Y
#45 Add tests for Z
⊘ Blocked (2):
#40 Feature A (blocked by #39)
#41 Feature B (blocked by #38, #37)
```

View File

@@ -0,0 +1,83 @@
#!/bin/bash
set -euo pipefail
# Generate dashboard showing milestones with unblocked/blocked issues
# Usage: ./generate-dashboard.sh [milestone-filter]
MILESTONE_FILTER="${1:-}"
# Get all milestones
milestones_json=$(tea milestones -o json)
# Parse milestone names
milestone_names=$(echo "$milestones_json" | jq -r '.[].title')
# Process each milestone
while IFS= read -r milestone; do
# Skip if filter provided and doesn't match
if [[ -n "$MILESTONE_FILTER" && ! "$milestone" =~ $MILESTONE_FILTER ]]; then
continue
fi
echo "## Milestone: $milestone"
echo ""
# Get open issues for this milestone
issues_json=$(tea issues --milestones "$milestone" --state open -o json 2>/dev/null || echo "[]")
# Skip empty milestones or invalid JSON
issue_count=$(echo "$issues_json" | jq -e 'length' 2>/dev/null || echo "0")
if [[ "$issue_count" -eq 0 ]]; then
echo "No open issues"
echo ""
continue
fi
# Arrays for categorizing issues
declare -a unblocked=()
declare -a blocked=()
# Process each issue
while IFS=$'\t' read -r number title; do
# Check dependencies (tea returns plain text "Issue #N has no dependencies" when empty)
deps_output=$(tea issues deps list "$number" -o json 2>/dev/null || echo "")
# If output contains "has no dependencies", treat as empty array
if [[ "$deps_output" == *"has no dependencies"* ]]; then
deps_json="[]"
else
deps_json="$deps_output"
fi
# Count open dependencies
open_deps=$(echo "$deps_json" | jq -r '[.[] | select(.state == "open")] | length' 2>/dev/null || echo "0")
if [[ "$open_deps" -eq 0 ]]; then
# No open blockers - unblocked
unblocked+=("#$number $title")
else
# Has open blockers - blocked
blocker_list=$(echo "$deps_json" | jq -r '[.[] | select(.state == "open") | "#\(.index)"] | join(", ")')
blocked+=("#$number $title (blocked by $blocker_list)")
fi
done < <(echo "$issues_json" | jq -r '.[] | [.index, .title] | @tsv')
# Display unblocked issues
echo "✓ Unblocked (${#unblocked[@]}):"
if [[ ${#unblocked[@]} -eq 0 ]]; then
echo " (none)"
else
printf ' %s\n' "${unblocked[@]}"
fi
echo ""
# Display blocked issues
echo "⊘ Blocked (${#blocked[@]}):"
if [[ ${#blocked[@]} -eq 0 ]]; then
echo " (none)"
else
printf ' %s\n' "${blocked[@]}"
fi
echo ""
done <<< "$milestone_names"

View File

@@ -3,6 +3,9 @@ name: gitea
model: claude-haiku-4-5
description: View, create, and manage Gitea issues and pull requests using tea CLI. Use when working with issues, PRs, viewing issue details, creating pull requests, adding comments, merging PRs, or when the user mentions tea, gitea, issue numbers, or PR numbers.
user-invocable: false
allowed-tools:
- Bash(tea*)
- Bash(jq*)
---
# Gitea CLI (tea)

View File

@@ -27,8 +27,8 @@ case "$MODE" in
WORKTREE_NAME="${REPO_NAME}-issue-${ISSUE_NUMBER}"
WORKTREE_PATH="${WORKTREES_DIR}/${WORKTREE_NAME}"
# Get issue title for branch name
ISSUE_TITLE=$(tea issues "$ISSUE_NUMBER" 2>/dev/null | grep -i "title" | head -1 | cut -d: -f2- | xargs || echo "untitled")
# Get issue title for branch name (tea issues output has title on line 2: " # #1 Title here")
ISSUE_TITLE=$(tea issues "$ISSUE_NUMBER" 2>/dev/null | sed -n '2p' | sed 's/.*#[0-9]* //' | xargs || echo "untitled")
# Create safe branch name
BRANCH_NAME="issue-${ISSUE_NUMBER}-$(echo "$ISSUE_TITLE" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd '[:alnum:]-' | cut -c1-50)"