Skip to content

feat(codex, claude): bootstrap Codex skills and add skills-first activation - #641

Merged
rafaelscosta merged 10 commits into
mainfrom
feat/story-123.9-codex-skills-bootstrap
May 5, 2026
Merged

feat(codex, claude): bootstrap Codex skills and add skills-first activation#641
rafaelscosta merged 10 commits into
mainfrom
feat/story-123.9-codex-skills-bootstrap

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR now contains two related local-agent activation improvements:

  1. Story 123.9: Codex local skills bootstrap for core agents and squad entry chiefs.
  2. ACORE-SKILLS: Claude skills-first activation for the 12 AIOX core agents, preserving legacy command compatibility.

Story 123.9 - Codex Skills Bootstrap

Adds .aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js and npm wrappers:

  • npm run setup:codex-skills
  • npm run setup:codex-skills:dry

The bootstrap command generates local .codex/skills/aiox-* entries for core agents and squad entry chiefs. It keeps the existing incremental sync:skills:codex flow focused on core agents for CI and normal agent edits.

ACORE-SKILLS - Claude Skills-First Core Agents

Ports the controlled commands -> skills and agent.md -> SKILL.md pattern from Sinkra Hub into aiox-core for the 12 core AIOX agents.

Changes:

  • Generates .claude/skills/AIOX/agents/<agent-id>/SKILL.md for all 12 core agents.
  • Converts .claude/commands/AIOX/agents/*.md into legacy shims pointing to the canonical skills.
  • Adds activation_type: pipeline to generated Claude agent skills.
  • Updates Claude sync validation to expect 12 legacy commands + 12 skills.
  • Updates doctor checks to count nested AIOX agent skills.
  • Keeps non-agent Claude commands out of scope (synapse, greet, design-system, cohort-squad).
  • Documents the migration in docs/migration/ACORE-CLAUDE-SKILLS-PREFLIGHT-2026-05-01.md.

Validation

Local gates run on 2026-05-03:

npm run sync:ide:claude
npm run sync:skills:codex
npm run validate:claude-sync
npm run validate:claude-integration
npm run validate:codex-skills
git diff --check
npm test -- tests/ide-sync/transformers.test.js tests/unit/codex-skills-validate.test.js tests/unit/validate-claude-integration.test.js tests/unit/doctor-skills-count.test.js

Results:

  • Claude sync: PASS, 24 expected / 24 synced.
  • Claude integration: PASS, 12 skills + 12 legacy commands.
  • Codex skills: PASS, 12 skills checked.
  • Focused Jest: 4 suites, 33 tests passed.

Follow-up

Expansion from core agents to squads/*/agents is intentionally not included. The migration preflight recommends a separate ACORE-SQUAD-SKILLS epic to decide namespace, coverage, validation, and sync semantics before implementation.

Summary by CodeRabbit

  • New Features

    • New Codex skill bootstrapping tool (dry-run/force/backups) plus npm run helpers; IDE sync now generates Claude skill files and many new Claude agent skills.
  • Documentation

    • Added Codex skills sync README and a migration preflight guide with usage, safeguards, and restart guidance.
  • Validation & Doctoring

    • Enhanced validators/doctor checks to compare skills/commands, ignore generated squad skills, and report parity issues.
  • Tests

    • Added unit tests for transformers, bootstrap/validation, and doctor checks.
  • Chores

    • Manifest, config schema, gitignore, registry and metadata refreshes.

…Story 123.9]

Definitive solution for the bug where squad-chief skills did not appear
in Codex's $ menu. Root cause: existing sync:skills:codex (index.js)
only generates skills from .aiox-core/development/agents/, leaving squad
chiefs in squads/*/agents/ uncovered.

Implementation:
- New: .aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js
  Standalone, zero-deps (vendored js-yaml fallback). Generates aiox-*
  skills for both core agents AND squad entry chiefs via config.yaml
  resolution (entry_agent | tier=orchestrator | *-chief.md). Marker-aware
  (skips hand-edited skills unless --force, with .bak backup).
- New: README.md — explains the difference between sync:skills:codex
  (incremental, core-only, CI) and setup:codex-skills (full bootstrap,
  squad chiefs included, operator-facing).
- package.json: setup:codex-skills, setup:codex-skills:dry scripts.
- Sample output: .codex/skills/aiox-claude-mastery-chief/SKILL.md
  (only squad whitelisted in this repo; downstream installs with N
  squads will get N chief skills).

Operator usage:
  npm run setup:codex-skills            # full bootstrap
  npm run setup:codex-skills:dry        # preview
  npm run setup:codex-skills -- --force # overwrite hand-edited (with .bak)

Replaces the provisional standalone script previously distributed
manually to students. The script logic is preserved verbatim; only the
header doc and module exports were adapted for the canonical path.

Note: bootstrap.js sits under .aiox-core/infrastructure/scripts/ which
is in eslint global ignore, so no lint impact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Apr 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment May 5, 2026 10:54pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a Codex skills bootstrap generator and docs, integrates Claude skill generation into IDE sync, updates validators and doctor checks to treat skill files as first-class, converts many legacy Claude command markdowns into compatibility shims that reference new .claude/skills/*/SKILL.md files, adds numerous skill files and a codex local skill, updates manifests/registry, and extends unit tests.

Changes

Claude skills migration & Codex sync

Layer / File(s) Summary
Config / Paths
.aiox-core/core-config.yaml, .aiox-core/framework-config.yaml, .gitignore
Adds skillsPath: .claude/skills for claude-code IDE target and unignores .claude/skills/.../SKILL.md.
Schema
.aiox-core/core/config/schemas/framework-config.schema.json
Adds skillsPath string property to per-target IDE sync schema.
Data Shape / Manifests
.aiox-core/install-manifest.yaml, .aiox-core/data/entity-registry.yaml, package.json
Regenerated manifest/entity-registry entries; recorded new codex-skills-sync bootstrap file and README and added npm scripts for bootstrap/dry-run.
Core generator
.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js
New bootstrap executable: scans .aiox-core/development/agents and squads/*/config.yaml, parses embedded YAML/markdown, deduplicates/normalizes skill IDs, and writes .codex/skills/*/SKILL.md with --dry-run, --force, backup, collision dedupe, and error semantics.
Docs / Runbook
.aiox-core/infrastructure/scripts/codex-skills-sync/README.md, docs/migration/ACORE-CLAUDE-SKILLS-PREFLIGHT-2026-05-01.md
Adds README describing generator usage/markers/backup behavior and migration preflight runbook documenting phased rollout and contracts.
IDE sync: transformer & wiring
.aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js, .aiox-core/infrastructure/scripts/ide-sync/index.js, .aiox-core/infrastructure/scripts/ide-sync/agent-parser.js
Adds transformCommand, transformSkill, getSkillRelativePath, getSourcePath; introduces transformPrimaryContent; syncIde now computes/writes CLAUDE skill files, records skillFiles/skillRootDir, and includes skill expectations in validation; parseAgentFile now populates sourcePath.
Validators / Helpers
.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js, .aiox-core/infrastructure/scripts/validate-claude-integration.js, .aiox-core/infrastructure/scripts/validate-paths.js
Adds generated-skill detection marker and helpers (extractGeneratedSquadSource, isGeneratedSquadSkill); validateCodexSkills now ignores generated squad-chief skills when referenced; validate-claude-integration lists markdown basenames and skill IDs, enforces activation_type: pipeline, and returns richer metrics; path validation early-returns for generated squad skills.
Doctor checks
.aiox-core/core/doctor/checks/ide-sync.js, .aiox-core/core/doctor/checks/skills-count.js
ide-sync now reads & diffs command agents vs skill agents and exports helpers; skills-count adds recursive SKILL.md counting, agent-skill/source counts, new WARN/FAIL branches, and exports counting helpers.
Command shims & generated skills
.claude/commands/AIOX/agents/*.md, .claude/skills/AIOX/agents/*/SKILL.md, .codex/skills/*/SKILL.md
Replaced many .claude/commands/AIOX/agents/*.md with lightweight legacy shims that point to .claude/skills/.../SKILL.md (fallback to .aiox-core/development/agents/*.md); added many full .claude/skills/AIOX/agents/*/SKILL.md and .codex/skills/*/SKILL.md entries.
Path validation wiring
.aiox-core/infrastructure/scripts/validate-paths.js
Detects generated local-skill marker (<!-- AIOX-CODEX-LOCAL-SKILLS: generated -->) and extracts squad source references to skip canonical-path checks for generated squad-chief skills.
Tests
tests/ide-sync/transformers.test.js, tests/unit/*, packages/installer/tests/unit/doctor/doctor-checks.test.js, tests/config/schema-validation.test.js
Adds/updates unit tests: transformer skill/command/relative-path behavior, codex-skills validation ignore cases, skills-count doctor tests, validate-claude-integration cases (metrics and activation_type), and schema test for skillsPath; installer doctor tests adapted to mock new directory shapes.

Sequence Diagram(s)

sequenceDiagram
participant Sources as "Agent Sources\n(.aiox-core / squads)"
participant Bootstrap as "Bootstrap.js"
participant Transformer as "claude-code\ntransformer"
participant IDEsync as "ide-sync"
participant FS as "Filesystem\n(.claude / .codex)"
participant Validator as "validate.js / doctor checks"

Sources->>Bootstrap: scan core agents & squads
Bootstrap->>FS: write .codex/skills/*/SKILL.md
Sources->>IDEsync: read agent sources
IDEsync->>Transformer: transformCommand / transformSkill (uses sourcePath)
Transformer->>IDEsync: command shim, skill content, relative path
IDEsync->>FS: write .claude/skills/.../SKILL.md (skillRootDir / skillFiles)
Validator->>FS: read SKILL.md files
Validator->>Validator: detect generated marker + squad source
Validator->>IDEsync: report validation / doctor results
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

type: docs

Suggested reviewers

  • Pedrovaleriolopez
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/story-123.9-codex-skills-bootstrap

@github-actions github-actions Bot added area: agents Agent system related area: workflows Workflow system related squad mcp type: test Test coverage and quality area: core Core framework (.aios-core/core/) area: installer Installer and setup (packages/installer/) area: synapse SYNAPSE context engine area: cli CLI tools (bin/, packages/aios-pro-cli/) area: pro Pro features (pro/) area: health-check Health check system area: docs Documentation (docs/) area: devops CI/CD, GitHub Actions (.github/) labels Apr 28, 2026
@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (5)
.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js (3)

659-669: Consider warning when YAML parser is unavailable.

When loadYaml returns null, the script continues with regex-based extraction only. While this graceful degradation is intentional, a warning would help operators understand why some metadata might be incomplete.

💡 Suggested enhancement
 const yaml = loadYaml(projectRoot);
+if (!yaml && !args.quiet) {
+  console.warn('Warning: js-yaml not found. Metadata extraction will be limited to regex patterns.');
+}

 const corePlans = buildCorePlans(projectRoot, yaml);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js around
lines 659 - 669, The code currently proceeds when loadYaml(projectRoot) returns
null, which can hide missing metadata; update the bootstrapping flow to detect
when yaml === null after calling loadYaml and emit a clear warning before
continuing with regex-only extraction (use an existing logger like
processLogger.warn if present, falling back to console.warn) so operators know
metadata may be incomplete; locate the loadYaml call and the subsequent
buildCorePlans/buildSquadPlans/dedupePlans sequence and add the warning
immediately after the loadYaml(projectRoot) assignment.

440-457: Complex but necessary skill ID resolution logic.

The squadSkillId function handles multiple edge cases for generating unique skill IDs. The logic is sound:

  • Avoids aiox-aiox- prefixes
  • Handles squad names that embed entry agent names
  • Falls back to aiox-<squad>-<entry> for disambiguation

Consider adding inline comments explaining each branch for future maintainers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js around
lines 440 - 457, Add short inline comments inside the squadSkillId function to
explain the purpose of each computed variable and every conditional branch:
document why alias/squadBase/entry/entryRoot are derived, why we return
coreSkillId when entry is missing, why we return `aiox-${entry}` when entry
matches or is prefixed by squadBase or alias, why genericEntryRoots are excluded
and the special handling for entryRoot prefixes and `-chief` suffixes, and why
the final fallback returns `aiox-${squadBase || alias}-${entry}` to
disambiguate; place these comments next to the variables (alias, squadBase,
entry, entryRoot, genericEntryRoots) and before each if/return to aid future
maintainers.

202-213: Consider adding input length bounds for block scalar parsing.

The findBlockScalar regex handles multiline YAML block scalars. While the pattern is anchored and uses bounded groups, extremely large input files could still cause performance degradation. For production-grade robustness, consider limiting input size or adding a timeout mechanism, though this is likely acceptable for typical agent file sizes.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js around
lines 202 - 213, The findBlockScalar function can exhibit poor performance on
extremely large inputs; add a defensive input-size guard (e.g.,
MAX_BLOCK_SCALAR_INPUT) and bail or truncate early inside findBlockScalar when
text.length exceeds that threshold, or add an optional parameter (maxLength) to
limit how much of text is scanned; ensure the guard runs before constructing the
RegExp/match to avoid catastrophic backtracking on huge payloads and
document/handle the trimmed result consistently in findBlockScalar's return
path.
.aiox-core/infrastructure/scripts/codex-skills-sync/README.md (2)

18-23: Add language specifiers to fenced code blocks.

The fenced code blocks at lines 18, 39, and 48 lack language specifiers. Adding bash or shell improves syntax highlighting and satisfies markdown lint rules.

📝 Suggested fix
-```
+```bash
 npm run setup:codex-skills              # generate / update

Apply similarly to the other code blocks.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/README.md around lines
18 - 23, The fenced code blocks in the README lack language specifiers; update
each opening triple-backtick for the blocks containing the commands (the block
with "npm run setup:codex-skills", "npm run setup:codex-skills:dry", and the
block with "node bootstrap.js --force" / "node bootstrap.js --help") to include
a shell/bash specifier (e.g., ```bash) so markdown linting and syntax
highlighting are satisfied.

69-70: Missing newline at end of file.

Line 70 appears to be missing the trailing newline character, which is a common convention for text files.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/README.md around lines
69 - 70, The README.md file ends without a trailing newline (the final paragraph
beginning "Background: students reported that squad-chief skills..." is missing
the EOF newline); update the file to ensure a newline character is present at
the end of the file so the file ends with a single trailing newline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js:
- Around line 659-669: The code currently proceeds when loadYaml(projectRoot)
returns null, which can hide missing metadata; update the bootstrapping flow to
detect when yaml === null after calling loadYaml and emit a clear warning before
continuing with regex-only extraction (use an existing logger like
processLogger.warn if present, falling back to console.warn) so operators know
metadata may be incomplete; locate the loadYaml call and the subsequent
buildCorePlans/buildSquadPlans/dedupePlans sequence and add the warning
immediately after the loadYaml(projectRoot) assignment.
- Around line 440-457: Add short inline comments inside the squadSkillId
function to explain the purpose of each computed variable and every conditional
branch: document why alias/squadBase/entry/entryRoot are derived, why we return
coreSkillId when entry is missing, why we return `aiox-${entry}` when entry
matches or is prefixed by squadBase or alias, why genericEntryRoots are excluded
and the special handling for entryRoot prefixes and `-chief` suffixes, and why
the final fallback returns `aiox-${squadBase || alias}-${entry}` to
disambiguate; place these comments next to the variables (alias, squadBase,
entry, entryRoot, genericEntryRoots) and before each if/return to aid future
maintainers.
- Around line 202-213: The findBlockScalar function can exhibit poor performance
on extremely large inputs; add a defensive input-size guard (e.g.,
MAX_BLOCK_SCALAR_INPUT) and bail or truncate early inside findBlockScalar when
text.length exceeds that threshold, or add an optional parameter (maxLength) to
limit how much of text is scanned; ensure the guard runs before constructing the
RegExp/match to avoid catastrophic backtracking on huge payloads and
document/handle the trimmed result consistently in findBlockScalar's return
path.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/README.md:
- Around line 18-23: The fenced code blocks in the README lack language
specifiers; update each opening triple-backtick for the blocks containing the
commands (the block with "npm run setup:codex-skills", "npm run
setup:codex-skills:dry", and the block with "node bootstrap.js --force" / "node
bootstrap.js --help") to include a shell/bash specifier (e.g., ```bash) so
markdown linting and syntax highlighting are satisfied.
- Around line 69-70: The README.md file ends without a trailing newline (the
final paragraph beginning "Background: students reported that squad-chief
skills..." is missing the EOF newline); update the file to ensure a newline
character is present at the end of the file so the file ends with a single
trailing newline.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4fc1a6bb-0edb-485c-8e2b-4961bf345d9c

📥 Commits

Reviewing files that changed from the base of the PR and between dbb9e52 and 94842cd.

📒 Files selected for processing (5)
  • .aiox-core/infrastructure/scripts/codex-skills-sync/README.md
  • .aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js
  • .aiox-core/install-manifest.yaml
  • .codex/skills/aiox-claude-mastery-chief/SKILL.md
  • package.json

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 28, 2026
@rafaelscosta rafaelscosta changed the title feat(codex): add bootstrap.js for Codex local skills (squad chiefs) [Story 123.9] feat(codex, claude): bootstrap Codex skills and add skills-first activation May 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 18

🧹 Nitpick comments (1)
.aiox-core/infrastructure/scripts/validate-claude-integration.js (1)

85-86: ⚡ Quick win

Make activation_type validation tolerant to YAML formatting variants.

The current string include check can produce false failures for valid frontmatter formatting changes (e.g., quotes/extra spacing).

🔧 Suggested patch
-    if (!skillContent.includes('activation_type: pipeline')) {
+    const hasPipelineActivation = /^\s*activation_type\s*:\s*['"]?pipeline['"]?\s*$/m.test(skillContent);
+    if (!hasPipelineActivation) {
       errors.push(`Claude agent skill missing activation_type: pipeline: ${sourceAgent}`);
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/validate-claude-integration.js around
lines 85 - 86, The current literal string check against skillContent causes
false negatives for valid YAML frontmatter variants; update the validation to
robustly detect activation_type: pipeline by either parsing the frontmatter YAML
(using a YAML/front-matter parser) or matching with a tolerant regex that
accepts optional quotes and whitespace (e.g.,
activation_type:\s*["']?pipeline["']?), and then push the error using the same
errors.push call with sourceAgent if the parsed/normalized value is not
"pipeline"; locate the check that references skillContent, errors.push and
sourceAgent to apply the change.
🤖 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/core/doctor/checks/ide-sync.js:
- Around line 44-53: The current construction that builds commandAgents and
skillAgents uses fs.readdirSync directly and will throw if the directory exists
but is unreadable; wrap each fs.readdirSync call in a try/catch around the
blocks that reference agentsCommandDir and agentsSkillDir (the code that assigns
commandAgents and skillAgents) so failures are caught, log or attach the error
context (including agentsCommandDir/agentsSkillDir and the operation) and fall
back to an empty array or a structured error result instead of letting the
exception bubble; ensure the filters/mapping ('.md' removal, SKILL.md lookup)
remain applied when read succeeds and that the catch branches produce the same
typed output as the success branches.
- Around line 55-80: The current check compares only counts (skillCount,
sourceCount, commandCount) which can falsely PASS; update the logic in
ide-sync.js to compare agent identity sets instead of totals by deriving unique
identifiers from sourceAgents, skillAgents, and commandAgents (e.g. agent.id or
agent.name) and computing set differences to find missing or extra agents;
replace the count-based branches (the skillCount !== sourceCount and
commandCount === sourceCount checks and the final WARN) with membership-based
checks that return WARN/FAIL when any source agent is missing from skills or
commands and include the specific missing/extra agent identifiers in the message
and appropriate fixCommand.

In @.aiox-core/core/doctor/checks/skills-count.js:
- Around line 22-26: The three bare catches around fs.readdirSync in
.aiox-core/core/doctor/checks/skills-count.js are swallowing filesystem errors
and returning 0; change each catch to capture the error (e.g., catch (err)) and
either rethrow or wrap and throw a new Error with context (include the dir path
and original err) so callers can distinguish I/O/permission failures from "no
skills found"—update the three fs.readdirSync call sites to use this explicit
error propagation instead of returning 0.

In @.aiox-core/infrastructure/scripts/codex-skills-sync/validate.js:
- Around line 64-80: extractGeneratedSquadSource currently only matches
backticked paths and misses the HTML source comment format used in generated
squad skills; update extractGeneratedSquadSource to also detect and capture the
plain HTML comment header (e.g. <!-- squads/.../agents/.../file.md -->) in
addition to the existing backtick regex, returning the captured path string when
either pattern matches so isGeneratedSquadSkill can correctly detect generated
squad files; reference the extractGeneratedSquadSource and isGeneratedSquadSkill
functions and use a second regex like
/<!--\s*(squads\/[^>]+\/agents\/[^>]+\.md)\s*-->/ (or equivalent) combined with
the current /`(squads\/[^`]+\/agents\/[^`]+\.md)`/ to support both formats.

In @.aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js:
- Around line 41-42: The generated shim/skill metadata currently hardcodes the
agent source directory when building sourcePath (const sourcePath =
`.aiox-core/development/agents/${agentData.filename}`) which breaks non-default
IDE sync sources; change sourcePath construction to derive the base from the
agent metadata (e.g., use agentData.source or a provided source/base field with
a fallback to `.aiox-core/development/agents`) and use that computed base
everywhere the hardcoded path is used (including the other occurrence that
constructs the fallback instructions), ensuring you update both the sourcePath
declaration and the later metadata generation to reference the dynamic base (and
normalize/join paths rather than string-concatenating if available).

In @.claude/skills/AIOX/agents/aiox-master/SKILL.md:
- Around line 453-454: The guide currently references undefined command aliases
(*create-agent, *create-task, *create-workflow) which will confuse operators;
update the documentation in SKILL.md to use the actual configured command syntax
(*create {type}) or add those aliases to the command catalog. Locate the section
listing the framework dev commands (the lines showing *create-agent,
*create-task, *create-workflow) and replace each alias with the canonical form
(*create agent, *create task, *create workflow) or register corresponding
aliases that map to the existing *create {type} handler so the guide matches the
implemented command interface.
- Line 415: The Markdown at the "Epic/Story creation" heading currently uses
parentheses with asterisks that trigger emphasis (e.g. (*create-epic,
*create-story)); change those tokens to inline code by wrapping each command in
backticks (e.g. `*create-epic`, `*create-story`) so the parentheses contain code
spans instead of emphasis. Locate the line with the "Epic/Story creation" header
and replace the parenthesized tokens accordingly.
- Around line 127-163: The commands list uses inconsistent visibility types
(missing arrays, scalar values) which breaks the expected schema; normalize
every command entry (e.g., the command objects like "help", "kb", "status",
"yolo", "validate-workflow", "run-workflow", etc.) to include a visibility field
that is always an array of keys (e.g., visibility: [full] or visibility: [key,
full]) and add explicit key-visible entries where omitted so the "Available
Commands" generator can reliably read visibility; update the scalar instances
(the "yolo" entry and any other commands using scalar visibility) to the array
form and add visibility arrays for commands that currently have no visibility
field.

In @.claude/skills/AIOX/agents/data-engineer/SKILL.md:
- Around line 43-44: The commands schema is inconsistent: Step 3 expects each
command entry under the commands: section to include a visibility array checked
for the value "key", but current command objects lack the visibility field;
update all command entries (the objects in the commands: list) to include a
visibility: ["key", ...] array (or other appropriate visibility values)
consistently, or alternatively change the Step 3 logic/string in "Available
Commands" to check an existing field (e.g., a new isKey boolean) if you prefer
not to add visibility arrays; ensure every command object referenced by the
"commands" symbol and the "Available Commands" rendering uses the same shape so
the check for "key" succeeds.
- Around line 267-274: Update the outdated command names in the usage_tips:
replace references to the deprecated commands '*rls-audit', '*explain', and
'*analyze-hotpaths' with the current commands '*security-audit' and
'*analyze-performance' (use '*security-audit' for RLS/security checks and
'*analyze-performance' for explain/analyze style performance checks), and apply
the same replacements for the other occurrences noted (around the previously
mentioned lines 487-489) so all tips reflect the current command set.

In @.claude/skills/AIOX/agents/devops/SKILL.md:
- Around line 131-143: Replace the hard-coded "--base main" usage in the
CodeRabbit commands with the repository's detected default branch from
gitStatus; specifically, read the branch info available in gitStatus and
substitute that value into the coderabbit invocations found under
quality_gates.mandatory_checks (the "coderabbit --prompt-only --base main"
entry) and the pre_pr_against_main string (the shell command that includes
"~/.local/bin/coderabbit --prompt-only --base main"), so both use the dynamic
default branch variable instead of "main" (update references under
quality_gates, coderabbit_gate, and pre_pr_against_main to pull the branch value
from gitStatus).

In @.claude/skills/AIOX/agents/po/SKILL.md:
- Line 282: The relative link in the line "Reference: [Command Authority
Matrix](../../docs/architecture/command-authority-matrix.md)" is broken because
it does not ascend far enough from .claude/skills/AIOX/agents/po/SKILL.md to
reach the repository docs directory; update that markdown link to the correct
relative depth (use
../../../../../docs/architecture/command-authority-matrix.md) so the link
resolves, i.e., replace the existing link target in the Reference line
accordingly.

In @.claude/skills/AIOX/agents/qa/SKILL.md:
- Around line 262-275: The self-healing execution policy is inconsistent: the
self_healing block (self_healing.behavior with CRITICAL/HIGH: auto_fix)
contradicts the QA advisory-only stance and canExecute: false elsewhere; pick
one consistent policy and update all related symbols accordingly. Either change
self_healing.behavior entries for CRITICAL and HIGH from auto_fix to
document_as_debt (or another advisory action) to honor the QA advisory-only
policy, or flip the advisory policy/canExecute flag (set canExecute: true and
update the QA role text) so auto_fix is allowed; update the QA advisory
description and the canExecute setting to match the chosen behavior.
- Line 291: Replace the hardcoded Windows path in the runnable command string
("wsl bash -c 'cd /mnt/c/.../aiox-core && ~/.local/bin/coderabbit --prompt-only
-t committed --base main'") with the reusable project variable used elsewhere
(${PROJECT_ROOT}); edit the SKILL.md entry that contains that command and change
the cd target to ${PROJECT_ROOT} (matching the pattern used on Lines 317-318) so
the workflow is portable across environments.

In @.claude/skills/AIOX/agents/sm/SKILL.md:
- Around line 243-244: Update the two table rows that currently reference the
delegate handle "@devops" so they use the consistent handle "@github-devops";
specifically change the delegate for the "Push to remote" entry (command
`*push`) and the "Create PR" entry (command `*create-pr`) from "@devops" to
"@github-devops" so handoffs are routed consistently with the rest of the file.
- Line 237: The markdown link "[Command Authority
Matrix](../../docs/architecture/command-authority-matrix.md)" is using an
incorrect relative path; update that link in SKILL.md to point correctly (either
fix the relative path to reach docs/architecture/command-authority-matrix.md
from this file’s directory or replace it with a repo-root absolute path like
/docs/architecture/command-authority-matrix.md) so the reference resolves
properly.

In @.claude/skills/AIOX/agents/ux-design-expert/SKILL.md:
- Line 307: The commands list in SKILL.md uses mismatched placeholders (*build
{atom}, *extend {variant}) that don't match the declared command signatures
which use {component}; update the commands array entry (the line with commands:
['*build {atom}', '*compose {molecule}', '*extend {variant}']) to use the
{component} placeholder for build and extend (e.g., '*build {component}',
'*extend {component}') and scan the file for any other occurrences of {atom} or
{variant} to replace with {component} so invocation guidance is consistent with
the declared command signatures.

In `@docs/migration/ACORE-CLAUDE-SKILLS-PREFLIGHT-2026-05-01.md`:
- Line 16: The committed doc contains a workstation-specific absolute path
string "/Users/rafaelcosta/Projects/AIOX/aiox-core" in the "Repo" table cell;
replace it with a repo-relative or placeholder value (e.g., "./", "<repo-root>"
or "REPO_PATH_PLACEHOLDER") so the document no longer exposes local
user/environment details and remains portable; update the table row that
currently reads `| Repo | /Users/rafaelcosta/Projects/AIOX/aiox-core |` to use
the chosen placeholder.

---

Nitpick comments:
In @.aiox-core/infrastructure/scripts/validate-claude-integration.js:
- Around line 85-86: The current literal string check against skillContent
causes false negatives for valid YAML frontmatter variants; update the
validation to robustly detect activation_type: pipeline by either parsing the
frontmatter YAML (using a YAML/front-matter parser) or matching with a tolerant
regex that accepts optional quotes and whitespace (e.g.,
activation_type:\s*["']?pipeline["']?), and then push the error using the same
errors.push call with sourceAgent if the parsed/normalized value is not
"pipeline"; locate the check that references skillContent, errors.push and
sourceAgent to apply the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 67b3eb73-3da2-491b-afc3-bd8de8fb9ddc

📥 Commits

Reviewing files that changed from the base of the PR and between 94842cd and 13d7eeb.

📒 Files selected for processing (40)
  • .aiox-core/core-config.yaml
  • .aiox-core/core/doctor/checks/ide-sync.js
  • .aiox-core/core/doctor/checks/skills-count.js
  • .aiox-core/framework-config.yaml
  • .aiox-core/infrastructure/scripts/codex-skills-sync/validate.js
  • .aiox-core/infrastructure/scripts/ide-sync/index.js
  • .aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js
  • .aiox-core/infrastructure/scripts/validate-claude-integration.js
  • .aiox-core/install-manifest.yaml
  • .claude/commands/AIOX/agents/aiox-master.md
  • .claude/commands/AIOX/agents/analyst.md
  • .claude/commands/AIOX/agents/architect.md
  • .claude/commands/AIOX/agents/data-engineer.md
  • .claude/commands/AIOX/agents/dev.md
  • .claude/commands/AIOX/agents/devops.md
  • .claude/commands/AIOX/agents/pm.md
  • .claude/commands/AIOX/agents/po.md
  • .claude/commands/AIOX/agents/qa.md
  • .claude/commands/AIOX/agents/sm.md
  • .claude/commands/AIOX/agents/squad-creator.md
  • .claude/commands/AIOX/agents/ux-design-expert.md
  • .claude/skills/AIOX/agents/aiox-master/SKILL.md
  • .claude/skills/AIOX/agents/analyst/SKILL.md
  • .claude/skills/AIOX/agents/architect/SKILL.md
  • .claude/skills/AIOX/agents/data-engineer/SKILL.md
  • .claude/skills/AIOX/agents/dev/SKILL.md
  • .claude/skills/AIOX/agents/devops/SKILL.md
  • .claude/skills/AIOX/agents/pm/SKILL.md
  • .claude/skills/AIOX/agents/po/SKILL.md
  • .claude/skills/AIOX/agents/qa/SKILL.md
  • .claude/skills/AIOX/agents/sm/SKILL.md
  • .claude/skills/AIOX/agents/squad-creator/SKILL.md
  • .claude/skills/AIOX/agents/ux-design-expert/SKILL.md
  • .codex/skills/aiox-qa/SKILL.md
  • .gitignore
  • docs/migration/ACORE-CLAUDE-SKILLS-PREFLIGHT-2026-05-01.md
  • tests/ide-sync/transformers.test.js
  • tests/unit/codex-skills-validate.test.js
  • tests/unit/doctor-skills-count.test.js
  • tests/unit/validate-claude-integration.test.js
✅ Files skipped from review due to trivial changes (4)
  • .aiox-core/framework-config.yaml
  • tests/unit/codex-skills-validate.test.js
  • .aiox-core/core-config.yaml
  • .claude/skills/AIOX/agents/analyst/SKILL.md

Comment thread .aiox-core/core/doctor/checks/ide-sync.js Outdated
Comment thread .aiox-core/core/doctor/checks/ide-sync.js Outdated
Comment thread .aiox-core/core/doctor/checks/skills-count.js
Comment thread .aiox-core/infrastructure/scripts/codex-skills-sync/validate.js
Comment thread .aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js Outdated
Comment thread .claude/skills/AIOX/agents/qa/SKILL.md Outdated
Comment thread .claude/skills/AIOX/agents/sm/SKILL.md Outdated
Comment thread .claude/skills/AIOX/agents/sm/SKILL.md Outdated
Comment thread .claude/skills/AIOX/agents/ux-design-expert/SKILL.md Outdated
Comment thread docs/migration/ACORE-CLAUDE-SKILLS-PREFLIGHT-2026-05-01.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.aiox-core/data/entity-registry.yaml (1)

16322-16341: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Incorrect registry mapping for codex-skills-sync/index.js

Line 16322 sets the purpose to the IDE sync index path, and Lines 16335-16341 list dependencies that match .aiox-core/infrastructure/scripts/ide-sync/index.js (e.g., redirect-generator, validator, gemini-commands, IDE transformers). This makes the codex entry point to the wrong dependency graph and can skew doctor/intel reports.

Please regenerate or correct this entity from the actual .aiox-core/infrastructure/scripts/codex-skills-sync/index.js source.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/data/entity-registry.yaml around lines 16322 - 16341, The
registry entry currently maps codex-skills-sync to the wrong file and dependency
graph: the fields purpose, dependencies, usedBy, and keywords in the entity for
codex-skills-sync must reflect the real source at
.aiox-core/infrastructure/scripts/codex-skills-sync/index.js rather than the IDE
sync values shown; open the actual codex-skills-sync/index.js to extract its
real purpose string, keywords, usedBy list and dependencies (replace entries
like redirect-generator, validator, gemini-commands that belong to ide-sync),
then update the entity in entity-registry.yaml so purpose points to
.aiox-core/infrastructure/scripts/codex-skills-sync/index.js and
dependencies/usedBy/keywords match the source (or regenerate the entity from the
source file if you have a generator).
🧹 Nitpick comments (2)
.aiox-core/infrastructure/scripts/validate-paths.js (2)

75-78: 💤 Low value

Consider extracting shared utility to reduce duplication.

This function is identical to extractGeneratedSquadSource in codex-skills-sync/validate.js:64-66. While module independence may be the intent, duplicating regex patterns introduces maintenance risk if the squad source path format changes.

♻️ Potential shared utility approach

If a shared utilities module exists or is planned:

// shared/generated-skills.js
const GENERATED_SKILL_MARKER = '<!-- AIOX-CODEX-LOCAL-SKILLS: generated -->';

function extractGeneratedSquadSource(content) {
  const match = String(content || '').match(/`(squads\/[^`]+\/agents\/[^`]+\.md)`/);
  return match ? match[1] : '';
}

module.exports = { GENERATED_SKILL_MARKER, extractGeneratedSquadSource };

Both validate-paths.js and codex-skills-sync/validate.js could then import from the shared module.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/validate-paths.js around lines 75 - 78,
Extract the duplicate regex helper into a single shared utility and import it
where needed: create a module exporting extractGeneratedSquadSource (the
function that matches /(squads\/[^`]+\/agents\/[^`]+\.md)/ and returns match[1]
or ''), update the current extractGeneratedSquadSource implementation in
validate-paths.js to import and use that shared function, and do the same
replacement in codex-skills-sync/validate.js so both files reference the single
source of truth.

62-64: Consider adding file existence validation for consistency with codex-skills-sync/validate.js.

This implementation checks for the GENERATED_SKILL_MARKER pattern but does not verify the squad source file actually exists on disk. The equivalent isGeneratedSquadSkill function in codex-skills-sync/validate.js (lines 69-80) includes an fs.existsSync check on the extracted source path for stricter validation. While the test passing without the actual file suggests this is intentional, adding the existence check would provide parity with the reference implementation and catch more potential issues.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/infrastructure/scripts/validate-paths.js around lines 62 - 64,
The current check short-circuits when content includes GENERATED_SKILL_MARKER
and generatedSquadSource is truthy, but it doesn't verify the referenced squad
source file actually exists; update the condition in the same block to also
check fs.existsSync(generatedSquadSource) (import or require fs if not present)
so the code only treats the file as a valid generated-squad reference when the
extracted generatedSquadSource path exists on disk, mirroring the
isGeneratedSquadSkill behavior in codex-skills-sync/validate.js.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.aiox-core/data/entity-registry.yaml:
- Around line 16322-16341: The registry entry currently maps codex-skills-sync
to the wrong file and dependency graph: the fields purpose, dependencies,
usedBy, and keywords in the entity for codex-skills-sync must reflect the real
source at .aiox-core/infrastructure/scripts/codex-skills-sync/index.js rather
than the IDE sync values shown; open the actual codex-skills-sync/index.js to
extract its real purpose string, keywords, usedBy list and dependencies (replace
entries like redirect-generator, validator, gemini-commands that belong to
ide-sync), then update the entity in entity-registry.yaml so purpose points to
.aiox-core/infrastructure/scripts/codex-skills-sync/index.js and
dependencies/usedBy/keywords match the source (or regenerate the entity from the
source file if you have a generator).

---

Nitpick comments:
In @.aiox-core/infrastructure/scripts/validate-paths.js:
- Around line 75-78: Extract the duplicate regex helper into a single shared
utility and import it where needed: create a module exporting
extractGeneratedSquadSource (the function that matches
/(squads\/[^`]+\/agents\/[^`]+\.md)/ and returns match[1] or ''), update the
current extractGeneratedSquadSource implementation in validate-paths.js to
import and use that shared function, and do the same replacement in
codex-skills-sync/validate.js so both files reference the single source of
truth.
- Around line 62-64: The current check short-circuits when content includes
GENERATED_SKILL_MARKER and generatedSquadSource is truthy, but it doesn't verify
the referenced squad source file actually exists; update the condition in the
same block to also check fs.existsSync(generatedSquadSource) (import or require
fs if not present) so the code only treats the file as a valid generated-squad
reference when the extracted generatedSquadSource path exists on disk, mirroring
the isGeneratedSquadSkill behavior in codex-skills-sync/validate.js.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 51dcebdb-38a0-46cb-94bc-627cad4630a9

📥 Commits

Reviewing files that changed from the base of the PR and between 13d7eeb and ad74d49.

📒 Files selected for processing (4)
  • .aiox-core/data/entity-registry.yaml
  • .aiox-core/infrastructure/scripts/validate-paths.js
  • .aiox-core/install-manifest.yaml
  • tests/unit/validate-paths.test.js
✅ Files skipped from review due to trivial changes (1)
  • .aiox-core/install-manifest.yaml

coderabbitai[bot]
coderabbitai Bot previously requested changes May 3, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (5)
.aiox-core/development/agents/data-engineer.md (1)

262-263: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

This is the source file — fix the stale deprecated command references here.

As with the synced copies, lines 477–478 in the *guide section still reference *rls-audit and *explain {sql}. Applying the fix in this source file and running npm run sync:ide will propagate it to .codex/agents/data-engineer.md and .gemini/rules/AIOX/agents/data-engineer.md.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.aiox-core/development/agents/data-engineer.md around lines 262 - 263,
Replace the stale deprecated command references '*rls-audit' and '*explain
{sql}' in the guide section with the current commands used elsewhere (e.g.,
replace '*rls-audit' with '*security-audit' and '*explain {sql}' with the
appropriate '*analyze-performance' form or '*explain-plan' as used in the repo),
updating the lines that currently mention those old commands; after making the
change in the source (data-engineer.md) run npm run sync:ide to propagate the
edits to the synced copies.
.codex/agents/data-engineer.md (1)

262-263: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Same stale deprecated command references in the guide section as flagged in .gemini/rules/AIOX/agents/data-engineer.md.

Lines 477–478 still reference *rls-audit and *explain {sql}. Fixing the source .aiox-core/development/agents/data-engineer.md and re-syncing will propagate the correction here.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.codex/agents/data-engineer.md around lines 262 - 263, Replace the stale
deprecated command references (*rls-audit and *explain {sql}) with the current
commands used in the source doc and re-sync so this guide inherits the fix:
update occurrences of *rls-audit to `*security-audit rls` and replace *explain
{sql} with the new analyze form (e.g., `*analyze-performance query {sql}`),
making sure to edit the source file
.aiox-core/development/agents/data-engineer.md and then re-sync to propagate the
corrected strings into .codex/agents/data-engineer.md.
.claude/skills/AIOX/agents/data-engineer/SKILL.md (2)

487-489: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

*guide section still references deprecated *rls-audit and *explain {sql}.

The usage_tips section (lines 267–274) was correctly updated to *security-audit and *analyze-performance, but the guide runbook at lines 487–488 still uses the consolidated-away command names. This was explicitly noted as an unresolved location in the previous review.

-4. **Secure** → `*rls-audit` and `*policy-apply`
-5. **Optimize** → `*explain {sql}` for query analysis
+4. **Secure** → `*security-audit rls` and `*policy-apply`
+5. **Optimize** → `*analyze-performance query "{sql}"` for query analysis
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/AIOX/agents/data-engineer/SKILL.md around lines 487 - 489,
The guide runbook still uses deprecated commands "*rls-audit" and "*explain
{sql}" — update the entries in the guide section that reference those commands
to the consolidated names "*security-audit" and "*analyze-performance"
respectively (the same names used in the usage_tips block). Locate the
guide/runbook text that contains "*rls-audit" and "*explain {sql}" and replace
them with "*security-audit" and "*analyze-performance", and run a quick
grep/search for any other occurrences to ensure consistency across the SKILL.md.

133-172: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Command format remains as shorthand YAML scalars — inconsistent with structured object schema.

The activation step was updated to conditionally handle missing visibility ("if commands use visibility metadata"), but the command entries remain in the abbreviated - help: Show all available commands scalar form rather than the structured name/description/visibility object form used in the aiox-master SKILL.md. Any tooling that parses the commands: section uniformly will need to handle both formats.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/AIOX/agents/data-engineer/SKILL.md around lines 133 - 172,
The commands list uses shorthand YAML scalars (e.g., "- help: Show all available
commands") while the codebase expects structured command objects with fields
like name, description, and visibility; update the commands block so each entry
is an object with explicit keys (name, description, visibility when available)
to match the aiox-master SKILL.md schema and the activation step that checks for
missing visibility metadata; ensure entries referenced in this diff (help,
guide, yolo, exit, doc-out, execute-checklist, create-schema,
create-rls-policies, create-migration-plan, design-indexes, model-domain,
env-check, bootstrap, apply-migration, dry-run, seed, snapshot, rollback,
smoke-test, security-audit, analyze-performance, policy-apply, test-as-user,
verify-order, load-csv, run-sql, setup-database, research) are converted to
objects and include a default visibility value where none is provided so the
activation logic can uniformly parse them.
.claude/skills/AIOX/agents/aiox-master/SKILL.md (1)

424-424: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

MD037: *create-epic, *create-story still need backtick wrapping.

The asterisks in the parenthesized command tokens trigger Markdown emphasis parsing. This was flagged in a previous review.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/AIOX/agents/aiox-master/SKILL.md at line 424, The
parenthesized command tokens "*create-epic, *create-story" are being parsed as
emphasis; update the "Epic/Story creation" line to wrap each command token in
inline code backticks (e.g., `*create-epic`, `*create-story`) so they render
literally in Markdown; locate the string in the SKILL.md content near the
"Epic/Story creation" heading and replace the unquoted tokens with their
backticked equivalents.
🧹 Nitpick comments (1)
tests/synapse/engine.test.js (1)

247-251: ⚡ Quick win

arrayContaining leaves a silent-regression gap for layer 3

The test name says "should only instantiate known pipeline layers," implying an exhaustive membership check. However, expect.arrayContaining(array) matches a received array that contains all of the specified elements — the expected array is a subset of the received array, so it matches even if extra elements are present.

Given that L3 (workflow) is also mocked as available (lines 62–69), engine.layers will carry IDs [0, 1, 2, 3]. The assertion expect.arrayContaining([0, 1, 2]) passes trivially for that set, but it would also pass if L3 were silently dropped — a regression that both this test and the sibling length >= 3 guard would miss.

♻️ Proposed fix: pin the exact expected set
-    test('should only instantiate known pipeline layers', () => {
-      const layerIds = engine.layers.map(layer => layer.layer);
-      expect(layerIds).toEqual(expect.arrayContaining([0, 1, 2]));
-      expect(layerIds.every(layerId => layerId >= 0 && layerId <= 7)).toBe(true);
-    });
+    test('should only instantiate known pipeline layers', () => {
+      const layerIds = engine.layers.map(layer => layer.layer);
+      // L0-L3 are mocked as available; L4-L7 throw MODULE_NOT_FOUND
+      expect(layerIds).toEqual(expect.arrayContaining([0, 1, 2, 3]));
+      expect(layerIds).toHaveLength(4);
+      expect(layerIds.every(layerId => layerId >= 0 && layerId <= 7)).toBe(true);
+    });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/synapse/engine.test.js` around lines 247 - 251, The test uses
expect.arrayContaining([0,1,2]) which only asserts those IDs are present and
allows extras, so replace the loose subset check with an exact membership
assertion: compare engine.layers.map(l => l.layer) to the exact expected array
[0,1,2] (or assert sorted equality) to ensure layer 3 cannot be silently missing
or extra layers added; update the test block that references engine.layers and
the layerIds variable so it asserts equality (or length + set-equality) instead
of using expect.arrayContaining.
🤖 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/development/agents/qa.md:
- Around line 263-264: The agent defines behavior tokens request_fix,
document_as_debt, and ignore but the executor (executeSelfHealingPhase and
attemptAutoFix in workflow-executor.js) ignores them; update the executor to
read the issue.behavior token and act accordingly (for request_fix call a real
auto-fix routine inside attemptAutoFix that returns true/false and applies
patch/commit, for document_as_debt create a debt record/logging path instead of
attempting fixes, and for ignore skip the issue), or alternatively remove those
tokens from the agent config so behavior tokens match actual executor
capabilities; modify executeSelfHealingPhase to branch on issue.behavior and
implement/replace the stub attemptAutoFix to perform the appropriate
fix/apply/skip logic and surface results.

In @.aiox-core/infrastructure/scripts/ide-sync/agent-parser.js:
- Around line 122-127: The guard that sets sourcePath uses relativeSourcePath &&
!relativeSourcePath.startsWith('..') but misses checking whether path.relative
returned an absolute path on Windows; update the condition that computes
result.sourcePath in agent-parser.js to also verify the relative path is not
absolute (use !path.isAbsolute(relativeSourcePath)) before converting separators
and assigning to sourcePath so cross-drive absolute paths like "D:\file.md" are
not leaked into generated files.

In @.gemini/rules/AIOX/agents/data-engineer.md:
- Around line 262-263: Update the "Typical Workflow" block to use the new
command names: replace the deprecated `*rls-audit` with `*security-audit rls`
and replace `*explain {sql}` with `*analyze-performance` (leave `*policy-apply`
as-is); make this change in the authoritative source copy of the document and
re-run the sync so the synced copy (which currently still shows `*rls-audit` /
`*explain {sql}`) is updated.

---

Duplicate comments:
In @.aiox-core/development/agents/data-engineer.md:
- Around line 262-263: Replace the stale deprecated command references
'*rls-audit' and '*explain {sql}' in the guide section with the current commands
used elsewhere (e.g., replace '*rls-audit' with '*security-audit' and '*explain
{sql}' with the appropriate '*analyze-performance' form or '*explain-plan' as
used in the repo), updating the lines that currently mention those old commands;
after making the change in the source (data-engineer.md) run npm run sync:ide to
propagate the edits to the synced copies.

In @.claude/skills/AIOX/agents/aiox-master/SKILL.md:
- Line 424: The parenthesized command tokens "*create-epic, *create-story" are
being parsed as emphasis; update the "Epic/Story creation" line to wrap each
command token in inline code backticks (e.g., `*create-epic`, `*create-story`)
so they render literally in Markdown; locate the string in the SKILL.md content
near the "Epic/Story creation" heading and replace the unquoted tokens with
their backticked equivalents.

In @.claude/skills/AIOX/agents/data-engineer/SKILL.md:
- Around line 487-489: The guide runbook still uses deprecated commands
"*rls-audit" and "*explain {sql}" — update the entries in the guide section that
reference those commands to the consolidated names "*security-audit" and
"*analyze-performance" respectively (the same names used in the usage_tips
block). Locate the guide/runbook text that contains "*rls-audit" and "*explain
{sql}" and replace them with "*security-audit" and "*analyze-performance", and
run a quick grep/search for any other occurrences to ensure consistency across
the SKILL.md.
- Around line 133-172: The commands list uses shorthand YAML scalars (e.g., "-
help: Show all available commands") while the codebase expects structured
command objects with fields like name, description, and visibility; update the
commands block so each entry is an object with explicit keys (name, description,
visibility when available) to match the aiox-master SKILL.md schema and the
activation step that checks for missing visibility metadata; ensure entries
referenced in this diff (help, guide, yolo, exit, doc-out, execute-checklist,
create-schema, create-rls-policies, create-migration-plan, design-indexes,
model-domain, env-check, bootstrap, apply-migration, dry-run, seed, snapshot,
rollback, smoke-test, security-audit, analyze-performance, policy-apply,
test-as-user, verify-order, load-csv, run-sql, setup-database, research) are
converted to objects and include a default visibility value where none is
provided so the activation logic can uniformly parse them.

In @.codex/agents/data-engineer.md:
- Around line 262-263: Replace the stale deprecated command references
(*rls-audit and *explain {sql}) with the current commands used in the source doc
and re-sync so this guide inherits the fix: update occurrences of *rls-audit to
`*security-audit rls` and replace *explain {sql} with the new analyze form
(e.g., `*analyze-performance query {sql}`), making sure to edit the source file
.aiox-core/development/agents/data-engineer.md and then re-sync to propagate the
corrected strings into .codex/agents/data-engineer.md.

---

Nitpick comments:
In `@tests/synapse/engine.test.js`:
- Around line 247-251: The test uses expect.arrayContaining([0,1,2]) which only
asserts those IDs are present and allows extras, so replace the loose subset
check with an exact membership assertion: compare engine.layers.map(l =>
l.layer) to the exact expected array [0,1,2] (or assert sorted equality) to
ensure layer 3 cannot be silently missing or extra layers added; update the test
block that references engine.layers and the layerIds variable so it asserts
equality (or length + set-equality) instead of using expect.arrayContaining.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e4fd01c3-4d33-4baf-bb18-ddebba911b6f

📥 Commits

Reviewing files that changed from the base of the PR and between ebf761c and 108107e.

📒 Files selected for processing (43)
  • .aiox-core/core/doctor/checks/ide-sync.js
  • .aiox-core/core/doctor/checks/skills-count.js
  • .aiox-core/data/entity-registry.yaml
  • .aiox-core/development/agents/aiox-master.md
  • .aiox-core/development/agents/data-engineer.md
  • .aiox-core/development/agents/devops.md
  • .aiox-core/development/agents/po.md
  • .aiox-core/development/agents/qa.md
  • .aiox-core/development/agents/sm.md
  • .aiox-core/development/agents/ux-design-expert.md
  • .aiox-core/infrastructure/scripts/codex-skills-sync/index.js
  • .aiox-core/infrastructure/scripts/codex-skills-sync/validate.js
  • .aiox-core/infrastructure/scripts/ide-sync/agent-parser.js
  • .aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js
  • .aiox-core/install-manifest.yaml
  • .claude/skills/AIOX/agents/aiox-master/SKILL.md
  • .claude/skills/AIOX/agents/data-engineer/SKILL.md
  • .claude/skills/AIOX/agents/devops/SKILL.md
  • .claude/skills/AIOX/agents/po/SKILL.md
  • .claude/skills/AIOX/agents/qa/SKILL.md
  • .claude/skills/AIOX/agents/sm/SKILL.md
  • .claude/skills/AIOX/agents/ux-design-expert/SKILL.md
  • .codex/agents/aiox-master.md
  • .codex/agents/data-engineer.md
  • .codex/agents/devops.md
  • .codex/agents/po.md
  • .codex/agents/qa.md
  • .codex/agents/sm.md
  • .codex/agents/ux-design-expert.md
  • .gemini/rules/AIOX/agents/aiox-master.md
  • .gemini/rules/AIOX/agents/data-engineer.md
  • .gemini/rules/AIOX/agents/devops.md
  • .gemini/rules/AIOX/agents/po.md
  • .gemini/rules/AIOX/agents/qa.md
  • .gemini/rules/AIOX/agents/sm.md
  • .gemini/rules/AIOX/agents/ux-design-expert.md
  • .github/agents/aiox-master.agent.md
  • docs/migration/ACORE-CLAUDE-SKILLS-PREFLIGHT-2026-05-01.md
  • packages/installer/tests/unit/doctor/doctor-checks.test.js
  • tests/ide-sync/transformers.test.js
  • tests/integration/onboarding-smoke.test.js
  • tests/synapse/engine.test.js
  • tests/unit/codex-skills-validate.test.js
✅ Files skipped from review due to trivial changes (7)
  • .aiox-core/development/agents/po.md
  • .codex/agents/po.md
  • .aiox-core/infrastructure/scripts/codex-skills-sync/index.js
  • .gemini/rules/AIOX/agents/po.md
  • tests/integration/onboarding-smoke.test.js
  • .claude/skills/AIOX/agents/ux-design-expert/SKILL.md
  • .aiox-core/install-manifest.yaml
🚧 Files skipped from review as they are similar to previous changes (9)
  • tests/unit/codex-skills-validate.test.js
  • tests/ide-sync/transformers.test.js
  • .aiox-core/core/doctor/checks/ide-sync.js
  • .claude/skills/AIOX/agents/devops/SKILL.md
  • .claude/skills/AIOX/agents/qa/SKILL.md
  • .claude/skills/AIOX/agents/sm/SKILL.md
  • .claude/skills/AIOX/agents/po/SKILL.md
  • .aiox-core/infrastructure/scripts/ide-sync/transformers/claude-code.js
  • packages/installer/tests/unit/doctor/doctor-checks.test.js

Comment thread .aiox-core/development/agents/qa.md Outdated
Comment thread .aiox-core/infrastructure/scripts/ide-sync/agent-parser.js
Comment thread .gemini/rules/AIOX/agents/data-engineer.md
@rafaelscosta
rafaelscosta dismissed coderabbitai[bot]’s stale review May 3, 2026 05:48

Addressed in 3ff1eb6 and 75d7d03; no active CodeRabbit threads remain and all required checks pass.

…manifest, keep both legacy+ignored features in validate.js, take #641 devops.md, keep all test cases)
@rafaelscosta
rafaelscosta merged commit 1e803c1 into main May 5, 2026
8 of 9 checks passed
@rafaelscosta
rafaelscosta deleted the feat/story-123.9-codex-skills-bootstrap branch May 5, 2026 22:54
rafaelscosta added a commit that referenced this pull request May 6, 2026
#641/#640) (#647)

Three drift items emerged from sequential squash merges that the
integration sweep had flagged in advance:

1. packages/installer/src/wizard/pro-setup.js:815 — `catch (checkError)`
   became unused after #635's fallback path was layered onto the post-#640
   catch handler. Renamed to `_checkError` per no-unused-vars rule.

2. packages/installer/src/pro/pro-scaffolder.js:83 — Missing trailing comma
   on the error message argument. The string was rebranded to
   'npx aiox-pro install' by #625 but the trailing comma from #639's lint
   sweep was lost in conflict resolution.

3. .claude/skills/AIOX/agents/devops/SKILL.md — Drifted by 1 hash from
   ide-sync generator output after #641's skills-first migration
   interacted with #637's Pro Access Grant agent edits. Regenerated via
   npm run sync:ide.

Plus install-manifest.yaml regenerated to reflect the post-merge
file tree state.

Validation (post-fix on main pulled fresh):
- npm run lint → 0 errors, 0 warnings
- npm run typecheck → clean
- npm run validate:manifest → VALID
- npm run validate:claude-sync (strict) → PASS
- npm run validate:codex-skills (strict) → PASS (12 skills)
- npm run test:e2e:installed-skills → PASS (3 agents activated end-to-end)

This was anticipated in the integration sweep doc — see session
`test/all-merged-2026-05-05` branch from 2026-05-05.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
…vation (SynkraAI#641)

* feat(codex): add bootstrap.js for Codex local skills (squad chiefs) [Story 123.9]

Definitive solution for the bug where squad-chief skills did not appear
in Codex's $ menu. Root cause: existing sync:skills:codex (index.js)
only generates skills from .aiox-core/development/agents/, leaving squad
chiefs in squads/*/agents/ uncovered.

Implementation:
- New: .aiox-core/infrastructure/scripts/codex-skills-sync/bootstrap.js
  Standalone, zero-deps (vendored js-yaml fallback). Generates aiox-*
  skills for both core agents AND squad entry chiefs via config.yaml
  resolution (entry_agent | tier=orchestrator | *-chief.md). Marker-aware
  (skips hand-edited skills unless --force, with .bak backup).
- New: README.md — explains the difference between sync:skills:codex
  (incremental, core-only, CI) and setup:codex-skills (full bootstrap,
  squad chiefs included, operator-facing).
- package.json: setup:codex-skills, setup:codex-skills:dry scripts.
- Sample output: .codex/skills/aiox-claude-mastery-chief/SKILL.md
  (only squad whitelisted in this repo; downstream installs with N
  squads will get N chief skills).

Operator usage:
  npm run setup:codex-skills            # full bootstrap
  npm run setup:codex-skills:dry        # preview
  npm run setup:codex-skills -- --force # overwrite hand-edited (with .bak)

Replaces the provisional standalone script previously distributed
manually to students. The script logic is preserved verbatim; only the
header doc and module exports were adapted for the canonical path.

Note: bootstrap.js sits under .aiox-core/infrastructure/scripts/ which
is in eslint global ignore, so no lint impact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(claude): add skills-first agent activation [ACORE-SKILLS]

* fix(validation): accept generated squad Codex skills [PR-641]

* fix(ci): stabilize skills schema and doctor tests [PR-641]

* fix(review): address skills migration review comments [PR-641]

* fix(ci): refresh install manifest for PR merge [PR-641]

* fix(review): normalize aiox-master command visibility [PR-641]

* fix(review): address qa behavior and source path guards [PR-641]

* test(e2e): add installed skills smoke gate [ACORE-SKILLS.7]

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tuanmedeiros pushed a commit to tuanmedeiros/aios-core-synkraay that referenced this pull request Jun 2, 2026
/SynkraAI#639/SynkraAI#637/SynkraAI#635/SynkraAI#641/SynkraAI#640) (SynkraAI#647)

Three drift items emerged from sequential squash merges that the
integration sweep had flagged in advance:

1. packages/installer/src/wizard/pro-setup.js:815 — `catch (checkError)`
   became unused after SynkraAI#635's fallback path was layered onto the post-SynkraAI#640
   catch handler. Renamed to `_checkError` per no-unused-vars rule.

2. packages/installer/src/pro/pro-scaffolder.js:83 — Missing trailing comma
   on the error message argument. The string was rebranded to
   'npx aiox-pro install' by SynkraAI#625 but the trailing comma from SynkraAI#639's lint
   sweep was lost in conflict resolution.

3. .claude/skills/AIOX/agents/devops/SKILL.md — Drifted by 1 hash from
   ide-sync generator output after SynkraAI#641's skills-first migration
   interacted with SynkraAI#637's Pro Access Grant agent edits. Regenerated via
   npm run sync:ide.

Plus install-manifest.yaml regenerated to reflect the post-merge
file tree state.

Validation (post-fix on main pulled fresh):
- npm run lint → 0 errors, 0 warnings
- npm run typecheck → clean
- npm run validate:manifest → VALID
- npm run validate:claude-sync (strict) → PASS
- npm run validate:codex-skills (strict) → PASS (12 skills)
- npm run test:e2e:installed-skills → PASS (3 agents activated end-to-end)

This was anticipated in the integration sweep doc — see session
`test/all-merged-2026-05-05` branch from 2026-05-05.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agents Agent system related area: cli CLI tools (bin/, packages/aios-pro-cli/) area: core Core framework (.aios-core/core/) area: devops CI/CD, GitHub Actions (.github/) area: docs Documentation (docs/) area: health-check Health check system area: installer Installer and setup (packages/installer/) area: pro Pro features (pro/) area: synapse SYNAPSE context engine area: workflows Workflow system related mcp squad type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant