Skip to content
Agentmart
Submit a tool

AGENTS.md · Bessouat40/RAGLight

AGENTS.md from Bessouat40/RAGLight: 154 lines covering Start here, Repository map, Non-negotiable engineering rules, TDD workflow and more.

Template by Bessouat40

IndexedMIT★ 673
Write a review

Chalk Labs

Need help deploying AGENTS.md · Bessouat40/RAGLight?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.

curl -fsSL https://raw.githubusercontent.com/Bessouat40/RAGLight/main/AGENTS.md -o AGENTS.md

Read it and adapt it to your project before use.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The AGENTS.md file that Bessouat40/RAGLight (673 stars) keeps for coding agents. It has 154 lines in 8 sections: Start here; Repository map; Non-negotiable engineering rules; TDD workflow; Adding a feature; Validation commands; Definition of done; Working safely in an existing worktree. Use it as a model for your own project's instructions.

Use cases: documentation

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

What's in it

An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.

For
Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
Length
154 lines
File
AGENTS.md

Sections

  1. Start here
  2. Repository map
  3. Non-negotiable engineering rules
  4. TDD workflow
  5. Adding a feature
  6. Validation commands
  7. Definition of done
  8. Working safely in an existing worktree

First lines (shown under the repo's MIT license)

# RAGLight contributor and agent guide

This file is the authoritative starting point for humans and AI coding agents
working in this repository. Tool-specific instruction files must link here and
must not duplicate these rules.

RAGLight is a Python library for building retrieval-augmented generation
pipelines. Version 4 keeps the core small, makes integrations optional, and
exposes stable extension contracts. The v3 CLI, HTTP server, UI, and agentic
runtime are not compatibility layers in the v4 tree.

## Start here

Read the documents relevant to the change before editing code:

| Document | Purpose |
| --- | --- |
| `docs/architecture.md` | Current v4 layers and dependency rules |
| `docs/development.md` | Environment setup and validation commands |
| `docs/dependencies.md` | Optional extras, dependency ownership, and package audit |
| `docs/testing.md` | TDD workflow and test pyramid |
| `docs/integrations.md` | Checklist for adding or changing a provider |
| `docs/public-api.md` | Public API policy and compatibility expectations |
| `docs/migration-v3-to-v4.md` | Authoritative migration map from legacy APIs |
| `docs/error-handling.md` | Error ownership and actionable failures |
| `docs/releasing.md` | Package and release validation |
| `docs/decisions/` | Architecture decision records |

Documentation must distinguish implemented v4 behavior from capabilities that
are explicitly planned for a later issue.

## Repository map

```text
src/raglight/
  contracts/             stable structural extension protocols
  models/                provider-independent data models
  pipeline/              classic RAG orchestration
  integrations/          optional provider adapters
tests/                    existing unit and component tests
tests/architecture/       executable dependency guardrails
tests/integration/        cross-component tests
tests/e2e/                public workflow tests
```

Do not restore removed v3 packages as compatibility shims. New optional
capabilities must be designed on the boundaries in `docs/architecture.md`.

## Non-negotiable engineering rules

1. Use test-driven development for behavior changes: red, green, refactor.
2. Every behavior change has at least a unit test.
3. Every bug fix has a regression test that fails without the fix.
4. Tests run without network access, credentials, or external services unless
   explicitly marked as opt-in live tests.
5. Core and pipeline code do not depend on concrete integrations.
6. Core extension contracts never depend on concrete provider implementations.
7. Optional packages are imported only within their integration boundary and
   missing dependencies produce an actionable installation message.
8. Future delivery layers translate inputs and outputs; they do not own RAG
   business logic.
9. Conversation history belongs to a caller or session, never to a globally
   shared pipeline.
10. Public API changes require tests, documentation, and migration notes.
11. CI validates source code and never rewrites or commits it.
12. Do not mix unrelated cleanup with a focused behavior change.

Do not weaken a guardrail to accommodate a new dependency violation. Change
the design or record an explicit architecture decision.

## TDD workflow

For each observable behavior:

1. Write the acceptance example in user-visible terms.
2. Identify the layer that owns the behavior.
3. Add the smallest test that expresses it.
4. Run the test and confirm it fails for the expected reason.
5. Implement the minimum code needed to pass.
6. Refactor while keeping the focused test green.
7. Add contract, integration, or end-to-end coverage required by
   `docs/testing.md`.
8. Run the focused suite, then the complete relevant validation.
9. Update documentation in the same change.

Do not write production code first and add superficial tests afterward. TDD is
a development discipline; CI cannot reconstruct the red/green history, so code
review must verify that tests describe behavior rather than implementation.

## Adding a feature

Before implementation, answer these questions in the issue or pull request:

- What observable behavior changes?
- Which layer owns it?
- Is the public Python API affected?
- Does it add or change an optional dependency?
- Which unit, contract, integration, and end-to-end tests are required?
- Which documentation and migration notes must change?

Prefer dependency injection and stable contracts over provider-name branches.
Keep transport-specific models at the repository edge. See
`docs/integrations.md` for provider work.

## Validation commands

Use the smallest command during development and the complete gate before
finishing:

```bash
make test-unit
make test-integration
make test-e2e
make architecture-check
make format-check
make lint
make typecheck
make package-check
make check
```

See `docs/development.md` for focused test commands and environment details.

## Definition of done

A behavior change is complete only when:

- acceptance criteria are represented by tests;
- unit tests cover the new behavior;
- bug fixes include regression tests;
- implementations of extension contracts pass shared contract tests;
- affected component interactions have integration coverage;
- affected public workflows have end-to-end coverage where appropriate;
- architecture, formatting, lint, typing, and package checks pass at their
  currently enforced scope;
- documentation and migration guidance are current;
- default tests need no secrets, network, or running external service;
- the base package remains importable without unrelated optional extras.

Documentation-only changes may state why runtime tests are not applicable, but
documentation checks and relevant static validation still apply.

## Working safely in an existing worktree

- Inspect `git status` before editing.
- Treat existing modifications as user-owned unless explicitly told otherwise.
- Do not discard, rewrite, stage, or commit unrelated changes.
- Re-read shared files immediately before editing them.
- Keep commits focused and make generated changes explicit.
- Never place credentials, tokens, local databases, or provider responses in
  tests or fixtures.
- If another change prevents validation, report the exact command and failure;
  do not silently modify unrelated code to make the tree green.

Signals

Stars
673
Forks
102
Open issues
14
Last commit (this folder)
Oct 15, 2026 (15 days ago)
Last release
Mar 24, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Bessouat40

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get AGENTS.md · Bessouat40/RAGLight running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying AGENTS.md · Bessouat40/RAGLight?

CallGet help
Cite this page

AGENTS.md · Bessouat40/RAGLight. Agent Mart. https://agentmart.dev/templates/bessouat40-raglight-agents-md (last updated 2026-10-24)