atabey 0.0.6 → 0.0.7
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.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 +1 -1
- 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 +5 -2
- package/dist/src/shared/constants.js +4 -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/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/package.json +5 -4
- 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/dist/constants.js +0 -64
- package/framework-mcp/dist/index.js +0 -120
- package/framework-mcp/dist/tools/control_plane/locking.js +0 -82
- package/framework-mcp/dist/tools/control_plane/registry.js +0 -34
- package/framework-mcp/dist/tools/definitions.js +0 -290
- package/framework-mcp/dist/tools/file_system/batch_surgical_edit.js +0 -59
- package/framework-mcp/dist/tools/file_system/patch_file.js +0 -29
- package/framework-mcp/dist/tools/file_system/read_file.js +0 -51
- package/framework-mcp/dist/tools/file_system/replace_text.js +0 -45
- package/framework-mcp/dist/tools/file_system/write_file.js +0 -38
- package/framework-mcp/dist/tools/framework/audit_deps.js +0 -41
- package/framework-mcp/dist/tools/framework/get_status.js +0 -5
- package/framework-mcp/dist/tools/framework/orchestrate.js +0 -5
- package/framework-mcp/dist/tools/framework/run_tests.js +0 -27
- package/framework-mcp/dist/tools/framework/update_contract_hash.js +0 -5
- package/framework-mcp/dist/tools/framework/update_memory.js +0 -8
- package/framework-mcp/dist/tools/index.js +0 -60
- package/framework-mcp/dist/tools/memory/get_insights.js +0 -34
- package/framework-mcp/dist/tools/memory/read_memory.js +0 -28
- package/framework-mcp/dist/tools/messaging/log_action.js +0 -22
- package/framework-mcp/dist/tools/messaging/send_message.js +0 -94
- package/framework-mcp/dist/tools/observability/check_ports.js +0 -26
- package/framework-mcp/dist/tools/observability/get_health.js +0 -19
- package/framework-mcp/dist/tools/quality/check_lint.js +0 -30
- package/framework-mcp/dist/tools/search/get_gaps.js +0 -48
- package/framework-mcp/dist/tools/search/get_map.js +0 -43
- package/framework-mcp/dist/tools/search/grep_search.js +0 -75
- package/framework-mcp/dist/tools/search/list_dir.js +0 -28
- package/framework-mcp/dist/tools/shell/run_command.js +0 -56
- package/framework-mcp/dist/utils/cli.js +0 -59
- package/framework-mcp/dist/utils/compliance.js +0 -78
- package/framework-mcp/dist/utils/fs.js +0 -44
- package/framework-mcp/dist/utils/metrics.js +0 -56
- package/framework-mcp/dist/utils/security.js +0 -60
- package/framework-mcp/package-lock.json +0 -1191
- package/framework-mcp/package.json +0 -29
- package/framework-mcp/src/constants.ts +0 -78
- package/framework-mcp/src/declarations.d.ts +0 -17
- package/framework-mcp/src/index.ts +0 -145
- package/framework-mcp/src/tools/control_plane/locking.ts +0 -89
- package/framework-mcp/src/tools/control_plane/registry.ts +0 -38
- package/framework-mcp/src/tools/definitions.ts +0 -292
- package/framework-mcp/src/tools/file_system/batch_surgical_edit.ts +0 -79
- package/framework-mcp/src/tools/file_system/patch_file.ts +0 -39
- package/framework-mcp/src/tools/file_system/read_file.ts +0 -58
- package/framework-mcp/src/tools/file_system/replace_text.ts +0 -54
- package/framework-mcp/src/tools/file_system/write_file.ts +0 -45
- package/framework-mcp/src/tools/framework/audit_deps.ts +0 -49
- package/framework-mcp/src/tools/framework/get_status.ts +0 -7
- package/framework-mcp/src/tools/framework/orchestrate.ts +0 -7
- package/framework-mcp/src/tools/framework/run_tests.ts +0 -30
- package/framework-mcp/src/tools/framework/update_contract_hash.ts +0 -7
- package/framework-mcp/src/tools/framework/update_memory.ts +0 -10
- package/framework-mcp/src/tools/index.ts +0 -64
- package/framework-mcp/src/tools/memory/get_insights.ts +0 -41
- package/framework-mcp/src/tools/memory/read_memory.ts +0 -31
- package/framework-mcp/src/tools/messaging/log_action.ts +0 -28
- package/framework-mcp/src/tools/messaging/send_message.ts +0 -97
- package/framework-mcp/src/tools/observability/check_ports.ts +0 -30
- package/framework-mcp/src/tools/observability/get_health.ts +0 -24
- package/framework-mcp/src/tools/quality/check_lint.ts +0 -36
- package/framework-mcp/src/tools/search/get_gaps.ts +0 -54
- package/framework-mcp/src/tools/search/get_map.ts +0 -48
- package/framework-mcp/src/tools/search/grep_search.ts +0 -75
- package/framework-mcp/src/tools/search/list_dir.ts +0 -34
- package/framework-mcp/src/tools/shell/run_command.ts +0 -66
- package/framework-mcp/src/tools/types.ts +0 -89
- package/framework-mcp/src/utils/cli.ts +0 -53
- package/framework-mcp/src/utils/compliance.ts +0 -95
- package/framework-mcp/src/utils/fs.ts +0 -45
- package/framework-mcp/src/utils/metrics.ts +0 -73
- package/framework-mcp/src/utils/security.ts +0 -66
- 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/adapters/core.ts +0 -91
- package/src/cli/adapters/index.ts +0 -5
- package/src/cli/adapters/paths.ts +0 -135
- package/src/cli/adapters/scaffold.ts +0 -95
- package/src/cli/adapters/utils.ts +0 -87
- package/src/cli/commands/approve.ts +0 -73
- package/src/cli/commands/check.ts +0 -188
- package/src/cli/commands/compliance.ts +0 -55
- package/src/cli/commands/contract.ts +0 -68
- package/src/cli/commands/explorer.ts +0 -45
- package/src/cli/commands/git.ts +0 -39
- package/src/cli/commands/init/scaffold-core.ts +0 -136
- package/src/cli/commands/init/scaffold-docs.ts +0 -44
- package/src/cli/commands/init/scaffold-ops.ts +0 -83
- package/src/cli/commands/init/scaffold-standards.ts +0 -67
- package/src/cli/commands/init.ts +0 -193
- package/src/cli/commands/knowledge.ts +0 -44
- package/src/cli/commands/lint.ts +0 -23
- package/src/cli/commands/log.ts +0 -37
- package/src/cli/commands/memory.ts +0 -6
- package/src/cli/commands/orchestrate.ts +0 -450
- package/src/cli/commands/plan.ts +0 -113
- package/src/cli/commands/script.ts +0 -20
- package/src/cli/commands/security.ts +0 -38
- package/src/cli/commands/status.ts +0 -44
- package/src/cli/commands/trace.ts +0 -31
- package/src/cli/index.ts +0 -322
- package/src/cli/shims.ts +0 -66
- package/src/cli/utils/claude.ts +0 -63
- package/src/cli/utils/compliance.ts +0 -191
- package/src/cli/utils/config-schema.ts +0 -48
- package/src/cli/utils/fs.ts +0 -170
- package/src/cli/utils/i18n.ts +0 -44
- package/src/cli/utils/memory.ts +0 -303
- package/src/cli/utils/pkg.ts +0 -317
- package/src/cli/utils/schemas.ts +0 -22
- package/src/cli/utils/string.ts +0 -55
- package/src/cli/utils/time.ts +0 -27
- package/src/cli/utils/ui.ts +0 -66
- package/src/contracts/index.ts +0 -1
- package/src/contracts/tasks.ts +0 -26
- package/src/modules/adapters/definitions.ts +0 -171
- package/src/modules/adapters/registry.ts +0 -27
- package/src/modules/adapters/shared.ts +0 -120
- package/src/modules/adapters/types.ts +0 -16
- package/src/modules/agents/definitions.ts +0 -460
- package/src/modules/agents/registry/analyst.ts +0 -44
- package/src/modules/agents/registry/architect.ts +0 -47
- package/src/modules/agents/registry/backend.ts +0 -46
- package/src/modules/agents/registry/database.ts +0 -43
- package/src/modules/agents/registry/devops.ts +0 -44
- package/src/modules/agents/registry/explorer.ts +0 -41
- package/src/modules/agents/registry/frontend.ts +0 -48
- package/src/modules/agents/registry/git.ts +0 -41
- package/src/modules/agents/registry/manager.ts +0 -58
- package/src/modules/agents/registry/mobile.ts +0 -44
- package/src/modules/agents/registry/native.ts +0 -44
- package/src/modules/agents/registry/quality.ts +0 -46
- package/src/modules/agents/registry/security.ts +0 -42
- package/src/modules/agents/types.ts +0 -37
- package/src/modules/skills/definitions.ts +0 -71
- package/src/schema/agent-lifecycle-schema.json +0 -59
- package/src/shared/constants.ts +0 -218
- package/src/shared/errors.ts +0 -75
- package/src/shared/fs.ts +0 -50
- package/src/shared/logger.ts +0 -139
- package/src/shared/types.ts +0 -20
- /package/{framework-mcp/dist/tools/types.js → dist/framework-mcp/tests/tools/file_system/compliance-risk.test.d.ts} +0 -0
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
-
// Atabey Army — Agent Registry
|
|
3
|
-
// Atabey Order v2 · Structured AgentDefinition schema
|
|
4
|
-
//
|
|
5
|
-
// VALID FRONTMATTER FIELDS per platform:
|
|
6
|
-
// ┌───────────────┬────────────────────────────────────────────────────────────┐
|
|
7
|
-
// │ gemini-cli │ name, description, model, tools (YAML list) │
|
|
8
|
-
// │ claude-code │ name, description, model, tools (inline array), color │
|
|
9
|
-
// │ cursor │ description, globs, alwaysApply │
|
|
10
|
-
// │ codex-cli │ agent-type, display-name, when-to-use, model, allowed-tools│
|
|
11
|
-
// │ antigravity │ JSON — customAgentSpec schema │
|
|
12
|
-
// └───────────────┴────────────────────────────────────────────────────────────┘
|
|
13
|
-
// Custom fields (capability, tags, tier) are Atabey-internal metadata and
|
|
14
|
-
// must NOT appear in any platform frontmatter.
|
|
15
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
16
|
-
|
|
17
|
-
import fs from "fs";
|
|
18
|
-
import path from "path";
|
|
19
|
-
import { AgentDefinition } from "./types.js";
|
|
20
|
-
import { getPackageRoot } from "../../cli/utils/pkg.js";
|
|
21
|
-
import { CURSOR_AGENT_GLOBS } from "../../shared/constants.js";
|
|
22
|
-
|
|
23
|
-
// Import individual agent definitions
|
|
24
|
-
import { manager } from "./registry/manager.js";
|
|
25
|
-
import { security } from "./registry/security.js";
|
|
26
|
-
import { architect } from "./registry/architect.js";
|
|
27
|
-
import { backend } from "./registry/backend.js";
|
|
28
|
-
import { frontend } from "./registry/frontend.js";
|
|
29
|
-
import { mobile } from "./registry/mobile.js";
|
|
30
|
-
import { quality } from "./registry/quality.js";
|
|
31
|
-
import { database } from "./registry/database.js";
|
|
32
|
-
import { devops } from "./registry/devops.js";
|
|
33
|
-
import { analyst } from "./registry/analyst.js";
|
|
34
|
-
import { native } from "./registry/native.js";
|
|
35
|
-
import { explorer } from "./registry/explorer.js";
|
|
36
|
-
import { git } from "./registry/git.js";
|
|
37
|
-
|
|
38
|
-
export const ALL_AGENTS: AgentDefinition[] = [
|
|
39
|
-
manager,
|
|
40
|
-
security,
|
|
41
|
-
architect,
|
|
42
|
-
backend,
|
|
43
|
-
frontend,
|
|
44
|
-
mobile,
|
|
45
|
-
quality,
|
|
46
|
-
database,
|
|
47
|
-
devops,
|
|
48
|
-
analyst,
|
|
49
|
-
native,
|
|
50
|
-
explorer,
|
|
51
|
-
git
|
|
52
|
-
];
|
|
53
|
-
|
|
54
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
55
|
-
// Tool Maps — Internal tool names → platform-native tool identifiers
|
|
56
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Claude Code built-in tool names (case-sensitive).
|
|
60
|
-
* Reference: https://docs.anthropic.com/en/docs/claude-code/sub-agents
|
|
61
|
-
*/
|
|
62
|
-
const CLAUDE_TOOL_MAP: Record<string, string> = {
|
|
63
|
-
read_file: "Read",
|
|
64
|
-
write_file: "Write",
|
|
65
|
-
replace_text: "Edit",
|
|
66
|
-
batch_surgical_edit: "MultiEdit",
|
|
67
|
-
patch_file: "Edit",
|
|
68
|
-
list_dir: "LS",
|
|
69
|
-
grep_search: "Grep",
|
|
70
|
-
run_shell_command: "Bash",
|
|
71
|
-
view_file: "Read",
|
|
72
|
-
run_tests: "Bash",
|
|
73
|
-
log_agent_action: "Write",
|
|
74
|
-
send_agent_message: "Task",
|
|
75
|
-
orchestrate_loop: "Task",
|
|
76
|
-
get_project_map: "Bash",
|
|
77
|
-
get_project_gaps: "Bash",
|
|
78
|
-
get_memory_insights: "Read",
|
|
79
|
-
read_project_memory: "Read",
|
|
80
|
-
update_project_memory: "Write",
|
|
81
|
-
audit_dependencies: "Bash",
|
|
82
|
-
get_framework_status: "Bash",
|
|
83
|
-
get_system_health: "Bash",
|
|
84
|
-
check_active_ports: "Bash",
|
|
85
|
-
update_contract_hash: "Write",
|
|
86
|
-
acquire_lock: "Write",
|
|
87
|
-
release_lock: "Write",
|
|
88
|
-
register_agent: "Write",
|
|
89
|
-
check_lint: "Bash",
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Gemini CLI built-in tool names (canonical names validated by Gemini CLI agent schema).
|
|
94
|
-
* Reference: https://github.com/google-gemini/gemini-cli
|
|
95
|
-
*
|
|
96
|
-
* Valid Gemini CLI tool names:
|
|
97
|
-
* read_file, write_file, replace, grep_search, glob,
|
|
98
|
-
* list_directory, run_shell_command
|
|
99
|
-
*/
|
|
100
|
-
const GEMINI_TOOL_MAP: Record<string, string> = {
|
|
101
|
-
read_file: "read_file",
|
|
102
|
-
write_file: "write_file",
|
|
103
|
-
replace_text: "replace", // ✅ NOT replace_in_file
|
|
104
|
-
batch_surgical_edit: "replace", // ✅ NOT replace_in_file
|
|
105
|
-
patch_file: "replace", // ✅ NOT replace_in_file
|
|
106
|
-
list_dir: "list_directory",
|
|
107
|
-
grep_search: "grep_search", // ✅ NOT search_file_content
|
|
108
|
-
run_shell_command: "run_shell_command",
|
|
109
|
-
view_file: "read_file",
|
|
110
|
-
run_tests: "run_shell_command",
|
|
111
|
-
log_agent_action: "write_file",
|
|
112
|
-
send_agent_message: "run_shell_command",
|
|
113
|
-
orchestrate_loop: "run_shell_command",
|
|
114
|
-
get_project_map: "run_shell_command",
|
|
115
|
-
get_project_gaps: "run_shell_command",
|
|
116
|
-
get_memory_insights: "read_file",
|
|
117
|
-
read_project_memory: "read_file",
|
|
118
|
-
update_project_memory: "write_file",
|
|
119
|
-
audit_dependencies: "run_shell_command",
|
|
120
|
-
get_framework_status: "run_shell_command",
|
|
121
|
-
get_system_health: "run_shell_command",
|
|
122
|
-
check_active_ports: "run_shell_command",
|
|
123
|
-
update_contract_hash: "write_file",
|
|
124
|
-
acquire_lock: "write_file",
|
|
125
|
-
release_lock: "write_file",
|
|
126
|
-
register_agent: "write_file",
|
|
127
|
-
check_lint: "run_shell_command",
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
131
|
-
// Model Resolution
|
|
132
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Assigns the appropriate model based on capability score.
|
|
136
|
-
* Only valid, real model identifiers are used here.
|
|
137
|
-
*/
|
|
138
|
-
function resolveModel(
|
|
139
|
-
cap: number,
|
|
140
|
-
platform: "claude-code" | "gemini-cli" | "antigravity" | "codex-cli"
|
|
141
|
-
): string {
|
|
142
|
-
if (platform === "claude-code") {
|
|
143
|
-
// Verified Claude model names as of 2025-06
|
|
144
|
-
return cap === 10 ? "claude-opus-4-5"
|
|
145
|
-
: cap === 9 ? "claude-sonnet-4-5"
|
|
146
|
-
: "claude-haiku-3-5";
|
|
147
|
-
}
|
|
148
|
-
if (platform === "gemini-cli" || platform === "antigravity") {
|
|
149
|
-
// Verified Gemini model names as of 2025-06
|
|
150
|
-
return cap === 10 ? "gemini-2.5-pro"
|
|
151
|
-
: cap === 9 ? "gemini-2.5-flash"
|
|
152
|
-
: "gemini-2.5-flash-lite";
|
|
153
|
-
}
|
|
154
|
-
// codex-cli / OpenAI
|
|
155
|
-
return cap === 10 ? "o3" : "o4-mini";
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
159
|
-
// System Prompt Builder
|
|
160
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Builds a rich, enterprise-grade system prompt from structured instructions.
|
|
164
|
-
* Embeds governance document contents inline for agents that have knowledgeFiles.
|
|
165
|
-
*
|
|
166
|
-
* @param stripMetaComments - When true, skips the HTML meta-comment header block
|
|
167
|
-
* (name/capability/tags). Set to true for Gemini CLI and Grok, whose strict
|
|
168
|
-
* frontmatter validators may misinterpret HTML comments in the document body
|
|
169
|
-
* as unrecognized YAML keys and reject the agent file entirely.
|
|
170
|
-
*/
|
|
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 {
|
|
178
|
-
const metaHeader = stripMetaComments ? [] : [
|
|
179
|
-
`<!-- name: ${ag.name} -->`,
|
|
180
|
-
`<!-- capability: ${ag.capability} -->`,
|
|
181
|
-
`<!-- tags: ${JSON.stringify(ag.tags)} -->`,
|
|
182
|
-
"",
|
|
183
|
-
];
|
|
184
|
-
const lines: string[] = [
|
|
185
|
-
...metaHeader,
|
|
186
|
-
`# 🎖️ ${ag.displayName} — Agent Atabey`,
|
|
187
|
-
"",
|
|
188
|
-
"## Identity",
|
|
189
|
-
ag.instructions.identity,
|
|
190
|
-
"",
|
|
191
|
-
"## Mission",
|
|
192
|
-
ag.instructions.mission,
|
|
193
|
-
"",
|
|
194
|
-
"## Role Scope",
|
|
195
|
-
`**Primary Role:** ${ag.role}`,
|
|
196
|
-
`**Authority Tier:** ${ag.tier} (Capability: ${ag.capability}/10)`,
|
|
197
|
-
"",
|
|
198
|
-
"## Project Structure & Technology",
|
|
199
|
-
"This project uses the following stack and directory structure:",
|
|
200
|
-
`- **Backend Language:** \`${backendLanguage}\``,
|
|
201
|
-
`- **Backend Path:** \`${paths.backend}\``,
|
|
202
|
-
`- **Frontend Path:** \`${paths.frontend}\``,
|
|
203
|
-
`- **Mobile Path:** \`${paths.mobile}\``,
|
|
204
|
-
`- **Documentation:** \`${paths.docs}\``,
|
|
205
|
-
"",
|
|
206
|
-
"## Chain of Thought Protocol",
|
|
207
|
-
"> Follow these steps in strict order for every task:",
|
|
208
|
-
"",
|
|
209
|
-
ag.instructions.chainOfThought,
|
|
210
|
-
"",
|
|
211
|
-
"## Discipline Rules",
|
|
212
|
-
"> These are **non-negotiable** governance mandates. Violating any rule triggers an immediate task freeze.",
|
|
213
|
-
"",
|
|
214
|
-
...ag.instructions.rules.map((r: string, i: number) => `${i + 1}. ${r}`),
|
|
215
|
-
"",
|
|
216
|
-
"## Enterprise Context",
|
|
217
|
-
"You are operating within a **multi-agent enterprise system** governed by the Agent Atabey framework.",
|
|
218
|
-
"All actions are traced, logged, and auditable. Every decision must be defensible and reversible.",
|
|
219
|
-
`- You are a specialist in **${backendLanguage}** development for backend tasks.`,
|
|
220
|
-
"- Always read PROJECT_MEMORY.md at session start for full context.",
|
|
221
|
-
"- Always pass the active **Trace ID** in all agent-to-agent messages.",
|
|
222
|
-
"- Never perform irreversible operations (schema drops, bulk deletes) without @manager approval.",
|
|
223
|
-
"- Prefer surgical edits (`replace_text`, `patch_file`) over full file rewrites.",
|
|
224
|
-
"- Escalate ambiguity to @manager instead of guessing.",
|
|
225
|
-
`- Ensure all development happens exclusively inside \`${paths.backend}\`, \`${paths.frontend}\`, or \`${paths.mobile}\`.`,
|
|
226
|
-
];
|
|
227
|
-
|
|
228
|
-
if (ag.instructions.knowledgeFiles?.length) {
|
|
229
|
-
lines.push("", "## Governance Standards (Required Reading)");
|
|
230
|
-
lines.push("> Read and internalize the following standards before acting on any task.");
|
|
231
|
-
ag.instructions.knowledgeFiles.forEach((f: string) => {
|
|
232
|
-
const filePath = path.join(baseKnowledgeDir, f);
|
|
233
|
-
if (fs.existsSync(filePath)) {
|
|
234
|
-
lines.push("", `### 📘 ${f}`, "", fs.readFileSync(filePath, "utf8").trim());
|
|
235
|
-
} else {
|
|
236
|
-
lines.push("", `### 📘 ${f}`, `> ⚠️ File not found at \`${filePath}\`. Run \`atabey init\` to scaffold standards.`);
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
return lines.join("\n");
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
245
|
-
// CLAUDE CODE → .claude/agents/{name}.md
|
|
246
|
-
// Valid fields: name, description, model, tools, color
|
|
247
|
-
// Ref: https://docs.anthropic.com/en/docs/claude-code/sub-agents
|
|
248
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
249
|
-
|
|
250
|
-
export function toClaudeCodeMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
251
|
-
const tools = [...new Set(ag.tools.map((t: string) => CLAUDE_TOOL_MAP[t] ?? t))];
|
|
252
|
-
const model = resolveModel(ag.capability, "claude-code");
|
|
253
|
-
const color = ag.tier === "supreme" ? "purple"
|
|
254
|
-
: ag.tier === "recon" ? "gray"
|
|
255
|
-
: "blue";
|
|
256
|
-
|
|
257
|
-
// Only officially supported frontmatter fields
|
|
258
|
-
const frontmatter = [
|
|
259
|
-
"---",
|
|
260
|
-
`name: ${ag.name}`,
|
|
261
|
-
"description: >-",
|
|
262
|
-
` ${ag.description} Invoke proactively for ${ag.role.toLowerCase()} tasks in enterprise monorepo projects.`,
|
|
263
|
-
`model: ${model}`,
|
|
264
|
-
`tools: [${tools.map(t => `"${t}"`).join(", ")}]`,
|
|
265
|
-
`color: ${color}`,
|
|
266
|
-
"---",
|
|
267
|
-
].join("\n");
|
|
268
|
-
|
|
269
|
-
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths, backendLanguage)}`;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
273
|
-
// GEMINI CLI → .gemini/agents/{name}.md
|
|
274
|
-
// Valid fields: name, description, model, tools (YAML list)
|
|
275
|
-
// Ref: https://ai.google.dev/gemini-api/docs/agents
|
|
276
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
277
|
-
|
|
278
|
-
export function toGeminiCliMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
279
|
-
const tools = [...new Set(ag.tools.map((t: string) => GEMINI_TOOL_MAP[t] ?? t))];
|
|
280
|
-
const model = resolveModel(ag.capability, "gemini-cli");
|
|
281
|
-
|
|
282
|
-
const frontmatter = [
|
|
283
|
-
"---",
|
|
284
|
-
`name: ${ag.name}`,
|
|
285
|
-
"description: >-",
|
|
286
|
-
` ${ag.description} Use for ${ag.role.toLowerCase()} tasks.`,
|
|
287
|
-
`model: ${model}`,
|
|
288
|
-
"tools:",
|
|
289
|
-
...tools.map(t => ` - ${t}`),
|
|
290
|
-
"---",
|
|
291
|
-
].join("\n");
|
|
292
|
-
|
|
293
|
-
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths, backendLanguage);
|
|
294
|
-
|
|
295
|
-
const metaFooter = [
|
|
296
|
-
"",
|
|
297
|
-
`<!-- name: ${ag.name} -->`,
|
|
298
|
-
`<!-- capability: ${ag.capability} -->`,
|
|
299
|
-
`<!-- tags: ${JSON.stringify(ag.tags)} -->`,
|
|
300
|
-
].join("\n");
|
|
301
|
-
|
|
302
|
-
return `${frontmatter}\n\n${body}${metaFooter}`;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
306
|
-
// ANTIGRAVITY CLI → .agents/{name}/agent.json
|
|
307
|
-
// Spec: Antigravity customAgentSpec JSON schema
|
|
308
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
309
|
-
|
|
310
|
-
export function toAntigravityJson(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage: string = "Node.js (TypeScript)"): string {
|
|
311
|
-
const knowledgeBase = baseKnowledgeDir ?? path.join(getPackageRoot(), "templates/standards");
|
|
312
|
-
|
|
313
|
-
// Embed actual file contents so the agent can read governance docs
|
|
314
|
-
const knowledgeSections = (ag.instructions.knowledgeFiles ?? []).map((f: string) => {
|
|
315
|
-
const filePath = path.join(knowledgeBase, f);
|
|
316
|
-
const content = fs.existsSync(filePath)
|
|
317
|
-
? fs.readFileSync(filePath, "utf8").trim()
|
|
318
|
-
: `(${f} — file not found at build time)`;
|
|
319
|
-
return { title: `Required Reading — ${f}`, content };
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
const payload = {
|
|
323
|
-
name: ag.name,
|
|
324
|
-
displayName: ag.displayName,
|
|
325
|
-
description: ag.description,
|
|
326
|
-
hidden: false,
|
|
327
|
-
customAgentSpec: {
|
|
328
|
-
customAgent: {
|
|
329
|
-
systemPromptSections: [
|
|
330
|
-
{
|
|
331
|
-
title: "Identity & Mission",
|
|
332
|
-
content: `${ag.instructions.identity}\n\n**Mission:** ${ag.instructions.mission}`,
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
title: "Project Structure & Technology",
|
|
336
|
-
content: [
|
|
337
|
-
"This project uses the following stack and directory structure:",
|
|
338
|
-
`- Backend Language: ${backendLanguage}`,
|
|
339
|
-
`- Backend Path: ${paths?.backend || "apps/backend"}`,
|
|
340
|
-
`- Frontend Path: ${paths?.frontend || "apps/web"}`,
|
|
341
|
-
`- Mobile Path: ${paths?.mobile || "apps/mobile"}`,
|
|
342
|
-
`- Documentation: ${paths?.docs || "docs"}`,
|
|
343
|
-
].join("\n"),
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
title: "Chain of Thought Protocol",
|
|
347
|
-
content: ag.instructions.chainOfThought,
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
title: "Discipline Rules",
|
|
351
|
-
content: ag.instructions.rules.map((r: string, i: number) => `${i + 1}. ${r}`).join("\n"),
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
title: "Enterprise Context",
|
|
355
|
-
content: [
|
|
356
|
-
"You are part of a multi-agent enterprise governance system.",
|
|
357
|
-
`- You are a specialist in **${backendLanguage}** development for backend tasks.`,
|
|
358
|
-
"- Always include active Trace ID in all messages.",
|
|
359
|
-
"- Read PROJECT_MEMORY.md at session start.",
|
|
360
|
-
"- Prefer surgical edits over full file rewrites.",
|
|
361
|
-
"- Escalate high-risk operations to @manager.",
|
|
362
|
-
`- Ensure development happens inside ${paths?.backend || "apps/backend"}, ${paths?.frontend || "apps/web"}, or ${paths?.mobile || "apps/mobile"}.`,
|
|
363
|
-
].join("\n"),
|
|
364
|
-
},
|
|
365
|
-
...knowledgeSections,
|
|
366
|
-
],
|
|
367
|
-
toolNames: ag.tools,
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
};
|
|
371
|
-
return JSON.stringify(payload, null, 2);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/** Alias for Antigravity JSON export used by CLI */
|
|
375
|
-
export const buildAgentJson = toAntigravityJson;
|
|
376
|
-
|
|
377
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
378
|
-
// CODEX CLI (OpenAI) → .agents/{name}.md
|
|
379
|
-
// Valid fields: agent-type, display-name, when-to-use, model, allowed-tools
|
|
380
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
381
|
-
|
|
382
|
-
export function toCodexMd(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
383
|
-
const model = resolveModel(ag.capability, "codex-cli");
|
|
384
|
-
const tools = [...new Set(ag.tools.map((t: string) => {
|
|
385
|
-
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)) return "read";
|
|
386
|
-
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)) return "write";
|
|
387
|
-
return "shell";
|
|
388
|
-
}))];
|
|
389
|
-
|
|
390
|
-
const frontmatter = [
|
|
391
|
-
"---",
|
|
392
|
-
`agent-type: "${ag.name}"`,
|
|
393
|
-
`display-name: "${ag.displayName}"`,
|
|
394
|
-
"when-to-use: >-",
|
|
395
|
-
` Invoke for ${ag.role.toLowerCase()} tasks. ${ag.description}`,
|
|
396
|
-
`model: ${model}`,
|
|
397
|
-
`allowed-tools: [${tools.map(t => `"${t}"`).join(", ")}]`,
|
|
398
|
-
"---",
|
|
399
|
-
].join("\n");
|
|
400
|
-
|
|
401
|
-
const body = buildSystemPrompt(ag, baseKnowledgeDir, true, paths, backendLanguage);
|
|
402
|
-
|
|
403
|
-
const metaFooter = [
|
|
404
|
-
"",
|
|
405
|
-
`<!-- name: ${ag.name} -->`,
|
|
406
|
-
`<!-- capability: ${ag.capability} -->`,
|
|
407
|
-
`<!-- tags: ${JSON.stringify(ag.tags)} -->`,
|
|
408
|
-
].join("\n");
|
|
409
|
-
|
|
410
|
-
return `${frontmatter}\n\n${body}${metaFooter}`;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
414
|
-
// CURSOR IDE → .cursor/rules/{name}.mdc
|
|
415
|
-
// Valid fields: description, globs, alwaysApply
|
|
416
|
-
// Ref: https://docs.cursor.com/context/rules
|
|
417
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
418
|
-
|
|
419
|
-
export function toCursorMdc(ag: AgentDefinition, baseKnowledgeDir?: string, paths?: Record<string, string>, backendLanguage?: string): string {
|
|
420
|
-
const glob = CURSOR_AGENT_GLOBS[ag.name] || "**/*";
|
|
421
|
-
// Only officially supported Cursor MDC frontmatter fields
|
|
422
|
-
const frontmatter = [
|
|
423
|
-
"---",
|
|
424
|
-
`description: "${ag.displayName} — ${ag.description.slice(0, 120).replace(/"/g, "'")}"`,
|
|
425
|
-
`globs: ${glob}`,
|
|
426
|
-
"alwaysApply: false",
|
|
427
|
-
"---",
|
|
428
|
-
].join("\n");
|
|
429
|
-
|
|
430
|
-
return `${frontmatter}\n\n${buildSystemPrompt(ag, baseKnowledgeDir, false, paths, backendLanguage)}`;
|
|
431
|
-
}
|
|
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[] {
|
|
445
|
-
return ALL_AGENTS.map(ag => {
|
|
446
|
-
switch (target) {
|
|
447
|
-
case "claude-code":
|
|
448
|
-
return { path: `.claude/agents/${ag.name}.md`, content: toClaudeCodeMd(ag, undefined, paths, backendLanguage) };
|
|
449
|
-
case "gemini-cli":
|
|
450
|
-
return { path: `.gemini/agents/${ag.name}.md`, content: toGeminiCliMd(ag, undefined, paths, backendLanguage) };
|
|
451
|
-
case "antigravity":
|
|
452
|
-
return { path: `.agents/${ag.name}/agent.json`, content: toAntigravityJson(ag, undefined, paths, backendLanguage) };
|
|
453
|
-
case "codex-cli":
|
|
454
|
-
return { path: `.agents/${ag.name}.md`, content: toCodexMd(ag, undefined, paths, backendLanguage) };
|
|
455
|
-
case "cursor":
|
|
456
|
-
return { path: `.cursor/rules/${ag.name}.mdc`, content: toCursorMdc(ag, undefined, paths, backendLanguage) };
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { AgentDefinition } from "../types.js";
|
|
2
|
-
|
|
3
|
-
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
|
|
4
|
-
|
|
5
|
-
export const analyst: AgentDefinition = {
|
|
6
|
-
name: "analyst",
|
|
7
|
-
displayName: "Business Analyst",
|
|
8
|
-
role: "Strategy Analysis",
|
|
9
|
-
description:
|
|
10
|
-
"Specs verification and Contract Audit specialist. " +
|
|
11
|
-
"Audits truth and contracts within the Army.",
|
|
12
|
-
capability: 9,
|
|
13
|
-
tier: "recon",
|
|
14
|
-
tags: ["core", "strategy"],
|
|
15
|
-
stateMachine: STATE_MACHINE,
|
|
16
|
-
tools: [
|
|
17
|
-
"read_file",
|
|
18
|
-
"list_dir",
|
|
19
|
-
"grep_search",
|
|
20
|
-
"get_project_map",
|
|
21
|
-
"get_project_gaps",
|
|
22
|
-
"read_project_memory",
|
|
23
|
-
"get_memory_insights",
|
|
24
|
-
"send_agent_message",
|
|
25
|
-
"update_contract_hash",
|
|
26
|
-
],
|
|
27
|
-
instructions: {
|
|
28
|
-
identity: "Strategy Analyst and Contract-First Compliance Auditor",
|
|
29
|
-
mission:
|
|
30
|
-
"Ensure every user requirement is accurately mapped to a typed API " +
|
|
31
|
-
"contract before a single line of application code is written.",
|
|
32
|
-
chainOfThought: "1. Analyze: Read the task, context, and relevant governance documents.\n" +
|
|
33
|
-
"2. Validate: Cross-reference with project rules, contracts, and architecture standards.\n" +
|
|
34
|
-
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
35
|
-
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
36
|
-
rules: [
|
|
37
|
-
"REQUIREMENTS MAPPING: Verify that all user requirements from docs/ correctly map to API schemas and types.",
|
|
38
|
-
"CONTRACT FIRST: Enforce the Contract-First model — no application code without a validated contract.",
|
|
39
|
-
"VERSIONING INTEGRITY: Validate that all API versioning changes are correctly registered in 'contract.version.json'.",
|
|
40
|
-
"LIVE AUDIT: Continuously audit business rules against the live implementation for drift.",
|
|
41
|
-
],
|
|
42
|
-
knowledgeFiles: ["architecture-standards.md", "crud-governance.md", "governance-standards.md", "quality-standards.md"],
|
|
43
|
-
},
|
|
44
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { AgentDefinition } from "../types.js";
|
|
2
|
-
|
|
3
|
-
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
|
|
4
|
-
|
|
5
|
-
export const architect: AgentDefinition = {
|
|
6
|
-
name: "architect",
|
|
7
|
-
displayName: "Lead Architect",
|
|
8
|
-
role: "System Design",
|
|
9
|
-
description:
|
|
10
|
-
"System Design, Contracts, and Core Architecture specialist. " +
|
|
11
|
-
"Owns the Control Plane Governance & Locking discipline.",
|
|
12
|
-
capability: 9,
|
|
13
|
-
tier: "core",
|
|
14
|
-
tags: ["core", "design"],
|
|
15
|
-
stateMachine: STATE_MACHINE,
|
|
16
|
-
tools: [
|
|
17
|
-
"read_file",
|
|
18
|
-
"write_file",
|
|
19
|
-
"replace_text",
|
|
20
|
-
"batch_surgical_edit",
|
|
21
|
-
"list_dir",
|
|
22
|
-
"grep_search",
|
|
23
|
-
"update_contract_hash",
|
|
24
|
-
"read_project_memory",
|
|
25
|
-
"get_memory_insights",
|
|
26
|
-
"acquire_lock",
|
|
27
|
-
"release_lock",
|
|
28
|
-
"register_agent",
|
|
29
|
-
],
|
|
30
|
-
instructions: {
|
|
31
|
-
identity: "System Architecture Designer and Contract Governance Owner",
|
|
32
|
-
mission:
|
|
33
|
-
"Design a flawless, contract-first foundation that every other " +
|
|
34
|
-
"specialist can build on without ambiguity.",
|
|
35
|
-
chainOfThought: "1. Analyze: Read the task, context, and relevant governance documents.\n" +
|
|
36
|
-
"2. Validate: Cross-reference with project rules, contracts, and architecture standards.\n" +
|
|
37
|
-
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
38
|
-
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
39
|
-
rules: [
|
|
40
|
-
"CONTRACT FIRST: Read governance documents before designing any contract or interface.",
|
|
41
|
-
"TYPE SAFETY: Enforce strict typing across all boundaries — 'any' type is unconditionally forbidden.",
|
|
42
|
-
"CONTRACT STABILITY: Validate 'contract.version.json' consistency before and after every schema change.",
|
|
43
|
-
"GOVERNANCE READ: Always read architecture governance docs before making design decisions.",
|
|
44
|
-
],
|
|
45
|
-
knowledgeFiles: ["architecture-standards.md", "governance-standards.md", "performance-standards.md"],
|
|
46
|
-
},
|
|
47
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { AgentDefinition } from "../types.js";
|
|
2
|
-
|
|
3
|
-
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
|
|
4
|
-
|
|
5
|
-
export const backend: AgentDefinition = {
|
|
6
|
-
name: "backend",
|
|
7
|
-
displayName: "Backend Specialist",
|
|
8
|
-
role: "Backend Development",
|
|
9
|
-
description:
|
|
10
|
-
"Server logic and API implementation specialist. " +
|
|
11
|
-
"Owns the API contracts and business logic implementation.",
|
|
12
|
-
capability: 9,
|
|
13
|
-
tier: "core",
|
|
14
|
-
tags: ["core", "logic"],
|
|
15
|
-
stateMachine: STATE_MACHINE,
|
|
16
|
-
tools: [
|
|
17
|
-
"read_file",
|
|
18
|
-
"write_file",
|
|
19
|
-
"replace_text",
|
|
20
|
-
"batch_surgical_edit",
|
|
21
|
-
"patch_file",
|
|
22
|
-
"list_dir",
|
|
23
|
-
"grep_search",
|
|
24
|
-
"send_agent_message",
|
|
25
|
-
"read_project_memory",
|
|
26
|
-
"get_memory_insights",
|
|
27
|
-
],
|
|
28
|
-
instructions: {
|
|
29
|
-
identity: "Backend Domain Engineer and Database Management Owner",
|
|
30
|
-
mission:
|
|
31
|
-
"Deliver reliable, type-safe server logic that strictly adheres to the **Controller-Service-Repository-Router** architectural pattern.",
|
|
32
|
-
chainOfThought: "1. Analyze: Read the task, context, and relevant governance documents.\n" +
|
|
33
|
-
"2. Validate: Cross-reference with project rules, contracts, and architecture standards.\n" +
|
|
34
|
-
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
35
|
-
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
36
|
-
rules: [
|
|
37
|
-
"ARCHITECTURAL PURITY: You MUST implement every feature using a layered architecture (e.g., Controller-Service-Repository). Skipping any layer or mixing concerns (e.g., DB calls in Controller) is a Nizam violation.",
|
|
38
|
-
"STRICT BRANDED TYPES: Absolute enforcement of branded types or value objects for ALL domain IDs (e.g., UserId, ProjectId). Raw primitives for IDs are forbidden.",
|
|
39
|
-
"TYPE-SAFE DB ACCESS: All database access MUST use the project's designated type-safe query builder or ORM (e.g., Kysely for TS, GORM for Go, JPA for Java). Raw SQL strings are forbidden.",
|
|
40
|
-
"ERROR HANDLING: Wrap all async/io logic in robust error handling blocks with localized, typed error responses.",
|
|
41
|
-
"PII PROTECTION: Never log or store real user data. Use anonymized hashes for debugging tasks.",
|
|
42
|
-
"HIGH-RISK OPS: Refuse User/Role management, bulk deletes, schema alterations, and billing changes autonomously. Send a managerApproval request to @manager.",
|
|
43
|
-
],
|
|
44
|
-
knowledgeFiles: ["crud-governance.md", "kysely-standards.md", "typeorm-standards.md", "auth-standards.md", "swagger-standards.md", "pino-standards.md"],
|
|
45
|
-
},
|
|
46
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { AgentDefinition } from "../types.js";
|
|
2
|
-
|
|
3
|
-
const STATE_MACHINE = "../schema/agent-lifecycle-schema.json" as const;
|
|
4
|
-
|
|
5
|
-
export const database: AgentDefinition = {
|
|
6
|
-
name: "database",
|
|
7
|
-
displayName: "Database Specialist",
|
|
8
|
-
role: "Data Management",
|
|
9
|
-
description:
|
|
10
|
-
"SQL Schema design, migration, and query optimization specialist. " +
|
|
11
|
-
"Owns the database schema, migrations, and data integrity.",
|
|
12
|
-
capability: 9,
|
|
13
|
-
tier: "core",
|
|
14
|
-
tags: ["core", "data"],
|
|
15
|
-
stateMachine: STATE_MACHINE,
|
|
16
|
-
tools: [
|
|
17
|
-
"read_file",
|
|
18
|
-
"write_file",
|
|
19
|
-
"replace_text",
|
|
20
|
-
"patch_file",
|
|
21
|
-
"list_dir",
|
|
22
|
-
"grep_search",
|
|
23
|
-
"read_project_memory",
|
|
24
|
-
"send_agent_message",
|
|
25
|
-
],
|
|
26
|
-
instructions: {
|
|
27
|
-
identity: "Database Architect and Migration Integrity Owner",
|
|
28
|
-
mission:
|
|
29
|
-
"Design and evolve a contract-driven, deterministic schema that " +
|
|
30
|
-
"guarantees data integrity and query performance.",
|
|
31
|
-
chainOfThought: "1. Analyze: Read the task, context, and relevant governance documents.\n" +
|
|
32
|
-
"2. Validate: Cross-reference with project rules, contracts, and architecture standards.\n" +
|
|
33
|
-
"3. Plan: Break down the task into small, atomic, and verifiable steps.\n" +
|
|
34
|
-
"4. Execute: Perform the task using approved tools, adhering to quality and security constraints.",
|
|
35
|
-
rules: [
|
|
36
|
-
"CONTRACT DRIVEN: All schemas must originate from and stay consistent with the project's type contracts.",
|
|
37
|
-
"NO RAW SQL: Forbid raw SQL strings in the application layer — use the project's designated type-safe query builder or ORM exclusively.",
|
|
38
|
-
"DETERMINISTIC MIGRATIONS: Every migration must be reversible and produce identical results across environments.",
|
|
39
|
-
"PERFORMANCE FIRST: Design indexes proactively — never retroactively after a performance incident.",
|
|
40
|
-
],
|
|
41
|
-
knowledgeFiles: ["kysely-standards.md", "typeorm-standards.md", "quality-standards.md", "performance-standards.md"],
|
|
42
|
-
},
|
|
43
|
-
};
|