12 Commits

Author SHA1 Message Date
6778ba5246 refactor: clarify coder done semantics + allow multi-step iterations
- done=true means all files created, build+lint pass
- done=false means progress made, continue next iteration
- Updated both sense-generator and workflow-generator coder prompts
2026-04-28 11:02:25 +00:00
4cf10ad7bf feat: migrate senses to TypeScript source + esbuild bundle
- Move index.js → src/index.ts with proper types for all 4 senses
- Move schema.ts → src/schema.ts
- Add package.json with esbuild build script per sense
- Bundle to index.js at sense root (daemon loads this)
- Update sense-generator coder prompt with TypeScript conventions

Fixes #224
2026-04-28 07:26:53 +00:00
f1720eea5e refactor: infer Meta types from zod schema instead of hand-writing 2026-04-28 04:52:21 +00:00
645f0bacf2 refactor: remove redundant context from prompts, delegate to nerve-dev skill
- Remove nerveYaml injection from planner (skill has it)
- Remove sensesDir/nerveRoot from coder and tester (skill has conventions)
- Prompts now just say 'read the skill' instead of inlining knowledge
- BuildSenseGeneratorDeps reduced to { provider, cwd }
- index.ts drops getNerveYaml(), SENSES_DIR, readFileSync
2026-04-28 04:50:21 +00:00
e460d64786 refactor: inline types.ts into role index.ts, remove separate type files 2026-04-28 04:46:21 +00:00
69eb4ffe49 refactor: use destructuring to simplify build functions 2026-04-28 04:04:49 +00:00
cb61e98979 refactor(sense-generator): full DIP — all deps injected via build functions
Every role is self-contained (types.ts, prompt.ts, index.ts).
No shared.ts, no cross-role imports. All dependencies injected:

  index.ts          — wiring (resolve env, call buildSenseGenerator)
  build.ts          — buildSenseGenerator(deps) → WorkflowDefinition
  moderator.ts      — pure routing, composes meta from role types
  roles/planner/    — buildPlannerRole(deps), self-contained
  roles/coder/      — buildCoderRole(deps), self-contained
  roles/tester/     — buildTesterRole(deps), self-contained

Workflow is now reusable: buildSenseGenerator() can be called with
any provider/paths, not hardcoded to this machine.

小橘 🍊(NEKO Team)
2026-04-28 04:00:38 +00:00
6d3313223f refactor(sense-generator): inject provider from index.ts, roles are now sync
Provider resolved once at top level, injected into each build*Role().
Role builders no longer async — they're pure factory calls.

小橘 🍊(NEKO Team)
2026-04-28 03:56:02 +00:00
bc4ac8a5cc refactor(sense-generator): prompt.ts instead of prompt.md + mustache
Static imports, no runtime file reads, bundler friendly.
Removed mustache dependency.

小橘 🍊(NEKO Team)
2026-04-28 03:38:26 +00:00
a811660a33 refactor(sense-generator): extract prompts to prompt.md templates
Each role's prompt is now a separate markdown file with {{mustache}} placeholders,
loaded at module init and interpolated at runtime.

小橘 🍊(NEKO Team)
2026-04-28 03:32:51 +00:00
516a28533a refactor(sense-generator): extract meta schemas to types.ts
小橘 🍊(NEKO Team)
2026-04-28 02:38:07 +00:00
2d63639ed1 refactor(sense-generator): split roles into separate directories
Following nerve-dev best practice: each role gets its own directory.

Structure:
  index.ts                    — 31 lines (WorkflowDefinition + moderator)
  roles/planner/index.ts      — 48 lines (createCursorRole)
  roles/coder/index.ts        — 33 lines (createCursorRole)
  roles/tester/index.ts       — 122 lines (hand-written smoke test)
  roles/shared.ts             — 63 lines (providers, helpers)
  roles/types.ts              — 5 lines (SenseMeta)

Was: single 416-line index.ts

Refs uncaged/nerve#210
小橘 🍊(NEKO Team)
2026-04-28 02:30:12 +00:00