Skip to content

test: derive the persona count instead of hardcoding seventeen - #26

Merged
d6veteran merged 1 commit into
mainfrom
claude/derive-persona-count
Jul 29, 2026
Merged

test: derive the persona count instead of hardcoding seventeen#26
d6veteran merged 1 commit into
mainfrom
claude/derive-persona-count

Conversation

@d6veteran

Copy link
Copy Markdown
Collaborator

Found during the final audit of the v2 work. The recurring bug class was in one last place, and it's a slightly embarrassing one: the tests that guard against hand-maintained rosters were themselves pinned to a roster size.

Four assertions compared against a literal 17.

Reproduction

Simulated an eighteenth persona by adding a profile and regenerating:

✗ 17 persona subagents generated (got 18)
✗ every slash command carries the handoff brief (expected 17, got 18)
✗ every subagent still carries the handoff brief (expected 17, got 18)
✗ every persona profile defines a handoff brief (expected 17, got 18)

Adding a team member would have broken the suite for no reason, and trained whoever hit it to bump the number rather than ask why the number was there.

Fix

PERSONA_COUNT derives from profiles/, skipping the coordinators — the same derivation the CLI rosters now use after #25.

Verified both directions

Scenario Result
18th persona, regenerated 209/209 green
18th persona, NOT regenerated 4 failures naming nova: missing subagent, regeneration diff, handoff brief absent from its command and its agent

So the suite scales with the roster and still catches drift. That second case is the one that matters — deriving the count must not weaken the check.

shellcheck clean.


Generated by Claude Code

Final audit of the v2 work found the recurring bug class in its last hiding
place: the tests that guard against hand-maintained rosters were themselves
pinned to a roster size. Four assertions compared against a literal 17.

Simulated an eighteenth persona: four tests failed purely on the count, so
adding a team member would have broken the suite for no reason and trained
whoever hit it to edit the number rather than ask why.

The count now derives from profiles/, skipping the coordinators, the same way
every roster the CLI prints derives from them after the previous change.

Verified both directions. An eighteenth persona that is generated passes
209/209. An eighteenth persona added without regenerating fails four tests that
name it: the missing subagent, the regeneration diff, and the handoff brief
absent from its command and its agent. The suite scales with the roster and
still catches drift.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019j5DHEZsoeCGRueTbNLuTb
@d6veteran
d6veteran marked this pull request as ready for review July 29, 2026 18:15
@d6veteran
d6veteran merged commit ca02075 into main Jul 29, 2026
3 checks passed
@d6veteran
d6veteran deleted the claude/derive-persona-count branch July 30, 2026 22:26
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.

2 participants