Skip to content

Commit d476f11

Browse files
committed
gsd:docs write architecture and workflow state machine diagrams
1 parent 7224845 commit d476f11

2 files changed

Lines changed: 67 additions & 2 deletions

File tree

docs/architecture.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Architecture
2+
3+
The heart of the `gsd-orchestrator` is a durable State Machine built around the `WorkflowState` enumeration. It decomposes the massive complexity of an autonomous coding task into discrete, verifyable phases.
4+
5+
## Workflow State Machine
6+
7+
The orchestrator guarantees that no code is pushed to a PR without passing through `TestGenerating` and `Validating`.
8+
9+
```mermaid
10+
stateDiagram-v2
11+
[*] --> Idle
12+
13+
Idle --> Triaging : Issue Received
14+
Triaging --> Analyzing : Issue Classified
15+
Analyzing --> Branching : Action Plan Approved
16+
17+
Branching --> Editing : Branch Created
18+
Editing --> TestGenerating : Files Modified
19+
20+
TestGenerating --> Validating : xUnit Tests Written
21+
22+
Validating --> Committing : Tests Passed
23+
Validating --> Editing : Tests Failed (Feedback Loop)
24+
25+
Committing --> PrCreating : Commits Hashed
26+
PrCreating --> Reviewing : PR Opened
27+
28+
Reviewing --> Documenting : PR Approved by Agent
29+
Reviewing --> Editing : PR Rejected (Feedback Loop)
30+
31+
Documenting --> Done : Docs Generated
32+
33+
state Failed {
34+
[*] --> Recoverable
35+
[*] --> TerminalStopReason
36+
}
37+
38+
Analyzing --> Failed : Ambiguity
39+
Validating --> Failed : BudgetExhausted
40+
```
41+
42+
## Validation & SDLC Status
43+
44+
Beyond linear states, the Orchestrator maps operations to Software Development Life Cycle (SDLC) batches:
45+
- `Discovery` (Triaging, Analyzing)
46+
- `Design`
47+
- `Change` (Branching, Editing, TestGenerating)
48+
- `Assurance` (Validating, Reviewing)
49+
- `Closure` (Committing, PrCreating, Documenting)
50+
51+
If a phase reaches `ValidationStatus.Block`, the engine triggers a `TerminalStopReason` (e.g., `PolicyDenied`, `DestructiveAction`), rolling back the branch and alerting the human operator.

docs/index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1-
# gsd-orchestrator Documentation
1+
# GSD Orchestrator
22

3-
Welcome to the documentation for gsd-orchestrator.
3+
**GSD Orchestrator** is a highly resilient, state-driven workflow engine built on .NET 10. It is designed to autonomously translate GitHub Issues into tested, validated, and documented Pull Requests via an AI-native Control Plane (the Coding Autopilot System).
4+
5+
## Key Capabilities
6+
7+
1. **State Machine Durability:** The entire Issue-to-PR pipeline is governed by an explicit state machine, ensuring tasks can be interrupted and resumed without losing context.
8+
2. **AI Verification Loops:** Uses explicit `SdlcBatch` and `SdlcPhaseStatus` checkpoints to ensure code is validated, tested, and reviewed by autonomous personas before merging.
9+
3. **Multi-Agent Orchestration:** Delegates specific tasks to specialized AI Personas (e.g., `sdet-expert`, `python-expert`, `azure-architect`) using the `GLOBAL_AGENTS.md` router framework.
10+
11+
## Project Structure
12+
13+
- `src/GsdOrchestrator/Workflows`: Contains the core `.NET 10` State Machine and all transition handlers.
14+
- `src/GsdOrchestrator/Mcp`: The Model Context Protocol (MCP) dispatchers that interact with the local filesystem and GitHub API.
15+
- `src/GsdOrchestrator/Checkpointing`: State serialization logic for workflow durability.
16+
17+
To dive deeper into how the states are processed, see the [Architecture Guide](architecture.md).

0 commit comments

Comments
 (0)