Architecture Overview¶
TcKit uses a ports & adapters (hexagonal) architecture.
Claude Code
│
▼ (MCP protocol)
MCP Server (Python, Docker)
│
▼ (port interfaces — ABCs)
┌──────────────────────────────────────────────────────┐
│ ProjectReader ProjectWriter BuildRunner │
│ TestRunner DocGenerator DocsSearcher │
└──────────────────────────────────────────────────────┘
│ │ │
▼ ▼ ▼
blark_reader automation_writer xae_com_builder
(Docker) (bridge → COM) (bridge → COM)
│
▼
TwinCAT XAE
│
▼
PLC / VM (ADS)
The bridge split¶
The Windows bridge service (bridge/Start-Bridge.ps1) runs natively on the Windows machine with XAE installed. The Docker container calls the bridge for anything requiring COM or XAE.
This means:
- The Docker container has no Windows dependency
- Laptop (read-only mode) works without the bridge running
- The bridge is the only Windows-specific component
The adapter isolation rule¶
Adapters may only import from tckit.ports and stdlib. Never from each other.
This is enforced by linting (ruff check). If you need to share logic between adapters, put it in tckit/utils/ and import that — never adapter-to-adapter.
Adding a new adapter¶
See Contributing for the full process.
- Create the file in the correct
adapters/subdirectory - Import only from
tckit.portsand stdlib - Implement all abstract methods from the port
- Register it in
tckit/config.py - Add the config name to
config.example.json - Write unit tests in
tests/unit/ - Document it in
docs/content/adapters/