-
-
Notifications
You must be signed in to change notification settings - Fork 743
chore: auditoria de lifecycle — depreca scripts legados (#90) #592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| # Hierarquia de Orquestradores - AIOX Core | ||
|
|
||
| > Issue: #90 - Script lifecycle audit | ||
| > EPIC12-F4 - Documentacao de coexistencia | ||
|
|
||
| ## Visao Geral | ||
|
|
||
| O AIOX possui tres orquestradores que operam em camadas complementares. Nenhum conflita com os outros -- cada um tem escopo e responsabilidades distintas. | ||
|
|
||
| ``` | ||
| MasterOrchestrator (Epic 0) | ||
| |-- Ativacao de agentes, roteamento de comandos | ||
| |-- Pipeline completo: Epics 3 -> 4 -> 5 -> 6 | ||
| | | ||
| BobOrchestrator (Epic 12) | ||
| |-- Decision tree do PM agent | ||
| |-- Story-driven, multi-agent orchestration | ||
| |-- Integra todos os modulos Epic 11 | ||
| | | ||
| WorkflowOrchestrator (Core) | ||
| |-- Engine de execucao de workflows | ||
| |-- Multi-agent phase dispatch | ||
| |-- Pre-Flight detection, skill dispatch | ||
| ``` | ||
|
|
||
| ## Detalhamento | ||
|
|
||
| ### 1. MasterOrchestrator | ||
|
|
||
| | Campo | Valor | | ||
| |-------|-------| | ||
| | **Path** | `.aiox-core/core/orchestration/master-orchestrator.js` | | ||
| | **Epic** | Epic 0 (ADE - Autonomous Development Engine) | | ||
| | **Story** | 0.1 - Master Orchestrator Core | | ||
| | **Escopo** | Orquestracao central do pipeline de desenvolvimento autonomo | | ||
|
|
||
| **Responsabilidades:** | ||
| - `executeFullPipeline()` — executa Epics 3, 4, 5, 6 em sequencia | ||
| - `executeEpic(epicNum)` — execucao individual de um epic | ||
| - `resumeFromEpic(epicNum)` — retomada de ponto especifico | ||
| - State machine: INITIALIZED -> READY -> IN_PROGRESS -> BLOCKED -> COMPLETE | ||
| - Integracao com TechStackDetector para pre-flight detection | ||
|
|
||
| **Quando usar:** Pipeline completo de desenvolvimento autonomo, ativacao de agentes no nivel mais alto. | ||
|
|
||
| --- | ||
|
|
||
| ### 2. BobOrchestrator | ||
|
|
||
| | Campo | Valor | | ||
| |-------|-------| | ||
| | **Path** | `.aiox-core/core/orchestration/bob-orchestrator.js` | | ||
| | **Epic** | Epic 12 (Projeto Bob) | | ||
| | **Story** | 12.3 - Bob Orchestration Logic (Decision Tree) | | ||
| | **Escopo** | PM agent routing via decision tree codificada | | ||
|
|
||
| **Responsabilidades:** | ||
| - Detecta estado do projeto e roteia para workflow correto | ||
| - Integra TODOS os modulos Epic 11: | ||
| - ExecutorAssignment (11.1) — selecao de agente | ||
| - TerminalSpawner (11.2) — spawn de agentes | ||
| - WorkflowExecutor (11.3) — ciclo de desenvolvimento | ||
| - SurfaceChecker (11.4) — criterios de decisao humana | ||
| - SessionState (11.5) — persistencia de sessao | ||
| - Decision tree sem LLM (roteamento deterministico) | ||
| - Constraint: < 50 linhas de logica especifica de outros agentes | ||
|
|
||
| **Quando usar:** Orquestracao story-driven multi-agente via PM. | ||
|
|
||
| --- | ||
|
|
||
| ### 3. WorkflowOrchestrator | ||
|
|
||
| | Campo | Valor | | ||
| |-------|-------| | ||
| | **Path** | `.aiox-core/core/orchestration/workflow-orchestrator.js` | | ||
| | **Epic** | Core (pre-Epic 11) | | ||
| | **Escopo** | Engine de execucao de workflows multi-agente | | ||
|
|
||
| **Responsabilidades:** | ||
| - Executa workflows com subagentes reais (persona transformation) | ||
| - Cada fase despacha para agente especializado | ||
| - Integracao com: | ||
| - SubagentPromptBuilder — construcao de prompts | ||
| - ContextManager — gerenciamento de contexto | ||
| - ParallelExecutor — execucao paralela | ||
| - ChecklistRunner — execucao de checklists | ||
| - TechStackDetector (V3.1) — pre-flight detection | ||
| - ConditionEvaluator, SkillDispatcher — dispatch condicional | ||
|
|
||
| **Quando usar:** Execucao de workflows que envolvem multiplos agentes com fases definidas. | ||
|
|
||
| --- | ||
|
|
||
| ## Relacao Entre Orquestradores | ||
|
|
||
| ``` | ||
| Requisicao do usuario | ||
| | | ||
| v | ||
| MasterOrchestrator (ativa agente) | ||
| | | ||
| |-- Se PM/Bob --> BobOrchestrator (decision tree) | ||
| | | | ||
| | v | ||
| | WorkflowExecutor (ciclo dev) | ||
| | | | ||
| | v | ||
| | WorkflowOrchestrator (executa fases) | ||
| | | ||
| |-- Se outro agente --> execucao direta ou task | ||
| ``` | ||
|
|
||
| ## Modulos Deprecados (ver docs/deprecated-scripts.md) | ||
|
|
||
| | Modulo Legado | Substituto | Status | | ||
| |---------------|-----------|--------| | ||
| | `workflow-state-manager.js` | `session-state.js` | @deprecated | | ||
| | `workflow-navigator.js` | `bob-orchestrator.js` + `session-state.js` | @deprecated (semi) | | ||
| | `command-execution-hook.js` | `session-state.js` | @deprecated | | ||
|
|
||
| Estes modulos ainda existem para backward compatibility mas nao devem ser usados em codigo novo. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| # @deprecated One-time migration script (Task V2.0 migration, completed). | ||
| # All tasks have been migrated to V2.0 format. This script is no longer needed. | ||
| # Replacement: tasks are now natively V2.0 — use validate-task-v2.js for validation. | ||
| Write-Warning "[DEPRECATED] batch-migrate-phase2.ps1 — migration already completed. Tasks are V2.0 natively." | ||
|
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make the deprecated entrypoint opt-in before running the migration loop. The new banner says this migration is already complete, but a normal invocation still proceeds to rewrite the fixed task list below. That makes accidental runs risky on already-migrated files. Safer default: warn and exit unless a 🧰 Tools🪛 PSScriptAnalyzer (1.24.0)[warning] Missing BOM encoding for non-ASCII encoded file 'batch-migrate-phase2.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI Agents |
||
|
|
||
| # Phase 2 - Batch migrate agent-specific tasks (50 tasks) | ||
|
|
||
| $tasks = @( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,10 @@ | |
| # | ||
| # AIOX Framework Documentation Migration Script | ||
| # | ||
| # @deprecated One-time migration script (Story 6.1.2.6, completed). | ||
| # Framework docs have been migrated to aiox-core. This script is no longer needed. | ||
| # Documentation now lives natively in docs/ and .aiox-core/docs/. | ||
| # | ||
| # Purpose: Migrate framework docs from aiox-fullstack to aiox-core (REPO 1) | ||
| # Story: 6.1.2.6 - Framework Configuration System | ||
| # Execution Timeline: Q2 2026 (Repository Migration Phase) | ||
|
|
@@ -15,6 +19,8 @@ | |
| # --help Show this help message | ||
| # | ||
|
|
||
| echo "[DEPRECATED] migrate-framework-docs.sh — migration already completed. Docs live natively in docs/ and .aiox-core/docs/." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stop after the deprecation banner unless the user explicitly opts in. After printing this message, the script still executes the full migration flow and can overwrite docs in the target repo. For a one-off script now declared complete, the safe default should be to exit here and require an explicit 🤖 Prompt for AI Agents |
||
|
|
||
| set -e # Exit on error | ||
|
|
||
| # Colors for output | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,8 @@ | |||||
|
|
||||||
| 'use strict'; | ||||||
|
|
||||||
| console.warn('[DEPRECATED] session-context-loader.js — use require(\'.aiox-core/core/session/context-loader\') directly (WIS-3)'); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Locate the file
find . -name "session-context-loader.js" -type fRepository: SynkraAI/aiox-core Length of output: 166 🏁 Script executed: # Check if the path exists and read the file around lines 18-21
ls -la ".aiox-core/scripts/session-context-loader.js" 2>/dev/null || find . -path "*aiox-core*" -name "session-context-loader.js"Repository: SynkraAI/aiox-core Length of output: 155 🏁 Script executed: # Search for any configuration that might establish a .aiox-core alias
find . -name "package.json" -o -name "tsconfig.json" | head -20Repository: SynkraAI/aiox-core Length of output: 418 🏁 Script executed: cat -n ".aiox-core/scripts/session-context-loader.js"Repository: SynkraAI/aiox-core Length of output: 2101 🏁 Script executed: # Check the root package.json for any path aliases or resolution config
cat "./.aiox-core/package.json"Repository: SynkraAI/aiox-core Length of output: 2557 🏁 Script executed: # Also check the repo root package.json
cat "./package.json" | head -100Repository: SynkraAI/aiox-core Length of output: 4910 🏁 Script executed: # Verify the path validity by checking what the actual import resolves to
ls -la ".aiox-core/core/session/context-loader.js" 2>/dev/null || echo "File not found at that path"Repository: SynkraAI/aiox-core Length of output: 153 🏁 Script executed: # Double-check the relative path from the script location
cd ".aiox-core/scripts" && ls -la "../core/session/context-loader.js" 2>/dev/null || echo "File not found"Repository: SynkraAI/aiox-core Length of output: 145 Fix the replacement The path in the warning ( Suggested fix-console.warn('[DEPRECATED] session-context-loader.js — use require(\'.aiox-core/core/session/context-loader\') directly (WIS-3)');
+console.warn('[DEPRECATED] session-context-loader.js — use require(\'../core/session/context-loader\') directly (WIS-3)');📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| // Re-export from canonical location | ||||||
| const SessionContextLoader = require('../core/session/context-loader'); | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,7 @@ | ||||||||||
| # @deprecated One-time validation script for Task V2.0 Phase 1 migration. | ||||||||||
| # Migration is complete. Use validate-task-v2.js directly for ongoing validation. | ||||||||||
| Write-Warning "[DEPRECATED] validate-phase1.ps1 — Phase 1 migration already validated. Use validate-task-v2.js directly." | ||||||||||
|
Comment on lines
+2
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Point the warning at the real replacement path. The new deprecation message tells users to run Suggested update-# Migration is complete. Use validate-task-v2.js directly for ongoing validation.
-Write-Warning "[DEPRECATED] validate-phase1.ps1 — Phase 1 migration already validated. Use validate-task-v2.js directly."
+# Migration is complete. Use .aiox-core/development/scripts/validate-task-v2.js directly for ongoing validation.
+Write-Warning "[DEPRECATED] validate-phase1.ps1 — Phase 1 migration already validated. Use .aiox-core/development/scripts/validate-task-v2.js directly."📝 Committable suggestion
Suggested change
🧰 Tools🪛 PSScriptAnalyzer (1.24.0)[warning] Missing BOM encoding for non-ASCII encoded file 'validate-phase1.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
python - <<'PY'
from pathlib import Path
p = Path(".aiox-core/scripts/validate-phase1.ps1")
data = p.read_bytes()
has_bom = data.startswith(b"\xef\xbb\xbf")
has_non_ascii = any(b > 0x7F for b in data)
print(f"file={p}")
print(f"utf8_bom={has_bom}")
print(f"contains_non_ascii={has_non_ascii}")
PYRepository: SynkraAI/aiox-core Length of output: 144 Save this file as UTF-8 with BOM to properly encode the Unicode characters, or remove the em-dash from the warning message. The file currently contains non-ASCII characters (the em-dash on line 3) but lacks a UTF-8 BOM. This mismatch causes PSScriptAnalyzer to flag 🧰 Tools🪛 PSScriptAnalyzer (1.24.0)[warning] Missing BOM encoding for non-ASCII encoded file 'validate-phase1.ps1' (PSUseBOMForUnicodeEncodedFile) 🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| $tasks = @( | ||||||||||
| 'dev-develop-story.md', | ||||||||||
| 'create-next-story.md', | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not keep the legacy write path enabled by default.
This now advertises itself as a completed migration, but a plain run still executes the phase-1 rewrite loop below. That is a risky default for a deprecated script. Please warn and return unless the caller explicitly passes a force flag.
🧰 Tools
🪛 PSScriptAnalyzer (1.24.0)
[warning] Missing BOM encoding for non-ASCII encoded file 'batch-migrate-phase1.ps1'
(PSUseBOMForUnicodeEncodedFile)
🤖 Prompt for AI Agents