feat(landlord): dynamic-workflow runtime (ultracode-style orchestration)#8
Merged
Conversation
Port Claude Code's ultracode / dynamic-workflow capability into @flint/landlord: a script-driven workflow runtime injecting the same hooks (agent/parallel/pipeline/phase/log/args/budget/workflow) on top of Flint primitives. Runtime becomes the package core; orchestrate() is rebuilt as a built-in auto-decompose workflow on top of it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
16 TDD tasks building the workflow runtime in @flint/landlord: errors/types, concurrency caps, budget bridge, events, journal/resume, registries, isolation, structured-output schema, the agent() hook, the workflow context, meta parser + determinism sandbox, script/typed authoring, the run engine, workflowTool, the backward-compatible orchestrate() rebuild, and docs/changeset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When resuming from a prior run, replayed journal entries are now written into the current run's journal before returning, making each run's journal self-contained and enabling chains of resume beyond two hops. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-fixed useLiteralKeys (bracket → dot notation), useTemplate (string concat → template literal), and formatting across src/test. Manually refactored skipWs and parseString in meta.ts to use local `pos` variable instead of reassigning the `i` parameter (noParameterAssign). Dropped unused `Result` type from the import in tool.ts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 6 new docs pages (workflow, hooks, resume, agent-types, isolation, workflow-tool), a dynamic-workflow example, sidebar/nav updates, README mention of the workflow runtime, and a minor changeset entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- workflow.md: bind `const files = args` in the script (files was undefined) - hooks.md: pass workflow() args as the second argument, not a ref field Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports Claude Code's "ultracode" / dynamic-workflow capability into
@flint/landlord: a script-driven workflow runtime that injects the same hooks on top of Flint primitives, while keeping the existing auto-decomposeorchestrate()API intact.runWorkflowScript(source)(model-written JS strings, sandbox-compiled) anddefineWorkflow({ meta, run })(typed).agent/parallel(barrier) /pipeline(no-barrier, per-item) /phase/log/args/budget/workflow(one-level nesting).agent(prompt, { schema })forces a validatedstructured_outputtool (ajv + retry).max(1, min(16, cpus-2))+ 1000-agent lifetime cap.memoryJournalStore/fileJournalStore,resumeFromRunIdreplays the longest unchangedagent()prefix (multi-hop safe).Date/Math.random/process/require/fs/eval/Functionblocked in string scripts, plus athis-based escape block.default/Explore/code-reviewer, custom types, per-agent model override.workdirIsolation(default) +gitWorktreeIsolation(fallback outside a repo).workflowTool+WORKFLOW_TOOL_GUIDE+orchestratorAgentso anyagent()can author-and-run workflows.orchestrate()rebuilt on the runtime — public API unchanged, existing suites pass as-is.docs/landlord/pages + a dynamic-workflow example, VitePress + README wiring, and a changeset.Test Plan
pnpm -C packages/landlord test— 82/82 across 23 filespnpm -C packages/landlord typecheck— cleanpnpm -C packages/landlord exec biome lint src test— 0 errorspnpm -C packages/landlord build— emitsdist/workflow/index.js+ typespnpm docs:build— succeeds, no broken linksorchestrate/tenant/decompose/validate/contractsuites pass unchanged