Skip to content

Commit cdb218f

Browse files
committed
fix: resolve audit findings — 10 bug fixes across scripts and docs
CRITICAL fixes: - amoa_confirm_replacement.py: args.skip_ecos_notify → args.skip_amcos_notify, args.ecos_session → args.amcos_session - Removed dead EXEC_STATE_FILE constant HIGH fixes: - stop_check/main.py: escalation print redirected to stderr (was corrupting JSON stdout) - stop_check/main.py: removed dead CRITICAL_ERROR_OCCURRED variable - amoa_reassign_kanban_tasks.py: implemented check_issue_has_open_pr using gh CLI, removed dead args MEDIUM fixes: - amoa_check_polling_due.py: datetime.now() → datetime.now(timezone.utc) - amoa_sync_kanban.py: modules key lookup now tries modules_status first - amoa_reassign_module.py: invalid message type "notification" → "info" - amoa_orchestrator_stop_check.py: added "verified" and "skipped" to completion statuses - stop_check/tasks.py: replaced naive regex with balanced-bracket parser DOC fixes: - ROLE_BOUNDARIES.md: AMCOS → AI Maestro/AMOA naming, bumped to 1.1.0 - AGENT_OPERATIONS.md: added amoa-kanban-management to skill table, bumped to 1.1.0 Version: 1.4.1
1 parent 205f5e0 commit cdb218f

File tree

13 files changed

+191
-131
lines changed

13 files changed

+191
-131
lines changed

.DS_Store

2 KB
Binary file not shown.

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ai-maestro-orchestrator-agent",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "Task distribution, agent coordination, progress monitoring - executes plans via subagents. Requires AI Maestro for inter-agent messaging.",
55
"author": {
66
"name": "Emasoft",

README.md

Lines changed: 108 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,153 @@
1-
# Orchestrator Agent (amoa-)
1+
# AI Maestro Orchestrator Agent (amoa-)
22

3-
**Version**: 1.0.0
3+
**Version**: 1.4.0
44

55
## Overview
66

7-
The Orchestrator Agent handles **task distribution, agent coordination, and progress monitoring**. It receives plans from the Architect and coordinates subagents to implement them.
7+
The Orchestrator Agent handles **task distribution, agent coordination, and progress monitoring** for multi-agent projects. It receives plans and coordinates subagents to implement them via AI Maestro inter-agent messaging.
8+
9+
## Requirements
10+
11+
- Python 3.8+ with PyYAML (`pip install pyyaml`)
12+
- GitHub CLI (`gh`) for issue and project management
13+
- AI Maestro messaging system for inter-agent communication
814

915
## Core Responsibilities
1016

11-
1. **Task Distribution**: Break plans into assignable tasks
12-
2. **Agent Coordination**: Manage subagents and remote agents
13-
3. **Progress Monitoring**: Track task completion
14-
4. **Module Management**: Organize work into modules
15-
5. **Verification**: Ensure instructions are followed correctly
17+
1. **Task Distribution**: Break plans into assignable tasks with dependency ordering
18+
2. **Agent Coordination**: Manage subagents and remote agents via AI Maestro
19+
3. **Progress Monitoring**: Track task completion via polling hooks
20+
4. **Module Management**: Organize work into GitHub Issue-backed modules
21+
5. **Verification**: Ensure instructions are followed correctly before exit
22+
6. **Kanban Management**: GitHub Projects V2 board and column management
1623

1724
## Components
1825

19-
### Agents
26+
### Agents (6)
2027

2128
| Agent | Description |
2229
|-------|-------------|
23-
| `amoa-main.md` | Main orchestrator agent |
24-
| `amoa-team-orchestrator.md` | Coordinates team of agents |
25-
| `amoa-task-summarizer.md` | Summarizes task progress |
26-
| `amoa-checklist-compiler.md` | Creates verification checklists |
27-
| `amoa-docker-container-expert.md` | Docker and container expertise |
28-
| `amoa-experimenter.md` | Experimentation and prototyping |
30+
| `amoa-orchestrator-main-agent` | Main orchestrator — delegates to sub-agents |
31+
| `amoa-team-orchestrator` | Coordinates team of remote agents |
32+
| `amoa-task-summarizer` | Summarizes task progress and state |
33+
| `amoa-checklist-compiler` | Creates verification checklists |
34+
| `amoa-docker-container-expert` | Docker and container expertise |
35+
| `amoa-experimenter` | Experimentation and prototyping |
2936

30-
### Commands
37+
### Commands (15)
3138

3239
| Command | Description |
3340
|---------|-------------|
34-
| `amoa-start-orchestration` | Start orchestration phase |
35-
| `amoa-register-agent` | Register remote agent |
36-
| `amoa-assign-module` | Assign module to agent |
37-
| `amoa-reassign-module` | Reassign module |
38-
| `amoa-check-agents` | Check agent status |
39-
| `amoa-add-module` | Add new module |
40-
| `amoa-modify-module` | Modify module |
41-
| `amoa-remove-module` | Remove module |
42-
| `amoa-prioritize-module` | Change module priority |
43-
| `amoa-orchestrator-loop` | Start orchestration loop |
44-
| `amoa-orchestrator-status` | Check orchestrator status |
45-
| `amoa-cancel-orchestrator` | Cancel orchestration |
46-
47-
### Skills
41+
| `/amoa-start-orchestration` | Start orchestration phase |
42+
| `/amoa-orchestrator-loop` | Start orchestration loop |
43+
| `/amoa-orchestration-status` | Show orchestration phase status (modules/agents) |
44+
| `/amoa-orchestrator-status` | Show orchestrator loop status (iterations/tasks) |
45+
| `/amoa-cancel-orchestrator` | Cancel orchestration |
46+
| `/amoa-register-agent` | Register remote agent |
47+
| `/amoa-check-agents` | Check agent status and poll progress |
48+
| `/amoa-assign-module` | Assign module to agent |
49+
| `/amoa-reassign-module` | Reassign module to different agent |
50+
| `/amoa-add-module` | Add new module |
51+
| `/amoa-modify-module` | Modify existing module |
52+
| `/amoa-remove-module` | Remove module |
53+
| `/amoa-prioritize-module` | Change module priority |
54+
| `/amoa-reassign-kanban-tasks` | Reassign kanban board tasks |
55+
| `/amoa-generate-replacement-handoff` | Generate agent replacement handoff document |
56+
57+
### Skills (16)
4858

4959
| Skill | Description |
5060
|-------|-------------|
51-
| `amoa-two-phase-mode` | Two-phase orchestration mode |
52-
| `amoa-orchestration-commands` | Orchestration command patterns |
53-
| `amoa-orchestration-patterns` | Orchestration best practices |
54-
| `amoa-remote-agent-coordinator` | Remote agent coordination |
55-
| `amoa-module-management` | Module CRUD operations |
56-
| `amoa-verification-patterns` | Instruction verification |
57-
| `amoa-developer-communication` | Developer comm patterns |
58-
| `amoa-checklist-compilation-patterns` | Checklist generation |
59-
| `amoa-agent-replacement` | Agent replacement handoffs |
60-
| `amoa-task-distribution` | Task breakdown and assignment |
61-
| `amoa-progress-monitoring` | Progress tracking and polling |
62-
| `amoa-messaging-templates` | AI Maestro message formats |
63-
| `amoa-label-taxonomy` | GitHub label system |
64-
| `amoa-implementer-interview-protocol` | Interview-based requirements |
65-
| `amoa-github-action-integration` | GitHub Actions patterns |
66-
67-
### Hooks
61+
| `amoa-two-phase-mode` | Plan-then-Execute workflows with formal approval |
62+
| `amoa-orchestration-commands` | Orchestration command reference and loop mechanics |
63+
| `amoa-orchestration-patterns` | Task breakdown patterns for human developers |
64+
| `amoa-remote-agent-coordinator` | Remote AI agent coordination via AI Maestro |
65+
| `amoa-module-management` | Module CRUD operations (1:1 with GitHub Issues) |
66+
| `amoa-verification-patterns` | Implementation verification and evidence collection |
67+
| `amoa-developer-communication` | Developer communication patterns and templates |
68+
| `amoa-checklist-compilation-patterns` | Verification checklist generation |
69+
| `amoa-agent-replacement` | Agent replacement and handoff protocols |
70+
| `amoa-task-distribution` | Task breakdown, assignment, and load balancing |
71+
| `amoa-progress-monitoring` | Progress tracking via state-based polling |
72+
| `amoa-messaging-templates` | AI Maestro message format templates |
73+
| `amoa-label-taxonomy` | GitHub label system for multi-agent coordination |
74+
| `amoa-implementer-interview-protocol` | Interview-based task verification |
75+
| `amoa-github-action-integration` | GitHub Actions CI/CD patterns |
76+
| `amoa-kanban-management` | GitHub Projects V2 kanban board management |
77+
78+
### Hooks (4)
6879

6980
| Hook | Event | Description |
7081
|------|-------|-------------|
71-
| `amoa-orchestrator-stop` | Stop | Block exit until tasks complete |
72-
| `amoa-instruction-verification-check` | PreToolUse | Verify instructions before work |
73-
| `amoa-polling-reminder` | UserPromptSubmit | Remind to poll progress |
74-
| `amoa-file-tracker` | PostToolUse | Track file modifications |
75-
76-
## Project Structure Notes
77-
78-
### Non-Standard Directories
79-
80-
- **`git-hooks/`** — Contains git hook scripts (pre-push) for plugin validation before pushing
81-
- **`shared/`** — Shared resources used across skills and agents
82+
| `amoa-orchestrator-stop` | Stop | Blocks exit until all tasks complete (120s timeout) |
83+
| `amoa-instruction-verification-check` | PreToolUse | Blocks agent work if verification incomplete |
84+
| `amoa-polling-reminder` | UserPromptSubmit | Reminds to poll agent progress |
85+
| `amoa-file-tracker` | PostToolUse | Tracks Edit/Write file modifications |
8286

83-
### Shell Scripts Compatibility
87+
## Project Structure
8488

85-
3 bash/shell scripts (`.sh` files) require **Linux or macOS** and are not natively available on Windows. Windows users should use WSL2 or equivalent.
89+
```
90+
ai-maestro-orchestrator-agent/
91+
├── .claude-plugin/ # Plugin manifest (plugin.json)
92+
├── agents/ # Agent definitions (6 agents)
93+
├── commands/ # Slash command definitions (15 commands)
94+
├── docs/ # Architecture docs (role boundaries, workflow, registry)
95+
├── git-hooks/ # Git hooks (pre-push validation)
96+
├── hooks/ # Plugin hooks (hooks.json + 4 hook scripts)
97+
├── scripts/ # Python scripts (37 scripts + validation suite)
98+
│ └── amoa_stop_check/ # Stop hook package (lock, tasks, phase checks)
99+
├── shared/ # Shared resources across skills
100+
├── skills/ # Skill definitions (16 skills with references)
101+
├── tests/ # Test suite
102+
└── requirements.txt # Python dependencies (PyYAML)
103+
```
86104

87105
## Workflow
88106

89-
1. Receives plan from Architect (via Assistant Manager)
90-
2. Creates modules from plan
91-
3. Assigns modules to agents
92-
4. Monitors progress via polling
93-
5. Handles failures and reassignments
94-
6. Reports completion to Assistant Manager
95-
7. Hands off to Integrator for quality gates
107+
1. **Plan Phase**: Define modules and requirements (two-phase mode)
108+
2. **Assignment**: Assign modules to agents via kanban board
109+
3. **Execution**: Agents implement modules, report via AI Maestro
110+
4. **Monitoring**: Poll agent progress, detect stalls, handle failures
111+
5. **Verification**: 4-loop verification ensures all tasks complete
112+
6. **Completion**: Stop hook enforces completion before session exit
96113

97-
## Installation (Production)
114+
## Installation
98115

99-
<!-- Marketplace installation will be available once the AI Maestro marketplace is configured -->
116+
Install using `--plugin-dir` for local development:
100117

101-
Install using `--plugin-dir` for now (marketplace coming soon). Use `--scope local` to install only for this agent's directory, or `--scope global` for all projects.
102-
103-
Role plugins are installed with `--scope local` inside the specific agent's working directory (`~/agents/<agent-name>/`). This ensures the plugin is only available to that agent.
118+
```bash
119+
claude --plugin-dir /path/to/ai-maestro-orchestrator-agent
120+
```
104121

105-
Once installed, start a session with the main agent:
122+
Start a session with the main orchestrator agent:
106123

107124
```bash
108125
claude --agent amoa-orchestrator-main-agent
109126
```
110127

111-
## Development Only (--plugin-dir)
112-
113-
`--plugin-dir` loads a plugin directly from a local directory without marketplace installation. Use only during plugin development.
128+
After modifying plugin files, reload without restarting:
114129

115130
```bash
116-
claude --plugin-dir ./OUTPUT_SKILLS/ai-maestro-orchestrator-agent
131+
/reload-plugins
117132
```
118133

119134
## Validation
120135

136+
Run the CPV (Claude Plugins Validation) suite:
137+
121138
```bash
122-
cd OUTPUT_SKILLS/ai-maestro-orchestrator-agent
123-
uv run python scripts/validate_plugin.py . --verbose
139+
cd ai-maestro-orchestrator-agent
140+
uv run --with pyyaml --with mypy --with types-PyYAML python scripts/validate_plugin.py . --verbose --strict
124141
```
142+
143+
The pre-push hook automatically syncs validators and runs validation before each push.
144+
145+
## Development
146+
147+
- **Sync validators**: `python3 scripts/sync_cpv_validators.py`
148+
- **Kanban management**: `python3 scripts/amoa_kanban_manager.py <command>`
149+
- **GitHub project columns**: `python3 scripts/gh-project-add-columns.py`
150+
151+
## License
152+
153+
MIT

docs/AGENT_OPERATIONS.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ Claude Code's skill resolution system automatically finds skills by folder name
186186
| `amoa-remote-agent-coordinator` | Coordinating remote AI agents |
187187
| `amoa-task-distribution` | Distributing tasks to implementer agents |
188188
| `amoa-two-phase-mode` | Two-phase planning and execution mode |
189+
| `amoa-kanban-management` | GitHub Projects V2 kanban board management (create boards, add columns, move items) |
189190
| `amoa-verification-patterns` | Code and deliverable verification patterns |
190191

191192
### NEVER Reference Other Plugins
@@ -458,6 +459,10 @@ The following skills were added to AMOA (2026-02-06 — 2026-02-07):
458459

459460
---
460461

462+
## Recent Changes (2026-03-06)
463+
464+
- Added `amoa-kanban-management` to Available AMOA Skills table, updated version to 1.1.0
465+
461466
## Recent Changes (2026-02-07)
462467

463468
- Added 8-column canonical kanban system (unified from 5 conflicting systems)
@@ -487,6 +492,6 @@ The following skills were added to AMOA (2026-02-06 — 2026-02-07):
487492

488493
---
489494

490-
**Document Version**: 1.0.0
491-
**Last Updated**: 2026-02-04
495+
**Document Version**: 1.1.0
496+
**Last Updated**: 2026-03-06
492497
**Maintained By**: claude-skills-factory

docs/ROLE_BOUNDARIES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AMCOS Role Boundaries
1+
# AI Maestro Role Boundaries
22

33
**CRITICAL: This document defines the strict boundaries between agent roles. Violating these boundaries breaks the system architecture.**
44

@@ -191,6 +191,6 @@ AMOA: Sends handoff to agent-456
191191

192192
---
193193

194-
**Document Version**: 1.0.0
195-
**Last Updated**: 2026-02-02
196-
**Author**: AMCOS Plugin Development
194+
**Document Version**: 1.1.0
195+
**Last Updated**: 2026-03-06
196+
**Author**: AMOA Plugin Development

scripts/amoa_check_polling_due.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import json
1818
import sys
19-
from datetime import datetime, timedelta
19+
from datetime import datetime, timedelta, timezone
2020
from pathlib import Path
2121

2222
# State file path (relative to project root)
@@ -99,7 +99,7 @@ def check_polling_status() -> tuple[list, list]:
9999
if not active_assignments:
100100
return [], []
101101

102-
now = datetime.now()
102+
now = datetime.now(timezone.utc)
103103
overdue = []
104104
warning = []
105105

scripts/amoa_confirm_replacement.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
# State file location relative to the project root (JSON format)
5959
STATE_FILE_PATH = ".ai-maestro/orchestration-state.json"
6060

61-
# Fallback exec-phase state file (YAML frontmatter in markdown)
62-
EXEC_STATE_FILE = Path(".claude/orchestrator-exec-phase.local.md")
6361

6462
# Audit log location relative to the project root
6563
AUDIT_LOG_DIR = "logs"
@@ -616,7 +614,7 @@ def main():
616614

617615
# Step 3: Send AMCOS notification
618616
ecos_notified = False
619-
if not args.skip_ecos_notify:
617+
if not args.skip_amcos_notify:
620618
notification_details = {
621619
"ack_status": ack_status,
622620
"state_updated": state is not None,
@@ -627,7 +625,7 @@ def main():
627625
notification_details["assignments_updated"] = state_updates.get("assignments_updated", 0)
628626

629627
ecos_notified = send_ecos_notification(
630-
ecos_session=args.ecos_session,
628+
ecos_session=args.amcos_session,
631629
status=outcome,
632630
failed_agent=args.failed_agent,
633631
new_agent=args.new_agent,

scripts/amoa_orchestrator_stop_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def check_orchestration_phase(state):
140140
for module in modules:
141141
module_id = module.get("id", "unknown")
142142
module_status = module.get("status", "unknown")
143-
if module_status not in ("complete", "done"):
143+
if module_status not in ("complete", "done", "verified", "skipped"):
144144
incomplete_modules.append({"id": module_id, "status": module_status})
145145

146146
if incomplete_modules:

0 commit comments

Comments
 (0)