# pcastrov/stay-on-rails architecture

> Architecture diagram of the GitHub repository pcastrov/stay-on-rails, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pcastrov/stay-on-rails
- Repository: https://github.com/pcastrov/stay-on-rails

## Overview

stay-on-rails is a repository of two installable AI-agent instruction kits, not an application. A developer selects Full or Lite, initializes a project, then uses the edition’s documented spec-first workflow to implement and review changes; existing code can enter through retrofit. The graph reflects documented capabilities and command relationships in the README. No source excerpts were available, so internal command-to-command calls are not inferred.

Main entry points: [`sdd-full/.agents/commands/sdd.md`](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd.md) (Full SDD flow), [`sdd-full/README.md`](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/README.md) (SDD Full), [`sdd-lite/README.md`](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/README.md) (SDD Lite), [`sdd-full/.agents/commands/implement.md`](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/implement.md) (Implementation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editions["Kit editions"]
  node_full["SDD Full<br/>[README.md]"]
  node_lite["SDD Lite<br/>[README.md]"]
end

subgraph group_workflow["SDD workflow"]
  node_initialize["Initialize project<br/>[sdd-init.md]"]
  node_full_sdd["Full SDD flow<br/>[sdd.md]"]
  node_lite_sdd["Lite Micro-Spec<br/>[sdd.md]"]
  node_architect["Architecture planning<br/>[architect.md]"]
  node_planner["Planner subagent<br/>[1-planner.md]"]
  node_implement["Implementation<br/>[implement.md]"]
  node_implementer["Implementer subagent<br/>[2-implementer.md]"]
end

subgraph group_quality["Quality and maintenance"]
  node_review["Review and QA<br/>[review.md]"]
  node_qa_reviewer["QA reviewer<br/>[3-qa-reviewer.md]"]
  node_archive["Archive work<br/>[sdd-archive.md]"]
  node_retrofit["Retrofit code<br/>[retrofit.md]"]
  node_update["Update kit<br/>[sdd-update.md]"]
end

subgraph group_guidance["Reusable guidance"]
  node_docs_generator["SDD document templates<br/>[SKILL.md]"]
  node_stack_conventions["Stack conventions<br/>[SKILL.md]"]
end

node_developer(("Developer"))
node_agent_platforms["Agent platforms"]

node_developer -->|"chooses edition"| node_full
node_developer -->|"chooses edition"| node_lite
node_developer -->|"runs init"| node_initialize
node_developer -->|"runs command"| node_full_sdd
node_developer -->|"runs command"| node_lite_sdd
node_developer -->|"starts retrofit"| node_retrofit
node_developer -->|"runs update"| node_update
node_full -->|"provides workflow"| node_full_sdd
node_lite -->|"provides workflow"| node_lite_sdd
node_full_sdd -->|"plans work"| node_architect
node_full_sdd -->|"uses subagents"| node_planner
node_full_sdd -->|"builds changes"| node_implement
node_implement -->|"uses subagents"| node_implementer
node_developer -->|"runs command"| node_implement
node_developer -->|"runs review"| node_review
node_review -->|"uses subagents"| node_qa_reviewer
node_developer -->|"archives work"| node_archive
node_full -->|"offers templates"| node_docs_generator
node_full -->|"offers conventions"| node_stack_conventions
node_lite -->|"offers conventions"| node_stack_conventions
node_developer -->|"uses kit with"| node_agent_platforms

click node_full "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/README.md"
click node_lite "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/README.md"
click node_initialize "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd-init.md"
click node_full_sdd "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd.md"
click node_lite_sdd "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/.agents/commands/sdd.md"
click node_architect "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/architect.md"
click node_planner "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/subagents/1-planner.md"
click node_implement "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/implement.md"
click node_implementer "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/subagents/2-implementer.md"
click node_review "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/review.md"
click node_qa_reviewer "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/subagents/3-qa-reviewer.md"
click node_archive "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/.agents/commands/sdd-archive.md"
click node_retrofit "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/retrofit.md"
click node_update "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd-update.md"
click node_docs_generator "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/skills/sdd-docs-generator/SKILL.md"
click node_stack_conventions "https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/skills/stack-conventions/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_full,node_lite toneBlue
class node_initialize,node_full_sdd,node_lite_sdd,node_architect,node_planner,node_implement,node_implementer toneAmber
class node_review,node_qa_reviewer,node_archive,node_retrofit,node_update toneMint
class node_docs_generator,node_stack_conventions toneRose
class node_developer,node_agent_platforms toneIndigo
```

## Components

### Kit editions

- [SDD Full](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/README.md): `sdd-full/README.md`
- [SDD Lite](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/README.md): `sdd-lite/README.md`

### SDD workflow

- [Initialize project](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd-init.md): `sdd-full/.agents/commands/sdd-init.md`
- [Full SDD flow](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd.md): `sdd-full/.agents/commands/sdd.md`
- [Lite Micro-Spec](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/.agents/commands/sdd.md): `sdd-lite/.agents/commands/sdd.md`
- [Architecture planning](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/architect.md): `sdd-full/.agents/commands/architect.md`
- [Planner subagent](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/subagents/1-planner.md): `sdd-full/.agents/subagents/1-planner.md`
- [Implementation](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/implement.md): `sdd-full/.agents/commands/implement.md`
- [Implementer subagent](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/subagents/2-implementer.md): `sdd-full/.agents/subagents/2-implementer.md`

### Quality and maintenance

- [Review and QA](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/review.md): `sdd-full/.agents/commands/review.md`
- [QA reviewer](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/subagents/3-qa-reviewer.md): `sdd-full/.agents/subagents/3-qa-reviewer.md`
- [Archive work](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-lite/.agents/commands/sdd-archive.md): `sdd-lite/.agents/commands/sdd-archive.md`
- [Retrofit code](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/retrofit.md): `sdd-full/.agents/commands/retrofit.md`
- [Update kit](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/commands/sdd-update.md): `sdd-full/.agents/commands/sdd-update.md`

### Reusable guidance

- [SDD document templates](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/skills/sdd-docs-generator/SKILL.md): `sdd-full/.agents/skills/sdd-docs-generator/SKILL.md`
- [Stack conventions](https://github.com/pcastrov/stay-on-rails/blob/main/sdd-full/.agents/skills/stack-conventions/SKILL.md): `sdd-full/.agents/skills/stack-conventions/SKILL.md`

### Other components

- **Developer**
- **Agent platforms**

## Connections

- Developer → SDD Full: chooses edition (evidence: `README.md`)
- Developer → SDD Lite: chooses edition (evidence: `README.md`)
- Developer → Initialize project: runs init (evidence: `README.md`)
- Developer → Full SDD flow: runs command (evidence: `README.md`)
- Developer → Lite Micro-Spec: runs command (evidence: `README.md`)
- Developer → Retrofit code: starts retrofit (evidence: `README.md`)
- Developer → Update kit: runs update (evidence: `README.md`)
- SDD Full → Full SDD flow: provides workflow (evidence: `README.md`)
- SDD Lite → Lite Micro-Spec: provides workflow (evidence: `README.md`)
- Full SDD flow → Architecture planning: plans work (evidence: `README.md`)
- Full SDD flow → Planner subagent: uses subagents (evidence: `README.md`)
- Full SDD flow → Implementation: builds changes (evidence: `README.md`)
- Implementation → Implementer subagent: uses subagents (evidence: `README.md`)
- Developer → Implementation: runs command (evidence: `README.md`)
- Developer → Review and QA: runs review (evidence: `README.md`)
- Review and QA → QA reviewer: uses subagents (evidence: `README.md`)
- Developer → Archive work: archives work (evidence: `README.md`)
- SDD Full → SDD document templates: offers templates (evidence: `README.md`)
- SDD Full → Stack conventions: offers conventions (evidence: `README.md`)
- SDD Lite → Stack conventions: offers conventions (evidence: `README.md`)
- Developer → Agent platforms: uses kit with (evidence: `README.md`)
