atabey 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ATABEY.md +4 -4
- package/README.md +35 -33
- package/bin/cli.js +2 -2
- package/bin/validate-agent-army.js +6 -6
- package/dist/framework-mcp/src/constants.js +1 -1
- package/dist/framework-mcp/src/constants.js.map +1 -1
- package/dist/framework-mcp/src/index.js +29 -5
- package/dist/framework-mcp/src/index.js.map +1 -1
- package/dist/framework-mcp/src/resources/index.d.ts +10 -0
- package/dist/framework-mcp/src/resources/index.js +59 -0
- package/dist/framework-mcp/src/resources/index.js.map +1 -0
- package/dist/framework-mcp/src/tools/control_plane/locking.js +3 -3
- package/dist/framework-mcp/src/tools/control_plane/locking.js.map +1 -1
- package/dist/framework-mcp/src/tools/control_plane/registry.js +3 -2
- package/dist/framework-mcp/src/tools/control_plane/registry.js.map +1 -1
- package/dist/framework-mcp/src/tools/definitions.js +33 -1
- package/dist/framework-mcp/src/tools/definitions.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js +8 -3
- package/dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/patch_file.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/patch_file.js +8 -3
- package/dist/framework-mcp/src/tools/file_system/patch_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/read_file.js +3 -3
- package/dist/framework-mcp/src/tools/file_system/read_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/replace_text.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/replace_text.js +8 -3
- package/dist/framework-mcp/src/tools/file_system/replace_text.js.map +1 -1
- package/dist/framework-mcp/src/tools/file_system/write_file.d.ts +1 -1
- package/dist/framework-mcp/src/tools/file_system/write_file.js +10 -5
- package/dist/framework-mcp/src/tools/file_system/write_file.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/audit_deps.js +2 -2
- package/dist/framework-mcp/src/tools/framework/audit_deps.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/run_tests.js +2 -2
- package/dist/framework-mcp/src/tools/framework/run_tests.js.map +1 -1
- package/dist/framework-mcp/src/tools/framework/submit_plan.d.ts +10 -0
- package/dist/framework-mcp/src/tools/framework/submit_plan.js +14 -0
- package/dist/framework-mcp/src/tools/framework/submit_plan.js.map +1 -0
- package/dist/framework-mcp/src/tools/framework/update_memory.js +1 -1
- package/dist/framework-mcp/src/tools/framework/update_memory.js.map +1 -1
- package/dist/framework-mcp/src/tools/index.js +2 -0
- package/dist/framework-mcp/src/tools/index.js.map +1 -1
- package/dist/framework-mcp/src/tools/memory/get_insights.js +1 -1
- package/dist/framework-mcp/src/tools/memory/get_insights.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/log_action.js +1 -1
- package/dist/framework-mcp/src/tools/messaging/log_action.js.map +1 -1
- package/dist/framework-mcp/src/tools/messaging/send_message.js +5 -5
- package/dist/framework-mcp/src/tools/messaging/send_message.js.map +1 -1
- package/dist/framework-mcp/src/tools/observability/check_ports.js +1 -1
- package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
- package/dist/framework-mcp/src/tools/quality/check_lint.js +2 -2
- package/dist/framework-mcp/src/tools/quality/check_lint.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/get_gaps.js +1 -1
- package/dist/framework-mcp/src/tools/search/get_gaps.js.map +1 -1
- package/dist/framework-mcp/src/tools/search/grep_search.js +3 -3
- package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -1
- package/dist/framework-mcp/src/tools/types.d.ts +1 -0
- package/dist/framework-mcp/src/utils/compliance.d.ts +6 -0
- package/dist/framework-mcp/src/utils/compliance.js +158 -5
- package/dist/framework-mcp/src/utils/compliance.js.map +1 -1
- package/dist/framework-mcp/src/utils/permissions.d.ts +12 -0
- package/dist/framework-mcp/src/utils/permissions.js +72 -0
- package/dist/framework-mcp/src/utils/permissions.js.map +1 -0
- package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js +84 -0
- package/dist/framework-mcp/tests/tools/file_system/compliance-risk.test.js.map +1 -0
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js +31 -31
- package/dist/framework-mcp/tests/tools/file_system/file_system_tools.test.js.map +1 -1
- package/dist/framework-mcp/tests/tools/file_system/permissions.test.d.ts +1 -0
- package/dist/framework-mcp/tests/tools/file_system/permissions.test.js +92 -0
- package/dist/framework-mcp/tests/tools/file_system/permissions.test.js.map +1 -0
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js +5 -5
- package/dist/framework-mcp/tests/tools/messaging/send_message.test.js.map +1 -1
- package/dist/src/cli/adapters/core.js +13 -20
- package/dist/src/cli/adapters/core.js.map +1 -1
- package/dist/src/cli/adapters/scaffold.js +2 -2
- package/dist/src/cli/adapters/scaffold.js.map +1 -1
- package/dist/src/cli/commands/check.js +5 -3
- package/dist/src/cli/commands/check.js.map +1 -1
- package/dist/src/cli/commands/compliance.js +2 -2
- package/dist/src/cli/commands/compliance.js.map +1 -1
- package/dist/src/cli/commands/contract.js +2 -2
- package/dist/src/cli/commands/contract.js.map +1 -1
- package/dist/src/cli/commands/dashboard.d.ts +5 -0
- package/dist/src/cli/commands/dashboard.js +124 -0
- package/dist/src/cli/commands/dashboard.js.map +1 -0
- package/dist/src/cli/commands/explorer.js +3 -3
- package/dist/src/cli/commands/explorer.js.map +1 -1
- package/dist/src/cli/commands/git.js +3 -3
- package/dist/src/cli/commands/git.js.map +1 -1
- package/dist/src/cli/commands/init/create-agent.d.ts +4 -0
- package/dist/src/cli/commands/init/create-agent.js +59 -0
- package/dist/src/cli/commands/init/create-agent.js.map +1 -0
- package/dist/src/cli/commands/init/scaffold-core.d.ts +1 -0
- package/dist/src/cli/commands/init/scaffold-core.js +11 -7
- package/dist/src/cli/commands/init/scaffold-core.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-docs.d.ts +1 -0
- package/dist/src/cli/commands/init/scaffold-docs.js +4 -6
- package/dist/src/cli/commands/init/scaffold-docs.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-ops.js +4 -4
- package/dist/src/cli/commands/init/scaffold-ops.js.map +1 -1
- package/dist/src/cli/commands/init/scaffold-standards.js +10 -8
- package/dist/src/cli/commands/init/scaffold-standards.js.map +1 -1
- package/dist/src/cli/commands/init.js +26 -10
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/knowledge.js +3 -3
- package/dist/src/cli/commands/knowledge.js.map +1 -1
- package/dist/src/cli/commands/lint.js +2 -2
- package/dist/src/cli/commands/lint.js.map +1 -1
- package/dist/src/cli/commands/log.js +6 -28
- package/dist/src/cli/commands/log.js.map +1 -1
- package/dist/src/cli/commands/orchestrate.d.ts +10 -17
- package/dist/src/cli/commands/orchestrate.js +92 -341
- package/dist/src/cli/commands/orchestrate.js.map +1 -1
- package/dist/src/cli/commands/plan.d.ts +5 -0
- package/dist/src/cli/commands/plan.js +80 -59
- package/dist/src/cli/commands/plan.js.map +1 -1
- package/dist/src/cli/commands/script.js +3 -3
- package/dist/src/cli/commands/script.js.map +1 -1
- package/dist/src/cli/commands/security.js +2 -2
- package/dist/src/cli/commands/security.js.map +1 -1
- package/dist/src/cli/commands/status.js +65 -8
- package/dist/src/cli/commands/status.js.map +1 -1
- package/dist/src/cli/commands/trace.d.ts +4 -0
- package/dist/src/cli/commands/trace.js +83 -2
- package/dist/src/cli/commands/trace.js.map +1 -1
- package/dist/src/cli/index.js +68 -18
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/cli/shims.js +14 -14
- package/dist/src/cli/utils/claude.js +1 -1
- package/dist/src/cli/utils/claude.js.map +1 -1
- package/dist/src/cli/utils/compliance.js +7 -1
- package/dist/src/cli/utils/compliance.js.map +1 -1
- package/dist/src/cli/utils/fs.js +1 -1
- package/dist/src/cli/utils/fs.js.map +1 -1
- package/dist/src/cli/utils/i18n.d.ts +1 -0
- package/dist/src/cli/utils/i18n.js +2 -0
- package/dist/src/cli/utils/i18n.js.map +1 -1
- package/dist/src/cli/utils/memory.d.ts +12 -3
- package/dist/src/cli/utils/memory.js +39 -31
- package/dist/src/cli/utils/memory.js.map +1 -1
- package/dist/src/cli/utils/pkg.js +2 -2
- package/dist/src/cli/utils/pkg.js.map +1 -1
- package/dist/src/cli/utils/schemas.d.ts +8 -8
- package/dist/src/cli/utils/ui.js +4 -4
- package/dist/src/cli/utils/ui.js.map +1 -1
- package/dist/src/contracts/tasks.d.ts +2 -2
- package/dist/src/dashboard/vite.config.d.ts +2 -0
- package/dist/src/dashboard/vite.config.js +16 -0
- package/dist/src/dashboard/vite.config.js.map +1 -0
- package/dist/src/modules/adapters/definitions.js +10 -10
- package/dist/src/modules/adapters/definitions.js.map +1 -1
- package/dist/src/modules/adapters/shared.js +4 -4
- package/dist/src/modules/adapters/shared.js.map +1 -1
- package/dist/src/modules/agents/definitions.d.ts +19 -0
- package/dist/src/modules/agents/definitions.js +74 -21
- package/dist/src/modules/agents/definitions.js.map +1 -1
- package/dist/src/modules/agents/registry/backend.js +8 -0
- package/dist/src/modules/agents/registry/backend.js.map +1 -1
- package/dist/src/modules/agents/registry/database.js +7 -0
- package/dist/src/modules/agents/registry/database.js.map +1 -1
- package/dist/src/modules/agents/registry/devops.js +6 -0
- package/dist/src/modules/agents/registry/devops.js.map +1 -1
- package/dist/src/modules/agents/registry/frontend.js +8 -0
- package/dist/src/modules/agents/registry/frontend.js.map +1 -1
- package/dist/src/modules/agents/registry/security.js +6 -0
- package/dist/src/modules/agents/registry/security.js.map +1 -1
- package/dist/src/modules/agents/types.d.ts +2 -0
- package/dist/src/modules/engines/evaluation-engine.d.ts +11 -0
- package/dist/src/modules/engines/evaluation-engine.js +103 -0
- package/dist/src/modules/engines/evaluation-engine.js.map +1 -0
- package/dist/src/modules/engines/health-engine.d.ts +16 -0
- package/dist/src/modules/engines/health-engine.js +50 -0
- package/dist/src/modules/engines/health-engine.js.map +1 -0
- package/dist/src/modules/engines/planning-engine.d.ts +25 -0
- package/dist/src/modules/engines/planning-engine.js +79 -0
- package/dist/src/modules/engines/planning-engine.js.map +1 -0
- package/dist/src/modules/engines/risk-engine.d.ts +18 -0
- package/dist/src/modules/engines/risk-engine.js +106 -0
- package/dist/src/modules/engines/risk-engine.js.map +1 -0
- package/dist/src/modules/engines/routing-engine.d.ts +11 -0
- package/dist/src/modules/engines/routing-engine.js +74 -0
- package/dist/src/modules/engines/routing-engine.js.map +1 -0
- package/dist/src/modules/engines/types.d.ts +47 -0
- package/dist/src/modules/engines/types.js +2 -0
- package/dist/src/modules/engines/types.js.map +1 -0
- package/dist/src/shared/constants.d.ts +6 -2
- package/dist/src/shared/constants.js +5 -1
- package/dist/src/shared/constants.js.map +1 -1
- package/dist/src/shared/fs.d.ts +1 -0
- package/dist/src/shared/fs.js +4 -0
- package/dist/src/shared/fs.js.map +1 -1
- package/dist/src/shared/storage.d.ts +60 -0
- package/dist/src/shared/storage.js +208 -0
- package/dist/src/shared/storage.js.map +1 -0
- package/dist/tests/adapter.test.js +3 -2
- package/dist/tests/adapter.test.js.map +1 -1
- package/dist/tests/agent-memory-v2.test.d.ts +1 -0
- package/dist/tests/agent-memory-v2.test.js +68 -0
- package/dist/tests/agent-memory-v2.test.js.map +1 -0
- package/dist/tests/agents-definitions.test.js +42 -0
- package/dist/tests/agents-definitions.test.js.map +1 -1
- package/dist/tests/integration/hermes_locking.test.js +7 -10
- package/dist/tests/integration/hermes_locking.test.js.map +1 -1
- package/dist/tests/orchestrate.test.js +5 -1
- package/dist/tests/orchestrate.test.js.map +1 -1
- package/dist/tests/orchestrator-dependencies.test.d.ts +1 -0
- package/dist/tests/orchestrator-dependencies.test.js +52 -0
- package/dist/tests/orchestrator-dependencies.test.js.map +1 -0
- package/dist/tests/plan.test.d.ts +1 -0
- package/dist/tests/plan.test.js +63 -0
- package/dist/tests/plan.test.js.map +1 -0
- package/dist/tests/planning-engine.test.d.ts +1 -0
- package/dist/tests/planning-engine.test.js +50 -0
- package/dist/tests/planning-engine.test.js.map +1 -0
- package/dist/tests/status-cost.test.d.ts +1 -0
- package/dist/tests/status-cost.test.js +54 -0
- package/dist/tests/status-cost.test.js.map +1 -0
- package/dist/tests/status.test.js +8 -7
- package/dist/tests/status.test.js.map +1 -1
- package/dist/tests/trace-replay.test.d.ts +1 -0
- package/dist/tests/trace-replay.test.js +65 -0
- package/dist/tests/trace-replay.test.js.map +1 -0
- package/dist/tests/trace.test.js +14 -7
- package/dist/tests/trace.test.js.map +1 -1
- package/dist/ui/assets/index-Bkt7APzu.css +1 -0
- package/dist/ui/assets/index-CeX-06mI.js +49 -0
- package/dist/ui/index.html +14 -0
- package/framework-mcp/dist/constants.js +1 -1
- package/framework-mcp/{src/constants.ts → dist/framework-mcp/src/constants.js} +4 -18
- package/framework-mcp/{src/index.ts → dist/framework-mcp/src/index.js} +52 -53
- package/framework-mcp/dist/framework-mcp/src/resources/index.js +58 -0
- package/framework-mcp/{src/tools/control_plane/locking.ts → dist/framework-mcp/src/tools/control_plane/locking.js} +14 -21
- package/framework-mcp/{src/tools/control_plane/registry.ts → dist/framework-mcp/src/tools/control_plane/registry.js} +8 -11
- package/framework-mcp/{src/tools/definitions.ts → dist/framework-mcp/src/tools/definitions.js} +35 -5
- package/framework-mcp/{src/tools/file_system/batch_surgical_edit.ts → dist/framework-mcp/src/tools/file_system/batch_surgical_edit.js} +16 -31
- package/framework-mcp/{src/tools/file_system/patch_file.ts → dist/framework-mcp/src/tools/file_system/patch_file.js} +9 -14
- package/framework-mcp/{src/tools/file_system/read_file.ts → dist/framework-mcp/src/tools/file_system/read_file.js} +9 -16
- package/framework-mcp/{src/tools/file_system/replace_text.ts → dist/framework-mcp/src/tools/file_system/replace_text.js} +13 -17
- package/framework-mcp/{src/tools/file_system/write_file.ts → dist/framework-mcp/src/tools/file_system/write_file.js} +14 -16
- package/framework-mcp/{src/tools/framework/audit_deps.ts → dist/framework-mcp/src/tools/framework/audit_deps.js} +9 -17
- package/framework-mcp/{src/tools/framework/get_status.ts → dist/framework-mcp/src/tools/framework/get_status.js} +1 -3
- package/framework-mcp/{src/tools/framework/orchestrate.ts → dist/framework-mcp/src/tools/framework/orchestrate.js} +1 -3
- package/framework-mcp/{src/tools/framework/run_tests.ts → dist/framework-mcp/src/tools/framework/run_tests.js} +9 -12
- package/framework-mcp/dist/framework-mcp/src/tools/framework/submit_plan.js +13 -0
- package/framework-mcp/{src/tools/framework/update_contract_hash.ts → dist/framework-mcp/src/tools/framework/update_contract_hash.js} +1 -3
- package/framework-mcp/{src/tools/framework/update_memory.ts → dist/framework-mcp/src/tools/framework/update_memory.js} +2 -4
- package/framework-mcp/{src/tools/index.ts → dist/framework-mcp/src/tools/index.js} +5 -7
- package/framework-mcp/{src/tools/memory/get_insights.ts → dist/framework-mcp/src/tools/memory/get_insights.js} +4 -11
- package/framework-mcp/{src/tools/memory/read_memory.ts → dist/framework-mcp/src/tools/memory/read_memory.js} +3 -6
- package/framework-mcp/{src/tools/messaging/log_action.ts → dist/framework-mcp/src/tools/messaging/log_action.js} +2 -8
- package/framework-mcp/{src/tools/messaging/send_message.ts → dist/framework-mcp/src/tools/messaging/send_message.js} +19 -22
- package/framework-mcp/{src/tools/observability/check_ports.ts → dist/framework-mcp/src/tools/observability/check_ports.js} +6 -10
- package/framework-mcp/{src/tools/observability/get_health.ts → dist/framework-mcp/src/tools/observability/get_health.js} +1 -6
- package/framework-mcp/{src/tools/quality/check_lint.ts → dist/framework-mcp/src/tools/quality/check_lint.js} +3 -9
- package/framework-mcp/{src/tools/search/get_gaps.ts → dist/framework-mcp/src/tools/search/get_gaps.js} +12 -18
- package/framework-mcp/{src/tools/search/get_map.ts → dist/framework-mcp/src/tools/search/get_map.js} +14 -19
- package/framework-mcp/{src/tools/search/grep_search.ts → dist/framework-mcp/src/tools/search/grep_search.js} +26 -26
- package/framework-mcp/{src/tools/search/list_dir.ts → dist/framework-mcp/src/tools/search/list_dir.js} +4 -10
- package/framework-mcp/{src/tools/shell/run_command.ts → dist/framework-mcp/src/tools/shell/run_command.js} +1 -11
- package/framework-mcp/dist/framework-mcp/src/tools/types.js +1 -0
- package/framework-mcp/{src/utils/cli.ts → dist/framework-mcp/src/utils/cli.js} +25 -19
- package/framework-mcp/dist/framework-mcp/src/utils/compliance.js +231 -0
- package/framework-mcp/{src/utils/fs.ts → dist/framework-mcp/src/utils/fs.js} +9 -10
- package/framework-mcp/{src/utils/metrics.ts → dist/framework-mcp/src/utils/metrics.js} +11 -28
- package/framework-mcp/dist/framework-mcp/src/utils/permissions.js +71 -0
- package/framework-mcp/{src/utils/security.ts → dist/framework-mcp/src/utils/security.js} +9 -15
- package/framework-mcp/dist/index.js +29 -5
- package/framework-mcp/dist/resources/index.js +58 -0
- package/{src/cli/adapters/core.ts → framework-mcp/dist/src/cli/adapters/core.js} +21 -41
- package/{src/cli/adapters/index.ts → framework-mcp/dist/src/cli/adapters/index.js} +1 -1
- package/{src/cli/adapters/paths.ts → framework-mcp/dist/src/cli/adapters/paths.js} +19 -53
- package/{src/cli/adapters/scaffold.ts → framework-mcp/dist/src/cli/adapters/scaffold.js} +18 -42
- package/{src/cli/adapters/utils.ts → framework-mcp/dist/src/cli/adapters/utils.js} +19 -31
- package/{src/cli/commands/approve.ts → framework-mcp/dist/src/cli/commands/approve.js} +15 -25
- package/{src/cli/commands/check.ts → framework-mcp/dist/src/cli/commands/check.js} +36 -43
- package/{src/cli/commands/compliance.ts → framework-mcp/dist/src/cli/commands/compliance.js} +10 -15
- package/{src/cli/commands/contract.ts → framework-mcp/dist/src/cli/commands/contract.js} +13 -31
- package/framework-mcp/dist/src/cli/commands/dashboard.js +123 -0
- package/{src/cli/commands/explorer.ts → framework-mcp/dist/src/cli/commands/explorer.js} +14 -17
- package/{src/cli/commands/git.ts → framework-mcp/dist/src/cli/commands/git.js} +15 -14
- package/framework-mcp/dist/src/cli/commands/init/create-agent.js +58 -0
- package/{src/cli/commands/init/scaffold-core.ts → framework-mcp/dist/src/cli/commands/init/scaffold-core.js} +35 -59
- package/framework-mcp/dist/src/cli/commands/init/scaffold-docs.js +34 -0
- package/{src/cli/commands/init/scaffold-ops.ts → framework-mcp/dist/src/cli/commands/init/scaffold-ops.js} +19 -22
- package/{src/cli/commands/init/scaffold-standards.ts → framework-mcp/dist/src/cli/commands/init/scaffold-standards.js} +20 -20
- package/{src/cli/commands/init.ts → framework-mcp/dist/src/cli/commands/init.js} +51 -77
- package/{src/cli/commands/knowledge.ts → framework-mcp/dist/src/cli/commands/knowledge.js} +9 -11
- package/{src/cli/commands/lint.ts → framework-mcp/dist/src/cli/commands/lint.js} +5 -6
- package/framework-mcp/dist/src/cli/commands/log.js +10 -0
- package/{src/cli/commands/memory.ts → framework-mcp/dist/src/cli/commands/memory.js} +1 -3
- package/framework-mcp/dist/src/cli/commands/orchestrate.js +159 -0
- package/framework-mcp/dist/src/cli/commands/plan.js +117 -0
- package/{src/cli/commands/script.ts → framework-mcp/dist/src/cli/commands/script.js} +6 -7
- package/{src/cli/commands/security.ts → framework-mcp/dist/src/cli/commands/security.js} +6 -8
- package/framework-mcp/dist/src/cli/commands/status.js +97 -0
- package/framework-mcp/dist/src/cli/commands/trace.js +109 -0
- package/{src/cli/index.ts → framework-mcp/dist/src/cli/index.js} +80 -64
- package/{src/cli/shims.ts → framework-mcp/dist/src/cli/shims.js} +15 -15
- package/{src/cli/utils/claude.ts → framework-mcp/dist/src/cli/utils/claude.js} +8 -15
- package/{src/cli/utils/compliance.ts → framework-mcp/dist/src/cli/utils/compliance.js} +18 -36
- package/{src/cli/utils/config-schema.ts → framework-mcp/dist/src/cli/utils/config-schema.js} +0 -6
- package/{src/cli/utils/fs.ts → framework-mcp/dist/src/cli/utils/fs.js} +34 -67
- package/{src/cli/utils/i18n.ts → framework-mcp/dist/src/cli/utils/i18n.js} +3 -17
- package/{src/cli/utils/memory.ts → framework-mcp/dist/src/cli/utils/memory.js} +87 -114
- package/{src/cli/utils/pkg.ts → framework-mcp/dist/src/cli/utils/pkg.js} +120 -155
- package/{src/cli/utils/schemas.ts → framework-mcp/dist/src/cli/utils/schemas.js} +0 -3
- package/{src/cli/utils/string.ts → framework-mcp/dist/src/cli/utils/string.js} +18 -24
- package/{src/cli/utils/time.ts → framework-mcp/dist/src/cli/utils/time.js} +4 -4
- package/{src/cli/utils/ui.ts → framework-mcp/dist/src/cli/utils/ui.js} +9 -17
- package/{src/contracts/tasks.ts → framework-mcp/dist/src/contracts/tasks.js} +0 -6
- package/framework-mcp/dist/src/dashboard/vite.config.js +15 -0
- package/framework-mcp/dist/src/modules/adapters/definitions.js +140 -0
- package/framework-mcp/dist/src/modules/adapters/registry.js +18 -0
- package/{src/modules/adapters/shared.ts → framework-mcp/dist/src/modules/adapters/shared.js} +9 -25
- package/framework-mcp/dist/src/modules/adapters/types.js +1 -0
- package/{src/modules/agents/definitions.ts → framework-mcp/dist/src/modules/agents/definitions.js} +158 -161
- package/{src/modules/agents/registry/analyst.ts → framework-mcp/dist/src/modules/agents/registry/analyst.js} +9 -14
- package/{src/modules/agents/registry/architect.ts → framework-mcp/dist/src/modules/agents/registry/architect.js} +9 -14
- package/{src/modules/agents/registry/backend.ts → framework-mcp/dist/src/modules/agents/registry/backend.js} +16 -13
- package/{src/modules/agents/registry/database.ts → framework-mcp/dist/src/modules/agents/registry/database.js} +16 -14
- package/{src/modules/agents/registry/devops.ts → framework-mcp/dist/src/modules/agents/registry/devops.js} +15 -14
- package/{src/modules/agents/registry/explorer.ts → framework-mcp/dist/src/modules/agents/registry/explorer.js} +9 -14
- package/{src/modules/agents/registry/frontend.ts → framework-mcp/dist/src/modules/agents/registry/frontend.js} +17 -14
- package/{src/modules/agents/registry/git.ts → framework-mcp/dist/src/modules/agents/registry/git.js} +9 -14
- package/{src/modules/agents/registry/manager.ts → framework-mcp/dist/src/modules/agents/registry/manager.js} +10 -15
- package/{src/modules/agents/registry/mobile.ts → framework-mcp/dist/src/modules/agents/registry/mobile.js} +9 -14
- package/{src/modules/agents/registry/native.ts → framework-mcp/dist/src/modules/agents/registry/native.js} +9 -14
- package/{src/modules/agents/registry/quality.ts → framework-mcp/dist/src/modules/agents/registry/quality.js} +9 -14
- package/{src/modules/agents/registry/security.ts → framework-mcp/dist/src/modules/agents/registry/security.js} +15 -14
- package/framework-mcp/dist/src/modules/agents/types.js +1 -0
- package/framework-mcp/dist/src/modules/engines/evaluation-engine.js +102 -0
- package/framework-mcp/dist/src/modules/engines/health-engine.js +49 -0
- package/framework-mcp/dist/src/modules/engines/planning-engine.js +78 -0
- package/framework-mcp/dist/src/modules/engines/risk-engine.js +105 -0
- package/framework-mcp/dist/src/modules/engines/routing-engine.js +73 -0
- package/framework-mcp/dist/src/modules/engines/types.js +1 -0
- package/{src/modules/skills/definitions.ts → framework-mcp/dist/src/modules/skills/definitions.js} +0 -1
- package/{src/shared/constants.ts → framework-mcp/dist/src/shared/constants.js} +40 -71
- package/{src/shared/errors.ts → framework-mcp/dist/src/shared/errors.js} +10 -17
- package/{src/shared/fs.ts → framework-mcp/dist/src/shared/fs.js} +14 -13
- package/{src/shared/logger.ts → framework-mcp/dist/src/shared/logger.js} +28 -51
- package/framework-mcp/dist/src/shared/storage.js +207 -0
- package/framework-mcp/dist/src/shared/types.js +12 -0
- package/framework-mcp/dist/tools/control_plane/locking.js +3 -3
- package/framework-mcp/dist/tools/control_plane/registry.js +3 -2
- package/framework-mcp/dist/tools/definitions.js +33 -1
- package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +8 -3
- package/framework-mcp/dist/tools/file_system/patch_file.js +8 -3
- package/framework-mcp/dist/tools/file_system/read_file.js +3 -3
- package/framework-mcp/dist/tools/file_system/replace_text.js +8 -3
- package/framework-mcp/dist/tools/file_system/write_file.js +10 -5
- package/framework-mcp/dist/tools/framework/audit_deps.js +2 -2
- package/framework-mcp/dist/tools/framework/run_tests.js +2 -2
- package/framework-mcp/dist/tools/framework/submit_plan.js +13 -0
- package/framework-mcp/dist/tools/framework/update_memory.js +1 -1
- package/framework-mcp/dist/tools/index.js +2 -0
- package/framework-mcp/dist/tools/memory/get_insights.js +1 -1
- package/framework-mcp/dist/tools/messaging/log_action.js +1 -1
- package/framework-mcp/dist/tools/messaging/send_message.js +5 -5
- package/framework-mcp/dist/tools/observability/check_ports.js +1 -1
- package/framework-mcp/dist/tools/quality/check_lint.js +2 -2
- package/framework-mcp/dist/tools/search/get_gaps.js +1 -1
- package/framework-mcp/dist/tools/search/grep_search.js +3 -3
- package/framework-mcp/dist/utils/compliance.js +158 -5
- package/framework-mcp/dist/utils/permissions.js +71 -0
- package/framework-mcp/package.json +7 -1
- package/mcp.json +1 -1
- package/package.json +10 -6
- package/templates/prompts/contract-design-recipe.md +1 -1
- package/templates/prompts/db-management-recipe.md +3 -3
- package/templates/prompts/deployment-recipe.md +3 -3
- package/templates/prompts/performance-optimization-recipe.md +3 -3
- package/templates/prompts/pull-request-template.md +2 -2
- package/templates/prompts/security-audit-recipe.md +3 -3
- package/templates/standards/crud-governance.md +1 -1
- package/templates/standards/deployment-standards.md +1 -1
- package/templates/standards/governance-standards.md +1 -1
- package/templates/standards/llm-governance.md +1 -1
- package/templates/standards/nextjs-standards.md +13 -0
- package/templates/standards/observability-standards.md +1 -1
- package/templates/standards/security-audit-standards.md +1 -1
- package/templates/standards/security-standards.md +1 -1
- package/templates/standards/testing-standards.md +1 -1
- package/templates/standards/vite-standards.md +13 -0
- package/framework-mcp/package-lock.json +0 -1191
- package/framework-mcp/src/declarations.d.ts +0 -17
- package/framework-mcp/src/tools/types.ts +0 -89
- package/framework-mcp/src/utils/compliance.ts +0 -95
- package/framework-mcp/tests/tools/file_system/file_system_tools.test.ts +0 -212
- package/framework-mcp/tests/tools/messaging/send_message.test.ts +0 -136
- package/framework-mcp/tests/tools/quality/check_lint.test.ts +0 -46
- package/framework-mcp/tests/tools/shell/run_command.test.ts +0 -55
- package/framework-mcp/tsconfig.json +0 -14
- package/src/cli/commands/init/scaffold-docs.ts +0 -44
- package/src/cli/commands/log.ts +0 -37
- package/src/cli/commands/orchestrate.ts +0 -450
- package/src/cli/commands/plan.ts +0 -113
- package/src/cli/commands/status.ts +0 -44
- package/src/cli/commands/trace.ts +0 -31
- package/src/modules/adapters/definitions.ts +0 -171
- package/src/modules/adapters/registry.ts +0 -27
- package/src/modules/adapters/types.ts +0 -16
- package/src/modules/agents/types.ts +0 -37
- package/src/schema/agent-lifecycle-schema.json +0 -59
- package/src/shared/types.ts +0 -20
- /package/{src/contracts/index.ts → framework-mcp/dist/src/contracts/index.js} +0 -0
package/{src/modules/agents/definitions.ts → framework-mcp/dist/src/modules/agents/definitions.js}
RENAMED
|
@@ -13,13 +13,11 @@
|
|
|
13
13
|
// Custom fields (capability, tags, tier) are Atabey-internal metadata and
|
|
14
14
|
// must NOT appear in any platform frontmatter.
|
|
15
15
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
16
|
-
|
|
17
16
|
import fs from "fs";
|
|
18
17
|
import path from "path";
|
|
19
|
-
import { AgentDefinition } from "./types.js";
|
|
20
18
|
import { getPackageRoot } from "../../cli/utils/pkg.js";
|
|
21
19
|
import { CURSOR_AGENT_GLOBS } from "../../shared/constants.js";
|
|
22
|
-
|
|
20
|
+
import { getFrameworkDir } from "../../cli/utils/memory.js";
|
|
23
21
|
// Import individual agent definitions
|
|
24
22
|
import { manager } from "./registry/manager.js";
|
|
25
23
|
import { security } from "./registry/security.js";
|
|
@@ -34,8 +32,19 @@ import { analyst } from "./registry/analyst.js";
|
|
|
34
32
|
import { native } from "./registry/native.js";
|
|
35
33
|
import { explorer } from "./registry/explorer.js";
|
|
36
34
|
import { git } from "./registry/git.js";
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Sanitizes description or displayName strings before embedding them into frontmatter.
|
|
37
|
+
* Replaces delimiters (like ---), strips newlines to avoid formatting breakage, and trims.
|
|
38
|
+
*/
|
|
39
|
+
export function sanitizeFrontmatterText(text) {
|
|
40
|
+
if (!text)
|
|
41
|
+
return "";
|
|
42
|
+
return text
|
|
43
|
+
.replace(/---/g, "- - -") // Prevent frontmatter boundary injection
|
|
44
|
+
.replace(/\r?\n/g, " ") // Replace line breaks with spaces
|
|
45
|
+
.trim();
|
|
46
|
+
}
|
|
47
|
+
export const ALL_AGENTS = [
|
|
39
48
|
manager,
|
|
40
49
|
security,
|
|
41
50
|
architect,
|
|
@@ -50,45 +59,42 @@ export const ALL_AGENTS: AgentDefinition[] = [
|
|
|
50
59
|
explorer,
|
|
51
60
|
git
|
|
52
61
|
];
|
|
53
|
-
|
|
54
62
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
55
63
|
// Tool Maps — Internal tool names → platform-native tool identifiers
|
|
56
64
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
57
|
-
|
|
58
65
|
/**
|
|
59
66
|
* Claude Code built-in tool names (case-sensitive).
|
|
60
67
|
* Reference: https://docs.anthropic.com/en/docs/claude-code/sub-agents
|
|
61
68
|
*/
|
|
62
|
-
const CLAUDE_TOOL_MAP
|
|
63
|
-
read_file:
|
|
64
|
-
write_file:
|
|
65
|
-
replace_text:
|
|
66
|
-
batch_surgical_edit:
|
|
67
|
-
patch_file:
|
|
68
|
-
list_dir:
|
|
69
|
-
grep_search:
|
|
70
|
-
run_shell_command:
|
|
71
|
-
view_file:
|
|
72
|
-
run_tests:
|
|
73
|
-
log_agent_action:
|
|
74
|
-
send_agent_message:
|
|
75
|
-
orchestrate_loop:
|
|
76
|
-
get_project_map:
|
|
77
|
-
get_project_gaps:
|
|
78
|
-
get_memory_insights:
|
|
79
|
-
read_project_memory:
|
|
69
|
+
export const CLAUDE_TOOL_MAP = {
|
|
70
|
+
read_file: "Read",
|
|
71
|
+
write_file: "Write",
|
|
72
|
+
replace_text: "Edit",
|
|
73
|
+
batch_surgical_edit: "MultiEdit",
|
|
74
|
+
patch_file: "Edit",
|
|
75
|
+
list_dir: "LS",
|
|
76
|
+
grep_search: "Grep",
|
|
77
|
+
run_shell_command: "Bash",
|
|
78
|
+
view_file: "Read",
|
|
79
|
+
run_tests: "Bash",
|
|
80
|
+
log_agent_action: "Write",
|
|
81
|
+
send_agent_message: "Task",
|
|
82
|
+
orchestrate_loop: "Task",
|
|
83
|
+
get_project_map: "Bash",
|
|
84
|
+
get_project_gaps: "Bash",
|
|
85
|
+
get_memory_insights: "Read",
|
|
86
|
+
read_project_memory: "Read",
|
|
80
87
|
update_project_memory: "Write",
|
|
81
|
-
audit_dependencies:
|
|
82
|
-
get_framework_status:
|
|
83
|
-
get_system_health:
|
|
84
|
-
check_active_ports:
|
|
85
|
-
update_contract_hash:
|
|
86
|
-
acquire_lock:
|
|
87
|
-
release_lock:
|
|
88
|
-
register_agent:
|
|
89
|
-
check_lint:
|
|
88
|
+
audit_dependencies: "Bash",
|
|
89
|
+
get_framework_status: "Bash",
|
|
90
|
+
get_system_health: "Bash",
|
|
91
|
+
check_active_ports: "Bash",
|
|
92
|
+
update_contract_hash: "Write",
|
|
93
|
+
acquire_lock: "Write",
|
|
94
|
+
release_lock: "Write",
|
|
95
|
+
register_agent: "Write",
|
|
96
|
+
check_lint: "Bash",
|
|
90
97
|
};
|
|
91
|
-
|
|
92
98
|
/**
|
|
93
99
|
* Gemini CLI built-in tool names (canonical names validated by Gemini CLI agent schema).
|
|
94
100
|
* Reference: https://github.com/google-gemini/gemini-cli
|
|
@@ -97,68 +103,61 @@ const CLAUDE_TOOL_MAP: Record<string, string> = {
|
|
|
97
103
|
* read_file, write_file, replace, grep_search, glob,
|
|
98
104
|
* list_directory, run_shell_command
|
|
99
105
|
*/
|
|
100
|
-
const GEMINI_TOOL_MAP
|
|
101
|
-
read_file:
|
|
102
|
-
write_file:
|
|
103
|
-
replace_text:
|
|
104
|
-
batch_surgical_edit:
|
|
105
|
-
patch_file:
|
|
106
|
-
list_dir:
|
|
107
|
-
grep_search:
|
|
108
|
-
run_shell_command:
|
|
109
|
-
view_file:
|
|
110
|
-
run_tests:
|
|
111
|
-
log_agent_action:
|
|
112
|
-
send_agent_message:
|
|
113
|
-
orchestrate_loop:
|
|
114
|
-
get_project_map:
|
|
115
|
-
get_project_gaps:
|
|
116
|
-
get_memory_insights:
|
|
117
|
-
read_project_memory:
|
|
106
|
+
export const GEMINI_TOOL_MAP = {
|
|
107
|
+
read_file: "read_file",
|
|
108
|
+
write_file: "write_file",
|
|
109
|
+
replace_text: "replace", // [OK] NOT replace_in_file
|
|
110
|
+
batch_surgical_edit: "replace", // [OK] NOT replace_in_file
|
|
111
|
+
patch_file: "replace", // [OK] NOT replace_in_file
|
|
112
|
+
list_dir: "list_directory",
|
|
113
|
+
grep_search: "grep_search", // [OK] NOT search_file_content
|
|
114
|
+
run_shell_command: "run_shell_command",
|
|
115
|
+
view_file: "read_file",
|
|
116
|
+
run_tests: "run_shell_command",
|
|
117
|
+
log_agent_action: "write_file",
|
|
118
|
+
send_agent_message: "run_shell_command",
|
|
119
|
+
orchestrate_loop: "run_shell_command",
|
|
120
|
+
get_project_map: "run_shell_command",
|
|
121
|
+
get_project_gaps: "run_shell_command",
|
|
122
|
+
get_memory_insights: "read_file",
|
|
123
|
+
read_project_memory: "read_file",
|
|
118
124
|
update_project_memory: "write_file",
|
|
119
|
-
audit_dependencies:
|
|
120
|
-
get_framework_status:
|
|
121
|
-
get_system_health:
|
|
122
|
-
check_active_ports:
|
|
123
|
-
update_contract_hash:
|
|
124
|
-
acquire_lock:
|
|
125
|
-
release_lock:
|
|
126
|
-
register_agent:
|
|
127
|
-
check_lint:
|
|
125
|
+
audit_dependencies: "run_shell_command",
|
|
126
|
+
get_framework_status: "run_shell_command",
|
|
127
|
+
get_system_health: "run_shell_command",
|
|
128
|
+
check_active_ports: "run_shell_command",
|
|
129
|
+
update_contract_hash: "write_file",
|
|
130
|
+
acquire_lock: "write_file",
|
|
131
|
+
release_lock: "write_file",
|
|
132
|
+
register_agent: "write_file",
|
|
133
|
+
check_lint: "run_shell_command",
|
|
128
134
|
};
|
|
129
|
-
|
|
130
135
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
131
136
|
// Model Resolution
|
|
132
137
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
133
|
-
|
|
134
138
|
/**
|
|
135
139
|
* Assigns the appropriate model based on capability score.
|
|
136
140
|
* Only valid, real model identifiers are used here.
|
|
137
141
|
*/
|
|
138
|
-
function resolveModel(
|
|
139
|
-
cap: number,
|
|
140
|
-
platform: "claude-code" | "gemini-cli" | "antigravity" | "codex-cli"
|
|
141
|
-
): string {
|
|
142
|
+
function resolveModel(cap, platform) {
|
|
142
143
|
if (platform === "claude-code") {
|
|
143
144
|
// Verified Claude model names as of 2025-06
|
|
144
145
|
return cap === 10 ? "claude-opus-4-5"
|
|
145
|
-
: cap === 9
|
|
146
|
-
:
|
|
146
|
+
: cap === 9 ? "claude-sonnet-4-5"
|
|
147
|
+
: "claude-haiku-3-5";
|
|
147
148
|
}
|
|
148
149
|
if (platform === "gemini-cli" || platform === "antigravity") {
|
|
149
150
|
// Verified Gemini model names as of 2025-06
|
|
150
151
|
return cap === 10 ? "gemini-2.5-pro"
|
|
151
|
-
: cap === 9
|
|
152
|
-
:
|
|
152
|
+
: cap === 9 ? "gemini-2.5-flash"
|
|
153
|
+
: "gemini-2.5-flash-lite";
|
|
153
154
|
}
|
|
154
155
|
// codex-cli / OpenAI
|
|
155
156
|
return cap === 10 ? "o3" : "o4-mini";
|
|
156
157
|
}
|
|
157
|
-
|
|
158
158
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
159
159
|
// System Prompt Builder
|
|
160
160
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
161
|
-
|
|
162
161
|
/**
|
|
163
162
|
* Builds a rich, enterprise-grade system prompt from structured instructions.
|
|
164
163
|
* Embeds governance document contents inline for agents that have knowledgeFiles.
|
|
@@ -168,22 +167,16 @@ function resolveModel(
|
|
|
168
167
|
* frontmatter validators may misinterpret HTML comments in the document body
|
|
169
168
|
* as unrecognized YAML keys and reject the agent file entirely.
|
|
170
169
|
*/
|
|
171
|
-
function buildSystemPrompt(
|
|
172
|
-
ag: AgentDefinition,
|
|
173
|
-
baseKnowledgeDir: string = path.join(getPackageRoot(), "templates/standards"),
|
|
174
|
-
stripMetaComments = false,
|
|
175
|
-
paths: Record<string, string> = { backend: "apps/backend", frontend: "apps/web", mobile: "apps/mobile", docs: "docs" },
|
|
176
|
-
backendLanguage: string = "Node.js (TypeScript)"
|
|
177
|
-
): string {
|
|
170
|
+
function buildSystemPrompt(ag, baseKnowledgeDir = path.join(getPackageRoot(), "templates/standards"), stripMetaComments = false, paths = { backend: "apps/backend", frontend: "apps/web", mobile: "apps/mobile", docs: "docs" }, backendLanguage = "Node.js (TypeScript)") {
|
|
178
171
|
const metaHeader = stripMetaComments ? [] : [
|
|
179
172
|
`<!-- name: ${ag.name} -->`,
|
|
180
173
|
`<!-- capability: ${ag.capability} -->`,
|
|
181
174
|
`<!-- tags: ${JSON.stringify(ag.tags)} -->`,
|
|
182
175
|
"",
|
|
183
176
|
];
|
|
184
|
-
const lines
|
|
177
|
+
const lines = [
|
|
185
178
|
...metaHeader,
|
|
186
|
-
`#
|
|
179
|
+
`# [ATABEY] ${ag.displayName} — Agent Atabey`,
|
|
187
180
|
"",
|
|
188
181
|
"## Identity",
|
|
189
182
|
ag.instructions.identity,
|
|
@@ -197,11 +190,11 @@ function buildSystemPrompt(
|
|
|
197
190
|
"",
|
|
198
191
|
"## Project Structure & Technology",
|
|
199
192
|
"This project uses the following stack and directory structure:",
|
|
200
|
-
`- **Backend Language:**
|
|
201
|
-
`- **Backend Path:**
|
|
202
|
-
`- **Frontend Path:**
|
|
203
|
-
`- **Mobile Path:**
|
|
204
|
-
`- **Documentation:**
|
|
193
|
+
`- **Backend Language:** ${backendLanguage}`,
|
|
194
|
+
`- **Backend Path:** ${paths.backend}`,
|
|
195
|
+
`- **Frontend Path:** ${paths.frontend}`,
|
|
196
|
+
`- **Mobile Path:** ${paths.mobile}`,
|
|
197
|
+
`- **Documentation:** ${paths.docs}`,
|
|
205
198
|
"",
|
|
206
199
|
"## Chain of Thought Protocol",
|
|
207
200
|
"> Follow these steps in strict order for every task:",
|
|
@@ -211,7 +204,7 @@ function buildSystemPrompt(
|
|
|
211
204
|
"## Discipline Rules",
|
|
212
205
|
"> These are **non-negotiable** governance mandates. Violating any rule triggers an immediate task freeze.",
|
|
213
206
|
"",
|
|
214
|
-
...ag.instructions.rules.map((r
|
|
207
|
+
...ag.instructions.rules.map((r, i) => `${i + 1}. ${r}`),
|
|
215
208
|
"",
|
|
216
209
|
"## Enterprise Context",
|
|
217
210
|
"You are operating within a **multi-agent enterprise system** governed by the Agent Atabey framework.",
|
|
@@ -220,110 +213,130 @@ function buildSystemPrompt(
|
|
|
220
213
|
"- Always read PROJECT_MEMORY.md at session start for full context.",
|
|
221
214
|
"- Always pass the active **Trace ID** in all agent-to-agent messages.",
|
|
222
215
|
"- Never perform irreversible operations (schema drops, bulk deletes) without @manager approval.",
|
|
223
|
-
"- Prefer surgical edits (
|
|
216
|
+
"- Prefer surgical edits (replace_text, patch_file) over full file rewrites.",
|
|
224
217
|
"- Escalate ambiguity to @manager instead of guessing.",
|
|
225
|
-
`- Ensure all development happens exclusively inside
|
|
218
|
+
`- Ensure all development happens exclusively inside ${paths.backend}, ${paths.frontend}, or ${paths.mobile}.`,
|
|
226
219
|
];
|
|
227
|
-
|
|
228
220
|
if (ag.instructions.knowledgeFiles?.length) {
|
|
229
221
|
lines.push("", "## Governance Standards (Required Reading)");
|
|
230
222
|
lines.push("> Read and internalize the following standards before acting on any task.");
|
|
231
|
-
ag.instructions.knowledgeFiles.forEach((f
|
|
223
|
+
ag.instructions.knowledgeFiles.forEach((f) => {
|
|
232
224
|
const filePath = path.join(baseKnowledgeDir, f);
|
|
233
225
|
if (fs.existsSync(filePath)) {
|
|
234
226
|
lines.push("", `### 📘 ${f}`, "", fs.readFileSync(filePath, "utf8").trim());
|
|
235
|
-
}
|
|
236
|
-
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
lines.push("", `### 📘 ${f}`, `> [WARN] File not found at ${filePath}. Run atabey init to scaffold standards.`);
|
|
237
230
|
}
|
|
238
231
|
});
|
|
239
232
|
}
|
|
240
|
-
|
|
233
|
+
// Read learned conventions from local memory if exist (Memory V2)
|
|
234
|
+
const fDir = getFrameworkDir();
|
|
235
|
+
const specialtyFile = path.join(fDir, "memory", "specialties", `${ag.name}.md`);
|
|
236
|
+
if (fs.existsSync(specialtyFile)) {
|
|
237
|
+
try {
|
|
238
|
+
const learnedContent = fs.readFileSync(specialtyFile, "utf8").trim();
|
|
239
|
+
if (learnedContent) {
|
|
240
|
+
lines.push("", "## Learned Conventions (Project-Specific Experience)", "> These are lessons learned from past task executions in this project. Adhere to them strictly.", "", learnedContent);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
catch {
|
|
244
|
+
// ignore
|
|
245
|
+
}
|
|
246
|
+
}
|
|
241
247
|
return lines.join("\n");
|
|
242
248
|
}
|
|
243
|
-
|
|
244
249
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
245
250
|
// CLAUDE CODE → .claude/agents/{name}.md
|
|
246
251
|
// Valid fields: name, description, model, tools, color
|
|
247
252
|
// Ref: https://docs.anthropic.com/en/docs/claude-code/sub-agents
|
|
248
253
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const tools = [...new Set(ag.tools.map((t: string) => CLAUDE_TOOL_MAP[t] ?? t))];
|
|
254
|
+
export function toClaudeCodeMd(ag, baseKnowledgeDir, paths, backendLanguage) {
|
|
255
|
+
const tools = [...new Set(ag.tools.map((t) => CLAUDE_TOOL_MAP[t] ?? t))];
|
|
252
256
|
const model = resolveModel(ag.capability, "claude-code");
|
|
253
257
|
const color = ag.tier === "supreme" ? "purple"
|
|
254
|
-
: ag.tier === "recon"
|
|
255
|
-
:
|
|
256
|
-
|
|
258
|
+
: ag.tier === "recon" ? "gray"
|
|
259
|
+
: "blue";
|
|
260
|
+
const cleanDesc = sanitizeFrontmatterText(ag.description);
|
|
257
261
|
// Only officially supported frontmatter fields
|
|
258
262
|
const frontmatter = [
|
|
259
263
|
"---",
|
|
260
264
|
`name: ${ag.name}`,
|
|
261
265
|
"description: >-",
|
|
262
|
-
` ${
|
|
266
|
+
` ${cleanDesc} Invoke proactively for ${ag.role.toLowerCase()} tasks in enterprise monorepo projects.`,
|
|
263
267
|
`model: ${model}`,
|
|
264
268
|
`tools: [${tools.map(t => `"${t}"`).join(", ")}]`,
|
|
265
269
|
`color: ${color}`,
|
|
266
270
|
"---",
|
|
267
271
|
].join("\n");
|
|
268
|
-
|
|
269
272
|
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths, backendLanguage)}`;
|
|
270
273
|
}
|
|
271
|
-
|
|
272
274
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
273
275
|
// GEMINI CLI → .gemini/agents/{name}.md
|
|
274
276
|
// Valid fields: name, description, model, tools (YAML list)
|
|
275
277
|
// Ref: https://ai.google.dev/gemini-api/docs/agents
|
|
276
278
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
const tools = [...new Set(ag.tools.map((t: string) => GEMINI_TOOL_MAP[t] ?? t))];
|
|
279
|
+
export function toGeminiCliMd(ag, baseKnowledgeDir, paths, backendLanguage) {
|
|
280
|
+
const tools = [...new Set(ag.tools.map((t) => GEMINI_TOOL_MAP[t] ?? t))];
|
|
280
281
|
const model = resolveModel(ag.capability, "gemini-cli");
|
|
281
|
-
|
|
282
|
+
const cleanDesc = sanitizeFrontmatterText(ag.description);
|
|
282
283
|
const frontmatter = [
|
|
283
284
|
"---",
|
|
284
285
|
`name: ${ag.name}`,
|
|
285
286
|
"description: >-",
|
|
286
|
-
` ${
|
|
287
|
+
` ${cleanDesc} Use for ${ag.role.toLowerCase()} tasks.`,
|
|
287
288
|
`model: ${model}`,
|
|
288
289
|
"tools:",
|
|
289
290
|
...tools.map(t => ` - ${t}`),
|
|
290
291
|
"---",
|
|
291
292
|
].join("\n");
|
|
292
|
-
|
|
293
293
|
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths, backendLanguage);
|
|
294
|
-
|
|
295
294
|
const metaFooter = [
|
|
296
295
|
"",
|
|
297
296
|
`<!-- name: ${ag.name} -->`,
|
|
298
297
|
`<!-- capability: ${ag.capability} -->`,
|
|
299
298
|
`<!-- tags: ${JSON.stringify(ag.tags)} -->`,
|
|
300
299
|
].join("\n");
|
|
301
|
-
|
|
302
300
|
return `${frontmatter}\n\n${body}${metaFooter}`;
|
|
303
301
|
}
|
|
304
|
-
|
|
305
302
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
306
303
|
// ANTIGRAVITY CLI → .agents/{name}/agent.json
|
|
307
304
|
// Spec: Antigravity customAgentSpec JSON schema
|
|
308
305
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
309
|
-
|
|
310
|
-
export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage: string = "Node.js (TypeScript)"): string {
|
|
306
|
+
export function toAntigravityJson(ag, baseKnowledgeDir, paths, backendLanguage = "Node.js (TypeScript)") {
|
|
311
307
|
const knowledgeBase = baseKnowledgeDir ?? path.join(getPackageRoot(), "templates/standards");
|
|
312
|
-
|
|
313
308
|
// Embed actual file contents so the agent can read governance docs
|
|
314
|
-
const knowledgeSections = (ag.instructions.knowledgeFiles ?? []).map((f
|
|
309
|
+
const knowledgeSections = (ag.instructions.knowledgeFiles ?? []).map((f) => {
|
|
315
310
|
const filePath = path.join(knowledgeBase, f);
|
|
316
311
|
const content = fs.existsSync(filePath)
|
|
317
312
|
? fs.readFileSync(filePath, "utf8").trim()
|
|
318
313
|
: `(${f} — file not found at build time)`;
|
|
319
314
|
return { title: `Required Reading — ${f}`, content };
|
|
320
315
|
});
|
|
321
|
-
|
|
316
|
+
// Read learned conventions from local memory if exist (Memory V2)
|
|
317
|
+
const fDir = getFrameworkDir();
|
|
318
|
+
const specialtyFile = path.join(fDir, "memory", "specialties", `${ag.name}.md`);
|
|
319
|
+
const specialtySections = [];
|
|
320
|
+
if (fs.existsSync(specialtyFile)) {
|
|
321
|
+
try {
|
|
322
|
+
const learnedContent = fs.readFileSync(specialtyFile, "utf8").trim();
|
|
323
|
+
if (learnedContent) {
|
|
324
|
+
specialtySections.push({
|
|
325
|
+
title: "Learned Conventions (Project-Specific Experience)",
|
|
326
|
+
content: learnedContent
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
catch {
|
|
331
|
+
// ignore
|
|
332
|
+
}
|
|
333
|
+
}
|
|
322
334
|
const payload = {
|
|
323
335
|
name: ag.name,
|
|
324
336
|
displayName: ag.displayName,
|
|
325
337
|
description: ag.description,
|
|
326
338
|
hidden: false,
|
|
339
|
+
schemaVersion: "2.0",
|
|
327
340
|
customAgentSpec: {
|
|
328
341
|
customAgent: {
|
|
329
342
|
systemPromptSections: [
|
|
@@ -348,7 +361,7 @@ export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string
|
|
|
348
361
|
},
|
|
349
362
|
{
|
|
350
363
|
title: "Discipline Rules",
|
|
351
|
-
content: ag.instructions.rules.map((r
|
|
364
|
+
content: ag.instructions.rules.map((r, i) => `${i + 1}. ${r}`).join("\n"),
|
|
352
365
|
},
|
|
353
366
|
{
|
|
354
367
|
title: "Enterprise Context",
|
|
@@ -363,6 +376,7 @@ export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string
|
|
|
363
376
|
].join("\n"),
|
|
364
377
|
},
|
|
365
378
|
...knowledgeSections,
|
|
379
|
+
...specialtySections,
|
|
366
380
|
],
|
|
367
381
|
toolNames: ag.tools,
|
|
368
382
|
},
|
|
@@ -370,91 +384,74 @@ export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string
|
|
|
370
384
|
};
|
|
371
385
|
return JSON.stringify(payload, null, 2);
|
|
372
386
|
}
|
|
373
|
-
|
|
374
387
|
/** Alias for Antigravity JSON export used by CLI */
|
|
375
388
|
export const buildAgentJson = toAntigravityJson;
|
|
376
|
-
|
|
377
389
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
378
390
|
// CODEX CLI (OpenAI) → .agents/{name}.md
|
|
379
391
|
// Valid fields: agent-type, display-name, when-to-use, model, allowed-tools
|
|
380
392
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
381
|
-
|
|
382
|
-
export function toCodexMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
393
|
+
export function toCodexMd(ag, baseKnowledgeDir, paths, backendLanguage) {
|
|
383
394
|
const model = resolveModel(ag.capability, "codex-cli");
|
|
384
|
-
const tools = [...new Set(ag.tools.map((t
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
395
|
+
const tools = [...new Set(ag.tools.map((t) => {
|
|
396
|
+
if (["read_file", "view_file", "list_dir", "grep_search", "get_memory_insights", "read_project_memory", "get_project_map", "get_project_gaps", "get_framework_status"].includes(t))
|
|
397
|
+
return "read";
|
|
398
|
+
if (["write_file", "replace_text", "batch_surgical_edit", "patch_file", "update_project_memory", "log_agent_action", "acquire_lock", "release_lock", "register_agent", "update_contract_hash"].includes(t))
|
|
399
|
+
return "write";
|
|
400
|
+
return "shell";
|
|
401
|
+
}))];
|
|
402
|
+
const cleanDesc = sanitizeFrontmatterText(ag.description);
|
|
403
|
+
const cleanDisplayName = sanitizeFrontmatterText(ag.displayName).replace(/"/g, "\\\"");
|
|
390
404
|
const frontmatter = [
|
|
391
405
|
"---",
|
|
392
406
|
`agent-type: "${ag.name}"`,
|
|
393
|
-
`display-name: "${
|
|
407
|
+
`display-name: "${cleanDisplayName}"`,
|
|
394
408
|
"when-to-use: >-",
|
|
395
|
-
` Invoke for ${ag.role.toLowerCase()} tasks. ${
|
|
409
|
+
` Invoke for ${ag.role.toLowerCase()} tasks. ${cleanDesc}`,
|
|
396
410
|
`model: ${model}`,
|
|
397
411
|
`allowed-tools: [${tools.map(t => `"${t}"`).join(", ")}]`,
|
|
398
412
|
"---",
|
|
399
413
|
].join("\n");
|
|
400
|
-
|
|
401
414
|
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths, backendLanguage);
|
|
402
|
-
|
|
403
415
|
const metaFooter = [
|
|
404
416
|
"",
|
|
405
417
|
`<!-- name: ${ag.name} -->`,
|
|
406
418
|
`<!-- capability: ${ag.capability} -->`,
|
|
407
419
|
`<!-- tags: ${JSON.stringify(ag.tags)} -->`,
|
|
408
420
|
].join("\n");
|
|
409
|
-
|
|
410
421
|
return `${frontmatter}\n\n${body}${metaFooter}`;
|
|
411
422
|
}
|
|
412
|
-
|
|
413
423
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
414
424
|
// CURSOR IDE → .cursor/rules/{name}.mdc
|
|
415
425
|
// Valid fields: description, globs, alwaysApply
|
|
416
426
|
// Ref: https://docs.cursor.com/context/rules
|
|
417
427
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
418
|
-
|
|
419
|
-
export function toCursorMdc(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
428
|
+
export function toCursorMdc(ag, baseKnowledgeDir, paths, backendLanguage) {
|
|
420
429
|
const glob = CURSOR_AGENT_GLOBS[ag.name] || "**/*";
|
|
430
|
+
const cleanDesc = sanitizeFrontmatterText(`${ag.displayName} — ${ag.description}`);
|
|
431
|
+
const safeDesc = cleanDesc.slice(0, 120).replace(/"/g, "\\\"");
|
|
421
432
|
// Only officially supported Cursor MDC frontmatter fields
|
|
422
433
|
const frontmatter = [
|
|
423
434
|
"---",
|
|
424
|
-
`description: "${
|
|
425
|
-
`globs: ${glob}`,
|
|
435
|
+
`description: "${safeDesc}"`,
|
|
436
|
+
`globs: "${glob}"`,
|
|
426
437
|
"alwaysApply: false",
|
|
427
438
|
"---",
|
|
428
439
|
].join("\n");
|
|
429
|
-
|
|
430
440
|
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths, backendLanguage)}`;
|
|
431
441
|
}
|
|
432
|
-
|
|
433
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
434
|
-
// Batch export
|
|
435
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
436
|
-
|
|
437
|
-
export type ExportTarget = "claude-code" | "gemini-cli" | "antigravity" | "codex-cli" | "cursor";
|
|
438
|
-
|
|
439
|
-
export interface ExportedFile {
|
|
440
|
-
path: string;
|
|
441
|
-
content: string;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
export function exportAllAgents(target: ExportTarget, paths?: Record<string, string>, backendLanguage?: string): ExportedFile[] {
|
|
442
|
+
export function exportAllAgents(target, paths, backendLanguage) {
|
|
445
443
|
return ALL_AGENTS.map(ag => {
|
|
446
444
|
switch (target) {
|
|
447
445
|
case "claude-code":
|
|
448
|
-
return { path: `.claude/agents/${ag.name}.md`,
|
|
446
|
+
return { path: `.claude/agents/${ag.name}.md`, content: toClaudeCodeMd(ag, undefined, paths, backendLanguage) };
|
|
449
447
|
case "gemini-cli":
|
|
450
|
-
return { path: `.gemini/agents/${ag.name}.md`,
|
|
448
|
+
return { path: `.gemini/agents/${ag.name}.md`, content: toGeminiCliMd(ag, undefined, paths, backendLanguage) };
|
|
451
449
|
case "antigravity":
|
|
452
|
-
return { path: `.agents/${ag.name}/agent.json`,
|
|
450
|
+
return { path: `.agents/${ag.name}/agent.json`, content: toAntigravityJson(ag, undefined, paths, backendLanguage) };
|
|
453
451
|
case "codex-cli":
|
|
454
|
-
return { path: `.agents/${ag.name}.md`,
|
|
452
|
+
return { path: `.agents/${ag.name}.md`, content: toCodexMd(ag, undefined, paths, backendLanguage) };
|
|
455
453
|
case "cursor":
|
|
456
|
-
return { path: `.cursor/rules/${ag.name}.mdc`,
|
|
454
|
+
return { path: `.cursor/rules/${ag.name}.mdc`, content: toCursorMdc(ag, undefined, paths, backendLanguage) };
|
|
457
455
|
}
|
|
458
456
|
});
|
|
459
457
|
}
|
|
460
|
-
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
|
|
4
|
-
|
|
5
|
-
export const analyst: AgentDefinition = {
|
|
1
|
+
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json";
|
|
2
|
+
export const analyst = {
|
|
6
3
|
name: "analyst",
|
|
7
4
|
displayName: "Business Analyst",
|
|
8
5
|
role: "Strategy Analysis",
|
|
9
|
-
description:
|
|
10
|
-
|
|
11
|
-
"Audits truth and contracts within the Army.",
|
|
6
|
+
description: "Specs verification and Contract Audit specialist. " +
|
|
7
|
+
"Audits truth and contracts within the Army.",
|
|
12
8
|
capability: 9,
|
|
13
9
|
tier: "recon",
|
|
14
10
|
tags: ["core", "strategy"],
|
|
@@ -26,13 +22,12 @@ export const analyst: AgentDefinition = {
|
|
|
26
22
|
],
|
|
27
23
|
instructions: {
|
|
28
24
|
identity: "Strategy Analyst and Contract-First Compliance Auditor",
|
|
29
|
-
mission:
|
|
30
|
-
|
|
31
|
-
"contract before a single line of application code is written.",
|
|
25
|
+
mission: "Ensure every user requirement is accurately mapped to a typed API " +
|
|
26
|
+
"contract before a single line of application code is written.",
|
|
32
27
|
chainOfThought: "1. Analyze: Read the task, context, and relevant governance documents.\n" +
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
"2. Validate: Cross-reference with project rules, contracts, and architecture standards.\n" +
|
|
29
|
+
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
30
|
+
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
36
31
|
rules: [
|
|
37
32
|
"REQUIREMENTS MAPPING: Verify that all user requirements from docs/ correctly map to API schemas and types.",
|
|
38
33
|
"CONTRACT FIRST: Enforce the Contract-First model — no application code without a validated contract.",
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
|
|
4
|
-
|
|
5
|
-
export const architect: AgentDefinition = {
|
|
1
|
+
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json";
|
|
2
|
+
export const architect = {
|
|
6
3
|
name: "architect",
|
|
7
4
|
displayName: "Lead Architect",
|
|
8
5
|
role: "System Design",
|
|
9
|
-
description:
|
|
10
|
-
|
|
11
|
-
"Owns the Control Plane Governance & Locking discipline.",
|
|
6
|
+
description: "System Design, Contracts, and Core Architecture specialist. " +
|
|
7
|
+
"Owns the Control Plane Governance & Locking discipline.",
|
|
12
8
|
capability: 9,
|
|
13
9
|
tier: "core",
|
|
14
10
|
tags: ["core", "design"],
|
|
@@ -29,13 +25,12 @@ export const architect: AgentDefinition = {
|
|
|
29
25
|
],
|
|
30
26
|
instructions: {
|
|
31
27
|
identity: "System Architecture Designer and Contract Governance Owner",
|
|
32
|
-
mission:
|
|
33
|
-
|
|
34
|
-
"specialist can build on without ambiguity.",
|
|
28
|
+
mission: "Design a flawless, contract-first foundation that every other " +
|
|
29
|
+
"specialist can build on without ambiguity.",
|
|
35
30
|
chainOfThought: "1. Analyze: Read the task, context, and relevant governance documents.\n" +
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
"2. Validate: Cross-reference with project rules, contracts, and architecture standards.\n" +
|
|
32
|
+
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
33
|
+
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
39
34
|
rules: [
|
|
40
35
|
"CONTRACT FIRST: Read governance documents before designing any contract or interface.",
|
|
41
36
|
"TYPE SAFETY: Enforce strict typing across all boundaries — 'any' type is unconditionally forbidden.",
|