[GH-ISSUE #35] Pass system prompt as rules #31

Closed
opened 2026-02-27 15:38:01 +03:00 by kerem · 8 comments
Owner

Originally created by @LibertX on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/35

What do you want?

Hello !

Per https://github.com/NikkeTryHard/zerogravity/issues/28, you said it's not possible to remove system prompt for stealth reasons.

An alternative I use on the official Antigravity client is to put the system prompt in ~/.gemini/GEMINI.md (global rules files) and it works pretty much as if it was a real system prompt.

Could you implement it so system prompt passed by clients (eg. Open WebUI) are implemented as rules ?

Thanks

Use Case

Making system prompts works better (eg. jailbreaks).

Alternatives Considered

No response

Originally created by @LibertX on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/35 ### What do you want? Hello ! Per https://github.com/NikkeTryHard/zerogravity/issues/28, you said it's not possible to remove system prompt for stealth reasons. An alternative I use on the official Antigravity client is to put the system prompt in `~/.gemini/GEMINI.md` (global rules files) and it works pretty much as if it was a real system prompt. Could you implement it so system prompt passed by clients (eg. Open WebUI) are implemented as rules ? Thanks ### Use Case Making system prompts works better (eg. jailbreaks). ### Alternatives Considered _No response_
kerem 2026-02-27 15:38:01 +03:00
Author
Owner

@NikkeTryHard commented on GitHub (Feb 20, 2026):

nice idea i will reverse engineer further and see what i find. thx for the suggestion!

<!-- gh-comment-id:3932291780 --> @NikkeTryHard commented on GitHub (Feb 20, 2026): nice idea i will reverse engineer further and see what i find. thx for the suggestion!
Author
Owner

@DarKWinGTM commented on GitHub (Feb 20, 2026):

I can confirm that on Claude Code + CCS (Claude Code Switch), the system prompt / rules / context / skill mechanism works seamlessly without any context loss.

Here's how the environment is structured:

  • System Prompt: Fully preserved and applied throughout the session
  • Rules (~/.claude/rules/*.md): Loaded as global instructions — currently running 21 rules files covering everything from anti-hallucination, document control, security boundaries, to output safety
  • Context: Persistent context via conversation logs, knowledge items (KIs), and MCP memory tools — no context degradation even across long sessions
  • Skills: User-invocable skills (e.g., /commit, /sync-memora, /ui-ux-pro-max) are loaded and executable on demand

The key architectural insight is that rules files act as a functional equivalent to system prompts — they define the AI's behavioral constraints, persona, and operational standards. On Claude Code, this is achieved through ~/.claude/rules/ (global) and .claude/rules/ (project-specific) directories, which are injected as part of the context window.

This approach effectively separates the environment definition (rules/context/prompt) from the conversation flow, allowing full customization without losing any behavioral context.

If zerogravity could implement a similar pattern — passing client-provided system prompts as rules/context rather than trying to inject them into the system prompt field directly — it would likely achieve the same result: full behavioral control without the stealth/detection tradeoffs.

<!-- gh-comment-id:3932292864 --> @DarKWinGTM commented on GitHub (Feb 20, 2026): I can confirm that on **Claude Code + CCS (Claude Code Switch)**, the system prompt / rules / context / skill mechanism works seamlessly without any context loss. Here's how the environment is structured: - **System Prompt**: Fully preserved and applied throughout the session - **Rules** (`~/.claude/rules/*.md`): Loaded as global instructions — currently running **21 rules files** covering everything from anti-hallucination, document control, security boundaries, to output safety - **Context**: Persistent context via conversation logs, knowledge items (KIs), and MCP memory tools — no context degradation even across long sessions - **Skills**: User-invocable skills (e.g., `/commit`, `/sync-memora`, `/ui-ux-pro-max`) are loaded and executable on demand The key architectural insight is that **rules files act as a functional equivalent to system prompts** — they define the AI's behavioral constraints, persona, and operational standards. On Claude Code, this is achieved through `~/.claude/rules/` (global) and `.claude/rules/` (project-specific) directories, which are injected as part of the context window. This approach effectively separates the **environment definition** (rules/context/prompt) from the **conversation flow**, allowing full customization without losing any behavioral context. If zerogravity could implement a similar pattern — passing client-provided system prompts as rules/context rather than trying to inject them into the system prompt field directly — it would likely achieve the same result: **full behavioral control without the stealth/detection tradeoffs**.
Author
Owner

@MIKUSCAT commented on GitHub (Feb 20, 2026):

good idea!i will also notice it

<!-- gh-comment-id:3932311729 --> @MIKUSCAT commented on GitHub (Feb 20, 2026): good idea!i will also notice it
Author
Owner

@m1a8h7sg90i commented on GitHub (Feb 21, 2026):

+1 Love this idea, the antigravity system prompt is huge, it lobotomizes Opus from my experience so this would be excellent improvement

<!-- gh-comment-id:3938874688 --> @m1a8h7sg90i commented on GitHub (Feb 21, 2026): +1 Love this idea, the antigravity system prompt is huge, it lobotomizes Opus from my experience so this would be excellent improvement
Author
Owner

@NikkeTryHard commented on GitHub (Feb 22, 2026):

Implemented in v1.3.3. System prompts are now injected as <user_rules> -- the same format the LS uses for GEMINI.md rules. Models treat this as legitimate user configuration and obey it, unlike the old <SYSTEM_INSTRUCTION_OVERRIDE> tag which they detected as prompt injection.

Duplicate of #42 -- both fixed by the same commit.

<!-- gh-comment-id:3940773150 --> @NikkeTryHard commented on GitHub (Feb 22, 2026): Implemented in v1.3.3. System prompts are now injected as `<user_rules>` -- the same format the LS uses for GEMINI.md rules. Models treat this as legitimate user configuration and obey it, unlike the old `<SYSTEM_INSTRUCTION_OVERRIDE>` tag which they detected as prompt injection. Duplicate of [#42](https://github.com/NikkeTryHard/zerogravity/issues/42) -- both fixed by the same commit.
Author
Owner

@MIKUSCAT commented on GitHub (Feb 22, 2026):

respect and appreciate

<!-- gh-comment-id:3940776836 --> @MIKUSCAT commented on GitHub (Feb 22, 2026): respect and appreciate
Author
Owner

@terryops commented on GitHub (Feb 23, 2026):

@NikkeTryHard Now it works, but not in a perfect way. The thing chain is very much displayed and sent to the user while using openclaw, and also it not only focus on the last question, but also the last several sentences

<!-- gh-comment-id:3942485961 --> @terryops commented on GitHub (Feb 23, 2026): @NikkeTryHard Now it works, but not in a perfect way. The thing chain is very much displayed and sent to the user while using openclaw, and also it not only focus on the last question, but also the last several sentences
Author
Owner

@NikkeTryHard commented on GitHub (Feb 23, 2026):

@NikkeTryHard Now it works, but not in a perfect way. The thing chain is very much displayed and sent to the user while using openclaw, and also it not only focus on the last question, but also the last several sentences

open a separate issue as i need to reproduce it. follow the bug report format

<!-- gh-comment-id:3942627185 --> @NikkeTryHard commented on GitHub (Feb 23, 2026): > [@NikkeTryHard](https://github.com/NikkeTryHard) Now it works, but not in a perfect way. The thing chain is very much displayed and sent to the user while using openclaw, and also it not only focus on the last question, but also the last several sentences open a separate issue as i need to reproduce it. follow the bug report format
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zerogravity#31
No description provided.