kie-ruby 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.claude/agents/project-environment-setup.md +149 -0
- data/.claude/commands/soba/implement.md +93 -0
- data/.claude/commands/soba/plan.md +98 -0
- data/.claude/commands/soba/review.md +91 -0
- data/.claude/commands/soba/revise.md +79 -0
- data/.devcontainer/LICENSE +21 -0
- data/.devcontainer/README.md +85 -0
- data/.devcontainer/bin/devcontainer-common.sh +36 -0
- data/.devcontainer/bin/down +55 -0
- data/.devcontainer/bin/init +159 -0
- data/.devcontainer/bin/rebuild +10 -0
- data/.devcontainer/bin/up +11 -0
- data/.devcontainer/compose.yaml +12 -0
- data/.devcontainer/compose.yaml.template +8 -0
- data/.devcontainer/devcontainer.json +30 -0
- data/.devcontainer/devcontainer.local.json +3 -0
- data/.devcontainer/scripts/setup.sh +12 -0
- data/.lefthook/rubocop-autofix.sh +51 -0
- data/.soba/config.yml +78 -0
- data/CHANGELOG.md +23 -0
- data/CLAUDE.md +20 -0
- data/LICENSE +21 -0
- data/README.md +310 -0
- data/Rakefile +12 -0
- data/docs/business/INDEX.md +3 -0
- data/docs/business/overview.md +35 -0
- data/docs/development/INDEX.md +3 -0
- data/docs/development/technical-design.md +77 -0
- data/docs/document_system.md +58 -0
- data/lefthook.yml +8 -0
- data/lib/kie/client.rb +36 -0
- data/lib/kie/errors.rb +43 -0
- data/lib/kie/general_engine.rb +56 -0
- data/lib/kie/general_task.rb +106 -0
- data/lib/kie/middleware/raise_error.rb +46 -0
- data/lib/kie/model_definition.rb +10 -0
- data/lib/kie/model_registry.rb +36 -0
- data/lib/kie/models/nano_banana_pro.rb +17 -0
- data/lib/kie/models/suno_v4.rb +14 -0
- data/lib/kie/models/suno_v4_5.rb +14 -0
- data/lib/kie/models/suno_v4_5_all.rb +14 -0
- data/lib/kie/models/suno_v4_5_plus.rb +14 -0
- data/lib/kie/models/suno_v5.rb +14 -0
- data/lib/kie/suno_engine.rb +129 -0
- data/lib/kie/suno_task.rb +99 -0
- data/lib/kie/task.rb +69 -0
- data/lib/kie/version.rb +5 -0
- data/lib/kie.rb +26 -0
- data/sig/kie.rbs +6 -0
- metadata +110 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6dd09714cf184a6e1d88ece305cbe3a9172fd1c78654f2f51ae63cc3bf31e45a
|
|
4
|
+
data.tar.gz: 0aca4c4baa773b8624fde53c8b07461a265da97690e7887fda4b794042f569a3
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: fc5f8f445fab1a86fa92b9e36d5487bc02bc7d84aa1132051216fdaf77b4b3ae4bc318d60db5e67cce8392b60de31a03cc5068731ce7711604608a3b9fce0de0
|
|
7
|
+
data.tar.gz: ab44c6a1c1f46c6d8ddc09eda3815ba0a144c01c5c82129a14498bada390f46bde281222108d6da01ab214551b063e572ec9992bbdf7c2b9b048813c9fde7606
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-environment-setup
|
|
3
|
+
description: Use this agent when the user wants to initialize a new project environment or set up a development stack. Trigger this agent when:\n\n<example>\nContext: User wants to start a new Node.js project with best practices.\nuser: "新しいNode.jsプロジェクトを始めたいんだけど、環境をセットアップしてほしい"\nassistant: "I'll use the Task tool to launch the project-environment-setup agent to guide you through the complete environment setup process."\n<commentary>The user is requesting project initialization, so use the project-environment-setup agent to handle the comprehensive setup workflow.</commentary>\n</example>\n\n<example>\nContext: User mentions wanting to set up testing infrastructure for their project.\nuser: "プロジェクトにテスト環境を追加したい"\nassistant: "Let me use the project-environment-setup agent to help you configure the appropriate testing frameworks and tools."\n<commentary>Testing setup is part of the agent's scope, so delegate to project-environment-setup agent.</commentary>\n</example>\n\n<example>\nContext: User is creating a new web application and needs guidance on tech stack.\nuser: "Webアプリを作りたいんだけど、どんな技術スタックがいいかな?"\nassistant: "I'm launching the project-environment-setup agent to help you choose and configure an optimal tech stack based on current best practices."\n<commentary>Tech stack selection and setup is exactly what this agent handles, so use the Agent tool.</commentary>\n</example>
|
|
4
|
+
model: inherit
|
|
5
|
+
color: yellow
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are an elite DevOps and Software Architecture Consultant specializing in modern development environment setup. Your mission is to guide users through creating optimal, production-ready development environments based on current industry best practices.
|
|
9
|
+
|
|
10
|
+
## Your Core Responsibilities
|
|
11
|
+
|
|
12
|
+
You will systematically set up a complete development environment covering:
|
|
13
|
+
|
|
14
|
+
1. **Base Language & Framework Selection**
|
|
15
|
+
- Identify project requirements and recommend appropriate languages
|
|
16
|
+
- Select frameworks that align with project scale and team expertise
|
|
17
|
+
- Always research latest stable versions before installation
|
|
18
|
+
|
|
19
|
+
2. **Middleware & Database Setup**
|
|
20
|
+
- Recommend databases (SQL/NoSQL) based on data patterns
|
|
21
|
+
- Configure connection pooling and optimization settings
|
|
22
|
+
- Set up containerization (Docker) when appropriate
|
|
23
|
+
|
|
24
|
+
3. **Testing Framework Architecture**
|
|
25
|
+
- Unit testing: Fast, isolated component tests
|
|
26
|
+
- Functional testing: Feature-level behavior validation
|
|
27
|
+
- Integration testing: Component interaction verification
|
|
28
|
+
- E2E testing: Full user journey automation
|
|
29
|
+
- Select frameworks that work cohesively together
|
|
30
|
+
|
|
31
|
+
4. **Code Quality Tools**
|
|
32
|
+
- Linter: Static code analysis and style enforcement
|
|
33
|
+
- Formatter: Automated code formatting
|
|
34
|
+
- Configure IDE integration for real-time feedback
|
|
35
|
+
|
|
36
|
+
5. **Git Commit Hooks**
|
|
37
|
+
- Pre-commit: Run linter and formatter automatically
|
|
38
|
+
- Pre-push: Execute test suite
|
|
39
|
+
- Use tools like Husky or Lefthook for hook management
|
|
40
|
+
|
|
41
|
+
## Operational Protocol
|
|
42
|
+
|
|
43
|
+
### Phase 1: Discovery & Requirements Gathering
|
|
44
|
+
|
|
45
|
+
Ask targeted questions to understand:
|
|
46
|
+
|
|
47
|
+
- Project type (web app, API, CLI tool, library, etc.)
|
|
48
|
+
- Team size and experience level
|
|
49
|
+
- Performance requirements
|
|
50
|
+
- Deployment target (cloud provider, on-premise, edge)
|
|
51
|
+
- Existing constraints or preferences
|
|
52
|
+
|
|
53
|
+
### Phase 2: Research & Recommendation
|
|
54
|
+
|
|
55
|
+
- Search the web for current best practices in the identified domain
|
|
56
|
+
- Verify latest stable versions of all tools and frameworks
|
|
57
|
+
- Compare alternatives and explain trade-offs
|
|
58
|
+
- Present recommendations with clear rationale
|
|
59
|
+
|
|
60
|
+
### Phase 3: User Validation
|
|
61
|
+
|
|
62
|
+
- For any choice where you lack sufficient context, ALWAYS ask the user
|
|
63
|
+
- Present options clearly with pros/cons
|
|
64
|
+
- Never make assumptions about critical architectural decisions
|
|
65
|
+
- Confirm selections before proceeding to installation
|
|
66
|
+
|
|
67
|
+
### Phase 4: Implementation
|
|
68
|
+
|
|
69
|
+
- Execute installations concurrently when dependencies allow
|
|
70
|
+
- Create configuration files with sensible defaults
|
|
71
|
+
- Set up project structure following community conventions
|
|
72
|
+
- Generate comprehensive documentation in `.tmp/` directory
|
|
73
|
+
|
|
74
|
+
### Phase 5: Verification
|
|
75
|
+
|
|
76
|
+
- Test that all tools are correctly installed and configured
|
|
77
|
+
- Verify git hooks trigger properly
|
|
78
|
+
- Run sample tests to ensure testing framework works
|
|
79
|
+
- Provide a setup verification checklist
|
|
80
|
+
|
|
81
|
+
## Critical Guidelines
|
|
82
|
+
|
|
83
|
+
**Language & Communication:**
|
|
84
|
+
|
|
85
|
+
- Think through all technical decisions in English
|
|
86
|
+
- Communicate with the user exclusively in Japanese
|
|
87
|
+
- Use clear, professional Japanese avoiding unnecessary jargon
|
|
88
|
+
|
|
89
|
+
**Research Requirements:**
|
|
90
|
+
|
|
91
|
+
- ALWAYS search the web before recommending specific versions
|
|
92
|
+
- Prioritize stable releases over cutting-edge beta versions
|
|
93
|
+
- Check compatibility matrices between tools
|
|
94
|
+
- Verify that recommended combinations are battle-tested
|
|
95
|
+
|
|
96
|
+
**Decision-Making:**
|
|
97
|
+
|
|
98
|
+
- Be critical and provide honest assessments
|
|
99
|
+
- If a user's preference conflicts with best practices, respectfully explain the trade-offs
|
|
100
|
+
- Don't blindly follow user requests that could harm project quality
|
|
101
|
+
- Suggest alternatives when you see potential issues
|
|
102
|
+
|
|
103
|
+
**Documentation:**
|
|
104
|
+
|
|
105
|
+
- Save all design decisions and rationale to `./.tmp/` as Markdown files
|
|
106
|
+
- Create a setup summary document with all installed versions
|
|
107
|
+
- Document any manual steps the user needs to perform
|
|
108
|
+
- Include troubleshooting tips for common issues
|
|
109
|
+
|
|
110
|
+
**Project Context Awareness:**
|
|
111
|
+
|
|
112
|
+
- Check for existing CLAUDE.md files and respect their guidelines
|
|
113
|
+
- Align with any existing project structure or conventions
|
|
114
|
+
- Integrate with the document system if present (docs/development/)
|
|
115
|
+
|
|
116
|
+
**Concurrency:**
|
|
117
|
+
|
|
118
|
+
- Install independent packages concurrently to save time
|
|
119
|
+
- Group dependent installations appropriately
|
|
120
|
+
- Clearly communicate what's happening in parallel
|
|
121
|
+
|
|
122
|
+
## Quality Assurance
|
|
123
|
+
|
|
124
|
+
- After writing any configuration file, read it back to verify content
|
|
125
|
+
- Test git hooks by making a test commit
|
|
126
|
+
- Run linter and formatter on a sample file
|
|
127
|
+
- Execute a simple test to verify testing framework
|
|
128
|
+
- Confirm all dependencies resolve without conflicts
|
|
129
|
+
|
|
130
|
+
## Escalation
|
|
131
|
+
|
|
132
|
+
If you encounter:
|
|
133
|
+
|
|
134
|
+
- Incompatible version combinations that can't be resolved
|
|
135
|
+
- User requirements that are technically infeasible
|
|
136
|
+
- Security concerns with user-requested tools
|
|
137
|
+
|
|
138
|
+
Clearly explain the issue, provide alternatives, and request user guidance.
|
|
139
|
+
|
|
140
|
+
## Output Format
|
|
141
|
+
|
|
142
|
+
At the end of setup, provide:
|
|
143
|
+
|
|
144
|
+
1. Summary of all installed components with versions
|
|
145
|
+
2. Quick start commands for common tasks
|
|
146
|
+
3. Links to relevant documentation
|
|
147
|
+
4. Next steps for the user to begin development
|
|
148
|
+
|
|
149
|
+
Remember: Your goal is not just to install tools, but to create a cohesive, maintainable, and efficient development environment that sets the project up for long-term success.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: TodoRead, TodoWrite, Bash, Read, Write, Edit, MultiEdit, Grep, Glob
|
|
3
|
+
description: "TDD implementation and PR creation"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
Proceed with TDD development based on implementation plan and create Pull Request.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Implementation plan exists in Issue comments
|
|
15
|
+
- Label is in `soba:doing` state
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
1. **Always check and follow the implementation plan**
|
|
22
|
+
2. **Practice TDD (Test First)**
|
|
23
|
+
3. **Respect existing design and architecture**
|
|
24
|
+
4. **Create PR after implementation completion**
|
|
25
|
+
5. **Passing all tests is a requirement**
|
|
26
|
+
|
|
27
|
+
## Important Notes
|
|
28
|
+
|
|
29
|
+
- Think hard and choose the best architecture with good maintainability. You don't need to respect existing implementations too much.
|
|
30
|
+
- Maintaining compatibility is not required. Code complexity due to maintaining backward compatibility is more harmful.
|
|
31
|
+
- Passing the full test suite is an **absolute requirement**. However, do not skip test code.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Execution Steps
|
|
36
|
+
|
|
37
|
+
1. **Check Issue and Plan**
|
|
38
|
+
- Check content with `gh issue view <number>`
|
|
39
|
+
- Check comments with `gh issue view <number> --comments`
|
|
40
|
+
|
|
41
|
+
2. **Create Tests**
|
|
42
|
+
- Create test cases based on plan
|
|
43
|
+
- Red → Green → Refactor
|
|
44
|
+
|
|
45
|
+
3. **Implementation**
|
|
46
|
+
- Commit in small units
|
|
47
|
+
- Meaningful commit messages
|
|
48
|
+
|
|
49
|
+
4. **Run Tests**
|
|
50
|
+
- Run full test suite (required) # Timeout 600000
|
|
51
|
+
|
|
52
|
+
5. **Create PR Template**
|
|
53
|
+
- Create `./.tmp/pull-request-<number>.md`
|
|
54
|
+
|
|
55
|
+
6. **Create PR**
|
|
56
|
+
```bash
|
|
57
|
+
gh pr create \
|
|
58
|
+
--title "feat: [feature name] (#<Issue number>)" \
|
|
59
|
+
--body-file ./.tmp/pull-request-<number>.md \
|
|
60
|
+
--base main
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
7. **Issue Comment**
|
|
64
|
+
- "Created PR #<number>"
|
|
65
|
+
|
|
66
|
+
8. **Update Labels**
|
|
67
|
+
```bash
|
|
68
|
+
gh issue edit <number> \
|
|
69
|
+
--remove-label "soba:doing" \
|
|
70
|
+
--add-label "soba:review-requested"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## PR Template
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
## Implementation Complete
|
|
79
|
+
|
|
80
|
+
fixes #<number>
|
|
81
|
+
|
|
82
|
+
### Changes
|
|
83
|
+
- [Main changes]
|
|
84
|
+
|
|
85
|
+
### Test Results
|
|
86
|
+
- Unit tests: ✅ Pass
|
|
87
|
+
- Full test suite: ✅ Pass
|
|
88
|
+
|
|
89
|
+
### Checklist
|
|
90
|
+
- [ ] Implementation follows the plan
|
|
91
|
+
- [ ] Test coverage ensured
|
|
92
|
+
- [ ] No impact on existing features
|
|
93
|
+
```
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: TodoWrite, TodoRead, Bash, Read, Grep, Glob
|
|
3
|
+
description: "Develop implementation plan for GitHub Issue"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
Develop implementation plan for GitHub Issue and post it as an Issue comment.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Label is in `soba:planning` state
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
1. **Focus on planning without code modification**
|
|
21
|
+
2. **Design plan based on TDD premise**
|
|
22
|
+
3. **Follow existing architecture**
|
|
23
|
+
4. **Break down into executable step units**
|
|
24
|
+
5. **Create plan in template format**
|
|
25
|
+
6. **Update label to `soba:ready` after completion**
|
|
26
|
+
|
|
27
|
+
## Important Notes
|
|
28
|
+
|
|
29
|
+
- Think hard and choose the best architecture with good maintainability. (You don't need to respect existing implementations too much)
|
|
30
|
+
- Maintaining compatibility is not required (Code complexity due to maintaining backward compatibility is more harmful)
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Execution Steps
|
|
35
|
+
|
|
36
|
+
1. **Check Issue**
|
|
37
|
+
- Check content with `gh issue view <number>`
|
|
38
|
+
- Check comments with `gh issue view <number> --comments`
|
|
39
|
+
|
|
40
|
+
2. **Investigate Codebase**
|
|
41
|
+
- Check related files and past implementations
|
|
42
|
+
- Identify impact scope and dependencies
|
|
43
|
+
|
|
44
|
+
3. **Technology Selection**
|
|
45
|
+
- Decide on libraries and patterns to use
|
|
46
|
+
- Clarify selection reasons
|
|
47
|
+
|
|
48
|
+
4. **Define Implementation Steps**
|
|
49
|
+
- Break down into testable units
|
|
50
|
+
- Document related files and side effects
|
|
51
|
+
|
|
52
|
+
5. **Develop Test, Risk, and Schedule Plans**
|
|
53
|
+
- Test plan (unit and integration)
|
|
54
|
+
- Risks and countermeasures
|
|
55
|
+
- Implementation timeframe estimates
|
|
56
|
+
|
|
57
|
+
6. **Create Plan File**
|
|
58
|
+
- Save to `./.tmp/plan-[slug].md`
|
|
59
|
+
|
|
60
|
+
7. **Post Comment**
|
|
61
|
+
- `gh issue comment <number> --body-file ./.tmp/plan-[slug].md`
|
|
62
|
+
|
|
63
|
+
8. **Update Label**
|
|
64
|
+
- `gh issue edit <number> --remove-label "soba:planning" --add-label "soba:ready"`
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Template
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
# Implementation Plan: [Title]
|
|
72
|
+
|
|
73
|
+
## Requirements Overview
|
|
74
|
+
- [Purpose and background]
|
|
75
|
+
- [Functional requirements]
|
|
76
|
+
- [Acceptance criteria]
|
|
77
|
+
|
|
78
|
+
## Design Policy
|
|
79
|
+
- [Technology selection and reasons]
|
|
80
|
+
- [Architectural considerations]
|
|
81
|
+
|
|
82
|
+
## Implementation Steps
|
|
83
|
+
1. [Step name]
|
|
84
|
+
- Work content: [Details]
|
|
85
|
+
- Related files: [File path]
|
|
86
|
+
|
|
87
|
+
## Test Plan
|
|
88
|
+
- Unit tests: [Target and cases]
|
|
89
|
+
- Integration tests: [Scenarios]
|
|
90
|
+
|
|
91
|
+
## Risks and Countermeasures
|
|
92
|
+
- Risk: [Content]
|
|
93
|
+
Countermeasure: [Method]
|
|
94
|
+
|
|
95
|
+
## Schedule
|
|
96
|
+
- Estimate: Total [X] hours
|
|
97
|
+
- By step: Each [Y] hours
|
|
98
|
+
```
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash, Read, Write, Edit, MultiEdit, Grep, Glob, LS
|
|
3
|
+
description: "Review a Pull Request for a soba Issue"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review PR
|
|
7
|
+
|
|
8
|
+
Conduct PR review.
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
- Issue number: $ARGUMENTS
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Check Issue
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
GH_PAGER= gh issue view <issue-number>
|
|
20
|
+
GH_PAGER= gh issue view <issue-number> --comments
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### 2. Check PR
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
GH_PAGER= gh pr view <PR-number>
|
|
27
|
+
GH_PAGER= gh pr view <PR-number> --json mergeable,mergeStateStatus
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 3. Check Code Changes
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
GH_PAGER= gh pr diff <PR-number>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Review points:
|
|
37
|
+
- Compliance with coding standards
|
|
38
|
+
- Test implementation status
|
|
39
|
+
- Security concerns
|
|
40
|
+
- Presence of unnecessary diffs
|
|
41
|
+
|
|
42
|
+
### 4. Check CI (Required - wait for completion)
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
gh pr checks <PR-number> --watch # Timeout 600000
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
⚠️ **Important**: Do not post review results before CI completion
|
|
49
|
+
|
|
50
|
+
### 5. Post Review Results
|
|
51
|
+
|
|
52
|
+
Create `./.tmp/review-result-<issue-number>.md`:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
## Review Results
|
|
56
|
+
|
|
57
|
+
- Issue: #<issue-number>
|
|
58
|
+
- PR: #<PR-number>
|
|
59
|
+
|
|
60
|
+
### ✅ Decision
|
|
61
|
+
- [ ] Approve (LGTM)
|
|
62
|
+
- [ ] Request changes
|
|
63
|
+
|
|
64
|
+
### 🔄 Merge Status
|
|
65
|
+
- [ ] No conflicts
|
|
66
|
+
- [ ] Conflicts exist (rebase required)
|
|
67
|
+
|
|
68
|
+
### 👍 Good Points
|
|
69
|
+
- [Good aspects of implementation]
|
|
70
|
+
|
|
71
|
+
### 🔧 Improvement Suggestions
|
|
72
|
+
- [Specific improvement points]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Post:
|
|
76
|
+
```bash
|
|
77
|
+
gh pr comment <PR-number> --body "$(cat ./.tmp/review-result-<issue-number>.md)"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 6. Update Labels
|
|
81
|
+
|
|
82
|
+
For approval:
|
|
83
|
+
```bash
|
|
84
|
+
gh issue edit <issue-number> --remove-label "soba:reviewing" --add-label "soba:done"
|
|
85
|
+
gh pr edit <PR-number> --add-label "soba:lgtm"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
For change requests:
|
|
89
|
+
```bash
|
|
90
|
+
gh issue edit <issue-number> --remove-label "soba:reviewing" --add-label "soba:requires-changes"
|
|
91
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Bash, Read, Write, Edit, MultiEdit, Grep, Glob, LS
|
|
3
|
+
description: "Revise implementation based on review feedback"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Revise PR
|
|
7
|
+
|
|
8
|
+
Address review feedback and comments.
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
- Issue number: $ARGUMENTS
|
|
13
|
+
|
|
14
|
+
## Important Notes
|
|
15
|
+
|
|
16
|
+
- Think hard and choose the best architecture with good maintainability. You don't need to respect existing implementations too much.
|
|
17
|
+
- Maintaining compatibility is not required. Code complexity due to maintaining backward compatibility is more harmful.
|
|
18
|
+
- Passing the full test suite is an **absolute requirement**. However, do not skip test code.
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
### 1. Check PR
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
GH_PAGER= gh pr list --search "linked:$ARGUMENTS" --state open --json number --jq '.[0].number'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Check Review Comments
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
GH_PAGER= gh pr view <PR-number> --comments
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 3. Address Review Comments
|
|
35
|
+
|
|
36
|
+
Implement fixes based on review comments:
|
|
37
|
+
- Improve code quality
|
|
38
|
+
- Add/modify tests
|
|
39
|
+
- Improve error handling
|
|
40
|
+
- Remove unnecessary diffs
|
|
41
|
+
|
|
42
|
+
### 4. Run Tests
|
|
43
|
+
- Run full test suite (required) # Timeout 600000
|
|
44
|
+
|
|
45
|
+
### 5. Commit Changes
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git add -A
|
|
49
|
+
git commit -m "fix: Address review feedback
|
|
50
|
+
|
|
51
|
+
- [Summary of changes]
|
|
52
|
+
"
|
|
53
|
+
git push
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 6. Post Completion Comment
|
|
57
|
+
|
|
58
|
+
Create `./.tmp/revise-complete-<issue-number>.md`:
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## Review Feedback Addressed
|
|
62
|
+
|
|
63
|
+
The following feedback has been addressed:
|
|
64
|
+
- ✅ [Addressed item]
|
|
65
|
+
|
|
66
|
+
All tests have been confirmed to pass.
|
|
67
|
+
Please review again.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Post:
|
|
71
|
+
```bash
|
|
72
|
+
gh pr comment <PR-number> --body "$(cat ./.tmp/revise-complete-<issue-number>.md)"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 7. Update Labels
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
gh issue edit <issue-number> --remove-label "soba:revising" --add-label "soba:review-requested"
|
|
79
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sho DOUHASHI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Rails DevContainer
|
|
2
|
+
|
|
3
|
+
A fully-featured development container configuration for Ruby on Rails projects with integrated tools and services.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Pre-configured Ruby on Rails development environment
|
|
8
|
+
- Docker Compose setup with Selenium for system testing
|
|
9
|
+
- GitHub CLI, Node.js, Python, and AWS CLI pre-installed
|
|
10
|
+
- Automatic Ruby version synchronization
|
|
11
|
+
- MCP (Model Context Protocol) server integration
|
|
12
|
+
- Volume mounts for SSH, AWS, GitHub, and Claude configurations
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- Docker Desktop or Docker Engine
|
|
17
|
+
- Visual Studio Code with Dev Containers extension
|
|
18
|
+
- Git
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
1. In your Rails project directory, add this repository as a git subtree:
|
|
23
|
+
```bash
|
|
24
|
+
git subtree add --prefix=.devcontainer --squash git@github.com:douhashi/devcontainer-rails.git main
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Visual Studio Code
|
|
28
|
+
|
|
29
|
+
2. Open your Rails project in VS Code:
|
|
30
|
+
```bash
|
|
31
|
+
code .
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
3. When prompted, click "Reopen in Container" or run the command "Dev Containers: Reopen in Container"
|
|
35
|
+
|
|
36
|
+
4. Wait for the container to build and post-create scripts to complete
|
|
37
|
+
|
|
38
|
+
### DevContainer CLI
|
|
39
|
+
|
|
40
|
+
2. Rebuild and start the development container:
|
|
41
|
+
```bash
|
|
42
|
+
.devcontainer/bin/rebuild
|
|
43
|
+
.devcontainer/bin/up
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. The container will build and start with all configured services
|
|
47
|
+
|
|
48
|
+
## Updating DevContainer
|
|
49
|
+
|
|
50
|
+
To update the DevContainer configuration with the latest changes from the upstream repository:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git subtree pull --prefix=.devcontainer --squash git@github.com:douhashi/devcontainer-rails.git main
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
### Ruby Version
|
|
59
|
+
|
|
60
|
+
The Ruby version is automatically synchronized from `.tool-versions` file. To change it:
|
|
61
|
+
1. Update `.tool-versions` in your Rails project
|
|
62
|
+
2. Run `sync-ruby-version.sh` to update the DevContainer configuration
|
|
63
|
+
3. Rebuild the container
|
|
64
|
+
|
|
65
|
+
### Services
|
|
66
|
+
|
|
67
|
+
- **App**: Main Rails application container (ports 5100, 3036)
|
|
68
|
+
- **Selenium**: Chrome browser for system tests (port 4444)
|
|
69
|
+
|
|
70
|
+
### Environment Variables
|
|
71
|
+
|
|
72
|
+
- `KAMAL_REGISTRY_USERNAME`: Docker registry username for Kamal deployments
|
|
73
|
+
- `KAMAL_REGISTRY_PASSWORD`: Docker registry password for Kamal deployments
|
|
74
|
+
- `VITE_RUBY_HOST`: Vite development server host (default: 0.0.0.0)
|
|
75
|
+
- `SELENIUM_URL`: Selenium server URL for system tests
|
|
76
|
+
|
|
77
|
+
## Scripts
|
|
78
|
+
|
|
79
|
+
- `post-create.sh`: Runs after container creation (installs packages, tools, Rails setup)
|
|
80
|
+
- `post-attach.sh`: Runs each time you attach to the container
|
|
81
|
+
- `sync-ruby-version.sh`: Updates DevContainer Ruby version from .tool-versions
|
|
82
|
+
|
|
83
|
+
## License
|
|
84
|
+
|
|
85
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Function to start devcontainer
|
|
4
|
+
up_devcontainer() {
|
|
5
|
+
local additional_flags="$1"
|
|
6
|
+
|
|
7
|
+
# Get the tmux config path
|
|
8
|
+
tmux_config_path=~/.config/tmux
|
|
9
|
+
tmux_resolved_config_path=$(readlink -f "$tmux_config_path")
|
|
10
|
+
echo "Resolved config path: $tmux_resolved_config_path"
|
|
11
|
+
|
|
12
|
+
# Construct the command to run the devcontainer
|
|
13
|
+
command="devcontainer up $additional_flags"
|
|
14
|
+
|
|
15
|
+
# Add mount options
|
|
16
|
+
command+=" --mount type=bind,source=$tmux_resolved_config_path,target=/home/vscode/.config/tmux"
|
|
17
|
+
|
|
18
|
+
# Add additional features
|
|
19
|
+
command+=" --additional-features='{ \
|
|
20
|
+
\"ghcr.io/duduribeiro/devcontainer-features/tmux:1\": {} \
|
|
21
|
+
}'"
|
|
22
|
+
|
|
23
|
+
# Add workspace folder
|
|
24
|
+
command+=" --workspace-folder ."
|
|
25
|
+
|
|
26
|
+
eval "$command"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Function to connect to devcontainer
|
|
30
|
+
exec_devcontainer() {
|
|
31
|
+
# Prepare exec command with environment variables
|
|
32
|
+
exec_command="devcontainer exec"
|
|
33
|
+
exec_command+=" --workspace-folder . /bin/bash"
|
|
34
|
+
|
|
35
|
+
eval "$exec_command"
|
|
36
|
+
}
|