ワンクリックで
create-pr
Push the implementation branch and create a PR against the default branch with a generated summary from project artifacts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Push the implementation branch and create a PR against the default branch with a generated summary from project artifacts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Run pipeline Stage 2 (Architecture) for a project. Designs data model, API endpoints, migrations, and security scoping based on Pipeline Configuration in the conventions file.
Run pipeline Stage 1 (Discovery) for a project. Explores the target codebase to understand current state before designing changes.
Run pipeline Stage 3 (Gameplan) for a project. Produces the engineering spec from PRD + Discovery Report + APPROVED Architecture.
Run pipeline Stage 5 (Implementation) for a project milestone. Writes code to make Stage 4's failing tests pass.
Detect the current pipeline stage for a work item and run the next stage. Handles approval gates by invoking /pipeline-approve.
Run the full pipeline autonomously for a work item. Chains stages with context isolation, handles approval gates via interactive interview or auto-approve.
SOC 職業分類に基づく
| name | create-pr |
| description | Push the implementation branch and create a PR against the default branch with a generated summary from project artifacts. |
| argument-hint | <callsign> |
| allowed-tools | ["Read","Glob","Grep","Bash","Edit","mcp__wcp__wcp_get_artifact","mcp__wcp__wcp_attach","mcp__wcp__wcp_comment","mcp__wcp__wcp_update"] |
You push the implementation branch and create a GitHub pull request against the default branch (from Pipeline Configuration) with a summary generated from the project's pipeline artifacts. This is the delivery step after all pipeline stages are complete.
This skill runs post-flight checks (if configured in the conventions file), reads project artifacts, generates a PR summary, and runs git/gh commands.
wcp_get_artifact($ARGUMENTS, "progress.md") — milestone table, commit SHAs, test counts, files summarywcp_get_artifact($ARGUMENTS, "qa-plan.md") — manual test scenario count, known limitationswcp_get_artifact($ARGUMENTS, "gameplan.md") — project overview, milestone descriptionswcp_get_artifact($ARGUMENTS, "prd.md") — project name and level (from header)Run ALL of these checks before doing anything else. If any check fails, STOP and report the issue to the user.
First, locate the conventions file in the current repo root — look for CLAUDE.md, AGENTS.md, or CONVENTIONS.md (use the first one found). Read it in full. From the ## Pipeline Configuration section, extract: Repository Details (default branch, branch prefix, test command), Post-Flight Checks (if present), and Complexity Analysis (if present).
Read wcp_get_artifact($ARGUMENTS, "progress.md") and check the Milestone Status table.
"Not all milestones are complete. Remaining: [list pending milestones]. Complete them before creating a PR."
Check whether wcp_get_artifact($ARGUMENTS, "qa-plan.md") returns content.
"No QA plan found. Run
/qa-plan $ARGUMENTSfirst."
Verify the project branch exists:
git branch --list '<branch-prefix>$ARGUMENTS'
If the branch does not exist, STOP:
"The branch
<branch-prefix>$ARGUMENTSdoes not exist."
git status --porcelain
If there are uncommitted changes, STOP:
"The repo has uncommitted changes. Please commit or stash them before creating a PR."
Check whether a PR already exists for this branch:
gh pr list --head '<branch-prefix>$ARGUMENTS' --state open --json number,url
If a PR already exists, STOP and show its URL:
"A PR already exists for this branch: [URL]. To update the PR description, close the existing PR first or update it manually."
Check the conventions file. If Pipeline Configuration has a Post-Flight Checks section, run them now. If the section doesn't exist, skip to step 2.
Ensure you're on the project branch before running checks:
git checkout <branch-prefix>$ARGUMENTS
Phase A: Auto-fix checks
Run each check marked "Auto-fix? Yes" in the table. For example:
<auto-fix-command>
After each auto-fix command, check git status --porcelain for changes. If files were modified:
git add $(git diff --name-only) && git commit -m "Post-flight: auto-fix style issues"
Phase B: Report-only checks
Run each check marked "Auto-fix? No" in the table:
<check-command>
For each check:
"Post-flight check '[Check name]' failed with blocking findings:\n[output]\nPlease fix these issues before creating the PR."
Phase C: Record results
Build a post-flight summary to include in the PR body later:
Read these artifacts from WCP and extract the data needed for the PR summary:
wcp_get_artifact($ARGUMENTS, "progress.md") — extract:
wcp_get_artifact($ARGUMENTS, "qa-plan.md") — extract:
wcp_get_artifact($ARGUMENTS, "gameplan.md") — extract:
wcp_get_artifact($ARGUMENTS, "prd.md") — extract:
Capture code complexity metrics for the project branch. This data populates the Code Quality section in the PR body and project-level quality frontmatter in progress.md.
Step A: Check for Complexity Analysis configuration
Check the conventions file and look for a Pipeline Configuration → Complexity Analysis section.
HAS_QUALITY_DATA to false. Proceed to Step 4.Step B: Run repo baseline
<repo-baseline-command>
Parse the output to extract the repo-wide flog/method average. Store as repo_baseline_flog_avg.
Step C: Get all pipeline-touched files
git diff --name-only origin/<pr-base-branch>...<branch-prefix>$ARGUMENTS -- '<file-glob>'
Filter out any files matching the exclude pattern (e.g., files under spec/). If no files remain after filtering, set HAS_QUALITY_DATA to false and skip to Step 4.
Step D: Run score command per file
For each file from Step C, run the score command (replacing {file} with the file path):
<score-command>
Parse the output. Flog score output format is: N: flog total, N: flog/method average. Collect all per-file averages.
Compute:
project_flog_avg: mean of all per-file averages (rounded to 1 decimal)project_flog_max: highest individual method score across all filesfiles_analyzed: count of filesStep E: Compute delta and verdict
delta = project_flog_avg - repo_baseline_flog_avg (rounded to 1 decimal)verdict:
delta <= -1.0 → "below_baseline" (new code is less complex than repo average)delta >= 1.0 → "above_baseline" (new code is more complex than repo average)"at_baseline" (within ±1.0 of repo average)Step F: Identify hotspot methods
For each file from Step C, run the per-file command:
<per-file-command>
Collect all methods scoring above the hotspot threshold. Keep the top 5 by score. Store as hotspots list with: score, method name, file path.
Set HAS_QUALITY_DATA to true.
Failure handling: If any command fails (non-zero exit, unparseable output), log a warning to the console, set HAS_QUALITY_DATA to false, and continue. Never block PR creation on a quality analysis failure.
The PR title should be:
Example: Add Deficient Line Item Report
Assemble the PR body using this structure:
## Summary
[2-3 sentence description from gameplan project overview. What does this feature do? Who is it for?]
### Milestones
| Milestone | Description | Commit |
|-----------|-------------|--------|
[One row per milestone from progress.md, including QA Test Data if present]
### Test Results
- **[N]** automated tests, **0** failures
- Test files: [comma-separated list of spec files]
### Post-Flight Checks
[If post-flight checks ran, include results from Step 1:]
| Check | Result |
|-------|--------|
| [Check name] | Passed / Auto-fixed (commit `SHA`) / [N] non-blocking findings |
[If no Post-Flight Checks section in Pipeline Configuration, omit this section entirely.]
### Code Quality
[Include only if `HAS_QUALITY_DATA` is true. Omit this section entirely if quality analysis was skipped or failed.]
| Metric | Value |
|--------|-------|
| **Project flog avg** | [project_flog_avg] |
| **Repo baseline avg** | [repo_baseline_flog_avg] |
| **Delta** | [delta] ([verdict]) |
| **Files analyzed** | [files_analyzed] |
<details>
<summary>Per-milestone breakdown</summary>
| Milestone | Flog Avg | Flog Max | Max Method | Files |
|-----------|----------|----------|------------|-------|
[One row per milestone, reading pipeline_quality_mN_* from progress.md frontmatter]
</details>
[Include the following only if there are methods above the hotspot threshold:]
<details>
<summary>Hotspots (above threshold [threshold])</summary>
| Score | Method | File |
|-------|--------|------|
[Top 5 methods above threshold from Step 3F]
</details>
### Files Changed
- **[N]** new files ([brief breakdown: migration, model, service, etc.])
- **[N]** modified files ([brief breakdown])
### QA Plan
**[N]** manual test scenarios covering [list key feature areas from qa-plan.md Section 4 headings].
Full QA plan: `$ARGUMENTS`/qa-plan.md artifact
### Known Limitations
[Bulleted list of the most significant items from qa-plan.md Section 6. Keep it to the top 5-7 items. If none, write "None."]
---
Generated by the Agent Pipeline
git push -u origin <branch-prefix>$ARGUMENTS
If the push fails, STOP and report the error to the user.
gh pr create \
--base <pr-base-branch> \
--head "<branch-prefix>$ARGUMENTS" \
--title "[title]" \
--body "$(cat <<'EOF'
[generated PR body]
EOF
)"
Use a HEREDOC for the body to preserve formatting.
After the PR is created, capture the timestamp and PR URL, then update the progress artifact:
date +"%Y-%m-%dT%H:%M:%S%z" — save as PR_CREATED_AT.gh pr create output.wcp_get_artifact($ARGUMENTS, "progress.md").--- markers). Add these fields:pipeline_pr_created_at: "<PR_CREATED_AT>"
pipeline_pr_url: "<PR_URL>"
HAS_QUALITY_DATA is true, also add project-level quality summary fields to the frontmatter:pipeline_quality_flog_avg: [project_flog_avg]
pipeline_quality_repo_baseline_flog_avg: [repo_baseline_flog_avg]
pipeline_quality_delta: [delta]
pipeline_quality_verdict: "[verdict]"
pipeline_quality_files_analyzed: [files_analyzed]
If the progress content has no frontmatter, prepend one with the stage 5 fields plus the PR fields (and quality fields if applicable).
wcp_attach(
id=$ARGUMENTS,
type="progress",
title="Implementation Progress",
filename="progress.md",
content="[modified content with updated frontmatter]"
)
After updating the PR timing, generate the project metrics report. This provides an immediate timing summary for every completed project.
Read all project artifacts from WCP and extract YAML frontmatter from each. Use:
wcp_get_artifact($ARGUMENTS, "progress.md")wcp_get_artifact($ARGUMENTS, "gameplan.md")wcp_get_artifact($ARGUMENTS, "prd.md")wcp_get_artifact($ARGUMENTS, "qa-plan.md")Parse pipeline_started_at, pipeline_completed_at, pipeline_approved_at, pipeline_m*_started_at, pipeline_m*_completed_at, pipeline_pr_created_at, pipeline_pr_url, and pipeline_backfilled fields.
Enrich with git data — get PR merge status:
gh pr list --head '<branch-prefix>$ARGUMENTS' --state all --json mergedAt,createdAt,url --limit 1
Compute metrics:
completed_at - started_at for each stage (where both exist)approved_at - completed_at for architecture and gameplancompleted_at timestampscompleted_at → last milestone completed_atcreatedAt → PR mergedAt (if merged)started_at (or completed_at) → PR merge (or latest timestamp)Write the metrics report as a WCP artifact:
wcp_attach(
id=$ARGUMENTS,
type="metrics",
title="Pipeline Metrics",
filename="metrics.md",
content="[metrics report]"
)
The report should contain:
Format durations as: Xm (under 1h), Xh Ym (1-24h), Xd Yh (over 24h). Use — for unavailable data.
Update the WCP work item status and leave a completion comment:
wcp_update(id=$ARGUMENTS, status="done")
wcp_comment(
id=$ARGUMENTS,
author="pipeline/create-pr",
body="Pipeline complete — PR created at [PR_URL]. Work item marked as done."
)
<branch-prefix>$ARGUMENTS branch.Tell the user:
$ARGUMENTS/qa-plan.md artifact) with the tester when QA begins."