Skip to content

AGENTS.md path is hardcoded — no config option to change target file #2

@Eric-Spr

Description

@Eric-Spr

Feature Request

The path where Kasper writes improvements is hardcoded as <projectRoot>/AGENTS.md. There is no configuration option to change this target path.

Current Behavior

In agents-md.js:

get agentsMdPath() {
    return join(this.projectRoot, "AGENTS.md");
}
projectRoot resolves to directory || process.cwd(). On systems where the user's home directory is the project root (e.g., when no git repo is active), Kasper writes to ~/AGENTS.md — which may conflict with a separate, more detailed AGENTS.md the user maintains in ~/.config/opencode/AGENTS.md.
Problem
Users who maintain a comprehensive AGENTS.md in .config/opencode/ have a separate file at ~/AGENTS.md that only Kasper writes to. The two files serve different purposes and can't be merged because the path is not configurable.
Proposed Solution
Add a agents_md_path config option to kasper.jsonc:
{
  "agents_md_path": ".config/opencode/AGENTS.md"  // relative to projectRoot, or absolute
}
Resolution logic (similar to existing state_dir):
get agentsMdPath() {
    if (this.config.agents_md_path) {
        return isAbsolute(this.config.agents_md_path)
            ? this.config.agents_md_path
            : join(this.projectRoot, this.config.agents_md_path);
    }
    return join(this.projectRoot, "AGENTS.md");
}

Environment

  • Plugin version: 1.1.0
  • OS: Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions