feat: implement model domain layer with Echo reference model#2
Merged
Conversation
Add the foundational model system for swamp, implementing domain-driven design principles with a clean separation between domain, infrastructure, and presentation layers. Domain layer: - ModelType: value object for model type identifiers with normalized paths - ModelInput: entity for model input data stored as YAML - ModelResource: entity for resource data with lifecycle tracking - Model registry for registering and looking up model implementations - Echo model as a reference implementation for testing Infrastructure layer: - YamlInputRepository: persists model inputs to inputs/<type>/<id>.yaml - YamlResourceRepository: persists resources to resources/<type>/<id>.yaml CLI: - `model create <type> <name>` command to create new model inputs - Supports both interactive and JSON output modes Presentation: - ModelCreateOutput component for displaying creation results - ErrorOutput component for consistent error presentation Design documentation: - High-level architecture overview - Detailed model specification with types, inputs, methods, and resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
stack72
approved these changes
Jan 28, 2026
3 tasks
This was referenced Mar 5, 2026
2 tasks
6 tasks
stack72
added a commit
that referenced
this pull request
Mar 17, 2026
… bundling failure - Move bundleSourceFactory call inside the non-raw driver branch so raw executions never trigger self-contained bundling (HIGH #2) - Switch to promise-based memoization to avoid duplicate concurrent builds - Restore error handling: log a warning and rethrow on bundling failure, resetting the cached promise so subsequent calls can retry (HIGH #1) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 20, 2026
This was referenced Mar 30, 2026
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
model create <type> <name>CLI command with interactive and JSON output modesTest plan
deno task testto verify all unit and integration tests passdeno checkto verify type checking passesdeno lintto verify linting passesmodel create swamp/echo test-modelcreates input file correctlymodel create swamp/echo test-model --output jsonreturns JSON output🤖 Generated with Claude Code