-
Notifications
You must be signed in to change notification settings - Fork 0
Project Structure
viamu edited this page Mar 1, 2026
·
3 revisions
graph TD
CLI[Cli Layer] --> P[Pipeline Layer]
P --> S[Steps Layer]
S --> CL[Claude Layer]
P --> CF[Config Layer]
P --> UI[UI Layer]
CLI --> |RunCommand<br/>RunPipelineCommand| P
P --> |PipelineExecutor<br/>PipelineContext| S
S --> |DynamicStep<br/>ForeachStep<br/>ParallelStep<br/>UsePipelineStep| CL
CL --> |ClaudeCliRunner<br/>IClaudeRunner| EXT["βοΈ Claude Code CLI"]
code-genesis/
β
βββ π Solution.slnx
βββ π README.md
βββ π global.json # Pins .NET SDK version (10.0.103)
β
βββ π§ .github/
β βββ workflows/
β βββ ci.yml # GitHub Actions CI pipeline
β
βββ π examples/
β βββ hello-world.yml # Sample pipeline
β βββ foreach-parallel.yml # Foreach + parallel demo
β βββ parallel-foreach.yml # Parallel foreach demo
β βββ approval.yml # Approval step demo
β βββ fail-if-step.yml # fail_if post-check demo
β βββ use-pipeline/ # Pipeline composition demo
β β βββ main.yml # Parent pipeline
β β βββ analysis.yml # Reusable child pipeline
β βββ contexts/planner/ # Sample context bundle
β
βββ 𧬠CodeGenesis.Engine/ # Main project
β βββ Program.cs # Entry point, DI, Serilog, Spectre CLI
β β
β βββ π€ Claude/ # Claude CLI integration
β β βββ IClaudeRunner.cs # Abstraction for testability
β β βββ ClaudeCliRunner.cs # Spawns claude --print processes
β β βββ ClaudeCliOptions.cs # Configuration POCO
β β βββ ClaudeRequest.cs # Request model
β β βββ ClaudeResponse.cs # Response model + JSON parsing
β β
β βββ π» Cli/ # CLI commands
β β βββ RunCommand.cs # run (hardcoded pipeline)
β β βββ RunPipelineCommand.cs # run-pipeline (YAML-driven)
β β
β βββ π Config/ # Configuration & models
β β βββ PipelineConfig.cs # YAML deserialization models
β β βββ PipelineConfigLoader.cs # YAML loader + template resolver
β β βββ ContextBundleLoader.cs # Context bundles from directories
β β βββ AgentDefinition.cs # Agent config model
β β βββ McpServerConfig.cs # MCP stdio server config
β β βββ McpContextBuilder.cs # Builds MCP tools section for system prompt
β β βββ MarkdownFrontmatterParser.cs # YAML frontmatter from .md files
β β
β βββ π Pipeline/ # Core pipeline framework
β β βββ PipelineExecutor.cs # Runs steps sequentially
β β βββ PipelineContext.cs # Shared state between steps
β β βββ IPipelineStep.cs # Step interface
β β βββ IStepExecutor.cs # Interface for recursive execution
β β βββ CollectionParser.cs # JSON/CSV/newline collections
β β βββ StepResult.cs # Step output model
β β βββ RetryPolicy.cs # Retry configuration resolution
β β βββ CheckpointManager.cs # Resume/checkpoint persistence
β β
β βββ β‘ Steps/ # Step implementations
β β βββ DynamicStep.cs # YAML-driven dynamic step
β β βββ ForeachStep.cs # Sequential iteration
β β βββ ParallelStep.cs # Concurrent branches
β β βββ ParallelForeachStep.cs # Concurrent iteration
β β βββ ApprovalStep.cs # Interactive approval
β β βββ UsePipelineStep.cs # Pipeline composition (sub-pipeline)
β β βββ StepBuilder.cs # Builds step trees from YAML
β β βββ PlanStep.cs # Built-in planning step
β β βββ ExecuteStep.cs # Built-in execution step
β β βββ ValidateStep.cs # Built-in validation step
β β
β βββ π¨ UI/ # Console rendering
β βββ PipelineRenderer.cs # Spectre.Console output
β βββ ConsoleTheme.cs # Theme constants
β
βββ π§ͺ CodeGenesis.Engine.Tests/ # Unit tests
βββ Claude/
β βββ ClaudeResponseTests.cs
βββ Config/
β βββ McpServerConfigTests.cs
β βββ McpContextBuilderTests.cs
β βββ PipelineConfigLoaderTests.cs
β βββ StepEntryTests.cs
βββ Pipeline/
β βββ CollectionParserTests.cs
β βββ PipelineContextTests.cs
β βββ RetryPolicyTests.cs
β βββ StepResultTests.cs
βββ Steps/
βββ DynamicStepTests.cs
βββ UsePipelineStepTests.cs
| Pattern | Where | Description |
|---|---|---|
| Dependency Injection | Program.cs |
All services registered via Microsoft.Extensions.DependencyInjection
|
| Template Resolution | PipelineConfigLoader |
{{variable}} syntax resolved before each step |
| Step Composition | StepBuilder |
Recursive tree built from YAML config |
| Async/Cancellation | All steps |
CancellationToken propagated, Ctrl+C handled |
| Retry with Backoff | DynamicStep |
Configurable retry for timeouts, rate limit pauses for 429s |
| Interface Abstraction |
IClaudeRunner, IStepExecutor
|
Enables unit testing with mocks |
π Home
- π Getting Started
- π» CLI Reference
- π YAML Reference
- π Step Types
- π MCP Servers
- π¦ Context Bundles
- βοΈ Configuration
- ποΈ Project Structure
- π§ͺ Testing