You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,3 +126,44 @@ All I/O-dependent functions accept an `inputs` object with injectable callbacks
126
126
- All relative imports must use `.js` extensions (`from "./foo.js"`, not `from "./foo"`). Required by `moduleResolution: "node16"`.
127
127
- All commits require a `Signed-off-by` line (DCO). Use `git commit -s`.
128
128
- When adding commands to `package.json`, update the expected count in `test/suite/index.ts`.
129
+
-**Branch & PR workflow (never push a branch and stop):** For any trackable work,
130
+
after the first `git push` immediately create a draft PR (`gh pr create --draft`).
131
+
Continue development with normal `git push` (updates the draft PR + CI).
132
+
Only run `gh pr ready <number>` (and enable auto-merge if needed) when the
133
+
changes are ready for review/merge. This ensures every pushed branch is
134
+
backed by an open (draft) PR from the start. See `~/.grok/skills/owned-repo-gate/SKILL.md`.
135
+
136
+
## Release PRs - Strong Guard
137
+
138
+
Release PRs (created by release-please, titled "chore: release ..." or "chore(main): release ...", or labeled `autorelease: pending`) MUST NEVER be merged (with `gh pr merge`, `--auto`, or otherwise) without the user's explicit approval.
139
+
140
+
Merging a release PR:
141
+
- Publishes a new version of the VSIX
142
+
- Creates git tags
143
+
- Triggers the full release pipeline (Marketplace, Open VSX, attestation bundles)
144
+
- The user controls release cadence, not the agent.
145
+
146
+
### Required procedure (strong guard)
147
+
148
+
When you encounter a release PR (during triage, gate check, `gh pr list`, or status):
149
+
150
+
1. Report it clearly: "Release PR #N (vX.Y.Z) is ready to merge."
151
+
2. Use the `ask_user_question` tool (or direct question) to ask: "Should I merge it?"
152
+
3.**Only after receiving an explicit "yes" (or equivalent affirmative) from the user in this session**, proceed.
153
+
4. Before executing any merge command, run the guard:
154
+
```
155
+
bash scripts/guard-no-release-merge.sh <number>
156
+
```
157
+
The script will abort with guidance unless `ALLOW_RELEASE_MERGE=yes` is set (only after user yes).
158
+
5. If checks pass and user said yes: `gh pr merge <number> --squash` (or let auto if user directed).
159
+
160
+
This rule was strengthened after an incident where `gh pr merge 144 --auto` (under a broad "merge everything" instruction) resulted in v0.0.5 being published without explicit per-release "yes".
161
+
162
+
### Defense in depth
163
+
164
+
- Workflow: `.github/workflows/auto-approve.yml` uses author + label check + wf-changes to never enable `--auto` for release PRs.
165
+
- Script: `scripts/guard-no-release-merge.sh` provides a hard runtime guard for shell commands.
166
+
- Documentation: This section + global AGENTS.md rule.
167
+
- Branch protection + ruleset: still enforces checks, but does not replace user approval for releases.
168
+
169
+
Never bypass the guard "just this once" or rationalize. Ask every time.
0 commit comments