ontology-driven-dev README

The project's README from github.com/sharptoolbox/ontology-driven-dev. As one markdown file: README.md.

ontology-driven-dev

一套「需求探索 → 本体建模 → 应用构建」三步法的本体驱动业务系统开发技能。 基于七模型本体 YAML(M1/M2/M3/M5/M6/M7/MU)与内置 code-paas 技术底座,强制每个需求探索阶段人工确认,最终产出严格对齐需求文档、本体模型与代码的可运行浏览器前后端(BS)系统。

English version → README_EN.md


一、这个技能能做什么

把一段业务需求(一句话或一段描述)变成一套可运行的管理系统,且保证:


二、包含内容

ontology-driven-dev/
├── SKILL.md                      # 技能核心指令(方法论 + 三阶段管线 + 纪律)
├── references/                   # 5 份方法论文档(强制规范)
│   ├── AI需求探索与确认提示词V9.0.md      # 含《软件需求编写规范 V9.0》全文
│   ├── ontology_modeling_framework_v9.md  # 七模型元规范 + YAML 模板
│   ├── 本体模型业务功能开发指导书.md        # 模型→实现映射、开发流水线 10 步
│   ├── AI原生应用技术架构设计文档.md        # 技术栈 / 语义注册表 / AI 编排 / SSE
│   └── UI-UE界面设计规范.md               # 配色 token / 布局 / 完整 CSS 库
├── reference-example/            # 黄金范例(销售合同执行管理跑通实物)
│   ├── 合同管理需求规格说明书-V9.md
│   ├── m1-object-model.yaml … m7-report-model.yaml + mu-ui-model.yaml
│   └── manifest.json
├── techbase/                     # code-paas 干净源码(复制到 code-app 后扩展)
    ├── backend/                  # Flask + SQLite 后端(流程引擎 / 本体注册表 / 服务层)
    ├── frontend/                 # React + TypeScript 前端(Vite)
    ├── models/                   # 示例七模型 YAML(正式使用时替换为你的模型)
    ├── requirements.txt
    └── README.md                 # 底座运行说明
└── code-app-example/             # 基于七模型生成的销售合同执行管理完整应用样例
    ├── models/                   # 合同领域七模型 YAML + manifest
    ├── backend/                  # 业务服务、流程、报表、AI 助手及测试数据库
    ├── frontend/                 # 合同、开票、收款、审批及报表页面
    └── README.md                 # 样例功能、账号、启动与自测说明

完整应用样例

code-app-example/ 展示了从需求规格、七模型本体到可运行系统的完整落地结果。样例业务为销售合同执行管理,覆盖合同登记与分级审批、开票审批、收款及冲销、跨对象状态联动、固定报表、系统管理和右侧 AI 智能助理。

样例自带 SQLite 测试数据和默认测试账号,可按 code-app-example/README.md 的说明直接启动和验证完整业务链路。仓库中的 AI API Key 已清空,使用智能助理前需在系统界面中自行配置 OpenAI 兼容的大模型服务。


三、安装(主流工具)

本技能不依赖任何 WorkBuddy 专有机制,可完整运行在 Claude Code、Codex、Cursor 等工具上。 唯一适配点:技能内相对路径以「本 SKILL.md 所在文件夹」为根,各工具会自动解析。

1. WorkBuddy

# 用户级(所有项目可用)
cp -r ontology-driven-dev ~/.workbuddy/skills/ontology-driven-dev

# 或项目级(仅当前项目)
cp -r ontology-driven-dev <你的项目>/.workbuddy/skills/ontology-driven-dev

在 WorkBuddy 对话中直接说触发语即可(见第五节)。

2. Claude Code

Claude Code 的 Skills 格式与本技能 frontmatter(name / description)完全一致,基本直接复制即可:

# 用户级
cp -r ontology-driven-dev ~/.claude/skills/ontology-driven-dev

# 或项目级
cp -r ontology-driven-dev .claude/skills/ontology-driven-dev

Claude Code 会自动发现 .claude/skills/<name>/SKILL.md 并按其流程执行。

3. Codex

Codex 没有原生 skill 注册表,但能加载仓库内的指令文件并在沙箱中执行 bash:

# 把技能放进仓库(目录名随意)
mkdir -p .codex/skills && cp -r ontology-driven-dev .codex/skills/

然后在仓库的 codex.md(或 AGENTS.md)中加入一句:

当用户要做「本体驱动开发 / 需求探索 / 本体建模 / 七模型 / code-paas / AI 原生应用」时, 加载 .codex/skills/ontology-driven-dev/SKILL.md 并严格按其「三阶段 + 人工确认门禁」流程执行。

Codex 会把每阶段的人工确认映射为交互式提问/审批。注意:沙箱需联网以完成 npm install / pip install。

4. Cursor / Aider / Cline / 其他通用 Agent

把 SKILL.md 当作「方法论指令文件」注入项目上下文即可:


四、使用流程(详细)

技能分强顺序三阶段,每阶段之间及阶段一内部都必须人工确认。

阶段一:需求探索 → 软件需求规格说明书

阶段二:本体建模 → 七模型 YAML

阶段三:应用构建 → 可运行 BS 系统


五、触发语(直接对 agent 说)

意图 示例
整体开发 「帮我开发一个 XX 管理系统」「把这段需求做成本体驱动开发」
仅建模 「基于这份需求规格说明书,做本体建模」
仅构建 「基于这几份七模型 YAML,生成系统」
关键字 本体驱动、需求探索、本体建模、七模型、code-paas、AI 原生应用、业务系统开发

六、运行环境要求


七、许可

本项目以 MIT License 发布,可自由使用、修改与再分发,详见 LICENSE。 (技术底座 code-paas 同样遵循 MIT。)

ontology-driven-dev (sharptoolbox/ontology-driven-dev)

Searching Database…

What is this?A skill for AI coding agents (WorkBuddy / Claude Code / Codex) that turns a plain-language business requirement into a runnable browser-based system through three steps: requirement exploration, ontology modeling into seven YAML models, and application construction on a built-in Flask+React tech base called code-paas.
Is this a standalone app, or a skill file that guides an AI agent?It is a skill (a SKILL.md instruction file plus reference docs and a tech base) that an AI coding agent follows step by step; you don't run it directly, it directs the agent to build an app for you.
How do I add this skill to my AI coding agent?For Claude Code, drop the folder into .claude/skills/ so it auto-discovers SKILL.md; for Codex, place it under .codex/skills/ and reference its path from codex.md or AGENTS.md; for Cursor/Cline/Aider, load or paste SKILL.md as a project rule or system instruction.
What do I need to actually run the generated system?Python 3.10+ for the Flask+SQLite backend and Node.js 18+ for the React+Vite frontend; the first run needs internet access to execute npm install and pip install.
Can I skip the confirmation steps to speed things up?No — each of the eight requirement-exploration stages must pause and wait for explicit human confirmation before the agent can continue, and this gate is described as mandatory and unskippable.
Which AI coding agents does this actually work with?It runs in WorkBuddy, Claude Code, Codex, Cursor, Cline, and Aider, since it has no WorkBuddy-specific dependency and only needs the host tool to load the SKILL.md instructions.
What does the example application demonstrate?code-app-example is a full sales-contract execution management system with contract registration and tiered approval, invoicing approval, payment write-off, cross-object status linking, fixed reports, and the built-in AI assistant, complete with seed SQLite data and a default admin/admin123 account.
What is the code-paas tech base used in step three?It's the built-in Flask+SQLite+React/TS monolith shipped with system administration, a workflow engine, a workbench, and an ontology registry — you copy it into your project and extend it instead of building the plumbing from scratch.
Does the generated app come with AI chat built in?Yes, every generated system has a mandatory AI chat panel fed by the ontology registry, with tool-calling, SSE streaming, and a read-only SQL safety boundary.
What are the seven ontology models used for modeling?M1 objects, M2 behaviors, M3 rules, M5 actors, M6 processes, M7 queries/reports, and MU UI — these YAML files plus a manifest.json are the single source of truth that generates the database schema, APIs, menus, permissions and workflow.
Size
0.8 MB
Stars
464
Updated
CommitOct 09
Age
1mo
Commits · 90 Days