feat: team rules from a linked Altimate workspace in Claude Code sessions
SA
3h ago+407+407+012345678901234567890123456789-9-9-0123456789
Summary
Team rules from a linked Altimate workspace now apply in Claude Code sessions. This needs altimate-code with learn hook (AltimateAI/altimate-code#1626, which builds on the merged https://github.com/AltimateAI/altimate-code/pull/1605). Merge and release after #1626 ships in an altimate-code release. With an older altimate-code the hooks do nothing: the session-start output is dropped unless it is the hook's JSON.
- Workspace-rules hooks (
SessionStart,UserPromptSubmit,Stop) callaltimate-code learn hook <event>with the host's hook input on stdin.- Session start gives the agent the approved team rules, the number of proposals waiting, and the owner's reviews since the last session. The timeout is 15s, and the sync waits at most 3s.
- Prompt submit records a correction with no model call.
- Stop runs the post-turn check in the background: at most one drafting call per check round (a few per Stop at most), and none while 20 proposals are waiting. With no model configured for altimate-code, nothing is sent.
- Prompt submit and Stop run detached, and only where
.altimate-code/learn/workspace-rules/rules.jsonexists. - Every path exits 0.
/altimate-code:ruleslists the stored proposals, the team rules and your proposals' status, asks with Claude Code's question tool, and answers throughlearn proposals reply.- Docs: README "Team rules", CHANGELOG, and PRIVACY.md. PRIVACY used to say the plugin only has a static hook and reads no files. It now lists what the hooks read (your messages and the transcript, locally), what goes to the LLM provider (a redacted digest, for drafting), and what reaches the workspace (only proposals you send, and usage counts). The privacy wording needs a review. The effective date is unchanged.
- Version 1.2.0.
Test plan
-
bash tests/resolve-cli.sh(now coverscommands/rules.mdandlearncalls) -
bash tests/workspace-rules-hook.sh(new, stub CLI):- passes the input and host through;
- prints only the CLI's JSON;
- stays quiet when the CLI is missing, fails, or is too old;
- per-turn events don't run without rules state, run in the background, and work from a subdirectory.
- Checked against two broken versions of the script.
- Live run in Claude Code against a linked workspace, after the altimate-code release
🤖 Generated with Claude Code