@aithr-ai/mcp-server 1.2.0 → 1.2.2
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/index.js +30 -38
- package/package.json +1 -1
- package/skills/orchestra/SKILL.md +354 -1
package/index.js
CHANGED
|
@@ -3742,17 +3742,13 @@ class MCPServer {
|
|
|
3742
3742
|
const { sessionId, intendedAction } = args;
|
|
3743
3743
|
|
|
3744
3744
|
try {
|
|
3745
|
-
// Get current session status
|
|
3746
|
-
const
|
|
3747
|
-
`/mcp/projects/${projectId}/orchestra
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
action: 'status',
|
|
3751
|
-
sessionId: sessionId || undefined,
|
|
3752
|
-
}
|
|
3753
|
-
);
|
|
3745
|
+
// Get current session status via GET
|
|
3746
|
+
const url = sessionId
|
|
3747
|
+
? `/mcp/projects/${projectId}/orchestra?sessionId=${sessionId}`
|
|
3748
|
+
: `/mcp/projects/${projectId}/orchestra`;
|
|
3749
|
+
const data = await this.mcpApiCall(url, 'GET');
|
|
3754
3750
|
|
|
3755
|
-
if (!data || data.error) {
|
|
3751
|
+
if (!data || data.error || !data.session) {
|
|
3756
3752
|
return {
|
|
3757
3753
|
valid: false,
|
|
3758
3754
|
error: data?.error || 'No orchestra session found',
|
|
@@ -3763,7 +3759,7 @@ class MCPServer {
|
|
|
3763
3759
|
};
|
|
3764
3760
|
}
|
|
3765
3761
|
|
|
3766
|
-
const session = data;
|
|
3762
|
+
const session = data.session;
|
|
3767
3763
|
const status = session.status;
|
|
3768
3764
|
const hasContract = !!session.contract || session.contractVersion > 0;
|
|
3769
3765
|
const hasPlan = session.totalTasks > 0;
|
|
@@ -3842,7 +3838,7 @@ class MCPServer {
|
|
|
3842
3838
|
|
|
3843
3839
|
return {
|
|
3844
3840
|
valid: actionValid && currentState.missing.length === 0,
|
|
3845
|
-
sessionId: session.
|
|
3841
|
+
sessionId: session.id,
|
|
3846
3842
|
status,
|
|
3847
3843
|
hasPlan,
|
|
3848
3844
|
hasContract,
|
|
@@ -3935,17 +3931,13 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
3935
3931
|
const { sessionId } = args;
|
|
3936
3932
|
|
|
3937
3933
|
try {
|
|
3938
|
-
// Get session status
|
|
3939
|
-
const
|
|
3940
|
-
`/mcp/projects/${projectId}/orchestra
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
action: 'status',
|
|
3944
|
-
sessionId: sessionId || undefined,
|
|
3945
|
-
}
|
|
3946
|
-
);
|
|
3934
|
+
// Get session status via GET
|
|
3935
|
+
const url = sessionId
|
|
3936
|
+
? `/mcp/projects/${projectId}/orchestra?sessionId=${sessionId}`
|
|
3937
|
+
: `/mcp/projects/${projectId}/orchestra`;
|
|
3938
|
+
const data = await this.mcpApiCall(url, 'GET');
|
|
3947
3939
|
|
|
3948
|
-
if (!
|
|
3940
|
+
if (!data || data.error || !data.session) {
|
|
3949
3941
|
return {
|
|
3950
3942
|
nextTool: 'aether_start_orchestra',
|
|
3951
3943
|
parameters: {},
|
|
@@ -3954,7 +3946,7 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
3954
3946
|
};
|
|
3955
3947
|
}
|
|
3956
3948
|
|
|
3957
|
-
const session =
|
|
3949
|
+
const session = data.session;
|
|
3958
3950
|
const sessionStatus = session.status;
|
|
3959
3951
|
const hasContract = !!session.contract || session.contractVersion > 0;
|
|
3960
3952
|
const hasPlan = session.totalTasks > 0;
|
|
@@ -3966,13 +3958,13 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
3966
3958
|
return {
|
|
3967
3959
|
nextTool: 'aether_set_orchestra_plan',
|
|
3968
3960
|
parameters: {
|
|
3969
|
-
sessionId: session.
|
|
3961
|
+
sessionId: session.id,
|
|
3970
3962
|
planContent: '<DEVELOPMENT_PLAN.md content>',
|
|
3971
3963
|
phases: '<Array of phases with tasks>',
|
|
3972
3964
|
},
|
|
3973
3965
|
explanation: 'Session created but no plan set. Define the development plan with phases and tasks.',
|
|
3974
3966
|
example: `aether_set_orchestra_plan({
|
|
3975
|
-
sessionId: "${session.
|
|
3967
|
+
sessionId: "${session.id}",
|
|
3976
3968
|
planContent: "# Development Plan\\n...",
|
|
3977
3969
|
phases: [{
|
|
3978
3970
|
phaseNumber: 1,
|
|
@@ -3991,12 +3983,12 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
3991
3983
|
return {
|
|
3992
3984
|
nextTool: 'aether_create_contract',
|
|
3993
3985
|
parameters: {
|
|
3994
|
-
sessionId: session.
|
|
3986
|
+
sessionId: session.id,
|
|
3995
3987
|
requirements: '<Full project requirements>',
|
|
3996
3988
|
},
|
|
3997
3989
|
explanation: 'Plan is set. Now generate the Source of Truth contract to ensure consistency across all agents.',
|
|
3998
3990
|
example: `aether_create_contract({
|
|
3999
|
-
sessionId: "${session.
|
|
3991
|
+
sessionId: "${session.id}",
|
|
4000
3992
|
requirements: "Build a task management app with user auth, projects, and real-time updates..."
|
|
4001
3993
|
})`,
|
|
4002
3994
|
note: 'This step is RECOMMENDED but optional. You can skip to aether_orchestra_approve if needed.',
|
|
@@ -4007,7 +3999,7 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4007
3999
|
return {
|
|
4008
4000
|
nextTool: 'aether_create_contract',
|
|
4009
4001
|
parameters: {
|
|
4010
|
-
sessionId: session.
|
|
4002
|
+
sessionId: session.id,
|
|
4011
4003
|
requirements: '<Full project requirements>',
|
|
4012
4004
|
},
|
|
4013
4005
|
explanation: 'Plan awaiting approval. RECOMMENDED: Generate contract first for type consistency.',
|
|
@@ -4019,9 +4011,9 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4019
4011
|
}
|
|
4020
4012
|
return {
|
|
4021
4013
|
nextTool: 'aether_orchestra_approve',
|
|
4022
|
-
parameters: { sessionId: session.
|
|
4014
|
+
parameters: { sessionId: session.id },
|
|
4023
4015
|
explanation: 'Plan and contract ready. Approve to begin autonomous execution.',
|
|
4024
|
-
example: `aether_orchestra_approve({ sessionId: "${session.
|
|
4016
|
+
example: `aether_orchestra_approve({ sessionId: "${session.id}" })`,
|
|
4025
4017
|
warning: 'After approval, tasks will execute. Review the plan carefully first.',
|
|
4026
4018
|
};
|
|
4027
4019
|
|
|
@@ -4030,9 +4022,9 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4030
4022
|
if (session.readyTasks > 0) {
|
|
4031
4023
|
return {
|
|
4032
4024
|
nextTool: 'aether_orchestra_next',
|
|
4033
|
-
parameters: { sessionId: session.
|
|
4025
|
+
parameters: { sessionId: session.id },
|
|
4034
4026
|
explanation: `${session.readyTasks} task(s) ready to execute. Get them and trigger generation.`,
|
|
4035
|
-
example: `aether_orchestra_next({ sessionId: "${session.
|
|
4027
|
+
example: `aether_orchestra_next({ sessionId: "${session.id}", maxTasks: 3 })`,
|
|
4036
4028
|
followUp: 'After getting tasks, use aether_trigger_generation with the orchestraContext from each task.',
|
|
4037
4029
|
};
|
|
4038
4030
|
}
|
|
@@ -4040,16 +4032,16 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4040
4032
|
if (session.runningTasks > 0) {
|
|
4041
4033
|
return {
|
|
4042
4034
|
nextTool: 'aether_orchestra_status',
|
|
4043
|
-
parameters: { sessionId: session.
|
|
4035
|
+
parameters: { sessionId: session.id, includeReports: true },
|
|
4044
4036
|
explanation: `${session.runningTasks} task(s) currently running. Check status and handle any reports.`,
|
|
4045
|
-
example: `aether_orchestra_status({ sessionId: "${session.
|
|
4037
|
+
example: `aether_orchestra_status({ sessionId: "${session.id}", includeReports: true })`,
|
|
4046
4038
|
};
|
|
4047
4039
|
}
|
|
4048
4040
|
// Check for blocked tasks
|
|
4049
4041
|
if (session.blockedTasks > 0) {
|
|
4050
4042
|
return {
|
|
4051
4043
|
nextTool: 'aether_orchestra_status',
|
|
4052
|
-
parameters: { sessionId: session.
|
|
4044
|
+
parameters: { sessionId: session.id, includeReports: true },
|
|
4053
4045
|
explanation: `${session.blockedTasks} task(s) blocked. Review blockers and resolve or edit the plan.`,
|
|
4054
4046
|
alternative: {
|
|
4055
4047
|
tool: 'aether_edit_orchestra',
|
|
@@ -4060,7 +4052,7 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4060
4052
|
// All tasks might be complete
|
|
4061
4053
|
return {
|
|
4062
4054
|
nextTool: 'aether_orchestra_status',
|
|
4063
|
-
parameters: { sessionId: session.
|
|
4055
|
+
parameters: { sessionId: session.id },
|
|
4064
4056
|
explanation: 'Check if all tasks are complete. May be ready to finalize.',
|
|
4065
4057
|
possibleActions: [
|
|
4066
4058
|
{ tool: 'aether_complete_orchestra', when: 'All tasks done' },
|
|
@@ -4072,7 +4064,7 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4072
4064
|
case 'paused':
|
|
4073
4065
|
return {
|
|
4074
4066
|
nextTool: 'aether_orchestra_resume',
|
|
4075
|
-
parameters: { sessionId: session.
|
|
4067
|
+
parameters: { sessionId: session.id },
|
|
4076
4068
|
explanation: 'Session is paused. Resume to continue execution.',
|
|
4077
4069
|
alternative: {
|
|
4078
4070
|
tool: 'aether_orchestra_status',
|
|
@@ -4094,7 +4086,7 @@ Current position: Step ${this.getWorkflowStep(status, hasPlan, hasContract)}
|
|
|
4094
4086
|
default:
|
|
4095
4087
|
return {
|
|
4096
4088
|
nextTool: 'aether_orchestra_status',
|
|
4097
|
-
parameters: { sessionId: session.
|
|
4089
|
+
parameters: { sessionId: session.id },
|
|
4098
4090
|
explanation: `Unknown session status: ${sessionStatus}. Check status for details.`,
|
|
4099
4091
|
};
|
|
4100
4092
|
}
|
package/package.json
CHANGED
|
@@ -646,6 +646,7 @@ aether_complete_orchestra(
|
|
|
646
646
|
|------|---------|
|
|
647
647
|
| `aether_start_orchestra(maxIterations?, maxAgents?, timeoutMinutes?, completionCriteria?)` | Start session |
|
|
648
648
|
| `aether_set_orchestra_plan(sessionId, planContent, phases, completionCriteria?)` | Set development plan |
|
|
649
|
+
| `aether_create_contract(sessionId, requirements, existingCodeSummary?)` | Generate Source of Truth contract |
|
|
649
650
|
| `aether_orchestra_approve(sessionId)` | Approve and start execution |
|
|
650
651
|
| `aether_orchestra_status(sessionId?, includeReports?, includeLogs?)` | Get full status |
|
|
651
652
|
| `aether_orchestra_next(sessionId, maxTasks?)` | Get ready tasks |
|
|
@@ -654,6 +655,14 @@ aether_complete_orchestra(
|
|
|
654
655
|
| `aether_orchestra_pause(sessionId)` | Pause execution |
|
|
655
656
|
| `aether_orchestra_resume(sessionId)` | Resume execution |
|
|
656
657
|
| `aether_complete_orchestra(sessionId, completionReason, summary?)` | Complete session |
|
|
658
|
+
| `aether_edit_orchestra(sessionId, action, ...)` | Edit plan without restarting |
|
|
659
|
+
|
|
660
|
+
### Workflow Enforcement Tools (v7)
|
|
661
|
+
| Tool | Purpose |
|
|
662
|
+
|------|---------|
|
|
663
|
+
| `aether_orchestra_guide(sessionId?)` | Get intelligent guidance on next action |
|
|
664
|
+
| `aether_orchestra_validate(sessionId?, intendedAction?)` | Pre-flight check before major actions |
|
|
665
|
+
| `aether_orchestra_checkpoint(sessionId, phaseNumber?, validateContract?, autoAdvance?)` | Quality gate between phases |
|
|
657
666
|
|
|
658
667
|
---
|
|
659
668
|
|
|
@@ -2018,6 +2027,280 @@ The session automatically pauses when:
|
|
|
2018
2027
|
|
|
2019
2028
|
---
|
|
2020
2029
|
|
|
2030
|
+
## Workflow Enforcement (Orchestra v7)
|
|
2031
|
+
|
|
2032
|
+
Orchestra v7 introduces workflow enforcement tools to prevent skipped steps and ensure proper execution order.
|
|
2033
|
+
|
|
2034
|
+
### The Problem
|
|
2035
|
+
|
|
2036
|
+
Without enforcement, Claude Code might:
|
|
2037
|
+
- Skip contract generation (causing type inconsistencies)
|
|
2038
|
+
- Try to execute tasks before plan approval
|
|
2039
|
+
- Miss phase checkpoints
|
|
2040
|
+
- Not know what step comes next
|
|
2041
|
+
|
|
2042
|
+
### Workflow Enforcement Tools
|
|
2043
|
+
|
|
2044
|
+
| Tool | Purpose | When to Use |
|
|
2045
|
+
|------|---------|-------------|
|
|
2046
|
+
| `aether_orchestra_guide` | Get intelligent guidance on next action | When unsure what to do next |
|
|
2047
|
+
| `aether_orchestra_validate` | Pre-flight check before actions | Before approving, executing, or completing |
|
|
2048
|
+
| `aether_orchestra_checkpoint` | Quality gate between phases | After completing a phase |
|
|
2049
|
+
|
|
2050
|
+
### The Correct Workflow
|
|
2051
|
+
|
|
2052
|
+
```
|
|
2053
|
+
📋 ORCHESTRA WORKFLOW (MANDATORY ORDER):
|
|
2054
|
+
|
|
2055
|
+
1. aether_start_orchestra → Creates session (status: planning)
|
|
2056
|
+
2. aether_set_orchestra_plan → Defines phases/tasks (status: awaiting_approval)
|
|
2057
|
+
3. aether_create_contract → Generates type contracts [RECOMMENDED]
|
|
2058
|
+
4. aether_orchestra_approve → Begins execution (status: running)
|
|
2059
|
+
5. aether_orchestra_next → Get ready tasks
|
|
2060
|
+
6. aether_trigger_generation → Execute task with orchestraContext
|
|
2061
|
+
7. aether_report_to_orchestrator → Report completion/blockers
|
|
2062
|
+
8. Repeat 5-7 until phase complete
|
|
2063
|
+
9. aether_orchestra_checkpoint → Validate phase before advancing
|
|
2064
|
+
10. Repeat 5-9 until all phases done
|
|
2065
|
+
11. aether_complete_orchestra → Finalize session
|
|
2066
|
+
```
|
|
2067
|
+
|
|
2068
|
+
### Using aether_orchestra_guide
|
|
2069
|
+
|
|
2070
|
+
**RECOMMENDED**: Call this when starting or when unsure what to do:
|
|
2071
|
+
|
|
2072
|
+
```javascript
|
|
2073
|
+
// Get intelligent guidance
|
|
2074
|
+
aether_orchestra_guide({})
|
|
2075
|
+
|
|
2076
|
+
// Returns (example when no session exists):
|
|
2077
|
+
{
|
|
2078
|
+
nextTool: "aether_start_orchestra",
|
|
2079
|
+
parameters: {},
|
|
2080
|
+
explanation: "No active orchestra session found. Start a new session to begin.",
|
|
2081
|
+
example: "aether_start_orchestra({ maxIterations: 100, timeoutMinutes: 480 })"
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
// Returns (example when plan set but no contract):
|
|
2085
|
+
{
|
|
2086
|
+
nextTool: "aether_create_contract",
|
|
2087
|
+
parameters: { sessionId: "abc-123", requirements: "<Full project requirements>" },
|
|
2088
|
+
explanation: "Plan is set. Now generate the Source of Truth contract.",
|
|
2089
|
+
note: "This step is RECOMMENDED but optional. You can skip to aether_orchestra_approve."
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
// Returns (example when tasks ready):
|
|
2093
|
+
{
|
|
2094
|
+
nextTool: "aether_orchestra_next",
|
|
2095
|
+
parameters: { sessionId: "abc-123" },
|
|
2096
|
+
explanation: "3 task(s) ready to execute. Get them and trigger generation.",
|
|
2097
|
+
followUp: "After getting tasks, use aether_trigger_generation with orchestraContext."
|
|
2098
|
+
}
|
|
2099
|
+
```
|
|
2100
|
+
|
|
2101
|
+
### Using aether_orchestra_validate
|
|
2102
|
+
|
|
2103
|
+
**Pre-flight check** before taking any major action:
|
|
2104
|
+
|
|
2105
|
+
```javascript
|
|
2106
|
+
// Validate before approving
|
|
2107
|
+
aether_orchestra_validate({
|
|
2108
|
+
sessionId: "abc-123",
|
|
2109
|
+
intendedAction: "approve"
|
|
2110
|
+
})
|
|
2111
|
+
|
|
2112
|
+
// Returns (if prerequisites missing):
|
|
2113
|
+
{
|
|
2114
|
+
valid: false,
|
|
2115
|
+
status: "planning",
|
|
2116
|
+
hasPlan: true,
|
|
2117
|
+
hasContract: false,
|
|
2118
|
+
warnings: ["Contract not generated (RECOMMENDED)"],
|
|
2119
|
+
actionValid: true,
|
|
2120
|
+
nextStep: {
|
|
2121
|
+
tool: "aether_create_contract",
|
|
2122
|
+
reason: "Generate contract for consistent types/schemas across agents",
|
|
2123
|
+
canSkip: true
|
|
2124
|
+
},
|
|
2125
|
+
workflow: "📋 ORCHESTRA WORKFLOW: ... Current position: Step 3 (awaiting contract)"
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
// Returns (if ready to proceed):
|
|
2129
|
+
{
|
|
2130
|
+
valid: true,
|
|
2131
|
+
status: "awaiting_approval",
|
|
2132
|
+
hasPlan: true,
|
|
2133
|
+
hasContract: true,
|
|
2134
|
+
warnings: [],
|
|
2135
|
+
actionValid: true,
|
|
2136
|
+
nextStep: {
|
|
2137
|
+
tool: "aether_orchestra_approve",
|
|
2138
|
+
reason: "Approve the plan to begin execution"
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
```
|
|
2142
|
+
|
|
2143
|
+
**Intended Actions:**
|
|
2144
|
+
- `execute_task` - Checks if session is running
|
|
2145
|
+
- `approve` - Checks if plan exists
|
|
2146
|
+
- `complete` - Checks if session isn't already complete
|
|
2147
|
+
- `any` - General validation
|
|
2148
|
+
|
|
2149
|
+
### Using aether_orchestra_checkpoint
|
|
2150
|
+
|
|
2151
|
+
**Quality gate** between phases:
|
|
2152
|
+
|
|
2153
|
+
```javascript
|
|
2154
|
+
// Validate phase completion
|
|
2155
|
+
aether_orchestra_checkpoint({
|
|
2156
|
+
sessionId: "abc-123",
|
|
2157
|
+
phaseNumber: 1, // Optional, uses current phase if not provided
|
|
2158
|
+
validateContract: true, // Check contract compliance
|
|
2159
|
+
autoAdvance: true // Automatically advance to next phase if passed
|
|
2160
|
+
})
|
|
2161
|
+
|
|
2162
|
+
// Returns (if phase incomplete):
|
|
2163
|
+
{
|
|
2164
|
+
success: false,
|
|
2165
|
+
checkpointPassed: false,
|
|
2166
|
+
phase: { number: 1, title: "Foundation", status: "in_progress" },
|
|
2167
|
+
tasks: { total: 5, completed: 3, running: 1, pending: 1 },
|
|
2168
|
+
blockers: [
|
|
2169
|
+
"1 task(s) still running",
|
|
2170
|
+
"1 task(s) still pending"
|
|
2171
|
+
],
|
|
2172
|
+
message: "❌ Phase 1 checkpoint FAILED - 2 blocker(s)"
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
// Returns (if phase complete and auto-advancing):
|
|
2176
|
+
{
|
|
2177
|
+
success: true,
|
|
2178
|
+
checkpointPassed: true,
|
|
2179
|
+
phase: { number: 1, title: "Foundation", status: "completed" },
|
|
2180
|
+
tasks: { total: 5, completed: 5, running: 0, pending: 0 },
|
|
2181
|
+
artifacts: { expected: 5, found: 5, missing: [] },
|
|
2182
|
+
contract: { checked: true, hasContract: true, warnings: [] },
|
|
2183
|
+
blockers: [],
|
|
2184
|
+
autoAdvanced: true,
|
|
2185
|
+
advancedToPhase: 2,
|
|
2186
|
+
message: "✅ Phase 1 checkpoint PASSED - Advanced to Phase 2"
|
|
2187
|
+
}
|
|
2188
|
+
```
|
|
2189
|
+
|
|
2190
|
+
### Best Practices for Workflow Enforcement
|
|
2191
|
+
|
|
2192
|
+
#### 1. Start with Guide
|
|
2193
|
+
|
|
2194
|
+
When beginning or resuming a session:
|
|
2195
|
+
|
|
2196
|
+
```javascript
|
|
2197
|
+
// First call - get guidance
|
|
2198
|
+
const guidance = await aether_orchestra_guide({});
|
|
2199
|
+
console.log(`Next: ${guidance.nextTool}`);
|
|
2200
|
+
console.log(`Why: ${guidance.explanation}`);
|
|
2201
|
+
|
|
2202
|
+
// Then follow the recommendation
|
|
2203
|
+
await callTool(guidance.nextTool, guidance.parameters);
|
|
2204
|
+
```
|
|
2205
|
+
|
|
2206
|
+
#### 2. Validate Before Major Actions
|
|
2207
|
+
|
|
2208
|
+
Before approving or completing:
|
|
2209
|
+
|
|
2210
|
+
```javascript
|
|
2211
|
+
// Check if ready to approve
|
|
2212
|
+
const validation = await aether_orchestra_validate({
|
|
2213
|
+
sessionId,
|
|
2214
|
+
intendedAction: "approve"
|
|
2215
|
+
});
|
|
2216
|
+
|
|
2217
|
+
if (!validation.valid) {
|
|
2218
|
+
console.log(`Not ready: ${validation.warnings.join(', ')}`);
|
|
2219
|
+
console.log(`Next step: ${validation.nextStep.tool}`);
|
|
2220
|
+
return;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
// Safe to proceed
|
|
2224
|
+
await aether_orchestra_approve({ sessionId });
|
|
2225
|
+
```
|
|
2226
|
+
|
|
2227
|
+
#### 3. Checkpoint Between Phases
|
|
2228
|
+
|
|
2229
|
+
After completing all tasks in a phase:
|
|
2230
|
+
|
|
2231
|
+
```javascript
|
|
2232
|
+
// Validate phase before advancing
|
|
2233
|
+
const checkpoint = await aether_orchestra_checkpoint({
|
|
2234
|
+
sessionId,
|
|
2235
|
+
autoAdvance: true
|
|
2236
|
+
});
|
|
2237
|
+
|
|
2238
|
+
if (!checkpoint.checkpointPassed) {
|
|
2239
|
+
console.log(`Phase blocked: ${checkpoint.blockers.join('\n')}`);
|
|
2240
|
+
// Handle blockers before continuing
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
// Phase validated, proceeding to next
|
|
2245
|
+
console.log(`Advanced to Phase ${checkpoint.advancedToPhase}`);
|
|
2246
|
+
```
|
|
2247
|
+
|
|
2248
|
+
#### 4. Never Skip the Contract Step
|
|
2249
|
+
|
|
2250
|
+
The contract ensures type consistency:
|
|
2251
|
+
|
|
2252
|
+
```javascript
|
|
2253
|
+
// Always check for contract before executing tasks
|
|
2254
|
+
const validation = await aether_orchestra_validate({ sessionId });
|
|
2255
|
+
|
|
2256
|
+
if (!validation.hasContract) {
|
|
2257
|
+
// Generate contract first
|
|
2258
|
+
await aether_create_contract({
|
|
2259
|
+
sessionId,
|
|
2260
|
+
requirements: fullProjectRequirements
|
|
2261
|
+
});
|
|
2262
|
+
}
|
|
2263
|
+
```
|
|
2264
|
+
|
|
2265
|
+
### Workflow Enforcement Decision Tree
|
|
2266
|
+
|
|
2267
|
+
```
|
|
2268
|
+
START
|
|
2269
|
+
│
|
|
2270
|
+
▼
|
|
2271
|
+
aether_orchestra_guide({})
|
|
2272
|
+
│
|
|
2273
|
+
├─ No session? ──────────────▶ aether_start_orchestra
|
|
2274
|
+
│
|
|
2275
|
+
├─ No plan? ─────────────────▶ aether_set_orchestra_plan
|
|
2276
|
+
│
|
|
2277
|
+
├─ No contract? ─────────────▶ aether_create_contract (recommended)
|
|
2278
|
+
│ or
|
|
2279
|
+
│ aether_orchestra_approve (skip)
|
|
2280
|
+
│
|
|
2281
|
+
├─ Awaiting approval? ───────▶ aether_orchestra_validate({ intendedAction: "approve" })
|
|
2282
|
+
│ │
|
|
2283
|
+
│ ├─ valid=true ──▶ aether_orchestra_approve
|
|
2284
|
+
│ └─ valid=false ─▶ Fix warnings first
|
|
2285
|
+
│
|
|
2286
|
+
├─ Running + tasks ready? ───▶ aether_orchestra_next
|
|
2287
|
+
│ │
|
|
2288
|
+
│ ▼
|
|
2289
|
+
│ aether_trigger_generation (with orchestraContext)
|
|
2290
|
+
│ │
|
|
2291
|
+
│ ▼
|
|
2292
|
+
│ aether_report_to_orchestrator
|
|
2293
|
+
│
|
|
2294
|
+
├─ Phase complete? ──────────▶ aether_orchestra_checkpoint({ autoAdvance: true })
|
|
2295
|
+
│ │
|
|
2296
|
+
│ ├─ passed ──▶ Continue to next phase
|
|
2297
|
+
│ └─ failed ──▶ Fix blockers
|
|
2298
|
+
│
|
|
2299
|
+
└─ All phases done? ─────────▶ aether_complete_orchestra
|
|
2300
|
+
```
|
|
2301
|
+
|
|
2302
|
+
---
|
|
2303
|
+
|
|
2021
2304
|
## Audit Trail
|
|
2022
2305
|
|
|
2023
2306
|
Every action in Orchestra is logged for full auditability.
|
|
@@ -2320,6 +2603,52 @@ aether_complete_orchestra({
|
|
|
2320
2603
|
completionReason: 'all_criteria_met' | 'all_phases_complete' | 'manual_stop' | 'timeout' | 'max_iterations',
|
|
2321
2604
|
summary?: string
|
|
2322
2605
|
})
|
|
2606
|
+
|
|
2607
|
+
// Edit Orchestra (modify plan without restarting)
|
|
2608
|
+
aether_edit_orchestra({
|
|
2609
|
+
sessionId: string,
|
|
2610
|
+
action: 'add_task' | 'remove_task' | 'update_task' | 'split_task' | 'add_phase' | 'update_phase',
|
|
2611
|
+
phaseId?: string, // For add_task
|
|
2612
|
+
taskId?: string, // For remove_task, update_task, split_task
|
|
2613
|
+
task?: object, // Task definition for add_task/update_task
|
|
2614
|
+
splitInto?: object[], // Sub-tasks for split_task
|
|
2615
|
+
phase?: object, // Phase definition for add_phase
|
|
2616
|
+
phaseUpdates?: object // Updates for update_phase
|
|
2617
|
+
})
|
|
2618
|
+
|
|
2619
|
+
// Create Contract (Source of Truth)
|
|
2620
|
+
aether_create_contract({
|
|
2621
|
+
sessionId: string,
|
|
2622
|
+
requirements: string, // Full project requirements
|
|
2623
|
+
existingCodeSummary?: string // For brownfield projects
|
|
2624
|
+
})
|
|
2625
|
+
// Returns: { success: boolean, contract: object, contractVersion: number }
|
|
2626
|
+
```
|
|
2627
|
+
|
|
2628
|
+
### Workflow Enforcement (v7)
|
|
2629
|
+
|
|
2630
|
+
```typescript
|
|
2631
|
+
// Get Intelligent Guidance
|
|
2632
|
+
aether_orchestra_guide({
|
|
2633
|
+
sessionId?: string // Uses latest if not provided
|
|
2634
|
+
})
|
|
2635
|
+
// Returns: { nextTool: string, parameters: object, explanation: string, example?: string }
|
|
2636
|
+
|
|
2637
|
+
// Pre-flight Validation
|
|
2638
|
+
aether_orchestra_validate({
|
|
2639
|
+
sessionId?: string,
|
|
2640
|
+
intendedAction?: 'execute_task' | 'approve' | 'complete' | 'any'
|
|
2641
|
+
})
|
|
2642
|
+
// Returns: { valid: boolean, status: string, hasPlan: boolean, hasContract: boolean, warnings: string[], nextStep: object }
|
|
2643
|
+
|
|
2644
|
+
// Phase Checkpoint
|
|
2645
|
+
aether_orchestra_checkpoint({
|
|
2646
|
+
sessionId: string,
|
|
2647
|
+
phaseNumber?: number, // Uses current phase if not provided
|
|
2648
|
+
validateContract?: boolean, // Default: true
|
|
2649
|
+
autoAdvance?: boolean // Default: false - advance to next phase if passed
|
|
2650
|
+
})
|
|
2651
|
+
// Returns: { checkpointPassed: boolean, blockers: string[], autoAdvanced: boolean, advancedToPhase?: number }
|
|
2323
2652
|
```
|
|
2324
2653
|
|
|
2325
2654
|
### Generation
|
|
@@ -2428,6 +2757,7 @@ aether_push_local({
|
|
|
2428
2757
|
|
|
2429
2758
|
| Version | Date | Changes |
|
|
2430
2759
|
|---------|------|---------|
|
|
2760
|
+
| v7.0 | 2025-01 | Workflow enforcement: validate, checkpoint, guide tools |
|
|
2431
2761
|
| v6.0 | 2025-01 | File collision prevention, file lock manager |
|
|
2432
2762
|
| v5.0 | 2025-01 | Contract-first development, validation protocol |
|
|
2433
2763
|
| v4.0 | 2024-12 | Orchestrator Brain, dynamic decisions |
|
|
@@ -2441,17 +2771,22 @@ aether_push_local({
|
|
|
2441
2771
|
|
|
2442
2772
|
### Starting an Orchestra Session
|
|
2443
2773
|
|
|
2774
|
+
- [ ] `aether_orchestra_guide({})` - Get guidance on what to do
|
|
2444
2775
|
- [ ] `/orchestra` - Create session and plan
|
|
2445
2776
|
- [ ] Review generated DEVELOPMENT_PLAN.md
|
|
2446
2777
|
- [ ] Verify local project path for validation
|
|
2778
|
+
- [ ] `aether_create_contract()` - Generate Source of Truth [RECOMMENDED]
|
|
2779
|
+
- [ ] `aether_orchestra_validate({ intendedAction: "approve" })` - Pre-flight check
|
|
2447
2780
|
- [ ] `/orchestra approve` - Start execution
|
|
2448
2781
|
|
|
2449
2782
|
### During Execution
|
|
2450
2783
|
|
|
2784
|
+
- [ ] Use `aether_orchestra_guide` when unsure what to do next
|
|
2451
2785
|
- [ ] Monitor `aether_orchestra_status` regularly
|
|
2452
2786
|
- [ ] Check `safeguards` for approaching limits
|
|
2453
2787
|
- [ ] Validate after each code-generating task
|
|
2454
2788
|
- [ ] Full validation after each phase (typecheck + lint + test)
|
|
2789
|
+
- [ ] `aether_orchestra_checkpoint({ autoAdvance: true })` - Gate between phases
|
|
2455
2790
|
- [ ] Handle blockers promptly
|
|
2456
2791
|
|
|
2457
2792
|
### On Completion
|
|
@@ -2465,12 +2800,30 @@ aether_push_local({
|
|
|
2465
2800
|
### If Issues Occur
|
|
2466
2801
|
|
|
2467
2802
|
- [ ] Check `aether_orchestra_status` with logs
|
|
2803
|
+
- [ ] Use `aether_orchestra_guide` to get next step
|
|
2468
2804
|
- [ ] Review `tasksBlockedByFiles` for v6 conflicts
|
|
2469
2805
|
- [ ] Check `lastValidationErrors`
|
|
2806
|
+
- [ ] Use `aether_edit_orchestra` to modify plan mid-flight
|
|
2470
2807
|
- [ ] Use `aether_orchestra_pause` if needed
|
|
2471
2808
|
- [ ] Create fix tasks or manually resolve
|
|
2472
2809
|
- [ ] `aether_orchestra_resume` to continue
|
|
2473
2810
|
|
|
2811
|
+
### Workflow Enforcement Quick Commands
|
|
2812
|
+
|
|
2813
|
+
```javascript
|
|
2814
|
+
// When unsure what to do next:
|
|
2815
|
+
aether_orchestra_guide({})
|
|
2816
|
+
|
|
2817
|
+
// Before approving a plan:
|
|
2818
|
+
aether_orchestra_validate({ intendedAction: "approve" })
|
|
2819
|
+
|
|
2820
|
+
// After completing a phase:
|
|
2821
|
+
aether_orchestra_checkpoint({ sessionId, autoAdvance: true })
|
|
2822
|
+
|
|
2823
|
+
// To modify plan without restarting:
|
|
2824
|
+
aether_edit_orchestra({ sessionId, action: "add_task", ... })
|
|
2825
|
+
```
|
|
2826
|
+
|
|
2474
2827
|
---
|
|
2475
2828
|
|
|
2476
|
-
*Orchestra
|
|
2829
|
+
*Orchestra v7 - Autonomous AI Development Orchestration with Workflow Enforcement, Contract-First Development, Dynamic Agent Switching, and File Collision Prevention. The trust of millions of codebases depends on this system working reliably.*
|