# Self-constructing node and waterfall ## What this pack lets workers do A collection of nouns and verbs for operating stateless, contract-hydrated worker nodes (`WeightedWaterfallExecutor`) that accept a universal input envelope plus standardized operating, waterfall, behavior and output contracts, run continuous per-step state profiling (`ContinuousStepProfiler`) to short-circuit already-solved signatures in zero model tokens, hydrate recently updated external context via deterministic keyword triggers (`KeywordFreshResourceTrigger`), explore K candidate strategies (`PlanKDecideOneFrontier`: `reuse`, `compose`, `modify`, `build_new`) across a five-rung deterministic-to-CLI-harness waterfall (`opencode`, `pi`, `codex`), score results across five stakeholder personas and six vector dimensions (`MultiPersonaVectorJudge`), and propose background capability-builder verbs (`CapabilityGapSpinoutLedger`) when repeated unserved query shapes reach quorum. ## Nouns | Noun (task object) | What it holds | | --- | --- | | Guardrails | Keep workers stateless under Tessera leases without creating a rival task or policy authority; exhaust zero-token deterministic cache, keyword and typed-block rungs before spending model tokens | | `spec.twenty-stage-contract-and-waterfall-rungs` | Twenty-stage constructible pipeline, minimal 6-stage CLI-harness preset, five weighted waterfall rungs and configurable `opencode`, `pi` and `codex` harness cells | | `rules.step-reprofile-keyword-pull-and-spinout` | Per-step state hashing, `< 6h` fresh resource keyword hydration, Plan-K / Decide-1 frontier selection, multi-persona vector evaluation and quorum-gated spinout rules | | `tool.constructible-node` | Tested standard-library Python package in [code/](code/README.md), pinned by path, file count and digest | | `template.constructible-node-receipt` | JSON Schema for envelope counts, zero-token and cache short-circuit counts, fresh resource hydrations, negative-tag leak checks, spinout proposals and AST/naming gate verdicts | | Worked example | Ten-envelope multi-tier workload bundle (`example.constructible-node-bundle`) and recomputed receipt (`example.constructible-node-receipt`) | ## Verbs | Verb (task) | Who | What happens | | --- | --- | --- | | `interrogate-and-profile-envelope` | agent, no model | Decompose an input envelope across `who/what/where/when/why/how` plus temporal horizon, compute exact and shape hashes, short-circuit prior signatures and scan keywords for fresh (`< 6h`) resources | | `execute-weighted-waterfall-and-harness-grid` | agent, no model | Run Plan-K / Decide-1 frontier selection and execute the lowest-cost admissible rung across deterministic blocks, hybrid synthesis or isolated `opencode`/`pi`/`codex` harness presets | | `evaluate-persona-vectors-and-spinout-gap` | agent, no model | Score candidate outputs across five stakeholder personas and six vector dimensions, propose cheaper deterministic distillations and emit background capability-builder verb proposals at quorum | ## How to use it Run `make check` in [code/](code/README.md) to run unit tests covering exact-signature cache short-circuiting, `< 6h` keyword resource hydration, negative-exclusion appetite matching, longitudinal OLS trend calculation, minimal `pi` vs `opencode` harness cell delegation, quorum-triggered capability spinout acceleration (`340` tokens down to `0` tokens), `ZeroHardcodedValuesAstGate` and `DomainAgnosticNamingGate`. ## Limits - Quarantined, unverified proposal until reviewed: this pack is not installed, imported, admitted or activated, and no worker has claimed or run these tasks through Tessera. - Offline waterfall simulation, AST verification and worked-example recomputation run deterministically with the Python standard library and no network calls. - Background capability-gap spinout proposals stay inside `proposed_verbs`; an authorized requester and distinct reviewer still govern admission before any synthesized block enters reuse.