Agent Pipeline¶
Consystence uses an automated AI agent pipeline to process GitHub issues. Issues are triaged, dispatched to an agent runner, implemented by Claude Code, and submitted as pull requests — with human review at each stage.
Pipeline overview¶
graph LR
I[GitHub Issue] --> T[n8n Triage]
T -->|agent:go label| D[n8n Executor]
D -->|SSH| R[Docker Agent Runner]
R -->|Claude Code| PR[Pull Request]
PR --> Review[Human Review] - Issue created — a developer or product manager opens a GitHub issue with a clear description.
- n8n triage — an n8n workflow triggers on the
needs-triagelabel. Claude Sonnet classifies the issue (bug, feature, docs, etc.), estimates size, and recommends accept/reject. - Human approval — a maintainer reviews the triage recommendation and applies the
agent:golabel to approve. - n8n executor — a second n8n workflow triggers on the
agent:golabel. It dispatches the issue to the Docker agent runner via SSH. - Docker agent runner — a container spins up with the repository cloned, Claude Code installed, and the issue context injected.
- Claude Code — processes the issue using the skills repository, creates a branch, implements the changes, and opens a pull request.
- Human review — a developer reviews the PR, requests changes if needed, and merges.
Label state machine¶
Issues move through a defined label progression:
stateDiagram-v2
[*] --> needs_triage: Issue created
needs_triage --> ready: Triage approved
needs_triage --> wont_do: Triage rejected
ready --> agent_go: Agent dispatched
agent_go --> in_progress: Agent started
in_progress --> review: PR opened
review --> done: PR merged
review --> in_progress: Changes requested | Label | Meaning |
|---|---|
needs-triage | New issue awaiting classification |
ready | Triaged and approved, waiting for dispatch |
agent:go | Approved for agent processing |
in-progress | Agent is actively working |
review | PR opened, awaiting human review |
Issue sizing¶
Issues should be sized for single-agent processing:
| Size | Scope | Example |
|---|---|---|
| XS | Single file, < 20 lines | Fix a typo, update a config value |
| S | 1–3 files, < 100 lines | Add a new API endpoint, fix a bug |
| M | 3–8 files, < 500 lines | Add a new device type, implement a feature |
| L | 8+ files, > 500 lines | New section of documentation, refactor a subsystem |
Tip
Prefer smaller issues. An M-sized issue that the agent completes in one pass is better than an L-sized issue that requires multiple rounds of revision.
Skills repository¶
The agent runner loads a skills repository that provides Claude Code with domain-specific knowledge:
| Category | Count | Examples |
|---|---|---|
| Skills | 33 | golang-patterns, dotnet-patterns, python-testing |
| Commands | 38 | /commit, /review-pr, /pull-issue, /triage |
| Agents | 16 | planner, architect, tdd-guide, code-reviewer |
| Rules | 28 | Coding style, testing, security, git workflow |
Skills are loaded as context when the agent processes an issue. They ensure consistent code style, test coverage, and architectural decisions across all agent-generated PRs.
Writing good issues¶
Issues that are well-structured produce better agent output:
Do¶
- Clear title — imperative verb + what changes (e.g. "Add bearing temperature trend to pump faceplate")
- Acceptance criteria — bullet list of what "done" looks like
- Context — link to relevant code files, existing behaviour, screenshots
- Constraints — mention files that should NOT be modified
- Size estimate — use XS/S/M/L labels
Don't¶
- Vague descriptions ("make the UI better")
- Multiple unrelated changes in one issue
- Implementation details that over-constrain the agent
- Dependencies on other incomplete issues
Example¶
## Add bearing temperature trend to pump faceplate
### Context
The centrifugal pump faceplate (`consystence.pump.centrifugal/components/faceplate.yaml`)
shows current bearing temperatures but no historical trend.
### Acceptance criteria
- [ ] Add a TrendChart component below the MetricCards
- [ ] Chart shows BearingTempDE and BearingTempNDE over the last 1 hour
- [ ] Chart auto-updates via SignalR tag subscription
- [ ] Existing layout and functionality unchanged
### Size: S