メインコンテンツへスキップ
D

dsh-plugin-antigravity-rules

domush/dsh-plugin-antigravity-rules

Loads Google Antigravity rules from ~/.agents/rules and the workspace's .agents/rules into the system prompt: always-on rules in full, the rest as a catalog the model can load with the antigravity_rule tool, or that activates when a touched file matches a rule's globs. The rules are prompt guidance rather than hard enforcement, and the model can toggle them off with the same tool. Settings are written to .agents/rules/settings.json in the workspace.

インストール

dsh plugin --profile web add github:domush/dsh-plugin-antigravity-rules

README

dsh-plugin-antigravity-rules

npm version DSH Plugin License: MIT

Native Google Antigravity engineering rules loader and runtime enforcement engine for DeepSeek Harness.


image

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.json file. All .agents/rules/*.md files remain completely read-only and fully interoperable with Antigravity environments.
  • Native YAML Frontmatter Parsing: Understands Antigravity frontmatter attributes (name, trigger, description, globs, and priority).

Key Features

  1. 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.

  2. 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.

  3. Automated Glob & Domain File Activation: Monitors file touch operations (read, write, edit). When a touched file matches a rule's explicit globs or standard domain patterns (e.g. Assets/UI/** -> ui-standards), the relevant rule is dynamically activated for the remainder of the session.

  4. antigravity_rule Tool: 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)
  5. 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.
  6. 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)

  1. Open the DeepSeek Harness Web UI and navigate to Settings → Plugins.
  2. Click the "Add Plugin" button.
  3. Paste in the plugin name:
    dsh-plugin-antigravity-rules
    
  4. 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

OptionTypeDefaultDescription
enabledbooleantrueMaster switch for Google Antigravity rules support.
rulesDirstring".agents/rules"Relative workspace path to rules directory.
includeAlwaysOnInSystemPromptbooleantrueAutomatically inject always-on rules into system prompt.
includeCatalogInSystemPromptbooleantrueInject domain catalog into system prompt.
autoActivateOnGlobMatchbooleantrueAuto-activate rules when matching files are accessed.

License

MIT © 2026 Phillip Webber (Domush)

関連プラグイン