diff --git a/.agents/skills/implement-issue/SKILL.md b/.agents/skills/implement-issue/SKILL.md index e184053..7059ae6 100644 --- a/.agents/skills/implement-issue/SKILL.md +++ b/.agents/skills/implement-issue/SKILL.md @@ -133,7 +133,27 @@ gh pr edit -R --add-label # when set, and a pers $RS park ... # 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 — implemented by , 's agent +``` + +- `` ``: the latest of the issue's `Filed from Slack at the + request of ` or `Handed off from Slack by ` lines of yours + ([`docs/slack.md`](../../../docs/slack.md)): ` in [Slack]()`, the + link `get_message_link` gives for the `` + beside it (`chatId` ``, `messageTs` ``); none: `in Slack`. Else the + account that last put `label_handoff` on it, from + `gh api repos//issues//events`: `@ on GitHub`. Asked in the + direct session: ` in the direct session`. +- `` is `$PLATFORM_AGENT_NAME`; `operator` missing: `— implemented by + ` 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. diff --git a/CHANGELOG.md b/CHANGELOG.md index 529ebc8..1a99fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 — implemented by , +'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: ` 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.** diff --git a/CLAUDE.md b/CLAUDE.md index 83bb7b5..7d46850 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 @@ -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 #`, 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 #`, on its own line (in another repository `Fixes #`, or `Part of #` when another of the issue's pull requests closes it): the precheck pairs an issue with its pull request through it, so one that diff --git a/ONBOARDING.md b/ONBOARDING.md index 6227bef..5d31ee5 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -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 @@ -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 diff --git a/VERSION b/VERSION index 1b386a5..74c926a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.18.0 +6.19.0 diff --git a/app/src/developer/public.ts b/app/src/developer/public.ts index a2bf81c..064c183 100644 --- a/app/src/developer/public.ts +++ b/app/src/developer/public.ts @@ -9,7 +9,8 @@ // one `app_url` names, and its siblings. The session link and the // `` marker are the two the rules ask for, and are // read past, as is a line `Environment:
` with its -// `` marker (docs/environments.md). Exit 1 names each hit by line, a credential never by its value; +// `` 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"; @@ -41,6 +42,10 @@ const PUBLIC_HOST = /(^|\.)(github\.com|githubusercontent\.com|slack\.com)$/i; const MARKER = /|/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; @@ -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) diff --git a/app/src/developer/verify.ts b/app/src/developer/verify.ts index 1fc346b..fb58c01 100644 --- a/app/src/developer/verify.ts +++ b/app/src/developer/verify.ts @@ -29,6 +29,7 @@ export const KNOWN = [ "repo", "author", "app_url", + "operator", "mode", "label_handoff", "label_claimed", diff --git a/app/test/public.test.ts b/app/test/public.test.ts index e49a37c..6cac011 100644 --- a/app/test/public.test.ts +++ b/app/test/public.test.ts @@ -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}`), []); diff --git a/docs/persistence.md b/docs/persistence.md index 4ed3a21..159927b 100644 --- a/docs/persistence.md +++ b/docs/persistence.md @@ -109,10 +109,11 @@ git -C "$d" checkout -b "/" 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 ": " git -C "$d" push -u origin "/" -(cd "$d" && gh pr create --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.