chore: auditoria de lifecycle — depreca scripts legados (#90)#592
chore: auditoria de lifecycle — depreca scripts legados (#90)#592nikolasdehor wants to merge 1 commit intoSynkraAI:mainfrom
Conversation
…eprecated Audita 9 scripts legados superseded por modulos Epic 11/12 e migracao de tasks V2.0. Adiciona @deprecated JSDoc headers e console.warn em runtime para cada script, sem remover nenhum (backward compatibility). Scripts deprecados: - workflow-state-manager.js → session-state.js (Story 11.5) - workflow-navigator.js → bob-orchestrator.js (Story 12.3) - command-execution-hook.js → session-state.js (Story 11.5) - session-context-loader.js → core/session/context-loader (WIS-3) - batch-migrate-phase{1,2,3}.ps1 (migracao V2.0 concluida) - validate-phase1.ps1 (validacao one-time concluida) - migrate-framework-docs.sh (migracao de docs concluida) Documentacao: - docs/deprecated-scripts.md — lista completa com substitutos - .aiox-core/core/docs/orchestration-hierarchy.md — hierarquia dos 3 orquestradores (Bob, Master, Workflow) sem conflito Closes SynkraAI#90
|
@nikolasdehor is attempting to deploy a commit to the Pedro Valério Lopez's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThis pull request introduces deprecation notices across legacy orchestration and migration scripts with runtime warnings, adds comprehensive documentation for orchestrator hierarchy, and updates manifest metadata. No functional logic is altered—only deprecation messaging and documentation are added. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.aiox-core/install-manifest.yaml (1)
1-13:⚠️ Potential issue | 🟠 MajorAvoid manual edits to auto-generated manifest file.
The manifest explicitly states "DO NOT EDIT MANUALLY — regenerate with: npm run generate:manifest" on line 3, yet lines 11 and 13 contain manual updates (
generated_atandfile_count). While the file count is currently correct (1091 entries verified), manual editing creates maintenance risks:
- The validator checks only the files array and hashes, not metadata fields
- Future manual edits could silently diverge from actual state without detection
- The
generated_attimestamp should reflect actual generation time, not manual updatesRegenerate the manifest using the official script instead of editing values directly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.aiox-core/install-manifest.yaml around lines 1 - 13, The manifest file contains manual edits to metadata fields despite the header warning ("DO NOT EDIT MANUALLY")—specifically the generated_at and file_count entries—so regenerate the manifest using the official generator (scripts/generate-install-manifest.js / npm run generate:manifest) instead of editing .aiox-core/install-manifest.yaml by hand; run the generator to produce a fresh file where generated_at and file_count are computed automatically and commit that output, removing any manual timestamp or count changes.
🧹 Nitpick comments (5)
.aiox-core/scripts/command-execution-hook.js (1)
26-26: Avoid the deprecation side effect onrequire().This file is documented as a library entrypoint on Lines 19-21, so the top-level
console.warn()will now fire for every import, even when a caller is just loadingupdateSessionAfterCommand(). Please move the warning behind first use and emit it once.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.aiox-core/scripts/command-execution-hook.js at line 26, The top-level console.warn in command-execution-hook.js causes a deprecation message on every require; move the warning into the first-use path (e.g., inside updateSessionAfterCommand() or the initializer that callers invoke) and guard it with a module-scoped boolean so it logs only once; ensure updateSessionAfterCommand() (or the exported entrypoint) triggers the lazy warning before performing work so mere imports no longer print the deprecation..aiox-core/development/scripts/workflow-navigator.js (1)
24-24: Avoid emitting the deprecation warning at import time.
tests/core/workflow-navigator-integration.test.js, Lines 18 and 78-100, import this module directly, so the top-levelconsole.warn()now fires on every load and pollutes stderr even when the class is only being required. Prefer warning once on first actual use/constructor invocation instead of during module evaluation.Possible adjustment
-console.warn('[DEPRECATED] workflow-navigator.js — workflow routing now handled by bob-orchestrator.js (Story 12.3) and session-state.js (Story 11.5)'); +let didWarnDeprecation = false; + +function warnDeprecatedOnce() { + if (didWarnDeprecation) return; + didWarnDeprecation = true; + process.emitWarning( + 'workflow-navigator.js is deprecated; use bob-orchestrator.js and session-state.js instead.', + { type: 'DeprecationWarning', code: 'AIOX_WORKFLOW_NAVIGATOR_DEPRECATED' }, + ); +} class WorkflowNavigator { constructor() { + warnDeprecatedOnce(); this.patterns = this._loadPatterns(); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.aiox-core/development/scripts/workflow-navigator.js at line 24, Remove the top-level console.warn so the deprecation message is not emitted on import; instead add a module-scoped flag (e.g., let warned = false) and emit the same console.warn the first time the WorkflowNavigator is actually used—for example, check the flag and log inside the WorkflowNavigator constructor (or the exported initialization method), set warned = true after logging, and keep the original deprecation text. This ensures the message fires only on first real use rather than on module evaluation..aiox-core/development/scripts/workflow-state-manager.js (1)
23-23: Avoid warning on every import of the module.
tests/unit/workflow-state-manager.test.js, Lines 7-9, require this file at module scope, so the new top-levelconsole.warn()will emit on every test run and any other passive import. Please move the deprecation warning behind first real use and emit it once.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.aiox-core/development/scripts/workflow-state-manager.js at line 23, Remove the top-level console.warn('[DEPRECATED] ...') and replace it with a module-scoped boolean flag (e.g., let deprecationWarned = false) and a small helper function (e.g., emitDeprecation()) that logs the same warning only if deprecationWarned is false and then sets it to true; then call emitDeprecation() at the start of the module's exported entry points / real-use functions (i.e., wherever the module's public API is invoked) so the warning is emitted lazily on first real use and only once instead of on every import..aiox-core/core/docs/orchestration-hierarchy.md (2)
10-24: Add language specification to fenced code blocks.The ASCII art diagram lacks a language specification. While this is minor, adding
textorplainimproves markdown rendering and addresses the markdownlint warning.📝 Suggested improvement
-``` +```text MasterOrchestrator (Epic 0) |-- Ativacao de agentes, roteamento de comandos🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.aiox-core/core/docs/orchestration-hierarchy.md around lines 10 - 24, The fenced ASCII diagram lacks a language tag; update the code fence surrounding the orchestrator diagram to include a language like "text" or "plain" (e.g., change ``` to ```text) so Markdown renderers/linters recognize it as plain text; modify the block that contains MasterOrchestrator, BobOrchestrator, and WorkflowOrchestrator accordingly to eliminate the markdownlint warning.
97-112: Add language specification to relationship diagram.Similar to the hierarchy diagram, this flow diagram would benefit from a language specification for better rendering.
📝 Suggested improvement
-``` +```text Requisicao do usuario |🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.aiox-core/core/docs/orchestration-hierarchy.md around lines 97 - 112, The fenced diagram block showing "Requisicao do usuario" -> "MasterOrchestrator" etc. lacks a language tag; update the markdown fenced code block from plain ``` to a language-specified fence (e.g., ```text) so the flow diagram renders consistently, i.e., locate the block containing "Requisicao do usuario", "MasterOrchestrator", "BobOrchestrator", and "WorkflowExecutor" and change its opening fence to include the language specifier.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.aiox-core/scripts/batch-migrate-phase1.ps1:
- Around line 1-4: Add a guard that prevents the deprecated
batch-migrate-phase1.ps1 from performing any rewrites unless an explicit force
flag is provided: add a param for a [switch]$Force (or check for a -Force/$force
parameter) at the top, update the existing Write-Warning to state the script is
deprecated and requires --Force to proceed, and immediately return/exit when
-Force is not present so the phase-1 rewrite loop below never runs by default;
only continue to the rewrite logic when $Force is set.
In @.aiox-core/scripts/batch-migrate-phase2.ps1:
- Around line 1-4: Add an opt-in guard to the batch-migrate-phase2.ps1
entrypoint: define a switch parameter (e.g. -Force or -RunDeprecatedScript) at
the top via a Param() block and, before the existing migration loop, check if
the switch is present; if not, emit the deprecation Write-Warning and
exit/return immediately so the rest of the script (the migration loop that
rewrites tasks) does not run. Ensure the check is placed before any
file-modifying logic and reference the script name batch-migrate-phase2.ps1 and
the migration loop block when making the change.
In @.aiox-core/scripts/migrate-framework-docs.sh:
- Line 22: Modify migrate-framework-docs.sh to stop execution immediately after
printing the deprecation banner unless the user passed an explicit opt-in flag;
check positional/parsed args for a --force-legacy-run (or similar) flag and only
proceed with the existing migration flow when that flag is present, otherwise
call exit 0 right after the echo "[DEPRECATED] ..." line to prevent any further
actions; update any help/usage text to document the --force-legacy-run opt-in
and reference the script name migrate-framework-docs.sh in your changes so
reviewers can find the guard easily.
In @.aiox-core/scripts/session-context-loader.js:
- Line 18: The deprecation warning string in session-context-loader.js contains
an invalid require path; update the console.warn call that currently references
"require('.aiox-core/core/session/context-loader')" to use the correct Node.js
relative import "require('../core/session/context-loader')" so the message
matches the actual import used on line 21 and avoids a MODULE_NOT_FOUND error.
In @.aiox-core/scripts/validate-phase1.ps1:
- Around line 2-3: The deprecation warning in validate-phase1.ps1 points to the
wrong replacement; update the warning text to reference the actual replacement
script name validate-task-v2.js in its correct location and make the message
unambiguous, and also correct the stale invocation elsewhere in the same
validate-phase1.ps1 file (the existing call to the old path) so both the warning
and the invocation consistently point to the new validate-task-v2.js entrypoint.
- Line 3: The Write-Warning string in validate-phase1.ps1 contains a non-ASCII
em-dash ("Write-Warning \"[DEPRECATED] validate-phase1.ps1 — Phase 1 migration
already validated. Use validate-task-v2.js directly.\"") which triggers
PSUseBOMForUnicodeEncodedFile; fix by either saving validate-phase1.ps1 as UTF-8
with BOM so the em-dash is encoded correctly, or replace/remove the em-dash
(e.g., use a plain hyphen or remove it) in the Write-Warning message to keep the
file ASCII-only.
---
Outside diff comments:
In @.aiox-core/install-manifest.yaml:
- Around line 1-13: The manifest file contains manual edits to metadata fields
despite the header warning ("DO NOT EDIT MANUALLY")—specifically the
generated_at and file_count entries—so regenerate the manifest using the
official generator (scripts/generate-install-manifest.js / npm run
generate:manifest) instead of editing .aiox-core/install-manifest.yaml by hand;
run the generator to produce a fresh file where generated_at and file_count are
computed automatically and commit that output, removing any manual timestamp or
count changes.
---
Nitpick comments:
In @.aiox-core/core/docs/orchestration-hierarchy.md:
- Around line 10-24: The fenced ASCII diagram lacks a language tag; update the
code fence surrounding the orchestrator diagram to include a language like
"text" or "plain" (e.g., change ``` to ```text) so Markdown renderers/linters
recognize it as plain text; modify the block that contains MasterOrchestrator,
BobOrchestrator, and WorkflowOrchestrator accordingly to eliminate the
markdownlint warning.
- Around line 97-112: The fenced diagram block showing "Requisicao do usuario"
-> "MasterOrchestrator" etc. lacks a language tag; update the markdown fenced
code block from plain ``` to a language-specified fence (e.g., ```text) so the
flow diagram renders consistently, i.e., locate the block containing "Requisicao
do usuario", "MasterOrchestrator", "BobOrchestrator", and "WorkflowExecutor" and
change its opening fence to include the language specifier.
In @.aiox-core/development/scripts/workflow-navigator.js:
- Line 24: Remove the top-level console.warn so the deprecation message is not
emitted on import; instead add a module-scoped flag (e.g., let warned = false)
and emit the same console.warn the first time the WorkflowNavigator is actually
used—for example, check the flag and log inside the WorkflowNavigator
constructor (or the exported initialization method), set warned = true after
logging, and keep the original deprecation text. This ensures the message fires
only on first real use rather than on module evaluation.
In @.aiox-core/development/scripts/workflow-state-manager.js:
- Line 23: Remove the top-level console.warn('[DEPRECATED] ...') and replace it
with a module-scoped boolean flag (e.g., let deprecationWarned = false) and a
small helper function (e.g., emitDeprecation()) that logs the same warning only
if deprecationWarned is false and then sets it to true; then call
emitDeprecation() at the start of the module's exported entry points / real-use
functions (i.e., wherever the module's public API is invoked) so the warning is
emitted lazily on first real use and only once instead of on every import.
In @.aiox-core/scripts/command-execution-hook.js:
- Line 26: The top-level console.warn in command-execution-hook.js causes a
deprecation message on every require; move the warning into the first-use path
(e.g., inside updateSessionAfterCommand() or the initializer that callers
invoke) and guard it with a module-scoped boolean so it logs only once; ensure
updateSessionAfterCommand() (or the exported entrypoint) triggers the lazy
warning before performing work so mere imports no longer print the deprecation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9ffbfe6b-0318-4100-8339-ddc5f98170a3
📒 Files selected for processing (12)
.aiox-core/core/docs/orchestration-hierarchy.md.aiox-core/development/scripts/workflow-navigator.js.aiox-core/development/scripts/workflow-state-manager.js.aiox-core/install-manifest.yaml.aiox-core/scripts/batch-migrate-phase1.ps1.aiox-core/scripts/batch-migrate-phase2.ps1.aiox-core/scripts/batch-migrate-phase3.ps1.aiox-core/scripts/command-execution-hook.js.aiox-core/scripts/migrate-framework-docs.sh.aiox-core/scripts/session-context-loader.js.aiox-core/scripts/validate-phase1.ps1docs/deprecated-scripts.md
| # @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-phase1.ps1 — migration already completed. Tasks are V2.0 natively." |
There was a problem hiding this comment.
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
Verify each finding against the current code and only fix it if needed.
In @.aiox-core/scripts/batch-migrate-phase1.ps1 around lines 1 - 4, Add a guard
that prevents the deprecated batch-migrate-phase1.ps1 from performing any
rewrites unless an explicit force flag is provided: add a param for a
[switch]$Force (or check for a -Force/$force parameter) at the top, update the
existing Write-Warning to state the script is deprecated and requires --Force to
proceed, and immediately return/exit when -Force is not present so the phase-1
rewrite loop below never runs by default; only continue to the rewrite logic
when $Force is set.
| # @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." |
There was a problem hiding this comment.
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 -Force/-RunDeprecatedScript flag is passed.
🧰 Tools
🪛 PSScriptAnalyzer (1.24.0)
[warning] Missing BOM encoding for non-ASCII encoded file 'batch-migrate-phase2.ps1'
(PSUseBOMForUnicodeEncodedFile)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.aiox-core/scripts/batch-migrate-phase2.ps1 around lines 1 - 4, Add an
opt-in guard to the batch-migrate-phase2.ps1 entrypoint: define a switch
parameter (e.g. -Force or -RunDeprecatedScript) at the top via a Param() block
and, before the existing migration loop, check if the switch is present; if not,
emit the deprecation Write-Warning and exit/return immediately so the rest of
the script (the migration loop that rewrites tasks) does not run. Ensure the
check is placed before any file-modifying logic and reference the script name
batch-migrate-phase2.ps1 and the migration loop block when making the change.
| # --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.
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 --force-legacy-run flag for any remaining use.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.aiox-core/scripts/migrate-framework-docs.sh at line 22, Modify
migrate-framework-docs.sh to stop execution immediately after printing the
deprecation banner unless the user passed an explicit opt-in flag; check
positional/parsed args for a --force-legacy-run (or similar) flag and only
proceed with the existing migration flow when that flag is present, otherwise
call exit 0 right after the echo "[DEPRECATED] ..." line to prevent any further
actions; update any help/usage text to document the --force-legacy-run opt-in
and reference the script name migrate-framework-docs.sh in your changes so
reviewers can find the guard easily.
|
|
||
| '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.
🧩 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 require() path in the deprecation warning.
The path in the warning (require('.aiox-core/core/session/context-loader')) is invalid Node.js syntax and will cause a MODULE_NOT_FOUND error at runtime. In Node.js, require paths must start with ./, ../, or be module names—a leading . without a slash is not valid. Update the message to match the actual import on line 21: require('../core/session/context-loader').
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
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 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)'); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.aiox-core/scripts/session-context-loader.js at line 18, The deprecation
warning string in session-context-loader.js contains an invalid require path;
update the console.warn call that currently references
"require('.aiox-core/core/session/context-loader')" to use the correct Node.js
relative import "require('../core/session/context-loader')" so the message
matches the actual import used on line 21 and avoids a MODULE_NOT_FOUND error.
| # 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." |
There was a problem hiding this comment.
Point the warning at the real replacement path.
The new deprecation message tells users to run validate-task-v2.js directly, but the replacement script lives under .aiox-core/development/scripts/validate-task-v2.js in this repo, not .aiox-core/scripts/. As written, the migration guidance is ambiguous and currently disagrees with the stale invocation at Line 26.
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
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # 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." |
🧰 Tools
🪛 PSScriptAnalyzer (1.24.0)
[warning] Missing BOM encoding for non-ASCII encoded file 'validate-phase1.ps1'
(PSUseBOMForUnicodeEncodedFile)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.aiox-core/scripts/validate-phase1.ps1 around lines 2 - 3, The deprecation
warning in validate-phase1.ps1 points to the wrong replacement; update the
warning text to reference the actual replacement script name validate-task-v2.js
in its correct location and make the message unambiguous, and also correct the
stale invocation elsewhere in the same validate-phase1.ps1 file (the existing
call to the old path) so both the warning and the invocation consistently point
to the new validate-task-v2.js entrypoint.
| @@ -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." | |||
There was a problem hiding this comment.
🧩 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 PSUseBOMForUnicodeEncodedFile, and Windows PowerShell 5.1 may garble the warning text when loading from disk without the proper encoding marker.
🧰 Tools
🪛 PSScriptAnalyzer (1.24.0)
[warning] Missing BOM encoding for non-ASCII encoded file 'validate-phase1.ps1'
(PSUseBOMForUnicodeEncodedFile)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.aiox-core/scripts/validate-phase1.ps1 at line 3, The Write-Warning string
in validate-phase1.ps1 contains a non-ASCII em-dash ("Write-Warning
\"[DEPRECATED] validate-phase1.ps1 — Phase 1 migration already validated. Use
validate-task-v2.js directly.\"") which triggers PSUseBOMForUnicodeEncodedFile;
fix by either saving validate-phase1.ps1 as UTF-8 with BOM so the em-dash is
encoded correctly, or replace/remove the em-dash (e.g., use a plain hyphen or
remove it) in the Write-Warning message to keep the file ASCII-only.
Summary
@deprecatedJSDoc headers andconsole.warnruntime warnings to each scriptScripts Deprecated
workflow-state-manager.jssession-state.js(Story 11.5)workflow-navigator.jsbob-orchestrator.js(Story 12.3)command-execution-hook.jssession-state.js(Story 11.5)session-context-loader.jscore/session/context-loader(WIS-3)batch-migrate-phase{1,2,3}.ps1validate-phase1.ps1validate-task-v2.jsdirectlymigrate-framework-docs.shDocumentation Added
docs/deprecated-scripts.md— complete list with replacements and migration paths.aiox-core/core/docs/orchestration-hierarchy.md— documents the 3 orchestrators (Bob, Master, Workflow) coexistence without conflictTest plan
console.warnmessages appear when deprecated scripts are loadedCloses #90
Summary by CodeRabbit
Release Notes
Documentation
Chores