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
22 changes: 21 additions & 1 deletion .agents/skills/implement-issue/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,27 @@ gh pr edit <pr> -R <repo> --add-label <label_ui_review> # when set, and a pers
$RS park <pr>... # every pull request of the issue; then end the turn as it says
```

The body: what changed and why, how it was verified (the commands, and what
The body opens with one line, who asked for the change, where, and whose
agent built it, so a reader knows whom to ask:

```text
Requested by <who> <where> — implemented by <agent>, <operator>'s agent
```

- `<who>` `<where>`: the latest of the issue's `Filed from Slack at the
request of <name>` or `Handed off from Slack by <name>` lines of yours
([`docs/slack.md`](../../../docs/slack.md)): `<name> in [Slack](<link>)`, the
link `get_message_link` gives for the `<!-- slack-thread: <chat> <ts> -->`
beside it (`chatId` `<chat>`, `messageTs` `<ts>`); none: `in Slack`. Else the
account that last put `label_handoff` on it, from
`gh api repos/<repo>/issues/<n>/events`: `@<login> on GitHub`. Asked in the
direct session: `<operator> in the direct session`.
- `<agent>` is `$PLATFORM_AGENT_NAME`; `operator` missing: `— implemented by
<agent>` alone.

`scripts/public-check.sh` reads past the Slack link on this line alone.

Then: what changed and why, how it was verified (the commands, and what
`verify_exclusive` or `verify_environment` covered or why it did not run), its Environment's link when it
has one ([`docs/environments.md`](../../../docs/environments.md)), anything a reviewer should
look at first.
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ Applying the kit never touches an agent already created from it, so an instance
crosses a version only when its operator walks it through these steps, in the
direct session.

## 6.19.0 — 2026-11-27

**Every pull request says who asked for it, where, and whose agent built it.**
Its body opens with `Requested by <who> <where> — implemented by <agent>,
<operator>'s agent`: the person who asked in Slack, with a link to the thread,
or the account that put the hand-off label on the issue
([`implement-issue`](.agents/skills/implement-issue/SKILL.md) → **6**).
`public-check.sh` lets the Slack thread's link through on that line alone. The
new key `operator` is the name of the person whose agent this is.

**Upgrade (operator only):** add `- operator: <your name>` to
`work/CONFIG.md`. Without it, the line names the agent alone.

## 6.18.0 — 2026-11-13

**Who hands an issue off on GitHub can hear of it in a Slack direct message.**
Expand Down
6 changes: 5 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ a line in any other shape is invisible, not wrong.
- `author` — the login you push as; yours carry `label_mine` too, when set.
- `app_url` — the platform's address, for the session link on every pull
request. Missing: pull requests carry none, and say why.
- `operator` — the name of the person whose agent this is, on every pull
request's `Requested by` line. Missing: the line names the agent alone.
- `mode` — `autonomous`, or `interactive`: nothing is watched, and work
starts in the direct session alone. Missing: interactive.
- `label_handoff`, `label_claimed`, `label_needs_info` — missing means
Expand Down Expand Up @@ -170,7 +172,9 @@ Nothing to do is a normal outcome. Say so, finish `nothing`, end the turn.
and hold any lock it needs until it returns. **Watch it, do not just await
it:** read its log every few minutes; a failure in its setup stops it at
once, and its cause is fixed before it runs again — never the same run twice.
- **Every pull request body carries two lines.** `Fixes #<n>`, on its own line
- **Every pull request body carries three lines.** First, `Requested by …`:
who asked for the change, where, and whose agent built it — its format in
[`implement-issue`](.agents/skills/implement-issue/SKILL.md) → **6**. Then `Fixes #<n>`, on its own line
(in another repository `Fixes <repo>#<n>`, or `Part of <repo>#<n>` when
another of the issue's pull requests closes it):
the precheck pairs an issue with its pull request through it, so one that
Expand Down
5 changes: 5 additions & 0 deletions ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ confirming or correcting rather than composing from nothing.
on this very conversation. A link with no `?s=` means the harness does not
hand its session id to the shell, and pull requests will link to the agent
rather than to the run that wrote them — say so, it is worth knowing.
- **Operator** — ask the user for their name as people should see it, and
record it as `operator`: every pull request opens with who asked for it and
whose agent built it, so a reader knows whom to ask. No name: leave it out,
and the line names the agent alone.
- **Slack** — optional, and off unless they say yes. Run `describe_channel`
for `slack`: when it lists chats, offer to post the moments a person acts on
— ready to merge, needs info, blocked, the weekly audit
Expand Down Expand Up @@ -194,6 +198,7 @@ that is not one of them fails verification, because nothing would ever read it:
- repo: owner/name
- author: the-login-you-push-as
- app_url: https://platform.example.com
- operator: Alice Example
- mode: autonomous
- label_handoff: agent/implement
- label_claimed: agent/in-progress
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.18.0
6.19.0
8 changes: 7 additions & 1 deletion app/src/developer/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
// one `app_url` names, and its siblings. The session link and the
// `<!-- slack-thread: … -->` marker are the two the rules ask for, and are
// read past, as is a line `Environment: <address>` with its
// `<!-- environment: issue-<n> -->` marker (docs/environments.md). Exit 1 names each hit by line, a credential never by its value;
// `<!-- environment: issue-<n> -->` marker (docs/environments.md), and the
// Slack thread's link on a pull request's `Requested by` line (implement-issue → 6). Exit 1 names each hit by line, a credential never by its value;
// any other URL is listed as a note, for the run to judge, and leaves exit 0.
// What a shape cannot see — a paraphrase, a name, a quote — stays judgment.
import type { Command } from "../factory/context.ts";
Expand Down Expand Up @@ -41,6 +42,10 @@ const PUBLIC_HOST = /(^|\.)(github\.com|githubusercontent\.com|slack\.com)$/i;
const MARKER = /<!-- slack-thread: [A-Z0-9]+ [0-9]+\.[0-9]+ -->|<!-- environment: issue-[0-9]+ -->/g;
/** The pull request's link to its Environment (docs/environments.md), on a line of its own. */
const ENVIRONMENT_LINE = /^Environment: https:\/\/\S+$/;
/** The pull request's first line, who asked and where; its Slack thread's link alone is read past on it. */
const REQUESTED_LINE = /^Requested by /;
const THREAD_LINK =
/https:\/\/[a-z0-9-]+\.slack\.com\/archives\/[A-Z0-9]+\/p[0-9]+(\?thread_ts=[0-9]+\.[0-9]+(&cid=[A-Z0-9]+)?)?/g;

export interface Hit {
readonly line: number;
Expand Down Expand Up @@ -73,6 +78,7 @@ export function scan(text: string, appUrl: string): { hits: Hit[]; notes: Hit[]
text.split("\n").forEach((raw, i) => {
let line = (link ? raw.replace(link, " ") : raw).replace(MARKER, " ");
if (ENVIRONMENT_LINE.test(line.trim())) return;
if (REQUESTED_LINE.test(line.trim())) line = line.replace(THREAD_LINK, " ");
if (SECRET.test(line)) hits.push({ line: i + 1, kind: "credential", text: "" });
// each match is cut out as it is found: an id inside a Slack link is the link's hit alone
for (const [kind, re] of SHAPES)
Expand Down
1 change: 1 addition & 0 deletions app/src/developer/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const KNOWN = [
"repo",
"author",
"app_url",
"operator",
"mode",
"label_handoff",
"label_claimed",
Expand Down
13 changes: 13 additions & 0 deletions app/test/public.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ test("a hit names its file, line and match", () =>
assert.match(r.err, /rewrite each with a placeholder/);
}));

test("a pull request's Requested by line may link its Slack thread, nothing else and nowhere else", () => {
const thread =
"https://acme.slack.com/archives/C0123ABCD9/p1700000000000100?thread_ts=1700000000.000100&cid=C0123ABCD9";
assert.deepEqual(kinds(`Requested by Alice in [Slack](${thread}) — implemented by Karel, Bob's agent`), []);
assert.deepEqual(
kinds("Requested by Alice in [Slack](https://acme.slack.com/archives/C0123ABCD9/p1700000000000100)"),
[],
);
assert.deepEqual(kinds(`see ${thread}`), ["Slack link"], "only on its own line");
assert.deepEqual(kinds("Requested by Alice <@U0123ABCD9>"), ["Slack id"]);
assert.deepEqual(kinds("Requested by alice@acme.io"), ["e-mail address"]);
});

test("a pull request's Environment line and its marker are read past, the same address elsewhere is not", () => {
const env = "https://app-issue-7-44dcc8.env-dev.apps.cl.acme.example";
assert.deepEqual(kinds(`Environment: ${env}`), []);
Expand Down
5 changes: 3 additions & 2 deletions docs/persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ git -C "$d" checkout -b "<type>/<short-slug>"
git -C "$d" add -- kit.yaml CLAUDE.md AGENTS.md ONBOARDING.md README.md VERSION CHANGELOG.md .gitignore docs scripts bin app .github .agents/skills/implement-issue .agents/defaults
git -C "$d" commit -m "<type>: <what changed>"
git -C "$d" push -u origin "<type>/<short-slug>"
(cd "$d" && gh pr create --title "<title>" --body "<what and why>")
(cd "$d" && gh pr create --title "<title>" --body "<its Requested by line, then what and why>")
```

Your part ends at the pull request; a person merges, and `$HOME` takes it at
The body opens with the `Requested by` line of
[`implement-issue`](../.agents/skills/implement-issue/SKILL.md) → **6**. Your part ends at the pull request; a person merges, and `$HOME` takes it at
the next **Update**. When the connection refuses the push, write the change to
`/tmp/definition.patch` with `git -C "$d" diff`, show it, and hand it to the
operator instead.
Loading