Self-Development Meta-Workflow Specification

Version: 2.4.0 Status: COMPLETE (All Implementation Phases Done) Date: 2026-01-09 (ET) GitHub Issue: #144


Prerequisites

PrerequisiteDescriptionTracking
v2.3.0 CLI Adapters StableClaude, Gemini, Codex adapters production-ready (1 day 0 critical bugs)Issues #75-#77
v2.3.0 Quality RouterQuality-based model routing testedIssue #78
Docker AvailableDocker CLI available for sandboxed executionVerified
Security Audit CompleteAll security safeguards implemented and testedThis document

Stability Definition: Zero critical bugs for 1 calendar day after deployment.


Executive Summary

This specification defines a meta-workflow for nexus-agents self-development. The workflow enables the system to analyze open issues, plan implementations using its own protocols (TRINITY, Consensus, Reflexion), achieve multi-agent consensus, obtain human approval, and execute implementation using Self-Debug and Self-Refine protocols.

Security Model: All code execution occurs in Docker containers with strict resource limits. Human approval is required for plan approval only (Phase 6). After approval, automated security gates (input sanitization, Docker sandbox, security scans) handle execution. PRs are created for milestone changes to enable tracking and rollback. Only repository owner can trigger workflows.

Autonomy Model: After human approves the plan, the workflow runs autonomously through security gates. Humans receive notifications but are not blockers. Rate limiting is optional and disabled by default.


Workflow Overview

 +-------------+     +-------------+     +-------------+
 |   ANALYZE   |---->|  RESEARCH   |---->|    PLAN     |
 | (Sanitized) |     | (Context)   |     | (TRINITY)   |
 +-------------+     +-------------+     +-------------+
        |                  |                   |
        v                  v                   v
 +-------------+     +-------------+     +-------------+
 |    VOTE     |<----|   REVIEW    |<----|   REFINE    |
 | (Consensus) |     | (Human)     |     | (Reflexion) |
 +-------------+     +-------------+     +-------------+
        |
        | [PLAN APPROVED - Autonomous from here]
        v
 +-------------+     +-------------+     +-------------+
 |  GENERATE   |---->|  IMPLEMENT  |---->|   SECURE    |
 | (Code)      |     | (Sandboxed) |     |   CHECK     |
 +-------------+     +-------------+     +-------------+
        |                  |                   |
        v                  v                   v
 +-------------+     +-------------+     +-------------+
 |   VERIFY    |---->|   COMMIT    |---->| MILESTONE   |
 | (Tests)     |     | (PR)        |     |   PR        |
 +-------------+     +-------------+     +-------------+
                                               |
                                      [Notify human, auto-merge]

Phases Summary

PhaseNameProtocol(s)OutputHuman Checkpoint
1AnalyzeAdaptive + Input SanitizationPrioritized issue listNo
2ResearchParallel executionContext & prior artNo
3PlanTRINITY (Thinker/Worker/Verifier)Implementation planNo
4RefineReflexion (multi-persona critics)Refined planNo
5VoteConsensus (5-agent vote)Approval/rejectionNo
6ReviewHuman checkpointPlan approvalYES
6.5Code ReviewHuman checkpointCode approvalYES
7ImplementSelf-Debug (Docker sandbox)Working codeNo (automated)
7.5Security CheckSecureCodeCheckerSecurity scan resultsNo (automated)
8VerifyTest executionTest resultsNo (automated)
9CommitGit operationsMilestone PRNo (notify only)

Note: After Phase 6 (Plan Approval), the workflow runs autonomously. Security is enforced by automated gates (Docker sandbox, security scans, test verification).


Sub-Documents

This workflow specification is split into focused sub-documents for readability:

DocumentContents
Phases 1-6Analyze, Research, Plan (TRINITY), Refine (Reflexion), Vote (Consensus), Review (Human)
Execution PhasesCode Review, Implement (Docker sandbox), Security Check, Verify, Commit
OperationsError handling, configuration, metrics, rate limiting, rollback, runbook, audit trail
Validation & ImplementationImprovement validation protocol (Tier 1-3 gates), WIS framework, implementation notes

Research Integration

PaperTechniqueIntegration Point
arXiv:2512.04695TRINITYPhase 3 (Plan)
arXiv:2512.20845Multi-Agent ReflexionPhase 4 (Refine)
arXiv:2303.17651Self-RefinePhase 7 (Implement)
arXiv:2304.05128Self-DebugPhase 7 (Implement)
arXiv:2502.19130Adaptive SelectionPhase 1 (Analyze)

Approval

This specification requires multi-agent consensus before implementation:

AgentVoteNotes
ArchitectAPPROVEv2.0.0 security model
SecurityAPPROVEDocker sandbox adequate
DevExAPPROVEHuman checkpoints clear
AI/MLAPPROVEProtocol selection sound
PMAPPROVERisk/value balanced

Threshold: Supermajority (4/5) required. Result: Unanimous (5/5).


Specification created: 2026-01-08 (ET) Revision: 2.4.0 - Split into sub-documents for governance compliance Protocol versions: TRINITY v1, Reflexion v1, Consensus v1