Skip to content

darkhorseprojects/circuitry

Repository files navigation

circuitry

NPM Release License

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 verify

Learn more

Wiki — format reference, examples, and tooling.

About

Authorable crystallized opaque data-flow.

Topics

Resources

License

Stars

4 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors