Add Prose format support for pipeline templates#2
Open
terraboops wants to merge 1 commit intomainfrom
Open
Conversation
Add support for .prose files alongside .yaml for pipeline templates. Both formats are co-equal — they produce the same internal pipeline dict and can coexist in pipeline-templates/. YAML remains the default. New modules: - trellis/core/prose_parser.py: Lark-based parser and emitter for the Prose pipeline subset (pipeline/session/parallel/gate blocks) - trellis/core/pipeline_format.py: format-aware load/save/find helpers Changes: - Pipeline routes use format-aware helpers instead of direct yaml calls - Dashboard shows format badge (YAML/Prose) per template - New template form includes format selector - Updates preserve the existing file's format - New CLI command: trellis pipelines-to-prose (with --dry-run) - Reference default.prose shipped in package defaults - Docs updated throughout (README, pipelines.md, architecture.md) The pool scheduler and TLA+ spec are completely unaffected — they only read the pipeline dict from status.json, never template files. https://claude.ai/code/session_01VuaBTgXWpJs7GWdPCMiMRv
5 tasks
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
Introduces Prose, a declarative orchestration language for defining pipeline templates alongside the existing YAML format. Both formats produce identical internal pipeline structures and are fully interchangeable.
Key Changes
New Prose parser (
trellis/core/prose_parser.py): Lark-based parser that converts.prosefiles to the canonical pipeline dict. Includes:parse_pipeline_prose()to load Prose filesemit_pipeline_prose()to serialize pipelines back to Prose formatFormat abstraction layer (
trellis/core/pipeline_format.py): Unified interface for loading/saving both formats:detect_format()determines format from file extensionload_pipeline()handles both.proseand.yaml/.ymlfilessave_pipeline()writes in either formatfind_template()searches for templates with format fallback priorityWeb API updates (
trellis/web/api/routes/pipelines.py):.prosefiles alongside YAMLCLI command (
trellis/cli.py): Newpipelines-to-prosecommand to batch-convert existing YAML templates to Prose format with optional dry-run modeFrontend updates (
trellis/web/frontend/templates/):Documentation (
docs/,README.md): Comprehensive examples of both formats with side-by-side comparisons and conversion guidanceTests: Full test coverage for parser, emitter, and format detection with roundtrip validation
Dependencies: Added
lark>=1.1for parsingImplementation Details
pipeline NAME:,session:,gate:,parallel:,description:{name, description, agents, post_ready, parallel_groups, gating}.proseover.yaml/.ymlwhen multiple formats exist for the same namehttps://claude.ai/code/session_01VuaBTgXWpJs7GWdPCMiMRv