agentleFS
caipe-iocaipe-io/ai-platform-engineering/AGENTS.md

ai-platform-engineering

AGENTS.md422 starsChanged 2 months agoApache-2.0View on GitHub

Start with the narrowest owning module; do not add a parallel implementation until you have checked the shared locations below. Tests live beside their component (**/tests/, **/__tests__/) unless they exercise a cross-component contract. Repository-wide checks are in tests/; RBAC integration and browser coverage is in tests/rbac/ and ui/e2e/rbac/. Each component has its own environment variables - see env.example in ui/ and READMEs in ai_platform_engineering/knowledge_bases/rag/. AI agents operating in this repository must follow these rules on every commit:

  • Reads credentials

The file

Show its rules and text

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

24 rules. About 0 are common, 15 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Start with the narrowest owning module.

    line 27
  2. Very specific:

    Architecture & concepts: - Keep updated in docs/

    line 50
  3. Distinctive:

    Configuration & code details: - Document in component READMEs

    line 51
  4. Distinctive:

    Agent instructions: - Keep this file (AGENTS.md) up-to-date

    line 52
  5. Distinctive:

    Prefer bullets over paragraphs.

    line 58
  6. Distinctive:

    Prefer diagrams over long explanations.

    line 59
  7. Distinctive:

    No wall of text.

    line 60
  8. Distinctive:

    Remove words that do not change decisions.

    line 61
  9. Very specific:

    Use an explicit human DCO on every commit: - Every commit must include the Signed-off-by trailer that the human contributor explicitly …

    line 68
  10. Distinctive:

    Do not invent identities: - Use only a DCO identity explicitly provided by the human contributor.

    line 69
  11. Very specific:

    Branch naming: - Use prebuild/ prefix for CI to build Docker images

    line 76
  12. Very specific:

    PR descriptions: - Follow the template in .github/pull_request_template.md

    line 78
  13. Distinctive:

    Never apply a review suggestion with GitHub's "Commit suggestion" button.

    line 88
  14. Distinctive:

    Do not resolve review threads on a pull request you do not own.

    line 91
  15. Very specific:

    Create follow-up work as GitHub Issues in caipe-io/ai-platform-engineering.

    line 98
  16. Very specific:

    Do not use repo-local Beads or bd issue tracking.

    line 100
  17. Distinctive:

    Before committing code changes, run relevant checks:

    line 104
  18. Very specific:

    When changing docker-compose.yaml, docker-compose.dev.yaml, .env.example, release image tags, Compose profiles, Keycloak/OpenFGA/RAG …

    line 110
  19. Distinctive:

    Do not add Slack/Webex bots to that default path.

    line 120
  20. Distinctive:

    Imports at top: - All imports must be at the top of the file, unless otherwise specified

    line 124
  21. Distinctive:

    Error handling: - Use specific exceptions, log errors with context, don't silently swallow exceptions

    line 126
  22. Distinctive:

    Never use real or deployment-specific names in tests, fixtures, examples, docs, seeds, screenshots, or generic source defaults.

    line 131
  23. Very specific:

    Use neutral identifiers such as primary, secondary, example, test-user, and example-bot.

    line 133
  24. Very specific:

    Use reserved domains such as example.com, example.org, and example.test for URLs and email addresses.

    line 134

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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 Instructions

Project Structure

ai_platform_engineering/   # Python backend
  mcp/                     # Per-tool MCP servers (GitHub, ArgoCD, etc.)
  dynamic_agents/          # Dynamic agents runtime (FastAPI, MongoDB, AG-UI/SSE)
  integrations/            # Slack and Webex bot integrations
  autonomous_agents/       # Scheduled and event-driven autonomous tasks
  audit_service/           # Audit-event service
  scheduler/               # Scheduler service
  cron-runner/             # Cron job runner
  knowledge_bases/rag/     # RAG server, ingestors, graphrag, ontology
  skills_middleware/       # Skill scanning / catalog middleware
  utils/                   # Shared utilities
ui/                        # Next.js frontend
docs/                      # Documentation site (Docusaurus)
docker-compose*.yaml       # Canonical Docker Compose configurations
tests/                     # Repo-level + RBAC tests
scripts/                   # Utility scripts
charts/                    # Helm charts

Find the Canonical Implementation

Start with the narrowest owning module; do not add a parallel implementation until you have checked the shared locations below.

NeedStart hereReuse before adding new code
UI page or API routeui/src/app/ui/src/components/, ui/src/lib/, ui/src/store/
UI componentui/src/components/ui/src/components/ui/ and ui/src/components/shared/, then an existing component in the same feature area
UI selection controlui/src/components/ui/{select,searchable-picker}.tsxFollow docs/docs/ui/selection-controls.md; reuse a domain picker before adding a base or custom listbox
UI state or browser dataui/src/store/Existing store and ui/src/lib/ helpers
MCP integrationai_platform_engineering/mcp/<provider>/ai_platform_engineering/mcp/common/
Slack or Webex behaviorai_platform_engineering/integrations/{slack_bot,webex_bot}/The BFF/API contract and shared auth utilities
Dynamic/custom-agent runtimeai_platform_engineering/dynamic_agents/Its src/ modules and tests
RAG/ingestionai_platform_engineering/knowledge_bases/rag/common/, server/, or ingestors/ as applicable
Authentication, authorization, or audit helpersai_platform_engineering/utils/{auth,audit_backends}/, ui/src/lib/authz/, ui/src/lib/rbac/, and ui/src/lib/audit/Use the existing domain boundary; do not add direct OpenFGA checks outside an approved adapter

Tests live beside their component (**/tests/, **/__tests__/) unless they exercise a cross-component contract. Repository-wide checks are in tests/; RBAC integration and browser coverage is in tests/rbac/ and ui/e2e/rbac/.

Each component has its own environment variables - see env.example in ui/ and READMEs in ai_platform_engineering/knowledge_bases/rag/.

Documentation

  • Architecture & concepts - Keep updated in docs/
  • Configuration & code details - Document in component READMEs
  • Agent instructions - Keep this file (AGENTS.md) up-to-date

Docs & Spec Rules

  • Reading is as hard as writing.
  • Optimize for the next reader.
  • Prefer bullets over paragraphs.
  • Prefer diagrams over long explanations.
  • No wall of text.
  • Remove words that do not change decisions.

DCO Policy

AI agents operating in this repository must follow these rules on every commit:

  1. No AI sign-off - Signed-off-by is a human DCO certification. AI agents must never invent, assume, or add this trailer on their own.
  2. Use an explicit human DCO on every commit - Every commit must include the Signed-off-by trailer that the human contributor explicitly provided.
  3. Do not invent identities - Use only a DCO identity explicitly provided by the human contributor.

Git Guidelines

  • Conventional Commits for commits and PR titles - Format: type(scope): description
    • Types: feat, fix, docs, refactor, test, chore
    • Example: feat(rag): add userinfo caching
  • Branch naming - Use prebuild/ prefix for CI to build Docker images
    • Example: prebuild/feat/rag-batch-job-status
  • PR descriptions - Follow the template in .github/pull_request_template.md

Pull Requests and Review

  • One logical change per PR. Aim for under 500 changed lines of hand-written code; keep refactors out of behaviour changes.
  • The description states why the change exists, links the issue, and says how it was verified.
  • Disclose AI assistance in the description. Never add AI co-author or assisted-by trailers - see DCO Policy.
  • Never apply a review suggestion with GitHub's "Commit suggestion" button; the commit it creates names the suggestion's author as a co-author who has not signed off, which fails DCO. Apply it locally.
  • Do not resolve review threads on a pull request you do not own.
  • Full policy: docs/docs/repo-ops/code-review.md

Issue Tracking

This project uses GitHub Issues for issue tracking.

  • Create follow-up work as GitHub Issues in caipe-io/ai-platform-engineering.
  • Reference related issues in PR descriptions when applicable.
  • Do not use repo-local Beads or bd issue tracking.

Quality Gates

Before committing code changes, run relevant checks:

  • Python: uv run ruff check, uv run pytest (always use uv run to ensure virtual env)
  • UI: nvm use first (if available), then npm run lint, npm run build

Docker Compose First Install

When changing docker-compose.yaml, docker-compose.dev.yaml, .env.example, release image tags, Compose profiles, Keycloak/OpenFGA/RAG defaults, or first-launch UX, follow .claude/skills/docker-compose-first-install/SKILL.md. The docker-compose.yaml + .env.example path must work for a first-time OSS user with the minimal profiles:

mcp-servers,caipe-ui-prod,rbac,dynamic-agents,rag,caipe-mongodb,web_ingestor

Do not add Slack/Webex bots to that default path.

Code Style

  • Imports at top - All imports must be at the top of the file, unless otherwise specified
  • Type hints required - Python functions should have type hints for parameters and return values
  • Error handling - Use specific exceptions, log errors with context, don't silently swallow exceptions
  • Comments - Explain current intent or an invariant. Do not add tool/model provenance or rely on historical spec IDs as the explanation.

Test Data and Generic Examples

  • Never use real or deployment-specific names in tests, fixtures, examples, docs, seeds, screenshots, or generic source defaults.
  • This includes company and product names, people, email addresses, bot identities, cluster names, environment names, customer names, and internal project names.
  • Use neutral identifiers such as primary, secondary, example, test-user, and example-bot.
  • Use reserved domains such as example.com, example.org, and example.test for URLs and email addresses.
  • Environment-specific identities belong only in environment-owned deployment configuration, never in reusable source or tests.

Active Technologies

  • TypeScript (Next.js, React) + Zustand (state management), Next.js App Router (093-fix-audit-chat-active-preserve)
  • MongoDB (server-side via API), Zustand store (client-side) (093-fix-audit-chat-active-preserve)
  • Python + Slack Bolt, Slack SDK, httpx (SSE streaming), Pydantic (config models), requests, loguru, PyYAML — no new dependencies (100-slack-agui-migration)
  • MongoDB (LangGraph checkpointer on dynamic agents side; Slack bot is stateless beyond in-memory TTL caches) (100-slack-agui-migration)
  • Service accounts: dynamic Keycloak confidential clients + OpenFGA service_account tuples + Mongo service_accounts collection; BFF (Next.js) orchestrates create/rotate/revoke/scope; caller-keyed tool authz added to the OpenFGA ext_authz bridge (2026-06-05-service-accounts)

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.