#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024-2026 Lukasz Krzemien (biuro@softspark.eu)
# Source: https://github.com/softspark/ai-toolkit

"""Generate Augment AI rules from app/agents/*.md and app/skills/*/SKILL.md.

Augment uses ~/.augment/rules/*.md (user-level, always_apply) or
<project>/.augment/rules/*.md (workspace-level) with optional frontmatter.

Global install target: ~/.augment/rules/ai-toolkit.md
Local install target:  .augment/rules/ai-toolkit.md

Usage: python3 scripts/generate_augment.py > .augment/rules/ai-toolkit.md
"""
from __future__ import annotations

import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).resolve().parent))
from generator_base import render_generator

if __name__ == "__main__":
    render_generator({
        "title": "# AI Toolkit — Augment Rules",
        "header_lines": [
            "---",
            "type: always_apply",
            "description: AI development toolkit with specialized agents and skills",
            "---",
            "",
            "# Auto-generated by ai-toolkit — do not edit manually.",
            "# Regenerate: ai-toolkit update",
        ],
        "intro_template": (
            "This repository uses the ai-toolkit — a shared AI development toolkit"
            " with specialized agent personas and skills."
        ),
        "agents_section": "## Available Agent Personas",
        "agents_intro": "Apply the expertise of these agents when working on relevant tasks:",
        "agents_format": "bullets",
        "agents_level": "##",
        "skills_section": "## Available Skills",
        "skills_intro": "The following skills are available:",
        "skills_format": "bullets",
        "skills_level": "##",
        "trailing_newline_after_skills": True,
        "guidelines": ["general"],
    })
