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
4 changes: 2 additions & 2 deletions .ai/prompts/glean.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ future enhancement.
or an explicit statement that nothing new should be filed.
- `key_points` — three to five evidence-backed takeaways.
- `next_steps` — when there are follow-ups, the first step is exactly:
"Approve with a comment containing `Approve` and the ids to create, for
example `Approve G1, G2`." When there are none, state "No follow-ups
"Approve with a comment containing `Approve` or `Accept` and the ids to
create, for example `Approve G1, G2`." When there are none, state "No follow-ups
proposed."

6. Do not create the proposed Linear issues in this stage. The report is the
Expand Down
15 changes: 9 additions & 6 deletions .ai/prompts/improvement.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ run the project's setup or quality commands. Do not change the source issue.
## 1. Find the approved ids

Look only at the comments under **Recent Activity** in the lifecycle section
below. An approval is a comment that contains the word `Approve` (any case).
Its approved ids are every `G<number>` that appears after that word, such as
`Approve G1, G3` or `Approve follow-ups: G2 G4`. If more than one comment is an
approval, use the latest one.
below. An approval is a comment that contains a word starting with `Approve`
or `Accept` (any case). Its approved ids are every `G<number>` that appears
after that word, such as `Approve G1, G3`, `Approved: G2 G4` or
`Accepted: G1, G2, and G3`. If more than one comment is an approval, use the
latest one.

That is the only rule. Do not infer approval from any other comment, however
it is worded.
Expand Down Expand Up @@ -80,8 +81,10 @@ Write `.stokowski/report.json`:
- `next` — when `blocked`, say why: the PR's `mergeStateStatus` and
`reviewDecision`, and any ids that failed. The issue then waits at the
merge-review gate.
- `claims` — one entry for each approved id, with the created identifier or
the error, and one entry for the PR check with the `gh` output.
- `claims` — first, one entry quoting the approval comment you used, word for
word, with its author and time, or stating that there was none. Then one
entry for each approved id, with the created identifier or the error, and
one entry for the PR check with the `gh` output.
- `summary` — when any proposed follow-up in `.stokowski/follow-ups.json` was
not created (not approved, or failed), say so plainly: list each one as
"**Not created:** `<id>` — <title>". Then end with this paragraph, verbatim:
Expand Down
10 changes: 10 additions & 0 deletions workflow.glean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ hooks:
echo "before_run: preserving uncommitted workspace changes; skipping rebase"
exit 0
fi
# A branch that tracks a remote branch (main, or a pushed PR branch) is
# shared history: fast-forward it to its own upstream and never rewrite
# it. Rebasing a PR branch onto main drops its merge commits and leaves
# the workspace diverged from the PR. Only an unpushed branch rebases.
if git rev-parse --abbrev-ref --symbolic-full-name '@{upstream}' >/dev/null 2>&1; then
if ! git pull --ff-only; then
echo "before_run: cannot fast-forward to the upstream branch; leaving it as is" >&2
fi
exit 0
fi
if ! git rebase origin/main; then
echo "before_run: rebase onto origin/main failed; aborting it" >&2
if ! git rebase --abort; then
Expand Down
Loading