Neusym — Architecture & Repository Specification
(Solid arrows show static code imports enforced by scripts/boundaries/rules.json; dashed arrows show declarative package references in JSON manifests.)
Status: all five authority levels (
empty→review→draft→execute→commit) and plug-in/out rules 1–12 are implemented and verified across every kit, driver and contract (counts in the generated tables below; every catalog scenario and platform proof has an acceptance test). Emptysrc/andtest/directories are intentionally omitted until a package is built (CI fails on empty directories). The sections markedAUTObelow are generated from JSON manifests vianpm run sync:docsand verified bynpm run checkso they cannot drift from the codebase. This is the specification. For the ideas behind it in plain language (the three connection primitives, two-phase guards, confinement, and a worked custom kit), read docs/concepts/architecture.md.
#1. Repository Shape & Allow-List Dependency Graph
(Solid arrows show static code imports enforced by scripts/boundaries/rules.json; dashed arrows show declarative package references in JSON manifests.)
#Plug-In / Plug-Out Rules (Rules 1–12)
- One shape, loaded by package name: Every kit, driver, or connector is a single package with one manifest (
kit.json,driver.json, ormanifest.json, exposed inpackage.json"exports") and onedefaultexport (KitDefinition,DriverDefinition, orConnectorDefinition), loaded by package name—never by scanning directories. The nine section folders underkits/(runtime,tasks,knowledge,model,reasoning,safety,tools,collaboration,assurance) exist only to organize this repository; nothing at runtime reads a section. - Manifest only: A kit interacts with the platform strictly through what its manifest declares. The kernel confines every kit to its declared ports (
provides/requires/optional), its own declaredcollections(for both reads and writes), its declaredevents(publishes/listens, with no rawstore@1orbus@1port handles and withsourcestamped by the kernel; a driver port reaches a kit as a frozen facade of exactly themembersits port contract lists (never the driver object, its lifecycleclose/flush/start/stop, or the raw store, options and TS-privatehelpers it holds); a driver port whose contract lists nomembersis refused to kits withPORT_MEMBERS_UNDECLAREDrather than exposed by a guess; while a guard is evaluated, only the members the contract lists inreadMembersmay be called, and any other method refuses withPHASE1_WRITE_FORBIDDEN, as a store write does; every driver port reaches kits only through its contract'stenantBinding(a port without one is refused withPORT_TENANT_BINDING_UNDECLARED): context-first,member(ctx, ...args)(or with the context it already takes checked in place), with the context checked likestoreFor's and every tenant the call names bound to it, on a copy of the argument read once so a getter cannot show the check one tenant and the driver another (CONTEXT_TENANT_MISMATCHotherwise), and its cross-tenantplatformmembers only for kits grantedcontextIssuer; see docs/design/driver-tenant-facades.md), its declared extension points (runs/contributes, rejecting undeclared returned ports, stages, or event handlers), and itsconfigSchema. - Three kinds of contract, one owner each, zero raw literals: Pieces meet strictly through ports, extension points, and events, all defined in contract packages (
contracts/<name>/contract.jsonplus types). A point or event belongs to the contract of the port whose kit runs or publishes it (for exampleaction.authorize,action.executeandaction.completedin@neusym/contract-tools;task.changedin@neusym/contract-tasks). An event with several publishers belongs to its consumer, assignal.resolvedbelongs totasks@1.@neusym/contract-pointsand@neusym/contract-eventshold only those that no port owns yet, plus the kernel's own events (guard.refused), which no kit may publish. CI fails when two contracts define the same point or event. A kit depends on exactly the contracts its manifest names: its ports, plus the owners of the points and events it uses. A third-party kit can bring new points and events in its own contract package. Contracts may share types with each other only through declared, acyclic,import typedependencies (for exampleexecutor@1typed on thetasks@1records), never code. CI forbids raw port, point, or event string literals in kit source code. - No ids between pieces: No kit, driver, or product pack references another kit or driver by id. A kit claims explicit
allowauthority for a guard point itself viaauthorityFor(at most one loaded kit may claim a point, and points whose contract setsrequiresAuthoritymust have an authority loaded); drivers declare dependencies via portrequires+requiresCapabilities(for example,dialect:postgres); product packs declareneedsPortsand optionalminLevel. Onlyworkspace.jsonlists loaded kit packages,kitConfigs,grants, andbindingOverrides. - One way to declare ports:
provides,requires, andoptionalare the only port lists on a kit manifest, always versioned (tasks@1,queue@1,vault@1).needsholds onlyminLeveland required portcapabilities(for example,{ "store@1": ["durable", "fencing"] }). - Phases, not numbers: Each extension-point contract (in its owner's
contract.json) defines ordered named phases per kind (guard,intercept,collect,filter), and each kit contribution picks aphase. Multiple kits may share a phase; stages run in deterministic(phaseIndex, kitId, stage)order. - No dead contributions: Unknown extension points, unsupported kinds, or unknown phases fail composition unconditionally (even when
optional: true). A non-optional contribution to a point that no loaded kit declares inrunsfails composition (Z3); cross-cutting hooks targeting optional runners setoptional: true. - Levels list sockets:
workspace.jsonexplicitly declareslevel(empty | review | draft | execute | commit). The level policy (@neusym/contract-levels, data in itscontract.json) requires cumulative ports, authorities, and named extension-point phases per level—never kit ids.@neusym/sdkonly turns a policy into the rulesZ5–Z8(levelContractRules). Hosts pass the rules to the planner and kernel, and the driver loader gets the policy; both are required parameters, so leaving out level checks is a compile error. The planner itself refuses kits at levelempty. CI checks that the policy names only real ports and phases its points define. A required socket must have behaviour behind it, which is whyoutput.release[guard]:taintis not required: no guard defines what a tainted output should do yet. Non-safety kits (such asobservability) can be unplugged cleanly atreview. - Drivers come from the loader: Every built driver loads its
driver.json, attaches itsPortContract, and default-exports aDriverDefinition. The host-side loader@neusym/loader(selectNeededDriverPorts,instantiateDriversFromProfile,loadDriversFromProfile, withorderDriversByDependenciesfrom the kernel) selects only the ports needed by the workspace, bootsvaultfirst sovault:*secrets can be leased (vault?:KEYis optional: a key the vault reports missing is left unset, while any other vault failure still fails boot), resolvesenv:*from bootstrap secrets, resolves relative driverpath/file/rootDirconfig against the workspace directory, validates every binding against the driver'sconfigSchema, builds drivers in topological dependency order, and flushes + closes every bound driver in reverse order onstop().storeandbusare passed once throughdrivers. - Capabilities and port rules are always checked, the same way at plan and boot: Allowed capabilities live in each port contract (
contracts/<port>/contract.json). BothplanWorkspaceandKernelunconditionally verify advertised capabilities, kitneeds.capabilities, and driverrequiresCapabilities, and automatically run port-owned composition rules attached to bound port contracts.Z9is implemented on@neusym/contract-store,Z10on@neusym/contract-scheduler(a workspace that bindsscheduler@1bindsbudget@1),Z11–Z12on@neusym/contract-retrieval,Z13–Z14on@neusym/contract-policy, andZ14on@neusym/contract-memory. At boot, contracts come from the bundles kits and drivers carry. Forneusym plan, they come from the contract packages the kits and drivers declare as dependencies (loadWorkspaceContracts), with a port's rules imported from its package'sCONTRACT_RULES, so a new contract or rule needs no host change. Both paths merge withmergeContractBundles, which refuses two different definitions of one port, point or event: no kit can quietly add a phase or drop an authority requirement another kit relies on. - Config has a schema in the manifest: Kits, drivers, and connectors declare
configSchemain their manifest, and defaults live only there. Unknown keys, wrong types, missing required fields, invalid schema defaults, orkitConfigsentries targeting an unloaded kit stop boot (and CI validates profile bindings against driverconfigSchemas). - Own state, and proof:
- A kit reads and writes only its own declared
collections, including inside guard Phase 1 (evalCtx.store) and granted cross-tenantsystemStore. - Plug-in and plug-out happen at boot; unplugging a kit never deletes persisted store data.
- Every built kit has standalone tests booting it alone (
bootKitInIsolation), every built port contract exports reusable contract test cases (build*ContractCases), and acceptance tests inscenarios/prove unplugging and swapping kits.
- A kit reads and writes only its own declared
#Layer & Runtime Enforcement Invariants
Strict layer & determinism boundaries (
scripts/boundaries/rules.json):core/sdkhas zero dependencies.core/kerneldepends only on@neusym/sdkand does no file or module I/O.core/loader(sdk + kernel) is the only core package that reads packages from disk or imports their code.core/operator(sdk, kernel, loader types andcontracts/*) holds the operator services both apps run over a booted kernel (domain seeds, retention pruning, the waiting snapshot), so the CLI and the server cannot drift apart; it does no I/O of its own.core/testkitdepends on@neusym/sdk,@neusym/kernel,@neusym/loader, andcontracts/*.contracts/*depend only on@neusym/sdkand, type-only and without cycles, on each other.apps/*may importcore/*andcontracts/*, never kit or driver packages. Kits and contracts may not load code at runtime: no dynamicimport(),require,createRequire,process.getBuiltinModule,evalorFunctionconstructor, and every module they name, however it is named, goes through the import allow-list.src/code imports nothing from outsidesrc/but its package's own manifests. Deterministic layers (core/*,contracts/*,kits/*/*,examples/**) forbidDate.now,new DateandDate()without arguments,Math.random,crypto.randomUUID,crypto.getRandomValues,performance.nowandprocess.hrtime, in any spelling (globalThis.Date,Reflect.construct,.call). The checks read sources through a tokenizer (scripts/ci/source-scan.mjs: comments, every string and template form, escapes) and prove themselves on fixtures on every run (check-self-test.mjs); aliasing (const D = Date) and names built at runtime are beyond a source check and are left to review. Network usage requires manifest opt-in (network: trueorrequests.network: true).scripts/ci/domain-free.mjsguards all 8 platform roots against product-specific vocabulary.Kernel-owned level ceiling:
action.authorizechecks every proposal against the workspace level from the kernel's composition plan (ctx.levelis informational only). Malformed proposals fail withMALFORMED_ACTION_PROPOSALbefore any guard runs, andtools@1rejects malformed or duplicate tool registrations.Read-only Guard Phase 1 & atomic Phase 2: Guard evaluation runs inside an
AsyncLocalStorageguard phase where any store mutation through any handle fails withPHASE1_WRITE_FORBIDDEN. Each guard receives a read-only store view scoped to its own kit's collections. Phase 2 commits proposedcommitWritesandcommitEventsatomically only onallow, retryingCAS_CONFLICTup to 3 times before failing closed withGUARD_COMMIT_CONFLICT.Kernel-issued tenant contexts, context-first ports & explicit
systemStoregrants:handles.storeFor(ctx)and everyhandles.run*runner accept only contexts issued by that kernel instance (kernel.createContext, event deliveries, or copies keeping the sametenantIdandactorId); hand-crafted, tenant-mutated or actor-mutated contexts fail withCONTEXT_NOT_ISSUED,CONTEXT_TENANT_MISMATCHorCONTEXT_ACTOR_MISMATCH, since guards such astenancydecide onctx.actorId. An actor may hold several scopes:tenancyallows when an active one allows, and a revoked one never does.dlp@1refuses a marker that equals, contains or is contained in another tenant's, and serializes registrations through one registry head (CAS). A context handed to another kit's port is checked and latched the same way before the provider sees it, so a provider cannot widen what its caller narrowed. The mode is bound the same way and only narrows: a copy oflivework may move toshadoworsimulation(asevalsdoes for a replay), but non-live work never moves back toliveor to another mode (CONTEXT_MODE_WIDENED), and its events are stamped with the mode it was issued in, so a replay cannot reach the live tools its recording stands in for. The kernel checks a copy of every context a kit hands in, reading each field once, and passes only that copy on, so a getter cannot show the check one tenant or actor and the work another; the context an intercept stage hands tonextis checked the same way against the one the stage was called with. A capture that is not a level is refused (CONTEXT_CAPTURE_INVALID) and counts asnoneanywhere else. A kit's writes and events (including a guard's Phase 2 proposal) are checked and committed as copies, and its fence scopes and dedupe keys are its own: no kit can take another's fence or spend its dedupe key. Cross-tenant state requires the kit to declarerequests.systemStore: trueand the workspace to grant it ingrants.systemStore, remaining confined to that kit's own collections and committing no events, which need a context to be stamped from (EVENT_CONTEXT_REQUIRED; used bytenancyfor its persistent cross-tenant DLP marker registry under__platform__). Issuing contexts is the host's power. A kit gets it (handles.issueContext) only by declaringrequests.contextIssuer: trueand being listed ingrants.contextIssuer. It is meant for the one kit that runs work no caller hands a context for:worker-pool, which restores each queued task's tenant, actor, trace, cause and depth. Issued contexts go throughkernel.createContext, so every capture ceiling still applies. Every method of a kit port takes the caller's context first. A method without one is marked@hostSetup(wired by the host at boot) or@platformScope(touches no tenant data), and CI checks this. A port whose contract hasaudience: "host"is reached only by the host: composition refuses any kit listing it.dlp@1is such a port, so registering DLP markers, which can block every other tenant's output, is an operator action, never a kit's or a tenant's. A kit port can also keep single methods host-only (hostMembersin its contract): kits get the port without them, asscopes@1keepsgrantScopeandrevokeScope, since granting or revoking an actor's scope is an operator's act. A DLP refusal names neither the other tenant nor the matched marker.Fail-closed intake & tool boundaries:
intakerejects unregistered producers unlessrequireTrustedProducer: false, deduplicates atomically per(source, eventId), and stamps trigger context items astrigger:<producer>andtaintedunless the producer is listed intrustedContextProducersand authenticated with its registered token (a name alone proves nothing). The injection guard trusts atool_outputitem's own taint verdict only while the executor filters that one tool result (ContextBuildInput.toolResult, set by the executor, or byevalsfiltering a result it records). An item that merely calls itself a tool result, from a trigger or handed tocreateTask, is untrusted.tool-gatewayhands out deeply frozenToolDescriptors withoutexecuteso tools run exclusively throughinvoke(argument schema validation,action.authorize,action.execute, freshness/schema data contracts requiringfetchedAtMswhenevermaxAgeMsis set, defaultuntrusted: truepayload handling, and secret redaction, which scrubs object keys and the text of numbers too, longest leased value first).Single owner for event delivery, with fixed guarantees:
storeappends events atomically with document writes in the append-onlyeventstable, andbusdelivers them via per-subscriberevent_cursors. Profiles bind drivers only and never load kits. Everybus@1driver passes one contract suite:- At least once, in order: each consumer sees a tenant's events in
seqorder. A crash can deliver some again, so handlers are idempotent (dedupe keys, CAS). - Until quiet: events committed by handlers during a drain are delivered in the same drain, whatever order kits subscribed in. A drain that keeps producing events stops at the driver's round limit and reports
roundLimitReached. - One delivery per tenant at a time: concurrent drains in one process queue rather than deliver an event twice. Across processes sharing one store (
neusym work --watchbesideneusym run), each delivery takes the tenant'sbus:deliveryfence; the latest one holds the tenant, and an earlier one stops at its next step (yielded) without counting a failure or saving a cursor, somaxAttemptsholds across processes. - Per-kit start and failure policy (
kit.jsonevents.delivery):startAt: "latest"makes a kit installed later skip history, and"beginning"(the default) replays it.onFailure: "block"(the default, for projections) holds the cursor on a failed event and retries it."dead-letter"(for reactions) retries itmaxAttemptstimes, then records it as dead-lettered and moves on. Failures are counted in the store and listed bykernel.listDeliveryFailuresandneusym events --failures.
Delivery is
manualby default (hosts calldrainEvents; deterministic tests), orauto, where every commit with events wakes the bus for its tenant andsettleEvents()waits for it (the CLI). Withauto, a delivery that leaves a consumer held on a failed event (block, ordead-letterwith attempts left), throws, or hits the round limit is retried on a timer with exponential backoff (deliveryRetry, default 250 ms doubling to 30 s) without waiting for the tenant's next commit;settleEvents()does not wait for a pending retry, andstop()drops it (the event stays in the log). Agent work is never run inside a handler: handlers take milliseconds, and work an event starts is admitted byintakeand run by a worker from a queue:- Trigger rules (
intakeconfigtriggers:id,on,where,prompt,goalId) answer committed live events.intakelistens to*withstartAt: "latest"andonFailure: "dead-letter". Each match is admitted like any producer's event, with sourceevent:<rule>and the event id as delivery id, so a redelivery is deduplicated. The prompt may name only the event's envelope ({{type}},{{id}},{{source}},{{runId}},{{taskId}},{{actorId}}); the payload reaches the task as a tainted context item, so event content never becomes instruction. Outside producers cannot use theevent:source. Replays and simulations never trigger. - The queue: a task that becomes
queued(created, or woken) is put onqueue@1byworker-poolwith the origin of its kernel-stampedqueuedevent: trace, actor, cause, depth, session and capture. The queue keeps one open job per task, with leases, heartbeats and rising epochs (queue-memory,queue-sqliteon the store's documents and CAS). - Workers: the host calls the host-only
workers@1runPending(neusym run,neusym work [--watch]). Each job runs throughtasks@1runTaskunder a context the kernel issues from that origin (worker-pool'scontextIssuergrant): same actor and trace, and its events extend the chain one hop deeper than the work that queued it, so agents that keep starting each other stop atmaxEventDepth. A run that throws resumes from its checkpoint on the next attempt, and the task fails withRETRIES_EXHAUSTEDaftermaxAttempts, also when its worker died on the last attempt (the nextrunPendingfinds the dead job). A wake that arrives while the task's job is still held gives the task a job of its own once that one completes. - Waits and stops:
taskswakes awaitingtask back toqueuedon the matchingsignal.resolved(its open run resumes and the signal's outcome is on the task, with the resolver assignal.resolvedBy). A task keeps theactorIdit was created for, and every run acts for that actor: the worker resuming a woken task issues its context for the task's actor, not the resolver named on the wake'squeuedevent, andrunTaskrefuses a context for another actor (TASK_ACTOR_MISMATCH). A resolution is kept per kind and ref, so a signal that resolves before its task has parked is not lost: the park goes straight back toqueued. The kill switch (kill_switch.changed, enabled) and a spent budget (budget.exceeded, bybudgetScopeFor) halt queued and waiting work. Running work is stopped by the step guards.
- At least once, in order: each consumer sees a tenant's events in
Single output-release gate (
tasks@1completeTask):completeTaskrejects empty answers, unsupported or mismatchedoutputSchemas, and cited evidence not backed by successful run observations; runsoutput.releaseandtask.completeguards directly; and writes the final checkpoint atomically with task completion.transitionTaskstores onlyhaltReason,haltCodeandwaitingFor(never output, prompt, context, actor, session, capture or a signal) and never exits terminal states.Fenced single executor per run, with its own state:
tasks@1acquires the run fence (run:<runId>) before invokingexecutor@1, deduplicates concurrentrunTaskcalls for the same task, carries the fence on subsequent run writes, and rejects fenced-out executors before release or completion guards run.executor@1is provided byharness, so packs requiring task execution list it inneedsPorts. A run's checkpoint is a small envelopetasks@1reads (step,tainted,observations), plusexecutorState, which is opaque to everyone but the executor that wrote it.harnesskeeps its conversation there under formatharness/1and fails a run it cannot read (EXECUTOR_STATE_UNRECOGNIZED) rather than resuming it without its history. A run that stops short of an answer endshaltedorfailed, and the reason is always itshaltCode(LOOP_DETECTED,MAX_STEPS_EXCEEDED,KILL_SWITCH_ACTIVE,BUDGET_*, …), so a new executor or guard adds codes, never task statuses.Reserved, immediate, idempotent spend accounting: the
budget@1provider'sharness.stepguard reserves, per run, what the step's model call may spend (BudgetLedger.reservations) in its Phase 2 write: its estimated input tokens plus its output cap, and its cost whenmodel@1pricingknows the model. It refuses withTOKENS_RESERVED(a transient code: it deliberately does not carry theBUDGET_halt prefix) when other runs hold what is missing, so concurrent runs on one scope never ask for the same tokens or dollars, and with the terminalBUDGET_TOKENS_EXCEEDED/BUDGET_COST_EXCEEDEDwhen the call would not fit even on an idle scope.harnesspasses the estimate and prices inHarnessStepInputand capsmaxTokensat the reservation's output part (modelCallAllowance), records usage synchronously viarecordModelUsage(which settles the reservation, and runs even if publishing the event fails), and callsreleaseTokenReservationwhen the call throws; an unsettled reservation lapses aftertokenReservationTtlSeconds. The emittedmodel.calledevent carries the same usage key, so the call is counted once whichever arrives first. Which ledger work is charged to is one contract function,budgetScopeFor(goal, else explicit scope, else task; a blank id counts as absent), used by both caller and provider. A ledger counts only finite non-negative usage (countableModelUsage), so no reported figure can give a scope its budget back.Runnable plans & strict version checks:
neusym planand@neusym/loaderreject manifest-only scaffolds that lack a runnable"."entry point and reject any@versionspecifier not satisfied by the installed package's manifest version.Kernel-owned tracing & event run context: The kernel opens a span around every extension-point run (
guard <point>,intercept <point>,context <point>) and every stage in it (<kit>:<stage>), and kits open their own withhandles.withSpan(task.run→agent.step→model.call/tool.call). Child contexts carryspanId/parentSpanId; finished spans go to the kernel'sSpanSink(by default the boundtelemetry@1driver; a failing sink never fails the work). Span attributes hold ids, codes, counts and flags only—guard reasons and payload content never enter a span. Every event committed throughstoreFor(ctx)or guard Phase 2 carries the context'srunId,taskId,spanIdandmode, stamped by the kernel (a kit cannot set them), and event delivery continues that run context, so events, spans and summaries join on run and span. Events also carry theactorIdthe work is for, thecausationIdof the event whose handler committed them, and theirdepthin that chain (0 outside any delivery). These come from the kernel's record of the context, not its fields. A commit deeper thanmaxEventDepth(default 8) fails withEVENT_DEPTH_EXCEEDED, so events that keep causing each other stop. Hosts read the log back by run, task, trace, session, cause or type (kernel.readEvents,neusym events). Each event delivery runs in its own span (event <type>, the listening kit's id,kind: delivery) under the span that committed the event, so reactions join the tree of the work that caused them, andintakeopens one span per admission (intake.admit), so refused and duplicate triggers show in their trace too. Telemetry drivers with thereadcapability (telemetry-memory,telemetry-jsonl) read spans back by trace, run, task or session (telemetry@1readSpans), so a run or session can be shown after its process has exited.Refusals and failures are on the record: The kernel publishes
guard.refusedfor every guard point run that ends indenyorrequire_approval, at every point and whichever kit ran it, in theguard <point>span's run context. It carries the point, decision, code anddecidedBy(kit:stage, the authority kit, orkernel), plus tool and effect foraction.authorize, and never a guard's reason text. A refusal inside another guard's Phase 1 is not written (Phase 1 is read-only; the outer point's result is), and a failed write never changes the decision (the span recordsrefusalRecorded).guard.refusedis a kernel event ("publisher": "kernel"in@neusym/contract-events): CI fails a kit that lists it inpublishes, and the kernel refuses it from any kit withEVENT_RESERVED.tool-gatewayalso publishesaction.completedon every exit (ok,invalid_args,denied,require_approval,quarantined,error) with the code anddecidedBy: the outcome of the tool call, whereguard.refusedis the refusal itself. A model call that throws is published asmodel.calledwithstatus: "error"(code, redacted bounded message, step, run manifest) and rethrown, so the run stays resumable from its checkpoint instead of failing terminally.harnesspins each run to a run manifest (rm_<hash>of the deployment, meaning level and kit and driver versions from the kernel'shandles.deployment, plus harness version, model driver, tool names/effects/descriptions/schemas, output schema and loop limits) carried on everymodel.called.Observation is settable, and only ever narrows (
workspace.jsonobserve): what the kits that observe and learn may keep of a piece of work is its capture, one ordered scale in@neusym/sdk:none(no spans, summaries, recordings or session id),metadata(ids, statuses, codes, counts, timings, cost; never content) orcontent(also prompts, tool data, answers and feedback text, always redacted throughsecrets@1when bound). The workspace sets the ceiling (observe.capture, defaultcontent) and per-tenant ceilings below it (observe.tenantCapture); a request asks for less (createContext({ capture }),neusym --capture), never more. The kernel issues every context at the lowest of these and binds it like the actor: a copy may lowerctx.capture(astasksdoes to a task's own capture) but a raised one is refused (CONTEXT_CAPTURE_WIDENED). Events carry their capture when belowcontent, and delivery hands it on, so a listener (diagnostics,observability,evals) never keeps more than the work that caused the event allowed. Work also carries an optionalsessionId, a correlation id likerunIdthat links a conversation's or job's admissions, tasks, runs, replies and feedback from start to end: the kernel validates it (SESSION_ID_PATTERN), drops it whenobserve.sessionsisfalseor the work capturesnone, stamps it on events and spans, and continues it through deliveries and the queue; a task keeps the session (none, if it had none), capture and mode it was created with for every run, whoever resumes it.observe.spanssets span detail:stages(every stage and every event delivery, the default),points(extension points and kit spans; a skipped stage runs in its parent's span, so no span points at one never recorded) oroff. Safety never depends on any of it: guards, fencing, the event log, refusal events and audit run the same at every setting.
#2. Kits by Section (Auto-Generated)
One row per section folder under kits/, with one kit package per folder (@neusym/kit-<id>).
Section (kits/<section>/) | Kits | Built | Designed, not built | Optional or shelved |
|---|---|---|---|---|
runtime (Runtime) | 11 | cli-executor, convergence, harness, operation-journal, procedure-executor, resilience, saga, sandbox, scheduler, worker-pool, working-state | — | — |
tasks (Tasks) | 5 | event-router, goals, intake, planner, tasks | — | — |
knowledge (Knowledge) | 12 | digital-twin, ingestion, knowledge-graph, lineage, memory, memory-consolidation, ontology, retrieval, search-graph, search-keyword, search-vector, skills | — | — |
model (Model) | 2 | model-registry, model-router | — | — |
reasoning (Reasoning) | 5 | constraints, reasoner, rules, simulation, solver | — | — |
safety (Safety) | 11 | action-gate, approvals, budget, completion-gate, injection-guard, policy-engine, reversibility-gate, secrets, supply-chain, tenancy, validators | — | — |
tools (Tools) | 3 | browser-agent, mcp-bridge, tool-gateway | — | — |
collaboration (Collaboration) | 5 | a2a-bridge, artifacts, blackboard, delegation, workspace-ui | — | — |
assurance (Assurance) | 7 | audit-ledger, diagnostics, evals, independent-review, observability, proposals, release-manager | — | — |
Catalog accounting (auto-checked): 61 kits built + 0 designed + 0 optional or shelved = 61 kits in kits/, + 3 boundary families that are not kits (store-*, model-*, connector-*) = 64 total v5 catalog entries.
#3. Levels, Sockets & Kits (Auto-Generated)
Workspaces declare level; the kernel checks cumulative level sockets (Z5–Z8), while each kit declares only needs.minLevel.
| Level | Required sockets (cumulative, kernel-checked) | Kits available from this level ("needs.minLevel") | Target scenarios (catalog) | Proven by an acceptance test |
|---|---|---|---|---|
review | ports: store@1, bus@1, tasks@1, tools@1, scopes@1, budget@1, secrets@1 · phases: action.authorize[guard]:{budget,taint,tenant}, when run: context.build[filter]:{redact,isolate,taint}, output.release[guard]:{secret-leak,tenant-dlp}, harness.step[guard]:budget, trigger.admit[guard]:identity | convergence, harness, procedure-executor, resilience, scheduler, worker-pool, working-state, event-router, intake, tasks, digital-twin, ingestion, knowledge-graph, lineage, memory, memory-consolidation, ontology, retrieval, search-graph, search-keyword, search-vector, skills, model-registry, model-router, constraints, reasoner, rules, solver, budget, injection-guard, policy-engine, secrets, supply-chain, tenancy, tool-gateway, a2a-bridge, blackboard, delegation, workspace-ui, diagnostics, evals, observability, proposals, release-manager | v5-01, v5-02, v5-06, v5-07, v5-08, v5-09, v5-10, v5-11, v5-12, v5-13, v5-18, v5-23, v5-24, v5-25, v5-27, v5-29, v5-30, v5-32, v5-33, v5-34, v5-35 | v5-01, v5-02, v5-06, v5-07, v5-08, v5-09, v5-10, v5-11, v5-12, v5-13, v5-18, v5-23, v5-24, v5-25, v5-27, v5-29, v5-30, v5-32, v5-33, v5-34, v5-35 |
draft | ports: goals@1, artifacts@1 · authority: task.complete · phases: task.complete[guard]:{authority,validate}, action.authorize[guard]:validate | cli-executor, sandbox, goals, planner, simulation, completion-gate, validators, browser-agent, mcp-bridge, artifacts, independent-review | v5-20, v5-22, v5-26, v5-31 | v5-20, v5-22, v5-26, v5-31 |
execute | ports: grants@1, operations@1, audit@1 · authority: action.authorize · phases: action.authorize[guard]:{precheck,authority}, action.execute[intercept]:journal, task.complete[guard]:precheck | operation-journal, saga, action-gate, reversibility-gate, audit-ledger | v5-04, v5-14, v5-15, v5-16, v5-17, v5-21, v5-28 | v5-04, v5-14, v5-15, v5-16, v5-17, v5-21, v5-28 |
commit | ports: approvals@1, notifier@1 | approvals | v5-03, v5-05, v5-19 | v5-03, v5-05, v5-19 |
Scenario milestones (from scenarios/catalog.json): core level scenarios = 20 · plug-in kits = +10 (30) · knowledge & governance kits = +2 (32) · optional kits = +3 (35 total). Proven by an acceptance test so far: 35 / 35 (a scenario counts once a test in scenarios/test/ is titled with its id).
#4. Drivers by Port (Auto-Generated)
| Port | Drivers | Network | Driver port & capability deps | Contract rules |
|---|---|---|---|---|
a2a-transport@1 | a2a-transport-http (by-need)a2a-transport-scripted (test) | a2a-transport-http | — | — |
blobs@1 | blobs-fs (local)blobs-memory (test)blobs-s3 (self-host) | blobs-s3 | — | — |
bus@1 | bus-inproc (local)bus-postgres (self-host) | bus-postgres | bus-inproc → store@1bus-postgres → store@1 [dialect:postgres] | — |
cli-harness@1 | cli-harness-acp (by-need)cli-harness-scripted (test) | none | cli-harness-acp → runner@1 [sessions, interactive-sessions]cli-harness-scripted → runner@1 [sessions] | — |
embedding@1 | embedding-openai-compat (by-need) | embedding-openai-compat | — | — |
identity@1 | identity-local-token (local)identity-oidc (self-host) | identity-oidc | — | — |
mcp-transport@1 | mcp-transport-http (by-need)mcp-transport-scripted (test)mcp-transport-stdio (by-need) | mcp-transport-http | — | — |
model@1 | model-ai-sdk (by-need)model-claude-cli (by-need)model-openai-compat (local)model-scripted (test) | model-ai-sdk, model-claude-cli, model-openai-compat | — | — |
notifier@1 | notifier-cli (local)notifier-webhook (self-host) | notifier-webhook | — | — |
queue@1 | queue-memory (test)queue-postgres (self-host)queue-sqlite (local) | queue-postgres | queue-postgres → store@1 [dialect:postgres]queue-sqlite → store@1 [dialect:sqlite] | — |
runner@1 | runner-docker (local)runner-firecracker (self-host)runner-process (test-only) | none | — | — |
search-index@1 | search-index-local-fts (local)search-index-memory (test)search-index-postgres (self-host) | search-index-postgres | search-index-postgres → store@1 [dialect:postgres] | — |
store@1 | store-memory (test)store-postgres (self-host)store-sqlite (local) | store-postgres | — | Z9 |
telemetry@1 | telemetry-jsonl (local)telemetry-memory (test)telemetry-otel-genai (self-host) | telemetry-otel-genai | — | — |
vault@1 | vault-env (local)vault-openbao (self-host) | vault-openbao | — | — |
#Store Durability & SQL Invariants (drivers/store/{sqlite,postgres})
- Connection PRAGMAs live in connection code, never in SQL migrations:
drivers/store/sqlite/connection-pragmas.jsonenforcesbusy_timeout = 5000(first, so the pragmas after it wait for a lock instead of failing at once),journal_mode = WAL,synchronous = FULL(so power loss cannot drop a committedPREPAREDintent before an external call), andforeign_keys = ONon every opened connection. - Strict append-only
eventstable: Delivery progress is stored per subscriber inevent_cursors (tenant_id, consumer_id, last_seq)—no concurrentacked_jsonupdates. Indexes on(tenant_id, seq)and on(tenant_id, run_id | trace_id | task_id | causation_id | session_id, seq)serve cursor polling and timeline reads.event_consumersrecords where each consumer started.event_delivery_failurescounts failed deliveries:retryingrows clear when the cursor passes them, anddead_letteredrows stay. A bus saves a consumer's cursor once per page of events, not once per event, so a consumer that matches few events costs one sync per page undersynchronous = FULL. SQLite reaches this as schema v4 (004_event_session.sql), and Postgres001_init.sqlmatches v4. - Tenant-scoped fencing:
fencesuses composite primary key(tenant_id, scope)so tenants cannot collide on fence scopes.
#5. Contracts, Profiles, Schemas, Boundaries & Neutral Demo
- Contracts (
contracts/): Contract packages, all built andApache-2.0(see contracts/README.md): one per driver port (a2a-transport,blobs,bus,cli-harness,embedding,identity,mcp-transport,model,notifier,queue,runner,storewithZ9,telemetry,vault), one per kit port (dlp@1,timers@1, andworkers@1are host-only;scopes@1andevals@1guard sensitive mutations throughhostMembers;schedulerownsZ10,retrievalownsZ11–Z12,policyownsZ13–Z14,memoryownsZ14, plusa2a,blackboard,constraints,convergence,event-router,proposals,releases,reversibility,review,rules,saga,skills,working-state, etc.), the level policy@neusym/contract-levels(Z5–Z8), and@neusym/contract-points/@neusym/contract-events(holding the kernel's ownguard.refused). Every built extension point and event is owned by its port contract. - Profiles (
profiles/&profiles-ee/):@neusym/profilesships Apache-2.0testandlocalprofiles;@neusym/profiles-eeships the Enterprise Editionself-hostmulti-process profile (profiles-ee/self-host.profile.json). On-demand ports (embedding@1,cli-harness@1,mcp-transport@1,a2a-transport@1) bind by need or in profile overrides. Each binding declares{ driver, config, secrets }wheredriveris an@neusym/driver-*package name andconfigis checked against the driver'sconfigSchema. - Schemas (
schemas/): JSON Schemas forkit,driver,contract,profile,pack,workspace, andconnectormanifests, enforced bynpm run check. - Boundaries (
scripts/boundaries/rules.json): Allow-list import, determinism, dynamic-import, network, and no-raw-literal checks across every workspace layer. - Neutral demo (
examples/demo-product/): Minimalworkspace.json,pack.json, and@neusym/example-connector-demoproving external product integration via@neusym/sdk+@neusym/contract-toolswith zerocore/modifications. - Multi-level isolation: Running separate authority levels in one deployment uses a dedicated
Kernelinstance per authority unit.
#6. The Learning Loop
The platform's aim is a loop: kits plug in, models act, every action is traced, failures are analyzed, and the system improves and remembers how to behave. The observe-and-improve half runs at the read-only review level. Safe release gating (release-manager, versioned agent_defs, held-out suites, answer scorers, cost regression surfacing, and shadow side-effect gating) and grounded knowledge (lineage-backed invalidation and learned candidate memory under Z14) close the loop.
| Stage | What exists | Where |
|---|---|---|
| Trace | One span tree per run, with admissions (intake.admit) and event deliveries in it; every event names its run, task, span and session; every guard refusal is a kernel guard.refused event, and tool outcomes and failed model calls are events; spans read back after the process exits (telemetry@1 readSpans) | kernel (Tracer, guard.refused), tasks, harness, tool-gateway, observability |
| Diagnose | Per-session summary from start to end (admissions accepted and refused, tasks, runs and how they ended, model and tool use including tool calls and refusals outside any run, feedback); per-run summary (status, category, steps, tokens, cost, tool outcomes, guard refusals by point and decider, manifest, feedback, session); reports grouped by category, haltCode, tool, refusal, manifest, model; shadow runs left out unless asked | diagnostics (diagnostics@1) |
| Rate | Up/down feedback from a person or a scorer (source, plus scoreSessionSignals implicit detection of repeated prompts and failed/blocked runs) with comment, correction and labels, redacted when secrets@1 is bound and not kept at all (withheld) when the run's capture is below content; counted in the run's session; published as feedback.recorded | diagnostics, evals |
| Replay & Score | Live record-calls + replay-recorded shadow playback; held-out suites (heldOut: true, immune to feedback auto-capture); Tier 1 deterministic checks (grounded_numbers, errors_handled, cost/token ratios, status/halt codes) + Tier 2 answer scorers (exact, token-overlap, rule, model-judge with per-case cooldown and USD/call caps); previewSuiteCost upfront estimates and compareEvalCosts same-success cost increase surfacing (costRegressed) | evals (evals@1) |
| Release Gate | Versioned agent_defs pinned in run_manifests so in-flight runs finish on their starting setup across promotions (v5-09); release-manager (releases@1, release.changed) gates rollouts on held-out two-tier eval results (RELEASE_GATE_BLOCKED), enforces release-compat (RELEASE_INCOMPATIBLE), blocks unrecorded shadow side effects via shadow-gate (SHADOW_SIDE_EFFECT_BLOCKED), surfaces cost warnings / blockOnCostRegression (allowCostIncrease override), and supports instant rollback | harness (executor@1), release-manager (releases@1) |
| Remember & Ground | ingestion (ingestion@1, source.changed), lineage (lineage@1, derived.invalidated), search-keyword, and retrieval (retrieval@1, Z11–Z12 scope-filtered cache invalidated on scope.revoked/source.changed/derived.invalidated); memory (memory@1, memory.admit, memory.changed) admits fact, episode, and preference claims as candidates with anti-echo checks, two-stage context gating (retrieval_gate + slot_gate), and exportAuditMarkdown under Z14 | ingestion, lineage, search-keyword, retrieval, memory |
| Operate | neusym run (trace view of admission and run; --session joins a session, else each run starts one), session, sessions, runs (--run includes spans), report, feedback (--source), eval capture [--held-out], eval run [--agent-def id], eval list/prune, events; --capture none|metadata|content; workspace-ui (workspace-ui@1) and @neusym/server GET /workspace (?format=html) & GET /workspace/runs/:id | @neusym/cli, @neusym/server, workspace-ui |
Delivery: diagnostics is a projection and keeps the default onFailure: "block", since a skipped event would leave a run summary wrong. evals (auto-capture) and observability (export to telemetry@1) react to events and set onFailure: "dead-letter", so one event they keep failing on is set aside instead of holding every later one.
What is kept is a setting (invariant 13): at capture content the loop keeps everything above; at metadata it still traces, summarizes, reports and takes ratings, but keeps no prompts, tool data, answers, error messages or feedback text, and observability exports events without payloads; at none nothing observes the work. observability also has its own switches (forwardEvents, eventPayloads, recordCost). Unplugging observability, diagnostics or evals remains a clean opt-out of that part (Rule 8).
Safety properties of the loop: the loop kits observe and replay; they contribute no guards and never relax one. evals' intercept acts only on tasks bound to an eval case, whatever the context's mode, sits in the gate phase (outermost), and refuses any tool call the recording never made. Learned behavior enters memory only as candidates through memory.admit and, under Z14 (enforced on @neusym/contract-memory and @neusym/contract-policy), may shape prompts and plans via context.build but never feed a guard decision (level ceiling, action-gate, policy-engine, injection-guard, tenancy, budget).
#7. Deferred Decisions & Open Items
Decisions that were deferred while the platform was built, how each was resolved, and what is still open:
delegation.spawnauthority ownership (resolved):@neusym/contract-delegationownsdelegation@1anddelegation.spawn(requiresAuthority: true).budgetkeepsauthorityFor: ["delegation.spawn"](enforcing kill switch and shared parent/goal/task scope limits),action-gatecontributes optionalpolicy(standing seal enforcement), anddelegationenforcesmaxDepth.ctx.mode(live | shadow | simulation) guard behavior (resolved):RuntimeContext.modeis carried by@neusym/sdk, issued byKernel.createContext(default'live'), stamped on every event, and used byevalsreplays (shadow) andsimulationcandidate search (simulation).budgetenforces kill switches and existing scope limits in non-live modes without mutating live ledgers or reserving tokens;release-manager:shadow-gateblocks unrecorded side effects inshadowmode (SHADOW_SIDE_EFFECT_BLOCKED);simulation:simulation-dry-runintercepts side-effecting tool calls insimulationmode (v5-19) beforeoperation-journalor live tool execution; andapprovals/action-gateskip human approval parking and single-use grant consumption in non-live runs.- Node LTS pin & local FTS driver (resolved):
drivers/search-index/local-ftsimplements durable full-text search with BM25 ranking and scope filtering over standardnode:sqlite(DatabaseSyncwithWAL+synchronous = FULL) inverted-index tables (index_docs+index_termswithON DELETE CASCADE), requiring no external FTS5 compile flag on Node>= 22.14.0. - Final npm scope & Open-Core license (resolved): Packages use
@neusym/*(Apache-2.0,LICENSE, the open-source packages) and Enterprise Edition (@neusym/profiles-eeplus the EE kits and drivers underLICENSE-EE), enforced bynpm run check:licensing. See docs/guides/open-core-editions.md. - Tighten unbuilt kits'
requiresas they are built (done for every built kit): Every built kit'srequiresandoptionallists are trimmed to the exact ports its implementation calls. - Versioned agent definitions (resolved):
harnessstores versioned definitions (agent_defscollection: instructions, model,toolAllowlist,maxSteps,temperature) and active pointers, pins them inrun_manifestsandRunCheckpointso in-flight runs survive rollouts on their starting definition, whilerelease-manager(releases@1) gates promotions oneval.completedand handles rollback andrelease-compat. - Answer scorers & held-out suites (resolved):
evalssupports held-out suites (heldOut: true), deterministic Tier 1 checks (grounded_numbers,errors_handled, cost/token ratios), Tier 2 answer scorers (exact,token-overlap,rule,model-judgewith per-case cooldown and cost caps), upfrontpreviewSuiteCost, andcompareEvalCostssame-success cost increase surfacing. - Memory claim kinds and
Z14(resolved):memory(memory@1) storesfact,episode(what a run did and how it ended), andpreference(explicit or observed, scoped by tenant, actor, and workspace) claims, each admitted as a candidate throughmemory.admitwith anti-echo checks (recalledClaimIds/derivedFromClaimIds), two-stage context gating (retrieval_gate+slot_gate), andexportAuditMarkdown.Z14, enforced on@neusym/contract-memoryand@neusym/contract-policy, forbids any guard-contributing kit from depending onmemory@1or enablingallowCandidateClaims. - Querying spans: Run- and session-level questions are answered by
diagnosticsfrom events; full span trees go totelemetry@1. Drivers with thereadcapability (memory,jsonl) read them back by trace, run, task or session for the CLI;telemetry-otel-genaiexports to an external trace viewer and does not read.jsonlreads by scanning its file, which is fine locally; a store-backed span index is added only if an in-platform consumer needs one at scale. - Event delivery and secrets across processes (resolved): both parts are complete. First, bus drivers (
bus-inprocandbus-postgres) pass handlers the stored event only (BusEventHandler), while the kernel alone issues and binds the handler'sRuntimeContext(tenant, actor, run, session, capture, level, cause, depth, clock, id generator).store-postgresandbus-postgresguarantee visibility-safe reads below the oldest in-flight transaction seq, so out-of-order commits never skip events inreadEvents,scanEventTenants, orregisterConsumer('latest'), andbus-postgrescoordinates multi-process per-tenant delivery withbus_tenant_leasesrows +bus:deliverystore fencing +LISTEN/NOTIFY(wired automatically intoKernelundereventDelivery: 'auto'), with an advisory lock guarding schema migration. Second,secretskeeps the values it leased in process memory, re-leases static tenant secrets fromcredential_refsafter a restart (supportingvault-openbaoTTL leases), never probesdynamicrefs just to learn values, and clears expired lease values automatically. Secret values are never persisted. - Evals capture what it saw: a run is captured with the tool results
evalsrecorded while it ran, so a run executed while noevals@1provider was loaded is captured without them. - Event-started agents (built): triggers, the task queue, workers, waking and halting are built (§1 invariant 6).
- Long-running hosts:
neusym work --watchand@neusym/server(workerLoop/--watch) runtimers@1fireDue,workers@1runPending, and event settling continuously. - The producers of
signal.resolved:delegationchild tasks and named-arbiter disputes (delegation@1, optionaldelegation.delegatetool).schedulertimers fire throughqueue@1when the host callstimers@1fireDue(the CLI and server work loops do); withwaitToolon, an agent sets one itself throughscheduler.wait, which parks its run until the timer fires.approvalsresolves its approvals, and an agent's commit call parks its run on one:tool-gatewayopens the request (ensureApproval) and returns it aswait. A commit tool that can read the state of what it would change (readTargetState) has that state's digest on its request and on everyaction.authorize: an approval given for another state does not answer the call, which asks again (the old request goes stale and its grant is revoked), and the person deciding sees the current state throughtools@1readTargetStateand presents its hash.harnessparks the turn and, when woken, invokes the waiting call again so its guards decide. Any tool whose result names awaitin live mode parks the run the same way, so timers, child tasks, and disputes reuse the same pause/resume flow. An approval expires on time: its expiry timer makesapprovalsexpire it, which wakes the task waiting on it, and that task's call is refused withAPPROVAL_EXPIRED, and the inbox gets anapproval_expirednotice. - Multi-host durable queues:
queue-postgres(FOR UPDATE SKIP LOCKED, leases, heartbeats, fencing, retries, dead jobs) is built and tested alongsidequeue-sqliteandqueue-memory, withresiliencerun-leasestep checks (HALT_LEASE_LOST). - Optional future extension: a per-rule rate limit on how often a trigger may admit, if a noisy event source needs one.
- Long-running hosts:
- Spend reservation (input and cost done): each step reserves its call's input, output and cost (invariant 9). The input is estimated before the call (
harnessestimateInputTokens: 3 ASCII characters or 1 other UTF-16 unit per token, plus per-message and per-tool overheads, which over-counts English, JSON and code), raised by how far the run's previous call read beyond its own estimate. The output cap is the least of whatmaxTokensand, at the model's output price,maxCostUsdleave after other runs' reservations and this call's input, andmaxTokensPerCall. A model whose driver answerspricingbut knows no price for it (or for one of its routing fallbacks) would be recorded at $0, so on a scope withmaxCostUsdits steps are refused (BUDGET_COST_UNPRICED) until the binding configures a price. What is left: a scope can go over by the input estimate's error (dense ids or base64 under-count), and a driver withoutpricingcannot say whether it priced a call. A run that finds the rest of its scope temporarily reserved (TOKENS_RESERVED) is requeued with its checkpoint intact rather than terminally halted; the worker pool backs each consecutive requeue off exponentially (with jitter, up tomaxRetryAfterMs), and the harness halts the task withREQUEUE_LIMIT_EXCEEDEDaftermaxTokenRequeues. A run's reservations are freed when its task reaches a terminal state.maxTokensPerCallis a hard per-call output ceiling: a reply that reaches it ends withlengthand fails the task withMODEL_OUTPUT_TRUNCATED, even when the scope has tokens left. - Run leases across processes (resolved): the store run fence stops an older executor at any write (
FENCE_STALE), whileresilience(run-leaseonharness.step) checks run status,claimEpoch,activeRunId, and queue lease expiry before each model call and throwsHALT_LEASE_LOST(LEASE_LOST) soworker-poolyields cleanly without halting another worker's live run. - Stored data from early development builds: old
halted_*task statuses and checkpoints in the old harness format are not migrated (an interrupted old run endsfailedwithEXECUTOR_STATE_UNRECOGNIZED), and run manifests pinned beforehandles.deploymentexisted keep their old ids.store-sqliteupgrades v1, v2 and v3 databases to schema v4 (sessions and capture on events) in place. No migration code is written before a first release; development databases from before 2026-11-22 should be deleted. - Retention of the platform's own records (implemented): per-tenant archival pruning is implemented across all four operational record classes while keeping
diagnosticsrun/session summaries, active tasks, lagging consumer cursors, unresolved delivery failures, monotonic event sequences, and the hash-chainedaudit-ledgerintact:tasks@1.pruneTasksdeletes old terminal tasks and their runs/checkpoints,diagnostics@1.pruneFeedbackdeletes old raw feedback records without modifying summary counts,evals@1.pruneRecordingsdeletes old live tool recordings without modifying captured suites, andstore.pruneEvents/kernel.pruneEventsdeletes old tenant events acrossstore-memory,store-sqlite, andstore-postgres. Exposed to operators vianeusym retention pruneandPOST /retention/prune(operator-role gated). - Who may join a session: a session id is a correlation id inside one tenant, checked for shape only. The CLI mints one per
neusym run(or takes--session). A host that takes session ids from outside (@neusym/server) must mint them itself or bind them to the authenticated caller, so one client cannot add work to another's session and skew its summary. Done:@neusym/servermints session ids or binds them to the authenticated caller. Its in-memory bindings are only a cache: a session that did work belongs to the actor its first event names (the kernel stamps session and actor on every event), so neither a restart nor an evicted binding hands a session to another caller. Two server processes binding the same new client-chosen id at the same moment can both succeed; from then on, the earlier event decides. - Implicit feedback signals & proposal loop (scorer and
proposalskit built):evals.scoreSessionSignalsscans a session's runs viadiagnostics@1+tasks@1to detect repeated identical prompts and failed/blocked/halted outcomes and records idempotentsource: "scorer"ratings;evals' auto-capture skips scorer-originated feedback by default (autoCaptureScorerFeedback: false) so implicit signals never auto-capture without explicit opt-in or a person behind them.proposals(proposals@1) turns human corrections into candidate agent-definition drafts, evaluates them against held-out suites viareleases@1, and exposes draft/list/inspect/reject workflows in@neusym/cli,@neusym/server, andworkspace-ui.