feat(commit-push-pr): include plan/prompt context in PR body#428
Closed
m-abboud wants to merge 1 commit intoanthropics:mainfrom
Closed
feat(commit-push-pr): include plan/prompt context in PR body#428m-abboud wants to merge 1 commit intoanthropics:mainfrom
m-abboud wants to merge 1 commit intoanthropics:mainfrom
Conversation
When running /commit-push-pr, automatically surface the original task context (plan file or prompt) in the PR description so reviewers have full context without digging through chat history. Plan file is resolved in priority order: 1. Explicit argument path (e.g. /commit-push-pr PLAN.md) 2. PLAN.md in the current directory 3. .plan.md in the current directory 4. Most recently modified file in ~/.claude/plans/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plan/prompt contextsection to the/commit-push-prcommand that automatically reads the task's plan or original prompt and injects it into the PR bodyPLAN.md→.plan.md→ most recently modified file in~/.claude/plans/argument-hintand the plan-file lookup behaviourMotivation
When Claude completes a task and opens a PR, reviewers currently only see a diff-based summary with no record of why the work was done or what the original requirements were. Including the plan/prompt context directly in the PR body gives reviewers and future readers full context without having to dig through a separate chat history or planning document.
How it works
The new context line in the command:
resolves to the first non-empty result from:
/commit-push-pr PLAN.md)PLAN.mdin the current working directory.plan.mdin the current working directory~/.claude/plans/(written during Claude's plan mode)If no plan file is found the field is empty and the PR body is generated from the diff as before.
Test plan
/commit-push-prwith no argument in a repo that has aPLAN.md— verify plan content appears under## Contextin the PR body/commit-push-pr path/to/custom-plan.md— verify the specified file is used/commit-push-prwith no plan file present — verify PR is still created normally without a## Contextsection.plan.mdfallback works whenPLAN.mddoes not exist~/.claude/plans/fallback is used when no local plan file exists🤖 Generated with Claude Code