Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/airweave-ai/airweave/fern-docs-generationgit clone --depth 1 https://github.com/airweave-ai/airweaveWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00971 |
| Opus 5 | $0.00000 | $0.00485 |
| Sonnet 5 | $0.00000 | $0.00194 |
| Haiku 4.5 | $0.00000 | $0.00097 |
Grade A, and why
fern-docs-generation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fern Documentation Generation System - Internal Guide
Overview
The custom internal Fern documentation generator automatically creates MDX documentation for Airweave connectors by introspecting Python source code using AST (Abstract Syntax Tree) parsing.
Architecture Flow
1. Discovery Phase
Entry: update_connector_docs/__main__.py:main()
- Scans
backend/airweave/platform/sources/directory - Identifies all
.pyfiles as potential connectors - Example:
asana.py,slack.py,google_drive.py
2. Parsing Phase
Source Parser (source_parser.py)
Extracts metadata from @source decorator:
@source(
name="Asana", # Display name
short_name="asana", # File/URL identifier
auth_methods=[...], # Auth methods list
oauth_type=OAuthType.WITH_REFRESH, # OAuth type enum
auth_config_class="AsanaConfig", # String reference to config
config_class="AsanaConfig", # Source-specific config
labels=["Project Management"] # Categories
)
AST Extraction Process:
- Parse decorator arguments positionally and by keyword
- Fall back to class attributes (
_auth_type,_config_class) - Last resort: regex pattern matching in raw source
Entity Parser (entity_parser.py)
- Scans
platform/entities/{connector_name}.py - Extracts entity classes and their field definitions
- Builds entity hierarchy for documentation
Auth/Config Parsers
auth_parser.py: Maps auth config class names to their field definitionsconfig_parser.py: Maps source config classes to their field requirements
3. Generation Phase
MDX Generator (mdx_generator.py)
Creates structured MDX with:
- Header: Icon + connector name
- Configuration: Source docstring description
- Authentication:
- OAuth flows (managed vs BYOC)
- Direct auth field requirements
- Source Config: Additional configuration fields
- Entity Schema: Data structure documentation
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 128 lines · 971 tokens per session scan A 724aaa970ffb
fern-docs-generation is a cursor rule published in the GitHub repository airweave-ai/airweave (6,567 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 971 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
trigger.advanced-tasks
Comprehensive rules to help you write advanced Trigger.dev tasks.
orchestration
Guidelines for working in a Bernstein-orchestrated project.
vios-sqa
VIOS SQA agent. One-click build → deploy → test → UI validation cycle. Use when asked to run regression tests, check test results, deploy for testing, or verify UI behavior.
cursorrules
This file contains project-specific instructions for AI assistants working on the CICADA codebase.
cursorrules
All monorepo rules live in AGENTS.md. Read it before making any change.
backend
FastAPI backend conventions, service patterns, and API design for Ship of Theseus.