Getting Started
Foundry Workflow: Author, Test, Publish
Foundry Workflow: Author, Test, Publish
The end-to-end workflow for developing a ladder in Foundry: authoring the config, test-running with real LLM calls, inspecting the execution trace, publishing to the library, and iterating on new versions.
The development cycle
Every ladder goes through the same cycle:
- Author — write the YAML config (in the visual editor or raw YAML).
- Validate — Foundry checks the config at save time. Structural errors (bad references, missing fields, malformed schemas) are caught before any LLM call runs.
- Test run — execute the ladder with a real prompt. Foundry renders a live timeline showing every step, node, gate evaluation, and slate write.
- Inspect — read the trace. Identify where the ladder produced good output and where it failed. Adjust prompts, gates, or node counts.
- Publish — when the ladder is producing consistent results, publish it to the library at a chosen visibility tier.
- Iterate — publish new versions as you improve the strategy. Callers pin to a version for reproducibility.
This article walks through each phase with a concrete example.
Phase 2: Validation
When you click Save, Foundry runs a three-phase validation pass:
- Parse. The YAML is parsed as a LADR config. Unknown top-level keys, malformed YAML, and missing required fields fail here.
- Static validation. Field references are resolved (does
stepId: analyzeexist?), gate conditions are checked (integerRange: [5, 3]has min > max), JSON Schemas are parsed, recursion depth is valid, exit step exists. - Aggregation. All errors are collected and displayed together. The config is rejected if any error is found.
If validation passes, you see a green Saved badge and the ladder is stored as a new version. If it fails, each error includes the step ID and the offending field so you can locate the problem.
Common validation errors:
| Error | Cause | Fix |
|---|---|---|
Step "X": unknown field reference | A field's from: { stepId: Y } references a step that doesn't exist or hasn't executed yet. | Check step ordering and IDs. |
Step "X": if.integerRange has min (5) > max (3) | Gate range is inverted. | Swap the values. |
Step "X": cannot declare both "continueIf" and "if" | Legacy and modern gate forms on the same step. | Remove continueIf, use only if:. |
exit step "X" not found | The exit: field references a non-existent step. | Fix the step ID. |
Step "X": if.jsonMatches is not valid JSON | Malformed JSON Schema in the gate. | Fix the schema syntax. |
Validation errors do not cost LLM calls. You can iterate on config structure for free.
Phase 3: Test running
Once the config validates, test it with a real prompt.
In Foundry: Click Test run. Enter a prompt in the input field. Select knob values (e.g., branches: 3 for a fast test run). Select a model (e.g., gpt-4o). Click Run.
Foundry dispatches the ladder execution and renders a live timeline as it progresses:
- Each step appears as a section in the timeline.
- For multi-node steps, each node is a dot. Pruned nodes (failed the gate) are visually marked.
- Gate evaluations are shown inline: the condition, the number of survivors, and which action fired.
- Slate writes are shown as annotations on the step that triggered them.
- Token cost and latency are shown per step and in aggregate.
Via curl: You can also test via the API. Private ladders are callable with your API key:
curl https://api.redeo.ai/v1/<your-username>/research-briefing/chat/completions \
-H "Authorization: Bearer $REDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Analyze the trade-offs of microservices vs monoliths for a 20-person startup."}],
"knobs": { "branches": 5 }
}'The response is a standard OpenAI chat completion. The model field is set to <your-username>/research-briefing. The usage field shows total tokens across all LLM calls in the execution.
Phase 4: Inspecting the trace
The execution trace is the primary debugging surface. Read it top to bottom:
-
Step order. Confirm the steps ran in the expected order. A backward jump creates a visible loop in the timeline.
-
Node outputs. Click any node dot to see the raw LLM output. For the
analyzestep, read each analyst's output. Are they meaningfully different? If all 5 nodes produce the same analysis, the system prompt may need to encourage diverse approaches. -
Gate results. The
scorestep's gate shows which nodes passed and which were pruned. If the gate pruned everything (else:fired), the scoring prompt may be too strict. If the gate passed everything, it may be too lenient. -
Synthesis quality. Read the
synthesizestep's output. Does it incorporate the surviving analyses? Does it drop information? The synthesis system prompt is usually the highest-leverage tuning point. -
Cost breakdown. The aggregate token count tells you the per-call cost. A 5-branch ladder with 3 surviving nodes typically uses 8-12 LLM calls (5 analyze + 5 score + 1 synthesize, minus pruned). At GPT-4o pricing, that is roughly $0.05-0.10 per call.
What to look for:
| Symptom | Likely cause | What to change |
|---|---|---|
| All nodes produce the same output | System prompt lacks diversity cues | Add nodeInfo field and prompt each node to take a different angle |
| Gate prunes everything | Gate threshold too high or scoring prompt ambiguous | Lower the threshold or clarify the scoring rubric |
| Gate passes everything | Gate threshold too low | Raise the threshold |
| Synthesis drops key insights | Synthesis prompt too vague | Be specific about what to extract and how to structure the output |
| Latency too high | Too many sequential steps | Reduce node count, remove unnecessary steps, or use type: group for parallel sub-strategies |
| Token cost too high | Too many nodes or verbose prompts | Reduce default node count, tighten system prompts, lower maxSpend |
Phase 5: Publishing
When the ladder is producing consistent results, publish it.
To publish: Click Publish in Foundry. Choose a visibility tier:
| Tier | Config disclosed? | Callable by? | Best for |
|---|---|---|---|
public-free | Yes (full YAML) | Anyone | Research credibility, seeding the directory, community contributions |
public-paid | No | Anyone (caller pays your price) | Monetizing useful strategies |
hosted-private | No | Only your API key | Flagship IP exposed as a service |
local | No | Only you | Development, internal tools |
See Publishing and Visibility for full details on each tier.
Once published, the ladder is available at library.redeo.io/@{your-username}/{ladder-slug}. External callers invoke it via:
curl https://api.redeo.ai/v1/{your-username}/{ladder-slug}/chat/completions \
-H "Authorization: Bearer $REDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "..."}]
}'Before you publish, verify:
- The
executionBudgetis set. A published ladder without a spend cap is a liability. - The system prompts do not contain internal jargon or proprietary references.
- The knobs have sensible defaults. Most callers will not override them.
- The
allowedTargetsstrategy is correct.universalaccepts any model;constrainedlimits to specific providers/models. - The ladder works with at least two different models (e.g., GPT-4o and Claude). If it only works with one model, constrain
allowedTargetsto that model.
Phase 6: Versioning and iteration
Published versions are immutable. Once version 1 is public, callers can pin to it and expect reproducible behavior. You cannot modify version 1; you publish version 2.
Publishing a new version: Edit the ladder in Foundry, test it, then click Publish new version. The new version becomes the default for new callers. Callers who pinned to version 1 continue to get version 1 until they explicitly upgrade.
Versioning discipline:
- Incremental changes (prompt tuning, threshold adjustment): publish a new version, document the change in the description.
- Structural changes (new steps, changed fields, removed steps): this is a breaking change. Consider publishing as a new ladder instead of a new version. Callers who ingest the output schema may break.
- Forking: if another author wants to take the ladder in a different direction, they can fork it. The fork starts as a copy and evolves independently. See Ladder Addressing for fork semantics.
What to track between versions:
- Which system prompts changed and why.
- Which gates were tightened or loosened.
- Whether node counts or knobs changed.
- Whether the
exitstep changed (this changes the response format).
Foundry shows a diff between versions when you publish, so callers can see what changed.
Pre-publish checklist
Before publishing a ladder, run through this checklist:
Config quality:
- Every step has a clear
idandname(notstep1,step2). - System prompts are specific and self-contained (no references to internal tools or proprietary data shapes).
- Gates use the most specific predicate that works (
integerRangeovercontainsoverequals). - No
continueIf:— use the typedif:form. -
checkpoint:labels on long ladders (helps callers read the trace).
Safety:
-
executionBudget.maxSpendis set (default $5 is generous; tighten for public-free). -
executionBudget.maxHopsis set (tight enough to catch runaway loops). - No
nodes:above 20 (runtime cap).
Usability:
- Knobs have sensible defaults. Most callers will not override them.
- Knob
steps(for slider input) are meaningfully different (not[3, 4, 5]). -
allowedTargetsis correct. If the ladder only works with GPT-4o, constrain it. - The ladder works with at least two models from different providers.
Testing:
- Run the ladder with at least 5 different prompts.
- Check that the gate prunes meaningfully (not all-pass or all-fail).
- Verify the exit step output is the final answer (not an intermediate step).
- Check token cost per call is within your budget.