docs(skills): add nerve-dev coding agent skill #201

Merged
scottwei merged 1 commits from docs/187-nerve-dev-skill into main 2026-04-27 13:59:07 +00:00
Owner

What

新增 packages/skills/ 目录和 nerve-dev.md — 面向 AI coding agent 的 Nerve 开发指南 skill。

遵循 Agent Skills 规范,带 YAML frontmatter。

内容覆盖

  • 架构概念(sense → signal → workflow 数据流)
  • 完整 CLI 命令参考
  • Sense 开发(compute 签名、Drizzle schema、directive 机制)
  • Workflow 开发(roles/moderator 模式)
  • nerve.yaml 配置(inline interval/on)
  • 编码规范 + Pitfalls

Fixes #187

## What 新增 `packages/skills/` 目录和 `nerve-dev.md` — 面向 AI coding agent 的 Nerve 开发指南 skill。 遵循 [Agent Skills 规范](https://agentskills.io/specification),带 YAML frontmatter。 ## 内容覆盖 - 架构概念(sense → signal → workflow 数据流) - 完整 CLI 命令参考 - Sense 开发(compute 签名、Drizzle schema、directive 机制) - Workflow 开发(roles/moderator 模式) - nerve.yaml 配置(inline interval/on) - 编码规范 + Pitfalls Fixes #187
xiaomo added 1 commit 2026-04-27 11:54:03 +00:00
Comprehensive development guide for AI coding agents covering:
- Architecture and core concepts (sense → signal → workflow)
- CLI commands reference
- Sense and workflow development patterns
- nerve.yaml configuration (inline interval/on)
- Coding conventions and pitfalls

Fixes #187
xiaomo force-pushed docs/187-nerve-dev-skill from 27edb3ec38 to e4e4998d25 2026-04-27 11:59:37 +00:00 Compare
scottwei requested changes 2026-04-27 12:27:22 +00:00
@@ -0,0 +34,4 @@
## 项目结构
### 代码仓库(monorepo)

这段儿不需要

这段儿不需要
scottwei marked this conversation as resolved
@@ -0,0 +102,4 @@
- `on: [other-sense]` — 当 other-sense 发出 signal 时触发
- 两者可组合
## Sense 开发

需要有一个 sense 的 anatomy

需要有一个 sense 的 anatomy
scottwei marked this conversation as resolved
@@ -0,0 +103,4 @@
- 两者可组合
## Sense 开发

还应该加一段儿对 nerve sense command 的介绍。

还应该加一段儿对 `nerve sense` command 的介绍。
scottwei marked this conversation as resolved
@@ -0,0 +136,4 @@
});
```
### SQL 迁移

这个是 dizzle 生成的吧?如果是,我们或许应该告诉agent 要用 dizzle 生成

这个是 dizzle 生成的吧?如果是,我们或许应该告诉agent 要用 dizzle 生成
scottwei marked this conversation as resolved
@@ -0,0 +140,4 @@
放在 `senses/<name>/migrations/0001_create_table.sql`,daemon 启动时自动执行。
### 触发 Workflow(Directive 机制)

触发Workflow 应该跟 compute 函数一起讲

触发Workflow 应该跟 compute 函数一起讲
scottwei marked this conversation as resolved
@@ -0,0 +163,4 @@
- 每个 sense 有独立的 SQLite 数据库
## Workflow 开发

这儿也讲讲 workflow anatomy,以及 nerve workflow & nerve thread command 的用法。

这儿也讲讲 workflow anatomy,以及 `nerve workflow` & `nerve thread` command 的用法。

Workflow 的 anatomy 最好建议一下 roles/ 为每个role创建一个.ts 文件

Workflow 的 anatomy 最好建议一下 roles/ 为每个role创建一个.ts 文件
scottwei marked this conversation as resolved
@@ -0,0 +175,4 @@
roles: {
// Role: 有副作用的执行者(LLM 调用、脚本、HTTP 等)
analyst: async (start, messages) => {

role 的描述应该提一下有哪些公共的 util 可以用。

role 的描述应该提一下有哪些公共的 util 可以用。
scottwei marked this conversation as resolved
@@ -0,0 +247,4 @@
nerve workflow list # 列出 workflow 定义
nerve workflow status # 查看运行中的 workflow
nerve workflow trigger <name> # 触发 workflow
nerve workflow trigger <name> --payload '{"prompt":"..."}'

仔细再看一下 workflow trigger 的参数传递方式对不对。

仔细再看一下 workflow trigger 的参数传递方式对不对。
scottwei marked this conversation as resolved
xiaomo force-pushed docs/187-nerve-dev-skill from e4e4998d25 to dec3f6415e 2026-04-27 12:32:41 +00:00 Compare
xiaomo force-pushed docs/187-nerve-dev-skill from dec3f6415e to a4201ad795 2026-04-27 12:39:16 +00:00 Compare
xiaomo force-pushed docs/187-nerve-dev-skill from a4201ad795 to c222bc3387 2026-04-27 13:31:57 +00:00 Compare
xiaomo force-pushed docs/187-nerve-dev-skill from c222bc3387 to 787f864732 2026-04-27 13:51:25 +00:00 Compare
scottwei merged commit 787f864732 into main 2026-04-27 13:59:07 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#201