Two critical fixes for E2E council workflow: 1. Reduced core council roles from 8 to 2 (tpm + senior-software-architect) - Faster council formation - Easier debugging - Sufficient for initial project planning 2. Added broadcast to monitor path - Monitor now broadcasts council opportunities to CHORUS agents - Previously only webhook path had broadcast, monitor path missed it - Added broadcaster parameter to NewMonitor() - Broadcast sent after council formation with 30s timeout Verified working: - Council formation successful - Broadcast to CHORUS agents confirmed - Role claims received (TPM claimed and loaded) - Persona status "loaded" acknowledged Image: anthonyrawlins/whoosh:broadcast-fix Council: 2dad2070-292a-4dbd-9195-89795f84da19 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
105 lines
4.6 KiB
Go
105 lines
4.6 KiB
Go
package council
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// CouncilFormationRequest represents a request to form a project kickoff council
|
|
type CouncilFormationRequest struct {
|
|
ProjectName string `json:"project_name"`
|
|
Repository string `json:"repository"`
|
|
ProjectBrief string `json:"project_brief"`
|
|
Constraints string `json:"constraints,omitempty"`
|
|
TechLimits string `json:"tech_limits,omitempty"`
|
|
ComplianceNotes string `json:"compliance_notes,omitempty"`
|
|
Targets string `json:"targets,omitempty"`
|
|
TaskID uuid.UUID `json:"task_id"`
|
|
IssueID int64 `json:"issue_id"`
|
|
ExternalURL string `json:"external_url"`
|
|
GoalID string `json:"goal_id,omitempty"`
|
|
PulseID string `json:"pulse_id,omitempty"`
|
|
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
|
}
|
|
|
|
// CouncilComposition defines the agents that make up the kickoff council
|
|
type CouncilComposition struct {
|
|
CouncilID uuid.UUID `json:"council_id"`
|
|
ProjectName string `json:"project_name"`
|
|
CoreAgents []CouncilAgent `json:"core_agents"`
|
|
OptionalAgents []CouncilAgent `json:"optional_agents"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Status string `json:"status"` // forming, active, completed, failed
|
|
}
|
|
|
|
// CouncilAgent represents a single agent in the council
|
|
type CouncilAgent struct {
|
|
AgentID string `json:"agent_id"`
|
|
RoleName string `json:"role_name"`
|
|
AgentName string `json:"agent_name"`
|
|
Required bool `json:"required"`
|
|
Deployed bool `json:"deployed"`
|
|
ServiceID string `json:"service_id,omitempty"`
|
|
DeployedAt *time.Time `json:"deployed_at,omitempty"`
|
|
Status string `json:"status"` // pending, assigned, deploying, active, failed
|
|
PersonaStatus *string `json:"persona_status,omitempty"` // pending, loading, loaded, failed
|
|
PersonaLoadedAt *time.Time `json:"persona_loaded_at,omitempty"`
|
|
EndpointURL *string `json:"endpoint_url,omitempty"`
|
|
PersonaAckPayload map[string]interface{} `json:"persona_ack_payload,omitempty"`
|
|
}
|
|
|
|
// CouncilDeploymentResult represents the result of council agent deployment
|
|
type CouncilDeploymentResult struct {
|
|
CouncilID uuid.UUID `json:"council_id"`
|
|
ProjectName string `json:"project_name"`
|
|
DeployedAgents []DeployedCouncilAgent `json:"deployed_agents"`
|
|
Status string `json:"status"` // success, partial, failed
|
|
Message string `json:"message"`
|
|
DeployedAt time.Time `json:"deployed_at"`
|
|
Errors []string `json:"errors,omitempty"`
|
|
}
|
|
|
|
// DeployedCouncilAgent represents a successfully deployed council agent
|
|
type DeployedCouncilAgent struct {
|
|
ServiceID string `json:"service_id"`
|
|
ServiceName string `json:"service_name"`
|
|
RoleName string `json:"role_name"`
|
|
AgentID string `json:"agent_id"`
|
|
Image string `json:"image"`
|
|
Status string `json:"status"`
|
|
DeployedAt time.Time `json:"deployed_at"`
|
|
}
|
|
|
|
// CouncilArtifacts represents the outputs produced by the council
|
|
type CouncilArtifacts struct {
|
|
CouncilID uuid.UUID `json:"council_id"`
|
|
ProjectName string `json:"project_name"`
|
|
KickoffManifest map[string]interface{} `json:"kickoff_manifest,omitempty"`
|
|
SeminalDR string `json:"seminal_dr,omitempty"`
|
|
ScaffoldPlan map[string]interface{} `json:"scaffold_plan,omitempty"`
|
|
GateTests string `json:"gate_tests,omitempty"`
|
|
CHORUSLinks map[string]string `json:"chorus_links,omitempty"`
|
|
ProducedAt time.Time `json:"produced_at"`
|
|
Status string `json:"status"` // pending, partial, complete
|
|
}
|
|
|
|
// CoreCouncilRoles defines the required roles for any project kickoff council
|
|
// Reduced to minimal set for faster formation and easier debugging
|
|
var CoreCouncilRoles = []string{
|
|
"tpm",
|
|
"senior-software-architect",
|
|
}
|
|
|
|
// OptionalCouncilRoles defines the optional roles that may be included based on project needs
|
|
var OptionalCouncilRoles = []string{
|
|
"data-ai-architect",
|
|
"privacy-data-governance-officer",
|
|
"compliance-legal-liaison",
|
|
"performance-benchmarking-analyst",
|
|
"ui-ux-designer",
|
|
"ios-macos-developer",
|
|
"engine-programmer",
|
|
"integration-architect",
|
|
"cost-licensing-steward",
|
|
} |