fix(security): eliminate supply chain risks from npx and shell execution#4
fix(security): eliminate supply chain risks from npx and shell execution#4
Conversation
Executes full 6-wave migration from command/rules-heavy outputs to native agents + reusable skills per platform capability: Wave 0: Contract & baseline freeze (aios-4.2.13 parity contract) Wave 1: Shared AgentSpec/TaskSpec intermediate model + deterministic ordering Wave 2: Claude/Copilot native agent renderers + command adapter coexistence Wave 3: Claude/Gemini agent-skills dual-run + extension manifest alignment Wave 4: Curated task-to-skill catalog (13 tasks allowlisted, not full dump) Wave 5: Docs/contracts/validators aligned to native+skills operating model Key decisions: - Native agents where platform supports (.claude/agents, .github/agents) - Skills where stable (.codex/skills, .claude/skills, gemini extension) - Adapters kept for compatibility (commands, rules) - no deletions - Task skills governed by allowlist contract, not full export - Duplicate-name detection added to Claude integration validator Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Fix persona loading path from non-existent .claude/commands/AIOS/agents/ to .aios-core/development/agents/ (source of truth) across all 10 agents - Add "COMPLETE file" instruction to prevent partial reads of agent definitions - Change context loading from parallel to sequential to avoid sibling cascade failures on Windows (exit code 1 from combined bash commands) - Update IDE sync renderer target path in framework-config.yaml - Update quality-gate-config, skill-dispatcher, agent-prompt-template, and apply-inline-greeting script references Co-Authored-By: Claude Opus 4.6 <[email protected]>
Rename all 10 agent files to match .aios-core/development/agents/ names: - aios-architect.md → architect.md - aios-dev.md → dev.md - aios-analyst.md → analyst.md - aios-data-engineer.md → data-engineer.md - aios-ux.md → ux-design-expert.md - aios-po.md → po.md - aios-qa.md → qa.md - aios-sm.md → sm.md - aios-pm.md → pm.md - aios-devops.md → devops.md Also update frontmatter name field to match (e.g., name: architect). Co-Authored-By: Claude Opus 4.6 <[email protected]>
…and remove generate-greeting.js - Restructure 12 agents from flat files to subdirectories (dev.md -> dev/dev.md) with MEMORY.md and agent-context.md per agent - Add agentAlwaysLoadFiles to core-config.yaml with per-agent file lists (rules + context, not domain knowledge) - Update getAgentConfig() in claude-agents.js to read and inject always-load config into agent-context.md - Remove all generate-greeting.js references from runtime files: codex skills (12), gemini agent-launcher, AGENTS.md, IDE rule templates - Update installer template and brownfield/greenfield YAML templates - Update agent-system-architecture.md to v1.3 with config chain docs - Regenerate all IDE sync outputs (8 targets x 12 agents) - Update tests to match new structure and inline greeting behavior Co-Authored-By: Claude Opus 4.6 <[email protected]>
…text loading [Story AGF-1] Implements the complete 3-layer agent architecture (interactive skills, autonomous agents, task forks) and the defense-in-depth context loading strategy to ensure consistent agent behavior across all invocation modes. Key changes: - Add project-context skill pre-loaded by all agents via skills: frontmatter field - Add universal agent-context-loading rule in .claude/rules/ (cross-mode Layer 2) - Add required-context field to task skill frontmatter (Layer 3) - Add claude-commands.js renderer for interactive command wrappers - Expand agent skill activation protocol with MEMORY + agent-context loading - Regenerate all IDE artifacts (Claude, Codex, Gemini) with new context layers - Add 4 unit tests for project-context and required-context validation - Update architecture docs (Section 10: Defense in Depth) QA: APPROVED (95/100) - 49/49 relevant tests pass Co-Authored-By: Claude Opus 4.6 <[email protected]>
… AGF-2] - Add agent: frontmatter to ~95 task files missing ownership declaration - Implement inferAgentFromFilename() with longest-prefix-first matching (10 test cases) - Expand agent_aliases: db→data-engineer, ux→ux-design-expert, aios-developer→dev, github-devops→devops - Rename 4 github-devops-* tasks to eliminate double-prefix naming - Delete 2 duplicate tasks (apply-qa-fixes.md, create-brownfield-story.md) - Create task-agent-map.yaml as permanent source of truth for all mappings - Regenerate 392 task skills across claude/codex targets with correct agent prefixes - Update 18 cross-references for renamed task files - Master task count reduced from ~140 to 29 (genuine cross-agent tasks only) - QA PASS: zero regressions, tests improved from 5→3 failing suites Co-Authored-By: Claude Opus 4.6 <[email protected]>
…eCompact hooks
- Add PERSONA DNA and ENHANCEMENT markers to all 12 source agent definitions
- Update claude-agents.js with extractPersonaDNA() function for DNA/Enhancement generation
- Create .claude/hooks/session-start.sh (SessionStart hook with git branch, active agent context)
- Create .claude/hooks/pre-compact-persona.sh (PreCompact hook preserving Persona DNA)
- Create .claude/settings.json registering both hooks (SessionStart + PreCompact coexisting with session-digest)
- Create 12 authority rules files in .claude/rules/agent-{id}-authority.md
- Regenerate .claude/agents/*.md with DNA/Enhancement split via IDE sync
- Add tests: AGF-4 hook tests (14 tests) + DNA extraction transformer tests (6 tests)
- All 117 related tests pass, zero regressions introduced
[Story AGF-4]
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Mark all ACs and DoD checkboxes complete, add Dev Agent Record with completion notes, file list, and change log. [Story AGF-4] Co-Authored-By: Claude Opus 4.6 <[email protected]>
QA review found malformed sed regex that prevented DNA extraction during conversation compaction. Added QA gate and updated story with results. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…ory AGF-5] - UserPromptSubmit hook: agent switch detection (D6), keyword RECALL, bracket estimation (D12), XML hierarchical injection (D11) - Stop hook: quality gate with infinite loop guard (stop_hook_active check), session metrics - Keyword rules: supabase, migration, deploy - SYNAPSE domain migration: constitution, global-coding-standards, workflow-* (3), context-brackets, custom-rules - settings.json: registered UserPromptSubmit (5s) and Stop (30s) hooks - 40 tests covering all acceptance criteria (AC1-AC8) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
… renderers Add persona DNA sections to all 12 agent definitions across Codex and Gemini IDEs. Update agent-skill and task-skill renderers with enhanced sync logic and tests. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…registry sync AGF-4 marked Done, AGF-5 marked Ready for Review with QA gate PASS (100/100). Entity registry updated with latest agent metadata. Co-Authored-By: Claude Opus 4.6 <[email protected]>
AGF-4 changed agent greeting from "Agent dev loaded" to "dev Agent ready". Update test assertion to match new greeting format. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…s [Epic AGF]
- agent-config-loader: fix agent path from agents/{id}.md to agents/{id}/{id}.md
matching the actual subdirectory structure
- validateSkillContent: update checks for self-contained skill format (AGF-4)
replacing obsolete canonical-path and source-of-truth assertions
- codex-skills-validate test: fix invalid agent/task combo (aios-master -> architect)
- onboarding-smoke test: use resilient greeting assertion matching both
full-config and fallback greeting formats
Co-Authored-By: Claude Opus 4.6 <[email protected]>
…mory, optimize CLAUDE.md Story AGF-6 — Consolidation: Epic Agent Fidelity Phase C Phase 1: UAP + greeting-builder + generate-greeting + test-greeting-system deprecated - @deprecated banners added to all 4 scripts + activation-runtime.js - 8 greeting/UAP test suites marked describe.skip with AGF-6 comment Phase 2: agent-context.md consolidation - Deprecation notices added to all 12 agent-context.md files - .claude/rules/agent-context-loading.md updated to reference new .claude/rules/ locations - Authority rules already exist in .claude/rules/agent-{id}-authority.md (AGF-4) Phase 3: .synapse/ runtime decoupled - synapse-engine.cjs @deprecated banner added (already deregistered from settings.json in AGF-5) - readSynapseAgent in claude-agents.js marked @deprecated (dead code) - .synapse/DEPRECATED.md created with rollback guide - SYNAPSE diagnostics skill updated to indicate SYNAPSE-Lite is active - All 36 tests/synapse/ files marked describe.skip with AGF-6 comment Phase 4: CLAUDE.md optimized (324 → 187 lines) - 5 new rules files created: git-conventions, test-conventions, session-management, debug-config - global-coding-standards.md updated with naming conventions + TypeScript + error handling - CLAUDE.md retains: Constitution ref, project structure, agent overview, CLI commands, tool usage Phase 5: Agent system architecture documentation rewritten v2.0 - Progressive Enhancement 4-level diagram - SYNAPSE → SYNAPSE-Lite comparison table - Memory before/after (4 locations → 2+rules) - ADR-AGF-3 reference + deprecated components inventory Phase 6: Cross-IDE validation - Codex: 12 agent files confirmed - Gemini: 12 skills confirmed - agent-memory junctions confirmed - npm test: 233 passed, 40 skipped, 0 failed Result: ~90% reduction in custom code maintenance surface. Epic AGF complete. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…re decisions [Story AGF-7] Phase 1: Deep investigation of 7 external repos + 5 internal sources Phase 2: IDE mechanism mapping (Claude Code, Codex, Gemini, Cursor) Phase 3: Roundtable with 4 minds producing ADR-AGF-7 (D-AGF7-1 through D-AGF7-7) Bonus: /tech-search with 20+ sources and 6 breakthrough findings Co-Authored-By: Claude Opus 4.6 <[email protected]>
- aios.js: replace `execSync('npx aios-core install')` in doctor --fix
with local `runWizard()` call to avoid resolving packages from npm registry
- aios-init.js: refactor `spawnAsync()` to accept program + args array
instead of string splitting with `shell: true`
- Removes two supply chain attack vectors (compromised npm package
would execute arbitrary code via npx or shell interpretation)
Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Important Review skippedToo many files! This PR contains 300 files, which is 150 over the limit of 150. You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📊 Coverage ReportCoverage report not available
Generated by PR Automation (Story 6.1) |
Summary
execSync('npx aios-core install')with localrunWizard()spawnAsync()to acceptprogram + args[]withoutshell: trueMirror of upstream PR: SynkraAI#451
🤖 Generated with Claude Code