CLI reference
All commands run from the repository root and require Python 3.10+. The forge is stdlib-only.
forge.py — build and query the wiki
python brain/scripts/forge.py build # full rebuild (idempotent)
python brain/scripts/forge.py stats # corpus shape
python brain/scripts/forge.py query "pagination" # page-level full-text search
python brain/scripts/forge.py ask "retry failed executions error handling"
query.py — structured answers
python brain/scripts/query.py ask "how do I paginate API results"
python brain/scripts/query.py query "pagination"
python brain/scripts/query.py classify "what parameters does the Slack node have"
python brain/scripts/query.py --format json ask "queue mode redis scaling"
analyzer.py — workflow analysis
python brain/scripts/analyzer.py --all # analyze every docs workflow
python brain/scripts/analyzer.py <workflow.json> --format json
python brain/scripts/analyzer.py <workflow.json> --format md
Current success on the Google Sheets (docs version) workflow: one AI agent detected (@n8n/n8n-nodes-langchain.agent), model resolved to lmChatOpenAi, complexity 9/10.
generator.py — analysis → SaaS project
python brain/scripts/generator.py brain/research/workflow-analyses/agents-vs-chains.json -o generated-saas
python brain/scripts/generator.py --all -o generated-saas
verify.py — the gate
python brain/scripts/verify.py # 12 gates, prints VERDICT
python brain/scripts/verify.py --quick # skip rebuild-dependent gates
Gates: sources present, wiki rebuild is idempotent, corpus floor, every page has a standalone summary, every page resolves to a live source URL, retrieval answers a real question, workflow analyzer detects AI agents, query interface answers real questions, claims are typed and sourced, no secrets committed, licence position is documented, feature list is honest.
seed_claims.py — provenance-stamped claims
python brain/scripts/seed_claims.py