[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "aipea"
version = "1.3.1"
description = "AI Prompt Engineer Agent — prompt preprocessing, security screening, and context enrichment for LLM systems"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
    { name = "Undercurrent Holdings", email = "dev@undercurrentholdings.com" },
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Typing :: Typed",
]
dependencies = [
    "httpx>=0.27.0",
]

[project.urls]
Homepage = "https://github.com/undercurrentai/AIPEA"
Repository = "https://github.com/undercurrentai/AIPEA"
Issues = "https://github.com/undercurrentai/AIPEA/issues"

[project.optional-dependencies]
cli = [
    "typer[all]>=0.12",
]
dev = [
    "pytest>=8.0",
    "pytest-asyncio>=0.23",
    "pytest-cov>=5.0",
    "ruff>=0.8.0",
    "mypy>=1.13",
    "typer[all]>=0.12",
]

[project.scripts]
aipea = "aipea.cli:app"

[tool.hatch.build.targets.wheel]
packages = ["src/aipea"]

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
    "unit: Unit tests (fast, no external deps)",
    "integration: Integration tests (may need network/services)",
    "slow: Slow tests (inference, large models)",
    "live: Live end-to-end tests (real components, no mocks)",
]

[tool.ruff]
line-length = 100
target-version = "py312"

[tool.ruff.lint]
select = [
    "E",    # pycodestyle errors
    "W",    # pycodestyle warnings
    "F",    # pyflakes
    "I",    # isort
    "N",    # pep8-naming
    "UP",   # pyupgrade
    "B",    # flake8-bugbear
    "S",    # flake8-bandit
    "T20",  # flake8-print
    "SIM",  # flake8-simplify
    "RUF",  # ruff-specific
    "C90",  # mccabe complexity
    "DTZ",  # flake8-datetimez
    "ICN",  # flake8-import-conventions
]

[tool.ruff.lint.mccabe]
max-complexity = 15

[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "S105", "S106", "S603", "S607"]  # Allow assert, hardcoded passwords, subprocess, partial paths in tests
"src/aipea/cli.py" = ["T20"]  # CLI uses Rich console.print, not stdlib print
"src/aipea/__main__.py" = ["T20"]  # Entry point

[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
show_error_codes = true

[tool.coverage.run]
source = ["src/aipea"]
branch = true

[tool.coverage.report]
fail_under = 75
show_missing = true

[tool.mutmut]
paths_to_mutate = ["src/"]

[tool.standards]
tier = "ENHANCED"
test_measurement = "traditional"
