Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 115 additions & 85 deletions .claude/skills/plan-ticket-implementation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,69 +265,54 @@ git push -u origin plan/[issue_number]-[short_title]
✅ Pushed to origin
```

### 7. Create PR with Implementation Plan
### 7. Generate Changelog Entry

**Invoke the `create-changelog` skill to generate a changelog entry:**

**PR Title:**
```
[#91] Add home background images support
/create-changelog
```

**PR Body:**

Showcase the implementation plan to reviewers:

```markdown
# Implementation Plan for Issue #[number]

## Summary
[1-2 sentence description of what's being built]

## Plan Details
This skill will:
1. Analyze git diff between current branch and main
2. Extract ticket ID from branch name
3. Generate changelog entry following "Keep a Changelog" standard
4. Write entry to CHANGELOG.md
5. Return changelog entry details

### Why
[From proposal.md Why section]
**Expected result:**
- CHANGELOG.md updated with new entry
- Changelog entry contains: ticket ID, title, Added/Changed/Fixed/Removed/Security sections
- Format: `### [ID Title](issue-link)` with proper categories

### What Changes
[From proposal.md What Changes - bullet list]
### 8. Create PR via changelog-driven workflow

### Implementation Approach
[From proposal.md or user's stated approach]

### Files/Components
[User-identified files that will change]

### Implementation Checklist
[From tasks.md - shows scope of work]

### Key Scenarios
[From spec deltas - shows behavior being added]

---
**Invoke the `open-pull-request` skill to create the PR:**

**Next Steps:**
1. ✅ Review this plan
2. ✅ Approve approach and scope
3. 🔄 Merge this PR to main
4. 🚀 Create new implementation branch from main: `feat/[issue_number]-[short-title]`
5. 📝 Begin implementation following tasks.md checklist
6. ✅ Complete all tasks and mark checklist done
7. 📋 Create implementation PR with actual code changes

**Branch:** `plan/[issue_number]-[short-title]`
**Files in this PR:** Implementation plan (proposal.md, tasks.md, spec deltas)
**After merge:** Implementation starts on new `feat/[issue_number]-[short-title]` branch
```
/open-pull-request
```

**Invoke GitHub MCP to create the PR:**
- head: plan/[issue_number]-[short_title]
- base: main
- title: [#issue_number] [issue_title]
- body: [formatted plan as above]
- draft: true (so it's clear this is for review)
This skill will:
1. Read the latest changelog entry from CHANGELOG.md
2. Extract ticket ID, title, and description
3. Validate current branch contains ticket ID (should be: `plan/[id]-[short-title]`)
4. Create PR with:
- **Title**: `[ID] Title` (from changelog)
- **Body**: `# Changelog` header + changelog entry content
- **From**: plan/[issue_number]-[short_title]
- **To**: main
- **Status**: Draft (for careful review)

**Capture returned PR number and URL.**

### 8. Post Plan to GitHub Issue
This approach ensures:
- All PRs are created consistently using changelog entries
- PR title and body always match the changelog
- Reuses existing PR creation logic
- Follows TORQ conventions

### 9. Post Plan to GitHub Issue

**Create comprehensive issue comment:**

Expand Down Expand Up @@ -380,7 +365,7 @@ This PR (#[pr_number]) establishes the implementation plan for this issue.

If comment creation fails, report the error but don't block - user can view plan via PR instead.

### 9. Provide Summary to User
### 10. Provide Summary to User

**Return completion summary:**

Expand Down Expand Up @@ -451,17 +436,24 @@ User: /plan-ticket-implementation 91
✅ Committed to plan/91-home-background-images
✅ Pushed to origin

7. Skill creates PR with implementation plan:
✅ PR #123 created
7. Skill invokes create-changelog skill:
/create-changelog
✅ Changelog entry generated
✅ CHANGELOG.md updated with planning details
✅ package.json version updated

8. Skill invokes open-pull-request skill:
/open-pull-request
✅ PR #123 created from changelog entry

PR Title: [#91] Add home background images support
PR Body: Shows proposal, tasks, and spec details
PR Body: # Changelog header + changelog entry

8. Skill posts plan to issue comment:
9. Skill posts plan to issue comment:
✅ Plan posted to issue #91

9. Skill returns summary:
✅ Ticket Planning Complete!
10. Skill returns summary:
✅ Ticket Planning Complete!

Issue: #91 - Add home background images
Branch: plan/91-home-background-images
Expand All @@ -477,29 +469,55 @@ User: /plan-ticket-implementation 91

## Integration Points

### GitHub MCP Tools Used
### Skills Used

1. **`gh_get_issue(number)`**
- Fetch issue details by number
- Assumes torqlab/torq repository
- Returns: title, body, labels, author, state
1. **`create-changelog` Skill**
- Generates changelog entry from git diff between plan branch and main
- Analyzes changes to identify Added/Changed/Fixed/Removed/Security categories
- Creates standardized changelog entry with ticket ID and title
- Updates CHANGELOG.md in repository root
- Updates version in package.json

2. **`gh_create_pull_request(title, body, head, base)`**
- Create PR from branch
- Receives: PR parameters with implementation plan
- Returns: PR number, URL, state
2. **`open-pull-request` Skill**
- Reads latest changelog entry from CHANGELOG.md
- Extracts ticket ID, title, and description
- Validates current branch matches ticket ID pattern
- Creates PR with changelog-driven title and body
- Adds "# Changelog" header to PR body
- Creates PR in draft mode
- Returns PR number and URL

3. **Issue Comment Creation**
- Post plan summary as comment
- Verify availability in GITHUB_MCP_SETUP.md
### GitHub MCP Tools Used (via `open-pull-request` skill)

The `open-pull-request` skill uses:
- `gh_create_pull_request(title, body, head, base, draft)` - Creates PR with changelog entry

### Issue Comment Creation

After PR is created, skill posts plan summary to GitHub issue:
- Uses GitHub API via existing tools
- Posts comprehensive summary of planning approach
- Links to plan PR and branch
- Includes next steps for implementation

### Skills Coordinated

The skill now operates **independently** without invoking other skills:
- No longer calls `create-changelog` or `open-pull-request`
- Directly creates plan files and commits them
- Directly creates PR via GitHub MCP
- Streamlines the workflow into one cohesive skill
The skill coordinates with existing TORQ skills for consistency:
- **`create-changelog`** - Generates changelog entry from git diff
- Analyzes changes between branch and main
- Produces standardized changelog entry format
- Updates CHANGELOG.md and package.json version
- **`open-pull-request`** - Creates PR from changelog entry
- Reads CHANGELOG.md for title and description
- Validates branch matches ticket ID
- Creates PR with "# Changelog" header format
- Ensures all PRs follow same structure

This orchestration ensures:
- All PRs are created consistently
- Changelog always matches PR content
- PR creation logic is reused and maintained in one place
- Clear separation of concerns between planning and PR creation

### Project Conventions Applied

Expand Down Expand Up @@ -556,7 +574,10 @@ The skill successfully completes when:
- ✅ Plan files created (proposal.md, tasks.md, spec deltas)
- ✅ All files committed to branch
- ✅ Branch pushed to remote
- ✅ PR created with implementation plan
- ✅ `create-changelog` skill invoked and changelog entry generated
- ✅ CHANGELOG.md updated with new entry
- ✅ `open-pull-request` skill invoked and PR created
- ✅ PR created in draft mode with "# Changelog" header
- ✅ Plan posted to GitHub issue (or skipped if failed)
- ✅ Summary provided to user

Expand All @@ -583,15 +604,24 @@ After this skill completes:
8. **Create implementation PR**: When ready with code changes, create separate PR with actual code and CHANGELOG.md
9. **Archive change**: After implementation PR merges, archive via OpenSpec workflow

### Two-Step PR Process
### Two-Step Process: Planning PR Creation

This skill creates the **planning PR** through a two-step process:

1. **Generate Changelog** (`create-changelog` skill):
- Analyzes plan files (proposal.md, tasks.md, spec deltas) committed to branch
- Generates standardized changelog entry
- Updates CHANGELOG.md with ticket ID and planning details

This skill creates the **planning PR**. The workflow then continues with:
- **Planning PR** (this skill): Contains proposal.md, tasks.md, spec deltas, optional design.md on `plan/<id>` branch
- **Implementation PR** (separate): Created from new `feat/<id>` branch, contains actual code changes and CHANGELOG.md
2. **Create PR** (`open-pull-request` skill):
- Reads changelog entry from CHANGELOG.md
- Creates PR with changelog-driven title and body
- PR title: `[ID] Title` (from changelog)
- PR body: `# Changelog` header + changelog content
- Creates PR in draft mode for review

This separation ensures:
- Approach is reviewed and approved before implementation begins
- Implementation branch is created fresh from main with all approved plan files included
- Clear audit trail of planning vs implementation phases
- Implementation can reference the approved plan
- Clear audit trail of what was planned vs what was built
This ensures:
- All PRs follow consistent structure (changelog-driven)
- PR content always matches changelog
- Planning approach is clearly documented
- Code is reused via existing skills
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ Please, document here only changes visible to the client app.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.1.1] - 2026-03-31

### [0 Fix plan-ticket-implementation Skill PR Creation Flow](https://github.com/torqlab/torq/issues/0)

### Fixed
- **plan-ticket-implementation skill** now uses create-changelog and open-pull-request skills for consistent PR creation
- Removed custom GitHub MCP PR creation logic
- Now delegates to existing skills for consistency
- Ensures all PRs are created with changelog-driven workflow
- PR title and body always match the changelog entry
- Reuses PR creation logic instead of duplicating

## [6.1.0] - 2026-03-31

### [0 Add Ticket Planning and Pull Request Creation Skills](https://github.com/torqlab/torq/issues/0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "torq",
"version": "6.1.0",
"version": "6.1.1",
"description": "Generates AI images based on Strava activity data.",
"type": "module",
"private": true,
Expand Down
Loading