rhazen35/agent-orchestration
Composer 安装命令:
composer require rhazen35/agent-orchestration
包简介
A tool-agnostic agent orchestration setup for spec-driven development. Provides skills, steering, templates, and a factory pipeline workflow.
README 文档
README
rhazen35/agent-orchestration
A tool-agnostic agent orchestration setup for spec-driven development.
Give your AI agent a structured, auditable factory pipeline — from vague idea to shipped code — without burning your token budget.
What is this?
This package provides a complete Factory Pipeline workflow for AI agents. It includes skills, steering rules, templates, and governance guardrails — all as plain markdown files that any agent can read, regardless of language or tooling.
No runtime code. No dependencies. Works with PHP, Go, Rust, Python, Node, or anything else.
The Factory Pipeline
Every phase is manually triggered. Nothing runs automatically. You stay in control, and your token budget stays intact.
Design → Queue → Production → Sentinel → Quality Control → Archiving
🧠 Phase 1 — Design
Trigger: "I want to build X" or "Start a new spec for Y"
The spec-architect skill orchestrates sub-skills in sequence:
| Sub-skill | What it does |
|---|---|
discovery |
Maps the codebase, checks cache before re-scanning |
mcp-orchestrator |
Discovers available MCP tools, enriches spec with live data |
grill-me |
Challenges assumptions, provides recommended answers |
acceptance-criteria-generator |
Drafts requirements and testable acceptance criteria |
Output: signed-off plan/{namespace}/plan.md
Gate: you must approve the plan before anything enters the inbox.
📥 Phase 2 — Queue
Trigger: "queue tasks" or "load inbox"
Tasks are loaded into inbox/{namespace}/tasks.md in batches of max 3 (the Hydration Limit). The next batch only loads after a slot opens. A flawed plan fails fast and cheap, not after 20 API calls.
Gate: confirm the inbox before production starts.
⚙️ Phase 3 — Production
Trigger: "process next task"
The task-processor runs with JIT context — it only reads the task, the file it's editing, and steering/principles.md. Nothing else. Small context window, fast and cheap calls.
Output: task moved to outbox/{namespace}/pending-review.md
🛡️ Phase 3.5 — Sentinel Pre-Check
Trigger: runs as part of "review", before the quality reviewer
The sentinel catches cheap failures before they reach the expensive inspector:
- Syntax errors or lint failures
- Ghost comments (
TODO,FIXME, unfinished notes) - Changelog format errors
- Scope creep (files touched outside the task's scope)
Fail: task returns to inbox/ with [SENTINEL_FAIL]. Quality reviewer is never called.
🔍 Phase 4 — Quality Control
Trigger: "review"
The quality-reviewer performs deep reasoning against acceptance-criteria.md and steering/principles.md. Also runs integrity-check for ghost features and architectural drift.
| Result | Action |
|---|---|
| ✅ Pass | Task moves to outbox/{namespace}/completed.md |
| ❌ Fail | Task returns to inbox/ with [REJECTION NOTE] + incremented [LOOP COUNT] |
If a task is rejected 4 times, the pipeline locks. Human intervention required.
📦 Phase 5 — Archiving
Trigger: "archive"
The changelog-architect skill:
- Appends an entry to
CHANGELOG.mdunder## [Unreleased] - Appends the task + review notes to
archive/{namespace}/decision-log.md - Cleans up
outbox/{namespace}/completed.md - Invokes
monitorto updatedashboard.md
Quick Reference
| Command | Phase triggered |
|---|---|
| "I want to build X" | 🧠 Phase 1: Design |
| "Queue tasks" | 📥 Phase 2: Queue |
| "Process next task" | ⚙️ Phase 3: Production |
| "Review" | 🛡️ + 🔍 Sentinel → Quality Control |
| "Archive" | 📦 Phase 5: Archiving |
Installation
This package contains no runtime code — only markdown files consumed by your AI agent. It works with any language or stack.
PHP — Composer
composer require rhazen35/agent-orchestration
Copy the directories into your project root:
cp -r vendor/rhazen35/agent-orchestration/skills ./skills cp -r vendor/rhazen35/agent-orchestration/steering ./steering cp -r vendor/rhazen35/agent-orchestration/templates ./templates cp -r vendor/rhazen35/agent-orchestration/records ./records
Node — npm
npm install rhazen35-agent-orchestration
cp -r node_modules/rhazen35-agent-orchestration/skills ./skills cp -r node_modules/rhazen35-agent-orchestration/steering ./steering cp -r node_modules/rhazen35-agent-orchestration/templates ./templates cp -r node_modules/rhazen35-agent-orchestration/records ./records
Go, Rust, Python, or any other language — Git Submodule
git submodule add https://github.com/rhazen35/agent-orchestration .agent
Point your agent tooling at .agent/steering/, .agent/skills/, etc.
Update to the latest version:
git submodule update --remote .agent
Clone a project that uses this as a submodule:
git clone --recurse-submodules <your-repo-url>
Quick Start (no package manager)
git clone https://github.com/rhazen35/agent-orchestration .agent
Namespacing
Every specification gets its own namespace folder — a short kebab-case name applied consistently across all directories.
| Directory | Namespaced path |
|---|---|
| Specification | specification/{namespace}/ |
| Plan | plan/{namespace}/ |
| Inbox | inbox/{namespace}/tasks.md |
| Outbox | outbox/{namespace}/ |
| Records | records/{namespace}/ |
| Archive | archive/{namespace}/ |
Governance
steering/governance.md defines hard limits no agent can override:
| Rule | Limit |
|---|---|
| Inbox hydration | Max 3 active tasks at once |
| Loop limit | Task rejected 4 times → pipeline locks |
| Token budget | 50,000 tokens per run → Soft Halt |
| Cooldown | 5 consecutive completions → wait for "Continue" |
| Discovery cache | Never re-scan if fingerprint is current |
| JIT context | Worker reads only what it needs |
Dashboard
dashboard.md is the control tower. Check it before starting any work.
| Status | Meaning |
|---|---|
| 🟢 OPERATIONAL | All clear |
| 🟡 THROTTLED | Wait for human [CONTINUE] |
| 🔴 CIRCUIT BREAKER TRIPPED | Do not start work — human reset required |
Skills Reference
| Skill | Purpose |
|---|---|
spec-architect |
End-to-end spec creation |
discovery |
Codebase mapping with caching |
mcp-orchestrator |
Dynamic MCP tool discovery and data enrichment |
grill-me |
Assumption stress-testing |
acceptance-criteria-generator |
Requirements → testable criteria |
task-processor |
JIT task implementation |
sentinel |
Cheap pre-check before review |
quality-reviewer |
Deep spec + principle review |
integrity-check |
Drift and ghost feature detection |
changelog-architect |
Task archiving and changelog |
monitor |
Dashboard updates |
Steering Files
Always loaded into every agent context:
| File | Purpose |
|---|---|
steering/principles.md |
Core architectural constraints |
steering/governance.md |
Hard resource and loop limits |
steering/audit-requirements.md |
Requirement changes must be logged and ADR'd |
steering/workflow.md |
Full pipeline reference |
MCP Integration
This package is designed to work with Model Context Protocol (MCP) servers out of the box. MCP tools extend the agent's capabilities beyond local file editing — enabling live database inspection, web search, API fetching, and more.
How it works
The agent does not hardcode any MCP servers. Instead, it performs a handshake at session start:
- Agent calls
list_toolsto discover what the host environment provides. - Agent matches the returned tool schemas against
steering/mcp-policy.md. - Authorized tools are used purposefully — local files always take precedence.
Capability Requirements
The factory expects the host to provide tools for these capabilities:
| Capability | Used for | Fallback |
|---|---|---|
| Search | Verify library versions, docs | Ask human |
| Filesystem | Read/write specs and inbox | Local agent tools |
| Runtime | Run tests and linting (Sentinel) | Manual checks |
| Database | Inspect live schemas | Use spec definitions |
| Version Control | Read issues, PRs, commit history | Use records/ and archive/ |
If a capability is missing, the pipeline continues — it never blocks on absent tools.
Tool Selection Priority
When multiple tools fulfill the same capability, the agent picks in this order:
- Local filesystem tools (lowest cost)
- Specialized local servers (e.g., local Postgres, SQLite)
- Remote API servers (e.g., GitHub, Brave Search, Slack)
The Local-First Rule
Before calling any MCP tool, the agent must check:
specification/{namespace}/— does the spec already answer this?archive/mcp-data/{namespace}/— has this tool been called and cached?cache/discovery-report.md— is this covered by the last discovery run?
Only if all three are empty or stale does the agent proceed with a tool call. Tool outputs are persisted to archive/mcp-data/ so the worker never re-calls a tool for the same data.
MCP in the Pipeline
| Phase | MCP usage |
|---|---|
| Phase 1: Design | mcp-orchestrator runs full capability mapping, enriches spec with live data |
| Phase 3: Production | task-processor invokes mcp-orchestrator in lightweight mode for specific data needs |
| Phase 3.5: Sentinel | Uses runtime tools (linter, test runner) if available |
Relevant Files
| File | Purpose |
|---|---|
steering/mcp-policy.md |
Capability requirements, tool selection logic, authorization rules |
steering/mcp-governance.md |
Hard limits: context budget, write safety, failure fallback |
steering/mcp-etiquette.md |
Local-First rule, purposeful tool use, no spec overwrites |
skills/mcp-orchestrator.md |
The bridge skill — discovery, justification, execution, sentinel filter |
archive/mcp-data/ |
Persisted tool outputs, reused across tasks |
Customizing for Your Project
Every skill, steering file, and template can be overridden at the project level without touching the package files. The agent checks .agent/ first before falling back to the package defaults.
your-project/
.agent/
skills/
quality-reviewer.md ← overrides the default
sentinel.md ← overrides the default
steering/
principles.md ← overrides the default
templates/
plan/
plan-template.md ← overrides the default
To extend rather than replace, start your override file with:
# [Skill Name] — Project Extension > Extends the base skill. All base behavior applies unless explicitly overridden below. ## Project-Specific Additions ...your additions here...
Two files should never be overridden: steering/workflow.md (the pipeline contract) and steering/overrides.md (the override system itself).
See steering/overrides.md for the full resolution order, a complete list of overridable files, and guidance on what to override with caution.
License
MIT — see LICENSE.
rhazen35/agent-orchestration 适用场景与选型建议
rhazen35/agent-orchestration 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「workflow」 「Agent」 「ai」 「orchestration」 「spec-driven」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rhazen35/agent-orchestration 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rhazen35/agent-orchestration 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rhazen35/agent-orchestration 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Workflow for NetCommons Plugin
DX-first workflow / saga / compensation engine for Laravel with native dry-run, reverse-order compensation, business impact tracking, opt-in persistence, and audit events.
Custom laravel monolog logger for datadog logs management, both api and agent ways
Workflow logger
Approval Workflow Engine for Filament
The Message Submission Agent Diagnostics tool (msadiag) facilitates testing the compatibility of third party message submission agents.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-26
