agentleFS
MicrosoftKnown publishermicrosoft/junco/AGENTS.md

junco

AGENTS.md1 starsChanged 33 days agoMITView on GitHub

This repo is indexed in .trail/cache/: small linked markdown nodes that explain each system and carry exact file:line spans, kept in sync with the code through git. For ANY task here — understanding how something works, finding where code lives, or scoping a change — get context from the graph before grepping or opening source files. Re-ask freely (it's cheap) and reuse literal identifiers you already have (symbol, error string, file name) as the query. New to this repo? Run…

The file

We split this AGENTS.md into the rules it gives an agent

5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run trail map first — a token-budgeted orientation (dir clusters, hubs, hotspots), no LLM, no key.

    line 11
  2. Very specific:

    Run trail ask "<your question>" --source → ranked nodes with the relevant code spans inlined (each hit's ≤8-line crux by default.

    line 14
  3. Very specific:

    Add --direction out for what it calls, or --depth N to walk transitively for the full blast radius.

    line 26
  4. Distinctive:

    If a returned span is truncated ("+N more lines"), open the file at that exact range before finalizing.

    line 34
  5. Very specific:

    After big code changes, refresh the graph with trail build (deterministic, no API key, $0).

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md
<!-- trail:start -->

Trail — repo context graph

This repo is indexed in .trail/cache/: small linked markdown nodes that explain each system and carry exact file:line spans, kept in sync with the code through git.

For ANY task here — understanding how something works, finding where code lives, or scoping a change — get context from the graph before grepping or opening source files. Re-ask freely (it's cheap) and reuse literal identifiers you already have (symbol, error string, file name) as the query. New to this repo? Run trail map first — a token-budgeted orientation (dir clusters, hubs, hotspots), no LLM, no key.

  • Run trail ask "<your question>" --source → ranked nodes with the relevant code spans inlined (each hit's ≤8-line crux by default; --full for whole definitions when the crux isn't enough). Match the tool to the task shape: for understanding or editing, the top node IS the answer — cite its covers: file:line spans and edit straight from --source. For exhaustive tasks ("every occurrence / every caller of this pattern"), ranked results are top-N, not complete — run trail grep "<literal>" instead (exhaustive over indexed files, grouped by enclosing symbol), falling back to raw grep -rn only for unindexed files.
  • trail skeleton <file> → every definition's signature + span, ~10× cheaper than reading the file; use it to skim an API surface.
  • trail callers <symbol> gives precomputed, exact edges — who calls this. Add --direction out for what it calls, or --depth N to walk transitively for the full blast radius. For structural questions, skip ranking and use this directly.
  • Or browse: .trail/cache/INDEX.md lists every node; follow the links.
  • Monorepos and folders of multiple repos rank fairly across sub-projects — hits carry [scope/] labels naming which one they're from. Narrow with trail ask "<task>" --in <scope>/ once you know where you're working.

If a returned span is truncated ("+N more lines"), open the file at that exact range before finalizing. Only open source files when a node genuinely lacks a needed detail, and then at the exact file:line the node points to — never re-read whole files.

After big code changes, refresh the graph with trail build (deterministic, no API key, $0).

<!-- trail:end -->

Standard library index

import { errors, graph, schedules, tracer, trigger, workflows } from "junco" (src/index.ts). Each summary is the first sentence of the export's JSDoc; the JSDoc at the definition is the full reference. test/std-namespaces.test.ts fails when a runtime export of these namespaces has no row here. Human version: https://github.com/microsoft/junco/wiki/Standard-Library.

workflows — graph documents for JuncoGraph.fromYaml(text, { args, parameters })

Reuse these instead of hand-writing the topology. Source routes are the keys of source.routes; feed a root graph with execution.graph.source.enqueue({ messages: new Map([[graph.EdgeId.create("<route>"), [Task.create({ kind: "prompt", text, spec })]]]), values: new Map() }) (Task.create mints the required taskId with empty deps and history), or route a parent edge onto them when embedding (kind: graph).

fromYaml owns the agents it constructs. Supply a schedules.ModelLadder in parameters.ladder whenever the document contains agents. args.tools and args.agentOptions are sparse ReadonlyMaps keyed by qualified graph.NodeIdType (e.g. graph.NodeId.create("Left/Worker"); escape ~ as ~0 and / as ~1 within each segment). A node-specific native collection replaces the graph default; omitted agents share the fallback. Use YAML tool_block for exclusions. Caller-supplied collections outlive the graph; sessions supplied through syntax.YamlAgentOptions transfer at build entry. See the YAML runner contract.

ExportSourceSummaryRoutes / outputDrive with
workflows.ralphsrc/std/workflows/ralph.ymlRalph revises its answer in the same session; RalphControl decides each delivered settlement.assignment → $source~>Ralph; result Ralph->$sink...schedules.ralph({ rounds }) or ({ until, rounds? })
workflows.allFanInsrc/std/workflows/all-fan-in.ymlOne selection of the best candidate once every candidate has returned.candidates → $source~>AllFanIn; sink.returns: AllFanInany scheduler; selection criteria in the agent's system
workflows.anyFanInsrc/std/workflows/any-fan-in.ymlOne streamed selection per newly delivered candidate batch; drive with schedules.anyFanIn.candidates → $source~>AnyFanIn; sink.stream: true, output AnyFanInPublish~>$sink...schedules.anyFanIn()
workflows.memoryRalphLoopsrc/std/workflows/memory.ts (JSON text)Ralph revisions persisted before decisions, with fresh recall before each round.assignment → $source~>Memory; sink.returns: Ralph after Memory~>$sink flushes...schedules.memory({ memory, ralph? })
workflows.memoryFanInsrc/std/workflows/memory.ts (JSON text)Persistent streaming best-so-far selection; candidates must arrive on message edges.candidates → $source~>MemoryCandidates; sink.stream: true, output Memory~>$sink; nested Select = AnyFanIn with memory tools blocked...schedules.memory({ memory })
workflows.memoryFanOutsrc/std/workflows/memory.ts (JSON text)Recall assignments and broadcast already-persisted selections to caller-owned workers.assignment → $source~>MemoryAssignment, updates → $source~>MemoryUpdate; sink.stream: true, output Memory~>$sink...schedules.memory({ memory })
workflows.optimizersrc/std/workflows/optimizer.ymlThe profile optimizer: measures a prepared target and edits its tuning regions; drive with schedules.runOptimizer.no routes; result edge result (Final->$sink)schedules.runOptimizer(request, options?) loads and runs it itself

schedules — policies, combinators and workflow controllers

parameters.scheduler: (label, graphPath) => policy. Workflow controllers supply { code } to args; merge their code maps when composing workflows. Preserve the nested source.trigger when rekeying source.routes. schedules.ralph({ retries }) and schedules.memory({ ralph: { retries } }) re-run provider-error results (stopReason: "error") in the same round, at most retries times per graph level; memory Ralph neither saves nor decides an error result. The default is zero; other invalid results and exhausted retries retain their existing failure behavior.

ExportKindSourceSummary
schedules.parallelfnpackages/junco-scheduler/src/parallel.tsSelect every available owned node in candidate order; native capacity stays authoritative.
schedules.roundRobinfnpackages/junco-scheduler/src/round-robin.tsUp to width available nodes per decision, in rotation order (order, or sorted owned node ids) starting after the last selected node.
schedules.agentfnpackages/junco-scheduler/src/scheduler.tsNormalize this invocation's first applicable speculative wave; retain no future plan.
schedules.pifnpackages/junco-scheduler/src/agent.tsOne request per current decision, without sessions, resources or graph binding.
schedules.choosefnpackages/junco-scheduler/src/scheduler.tsRank only available, owned work; equal ranks use raw JavaScript string order.
schedules.separatefnpackages/junco-scheduler/src/scheduler.tsSplit exclusive selection authority, not work, effects or JavaScript memory.
schedules.strengthfnpackages/junco-scheduler/src/scheduler.tsOverride the strength of every node inner selects; assign names the rung per node.
schedules.limitfnpackages/junco-scheduler/src/resources.tsBound scheduler's work by limits.
schedules.readsfnpackages/junco-scheduler/src/scheduler.tsOverride which inbound message edges every node inner selects reads this decision; assign receives its planned reads.
schedules.plannedReadsfnpackages/junco-scheduler/src/scheduler.tsThe message edges of nodeId's planned inputs (snapshot.plans) holding at least one queued message, in plan order.
schedules.lowestfnpackages/junco-scheduler/src/resources.tsRank available nodes by their latest measurement of a resource, smallest first.
schedules.highestfnpackages/junco-scheduler/src/resources.tsRank available nodes by their latest measurement of a resource, largest first.
schedules.selectconstpackages/junco-scheduler/src/scheduler.tsSelect nodes at the given strength, reading their nonempty planned message edges.
schedules.nodeIdsconstpackages/junco-scheduler/src/scheduler.tsThe node ids of selected, in order.
schedules.MODEL_STRENGTHSconstpackages/junco-scheduler/src/scheduler.tsThe five model strengths, weakest first; a Ladder names one model per strength.
schedules.DEFAULT_MODEL_STRENGTHconstpackages/junco-scheduler/src/scheduler.ts2 ("med"): the strength work-only policies select at.
schedules.contextfnsrc/node-policy.tsPair a passive agency graph with policy, sidecar metadata and agency input semantics.
schedules.stuckfnsrc/node-policy.tsWhether nodeId is paused at a loop-guard hold: its agent is suspended and its latest pause carries a guard reason.
schedules.drainfnpackages/junco-scheduler/src/context.tsRun to quiescence as separate steps, retaining trace and cancellation boundaries between them.
schedules.triggerInputsconstpackages/dataflow-engine/src/scheduler.tsThe default read plan for a node: every edge an "all" rule fires on, or only the first satisfied edge of an "any" rule, each read WHOLE.
schedules.uniformLadderconstsrc/node-policy.tsThe same rung at every strength.
schedules.ModelLadderclasssrc/node-policy.tsEvery available model (models) and the five rungs this ladder allows (rungs), checked against the catalog.
schedules.validateLadderfnsrc/node-policy.tsReject a ladder unless all five rungs name a "provider/model-id" model; throws DataflowDefinitionError.
schedules.ralphfnsrc/std/schedules/ralph.tsCode registration for the non-memory Ralph round controller.
schedules.anyFanInfnsrc/std/schedules/any-fan-in.tsCode registrations that validate each candidate batch and publish its selection before releasing ingress.
schedules.memoryfnsrc/std/schedules/memory.tsBorrowed-memory controllers for all three standard memory workflow topologies.
schedules.runOptimizerfnsrc/std/schedules/optimizer.tsOptimize the prepared target request names until every requested stop predicate holds on a confirmed incumbent, a caller budget or cancellation stops it, or a prerequisite blocks it.
schedules.Schedulertypepackages/junco-scheduler/src/scheduler.tsA policy: from a Snapshot of the graph (and an optional cancellation signal) to one Decision.
schedules.Snapshottypepackages/junco-scheduler/src/scheduler.tsPer-decision view; measurements.get(nodeId)?.get(resource) contains the last N observed integer samples, oldest first, as requested by the context's measurementWindows map.
schedules.Decisiontypepackages/junco-scheduler/src/scheduler.tsOne scheduler answer: the nodes that run together in the next column, each at a strength.
schedules.NodeModeltypepackages/junco-scheduler/src/scheduler.tsOne selected node, the strength it runs at, and the inbound message edges it reads this decision (each must hold ≥1 queued message; [] reads nothing).
schedules.ModelStrengthtypepackages/junco-scheduler/src/scheduler.tsIndex into MODEL_STRENGTHS: 0 = smol … 4 = xhigh.
schedules.ModelStrengthNametypepackages/junco-scheduler/src/scheduler.tsA strength by name, "smol" … "xhigh".
schedules.SchedulerContexttypepackages/junco-scheduler/src/context.tsA graph paired with its policy: step() runs one decision, run() repeats decisions to quiescence; both resolve to the results map.
schedules.DataflowObservationtypepackages/dataflow-engine/src/dataflow-graph.tsThe native graph's node status/state, links, pending inputs, results and change version.
schedules.Scheduletypepackages/dataflow-engine/src/scheduler.tsA planned window, lanes x turns.
schedules.NodeScheduletypepackages/dataflow-engine/src/scheduler.tsOne node occupying one turn of one lane, plus how much it reads on entry.
schedules.InputScheduletypepackages/dataflow-engine/src/scheduler.tsPer-edge read plan for one node occurrence.
schedules.MessageScheduletypepackages/dataflow-engine/src/scheduler.tsHow many messages to pop from one inbound edge: a positive integer, the whole queue, or none.
schedules.NodeAvailabilitytypepackages/dataflow-engine/src/scheduler.tsWhat the runtime knows about one available node when it asks for a plan.
schedules.LimitOptionstypepackages/junco-scheduler/src/resources.tsAllowances for limit: a per-decision memory admission bound and token/tool budgets per scope.
schedules.UsageLimitScopetypepackages/dataflow-engine/src/usage-limits.tsHow long one usage ledger lives: a whole run()/step(), one scheduler decision, or one node activation.
schedules.PiOptionstypepackages/junco-scheduler/src/agent.tsWhat pi needs: a Pi models runtime, the model to ask, and optional system prompt, prompt and stream options.
schedules.SchedulerRequesttypepackages/junco-scheduler/src/agent.tsCandidate-only wire data.
schedules.Laddertypesrc/node-policy.tsEvery strength's model; all five rungs are required.
schedules.LadderRungtypesrc/node-policy.tsOne rung: a "provider/model-id" and its reasoning effort ("off" when omitted).
schedules.AgencyNodeMetadatatypesrc/node-policy.tsSource-derived policy metadata; native descriptions remain on native observations.
schedules.RalphOptionstypesrc/std/schedules/ralph.tsRound control of schedules.ralph: a fixed rounds count, or an until success check with an optional rounds cap.
schedules.RalphLoopOptionstypesrc/std/schedules/ralph.tsRalph round control with bounded provider-error retries.
schedules.RalphPredicatetypesrc/std/schedules/ralph.tsSynchronous success check of one completed Ralph result; round is one-based, label is the graph level's.
schedules.MemoryScheduleOptionsinterfacesrc/std/schedules/memory.tsOptions of schedules.memory: the borrowed JuncoMemory store and the Ralph round options of the memory Ralph loop.
schedules.OptimizationRequesttypesrc/std/schedules/optimizer.tsWhat runOptimizer optimizes: the prepared target, objective, constraints, stop predicates, tuning axes and budgets.
schedules.OptimizationStatetypesrc/std/schedules/optimizer.tsrunOptimizer's result and resumable state: current and anchor candidates, trial/edit history and the stop reason (null while running).

errors — failure policies of agent nodes

Configure a YAML agent through agentOptions.get(qualifiedId).errorHandler, or pass errorHandler to a low-level JuncoAgent constructor or MockAgent transcript. Code and graph nodes keep the engine's on_error. Without a handler, thrown failures crash and stopReason: "error" settlements remain results, including Ralph's existing retry path.

Compose errors.record(errors.retry({ afterMs: 100, times: 2 }, errors.escalate({ ladder }, errors.crash()))). Attempts count failures across the node's current run, including yields, and reset on a returned result. Retry stages a continuation prompt in the same session; it does not resend the original prompt. To recover softly, return outbound messages directly from a handler, e.g. ({ error }) => [graph.Message.create(edge, graph.nodes.Task.create({ kind: "error", text: String(error), spec }))]; the node has no result. Cancellation, definition errors, exhausted budgets and closed agents bypass recovery.

ExportKindSourceSummary
errors.crashfnsrc/std/errors.tsHard error: reject the run with DataflowNodeError carrying the failure.
errors.retryfnsrc/std/errors.tsRe-prompt the same agent after afterMs while failure.attempt <= times; then inner decides.
errors.escalatefnsrc/std/errors.tsSwitch the agent to the rung above the highest one matching its current provider/model@thinking and re-prompt it at once; at the top rung, or when its model is on no rung, inner decides.
errors.recordfnsrc/std/errors.tsCount the failure and inner's decision in the node's recorder, then return that decision.
errors.ErrorHandlertypepackages/junco-agent/src/agentic.tsFailure policy of the graph node driving an agent.

graph — the dataflow engine and the agency graph

ExportKindSourceSummary
graph.JuncoGraphclasssrc/junco-graph.tsA passive native work graph owning its agents, child graphs and coroutines. fromYaml(source, { args, parameters }) builds the workflow a YAML document and its config define.
graph.DataflowGraphclasspackages/dataflow-engine/src/dataflow-graph.tsNative work topology and concrete lanes-by-turns executor; policy lives outside the graph.
graph.Edgeconstpackages/dataflow-engine/src/edges.tsConstructs message FIFOs (message), retained value cells (value) and FIFOs fed by successful returns (returned).
graph.EdgeIdconstpackages/dataflow-engine/src/identity.tsConstruction of EdgeIds.
graph.NodeIdconstpackages/dataflow-engine/src/identity.tsConstruction of NodeIds.
graph.Messageconstpackages/dataflow-engine/src/node.tsConstruction of Messages.
graph.FinalMessagesclasspackages/dataflow-engine/src/node.tsReturn a final message batch and end without recording a result.
graph.Queueconstpackages/dataflow-engine/src/queue.tsConstruction of Queues.
graph.Widthconstpackages/dataflow-engine/src/width.tsConstruction of Widths.
graph.UNBOUNDEDconstpackages/dataflow-engine/src/width.tsInfinity as a Width: unbounded turns per lane, or unbounded lanes per plan.
graph.fromconstpackages/dataflow-engine/src/builders.tsThis turn's batch from edge, empty when it did not fire.
graph.recordResourceMeasurementfnpackages/dataflow-engine/src/usage-limits.tsReport an actual integer measurement for the current node: bytes, milliseconds, tokens or micro-USD.
graph.renderPrettyfnpackages/dataflow-engine/src/pretty.tsRender value.pretty() to a string.
graph.isUsageLimitErrorfnpackages/dataflow-engine/src/usage-limits.tsWhether error is a usage-limit failure, by its exact code, never its message text.
graph.UsageLimitErrorclasspackages/dataflow-engine/src/usage-limits.tsA token or tool budget was hit; details and toJSON() carry the limit and the amount that hit it.
graph.DataflowDefinitionErrorclasspackages/dataflow-engine/src/errors.tsA graph wiring / contract violation detected before or between node activations.
graph.DataflowNodeErrorclasspackages/dataflow-engine/src/errors.tsA hard error raised by a node body and re-raised by the runtime.
graph.ErrorFntypepackages/dataflow-engine/src/node.tsFailure hook of a node whose body threw.
graph.StepFntypepackages/dataflow-engine/src/node.tsA node body.
graph.NodeGeneratortypepackages/dataflow-engine/src/node.tsA node body yields NodeYield, receives a ParentView and returns a result or FinalMessages.
graph.NodeYieldtypepackages/dataflow-engine/src/node.tsA message batch waits for the next trigger; { resume: batch } requests a continuation after publication.
graph.Nodetypepackages/dataflow-engine/src/node.tsA registered graph node: its programmable state, lifecycle, trigger, body and live generator.
graph.NodeOptionstypepackages/dataflow-engine/src/node.tsRegistration options common to every node kind: optional identity and description, and a required trigger.
graph.NodeSpectypepackages/dataflow-engine/src/node.tsWhat a caller passes to DataflowGraph.addNode: common options plus state, body and failure hook.
graph.NodeStatustypepackages/dataflow-engine/src/node.tsLifecycle of a node: never activated, mid-generator, or returned (a value self-edge delivery re-arms it to ready).
graph.ParentViewtypepackages/dataflow-engine/src/node.tsWhat the runtime hands a running node on each input-delivery turn.
graph.Lookuptypepackages/dataflow-engine/src/node.tsKeyed read access to one side of a node's inbound state.
graph.EdgeIdTypetypepackages/dataflow-engine/src/identity.tsBranded identifier of a graph edge.
graph.NodeIdTypetypepackages/dataflow-engine/src/identity.tsBranded identifier of a graph node.
graph.Identifiabletypepackages/dataflow-engine/src/identifiable.tsA value carrying a stable identity of type Id.
graph.WidthTypetypepackages/dataflow-engine/src/width.tsA scheduler width: a positive integer or Infinity.
graph.ValidWidthtypepackages/dataflow-engine/src/width.tsW when it is a legal width — a positive integer or Infinity — and never otherwise.
graph.DataflowRunOptionstypepackages/dataflow-engine/src/dataflow-graph.tsCancellation for one scoped evaluation, including planning and concrete execution.
graph.DataflowObservationtypepackages/dataflow-engine/src/dataflow-graph.tsThe native graph's node status/state, links, pending inputs, results and change version.
graph.DataflowExecutiontypepackages/dataflow-engine/src/dataflow-graph.tsExecutes one planned Schedule inside evaluate; options resolve each entry's inputs, observe columns and add per-node usage budgets.
graph.Prettyinterfacepackages/dataflow-engine/src/pretty.tsRenderable as a prettier-printer document; renderPretty turns it into text.
graph.ResourceKindtypepackages/dataflow-engine/src/units.tsA measured resource: "memory", "runtime", "tokens" or "cost".
graph.ResourceQuantitytypepackages/dataflow-engine/src/units.tsAn amount of resource R in a unit of its dimension (e.g. bytes(…), tokens(…)).
graph.UsageLimitDetailstypepackages/dataflow-engine/src/usage-limits.tsWhat a UsageLimitError carries: which budget, its scope and limit, the usage that hit it, and the node path.

graph.nodes — node specs and bodies

ExportKindSourceSummary
graph.nodes.Deterministicclasssrc/deterministic.tsA deterministic graph node body: one async generator speaking the engine's own yield/view/result protocol, plus a cooperative abort signal and close.
graph.nodes.EmitOnceclasspackages/dataflow-engine/src/builders.tsA complete source spec: emit one batch, then finish with ret.
graph.nodes.StepNodeclasspackages/dataflow-engine/src/builders.tsA complete node spec whose body never terminates: after its priming yield, fn maps the registered node's current state plus each delivered view to the messages emitted that turn.
graph.nodes.ConstFanoutclasspackages/dataflow-engine/src/stdlib.tsA complete source spec that sends one constant payload once on every edge in outputs, then finishes with options.ret.
graph.nodes.ConstFaninclasspackages/dataflow-engine/src/stdlib.tsA complete collector spec that waits until every edge in inputs has delivered its constant, sends them as ONE list message on output, then finishes with options.ret.
graph.nodes.Sourceclasspackages/dataflow-engine/src/stdlib.tsRoutes pending external deliveries FIFO. An optional trigger can require inbound message credits; priming then consumes neither credit nor delivery.
graph.nodes.Sinkclasspackages/dataflow-engine/src/stdlib.tsStages yielded, terminal and explicitly sent messages for acknowledged external delivery.
graph.nodes.Agentictypesrc/agentic.tsNative work states; policies and execution contexts are never graph members.
graph.nodes.AgenticNodetypesrc/agentic.tsA graph-managed prompt agent may register a reusable prompt; complete bodies require their authorization policy.
graph.nodes.Tasktype, constpackages/junco-agent/src/agentic.tsThe task payload of agent graphs: a description, a readonly completion spec, subtask deps and the history of its holders. All four fields are required; Task.create({ kind, text, spec }) mints its taskId UID with empty deps and history.
graph.nodes.CompactionPolicytypesrc/agentic.tsWhich direct prompt-agent node states JuncoGraph.compact compacts.

trigger (also graph.trigger) — readiness rules over inbound edges

ExportKindSourceSummary
trigger.TriggerRuleconstpackages/dataflow-engine/src/trigger.tsConstruction of TriggerRules: allOf, anyOf, when(edge), always(), never().
trigger.TriggerEntryconstpackages/dataflow-engine/src/trigger.tsConstruction of TriggerEntrys (TriggerEntry.on(edge)).
trigger.evaluateTriggerconstpackages/dataflow-engine/src/trigger.tsWhether trigger fires right now against nodeId's inbound edges.
trigger.satisfiedEdgesconstpackages/dataflow-engine/src/trigger.tsEdge ids with something to offer right now, in rule insertion order.
trigger.TriggerKindtypepackages/dataflow-engine/src/trigger.tsConjunction ("all") or ordered disjunction ("any") over a rule's entries.

tracer — execution observers and profile recorders

ExportKindSourceSummary
tracer.DummyTracerclasspackages/dataflow-engine/src/dummy-tracer.tsA DataflowTracer that deliberately traces nothing: no serialization, timestamps, retained payloads, logging or I/O.
tracer.TuiTracerclasssrc/tui-tracer.tsOne lazily acquired, terminal-owning display shared by synchronous graph observers (TuiTracer.shared() is the JuncoGraph default).
tracer.JsonlRecorderclasssrc/jsonl-recorder.tsProjects profile events into dataflow-profile JSONL training samples: one per successful graph activation, keyed by its /-joined node IDs, plus standalone probe samples.
tracer.GrafanaRecorderclasssrc/grafana-recorder.tsPersists profile events as metrics of one session streamId.
tracer.DataflowTracerinterfacepackages/dataflow-engine/src/dataflow-tracer.tsPluggable execution observer.
tracer.DataflowRunTracetypepackages/dataflow-engine/src/dataflow-tracer.tsObserver for one evaluation scope.
tracer.DataflowStepTracetypepackages/dataflow-engine/src/dataflow-tracer.tsObserver for one generator activation.
tracer.ProfileRecorderinterfacepackages/junco-tools/ts/profile-recorder.tsOne profiling session (root) seen at one node context (path), able to record only the resource singletons in R.
tracer.ProfileEventtypepackages/junco-tools/ts/profile-recorder.tsOne event a ProfileRecorder records: a usage increment, a native resource event, a probe value, or an operation's start/finish/metrics.
tracer.ProfileOperationtypepackages/junco-tools/ts/profile-recorder.tsLabels of one recorded operation: resource, category, tool, operation name, and the activation it ran in.
tracer.ProfileActivationtypepackages/junco-tools/ts/profile-recorder.tsOne graph activation of a node, shared by its start and finish events.
tracer.JsonlRecorderOptionstypesrc/jsonl-recorder.tsOptions of new JsonlRecorder.
tracer.GrafanaRecorderOptionstypesrc/grafana-recorder.tsOptions of GrafanaRecorder.create.

Root exports

Also exported directly from junco: JuncoGraph, Deterministic, Agentic, Task, AgenticNode, CompactionPolicy (rows above), and:

ExportKindSourceSummary
JuncoArgs<C>, JuncoParameterstypessrc/syntax/build.tsRequired groups in syntax.FromYamlOptions<C>: program inputs and capabilities (args) and execution settings (parameters).
JuncoGraphValidatorconstsrc/syntax/validator.tsvalidate(value) validates a decoded document recursively; syntax.parse uses the same validator. validateNodeMaps(document, { grants: { map, complete: true } }) checks qualified IDs (all node kinds and actual ports); complete additionally requires every ID. Both throw syntax.ValidationError on invalid input.
TaskSchemaconstpackages/junco-agent/src/agentic.tsRuntime schema of Task.
AssistantMessageSchemaconstpackages/junco-agent/src/agentic.tsRuntime schema of Pi's native AssistantMessage: its content, usage/cost, diagnostics and deferred handle, with required fields, literal alternatives and optional fields.
MockAgentclasssrc/mock-agent.tsA scripted JuncoAgentProtocol replaying its MockTranscript without model requests.
MockTranscripttypesrc/mock-agent.tsEverything a MockAgent will do, fixed at construction.
MockRuntypesrc/mock-agent.tsOne admitted run: zero or more yields then exactly one terminal, and its cancellation outcome.
MockFrametypesrc/mock-agent.tsOne scripted request of a run, ending at boundary step.
MockTerminaltypesrc/mock-agent.tsA run's last boundary: its settlement or failure.
MockHooktypesrc/mock-agent.tsOne scripted hook invocation, with the results its registered handlers must return in order.
MockHookResulttypesrc/mock-agent.tsThe results the registered handlers returned for one scripted hook.
MockMaintenancetypesrc/mock-agent.tsOne scripted compact (its queued outcome) or navigateTree call (its native result).
MockRequesttypesrc/mock-agent.tsWhat one frame's request would have sent, captured after its queue drains and hooks.
MockCalltypesrc/mock-agent.tsOne command, as called.

Whole-package namespaces, documented in their own trees: agent (packages/junco-agent/README.md), tools (packages/junco-tools/README.md), mcp (packages/junco-mcp), syntax (src/syntax/; YAML schema and FromYamlOptions in skills/junco-graph-create/SKILL.md).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.