agentleFS
FullFranFullFran/Agent-skills-POC/AGENTS.md

Agent-skills-POC

AGENTS.md1 starsChanged 10 months agoMITView on GitHub

  • Reads credentials
  • Installs packages

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

30 rules. About 0 are common, 16 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run CLI (chat): uv run python -m src.endpoints.cli.main

    line 7
  2. Very specific:

    No dedicated build step is defined.

    line 18
  3. Very specific:

    If you need a wheel/sdist, use uv build (only when explicitly requested).

    line 19
  4. Distinctive:

    Never hardcode provider keys or connection strings.

    line 35
  5. Very specific:

    No ad-hoc scripts in repo root.

    line 41
  6. Distinctive:

    Prefer Pydantic models for data structures and DTOs.

    line 46
  7. Very specific:

    Prefer absolute imports like from src.core....

    line 48
  8. Distinctive:

    Keep functions small and single-purpose.

    line 54
  9. Distinctive:

    Use Black for formatting and Ruff for linting.

    line 57
  10. Distinctive:

    Keep lines reasonably short.

    line 58
  11. Distinctive:

    Do not reformat unrelated files.

    line 59
  12. Distinctive:

    All I/O must be async (Mongo, embeddings, LLM calls, file ops).

    line 62
  13. Very specific:

    Always await async calls; avoid sync wrappers.

    line 63
  14. Very specific:

    Use asyncio for concurrency when needed.

    line 64
  15. Very specific:

    Use DTOs in src/core/dtos/ for cross-layer communication.

    line 69
  16. Very specific:

    When persisting Pydantic models, use .model_dump(exclude={"id"}, by_alias=True).

    line 70
  17. Distinctive:

    Avoid mutating SearchHit objects in RRF.

    line 71
  18. Distinctive:

    Prefer returning safe, user-facing messages when no hits are found.

    line 78
  19. Distinctive:

    Use pytest + pytest-asyncio for async tests.

    line 82
  20. Distinctive:

    Keep tests deterministic; do not hit real external APIs by default.

    line 85
  21. Distinctive:

    Use clear Markdown headings and lists.

    line 89
  22. Distinctive:

    Use backticks for file names, directories, and commands.

    line 90
  23. Distinctive:

    Avoid duplicating global rules in nested AGENTS.md files.

    line 91
  24. Very specific:

    Prefer modular skills in .agent/skills/ for new capabilities.

    line 94
  25. Very specific:

    If a workflow exists in .agent/workflows/, use it.

    line 95
  26. Very specific:

    Keep provider-specific logic out of src/services/.

    line 118
  27. Very specific:

    Never commit .env or credential files.

    line 133
  28. Very specific:

    Prefer .env.example for documenting required variables.

    line 134
  29. Distinctive:

    Keep external API calls behind interfaces for testability.

    line 135
  30. Distinctive:

    Keep context hygiene; avoid unnecessary docstrings.

    line 144

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent Guide for Hybrid-RAG-Agent

Purpose: concise, repo-specific rules for agentic coding tools.

Fast Commands (UV)

  • Setup venv + deps: uv venv && uv sync
  • Install editable (if needed): uv pip install -e .
  • Run CLI (chat): uv run python -m src.endpoints.cli.main
  • Run ingestion: uv run python -m src.endpoints.cli.ingest -d ./documents
  • Lint (repo): uv run ruff check .
  • Lint (single file): uv run ruff check src/services/rag_service.py
  • Format (repo): uv run black .
  • Format (single file): uv run black src/services/agent_service.py
  • Tests (all): uv run pytest -v
  • Tests (single file): uv run pytest tests/test_rag_service.py
  • Tests (single test): uv run pytest tests/test_rag_service.py::test_text_only_search

Build Notes

  • No dedicated build step is defined; package metadata lives in pyproject.toml.
  • If you need a wheel/sdist, use uv build (only when explicitly requested).

Runtime Entry Points

  • CLI main: src/endpoints/cli/main.py
  • CLI ingestion: src/endpoints/cli/ingest.py
  • App wiring: src/bootstrap.py

Repo Architecture (Clean RAG)

  • Domain layer: src/core/ (Pydantic schemas + interfaces, no infra deps).
  • Application layer: src/services/ (business logic, orchestration).
  • Infrastructure: src/infrastructure/ (Mongo/Supabase/OpenAI/Docling).
  • Endpoints: src/endpoints/ (CLI entry points via Rich).

Configuration

  • Environment lives in .env (see .env.example).
  • Settings should flow through src/settings.py (Pydantic Settings).
  • Never hardcode provider keys or connection strings.

Architecture Rules (from .agent/rules/architecture.md)

  • Code against interfaces in src/core/interfaces/.
  • Services receive dependencies via constructor injection.
  • Infrastructure code stays in src/infrastructure/ only.
  • No ad-hoc scripts in repo root; use scripts/.

Code Style (Python)

  • Python 3.10+ only; keep code type-safe and explicit.
  • Type hints are required for all functions and methods.
  • Prefer Pydantic models for data structures and DTOs.
  • Imports order: standard library, third-party, local; blank line between groups.
  • Prefer absolute imports like from src.core....
  • Naming:
    • Classes: PascalCase.
    • Functions/vars: snake_case.
    • Constants: UPPER_SNAKE_CASE.
    • Modules/files: snake_case.
  • Keep functions small and single-purpose; favor clarity over cleverness.

Formatting + Linting Expectations

  • Use Black for formatting and Ruff for linting.
  • Keep lines reasonably short; prefer readability over dense expressions.
  • Do not reformat unrelated files.

Async + I/O Rules

  • All I/O must be async (Mongo, embeddings, LLM calls, file ops).
  • Always await async calls; avoid sync wrappers.
  • Use asyncio for concurrency when needed.
  • Clean up resources (close() or context managers) where appropriate.

Data Modeling Conventions

  • Core schemas live in src/core/schemas/ and are Pydantic models.
  • Use DTOs in src/core/dtos/ for cross-layer communication.
  • When persisting Pydantic models, use .model_dump(exclude={"id"}, by_alias=True).
  • Avoid mutating SearchHit objects in RRF; create new instances.

Error Handling + Logging

  • Catch specific exceptions; avoid bare except.
  • Log with context: logger.exception(...) for unexpected failures.
  • Raise clear, typed errors (ValueError, ConnectionFailure, etc.).
  • Mongo aggregation errors should follow patterns in .claude/reference/mongodb-patterns.md.
  • Prefer returning safe, user-facing messages when no hits are found.

Testing

  • Tests live in tests/ mirroring src/ structure.
  • Use pytest + pytest-asyncio for async tests.
  • Mark async tests with @pytest.mark.asyncio.
  • Favor mocks in tests/conftest.py for external services.
  • Keep tests deterministic; do not hit real external APIs by default.

Documentation Rules (from .agent/rules/)

  • New technical docs go in docs/ only.
  • Use clear Markdown headings and lists; keep docs under ~500 lines.
  • Use backticks for file names, directories, and commands.
  • Avoid duplicating global rules in nested AGENTS.md files.

Skill System (Agentic Rules)

  • Prefer modular skills in .agent/skills/ for new capabilities.
  • If a workflow exists in .agent/workflows/, use it.
  • Auto-invoke skills when triggers match:
    • New skills: skill-creator.
    • New workflows: workflow-creator.
    • Skill metadata sync: run scripts/sync-skills.sh.
    • Technical docs: docs-standard.
    • RAG DB changes: supabase or mongodb skills.

Core Mandates (from prior AGENTS.md)

  • Modularity first: favor skills in .agent/skills/ over ad-hoc scripts.
  • Context hygiene: follow .agent/rules/docs-culture.md for documentation standards.
  • Proactive skill loading: check available skills and load when relevant.

Essential Skills (quick reference)

  • docs-standard: technical documentation standard.
  • skill-creator: bootstrap new skills.
  • mermaid-diagrams: architecture diagrams.
  • supabase / mongodb: DB-specific RAG logic.
  • docling: ingestion and parsing workflows.

Service Orchestration Conventions

  • Services orchestrate flows using interfaces, not concrete implementations.
  • Injection happens in src/bootstrap.py; do not bypass it.
  • Keep provider-specific logic out of src/services/.

Repository Conventions Observed

  • Logging via logging.getLogger(__name__).
  • Pydantic models use .model_dump(...) with by_alias=True when persisting.
  • RRF logic should avoid mutating original hits.
  • CLI uses Rich; keep UX clean and streaming-friendly.

RAG Behavior Guidelines

  • Query reformulation lives in services, not endpoints.
  • RRF must create new SearchHit instances (no in-place mutation).
  • Preserve semantic_score and text_score on fused results.
  • Context building should respect max lengths to avoid prompt bloat.

Secrets and Safety

  • Never commit .env or credential files.
  • Prefer .env.example for documenting required variables.
  • Keep external API calls behind interfaces for testability.

Behavior Triggers (Legacy Guide)

  • RAG ingestion or retrieval changes: load docling + DB skill.
  • Repetitive actions: propose a workflow in .agent/workflows/.

Interaction Style for Agents

  • Be concise and direct; run safe commands proactively.
  • Validate changes with appropriate tests or checks.
  • Keep context hygiene; avoid unnecessary docstrings.

External Rules Files

  • Cursor rules: none found in .cursor/rules/ or .cursorrules.
  • Copilot rules: none found in .github/copilot-instructions.md.

Available Skills

SkillDescriptionPath
ai-orchestration-patternsApply AI orchestration patterns (routing, tool use, ReAct, fallbacks) to design reliable agent flows..agents/skills/ai-orchestration-patterns/SKILL.md
architecture-decision-recordHelp the team document and maintain Architecture Decision Records (ADRs)..agents/skills/architecture-decision-record/SKILL.md
clean-architectureApply Clean Architecture boundaries, dependency rules, and layer responsibilities when designing or changing code in this repository..agents/skills/clean-architecture/SKILL.md
doclingExpert guidance on document processing with Docling and audio transcription with Whisper..agents/skills/docling/SKILL.md
docs-standardStandard for creating technical documentation in this repository. Use this when writing new documentation in docs/ to ensure consistent hierarchy and formatting..agents/skills/docs-standard/SKILL.md
mermaid-diagramsExpert guidance on creating accurate, visually polished Mermaid diagrams for architecture documentation..agents/skills/mermaid-diagrams/SKILL.md
mongodbExpert guidance on MongoDB implementation for RAG, including aggregation pipelines and search patterns..agents/skills/mongodb/SKILL.md
pydantic-aiExpert guidance on building agents and tools with Pydantic AI..agents/skills/pydantic-ai/SKILL.md
python-async-patternsBest practices for async Python code, avoiding common pitfalls like await precedence bugs and sync-in-async anti-patterns..agents/skills/python-async-patterns/SKILL.md
skill-creatorCreate and initialize new Agent Skills following the agentskills.io standard. Use this when you need to modularize a new capability for the AI agent..agents/skills/skill-creator/SKILL.md
software-architectureGuide architecture decisions, document tradeoffs, and align designs with system goals and constraints..agents/skills/software-architecture/SKILL.md
supabaseExpert guidance on Supabase/PostgreSQL implementation for RAG, including pgvector semantic search and full-text search..agents/skills/supabase/SKILL.md
workflow-creatorCreate new Antigravity workflows to automate repetitive tasks. Use this when the user wants to formalize a multi-step process into an automated workflow..agents/skills/workflow-creator/SKILL.md

Workflows (Slash Commands)

WorkflowDescriptionPath
commitCreate a new git commit for uncommitted changes following atomic standards.agents/workflows/commit.md
create-skillAutomated workflow to create a new AI Skill.agents/workflows/create-skill.md
create-workflowAutomated workflow to create a new slash command workflow.agents/workflows/create-workflow.md
debugStructured debugging process to identify and fix bugs.agents/workflows/debug.md
document-architectureCreate architecture diagrams using the mermaid-diagrams skill.agents/workflows/document-architecture.md
init-projectInitialize the RAG project environment.agents/workflows/init-project.md
reviewPerform a deep code review of pending changes.agents/workflows/review.md

Personas

PersonaDescriptionPath
code-ninjaConcise, code-first persona for fast implementation..agents/agents/code-ninja.md
senior-architectSenior Architect persona - helpful first, challenging when it matters..agents/agents/senior-architect.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.