AI-First Machine Schemas and Dify Workflows
Generative AI agents and LLM pair programmers are rapidly changing how business applications are built, maintained, and operated. However, most traditional web frameworks treat AI as a superficial gimmick—adding simple chat widgets while forcing agents to guess database schemas, API parameters, and form layouts.
Framework M is engineered AI-first. Studio CLI (m docs export) provides five specialized machine schema exporters under ./docs/machine/: corpus.jsonl, core.jsonl, doctypes.jsonl, ui.jsonl, and openapi.jsonl.
1. Machine-Readable Knowledge Base (.jsonl)
LLM agents perform poorly when they must parse human-targeted markdown documentation to guess exact component names, API endpoints, or field types.
Framework M Studio CLI (m docs export) extracts structured, machine-parseable artifacts into five distinct JSON Lines assets under ./docs/machine/:
┌───────────────────────────────────────────────────────────────────────────┐
│ Framework M Studio CLI Exporters │
│ (`m docs export`) │
├──────────────┬──────────────┬──────────────┬───────────────┬──────────────┤
│ corpus.jsonl │ core.jsonl │doctypes.jsonl│ ui.jsonl │openapi.jsonl │
│ System Docs, │ Python AST │ DocType │ Frontend UI │ REST API │
│ ADRs & UI │ Classes & │ Schemas & │ Component │ Route │
│ Fixtures │ Type Hints │ Attributes │ Props & Hooks │ Schemas │
└──────────────┴──────────────┴──────────────┴───────────────┴──────────────┘
The Five Machine Exporter Assets:
corpus.jsonl(m docs export corpus): Full-text RAG corpus scanning system guides, tutorials, architecture ADRs, RFCs, checklists, and golden UI component fixtures.core.jsonl(m docs export core): Extracted Python AST class definitions, docstrings, method signatures, and type annotations acrossframework_m_core.doctypes.jsonl(m docs export doctypes): Full metadata JSON definitions of all application DocTypes, field types, validation rules, and parent/child relationships.ui.jsonl(m docs export ui): Desk React component contracts, form controller state interfaces, and UI hook prop types.openapi.jsonl(m docs export openapi): Flat, machine-parseable OpenAPI REST API route specifications and payload contracts.
2. Dify Workflow Integration
Dify is an open-source LLM application development platform that allows teams to visually construct AI workflows, agent tools, and RAG pipelines.
With Framework M’s new Dify integration guide, developers can connect Dify AI agents directly to Framework M endpoints:
- RAG Knowledge Ingestion: Synchronize
corpus.jsonland specialized.jsonlfiles into Dify knowledge bases so AI assistants have exact, zero-hallucination context regarding your application schemas. - Agent Tool Execution: Register standard Framework M RPC routes directly as Dify Tool Actions.
- Workflow Triggers: Trigger complex multi-step Dify AI pipelines upon DocType document lifecycle events (
on_submit,on_update).
3. Fine-Tuning LLM Agents on Application Logic
For high-assurance enterprise domains (such as healthcare, banking, or logistics), standard off-the-shelf LLMs may require fine-tuning to reliably adhere to exact domain model rules.
Framework M includes built-in scripts to generate synthetic fine-tuning datasets from application test suites and DocType definitions, allowing teams to train custom local LLMs (e.g., Llama 3, Qwen) specifically for pair-programming on their internal codebases.
Documentation & Guides
Explore the new machine knowledge base guides:
