architectural-orchestrator 1.1.0
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/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +80 -0
- package/SKILL.md +46 -0
- package/bin/orchestrate.js +81 -0
- package/index.js +8 -0
- package/package.json +33 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.1.0] - 2026-04-08
|
|
4
|
+
|
|
5
|
+
### ✨ 新特性 (Features)
|
|
6
|
+
- **Unified Orchestrator**: 将原有的“代码重构”能力 (Architectural Orchestrator) 升级为“通用架构化”能力。
|
|
7
|
+
- **跨领域调度支持**: 明确支持 `browser`, `bash`, `explore`, `general` 四类 Agent 的分布式协作逻辑。
|
|
8
|
+
- **任务看板建模**: 强调使用 `task_create` 和 `addBlockedBy` 进行依赖拓扑建模。
|
|
9
|
+
- **CLI 原型设计**: 引入了 `orchestrate` CLI 命令集,方便在本地环境快速管理架构任务。
|
|
10
|
+
|
|
11
|
+
### 🏗️ 架构优化 (Architecture)
|
|
12
|
+
- **上下文防污染**: 强制执行子代理预处理原则,保护主进程 Token。
|
|
13
|
+
- **原子性原则**: 细化了任务拆解的标准。
|
|
14
|
+
|
|
15
|
+
## [1.0.0] - 2026-04-08
|
|
16
|
+
|
|
17
|
+
### 🚀 初始发布 (Initial Release)
|
|
18
|
+
- **Architectural Orchestrator**: 初始版本的代码重构与架构化能力。
|
|
19
|
+
- **Sub-agent 调度机制**: 建立了基础的多代理分工模型。
|
|
20
|
+
- **GitHub 集成**: 完成了 Skill 的仓库初始化。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 adminlove520
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Unified Orchestrator (Architectural Orchestrator)
|
|
2
|
+
|
|
3
|
+
> **"Transform Chaos into Architecture."**
|
|
4
|
+
|
|
5
|
+
`Unified Orchestrator` 是一款为大模型 (LLM) 代理设计的架构化任务管理框架。它通过标准化的“信息解构”、“战略规划”和“分布式执行”流程,将任何复杂、模糊的大型任务转化为可控、闭环的原子任务集。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🌟 核心价值
|
|
10
|
+
|
|
11
|
+
- **逻辑坍缩 (Logic Collapse)**: 将模糊的“大目标”坍缩为具体的“原子任务”。
|
|
12
|
+
- **上下文纯净 (Context Purity)**: 通过多代理 (Sub-agents) 隔离高噪声任务,保护主进程的推理质量。
|
|
13
|
+
- **状态持久化 (Persistence)**: 利用 Task 系统确保任务在跨会话中保持真实进度。
|
|
14
|
+
- **闭环验证 (Closed-loop Verification)**: 强制执行自动化验收,确保最终产出符合最初定义的契约。
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 🚀 核心工作流
|
|
19
|
+
|
|
20
|
+
1. **Phase 1: Deep Discovery** - 深度探索与范围界定。
|
|
21
|
+
2. **Phase 2: Strategic Tasking** - 战略分工与依赖建模。
|
|
22
|
+
3. **Phase 3: Domain-Specific Execution** - 分布式领域执行。
|
|
23
|
+
4. **Phase 4: Synthesis & Verification** - 综合汇总与交叉验证。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📦 安装与集成
|
|
28
|
+
|
|
29
|
+
### 1. 作为 Agent Skill 集成
|
|
30
|
+
将 `SKILL.md` 放入您的 Accio/Claude 代理的技能目录即可:
|
|
31
|
+
`~/.accio/agents/<agent-id>/agent-core/skills/architectural-orchestrator/`
|
|
32
|
+
|
|
33
|
+
### 2. 作为 CLI 工具使用
|
|
34
|
+
如果您在本地开发环境中使用,可以通过以下方式快速开始(需 Node.js):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# 进入目录
|
|
38
|
+
cd architectural-orchestrator
|
|
39
|
+
|
|
40
|
+
# 初始化 CLI
|
|
41
|
+
npm link
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🛠️ CLI 命令预览
|
|
47
|
+
|
|
48
|
+
| 命令 | 描述 |
|
|
49
|
+
| :--- | :--- |
|
|
50
|
+
| `orchestrate init` | 在当前目录下初始化监控器项目结构 |
|
|
51
|
+
| `orchestrate task <name>` | 快速创建一个原子任务 |
|
|
52
|
+
| `orchestrate status` | 查看当前所有架构任务的状态看板 |
|
|
53
|
+
| `orchestrate analyze <path>` | 对指定文件或目录进行架构分析并生成矩阵 |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 📂 推荐项目结构 (重构后)
|
|
58
|
+
|
|
59
|
+
本框架建议的大型项目重构后结构:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
src/
|
|
63
|
+
├── core/ # 核心逻辑调度器
|
|
64
|
+
├── monitors/ # 采集源插件集 (API, Web, RSS)
|
|
65
|
+
├── processors/ # 数据处理与清洗 (Translation, Blacklist)
|
|
66
|
+
├── notifiers/ # 通道推送插件 (DingTalk, Feishu, Discord)
|
|
67
|
+
├── storage/ # 持久化存储层 (SQLite, Redis)
|
|
68
|
+
└── models/ # 统一的数据模型规范
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 📜 许可证
|
|
74
|
+
|
|
75
|
+
[MIT License](LICENSE) - 自由使用,自由构建。
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 👨💻 作者
|
|
80
|
+
**Accio (Powered by adminlove520)** - 您的智能架构伙伴。
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Skill: Unified Orchestrator (Architectural Orchestrator)
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
这个 Skill 赋予 Agent 处理任何复杂、多阶段、高不确定性任务的能力。它不仅限于编程 (Coding),而是通过标准化的“信息解构”、“战略规划”和“分布式执行”流程,确保任何复杂问题的解决都具备架构级的严谨性和闭环性。
|
|
5
|
+
|
|
6
|
+
## Trigger Keywords
|
|
7
|
+
- 重构 / Refactor
|
|
8
|
+
- 复杂任务 / Complex Task
|
|
9
|
+
- 深度研究 / Deep Research
|
|
10
|
+
- 多阶段规划 / Multi-stage Planning
|
|
11
|
+
- 架构设计 / Architecture Design
|
|
12
|
+
- 自动化流程 / Automation Flow
|
|
13
|
+
- 项目管理 / Project Management
|
|
14
|
+
|
|
15
|
+
## Core Workflow (通用架构化流程)
|
|
16
|
+
|
|
17
|
+
### Phase 1: Deep Discovery & Scoping (深度探索与范围界定)
|
|
18
|
+
1. **全景调研**: 根据任务类型(代码、市场、技术、文档),调度 `explore` 或 `browser` 代理收集全量背景数据。
|
|
19
|
+
2. **逻辑解构**: 从海量原始信息中提取核心要素,明确输入 (Input)、约束 (Constraints) 和交付物标准 (Definition of Done)。
|
|
20
|
+
|
|
21
|
+
### Phase 2: Strategic Tasking & Dependency Mapping (战略分工与依赖建模)
|
|
22
|
+
1. **看板建立**: 调用 `task_create` 初始化任务看板,赋予任务持久化状态。
|
|
23
|
+
2. **原子化拆解**: 将复杂大目标拆解为“单次交互可闭环”的原子任务。每个任务必须有明确的验收标准。
|
|
24
|
+
3. **依赖建模**: 使用 `addBlockedBy` 建立任务间的拓扑逻辑,识别关键路径 (Critical Path)。
|
|
25
|
+
|
|
26
|
+
### Phase 3: Domain-Specific Execution (分布式领域执行)
|
|
27
|
+
精准调度不同能力的 Sub-agents:
|
|
28
|
+
- **`explore`**: 负责静态资源(代码、本地文件、日志)的深度分析。
|
|
29
|
+
- **`browser`**: 负责动态信息(网页实时数据、API 调试、三方服务验证)。
|
|
30
|
+
- **`bash`**: 负责环境构建、脚本执行、物理操作、自动化测试。
|
|
31
|
+
- **`general`**: 负责逻辑综合、长文撰写、模块开发。
|
|
32
|
+
|
|
33
|
+
### Phase 4: Synthesis & Cross-Verification (综合汇总与交叉验证)
|
|
34
|
+
1. **结果归集**: 从 `delivery_path` 收集所有分布式产出,进行逻辑对齐。
|
|
35
|
+
2. **闭环验证**: 通过子代理或自动化脚本进行最终验收,确保所有原子任务的合集满足最初的交付标准。
|
|
36
|
+
3. **交付报告**: 生成最终的执行摘要,确认所有 Task 的完成状态。
|
|
37
|
+
|
|
38
|
+
## Best Practices
|
|
39
|
+
- **上下文防污染**: 严禁在主进程中直接处理超过 1000 行的原始数据。必须委派子代理进行预处理。
|
|
40
|
+
- **原子性原则**: 每一个 Task 的描述必须清晰到“足以让一个零背景的子代理独立完成”。
|
|
41
|
+
- **并行最大化**: 只要没有依赖关系,必须在同一个 Turn 中并行启动所有子代理。
|
|
42
|
+
|
|
43
|
+
## Tools Used
|
|
44
|
+
- `task_create / task_update / task_list`
|
|
45
|
+
- `sessions_spawn / sessions_send / sessions_history`
|
|
46
|
+
- `glob / grep / read / web_search / web_fetch`
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Orchestrate CLI - A companion tool for Unified Orchestrator Skill
|
|
5
|
+
*
|
|
6
|
+
* Provides quick helper commands to manage architectural tasks.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
const [, , command, ...args] = process.argv;
|
|
13
|
+
|
|
14
|
+
const showHelp = () => {
|
|
15
|
+
console.log(`
|
|
16
|
+
🚀 Unified Orchestrator CLI (v1.1.0)
|
|
17
|
+
|
|
18
|
+
Usage:
|
|
19
|
+
orchestrate <command> [args]
|
|
20
|
+
|
|
21
|
+
Commands:
|
|
22
|
+
init 初始化符合架构标准的项目结构 (src/core, monitors, processors...)
|
|
23
|
+
task <name> 创建一个原子任务描述 (生成 Markdown 任务单)
|
|
24
|
+
analyze <path> [Agent 专用] 分析指定路径并生成功能架构矩阵
|
|
25
|
+
status 列出当前项目的架构任务看板状态
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
orchestrate init
|
|
29
|
+
orchestrate task "Implement Telegram Notifier"
|
|
30
|
+
`);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const commands = {
|
|
34
|
+
init: () => {
|
|
35
|
+
const folders = [
|
|
36
|
+
'src/core',
|
|
37
|
+
'src/monitors',
|
|
38
|
+
'src/processors',
|
|
39
|
+
'src/notifiers',
|
|
40
|
+
'src/storage',
|
|
41
|
+
'src/models',
|
|
42
|
+
'archive'
|
|
43
|
+
];
|
|
44
|
+
console.log('🏗️ Initializing standard project structure...');
|
|
45
|
+
folders.forEach(f => {
|
|
46
|
+
const dir = path.join(process.cwd(), f);
|
|
47
|
+
if (!fs.existsSync(dir)) {
|
|
48
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
49
|
+
console.log(` ✅ Created: ${f}`);
|
|
50
|
+
} else {
|
|
51
|
+
console.log(` 🟡 Exists: ${f}`);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
console.log('\n✨ Project structure initialized successfully!');
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
task: (name) => {
|
|
58
|
+
if (!name) return console.log('❌ Error: Task name is required.');
|
|
59
|
+
const taskId = `task-${Date.now().toString().slice(-4)}`;
|
|
60
|
+
const content = `# Task: ${name}\n\nID: ${taskId}\nStatus: PENDING\n\n## Description\n\n## Acceptance Criteria\n`;
|
|
61
|
+
const filename = `${taskId}.md`;
|
|
62
|
+
fs.writeFileSync(filename, content);
|
|
63
|
+
console.log(`📝 Task created: ${filename}`);
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
status: () => {
|
|
67
|
+
console.log('📊 Current Task Board Status:');
|
|
68
|
+
console.log(' (Run via Agent to see persistent task_list from disk)');
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
analyze: (targetPath) => {
|
|
72
|
+
console.log(`🔍 [AGENT] Analyzing path: ${targetPath || '.'}...`);
|
|
73
|
+
console.log(' (Triggered agent-specific sub-process logic)');
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
if (!command || !commands[command]) {
|
|
78
|
+
showHelp();
|
|
79
|
+
} else {
|
|
80
|
+
commands[command](...args);
|
|
81
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
skillPath: path.join(__dirname, 'SKILL.md'),
|
|
5
|
+
readmePath: path.join(__dirname, 'README.md'),
|
|
6
|
+
changelogPath: path.join(__dirname, 'CHANGELOG.md'),
|
|
7
|
+
orchestrateBin: path.join(__dirname, 'bin', 'orchestrate.js')
|
|
8
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "architectural-orchestrator",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "A universal architectural task management framework for AI agents.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"bin/",
|
|
8
|
+
"SKILL.md",
|
|
9
|
+
"README.md",
|
|
10
|
+
"CHANGELOG.md"
|
|
11
|
+
],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=14.0.0"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"orchestrate": "./bin/orchestrate.js"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/adminlove520/architectural-orchestrator.git"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"orchestrator",
|
|
27
|
+
"ai-agent",
|
|
28
|
+
"architecture",
|
|
29
|
+
"task-management"
|
|
30
|
+
],
|
|
31
|
+
"author": "adminlove520",
|
|
32
|
+
"license": "MIT"
|
|
33
|
+
}
|