|
| 1 | +# 📚 Kogmios Agent Documentation Index |
| 2 | + |
| 3 | +> **For AI Agents:** Read this file first to understand available documentation and when to reference each resource. |
| 4 | +
|
| 5 | +This folder contains documentation for assisting with development on the Kogmios project (Kotlin implementation of an Ogmios client). Use this index to quickly navigate to the relevant documentation for your current task. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## 🗺️ Quick Navigation |
| 10 | + |
| 11 | +| Folder | Purpose | When to Read | |
| 12 | +|--------|---------|--------------| |
| 13 | +| [`/system`](./system/) | Architecture, build/publish, design patterns | **First**, for any architectural decisions or understanding system design | |
| 14 | +| [`/task`](./task/) | PRDs and implementation plans history | When implementing new features similar to past work | |
| 15 | +| [`/SOPs`](./SOPs/) | Standard Operating Procedures | When encountering known issues or following established patterns | |
| 16 | +| [`/workflows`](./workflows/) | Step-by-step development workflows | When executing specific development tasks | |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## 📁 Folder Details |
| 21 | + |
| 22 | +### `/system` — Architecture & Patterns |
| 23 | + |
| 24 | +**The source of truth for major architectural decisions.** |
| 25 | + |
| 26 | +Read these files to understand: |
| 27 | +- Overall system architecture and component relationships |
| 28 | +- Client/protocol layout and data models |
| 29 | +- Build, publish, and versioning expectations |
| 30 | +- Integration patterns with Ogmios/Cardano |
| 31 | + |
| 32 | +Files: |
| 33 | +- `architecture.md` — System overview, modules, protocols, data flow |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +### `/task` — Implementation History |
| 38 | + |
| 39 | +**Successful PRDs and implementation plans for reference.** |
| 40 | + |
| 41 | +Before implementing a feature: |
| 42 | +1. Check if a similar feature was implemented before |
| 43 | +2. Use past plans as templates for consistency |
| 44 | +3. Follow established patterns from successful implementations |
| 45 | + |
| 46 | +This folder uses subdirectories per major feature/task. |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +### `/SOPs` — Standard Operating Procedures |
| 51 | + |
| 52 | +**Learnings from resolved issues and best practices.** |
| 53 | + |
| 54 | +When an issue is resolved or a complex integration succeeds: |
| 55 | +1. Document the step-by-step solution |
| 56 | +2. Include common pitfalls and how to avoid them |
| 57 | +3. Reference related code or configuration |
| 58 | + |
| 59 | +**To create a new SOP**, ask the agent: |
| 60 | +> "Generate SOP for [task/integration name]" |
| 61 | +
|
| 62 | +--- |
| 63 | + |
| 64 | +### `/workflows` — Development Workflows |
| 65 | + |
| 66 | +**Step-by-step guides for common development tasks.** |
| 67 | + |
| 68 | +Available workflows: |
| 69 | + |
| 70 | +| Workflow | Description | Trigger | |
| 71 | +|----------|-------------|---------| |
| 72 | +| [`build.md`](./workflows/build.md) | Build project | `/build` | |
| 73 | +| [`test.md`](./workflows/test.md) | Run tests | `/test` | |
| 74 | +| [`backend_dependencies.md`](./workflows/backend_dependencies.md) | Check dependency updates | `/backend_dependencies` | |
| 75 | +| [`update-doc.md`](./workflows/update-doc.md) | Update documentation | `/update-doc` | |
| 76 | + |
| 77 | +--- |
| 78 | + |
| 79 | +## 🏗️ Project Overview |
| 80 | + |
| 81 | +**Kogmios** is a Kotlin client implementation for the Ogmios WebSocket interface. It wraps Ogmios JSON-WSP messages into typed models and uses coroutines for async operations. |
| 82 | + |
| 83 | +### Technology Stack |
| 84 | + |
| 85 | +| Layer | Technology | Notes | |
| 86 | +|-------|------------|-------| |
| 87 | +| **Language** | Kotlin 2.x on Java 21 | Kotlin JVM library | |
| 88 | +| **Networking** | Ktor client (CIO + websockets) | WebSocket communication | |
| 89 | +| **Serialization** | kotlinx-serialization | JSON-WSP payloads | |
| 90 | +| **Concurrency** | Kotlin coroutines | Suspended client calls | |
| 91 | +| **Logging** | Logback, Commons Logging | Client logging | |
| 92 | +| **Build** | Gradle (Kotlin DSL) | Single module | |
| 93 | + |
| 94 | +### Module Overview |
| 95 | + |
| 96 | +``` |
| 97 | +kogmios |
| 98 | +└── src/ |
| 99 | + ├── main/kotlin/io/newm/kogmios/... |
| 100 | + └── test/kotlin/io/newm/kogmios/... |
| 101 | +``` |
| 102 | + |
| 103 | +### Client Types |
| 104 | + |
| 105 | +Kogmios exposes four logical clients: |
| 106 | +- `StateQuery` |
| 107 | +- `TxSubmit` |
| 108 | +- `TxMonitor` |
| 109 | +- `ChainSync` |
| 110 | + |
| 111 | +--- |
| 112 | + |
| 113 | +## ⚡ Quick Commands |
| 114 | + |
| 115 | +### Build & Test |
| 116 | +```bash |
| 117 | +# Build |
| 118 | +./gradlew build |
| 119 | + |
| 120 | +# Run tests |
| 121 | +./gradlew test |
| 122 | +``` |
| 123 | + |
| 124 | +### Code Quality |
| 125 | +```bash |
| 126 | +# Lint check |
| 127 | +./gradlew ktlintCheck |
| 128 | + |
| 129 | +# Auto-fix formatting |
| 130 | +./gradlew ktlintFormat |
| 131 | +``` |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +## 🧩 Skills |
| 136 | + |
| 137 | +**Skills are reusable instructions the agent can load with the `skill` tool.** |
| 138 | + |
| 139 | +Current status: |
| 140 | +- `git-commit-formatter` — Formats git commit messages to Conventional Commits when asked to commit or draft commit messages. See `.agent/skills/git-commit-formatter/SKILL.md`. |
| 141 | + |
| 142 | +If skills are added, list them here with a short description and usage guidance. |
| 143 | + |
| 144 | +## 🔐 Security Notes |
| 145 | + |
| 146 | +- Never commit secrets or API keys |
| 147 | +- Avoid checking in credentials for Ogmios nodes |
0 commit comments