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
2 changes: 1 addition & 1 deletion skills/surface-plan/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The developer amends a plan only when it is their turn: awaiting approval, or bl
- Commit only the files of the plan folder, by path, following the repository's conventions. Each journal line goes in the commit of the files it describes. Never other changes of the working tree.
- Before the first push of the branch (it has no upstream yet), read the CI configuration. If its triggers react to a push of this branch or to the opening of a pull request, draft included, warn the developer, say what would run, and wait for their agreement. Write their answer into `interview.md` under "Git", so a relaunch does not ask again. Declined: push nothing, say the plan is committed locally, and go to step 11.
- Push the branch, setting its upstream.
- The pull request opens as a draft at the first `plan-drafted`. Its description is the text `surface-status pr-body` prints, and nothing else (it takes no argument, since it describes every plan of the branch). No pull request yet: `gh pr create --draft`, with a title after the repository's conventions and that description. One exists: replace its description with `gh pr edit --body`. Refresh it the same way at the end of every launch that pushes.
- The pull request opens as a draft at the first `plan-drafted`. Its description is the text `surface-status pr-body` prints, and nothing else (it takes no argument, since it describes every plan of the branch): the output of the script is given to `gh` on its standard input, so that no text of yours stands between the two. No pull request yet: `gh pr create --draft --body-file -`, with a title after the repository's conventions. One exists: `gh pr edit --body-file -`. Refresh it the same way at the end of every launch that pushes.
- Nothing else is written on the pull request, and you never mark it ready for review. Its comments are read only when the developer asks for it explicitly.
- Without `gh` or a remote, say so, give the description, and stop after the commit.

Expand Down
8 changes: 7 additions & 1 deletion tests/prompts/test_surface_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,14 @@ def test_the_draft_pull_request_opens_at_the_first_plan_drafted() -> None:
body = _body()
steps = "\n".join(_git_steps())
assert "opens as a draft at the first `plan-drafted`" in steps
assert "`gh pr create --draft`" in steps
assert "`surface-status pr-body` prints, and nothing else" in steps
# The script's output goes to `gh` as it is, as at every refresh of `/surface-execute`: left
# to carry the text itself, a session wrote it to a file and added a line of its own.
assert "the output of the script is given to `gh` on its standard input" in steps
assert "so that no text of yours stands between the two" in steps
assert "`gh pr create --draft --body-file -`" in steps
assert "`gh pr edit --body-file -`" in steps
assert "`gh pr edit --body`" not in steps
assert "Nothing else is written on the pull request" in steps
assert "never mark it ready for review" in steps
assert "read only when the developer asks for it explicitly" in steps
Expand Down
Loading