Skip to content

v6 E1 slice 7: remove the persona SessionStart hook from the org plugin (agent-plugins) - #70

Merged
realRaghavGupta merged 1 commit into
mainfrom
agent/69-v6-e1-slice-7-remove-the-persona-session
Nov 5, 2026
Merged

realRaghavGupta merged 1 commit into
mainfrom
agent/69-v6-e1-slice-7-remove-the-persona-session

Conversation

@rigel-setkernel

Copy link
Copy Markdown
Contributor

Summary

Personas are cut in v6 (a slice of setkernel/hq#1333). This removes the opt-in persona SessionStart hook from the org plugin, along with its tests and docs. Before this change the hook only ran when SETKERNEL_PERSONA=1. After the hq side removes the persona files it would print nothing and exit 0, so it would be dead code that every seat still loads. Its tests are also the flaky ones in #54.

Refs #54 (the Lead closes it by hand after the post-merge session check below).

What changed

  • Deleted plugins/setkernel/hooks/persona.sh.
  • plugins/setkernel/hooks/hooks.json: removed the third SessionStart entry. session-context.sh (10 s) and verify-gate.sh start (30 s) keep their commands and timeouts. Stop and PreToolUse are unchanged, and both guards still carry "onFailure": "block".
  • tests/run.sh: removed the persona block, from # The persona hook (#37) up to # bin/dependabot-policy:. It took its helpers with it (with_email, silent, persona_hook, gh_calls, the gh stub); nothing else used them. Line 2 of the header no longer names the hook.
    Assertions removed: 34 (832 on main before, 798 after, under both bash and dash).
  • AGENTS.md: the Layout hooks/ bullet, the tests/run.sh bullet and the trap line about the hook fetching from hq.
  • README.md: the plugins/setkernel/ and tests/run.sh table rows, the allowManagedHooksOnly bullet (it still says a user-scope hook doesn't run but no longer points to a persona replacement), and the whole ## The persona hook (SessionStart) section. No anchor linked to it.
  • The rule "no secrets, personal data or personas" stays in both files.

Not touched: the other hooks, hooks/lib/**, managed/**, policy/holds.md, rules/**, agents/**. git diff main on git-guard.sh, hooks/lib, managed, rules, agents and policy is empty, so the files hq pins by commit (git-guard.sh, lib/scrub.awk) are byte-identical.

How it was tested

Run on the VM (Ubuntu) at the PR head:

Check Result
bash tests/run.sh 798/798 passed (main: 832/832)
SHELL_UNDER_TEST=dash bash tests/run.sh 798/798 passed (main: 832/832)
bin/generate --check generated files are current
shellcheck -S warning … exactly as in check.yml (ShellCheck 0.11.0, the CI pin) clean
JSON loop from check.yml (includes policy/versions.json) all valid
claude plugin validate . passed; the only warning is the expected missing version
`grep -rniE 'persona([^l] $)' . --exclude-dir=.git`

Where it is used: I ran each SessionStart command from the edited hooks.json the way Claude Code does (CLAUDE_PLUGIN_ROOT = this tree, a SessionStart JSON on stdin). session-context.sh printed the session context and exited 0. verify-gate.sh start printed nothing and exited 0. Every script hooks.json names exists.

Not run: the post-merge check, where a seat starts a fresh session and finds session-context output, no persona text and no hook error. That can only happen after merge, because merging is the release. It should then be posted on #69.

For the reviewer

  • R3: this goes live on every seat at merge.
  • Look at the README.md wording change on the allowManagedHooksOnly bullet.
  • No test-diff guard runs in this repo's check.yml, so no allow-test-changes: line is needed. If hq#563 is extended here, the Lead adds that line, not the author.
  • Seats that still set SETKERNEL_PERSONA=1 are harmless after this: nothing reads the variable any more.

Checks (setkernel:verify, read by the worker)

  • pass: bash tests/run.sh - 798/798 passed (main 832/832)
  • pass: SHELL_UNDER_TEST=dash bash tests/run.sh - 798/798 passed (main 832/832)
  • pass: bin/generate --check - generated files are current
  • pass: shellcheck -S warning bin/generate plugins/setkernel/hooks/.sh plugins/setkernel/skills/request-review/.sh tests/run.sh - ShellCheck 0.11.0, no output
  • pass: jq empty JSON loop (check.yml, incl. policy/versions.json) - all files valid
  • pass: claude plugin validate . - passed; only the expected missing-version warning

Closes #69

Automated: @rigel-setkernel's agent on rigel-dev.

Personas are cut in v6. Delete hooks/persona.sh, drop it from
hooks.json (the session-context and verify-gate start hooks keep their
commands and timeouts), remove its test block from tests/run.sh
(34 assertions: 832 -> 798) and the docs that described it in
AGENTS.md and README.md. The "no personas here" rule stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rigel-setkernel

Copy link
Copy Markdown
Contributor Author

Self-check: pass

Checks:

  • pass: bash tests/run.sh - 798/798 passed (main 832/832)
  • pass: SHELL_UNDER_TEST=dash bash tests/run.sh - 798/798 passed (main 832/832)
  • pass: bin/generate --check - generated files are current
  • pass: shellcheck -S warning bin/generate plugins/setkernel/hooks/.sh plugins/setkernel/skills/request-review/.sh tests/run.sh - ShellCheck 0.11.0, no output
  • pass: jq empty JSON loop (check.yml, incl. policy/versions.json) - all files valid
  • pass: claude plugin validate . - passed; only the expected missing-version warning

Acceptance criteria:

  • pass: persona.sh is deleted and hooks.json no longer lists it; other SessionStart hooks keep commands and timeouts, Stop and PreToolUse unchanged, jq empty passes (test ! -e plugins/setkernel/hooks/persona.sh; jq -c '.hooks.SessionStart[0].hooks[]|[.command,.timeout]' plugins/setkernel/hooks/hooks.json; git diff main -- plugins/setkernel/hooks/hooks.json; jq empty plugins/setkernel/hooks/hooks.json) - session-context.sh 10, verify-gate.sh start 30; diff removes only the persona entry
  • pass: tests/run.sh persona block gone (with silent, with_email, persona_hook), header line 2 no longer names it, line-796 SessionStart[0] test passes, PR body names assertions removed (grep -nE 'persona|with_email|silent|gh_calls' tests/run.sh; sed -n 2p tests/run.sh; bash tests/run.sh | grep 'records the baseline on SessionStart') - no matches; baseline test ok; 34 assertions removed (832 -> 798), stated in PR body
  • pass: bash tests/run.sh and SHELL_UNDER_TEST=dash show no new failures against main (bash tests/run.sh; SHELL_UNDER_TEST=dash bash tests/run.sh) - 798/798 on both; main 832/832 on both
  • pass: AGENTS.md and README.md no longer describe the hook; the no-personas rule stays in both (grep -niE 'persona([^l]|$)' AGENTS.md README.md) - only AGENTS.md:50 and README.md:4, the rule
  • pass: grep -rniE 'persona([^l]|$)' . --exclude-dir=.git finds only the rule's wording in AGENTS.md and README.md (grep -rniE 'persona([^l]|$)' . --exclude-dir=.git) - two hits, both the rule
  • pass: bin/generate --check, ShellCheck and the JSON check loop are green on the PR head (bin/generate --check; shellcheck -S warning ...; jq empty loop from check.yml) - all green locally on the head commit; CI to confirm
  • not run: After the merge, one seat starts a new Claude session: session-context output, no persona text, no hook error; log or screenshot on the issue (start a new Claude session on a seat after merge) - post-merge step: merging is the release, so it can't be run before merge
  • not run: agent-plugins#54 is closed by the Lead with a comment; PR uses Refs Flaky test: persona hook 'no persona for an unsafe name: zz.test@setkernel.com' failed once in CI #54 (grep 'Refs setkernel/agent-plugins#54' PR body) - PR body carries the Refs line; closing Flaky test: persona hook 'no persona for an unsafe name: zz.test@setkernel.com' failed once in CI #54 is the Lead's post-merge step

The peers are asked next.

Automated: @rigel-setkernel's agent on rigel-dev.

@rigel-setkernel

Copy link
Copy Markdown
Contributor Author

Test-diff guard: this PR changes existing test files, and the issue it closes has no allow-test-changes: line the guard takes yet (it takes one only when Raghav's account or Claude Lead's bot saved the issue body last):

  • modified tests/run.sh

Claude Lead: if these test changes are right, add the line to the issue with the reason, then re-run the guard job; if not, ask for the tests to be restored. That is the only thing this PR waits on from you: peer review goes on meanwhile, and the failing guard stops the merge until the line is in.

Automated: @rigel-setkernel's agent on rigel-dev.

@rigel-setkernel rigel-setkernel added the agent-review Waiting for agent review label Nov 5, 2026

@vega-setkernel vega-setkernel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean removal of the persona SessionStart hook: persona.sh, its hooks.json entry, its test block and its docs are gone, with no leftover references and no collateral changes. I reran the checks at the PR head and they pass (798/798 under bash and dash, generate --check, shellcheck, JSON validity).

Notes and nits (they block nothing)

  • README.md:66: The allowManagedHooksOnly bullet now reads 'nor does a user-scope hook' with no example. It is correct but a bit bare. The wording change the PR asks reviewers to check is fine as it stands.

Automated: @vega-setkernel's agent on vega-dev.

@vega-setkernel

Copy link
Copy Markdown
Contributor

Approvals that count toward the two a merge needs: 1 (vega-setkernel) on head 48a490d, non-author, submitted after its push at 2026-11-05T19:48:44Z (the earliest check run's start); sk-agent's own count: no fresh gate verdict. A second teammate is asked to review: orion-setkernel.

Automated: @vega-setkernel's agent on vega-dev.

@orion-setkernel orion-setkernel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean removal of the opt-in persona hook: persona.sh, its hooks.json entry, its 34 test assertions and the docs are gone; the other hooks, lib, managed, rules and policy files are untouched. Reproduced 798/798 under bash and dash, bin/generate --check and ShellCheck all pass. This is R3 (goes live on every seat on merge), so it needs Raghav's /approve , and the post-merge session check is still to be done.

Notes and nits (they block nothing)

  • README.md:63: The allowManagedHooksOnly bullet now says 'nor does a user-scope hook' with no example. That's accurate, but a seat with a leftover user-scope persona hook gets no hint it is dead.

Automated: @orion-setkernel's agent on orion-dev.

@orion-setkernel orion-setkernel removed the agent-review Waiting for agent review label Nov 5, 2026
@orion-setkernel

Copy link
Copy Markdown
Contributor

Approvals that count toward the two a merge needs: 2 (orion-setkernel vega-setkernel) on head 48a490d, non-author, submitted after its push at 2026-11-05T19:48:44Z (the earliest check run's start); sk-agent's own count: no fresh gate verdict. The agent review is done; the merge gate takes it from here.

Automated: @orion-setkernel's agent on orion-dev.

@realRaghavGupta

Copy link
Copy Markdown
Contributor

/approve 48a490d

@realRaghavGupta
realRaghavGupta merged commit 5798246 into main Nov 5, 2026
1 check passed
@realRaghavGupta
realRaghavGupta deleted the agent/69-v6-e1-slice-7-remove-the-persona-session branch November 5, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v6 E1 slice 7: remove the persona SessionStart hook from the org plugin (agent-plugins)

4 participants