10 Commits

Author SHA1 Message Date
e8765abac6 fix: pass nerveRoot to tester prompts for correct path resolution
Hermes agent cwd is not necessarily the nerve workspace root.
Inject nerveRoot into tester prompts so all file paths and commands
use absolute paths to the workspace directory.
2026-04-28 13:03:31 +00:00
7fb161cf96 fix: tester prompts — build before list, remove non-existent dry-run command
- Both workflow/sense tester: build first, then validate, then list
- workflow-generator: remove nerve workflow dry-run (doesn't exist)
- sense-generator: add build step before sense list/trigger
2026-04-28 11:04:31 +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
7c4883ddec refactor(sense-generator): tester → createHermesRole for e2e verification
Replaced 122-line hand-written smoke test with createHermesRole.
Hermes runs the full lifecycle check autonomously via terminal:
files → nerve.yaml → sense list → trigger → query → logs on failure.

All 3 roles now use factories:
  planner: createCursorRole (ask mode)
  coder:   createCursorRole (default mode)
  tester:  createHermesRole (e2e verification)

小橘 🍊(NEKO Team)
2026-04-28 03:48:26 +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