Build Your Own Module
If the built-in modules don’t fit your data, you can build your own forge module. A module extends the base pipeline with domain-specific scanners, templates, and review criteria.
Module structure
Section titled “Module structure”A custom forge module provides three things:
- Scanners — pull raw data from your domain sources
- Templates — structured formats for the kinds of beliefs your domain produces
- Review criteria — domain-specific rules for what makes a belief valid
What each piece does
Section titled “What each piece does”Scanners
Section titled “Scanners”Pull raw data from your domain sources. Receive CLI config (paths, URLs, credentials). Return documents that the extract stage will process.
Examples:
- Read files from a directory
- Pull records from an API
- Query a database
- Scrape a website
Templates
Section titled “Templates”Structured formats for the kinds of knowledge your domain produces. Templates help the extract stage produce consistent, well-structured beliefs.
Review criteria
Section titled “Review criteria”Domain-specific criteria for the review stage. What makes a belief valid in your domain? What should the reviewer look for?
Examples:
- “Claims must cite a specific version number”
- “Measurements must include units and conditions”
- “Recommendations must reference at least one observed failure”
Current approach
Section titled “Current approach”Until the plugin API is available, the recommended approach is to use the document forge with domain-specific prompts:
# Use the document forge for any text-based sourcereasonsforge document --sources-dir ./my-data --domain "My domain context"The document forge handles chunking, summarization, belief extraction, derivation, review, and repair for any text input. The --domain flag provides context that shapes the LLM prompts.
For more control, you can run individual pipeline steps:
reasonsforge forge chunk-docs --input-dir ./my-datareasonsforge forge summarize --input-dir ./my-datareasonsforge forge propose-beliefs --allreasonsforge forge accept-beliefsreasonsforge forge derive-review-repair --domain "My domain context"