> ## Documentation Index
> Fetch the complete documentation index at: https://bulkgrid.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Collection Rules

> Use include and exclude rules to build precise collection boundaries.

Collections in Bulkgrid are not just named groups. They support rule-based curation.

## Rule model

Collection rules support:

* action: `include` or `exclude`
* target: `source`, `folder`, or `url`
* source context through `source_id`
* target value through `target_id`
* optional metadata on added rules

## What this lets customers do

* include an entire source
* include one folder from a source
* exclude a noisy subfolder
* include or exclude specific URLs

## What the API returns

The rules endpoint does more than just list rules. It also returns:

* aggregate rule counts
* effective counts by source

That matters because customers need to understand the actual collection boundary after include and exclude rules interact.

## Related collection operations

Bulkgrid also supports:

* linking sources to collections
* linking documents to collections with include/exclude rules
* linking folders to collections with include/exclude rules

## Why this matters

This is one of the biggest practical differences between a curated knowledge platform and a naive “search everything” approach.
