refactor: align develop-workflow prompts and .knowledge with flat workspace structure #287
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
⚠️ Revised direction — AGENT.md instead of nerve-skills
Conventions belong to the workspace, not to an npm package. Different workspaces may have different conventions.
Plan
1. CLI
nerve initgeneratesAGENT.mdUpdate
packages/cli/src/commands/init.tsto generate anAGENT.mdfile in the workspace root. Content should include:workflows//
index.ts — default export (wires adapters + config)
build.ts — factory: createXxxWorkflow({adapters, extract})
moderator.ts — moderator function + WorkflowMeta type
roles/.ts — schema + prompt + createXxxRole (one file per role)
senses//
src/index.ts — compute() function + drizzle table
migrations/ — SQL migration files
adapter: AgentFn— cursor/hermes/llm adapterprompt: string | (ctx) => Promise<string>— role instructionsschema: z.ZodType<M>— Zod meta schema for structured extractionextract: LlmExtractorConfig— LLM provider for meta extractionPure-LLM roles (no tool use): use
createLlmAdapter(provider)from@uncaged/nerve-workflow-utils.Build
Single root build:
npm run build(viascripts/build.mjs)No per-workflow or per-sense
package.json.Output:
dist/workflows/<name>/index.js,dist/senses/<name>/index.jsCoding Style
function+type, notclass+interface)typeoverinterface?:), useT | nullasync/await, never.then()chains