Repository: ErikBjare/gptme
File: gptme/profiles.py (Python)

Code before:
            "You are in ISOLATED mode for processing potentially untrusted content. "
            "You have restricted capabilities:\n"
            "- Read-only file access\n"
            "- No network access\n"
            "- No file modifications\n"
            "- Analyze and report only\n"
        ),
        tools=["read", "ipython"],
        behavior=ProfileBehavior(read_only=True, no_network=True),
    ),
    "computer-use": Profile(
        name="computer-use",
        description=(
            "Computer-use specialist for visual UI testing via subagent. "
            "Run with --tools +computer so defaults remain available."
        ),
        system_prompt=(
            "You are in COMPUTER-USE mode, specialized for visual UI testing and "
            "desktop interaction. Prioritize efficient, evidence-first workflows:\n"
            "- Use the computer tool for screenshots, mouse, keyboard, and UI navigation\n"
            "- Keep screenshot loops focused and concise\n"
            "- Prefer returning structured findings (issues, repro steps, logs)\n"
            "- When used as a subagent, keep parent context lean by summarizing key results\n"
            "- Avoid unnecessary file modifications unless explicitly requested\n"
        ),
        tools=["computer", "screenshot", "vision", "browser", "shell", "read"],
        behavior=ProfileBehavior(),
    ),
}


def get_user_profiles_dir() -> Path:
    """Get the directory for user-defined profiles."""
    return get_config_dir() / "profiles"


def _parse_markdown_profile(path: Path) -> Profile:
    """Parse a markdown file with YAML frontmatter into a Profile.

    Format::

        ---
        name: my-profile
        description: A custom profile
        tools:
          - read
          - shell
        behavior:
          read_only: false
        ---


Review comment (suggestion):
`read` is redundant with `shell`

Probably doesn't need `browser`, just computer, vision, ipython, shell (and `complete`?).

Code after:
            "You are in ISOLATED mode for processing potentially untrusted content. "
            "You have restricted capabilities:\n"
            "- Read-only file access\n"
            "- No network access\n"
            "- No file modifications\n"
            "- Analyze and report only\n"
        ),
        tools=["read", "ipython"],
        behavior=ProfileBehavior(read_only=True, no_network=True),
    ),
    "computer-use": Profile(
        name="computer-use",
        description="Computer-use specialist for visual UI testing and desktop interaction",
        system_prompt=(
            "You are in COMPUTER-USE mode, specialized for visual UI testing and "
            "desktop interaction. Prioritize efficient, evidence-first workflows:\n"
            "- Use the computer tool for screenshots, mouse, keyboard, and UI navigation\n"
            "- Keep screenshot loops focused and concise\n"
            "- Prefer returning structured findings (issues, repro steps, logs)\n"
            "- When used as a subagent, keep parent context lean by summarizing key results\n"
            "- Avoid unnecessary file modifications unless explicitly requested\n"
        ),
        tools=["computer", "vision", "ipython", "shell"],
        behavior=ProfileBehavior(),
    ),
    "browser-use": Profile(
        name="browser-use",
        description="Browser-use specialist for web interaction and testing",
        system_prompt=(
            "You are in BROWSER-USE mode, specialized for web browsing and "
            "interaction. Prioritize efficient, evidence-first workflows:\n"
            "- Use the browser tool for navigating websites and web applications\n"
            "- Take screenshots to verify visual state and capture evidence\n"
            "- Prefer returning structured findings (issues, repro steps, observations)\n"
            "- When used as a subagent, keep parent context lean by summarizing key results\n"
            "- Avoid unnecessary file modifications unless explicitly requested\n"
        ),
        tools=["browser", "screenshot", "vision", "shell"],
        behavior=ProfileBehavior(),
    ),
}


def get_user_profiles_dir() -> Path:
    """Get the directory for user-defined profiles."""
    return get_config_dir() / "profiles"


def _parse_markdown_profile(path: Path) -> Profile:
    """Parse a markdown file with YAML frontmatter into a Profile.