@darkhorseprojects/circuitry
v0.9.0
Published
Local source/in/out workflow format and TypeScript runner.
Readme
Circuitry
Authorable crystallized opaque data-flow.
The artifact
You declare exactly what runs, in what order, and with what data.
---
in:
- $document
draft:
source: ./model
in:
instructions: $"## Instructions"
input: $document
out: $draft
refine:
source: ./critic
in:
draft: $draft
criteria: $"## Quality Criteria"
out: $final
out:
- $final
---
## Instructions
Write a technical summary for an engineering audience.
## Quality Criteria
Under 200 words. No bullet points.Usage
import { parse, parseSections, advance } from "@darkhorseprojects/circuitry";
const { definition, body } = parse(fs.readFileSync("agent.md", "utf8"));
const state = { document: input };
for (const [k, v] of Object.entries(parseSections(body))) state[k] = v;
while (await advance(definition, state, new Map())) {}| Field | Description |
|---|---|
| source | Executable to run — path or global command. |
| in | Inputs resolved from state. Supports $variable and $"## Heading". |
| out | Template matched against the response, validated, then bound. |
| url | Metadata for external update tooling. Ignored by the runner. |
Development
bun install
bun run verifyLearn more
Wiki — format reference, examples, and tooling.
