@janithcooray/quack-core
v0.1.0
Published
The Quack question engine — pure logic, no I/O. The port contract.
Maintainers
Readme
@janithcooray/quack-core 🦆
The Quack question engine — pure logic, zero I/O, zero runtime dependencies.
This package is the port contract: reimplement it in any language against the
same @janithcooray/quack-data dataset.
import { Session, nextQuestion, detectTags } from "@janithcooray/quack-core";
const session = new Session({ mode: "socratic", seed: 42 });
const { question, stage, tags } = session.ask({ text: "my promise never resolves" });
// → an interrogative line, never adviceGuarantees: never throws on user input, deterministic under a seed, walks the clarify → isolate → assume → verify → rethink ladder, never repeats while the pool lasts, and only ever returns verbatim dataset text — the duck never answers. MIT.
