dsh-plugin-antigravity-rules
domush/dsh-plugin-antigravity-rules
把 ~/.agents/rules 和工作区 .agents/rules 里的 Google Antigravity 规则加进系统提示:always_on 规则全文注入,其余以目录形式列出,模型可用 antigravity_rule 工具加载,或在触及的文件匹配规则 glob 时自动激活。规则只是提示词层面的指引,不是强制执行,模型也能用同一个工具把它们关掉。设置写在工作区的 .agents/rules/settings.json。
安装
dsh plugin --profile web add github:domush/dsh-plugin-antigravity-rulesREADME
dsh-plugin-antigravity-rules
Native Google Antigravity engineering rules loader and runtime enforcement engine for DeepSeek Harness.
Overview & Antigravity Compatibility
dsh-plugin-antigravity-rules brings first-class support for Google Antigravity rules to DeepSeek Harness:
- 100% Compatible with Existing Antigravity Installs: Operates directly on your existing
.agents/rules/workspace directory and~/.agents/rules/user directory without converting, modifying, or duplicating files. - Zero Disk Mutation: Rule enablement and toggle preferences are stored in an auxiliary
.agents/rules/settings.jsonfile. All.agents/rules/*.mdfiles remain completely read-only and fully interoperable with Antigravity environments. - Native YAML Frontmatter Parsing: Understands Antigravity frontmatter attributes (
name,trigger,description,globs, andpriority).
Key Features
-
Always-On Rules Enforcement (
trigger: always_on): Automatically loads universal engineering invariants (e.g.coding-standards.md) and injects them directly into the agent's system prompt on every turn—preventing architectural drift without manual file inspection. -
Domain Rules Catalog (
trigger: model_decision): Catalogs all domain-specific standards (e.g.,ui-standards.md,assets-standards.md,testing-standards.md) with their descriptions and file paths in the system prompt so the agent is continuously aware of governing domain rules. -
Automated Glob & Domain File Activation: Monitors file touch operations (
read,write,edit). When a touched file matches a rule's explicitglobsor standard domain patterns (e.g.Assets/UI/**->ui-standards), the relevant rule is dynamically activated for the remainder of the session. -
antigravity_ruleTool: Provides agents and users with a dedicated tool to read, list, and toggle rules on demand:antigravity_rule(action: "list")antigravity_rule(name: "ui-standards")antigravity_rule(action: "toggle", name: "tactics-standards", enabled: false)
-
Web Settings UI: Adds a dedicated Rules tab to the DeepSeek Harness Settings page featuring:
- Live rule status (Invariant vs Domain).
- Real-time search across rule names, file paths, and descriptions.
- Interactive enable/disable switches with optimistic UI updates.
-
Hot-Reloading: Monitors file modification timestamps (
mtime) and refreshes rules in-memory immediately when edited on disk.
Installation
In DeepSeek Harness UI (No Command Line Needed)
- Open the DeepSeek Harness Web UI and navigate to Settings → Plugins.
- Click the "Add Plugin" button.
- Paste in the plugin name:
dsh-plugin-antigravity-rules - Click Install. The plugin will be fetched from NPM and activated immediately.
Via DeepSeek Harness CLI
Run the plugin install command in your terminal:
dsh plugin install dsh-plugin-antigravity-rules
Via Profile Configuration (package.json)
Add the plugin to your DeepSeek Harness profile dependencies:
{
"dependencies": {
"dsh-plugin-antigravity-rules": "^1.0.0"
},
"dsh": {
"profile": {
"bundles": [
"dsh-plugin-antigravity-rules"
]
}
}
}
Configuration
In your profile's cordis.patch.yml:
- insert:
- id: antigravity-rules
name: 'dsh-plugin-antigravity-rules'
config:
enabled: true
rulesDir: '.agents/rules'
includeAlwaysOnInSystemPrompt: true
includeCatalogInSystemPrompt: true
autoActivateOnGlobMatch: true
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true | Master switch for Google Antigravity rules support. |
rulesDir | string | ".agents/rules" | Relative workspace path to rules directory. |
includeAlwaysOnInSystemPrompt | boolean | true | Automatically inject always-on rules into system prompt. |
includeCatalogInSystemPrompt | boolean | true | Inject domain catalog into system prompt. |
autoActivateOnGlobMatch | boolean | true | Auto-activate rules when matching files are accessed. |
License
MIT © 2026 Phillip Webber (Domush)