Skip to content

Latest commit

 

History

History
238 lines (199 loc) · 14 KB

File metadata and controls

238 lines (199 loc) · 14 KB

koru — Documentation

This directory contains the full documentation for koru — a closed-loop refactor automation system for multi-repo workspaces.

Project root: README.md · Release notes: CHANGELOG.md

Reading order

For LLM agents starting a session in a koru-driven repository:

  1. agent-guide.md — full agent workflow guide (ticket lifecycle, validation gates, anti-patterns, troubleshooting). Start here if you are an LLM agent (Windsurf, Cursor, Claude Code).
  2. planfile-llm-guide.md — ticket-driven development with the planfile CLI. Covers ticket schema, labels, priority, sprint workflow.
  3. planfile-execution-gateway.md — design for making planfile.yaml the execution gateway for shell, MCP, API, human, and LLM actors.
  4. cli-examples.md — practical Taskfile + CLI examples for every common scenario (bootstrap, fix-alert, OpenRouter lane, multi-repo refactor).
  5. llm-tools/ — per-tool docs and install scripts for every component in the koru pipeline.
  6. semcod-ticket-sources.md — which semcod analysis tools can generate Planfile tickets directly or through Koru artifact adapters.
  7. agent-backends-architecture.md — layered map: plugin+socket, MCP, vendor CLIs, OS injectors (no single universal “wake LLM” API).
  8. autopilot-quickstart.md — how to drive your IDE's LLM chat from a terminal (koru autopilot), including plugin install repair, version drift checks, and strict runtime gates. Companion design doc: autopilot-design.md; formal control-plane protocol: IDE_PROTOCOL.md; open items in autopilot-roadmap.md.
  9. ide-router.md — how koru chooses the active IDE lane and keeps VS Code/VSCodium/Cursor/Windsurf/JetBrains/Zed separated.
  10. ide-isolation.md (PL) — granice izolacji lane/socket, dlaczego nie ma pełnego sandboxu między IDE i jak ustawić hardening, żeby uniknąć cross-lane chat/event leakage.
  11. autonomy-ide-cursor.md (PL) — autonomia koru vs Cursor IDE: luka funkcjonalna i checklista wdrożeniowa.
  12. photo-vql-jetbrains-wayland.md (PL) — pętla vdisplay + koru photo-VQL (observe→decide→act→verify), skrypty koru-drive-photo-vql.sh, guardy, PyCharm/Wayland — użyj tego do chat drive na pulpicie.
  13. autodiagnostics-auto-repair.md — implemented doctor, guided repair, autopilot host repair, and safe autonomous diagnostic-ticket loops.
  14. project-discovery-strategy.md — how an idle planfile queue triggers whole-project code2llm discovery, planfile ticket generation, and explicit IDE LLM status handoff.
  15. ../packages/coru/README.md — thin client layer (coru) that keeps user-facing commands stable while koruenv + koru internals can be refactored independently.
  16. package-extraction-plan.md — practical, incremental plan for moving selected modules from src to packages/*.

For human operators / DevOps:

  1. ../README.md — top-level project description and architecture overview.
  2. ci-github.md / ci-gitlab.md — minimalne pipeline’y smoke (Epic 2).
  3. llm-tools/README.md — tool catalog and when to use which.
  4. IDE matrix workflows — top-level README documents Docker Linux coverage plus native Ubuntu/Windows/macOS smoke workflows for all supported IDE lanes.
  5. ../templates/ — copy-paste config templates for pyqual.yaml, redup.toml, redsl.yaml, regix.yaml.

The two-mode philosophy

koru deliberately splits work into two modes:

Mode Purpose LLM Cost
Default: IDE-native normal ticket-driven dev work your IDE's LLM (Windsurf/Cursor/Claude Code) $0 (already paid for IDE)
Opt-in: OpenRouter automation lane scheduled smoke tests, headless auto-fix, infra validation OpenRouter (redsl improve, vallm validate --semantic) metered

This split is what makes koru economically viable for daily development: the heavy lifting happens in your IDE LLM (already a sunk cost), while the OpenRouter lane is reserved for things that genuinely benefit from out-of-band, automated, headless processing.

Pipeline phases

Phase Tools Doc
DETECT Prometheus alertmanager, blackbox-exporter, TestQL probes, redup, regix llm-tools/redup, llm-tools/regix, llm-tools/testql
PLAN planfile (ticket backlog), healing-webhook (auto-tickets) llm-tools/planfile, planfile-llm-guide.md
EXECUTE Windsurf / Cursor, shell LLM clients via TILLM, vallm, prefact llm-tools/cursor, llm-tools/vallm, llm-tools/prefact
VERIFY regix, ruff, pytest, TestQL, vallm tier-1/2 llm-tools/regix, llm-tools/vallm
HEAL healing-webhook, retry strategies (see reference deployment c2004)
AUTO (opt-in) redsl improve, llx fix llm-tools/redsl, llm-tools/llx

Quick reference for agents

# Entry point — pick the highest-priority ticket
task tickets:next

# Read ticket details
planfile ticket show PLF-XXX

# Edit code (your IDE's LLM does the work)
# ...

# Validate locally (no LLM API calls)
task quality:regix:local
task test
task monitor:probe

# Commit (pre-commit hooks do final validation)
git commit

# Mark done
task tickets:done -- PLF-XXX

Caveats

  • The default ticket-driven path is more stable than the opt-in OpenRouter automation lane. If task quality:improve or task monitor:test-heal fails but redsl improve <path> works locally, treat it as an infrastructure problem (compose / webhook wiring), not a product bug.
  • Configuration in templates/ is from a real production deployment (maskservice/c2004). Adjust redup.toml max_groups / max_lines to your project size before adopting blindly.

Full catalog (docs/*)

Complete index of documentation in this directory. Start with README.md for the project overview and CHANGELOG.md for release notes.

Onboarding & operators

Doc Summary
quickstart-10min.md Install, koru --init, first ticket, CI smoke
agent-guide.md LLM agent workflow (tickets, gates, anti-patterns)
cli-examples.md Taskfile + CLI recipes
ci-github.md Thin GitHub Actions smoke template
ci-gitlab.md GitLab CI equivalent
wizard-ux-spec.md koru wizard UX specification
roadmap-competition.md Competitive landscape (PL)
recipes/README.md Future recipe catalog sketch (PL)

Planfile & tickets

Doc Summary
planfile-llm-guide.md Ticket schema, labels, sprint workflow
planfile-execution-gateway.md planfile.yaml as execution gateway
semcod-ticket-sources.md Tools that generate planfile tickets
project-discovery-strategy.md Idle queue → code2llm discovery
post-run-verify.md Post-ticket verification checklist

Autopilot & IDE lanes

Doc Summary
autopilot-quickstart.md koru autopilot production setup
autopilot-design.md Control-plane design
autopilot-daemon-runtime.md Daemon lifecycle & sockets
autopilot-roadmap.md Open autopilot items
IDE_PROTOCOL.md Formal plugin↔daemon protocol
ide-router.md Lane selection (Cursor/VS Code/…)
ide-isolation.md Lane/socket isolation (PL)
ide-control-architecture.md IDE control stack: koruide, plugins, nlp2uri (PL)
ide-control-surfaces.md IDE command surfaces
ide-command-api-map.md Command API map (+ ide-command-api-map.yaml)
ide-strategy-contract.md Strategy contract per IDE
autonomy-ide-cursor.md Koru autonomy vs Cursor (PL)
photo-vql-jetbrains-wayland.md vdisplay photo-VQL loop, chat drive (PL)
autodiagnostics-auto-repair.md Doctor, repair, diagnostic loops
mcp-ide-flow.md MCP ↔ IDE integration flow
agent-backends-architecture.md Plugin, MCP, CLI, OS injector layers
../packages/coru/README.md coru client (calibration, doctor, auto)

DSL, API & architecture

Doc Summary
koru-drive-dsl.md Per-step autopilot drive trace ([DSL] lines)
koru-control-command-dsl.md Control-command DSL
korudsl-koruapi.md Dashboard / koruapi module map
koru_auto_vs_observe_up.md koru auto vs koru observe up
autonomy-interface-surface.md Autonomy public interfaces
cqrs-event-sourcing.md CQRS + event sourcing in koru
deployment-events.md DeploymentEvent telemetry
hexagonal-poc.md Hexagonal architecture POC
local-service.md Local service deployment notes
desktop-uri-orchestration.md nlp2uri MCP bridge (PL)
plans/nlp2uri-koruide-integration-refactor-plan.md nlp2uri ↔ koruide refactor plan (PL)
package-extraction-plan.md packages/* extraction plan

Tooling & pipeline

Doc Summary
llm-tools/README.md Per-tool install docs (planfile, regix, testql, …)
../testql-scenarios/README.md Scenario index (WUP-safe vs manual, desktop calibration)
ai-tool-support-roadmap-2026.md 2026 AI tool registry roadmap
ai-tool-registry-2026.yaml Machine-readable tool registry

ADRs & specs

Doc Summary
adr/adr-kide-001-koru-vs-koruide-boundary.md koru ↔ koruide boundary
adr/adr-auto-002-autonomous-decision-llm.md Autonomous decision LLM
specs/kide-002-koruide-api-v1.md koruide API v1
specs/kide-003-koruide-api-v2.md koruide API v2 (planned)
interfaces/koru-interface-registry.yaml Interface registry

Plans & refactoring

Doc Summary
refactoring/REFACTORING_PLAN.md KIDE refactor phases
refactoring_plan.md Legacy refactoring notes
refactor/ide-bridge-2026.md IDE bridge refactor (2026)
refactor/autonomy-refactor-continuation-plan-2026-05.md Autonomy refactor continuation
plans/capture-providers-refactor.md Capture provider refactor
plans/observation-mesh-plan.md Observation mesh plan
plans/nlp2uri-koruide-integration-refactor-plan.md nlp2uri IDE control integration (PL)