Skip to content

[BUG] Gemini instructions are not compiled into GEMINI.md when installing a local package #2057

Description

@spawnrider

Describe the bug

When installing a local package with apm install, Gemini-specific instructions are not properly deployed, even when the package explicitly targets Gemini in apm.yml.

The installation generates or updates GEMINI.md with only a generation comment, but the actual instructions from the package are not included.

Also, AGENTS.md is not modified, which is expected in this case because the package target is gemini.

As a result, the package appears to be installed successfully, but Gemini does not receive the expected instructions.

To Reproduce

Steps to reproduce the behavior:

  1. Create or use a local APM package with the following apm.yml:
   name: gemini-ai-assets
   version: 1.0.0
   description: APM project for gemini-cli-config
   author: xxx

   # Which agent platforms to deploy to.
   # Resolution order: --target flag > this field > auto-detect from filesystem.
   # Accepted values: vscode, agents, copilot, claude, cursor, opencode, codex,
   # gemini, antigravity, windsurf, kiro, agent-skills, all
   targets:
     - gemini

   dependencies:
     apm: []
     mcp: []

   includes: auto

   scripts: {}

   compilation:
     agents_md:
       mode: managed_section
       start_marker: "<!-- apm:start -->"
       end_marker: "<!-- apm:end -->"
  1. Run the installation command with the local package:

    apm install <local-package-path>
  2. Check the generated files after installation.

  3. Observe that:

    • AGENTS.md is not modified, which is expected because the target is gemini.
    • GEMINI.md is created or updated.
    • GEMINI.md only contains a generation comment.
    • The expected Gemini instructions from the package are missing.

Expected behavior

When installing a local package that explicitly targets Gemini using:

targets:
  - gemini

apm install should include the package instructions in the generated GEMINI.md.

The generated GEMINI.md should contain the actual Gemini-specific instructions provided by the package, not only a generation comment.

Since the package targets Gemini, I do not expect AGENTS.md to be modified. However, I do expect GEMINI.md to contain the compiled instructions.

Environment (please complete the following information):

  • OS: Windows
  • APM Version: 0.24.0

Logs

No explicit error is displayed during installation.

Observed generated GEMINI.md content:

# GEMINI.md
<!-- Generated by APM CLI -->
<!-- Build ID: c1ee548a736b -->
<!-- APM Version: 0.23.1 -->

@./AGENTS.md

Install & compilation logs :

front [ dev][⏱ 8s]
➜ apm install
[>] Installing dependencies from apm.yml...
[!] Could not fetch org policy from xxx (HTTP 410 fetching policy from xxx/xxx/.github); proceeding without policy enforcement. Retry, check 
connectivity, or use --no-policy to bypass.
[i] Targets: gemini  (source: apm.yml)
  [+] ./../gemini-cli-config/build/gemini-ai-assets-1.0.0 (local)
  |-- Skill integrated -> .agents/skills/
  |-- 2 skill(s) integrated -> .agents/skills/

[*] Installed 1 APM dependency in 1.6s.


front [ dev][⏱ 14s]
➜ apm compile
[*] Starting context compilation...
[i] Targets: gemini  (source: apm.yml)
[i] Compiling for GEMINI.md + .gemini/commands/ + .gemini/skills/ + .gemini/settings.json (MCP/hooks) - apm.yml target
[i] Generated GEMINI.md (imports AGENTS.md)
[+] Compilation completed successfully!

The expected Gemini instructions are not included.

Additional context

This issue occurs when deploying/installing a local package using apm install.

The package configuration explicitly targets Gemini through apm.yml, and includes is set to auto.

The installation appears to complete successfully, but the Gemini instructions are silently omitted from the generated GEMINI.md. This makes the issue difficult to detect unless the generated file is manually inspected.

The expected behavior would be for local package instructions targeting Gemini to be compiled into GEMINI.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliCLI command surface, flags, help text (cross-cutting).area/multi-targetMulti-target deploy spec, target directory creation, agent surface routing.priority/highShips in current or next milestonestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions