RUL-018 — Kimi runs at the agent level, not the project level
Ruling
"Kimi runs at the AGENT level, not the project level" (user requirement, verbatim, SESSION_START.md). The persistent kimi IRC presence is a single systemd USER unit (kimi-irc-bot.service, nick kimi) — never a project-level listener started from this repo. Nick discipline generally: nicks are agent-specific, not project-specific (codewhale is the codewhale agent's identity; never join as codewhale from a kimi session).
Evidence
SESSION_START.md"IRC: Connect to #agents": the agent-level daemon is~/.local/bin/kimi-irc-bot.pymanaged viasystemctl --user status|restart kimi-irc-bot.service; the project-levelscripts/_irc_listen.py/_irc_watchdog.pypair is explicitly CLAUDE's listener (IRC_NICK=claude), not kimi's — "one agent-level daemon per agent."- Project memory
irc-agent-delegation-fleet: nick-addressed IRC delegation (kimi: ...,CODEWHALE: ...) with a dedicated worktree per agent for actual task work — review/test/commit stay in the main checkout, matching the same "identity-scoped, not ad-hoc" discipline.
Enforcement
- gate scripts/check_kimi_agent_level.py RUL-018
Verification
scripts/check_kimi_agent_level.py enforces both clauses over every tracked {.py,.sh,.bash,.toml,.yaml,.yml,.service,.json} file (markdown excluded), invoked from scripts/health_check.py as "Kimi agent-level (RUL-018)":
- D1 — nick discipline.
IRC_NICKbound to an identity this repo does not own. The repo ownsclaude,claude-out,swarm-supervisor;kimi/kimi_agent/codewhaleare other agents' identities. Binding forms covered: shell assignment,export, systemdEnvironment=, anos.environ.get("IRC_NICK", …)default, and an env dict passed to a subprocess. - D2 — no project-level kimi listener. A two-factor rule: a foreign-nick binding and a spawn of the repo IRC daemon (
setsid,nohup,systemd-run,subprocess.Popen, trailing&). One-hop shell indirection resolves; two-hop and command-substitution indirection deliberately SKIP rather than guess (false negative preferred to false positive).
The gate found and closed 4 real violations at introduction — this ruling was being broken by the repo it governs:
.kimi/hooks/session-start.sh:124,136,141— section 6 boundIRC_NICK=kimi_agentand spawnedscripts/_irc_watchdog.pyfrom this repo, i.e. a project-level kimi listener, plus a failure-branch message instructing the user to run it by hand. Fixed: section 6 is now a report-only check ofsystemctl --user is-active --quiet kimi-irc-bot.service.scripts/_irc_listen.py:37— defaultedIRC_NICKtocodewhale, another agent's identity, with a comment documenting the violation as policy. Fixed: defaults toclaude, matching_irc_send.py. Behaviour-neutral for the live path (the launcher~/.claude/hooks/irc_agents_hook.shexportsIRC_NICK=claudeexplicitly).
Post-fix the gate is green across 3171 tracked files with 0 false positives, measured — every legitimate fleet-nick mention stays silent: _irc_conversation.py's attribution map, _irc_send.py's allowlisted claude default, _irc_watchdog.py (spawns but binds no nick — D2's two factors), swarm_supervisor.py's DEFAULT_IRC_NICK, and the "kimi" Moonshot provider name in core/infra_config.py / drivers/* that a naive nick grep would flood on. The gate exempts only its own two files (its docstring must quote the violating lines verbatim); there is no blanket tests/ exemption, and a test hardcoding a foreign nick and spawning the watchdog still fails.
Related defect, since fixed: SESSION_START.md — the document this ruling cites as its source of authority — carried unresolved merge-conflict markers (<<<<<<< Updated upstream / ======= / >>>>>>> Stashed changes) at two hunks, leaving the IRC-discipline section unreadable as a spec. Resolved on 2026-08-05; grep -c '^<<<<<<<\|^>>>>>>>' SESSION_START.md is now 0. Note that no gate covers markdown (the RUL-018 gate excludes it deliberately, to avoid flagging prose that merely names a nick), so this class of corruption remains review-caught only.