Skip to content

Agents: shared instructions with append or replace, same config for every agent - #54

Merged
andrewthomaslee merged 1 commit into
mainfrom
agent-instructions-parity
Nov 15, 2026
Merged

andrewthomaslee merged 1 commit into
mainfrom
agent-instructions-parity

Conversation

@andrewthomaslee

Copy link
Copy Markdown
Member

Summary

instructionsFor agent =
  machine context            (homeSpec.agents.machineContext)
  ++ org ground rules        (inputs.skills.lib.groundRules, groundRules.enable = true)
  ++ instructions.text       (shared, types.lines: merges users/shared + profile)
  ++ <agent>.instructions.text
mode = <agent>.instructions.mode or instructions.mode   ("append" default)
agent append replace
claude ~/.claude/CLAUDE.md output style home-manager (keep-coding-instructions: false) + outputStyle in settings.json
pi ~/.pi/agent/AGENTS.md ~/.pi/agent/SYSTEM.md
kimi ~/.kimi-code/AGENTS.md ~/.kimi-code/SYSTEM.md
opencode ~/.config/opencode/AGENTS.md refused by an assertion (no config-file replacement in v2)

Same config for every agent:

-mcp.varlock-docs → opencode only
+remote MCP servers → opencode {type=remote}, pi {url}, kimi + claude {type=http}
+                     (not Claude Desktop Chat: local servers only there)
-claude additionalDirectories = ["/nix/store"]
+claude additionalDirectories = ["/nix/store" "/tmp"]   # opencode already reads /tmp

Removed (mkRemovedOptionModule with a pointer to the new options): claude.claudeMd, pi.appendSystemMd, kimi.systemMd. Their only user was the deleted pkgs code-agent image; home sets none of them.

Input bumps: skills (#23, #24: ground rules, org standards router) and org-pkgs (#38, #39: no code-agent image, worktree, org.check.extraCommands), plus sync-locks.

Evidence

  • New checks.agents-instructions: ground rules and shared text in all four agents' files, per-agent text stays per agent, groundRules.enable = false drops the rules, varlock-docs in kimi/pi/opencode/claude sync, /tmp for claude, replace writes pi/kimi SYSTEM.md and the claude output style, opencode replace fails its assertion.
  • Existing agents-wiring, agents-independent, agents-machine-context pass unchanged.
  • devenv shell -- bash -c 'fmt && check' → all checks passed! (one listed, non-denied stdenv.isDarwin deprecation warning).

Merge Danger

Door: two-way

Blast Radius: agent prompts

After home bumps modules, every agent's instructions file gains the ground rules (~1.4k chars). Users can turn them off with groundRules.enable = false. Claude, pi and kimi gain the varlock-docs server where it is enabled (netsa). Merge order: after skills #24 and pkgs #38/#39 (merged); home follows.

🤖 Generated with Claude Code

…where

homeSpec.agents.instructions.{mode,text} (and per agent
homeSpec.agents.<agent>.instructions) replaces claude.claudeMd,
pi.appendSystemMd and kimi.systemMd. Every agent gets the machine
context, the org ground rules (skills lib.groundRules, groundRules.enable),
the user's text and then its own text. "append" adds them to the built-in
system prompt; "replace" puts them in its place: pi and kimi SYSTEM.md,
a claude output style. opencode has no replacement and is refused.

Remote MCP servers (varlock docs) now reach claude, pi and kimi as well
as opencode, and claude reads /tmp like opencode. Bumps skills (ground
rules, consolidated org skills) and org-pkgs (no code-agent image,
worktree helper, check extraCommands).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewthomaslee
andrewthomaslee enabled auto-merge (squash) November 15, 2026 02:51
@andrewthomaslee
andrewthomaslee merged commit 5bcf39a into main Nov 15, 2026
3 checks passed
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.

1 participant