@goodandready/dsh-agent-orchestrator 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GooDAnDReaDY
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,184 @@
1
+ # 📦 @goodandready/dsh-agent-orchestrator
2
+
3
+ <div align="center">
4
+
5
+ <h3>Multi-Agent Task Decomposition, DAG Workflow Orchestration & Prompt Caching Engine for DeepSeek Harness</h3>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@goodandready/dsh-agent-orchestrator"><img src="https://img.shields.io/npm/v/@goodandready/dsh-agent-orchestrator.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a>
9
+ <a href="LICENSE"><img src="https://img.shields.io/github/license/GooDAnDReaDY/dsh-agent-orchestrator.svg?style=for-the-badge&color=10b981&labelColor=064e3b" alt="license"></a>
10
+ <a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/DSH-Plugin-8b5cf6.svg?style=for-the-badge&labelColor=2e1065" alt="DSH Plugin"></a>
11
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-20%2B-f59e0b.svg?style=for-the-badge&labelColor=451a03" alt="Node version"></a>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://goodandready.app/"><img src="https://img.shields.io/badge/All_Author_Projects-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="All Author Projects"></a>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="README.md"><b>🇬🇧 English</b></a> •
20
+ <a href="README.ru.md"><b>🇷🇺 Русский</b></a> •
21
+ <a href="README.zh.md"><b>🇨🇳 中文说明</b></a>
22
+ </p>
23
+
24
+ <table align="center">
25
+ <tr>
26
+ <td align="center">
27
+ ⭐ <strong>If you like this plugin, please star it on GitHub</strong> — it shows me that the plugin is useful to you and motivates me to keep developing it.
28
+ <br><br>
29
+ 🐛 <strong>If you find a bug or would like to request a feature</strong>, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version.
30
+ </td>
31
+ </tr>
32
+ </table>
33
+
34
+ </div>
35
+
36
+ ---
37
+
38
+ ## ⚡ Overview & The Problem
39
+
40
+ Single-agent software engineering architectures suffer from cognitive overload when tasked with complex multi-stage projects: monolithic prompts conflate architecture, styling, core business logic, testing, and documentation into a single generation pass, leading to hallucinated contracts, regression bugs, and excessive token expenditure.
41
+
42
+ Furthermore, executing multiple subagents independently often resets the LLM KV-cache on each turn, forfeiting prefix cache reuse and incurring substantial latency and financial overhead.
43
+
44
+ **`@goodandready/dsh-agent-orchestrator`** introduces an autonomous multi-agent orchestration framework to DeepSeek Harness:
45
+
46
+ 1. **Intelligent Triage & Decomposition**: Analyzes high-level objectives from chat or Kanban cards and breaks them down into fine-grained stages across **12 specialized agent roles**.
47
+ 2. **DAG Execution Engine**: Schedules tasks based on Directed Acyclic Graph dependencies, running independent stages concurrently while strictly enforcing blocker gates.
48
+ 3. **KV-Cache / Prompt Caching Optimizer**: Guarantees byte-level prefix invariance for subagents sharing identical models, unlocking 80–90% prompt token cache hits and near-instant TTFT.
49
+ 4. **Strict Separation of Duties**: Backend implementation, UI interface design, and frontend client assembly are strictly isolated into distinct personas and execution stages.
50
+ 5. **Dual Surface Integration**: Dispatched natively via `/orchestrate` in DSH chat (with a sticky header milestone card) or via `@goodandready/dsh-kanban` task boards.
51
+
52
+ ---
53
+
54
+ ## 🏗️ Architecture
55
+
56
+ ```mermaid
57
+ graph TD
58
+ Trigger["Input Task<br/>(/orchestrate in Chat or Kanban Card)"] --> Main["Lead Orchestrator (Triage)"]
59
+
60
+ subgraph Engine ["DAG Engine & Prompt Caching"]
61
+ L1["Layer 1: Canonical Base Anchor (>1024 tokens)"]
62
+ L2["Layer 2: Shared Task Anchor"]
63
+ L3["Layer 3: Cumulative Artifacts (Append-Only)"]
64
+ L4["Layer 4: Role Suffix Directive"]
65
+ end
66
+
67
+ Main --> Engine
68
+
69
+ subgraph AgentPool ["Configured Agent Personas (Self-Contained in Settings)"]
70
+ R1["Technical Spec Analyst"]
71
+ R2["System Architect"]
72
+ R3["UI/UX Interface Designer"]
73
+ R4["Backend Developer"]
74
+ R5["Frontend Developer"]
75
+ R6["QA Automation Specialist"]
76
+ R7["Documentation Specialist"]
77
+ end
78
+
79
+ Engine --> AgentPool
80
+ AgentPool --> Delivery["Orchestrated Delivery<br/>(Header Utility Card & Kanban Sync)"]
81
+ ```
82
+
83
+ ---
84
+
85
+ ## 👥 12 Built-In Specialized Agent Roles
86
+
87
+ All agent profiles are **completely self-contained within plugin settings** (no external file dependencies):
88
+
89
+ | Role ID | Title | Specialization | Strict Boundaries |
90
+ |---|---|---|---|
91
+ | `spec` | Technical Spec Analyst | Requirements, Acceptance Criteria (DoD), Schemas | Never writes implementation or styling |
92
+ | `architecture` | System Architect | System Design, DESIGN.md, ADR, Modular Contracts | Never implements production code or deploys |
93
+ | `ui_design` | UI/UX Interface Designer | Layouts, Theme Tokens (`--dsw-alias-*`), Slots | Never writes backend Cordis services |
94
+ | `frontend` | Frontend Developer | React Components, Client Hooks, DOM Events | Never alters backend routes or DB schemas |
95
+ | `backend` | Backend Developer | Cordis Services, WebServer Routes, Data Store | Never writes client React JSX or styles |
96
+ | `fullstack` | Fullstack Integrator | Client-Server Contract Wiring, End-to-End Flow | Adheres strictly to modular limits |
97
+ | `qa_tests` | QA Automation Specialist | Unit Tests (`node:test`), Boundary Verification | Verifies without external network calls |
98
+ | `bugfix` | Hotfix & Triage Engineer | Root-Cause Diagnosis, Minimal Blast Radius Fixes | Never refactors unrelated code |
99
+ | `docs` | Documentation Specialist | Trilingual Documentation (en/ru/zh), Releases | Never overwrites previous documentation |
100
+ | `refactoring` | Refactoring Specialist | Complexity Reduction (YAGNI), Bundle Compression | Preserves backwards compatibility |
101
+ | `research` | Research & Spike Engineer | Technology Evaluation, Library Trade-Offs | Delivers analysis; never merges spike code |
102
+ | `devops` | DevOps & Tooling Engineer | Package Manifests, Build Verification, Systemd | Never exposes private network credentials |
103
+
104
+ ---
105
+
106
+ ## 🔄 Complexity Scenarios
107
+
108
+ 1. **Hotfix / Trivial (1 Stage)**: Instant defect elimination or single-parameter tweak.
109
+ 2. **Simple (2 Stages)**: Discussion & Spec $\rightarrow$ Targeted Execution.
110
+ 3. **Medium (3–4 Stages)**: Spec $\rightarrow$ UI Design $\rightarrow$ Frontend Code $\rightarrow$ QA Tests.
111
+ 4. **Complex (5–6 Stages)**: Spec $\rightarrow$ Architecture $\rightarrow$ UI Design $\rightarrow$ Implementation $\rightarrow$ QA $\rightarrow$ Trilingual Docs.
112
+ 5. **Enterprise / Deep R&D (7 Stages)**: Spike Research $\rightarrow$ Spec $\rightarrow$ Architecture $\rightarrow$ Parallel Backend & UI Design $\rightarrow$ Frontend Assembly $\rightarrow$ Comprehensive QA $\rightarrow$ Documentation Gate.
113
+ 6. **Custom DAG Scenarios**: Fully configurable in plugin settings with custom stages and blocker checkboxes.
114
+
115
+ ---
116
+
117
+ ## ⚡ Prompt Caching Mechanics
118
+
119
+ Modern LLMs (DeepSeek-V3, Claude 3.5 Sonnet, vLLM) cache prompt KV states strictly from the first token forward. If non-deterministic timestamps or random IDs are placed in the prompt header, cache hit rate drops to 0%.
120
+
121
+ `dsh-agent-orchestrator` enforces a **4-layer canonical layout**:
122
+ 1. **Layer 1: Static Base Anchor (>1024 tokens)**: Byte-identical guidelines and tools definition common across all agents.
123
+ 2. **Layer 2: Shared Task Anchor**: Stable description of user objective and target repository.
124
+ 3. **Layer 3: Cumulative Context (Append-Only)**: Outputs of predecessor stages appended in a deterministic sequence, preserving 100% of the preceding KV-cache.
125
+ 4. **Layer 4: Role Directive (Suffix)**: Role persona prompt, skills, and subtask-specific scope appended at the end.
126
+
127
+ This architecture delivers **80–95% cache hits** across subagents utilizing the same model, reducing TTFT and cutting token costs by ~90%.
128
+
129
+ ---
130
+
131
+ ## 💻 Usage
132
+
133
+ ### 1. In DSH Chat via Slash Command
134
+ ```text
135
+ /orchestrate Design and build a settings card for the finance plugin
136
+ ```
137
+
138
+ Explicit scenario selection:
139
+ ```text
140
+ /orchestrate complex Build a multi-tenant authentication provider
141
+ /orchestrate hotfix Fix null reference in store.js
142
+ ```
143
+
144
+ Short alias:
145
+ ```text
146
+ /orc Refactor state management
147
+ ```
148
+
149
+ ### 2. In @goodandready/dsh-kanban
150
+ - Open any card on the board.
151
+ - Click **[Собрать пайплайн / Assemble Pipeline]**.
152
+ - Select the complexity preset or allow auto-triage.
153
+ - The card automatically reflects stage transitions and advances to `Review` upon completion.
154
+
155
+ ---
156
+
157
+ ## 🧪 Verification & Automated Testing
158
+
159
+ Execute the native test suite (121 passing tests across 53 suites, zero network dependencies):
160
+
161
+ ```bash
162
+ node --test test/*.test.mjs
163
+ ```
164
+
165
+ Verify npm package bundle size compliance (<256 KiB threshold):
166
+
167
+ ```bash
168
+ npm pack --dry-run --json
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Visual verification
174
+
175
+ Production acceptance of v0.1.6 — Settings card, Dark and Light themes side by side:
176
+
177
+ ![dsh-agent-orchestrator v0.1.6 visual verification](media/visual-verification.png)
178
+
179
+ ---
180
+
181
+ ## 📄 License
182
+
183
+ MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
184
+
package/README.ru.md ADDED
@@ -0,0 +1,86 @@
1
+ # 📦 @goodandready/dsh-agent-orchestrator
2
+
3
+ <div align="center">
4
+
5
+ <h3>Мульти-агентная декомпозиция задач, DAG-оркестрация и оптимизатор Prompt Caching для DeepSeek Harness</h3>
6
+
7
+ <p align="center">
8
+ <a href="https://goodandready.app/"><img src="https://img.shields.io/badge/Все_проекты_автора-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="Все проекты автора"></a>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="README.md"><b>🇬🇧 English</b></a> •
13
+ <a href="README.ru.md"><b>🇷🇺 Русский</b></a> •
14
+ <a href="README.zh.md"><b>🇨🇳 中文说明</b></a>
15
+ </p>
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## ⚡ Обзор и решаемая проблема
22
+
23
+ При выполнении комплексных многоэтапных проектов один агент неизбежно сталкивается с перегрузкой контекста: в один монолитный запрос смешиваются архитектура, дизайн, верстка, бэкенд, тестирование и написание документации. Это приводит к галлюцинациям, нарушению контрактов и неоправданным затратам токенов.
24
+
25
+ Кроме того, запуск независимых субагентов обычно сбрасывает KV-кэш языковой модели на каждом шаге, теряя преимущества префиксного кэширования (Prompt Caching) и приводя к долгим задержкам ответа.
26
+
27
+ **`@goodandready/dsh-agent-orchestrator`** внедряет автономную мульти-агентную оркестрацию в DeepSeek Harness:
28
+
29
+ 1. **Триаж и декомпозиция**: Анализирует задачу из чата или карточки Канбана и разбивает её на этапы между **12 специализированными ролями агентов**.
30
+ 2. **Графовый DAG-движок**: Планирует задачи на основе направленного ациклического графа, исполняя независимые ветки параллельно и контролируя блокеры.
31
+ 3. **Оптимизатор Prompt Caching (KV-кэш)**: Гарантирует побайтовое совпадение префикса для агентов с одинаковыми моделями, обеспечивая 80–90% Cache Hit и моментальный старт генерации.
32
+ 4. **Строгое разделение труда**: Бэкенд, UI-дизайн и клиентский фронтенд строго изолированы по разным ролям и этапам.
33
+ 5. **Два режима работы**: Через команду `/orchestrate` в чате DSH (с плавающей карточкой прогресса в шапке) или через доску задач `@goodandready/dsh-kanban`.
34
+
35
+ ---
36
+
37
+ ## 👥 12 специализированных ролей агентов
38
+
39
+ Все профили агентов **хранятся и управляются исключительно внутри настроек плагина** (без внешних зависимостей от диска):
40
+ - **ТЗ-аналитик (`spec`)**: требования, критерии приёмки (DoD), границы задачи.
41
+ - **Архитектор (`architecture`)**: системный дизайн, DESIGN.md, ADR, модульные контракты.
42
+ - **UI/UX Дизайнер (`ui_design`)**: дизайн-система, CSS-переменные (`--dsw-alias-*`), слоты.
43
+ - **Фронтендер (`frontend`)**: компоненты React, хуки, клиентские состояния.
44
+ - **Бэкендер (`backend`)**: сервисы Cordis, роуты webServer, базы данных, хранилище.
45
+ - **Фуллстек-интегратор (`fullstack`)**: сквозная сборка контрактов клиент-сервер.
46
+ - **QA-инженер (`qa_tests`)**: модульные тесты (`node:test`), проверка граничных условий.
47
+ - **Hotfix-инженер (`bugfix`)**: диагностика и минимальный целевой фикс без регрессий.
48
+ - **Технический писатель (`docs`)**: трёхъязычная документация (en/ru/zh), релиз-ноутс.
49
+ - **Рефакторинг-специалист (`refactoring`)**: чистка кода (YAGNI, ponytail), оптимизация бандла (<250 Кб).
50
+ - **Research-инженер (`research`)**: оценка технологий, библиотек, сравнительные спайки.
51
+ - **DevOps-инженер (`devops`)**: манифесты пакетов, проверка сборки, systemd сервисы.
52
+
53
+ ---
54
+
55
+ ## 💻 Использование
56
+
57
+ ### 1. В чате DSH через слэш-команду
58
+ ```text
59
+ /orchestrate Сделай карточку настроек для плагина финансов
60
+ ```
61
+ С указанием сценария сложности:
62
+ ```text
63
+ /orchestrate complex Разработай систему очередей задач с бэком и веб-панелью
64
+ /orchestrate hotfix Исправь падение при null в store.js
65
+ ```
66
+ Быстрый алиас:
67
+ ```text
68
+ /orc Рефакторинг управления состоянием
69
+ ```
70
+
71
+ ### 2. В @goodandready/dsh-kanban
72
+ - Открой карточку задачи на доске.
73
+ - Нажми **[Собрать пайплайн]**.
74
+ - Выбери сценарий сложности или оставь авто-триаж.
75
+ - Карточка сама отразит этапы и перейдёт в `Review` по завершении.
76
+
77
+ ---
78
+
79
+ ## 🧪 Запуск тестов
80
+
81
+ ```bash
82
+ node --test test/*.test.mjs
83
+ ```
84
+
85
+ Лицензия: MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
86
+
package/README.zh.md ADDED
@@ -0,0 +1,64 @@
1
+ # 📦 @goodandready/dsh-agent-orchestrator
2
+
3
+ <div align="center">
4
+
5
+ <h3>面向 DeepSeek Harness 的多智能体任务分解、DAG 工作流编排与提示词缓存优化引擎</h3>
6
+
7
+ <p align="center">
8
+ <a href="https://goodandready.app/"><img src="https://img.shields.io/badge/作者所有项目-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="作者所有项目"></a>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="README.md"><b>🇬🇧 English</b></a> •
13
+ <a href="README.ru.md"><b>🇷🇺 Русский</b></a> •
14
+ <a href="README.zh.md"><b>🇨🇳 中文说明</b></a>
15
+ </p>
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## ⚡ 概述与解决的问题
22
+
23
+ 在执行复杂的多阶段工程任务时,单一智能体架构往往面临上下文过载:单一请求中混合了系统架构、界面设计、前端编码、后端逻辑、单元测试与文档编写,容易导致幻觉与契约不一致。
24
+
25
+ 此外,独立调用多个子智能体会导致每次推理重新建立 KV 缓存,无法重用提示词前缀缓存(Prompt Caching),造成严重的延迟与计算开销。
26
+
27
+ **`@goodandready/dsh-agent-orchestrator`** 为 DeepSeek Harness 带来了自主的多智能体编排框架:
28
+
29
+ 1. **智能分流与分解**:分析聊天或看板卡片的目标,将其分解并分发给 **12 个专用智能体角色**。
30
+ 2. **有向无环图 (DAG) 引擎**:基于依赖关系并行调度无阻塞任务,严格控制前置阶段。
31
+ 3. **提示词缓存优化 (KV Cache Optimizer)**:确保相同模型的智能体在字节级上共享规范前缀,实现 80–90% 的缓存命中率。
32
+ 4. **职责严格分离**:后端逻辑、界面设计与前端实现彼此独立,严禁单一智能体混同处理。
33
+ 5. **双重使用场景**:支持通过 DSH 聊天斜杠命令 `/orchestrate` 触发,或无缝嵌入 `@goodandready/dsh-kanban` 任务看板。
34
+
35
+ ---
36
+
37
+ ## 💻 使用方法
38
+
39
+ ### 1. 在 DSH 聊天中通过斜杠命令触发
40
+ ```text
41
+ /orchestrate 为财务插件设计并开发设置卡片
42
+ ```
43
+
44
+ 指定复杂度模式:
45
+ ```text
46
+ /orchestrate complex 开发带有后端和前端界面的任务排队系统
47
+ /orchestrate hotfix 修复 store.js 中的空指针异常
48
+ ```
49
+
50
+ 简短别名:
51
+ ```text
52
+ /orc 重构状态管理模块
53
+ ```
54
+
55
+ ---
56
+
57
+ ## 🧪 单元测试
58
+
59
+ ```bash
60
+ node --test test/*.test.mjs
61
+ ```
62
+
63
+ 许可证:MIT © [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
64
+
@@ -0,0 +1,5 @@
1
+ - insert:
2
+ - id: dsh-agent-orchestrator
3
+ name: '@goodandready/dsh-agent-orchestrator'
4
+ config: {}
5
+