From dd276287c145dccd428ab6d4a5e8c922106dab78 Mon Sep 17 00:00:00 2001 From: Sho DOUHASHI Date: Sun, 26 Oct 2025 17:45:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=83=88=E7=AE=A1=E7=90=86=E3=82=92=E4=B8=80=E5=85=83?= =?UTF-8?q?=E5=8C=96=E3=81=97=E3=80=81make=20test=E8=A8=98=E8=BF=B0?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ./templates/ディレクトリを削除(未使用のため) - internal/config/templates/に最新の内容を統合 - implement.mdとrevise.mdから`make test`記述を削除 - soba initで正しいテンプレートが展開されることを確認 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../claude/commands/soba/implement.md | 6 +- .../templates/claude/commands/soba/revise.md | 6 +- templates/claude/commands/soba/implement.md | 93 ------------------ templates/claude/commands/soba/plan.md | 98 ------------------- templates/claude/commands/soba/review.md | 91 ----------------- templates/claude/commands/soba/revise.md | 79 --------------- templates/config/config.yml.tmpl | 78 --------------- templates/slack/error.json | 28 ------ templates/slack/notify.json | 11 --- templates/slack/phase_start.json | 30 ------ templates/slack/pr_merged.json | 46 --------- 11 files changed, 2 insertions(+), 564 deletions(-) delete mode 100644 templates/claude/commands/soba/implement.md delete mode 100644 templates/claude/commands/soba/plan.md delete mode 100644 templates/claude/commands/soba/review.md delete mode 100644 templates/claude/commands/soba/revise.md delete mode 100644 templates/config/config.yml.tmpl delete mode 100644 templates/slack/error.json delete mode 100644 templates/slack/notify.json delete mode 100644 templates/slack/phase_start.json delete mode 100644 templates/slack/pr_merged.json diff --git a/internal/config/templates/claude/commands/soba/implement.md b/internal/config/templates/claude/commands/soba/implement.md index 68a08d1..fe0151c 100644 --- a/internal/config/templates/claude/commands/soba/implement.md +++ b/internal/config/templates/claude/commands/soba/implement.md @@ -47,11 +47,7 @@ Proceed with TDD development based on implementation plan and create Pull Reques - Meaningful commit messages 4. **Run Tests** - ```bash - # Run tests (recommended) - make test - ``` - - Run full test suite (required) + - Run full test suite (required) # Timeout 600000 5. **Create PR Template** - Create `./.tmp/pull-request-.md` diff --git a/internal/config/templates/claude/commands/soba/revise.md b/internal/config/templates/claude/commands/soba/revise.md index c01fac7..cf1ef31 100644 --- a/internal/config/templates/claude/commands/soba/revise.md +++ b/internal/config/templates/claude/commands/soba/revise.md @@ -40,11 +40,7 @@ Implement fixes based on review comments: - Remove unnecessary diffs ### 4. Run Tests - -```bash -# Run tests (recommended) -make test # Timeout 600000 -``` + - Run full test suite (required) # Timeout 600000 ### 5. Commit Changes diff --git a/templates/claude/commands/soba/implement.md b/templates/claude/commands/soba/implement.md deleted file mode 100644 index fe0151c..0000000 --- a/templates/claude/commands/soba/implement.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -allowed-tools: TodoRead, TodoWrite, Bash, Read, Write, Edit, MultiEdit, Grep, Glob -description: "TDD implementation and PR creation" ---- - -## Overview - -Proceed with TDD development based on implementation plan and create Pull Request. - ---- - -## Prerequisites - -- Implementation plan exists in Issue comments -- Label is in `soba:doing` state - ---- - -## Rules - -1. **Always check and follow the implementation plan** -2. **Practice TDD (Test First)** -3. **Respect existing design and architecture** -4. **Create PR after implementation completion** -5. **Passing all tests is a requirement** - -## Important Notes - -- Think hard and choose the best architecture with good maintainability. You don't need to respect existing implementations too much. -- Maintaining compatibility is not required. Code complexity due to maintaining backward compatibility is more harmful. -- Passing the full test suite is an **absolute requirement**. However, do not skip test code. - ---- - -## Execution Steps - -1. **Check Issue and Plan** - - Check content with `gh issue view ` - - Check comments with `gh issue view --comments` - -2. **Create Tests** - - Create test cases based on plan - - Red → Green → Refactor - -3. **Implementation** - - Commit in small units - - Meaningful commit messages - -4. **Run Tests** - - Run full test suite (required) # Timeout 600000 - -5. **Create PR Template** - - Create `./.tmp/pull-request-.md` - -6. **Create PR** - ```bash - gh pr create \ - --title "feat: [feature name] (#)" \ - --body-file ./.tmp/pull-request-.md \ - --base main - ``` - -7. **Issue Comment** - - "Created PR #" - -8. **Update Labels** - ```bash - gh issue edit \ - --remove-label "soba:doing" \ - --add-label "soba:review-requested" - ``` - ---- - -## PR Template - -```markdown -## Implementation Complete - -fixes # - -### Changes -- [Main changes] - -### Test Results -- Unit tests: ✅ Pass -- Full test suite: ✅ Pass - -### Checklist -- [ ] Implementation follows the plan -- [ ] Test coverage ensured -- [ ] No impact on existing features -``` diff --git a/templates/claude/commands/soba/plan.md b/templates/claude/commands/soba/plan.md deleted file mode 100644 index 90de948..0000000 --- a/templates/claude/commands/soba/plan.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -allowed-tools: TodoWrite, TodoRead, Bash, Read, Grep, Glob -description: "Develop implementation plan for GitHub Issue" ---- - -## Overview - -Develop implementation plan for GitHub Issue and post it as an Issue comment. - ---- - -## Prerequisites - -- Label is in `soba:planning` state - ---- - -## Rules - -1. **Focus on planning without code modification** -2. **Design plan based on TDD premise** -3. **Follow existing architecture** -4. **Break down into executable step units** -5. **Create plan in template format** -6. **Update label to `soba:ready` after completion** - -## Important Notes - -- Think hard and choose the best architecture with good maintainability. (You don't need to respect existing implementations too much) -- Maintaining compatibility is not required (Code complexity due to maintaining backward compatibility is more harmful) - ---- - -## Execution Steps - -1. **Check Issue** - - Check content with `gh issue view ` - - Check comments with `gh issue view --comments` - -2. **Investigate Codebase** - - Check related files and past implementations - - Identify impact scope and dependencies - -3. **Technology Selection** - - Decide on libraries and patterns to use - - Clarify selection reasons - -4. **Define Implementation Steps** - - Break down into testable units - - Document related files and side effects - -5. **Develop Test, Risk, and Schedule Plans** - - Test plan (unit and integration) - - Risks and countermeasures - - Implementation timeframe estimates - -6. **Create Plan File** - - Save to `./.tmp/plan-[slug].md` - -7. **Post Comment** - - `gh issue comment --body-file ./.tmp/plan-[slug].md` - -8. **Update Label** - - `gh issue edit --remove-label "soba:planning" --add-label "soba:ready"` - ---- - -## Template - -```markdown -# Implementation Plan: [Title] - -## Requirements Overview -- [Purpose and background] -- [Functional requirements] -- [Acceptance criteria] - -## Design Policy -- [Technology selection and reasons] -- [Architectural considerations] - -## Implementation Steps -1. [Step name] - - Work content: [Details] - - Related files: [File path] - -## Test Plan -- Unit tests: [Target and cases] -- Integration tests: [Scenarios] - -## Risks and Countermeasures -- Risk: [Content] - Countermeasure: [Method] - -## Schedule -- Estimate: Total [X] hours -- By step: Each [Y] hours -``` diff --git a/templates/claude/commands/soba/review.md b/templates/claude/commands/soba/review.md deleted file mode 100644 index c418282..0000000 --- a/templates/claude/commands/soba/review.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, Edit, MultiEdit, Grep, Glob, LS -description: "Review a Pull Request for a soba Issue" ---- - -# Review PR - -Conduct PR review. - -## Context - -- Issue number: $ARGUMENTS - -## Workflow - -### 1. Check Issue - -```bash -GH_PAGER= gh issue view -GH_PAGER= gh issue view --comments -``` - -### 2. Check PR - -```bash -GH_PAGER= gh pr view -GH_PAGER= gh pr view --json mergeable,mergeStateStatus -``` - -### 3. Check Code Changes - -```bash -GH_PAGER= gh pr diff -``` - -Review points: -- Compliance with coding standards -- Test implementation status -- Security concerns -- Presence of unnecessary diffs - -### 4. Check CI (Required - wait for completion) - -```bash -gh pr checks --watch # Timeout 600000 -``` - -⚠️ **Important**: Do not post review results before CI completion - -### 5. Post Review Results - -Create `./.tmp/review-result-.md`: - -```markdown -## Review Results - -- Issue: # -- PR: # - -### ✅ Decision -- [ ] Approve (LGTM) -- [ ] Request changes - -### 🔄 Merge Status -- [ ] No conflicts -- [ ] Conflicts exist (rebase required) - -### 👍 Good Points -- [Good aspects of implementation] - -### 🔧 Improvement Suggestions -- [Specific improvement points] -``` - -Post: -```bash -gh pr comment --body "$(cat ./.tmp/review-result-.md)" -``` - -### 6. Update Labels - -For approval: -```bash -gh issue edit --remove-label "soba:reviewing" --add-label "soba:done" -gh pr edit --add-label "soba:lgtm" -``` - -For change requests: -```bash -gh issue edit --remove-label "soba:reviewing" --add-label "soba:requires-changes" -``` diff --git a/templates/claude/commands/soba/revise.md b/templates/claude/commands/soba/revise.md deleted file mode 100644 index cf1ef31..0000000 --- a/templates/claude/commands/soba/revise.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -allowed-tools: Bash, Read, Write, Edit, MultiEdit, Grep, Glob, LS -description: "Revise implementation based on review feedback" ---- - -# Revise PR - -Address review feedback and comments. - -## Context - -- Issue number: $ARGUMENTS - -## Important Notes - -- Think hard and choose the best architecture with good maintainability. You don't need to respect existing implementations too much. -- Maintaining compatibility is not required. Code complexity due to maintaining backward compatibility is more harmful. -- Passing the full test suite is an **absolute requirement**. However, do not skip test code. - -## Workflow - -### 1. Check PR - -```bash -GH_PAGER= gh pr list --search "linked:$ARGUMENTS" --state open --json number --jq '.[0].number' -``` - -### 2. Check Review Comments - -```bash -GH_PAGER= gh pr view --comments -``` - -### 3. Address Review Comments - -Implement fixes based on review comments: -- Improve code quality -- Add/modify tests -- Improve error handling -- Remove unnecessary diffs - -### 4. Run Tests - - Run full test suite (required) # Timeout 600000 - -### 5. Commit Changes - -```bash -git add -A -git commit -m "fix: Address review feedback - -- [Summary of changes] -" -git push -``` - -### 6. Post Completion Comment - -Create `./.tmp/revise-complete-.md`: - -```markdown -## Review Feedback Addressed - -The following feedback has been addressed: -- ✅ [Addressed item] - -All tests have been confirmed to pass. -Please review again. -``` - -Post: -```bash -gh pr comment --body "$(cat ./.tmp/revise-complete-.md)" -``` - -### 7. Update Labels - -```bash -gh issue edit --remove-label "soba:revising" --add-label "soba:review-requested" -``` diff --git a/templates/config/config.yml.tmpl b/templates/config/config.yml.tmpl deleted file mode 100644 index cfb58a8..0000000 --- a/templates/config/config.yml.tmpl +++ /dev/null @@ -1,78 +0,0 @@ -# GitHub settings -github: - # Authentication method: 'gh', 'env', or omit for auto-detect - # Use 'gh' to use GitHub CLI authentication (gh auth token) - # Use 'env' to use environment variable - auth_method: gh # or 'env', or omit for auto-detect - - # Personal Access Token (required when auth_method is 'env' or omitted) - # Can use environment variable - # token: ${GITHUB_TOKEN} - - # Target repository (format: owner/repo) - repository: {{.Repository}} - -# Workflow settings -workflow: - # Issue polling interval in seconds (default: 20) - interval: 20 - # Use tmux for Claude execution (default: true) - use_tmux: true - # Enable automatic PR merging (default: true) - auto_merge_enabled: true - # Clean up tmux windows for closed issues (default: true) - closed_issue_cleanup_enabled: true - # Cleanup interval in seconds (default: 300) - closed_issue_cleanup_interval: 300 - # Command delay for tmux panes in seconds (default: 3) - tmux_command_delay: 3 - -# Slack notifications -slack: - # Webhook URL for Slack notifications - # Get your webhook URL from: https://api.slack.com/messaging/webhooks - webhook_url: ${SLACK_WEBHOOK_URL} - # Enable notifications for phase starts (default: false) - notifications_enabled: false - -# Git settings -git: - # Base path for git worktrees - worktree_base_path: .git/soba/worktrees - # Base branch for rebase operations and worktree creation (default: main) - base_branch: main - -# Logging settings -log: - # Log file output path (default: .soba/logs/soba-{pid}.log) - # ${PID} will be replaced with actual process ID at runtime - output_path: .soba/logs/soba-${PID}.log - # Number of log files to retain (default: 10) - retention_count: 10 - # Log level: debug, info, warn, error (default: info) - level: {{.LogLevel}} - # Log format: "text" or "json" (default: text) - format: text - -# Phase commands (optional - for custom Claude commands) -phase: - plan: - command: claude - options: - - --dangerously-skip-permissions - parameter: '/soba:plan {{`{{issue-number}}`}}' - implement: - command: claude - options: - - --dangerously-skip-permissions - parameter: '/soba:implement {{`{{issue-number}}`}}' - review: - command: claude - options: - - --dangerously-skip-permissions - parameter: '/soba:review {{`{{issue-number}}`}}' - revise: - command: claude - options: - - --dangerously-skip-permissions - parameter: '/soba:revise {{`{{issue-number}}`}}' \ No newline at end of file diff --git a/templates/slack/error.json b/templates/slack/error.json deleted file mode 100644 index 71b4a7e..0000000 --- a/templates/slack/error.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "❌ Error: {{.Title}}", - "emoji": true - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Error Details:*\n```{{.ErrorMessage}}```" - } - }, - { - "type": "context", - "elements": [ - { - "type": "mrkdwn", - "text": "⚠️ This error requires attention" - } - ] - } - ] -} \ No newline at end of file diff --git a/templates/slack/notify.json b/templates/slack/notify.json deleted file mode 100644 index 53ede49..0000000 --- a/templates/slack/notify.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "{{.Text}}" - } - } - ] -} \ No newline at end of file diff --git a/templates/slack/phase_start.json b/templates/slack/phase_start.json deleted file mode 100644 index 11eb9c2..0000000 --- a/templates/slack/phase_start.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "Phase: {{.Phase}} #{{.IssueNumber}}", - "emoji": true - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*{{.Phase}}* phase started for *{{.Repository}}* *#{{.IssueNumber}}*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "Open Issue", - "emoji": true - }, - "value": "open_issue_button_{{.IssueNumber}}", - "url": "{{.IssueURL}}", - "action_id": "button-action" - } - } - ] -} \ No newline at end of file diff --git a/templates/slack/pr_merged.json b/templates/slack/pr_merged.json deleted file mode 100644 index 0137036..0000000 --- a/templates/slack/pr_merged.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "blocks": [ - { - "type": "header", - "text": { - "type": "plain_text", - "text": "✅ PR #{{.PRNumber}} Merged", - "emoji": true - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*PR #{{.PRNumber}}* has been merged successfully.\nRelated to issue *#{{.IssueNumber}}*" - } - }, - { - "type": "actions", - "elements": [ - { - "type": "button", - "text": { - "type": "plain_text", - "text": "View PR", - "emoji": true - }, - "value": "view_pr_{{.PRNumber}}", - "url": "{{.PRURL}}", - "action_id": "view-pr-action" - }, - { - "type": "button", - "text": { - "type": "plain_text", - "text": "View Issue", - "emoji": true - }, - "value": "view_issue_{{.IssueNumber}}", - "url": "{{.IssueURL}}", - "action_id": "view-issue-action" - } - ] - } - ] -} \ No newline at end of file From b0c109e2c25b7e040f0dac3189c99138333310b4 Mon Sep 17 00:00:00 2001 From: Sho DOUHASHI Date: Sun, 26 Oct 2025 17:47:27 +0900 Subject: [PATCH 2/2] update claude command --- .claude/commands/soba/implement.md | 6 +----- .claude/commands/soba/revise.md | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.claude/commands/soba/implement.md b/.claude/commands/soba/implement.md index 68a08d1..fe0151c 100644 --- a/.claude/commands/soba/implement.md +++ b/.claude/commands/soba/implement.md @@ -47,11 +47,7 @@ Proceed with TDD development based on implementation plan and create Pull Reques - Meaningful commit messages 4. **Run Tests** - ```bash - # Run tests (recommended) - make test - ``` - - Run full test suite (required) + - Run full test suite (required) # Timeout 600000 5. **Create PR Template** - Create `./.tmp/pull-request-.md` diff --git a/.claude/commands/soba/revise.md b/.claude/commands/soba/revise.md index c01fac7..cf1ef31 100644 --- a/.claude/commands/soba/revise.md +++ b/.claude/commands/soba/revise.md @@ -40,11 +40,7 @@ Implement fixes based on review comments: - Remove unnecessary diffs ### 4. Run Tests - -```bash -# Run tests (recommended) -make test # Timeout 600000 -``` + - Run full test suite (required) # Timeout 600000 ### 5. Commit Changes