mcoda 0.1.0
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/.editorconfig +9 -0
- package/.eslintrc.cjs +12 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- package/.github/workflows/ci.yml +37 -0
- package/.github/workflows/nightly.yml +38 -0
- package/.github/workflows/release-dry-run.yml +40 -0
- package/.github/workflows/release-please.yml +22 -0
- package/.github/workflows/release.yml +149 -0
- package/.prettierrc +5 -0
- package/.release-please-manifest.json +8 -0
- package/CHANGELOG.md +7 -0
- package/CLA.md +42 -0
- package/CONTRIBUTING.md +38 -0
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/docs/oss_publishing_plan.md +41 -0
- package/docs/pdr/.gitkeep +0 -0
- package/docs/quality_gates.md +32 -0
- package/docs/rfp/.gitkeep +0 -0
- package/docs/sds/sds.md +11963 -0
- package/docs/usage.md +72 -0
- package/openapi/gen-openapi.ts +1 -0
- package/openapi/generated/clients/.gitkeep +0 -0
- package/openapi/generated/types/.gitkeep +0 -0
- package/openapi/generated/types/index.ts +118 -0
- package/openapi/mcoda.yaml +2063 -0
- package/pack-mcoda.sh +88 -0
- package/package.json +46 -0
- package/packages/agents/CHANGELOG.md +7 -0
- package/packages/agents/LICENSE +21 -0
- package/packages/agents/README.md +9 -0
- package/packages/agents/package.json +41 -0
- package/packages/agents/src/AgentService/.gitkeep +0 -0
- package/packages/agents/src/AgentService/AgentService.d.ts +21 -0
- package/packages/agents/src/AgentService/AgentService.d.ts.map +1 -0
- package/packages/agents/src/AgentService/AgentService.js +141 -0
- package/packages/agents/src/AgentService/AgentService.ts +308 -0
- package/packages/agents/src/__tests__/AgentService.test.ts +284 -0
- package/packages/agents/src/adapters/AdapterTypes.d.ts +29 -0
- package/packages/agents/src/adapters/AdapterTypes.d.ts.map +1 -0
- package/packages/agents/src/adapters/AdapterTypes.js +1 -0
- package/packages/agents/src/adapters/AdapterTypes.ts +32 -0
- package/packages/agents/src/adapters/codex/.gitkeep +0 -0
- package/packages/agents/src/adapters/codex/CodexAdapter.d.ts +11 -0
- package/packages/agents/src/adapters/codex/CodexAdapter.d.ts.map +1 -0
- package/packages/agents/src/adapters/codex/CodexAdapter.js +43 -0
- package/packages/agents/src/adapters/codex/CodexAdapter.ts +63 -0
- package/packages/agents/src/adapters/codex/CodexCliRunner.ts +154 -0
- package/packages/agents/src/adapters/gemini/.gitkeep +0 -0
- package/packages/agents/src/adapters/gemini/GeminiAdapter.d.ts +11 -0
- package/packages/agents/src/adapters/gemini/GeminiAdapter.d.ts.map +1 -0
- package/packages/agents/src/adapters/gemini/GeminiAdapter.js +42 -0
- package/packages/agents/src/adapters/gemini/GeminiAdapter.ts +58 -0
- package/packages/agents/src/adapters/gemini/GeminiCliRunner.ts +75 -0
- package/packages/agents/src/adapters/local/.gitkeep +0 -0
- package/packages/agents/src/adapters/local/LocalAdapter.d.ts +11 -0
- package/packages/agents/src/adapters/local/LocalAdapter.d.ts.map +1 -0
- package/packages/agents/src/adapters/local/LocalAdapter.js +38 -0
- package/packages/agents/src/adapters/local/LocalAdapter.ts +43 -0
- package/packages/agents/src/adapters/ollama/OllamaCliAdapter.ts +58 -0
- package/packages/agents/src/adapters/ollama/OllamaCliRunner.ts +70 -0
- package/packages/agents/src/adapters/ollama/OllamaRemoteAdapter.ts +205 -0
- package/packages/agents/src/adapters/openai/.gitkeep +0 -0
- package/packages/agents/src/adapters/openai/OpenAiAdapter.d.ts +11 -0
- package/packages/agents/src/adapters/openai/OpenAiAdapter.d.ts.map +1 -0
- package/packages/agents/src/adapters/openai/OpenAiAdapter.js +51 -0
- package/packages/agents/src/adapters/openai/OpenAiAdapter.ts +56 -0
- package/packages/agents/src/adapters/openai/OpenAiCliAdapter.ts +62 -0
- package/packages/agents/src/adapters/qa/.gitkeep +0 -0
- package/packages/agents/src/adapters/qa/QaAdapter.d.ts +11 -0
- package/packages/agents/src/adapters/qa/QaAdapter.d.ts.map +1 -0
- package/packages/agents/src/adapters/qa/QaAdapter.js +37 -0
- package/packages/agents/src/adapters/qa/QaAdapter.ts +42 -0
- package/packages/agents/src/adapters/zhipu/ZhipuApiAdapter.ts +273 -0
- package/packages/agents/src/index.d.ts +8 -0
- package/packages/agents/src/index.d.ts.map +1 -0
- package/packages/agents/src/index.js +7 -0
- package/packages/agents/src/index.ts +11 -0
- package/packages/agents/tsconfig.json +14 -0
- package/packages/cli/CHANGELOG.md +7 -0
- package/packages/cli/LICENSE +21 -0
- package/packages/cli/README.md +23 -0
- package/packages/cli/package.json +61 -0
- package/packages/cli/src/__tests__/AgentsCommands.test.ts +137 -0
- package/packages/cli/src/__tests__/BacklogCommands.test.ts +40 -0
- package/packages/cli/src/__tests__/CodeReviewCommand.test.ts +594 -0
- package/packages/cli/src/__tests__/CreateTasksCommand.test.ts +40 -0
- package/packages/cli/src/__tests__/DocsCommands.test.ts +41 -0
- package/packages/cli/src/__tests__/EstimateCommands.test.ts +54 -0
- package/packages/cli/src/__tests__/JobsCommands.behavior.test.ts +311 -0
- package/packages/cli/src/__tests__/JobsCommands.test.ts +49 -0
- package/packages/cli/src/__tests__/MigrateTasksCommand.test.ts +36 -0
- package/packages/cli/src/__tests__/OpenapiCommands.test.ts +34 -0
- package/packages/cli/src/__tests__/OrderTasksCommand.test.ts +150 -0
- package/packages/cli/src/__tests__/PlanningCommands.test.ts +9 -0
- package/packages/cli/src/__tests__/QaTasksCommand.test.ts +58 -0
- package/packages/cli/src/__tests__/RefineTasksCommand.test.ts +63 -0
- package/packages/cli/src/__tests__/RoutingCommands.test.ts +302 -0
- package/packages/cli/src/__tests__/SetWorkspaceCommand.test.ts +18 -0
- package/packages/cli/src/__tests__/TaskShowCommands.test.ts +130 -0
- package/packages/cli/src/__tests__/TelemetryCommands.test.ts +35 -0
- package/packages/cli/src/__tests__/TestAgentCommand.test.ts +41 -0
- package/packages/cli/src/__tests__/UpdateCommands.test.ts +292 -0
- package/packages/cli/src/__tests__/WorkOnTasksCommand.test.ts +42 -0
- package/packages/cli/src/bin/.gitkeep +0 -0
- package/packages/cli/src/bin/McodaEntrypoint.ts +180 -0
- package/packages/cli/src/commands/agents/.gitkeep +0 -0
- package/packages/cli/src/commands/agents/AgentsCommands.ts +374 -0
- package/packages/cli/src/commands/agents/GatewayAgentCommand.ts +621 -0
- package/packages/cli/src/commands/agents/TestAgentCommand.ts +63 -0
- package/packages/cli/src/commands/backlog/.gitkeep +0 -0
- package/packages/cli/src/commands/backlog/BacklogCommands.ts +286 -0
- package/packages/cli/src/commands/backlog/OrderTasksCommand.ts +237 -0
- package/packages/cli/src/commands/backlog/TaskShowCommands.ts +289 -0
- package/packages/cli/src/commands/docs/.gitkeep +0 -0
- package/packages/cli/src/commands/docs/DocsCommands.ts +413 -0
- package/packages/cli/src/commands/estimate/EstimateCommands.ts +290 -0
- package/packages/cli/src/commands/jobs/.gitkeep +0 -0
- package/packages/cli/src/commands/jobs/JobsCommands.ts +595 -0
- package/packages/cli/src/commands/openapi/OpenapiCommands.ts +167 -0
- package/packages/cli/src/commands/planning/.gitkeep +0 -0
- package/packages/cli/src/commands/planning/CreateTasksCommand.ts +149 -0
- package/packages/cli/src/commands/planning/MigrateTasksCommand.ts +105 -0
- package/packages/cli/src/commands/planning/PlanningCommands.ts +1 -0
- package/packages/cli/src/commands/planning/QaTasksCommand.ts +320 -0
- package/packages/cli/src/commands/planning/RefineTasksCommand.ts +408 -0
- package/packages/cli/src/commands/review/CodeReviewCommand.ts +262 -0
- package/packages/cli/src/commands/routing/.gitkeep +0 -0
- package/packages/cli/src/commands/routing/RoutingCommands.ts +554 -0
- package/packages/cli/src/commands/telemetry/.gitkeep +0 -0
- package/packages/cli/src/commands/telemetry/TelemetryCommands.ts +348 -0
- package/packages/cli/src/commands/update/.gitkeep +0 -0
- package/packages/cli/src/commands/update/UpdateCommands.ts +301 -0
- package/packages/cli/src/commands/work/WorkOnTasksCommand.ts +264 -0
- package/packages/cli/src/commands/workspace/SetWorkspaceCommand.ts +132 -0
- package/packages/cli/src/index.ts +18 -0
- package/packages/cli/test/packaging_guardrails.test.js +75 -0
- package/packages/cli/tsconfig.json +20 -0
- package/packages/core/CHANGELOG.md +7 -0
- package/packages/core/LICENSE +21 -0
- package/packages/core/README.md +9 -0
- package/packages/core/package.json +45 -0
- package/packages/core/src/__tests__/SmokeClasses.test.ts +32 -0
- package/packages/core/src/api/AgentsApi.ts +219 -0
- package/packages/core/src/api/QaTasksApi.ts +38 -0
- package/packages/core/src/api/TasksApi.ts +35 -0
- package/packages/core/src/api/__tests__/AgentsApi.test.ts +203 -0
- package/packages/core/src/api/__tests__/QaTasksApi.test.ts +51 -0
- package/packages/core/src/api/__tests__/TasksApi.test.ts +56 -0
- package/packages/core/src/config/.gitkeep +0 -0
- package/packages/core/src/config/ConfigService.ts +1 -0
- package/packages/core/src/domain/dependencies/.gitkeep +0 -0
- package/packages/core/src/domain/dependencies/Dependency.ts +1 -0
- package/packages/core/src/domain/epics/.gitkeep +0 -0
- package/packages/core/src/domain/epics/Epic.ts +1 -0
- package/packages/core/src/domain/projects/.gitkeep +0 -0
- package/packages/core/src/domain/projects/Project.ts +1 -0
- package/packages/core/src/domain/tasks/.gitkeep +0 -0
- package/packages/core/src/domain/tasks/Task.ts +1 -0
- package/packages/core/src/domain/userStories/.gitkeep +0 -0
- package/packages/core/src/domain/userStories/UserStory.ts +1 -0
- package/packages/core/src/index.ts +27 -0
- package/packages/core/src/prompts/.gitkeep +0 -0
- package/packages/core/src/prompts/PdrPrompts.ts +23 -0
- package/packages/core/src/prompts/PromptLoader.ts +1 -0
- package/packages/core/src/prompts/SdsPrompts.ts +47 -0
- package/packages/core/src/services/agents/.gitkeep +0 -0
- package/packages/core/src/services/agents/AgentManagementService.ts +1 -0
- package/packages/core/src/services/agents/GatewayAgentService.ts +956 -0
- package/packages/core/src/services/agents/RoutingService.ts +461 -0
- package/packages/core/src/services/agents/__tests__/GatewayAgentService.test.ts +72 -0
- package/packages/core/src/services/agents/__tests__/RoutingService.test.ts +267 -0
- package/packages/core/src/services/agents/generated/RoutingApiClient.ts +89 -0
- package/packages/core/src/services/backlog/.gitkeep +0 -0
- package/packages/core/src/services/backlog/BacklogService.ts +580 -0
- package/packages/core/src/services/backlog/TaskOrderingService.ts +868 -0
- package/packages/core/src/services/backlog/__tests__/BacklogService.test.ts +219 -0
- package/packages/core/src/services/backlog/__tests__/TaskOrderingService.test.ts +268 -0
- package/packages/core/src/services/docs/.gitkeep +0 -0
- package/packages/core/src/services/docs/DocsService.ts +1913 -0
- package/packages/core/src/services/docs/__tests__/DocsService.test.ts +350 -0
- package/packages/core/src/services/estimate/EstimateService.ts +111 -0
- package/packages/core/src/services/estimate/VelocityService.ts +272 -0
- package/packages/core/src/services/estimate/__tests__/VelocityAndEstimate.test.ts +209 -0
- package/packages/core/src/services/estimate/types.ts +41 -0
- package/packages/core/src/services/execution/.gitkeep +0 -0
- package/packages/core/src/services/execution/ExecutionService.ts +1 -0
- package/packages/core/src/services/execution/QaFollowupService.ts +289 -0
- package/packages/core/src/services/execution/QaProfileService.ts +160 -0
- package/packages/core/src/services/execution/QaTasksService.ts +1303 -0
- package/packages/core/src/services/execution/TaskSelectionService.ts +362 -0
- package/packages/core/src/services/execution/TaskStateService.ts +64 -0
- package/packages/core/src/services/execution/WorkOnTasksService.ts +2023 -0
- package/packages/core/src/services/execution/__tests__/QaFollowupService.test.ts +58 -0
- package/packages/core/src/services/execution/__tests__/QaProfileService.test.ts +49 -0
- package/packages/core/src/services/execution/__tests__/QaTasksService.test.ts +157 -0
- package/packages/core/src/services/execution/__tests__/TaskSelectionService.test.ts +179 -0
- package/packages/core/src/services/execution/__tests__/TaskStateService.test.ts +51 -0
- package/packages/core/src/services/execution/__tests__/WorkOnTasksService.test.ts +285 -0
- package/packages/core/src/services/jobs/.gitkeep +0 -0
- package/packages/core/src/services/jobs/JobInsightsService.ts +355 -0
- package/packages/core/src/services/jobs/JobResumeService.ts +119 -0
- package/packages/core/src/services/jobs/JobService.ts +648 -0
- package/packages/core/src/services/jobs/JobsApiClient.ts +113 -0
- package/packages/core/src/services/jobs/__tests__/JobInsightsService.test.ts +17 -0
- package/packages/core/src/services/jobs/__tests__/JobResumeService.test.ts +45 -0
- package/packages/core/src/services/jobs/__tests__/JobService.test.ts +44 -0
- package/packages/core/src/services/openapi/OpenApiService.ts +558 -0
- package/packages/core/src/services/openapi/__tests__/OpenApiService.test.ts +57 -0
- package/packages/core/src/services/planning/.gitkeep +0 -0
- package/packages/core/src/services/planning/CreateTasksService.ts +1280 -0
- package/packages/core/src/services/planning/KeyHelpers.ts +80 -0
- package/packages/core/src/services/planning/PlanningService.ts +1 -0
- package/packages/core/src/services/planning/RefineTasksService.ts +1552 -0
- package/packages/core/src/services/planning/__tests__/CreateTasksService.test.ts +288 -0
- package/packages/core/src/services/planning/__tests__/KeyHelpers.test.ts +16 -0
- package/packages/core/src/services/planning/__tests__/RefineTasksService.test.ts +172 -0
- package/packages/core/src/services/review/CodeReviewService.ts +1386 -0
- package/packages/core/src/services/review/__tests__/CodeReviewService.test.ts +89 -0
- package/packages/core/src/services/system/SystemUpdateService.ts +177 -0
- package/packages/core/src/services/system/__tests__/SystemUpdateService.test.ts +40 -0
- package/packages/core/src/services/tasks/TaskApiResolver.ts +37 -0
- package/packages/core/src/services/tasks/TaskDetailService.ts +494 -0
- package/packages/core/src/services/tasks/__tests__/TaskApiResolver.test.ts +41 -0
- package/packages/core/src/services/tasks/__tests__/TaskDetailService.test.ts +178 -0
- package/packages/core/src/services/telemetry/.gitkeep +0 -0
- package/packages/core/src/services/telemetry/TelemetryService.ts +515 -0
- package/packages/core/src/services/telemetry/__tests__/TelemetryService.test.ts +160 -0
- package/packages/core/src/workspace/.gitkeep +0 -0
- package/packages/core/src/workspace/WorkspaceManager.ts +234 -0
- package/packages/core/tsconfig.json +20 -0
- package/packages/db/CHANGELOG.md +7 -0
- package/packages/db/LICENSE +21 -0
- package/packages/db/README.md +9 -0
- package/packages/db/package.json +42 -0
- package/packages/db/src/__tests__/GlobalRepository.test.ts +109 -0
- package/packages/db/src/__tests__/SchemaAlignment.test.ts +80 -0
- package/packages/db/src/__tests__/WorkspaceRepository.test.ts +19 -0
- package/packages/db/src/index.d.ts +6 -0
- package/packages/db/src/index.d.ts.map +1 -0
- package/packages/db/src/index.js +5 -0
- package/packages/db/src/index.ts +6 -0
- package/packages/db/src/migrations/global/.gitkeep +0 -0
- package/packages/db/src/migrations/global/GlobalMigrations.d.ts +9 -0
- package/packages/db/src/migrations/global/GlobalMigrations.d.ts.map +1 -0
- package/packages/db/src/migrations/global/GlobalMigrations.js +68 -0
- package/packages/db/src/migrations/global/GlobalMigrations.ts +336 -0
- package/packages/db/src/migrations/workspace/.gitkeep +0 -0
- package/packages/db/src/migrations/workspace/WorkspaceMigrations.d.ts +9 -0
- package/packages/db/src/migrations/workspace/WorkspaceMigrations.d.ts.map +1 -0
- package/packages/db/src/migrations/workspace/WorkspaceMigrations.js +251 -0
- package/packages/db/src/migrations/workspace/WorkspaceMigrations.ts +248 -0
- package/packages/db/src/repositories/global/.gitkeep +0 -0
- package/packages/db/src/repositories/global/GlobalRepository.d.ts +30 -0
- package/packages/db/src/repositories/global/GlobalRepository.d.ts.map +1 -0
- package/packages/db/src/repositories/global/GlobalRepository.js +209 -0
- package/packages/db/src/repositories/global/GlobalRepository.ts +492 -0
- package/packages/db/src/repositories/workspace/.gitkeep +0 -0
- package/packages/db/src/repositories/workspace/WorkspaceRepository.d.ts +282 -0
- package/packages/db/src/repositories/workspace/WorkspaceRepository.d.ts.map +1 -0
- package/packages/db/src/repositories/workspace/WorkspaceRepository.js +773 -0
- package/packages/db/src/repositories/workspace/WorkspaceRepository.ts +1511 -0
- package/packages/db/src/sqlite/connection.d.ts +11 -0
- package/packages/db/src/sqlite/connection.d.ts.map +1 -0
- package/packages/db/src/sqlite/connection.js +31 -0
- package/packages/db/src/sqlite/connection.ts +35 -0
- package/packages/db/src/sqlite/pragmas.d.ts +5 -0
- package/packages/db/src/sqlite/pragmas.d.ts.map +1 -0
- package/packages/db/src/sqlite/pragmas.js +6 -0
- package/packages/db/src/sqlite/pragmas.ts +10 -0
- package/packages/db/tsconfig.json +13 -0
- package/packages/generators/package.json +21 -0
- package/packages/generators/src/__tests__/Generators.test.ts +19 -0
- package/packages/generators/src/index.ts +1 -0
- package/packages/generators/src/openapi/generateTypes.ts +1 -0
- package/packages/generators/src/openapi/validateSchema.ts +1 -0
- package/packages/generators/src/scaffolding/docs/.gitkeep +0 -0
- package/packages/generators/src/scaffolding/docs/DocsScaffolder.ts +1 -0
- package/packages/generators/src/scaffolding/global/.gitkeep +0 -0
- package/packages/generators/src/scaffolding/global/GlobalScaffolder.ts +1 -0
- package/packages/generators/src/scaffolding/workspace/.gitkeep +0 -0
- package/packages/generators/src/scaffolding/workspace/WorkspaceScaffolder.ts +1 -0
- package/packages/generators/tsconfig.json +10 -0
- package/packages/integrations/CHANGELOG.md +7 -0
- package/packages/integrations/LICENSE +21 -0
- package/packages/integrations/README.md +9 -0
- package/packages/integrations/package.json +47 -0
- package/packages/integrations/src/docdex/.gitkeep +0 -0
- package/packages/integrations/src/docdex/DocdexClient.d.ts +50 -0
- package/packages/integrations/src/docdex/DocdexClient.d.ts.map +1 -0
- package/packages/integrations/src/docdex/DocdexClient.js +216 -0
- package/packages/integrations/src/docdex/DocdexClient.ts +261 -0
- package/packages/integrations/src/docdex/__tests__/DocdexClient.test.ts +29 -0
- package/packages/integrations/src/index.d.ts +2 -0
- package/packages/integrations/src/index.d.ts.map +1 -0
- package/packages/integrations/src/index.js +4 -0
- package/packages/integrations/src/index.ts +5 -0
- package/packages/integrations/src/issues/.gitkeep +0 -0
- package/packages/integrations/src/issues/IssuesClient.ts +1 -0
- package/packages/integrations/src/issues/__tests__/IssuesClient.test.ts +10 -0
- package/packages/integrations/src/qa/.gitkeep +0 -0
- package/packages/integrations/src/qa/ChromiumQaAdapter.ts +89 -0
- package/packages/integrations/src/qa/CliQaAdapter.ts +95 -0
- package/packages/integrations/src/qa/MaestroQaAdapter.ts +91 -0
- package/packages/integrations/src/qa/QaAdapter.ts +7 -0
- package/packages/integrations/src/qa/QaClient.ts +1 -0
- package/packages/integrations/src/qa/QaTypes.ts +26 -0
- package/packages/integrations/src/qa/__tests__/ChromiumQaAdapter.test.ts +30 -0
- package/packages/integrations/src/qa/__tests__/CliQaAdapter.test.ts +33 -0
- package/packages/integrations/src/qa/__tests__/MaestroQaAdapter.test.ts +30 -0
- package/packages/integrations/src/qa/index.ts +5 -0
- package/packages/integrations/src/system/SystemClient.ts +50 -0
- package/packages/integrations/src/system/__tests__/SystemClient.test.ts +40 -0
- package/packages/integrations/src/telemetry/TelemetryClient.ts +139 -0
- package/packages/integrations/src/telemetry/__tests__/TelemetryClient.test.ts +41 -0
- package/packages/integrations/src/vcs/.gitkeep +0 -0
- package/packages/integrations/src/vcs/VcsClient.ts +211 -0
- package/packages/integrations/src/vcs/__tests__/VcsClient.test.ts +26 -0
- package/packages/integrations/tsconfig.json +14 -0
- package/packages/shared/CHANGELOG.md +7 -0
- package/packages/shared/LICENSE +21 -0
- package/packages/shared/README.md +9 -0
- package/packages/shared/package.json +40 -0
- package/packages/shared/src/__tests__/CommandMetadata.test.ts +15 -0
- package/packages/shared/src/__tests__/ServiceShells.test.ts +16 -0
- package/packages/shared/src/crypto/.gitkeep +0 -0
- package/packages/shared/src/crypto/CryptoHelper.d.ts +15 -0
- package/packages/shared/src/crypto/CryptoHelper.d.ts.map +1 -0
- package/packages/shared/src/crypto/CryptoHelper.js +54 -0
- package/packages/shared/src/crypto/CryptoHelper.ts +57 -0
- package/packages/shared/src/errors/.gitkeep +0 -0
- package/packages/shared/src/errors/ErrorFactory.ts +1 -0
- package/packages/shared/src/index.d.ts +6 -0
- package/packages/shared/src/index.d.ts.map +1 -0
- package/packages/shared/src/index.js +4 -0
- package/packages/shared/src/index.ts +35 -0
- package/packages/shared/src/logging/.gitkeep +0 -0
- package/packages/shared/src/logging/Logger.ts +1 -0
- package/packages/shared/src/metadata/CommandMetadata.ts +165 -0
- package/packages/shared/src/openapi/.gitkeep +0 -0
- package/packages/shared/src/openapi/OpenApiTypes.d.ts +216 -0
- package/packages/shared/src/openapi/OpenApiTypes.d.ts.map +1 -0
- package/packages/shared/src/openapi/OpenApiTypes.js +1 -0
- package/packages/shared/src/openapi/OpenApiTypes.ts +312 -0
- package/packages/shared/src/paths/.gitkeep +0 -0
- package/packages/shared/src/paths/PathHelper.d.ts +12 -0
- package/packages/shared/src/paths/PathHelper.d.ts.map +1 -0
- package/packages/shared/src/paths/PathHelper.js +24 -0
- package/packages/shared/src/paths/PathHelper.ts +29 -0
- package/packages/shared/src/qa/QaProfile.ts +14 -0
- package/packages/shared/src/utils/.gitkeep +0 -0
- package/packages/shared/src/utils/UtilityService.ts +1 -0
- package/packages/shared/tsconfig.json +10 -0
- package/packages/testing/package.json +26 -0
- package/packages/testing/src/__tests__/TestingFakes.test.ts +15 -0
- package/packages/testing/src/cli/e2e/.gitkeep +0 -0
- package/packages/testing/src/cli/e2e/E2eSuite.ts +1 -0
- package/packages/testing/src/fakes/agents/.gitkeep +0 -0
- package/packages/testing/src/fakes/agents/FakeAgents.ts +1 -0
- package/packages/testing/src/fakes/docdex/.gitkeep +0 -0
- package/packages/testing/src/fakes/docdex/FakeDocdexClient.ts +1 -0
- package/packages/testing/src/fakes/qa/.gitkeep +0 -0
- package/packages/testing/src/fakes/qa/FakeQaClient.ts +1 -0
- package/packages/testing/src/fakes/vcs/.gitkeep +0 -0
- package/packages/testing/src/fakes/vcs/FakeVcsClient.ts +1 -0
- package/packages/testing/src/fixtures/db/.gitkeep +0 -0
- package/packages/testing/src/fixtures/db/DbFixtures.ts +1 -0
- package/packages/testing/src/fixtures/workspaces/.gitkeep +0 -0
- package/packages/testing/src/fixtures/workspaces/WorkspaceFixtures.ts +1 -0
- package/packages/testing/src/index.ts +1 -0
- package/packages/testing/tsconfig.json +10 -0
- package/pnpm-workspace.yaml +2 -0
- package/prompts/README.md +5 -0
- package/prompts/code-reviewer.md +23 -0
- package/prompts/code-writer.md +35 -0
- package/prompts/gateway-agent.md +27 -0
- package/prompts/qa-agent.md +21 -0
- package/release-please-config.json +39 -0
- package/scripts/build-all.ts +1 -0
- package/scripts/dev.ts +1 -0
- package/scripts/install-local-cli.sh +28 -0
- package/scripts/pack-npm-tarballs.js +63 -0
- package/scripts/release.ts +1 -0
- package/scripts/run-node-tests.js +37 -0
- package/tests/all.js +127 -0
- package/tests/api/openapi_spec.test.js +21 -0
- package/tests/artifacts.md +31 -0
- package/tests/component/cli_version.test.js +38 -0
- package/tests/integration/workspace_resolver.test.js +44 -0
- package/tests/unit/crypto_helper.test.js +36 -0
- package/tests/unit/path_helper.test.js +20 -0
- package/tsconfig.base.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# mcoda
|
|
2
|
+
|
|
3
|
+
mcoda is a local-first CLI for planning, documentation, and execution workflows with agent assistance.
|
|
4
|
+
|
|
5
|
+
## Install (npm)
|
|
6
|
+
- Requires Node.js >= 20.
|
|
7
|
+
- Install: `npm i -g mcoda`
|
|
8
|
+
- Verify: `mcoda --version`
|
|
9
|
+
- One-off: `npx mcoda --version`
|
|
10
|
+
|
|
11
|
+
## Build from source
|
|
12
|
+
```sh
|
|
13
|
+
pnpm install
|
|
14
|
+
pnpm -r run build
|
|
15
|
+
pnpm -r run test
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Generate a PDR from an RFP
|
|
19
|
+
|
|
20
|
+
Use the docs command to draft a Product Design Review with docdex + an agent:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
mcoda docs pdr generate \
|
|
24
|
+
--workspace-root ~/Documents/apps/test1 \
|
|
25
|
+
--project TEST1 \
|
|
26
|
+
--rfp-path docs/rfp/test1-rfp.md \
|
|
27
|
+
--agent codex
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add `--agent-stream false` for a quieter run, or `--rfp-id <DOCDEX_ID>` to pull an RFP already registered in docdex. The PDR is written under `.mcoda/docs/pdr/` by default.
|
|
31
|
+
|
|
32
|
+
- If docdex is unavailable, the command runs in a degraded “local RFP only” mode and warns you.
|
|
33
|
+
- Agent selection uses the workspace default for `docs-pdr-generate` (or any agent with `docdex_query` + `doc_generation` capabilities); override with `--agent <name>`.
|
|
34
|
+
- Flags: `--debug`, `--quiet`, `--no-color`, `--agent-stream false`, `--json`, `--dry-run`, `--workspace-root <path>`, `--project <KEY>`, `--rfp-id` or `--rfp-path`.
|
|
35
|
+
- Workspace config: `.mcoda/config.json` supports `docdexUrl`, `mirrorDocs` (default true), and `branch` metadata for docdex registration.
|
|
36
|
+
|
|
37
|
+
## Generate an SDS from your PDR/RFP context
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
mcoda docs sds generate \
|
|
41
|
+
--workspace-root ~/Documents/apps/test1 \
|
|
42
|
+
--project TEST1 \
|
|
43
|
+
--agent codex \
|
|
44
|
+
--template SDS_backend_service
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Streams agent output by default; pass `--agent-stream false` for quiet mode.
|
|
48
|
+
- Default output: `.mcoda/docs/sds/<project>.md` (override with `--out <FILE>`). Use `--force` to overwrite an existing SDS.
|
|
49
|
+
- Context comes from docdex (RFP + PDR + any existing SDS + OpenAPI); if docdex is down the command falls back to local docs and warns.
|
|
50
|
+
- Flags: `--template <NAME>`, `--agent <NAME>`, `--workspace-root <path>`, `--project <KEY>`, `--agent-stream <true|false>`, `--force`, `--resume <JOB_ID>`, `--dry-run`, `--json`, `--debug`, `--no-color`, `--quiet`.
|
|
51
|
+
- Alias: `mcoda sds ...` forwards to `mcoda docs sds generate`.
|
|
52
|
+
|
|
53
|
+
## Generate the OpenAPI spec from docs
|
|
54
|
+
|
|
55
|
+
Produce or refresh the canonical `openapi/mcoda.yaml` from SDS/PDR context, docdex, and the existing spec:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
mcoda openapi-from-docs --workspace-root . --agent codex --force
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Streams agent output by default; pass `--agent-stream false` to disable streaming.
|
|
62
|
+
- Writes to `openapi/mcoda.yaml` (backs up an existing file to `.bak` when `--force` is used).
|
|
63
|
+
- Use `--dry-run` to print the generated YAML without writing, or `--validate-only` to parse/validate the current spec without invoking an agent.
|
|
64
|
+
|
|
65
|
+
## Inspect the backlog (DB-only)
|
|
66
|
+
|
|
67
|
+
List SP buckets and tasks already stored in the workspace SQLite DB:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
mcoda backlog --project WEB --order dependencies --verbose
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- Flags: `--project <KEY>`, `--epic <KEY>`, `--story <KEY>`, `--assignee <USER>`, `--status <STATUS[,STATUS...]>`, `--order dependencies`, `--json`, `--verbose`, `--workspace-root <path>`.
|
|
74
|
+
- No agents or docdex are called; output comes purely from `.mcoda/mcoda.db`.
|
|
75
|
+
|
|
76
|
+
## Dependency-aware ordering
|
|
77
|
+
|
|
78
|
+
Compute a deterministic, dependency-aware order (most depended-on first, topo-safe) and persist global priorities:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
mcoda order-tasks --project WEB --epic web-01 --include-blocked --json
|
|
82
|
+
mcoda tasks order-by-deps --project WEB --status not_started,in_progress
|
|
83
|
+
mcoda backlog --project WEB --order dependencies # same core ordering
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
- Flags: `--workspace-root <path>`, `--project <KEY>` (required), `--epic <KEY>`, `--status <STATUS_FILTER>`, `--include-blocked`, `--agent <NAME>`, `--agent-stream <true|false>`, `--json`.
|
|
87
|
+
- Behavior: topo order over `task_dependencies`, ties by dependency impact → priority → SP → age → status; blocked tasks are listed separately unless `--include-blocked` is set. Updates `priority` across tasks, stories, and epics in the scoped project.
|
|
88
|
+
|
|
89
|
+
## Create tasks (plan files + DB), then migrate
|
|
90
|
+
|
|
91
|
+
- Generate epics/stories/tasks from SDS/OpenAPI into JSON plan files (and attempt DB insert):
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
mcoda create-tasks \
|
|
95
|
+
--workspace-root . \
|
|
96
|
+
--project TODO \
|
|
97
|
+
--agent openai \
|
|
98
|
+
--doc .mcoda/docs/sds/todo.md \
|
|
99
|
+
--openapi openapi/mcoda.yaml
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Writes plan artifacts to `.mcoda/tasks/<PROJECT>/plan.json` plus `epics.json`, `stories.json`, `tasks.json`. If the DB is busy, the files still persist for later import.
|
|
103
|
+
|
|
104
|
+
- Import (or re-import) the plan into the workspace DB:
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
mcoda migrate-tasks --workspace-root . --project TODO --plan-dir .mcoda/tasks/TODO
|
|
108
|
+
mcoda migrate-tasks --workspace-root . --project TODO --plan-dir .mcoda/tasks/TODO --force # wipes and replaces epics/stories/tasks
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`--force` deletes the project backlog (deps/runs/tasks/stories/epics) before inserting to avoid duplicates.
|
|
112
|
+
|
|
113
|
+
- Optionally apply all saved refinement plans after migrating the base backlog:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
mcoda migrate-tasks \
|
|
117
|
+
--workspace-root . \
|
|
118
|
+
--project TODO \
|
|
119
|
+
--plan-dir .mcoda/tasks/TODO \
|
|
120
|
+
--refine-plans-dir .mcoda/tasks/TODO/refinements
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Command list (partial)
|
|
124
|
+
|
|
125
|
+
- Agents & routing: `mcoda agent ...`, `mcoda routing ...`
|
|
126
|
+
- Planning: `mcoda create-tasks`, `mcoda refine-tasks`
|
|
127
|
+
- Ordering & backlog: `mcoda order-tasks`, `mcoda tasks order-by-deps`, `mcoda backlog --order dependencies`
|
|
128
|
+
- Execution: `mcoda work-on-tasks`, `mcoda code-review`, `mcoda qa-tasks`
|
|
129
|
+
- Docs/spec: `mcoda docs pdr generate`, `mcoda docs sds generate`, `mcoda openapi-from-docs`
|
|
130
|
+
- Telemetry: `mcoda tokens`, `mcoda telemetry`, `mcoda job ...`
|
|
131
|
+
- Workspace bootstrap: `mcoda set-workspace [--workspace-root <path>] [--no-git] [--no-docdex]` (creates `.mcoda`, seeds the SQLite DB, trusts codex CLI, optional git init, and initializes docdex index when available)
|
|
132
|
+
|
|
133
|
+
## Update the CLI
|
|
134
|
+
|
|
135
|
+
Check for updates without applying:
|
|
136
|
+
|
|
137
|
+
```sh
|
|
138
|
+
mcoda update --check --json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Apply the latest release on the chosen channel (defaults to stable):
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
mcoda update --force --channel beta # stable|beta|nightly
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Use `--version <SEMVER>` to pin to a specific published version; `--json` emits machine-readable output, and `--quiet` suppresses non-essential logs. In CI or other non-interactive shells, pass `--force` to skip the confirmation prompt.
|
|
148
|
+
|
|
149
|
+
## Inspect a single task (DB + OpenAPI lookup)
|
|
150
|
+
|
|
151
|
+
Inspect a task with hierarchy, VCS, dependencies, comments, and optional logs/history:
|
|
152
|
+
|
|
153
|
+
```sh
|
|
154
|
+
mcoda task show web-01-us-01-t01 --project WEB --include-logs --include-history --format table
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- Aliases: `mcoda task <KEY>`, `mcoda task-detail --project <KEY> --task <KEY>`.
|
|
158
|
+
- Flags: `--project <KEY>`, `--include-logs`, `--include-history`, `--format <table|json|yaml>` (YAML is experimental), `--no-telemetry`, `--workspace-root <path>`.
|
|
159
|
+
- Lookup: prefers the workspace DB; if `MCODA_API_BASE_URL` (or legacy `MCODA_TASKS_API_URL`) is set, the task key is first resolved via `GET /tasks?key=...` to align with the OpenAPI surface, then hydrated from the local DB for details.
|
|
160
|
+
|
|
161
|
+
## Telemetry: tokens and config
|
|
162
|
+
|
|
163
|
+
Summarize token usage (aggregated via the Telemetry API):
|
|
164
|
+
|
|
165
|
+
```sh
|
|
166
|
+
mcoda tokens --group-by project,command,agent --since 7d --format table
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
- Filters: `--project`, `--agent`, `--command`, `--job`, `--since/--until`, `--group-by <project|agent|command|day|model|job|action>`, `--format <table|json>`.
|
|
170
|
+
|
|
171
|
+
Inspect or toggle telemetry settings:
|
|
172
|
+
|
|
173
|
+
```sh
|
|
174
|
+
mcoda telemetry show
|
|
175
|
+
mcoda telemetry opt-out --strict # disable remote export; strict also disables local logging
|
|
176
|
+
mcoda telemetry opt-in
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Debug a specific job’s token usage:
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
mcoda job tokens <JOB_ID> --since 24h --format table
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Jobs: list, status, logs, resume
|
|
186
|
+
|
|
187
|
+
Keep long-running commands observable and resumable:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
mcoda job list [--project <KEY>] [--status <STATE>] [--type <TYPE>] [--since <DURATION|TS>] [--limit <N>] [--json]
|
|
191
|
+
mcoda job status <JOB_ID> [--json]
|
|
192
|
+
mcoda job watch <JOB_ID> [--interval <SECONDS>] [--no-logs]
|
|
193
|
+
mcoda job logs <JOB_ID> [--since <TIMESTAMP|DURATION>] [--follow]
|
|
194
|
+
mcoda job inspect <JOB_ID> [--json]
|
|
195
|
+
mcoda job resume <JOB_ID> [--agent <NAME>] [--no-telemetry]
|
|
196
|
+
mcoda job cancel <JOB_ID> [--force]
|
|
197
|
+
mcoda job tokens <JOB_ID> [--since <TIMESTAMP|DURATION>] [--format table|json]
|
|
198
|
+
|
|
199
|
+
# Examples
|
|
200
|
+
mcoda job list --status running
|
|
201
|
+
mcoda job watch <JOB_ID> --interval 2 --no-logs
|
|
202
|
+
mcoda job inspect <JOB_ID> --json
|
|
203
|
+
mcoda job resume <JOB_ID> --agent codex
|
|
204
|
+
mcoda job logs <JOB_ID> --since 10m --follow
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Work on tasks (implementation pipeline)
|
|
208
|
+
|
|
209
|
+
Drive tasks from the workspace DB through the agent-powered implementation loop:
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
mcoda work-on-tasks --workspace . --project WEB --status not_started,in_progress --limit 3
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- Scopes: `--project <KEY>` (required), `--task <KEY>...`, `--epic <KEY>`, or `--story <KEY>`. Default statuses: `not_started,in_progress` (override with `--status ...`).
|
|
216
|
+
- Behavior flags: `--limit <N>`, `--parallel <N>`, `--no-commit`, `--dry-run`, `--agent <NAME>`, `--agent-stream <true|false>`, `--json`.
|
|
217
|
+
- Selection & ordering: dependency-aware (skips/reroutes blocked tasks), topo + priority + SP + created_at, with in-progress tie-breaks. Blocked tasks are listed in JSON output (`blocked`).
|
|
218
|
+
- Orchestration: creates `jobs`, `command_runs`, `task_runs`, `task_logs`, and `token_usage` rows in `.mcoda/mcoda.db`, streams agent output by default, and stops tasks at `ready_to_review`. Checkpoints live under `.mcoda/jobs/<jobId>/work/state.json` for resume/debug.
|
|
219
|
+
- Scope & safety: enforces allowed files/tests from task metadata; scope violations are blocked and logged.
|
|
220
|
+
- VCS: ensures `.mcoda` exists and is gitignored, creates deterministic task branches (`mcoda/task/<TASK_KEY>`) from the base branch (default `mcoda-dev`), respects remotes when present, and skips commit/push on `--no-commit` or `--dry-run`.
|
|
221
|
+
|
|
222
|
+
## Use a remote Ollama agent (GPU offload)
|
|
223
|
+
|
|
224
|
+
Point mcoda at a remote Ollama host (e.g., `sukunahikona` on your LAN/VPN):
|
|
225
|
+
|
|
226
|
+
```sh
|
|
227
|
+
mcoda agent add suku-ollama \
|
|
228
|
+
--adapter ollama-remote \
|
|
229
|
+
--model gpt-oss:20b \
|
|
230
|
+
--config-base-url http://192.168.1.115:11434 \
|
|
231
|
+
--capability plan --capability code_write --capability code_review
|
|
232
|
+
|
|
233
|
+
mcoda test-agent suku-ollama # quick health check
|
|
234
|
+
mcoda agent use suku-ollama # set as default for workspace
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Firewall guidance: Ollama has no auth; keep it bound to localhost or LAN IP and allowlist only trusted IPs (VPN/LAN). If exposing via the internet, use a reverse proxy with auth/TLS and open port 11434 only to trusted sources.
|
|
238
|
+
|
|
239
|
+
## Code review (review pipeline)
|
|
240
|
+
|
|
241
|
+
Run AI-assisted review on task branches and write findings to the workspace DB:
|
|
242
|
+
|
|
243
|
+
```sh
|
|
244
|
+
mcoda code-review --workspace . --project WEB --status ready_to_review --limit 5 --base mcoda-dev --agent reviewer
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- Scopes: `--project <KEY>`, `--task <KEY>...`, `--epic <KEY>`, `--story <KEY>`, default `--status ready_to_review` (override with `--status ...`), optional `--limit <N>`.
|
|
248
|
+
- Behavior: `--base <BRANCH>` (diff base), `--dry-run` (skip status transitions), `--resume <JOB_ID>`, `--agent <NAME>`, `--agent-stream <true|false>` (default true), `--json`.
|
|
249
|
+
- Outputs & side effects: creates `jobs`/`command_runs`/`task_runs`, writes `task_comments` + `task_reviews`, records `token_usage`, may auto-create follow-up tasks for review findings, and transitions tasks (`ready_to_review → ready_to_qa/in_progress/blocked` unless `--dry-run`). Artifacts (diffs, context, checkpoints) under `.mcoda/jobs/<jobId>/review/`. JSON output shape: `{ job: {id, commandRunId}, tasks: [...], errors: [...], warnings: [...] }`.
|
|
250
|
+
|
|
251
|
+
## QA tasks (QA pipeline)
|
|
252
|
+
|
|
253
|
+
Run automated or manual QA on tasks in the workspace DB:
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
mcoda qa-tasks --workspace . --project WEB --status ready_to_qa --profile ui --agent qa
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
- Scopes: `--project <KEY>` (required), `--task <KEY>...`, `--epic <KEY>`, `--story <KEY>`, default `--status ready_to_qa` (override for regression runs).
|
|
260
|
+
- Modes: `--mode auto` (default; runs CLI/Chromium/Maestro via QA profiles) or `--mode manual --result pass|fail|blocked [--notes "..."] [--evidence-url "..."]`.
|
|
261
|
+
- Profiles & runners: `--profile <NAME>` or `--level unit|integration|acceptance`, `--test-command "<CMD>"` override for CLI runner. Agent streaming defaults to true (`--agent-stream false` to quiet). Resume a QA sweep with `--resume <JOB_ID>`.
|
|
262
|
+
- Outputs & state: creates `jobs`/`command_runs`/`task_runs`/`task_qa_runs`, writes `task_comments`, records `token_usage`, and applies TaskStateService transitions (`ready_to_qa → completed/in_progress/blocked` unless `--dry-run`). Artifacts live under `.mcoda/jobs/<jobId>/qa/<task_key>/`.
|
|
263
|
+
- Manual example: `mcoda qa-tasks --project WEB --task web-01-us-01-t01 --mode manual --result fail --notes "Checkout button unresponsive" --evidence-url https://ci.example/run/123`.
|
|
264
|
+
|
|
265
|
+
## Routing defaults, preview, and explain
|
|
266
|
+
|
|
267
|
+
Use the OpenAPI-backed router to inspect or update workspace defaults:
|
|
268
|
+
|
|
269
|
+
```sh
|
|
270
|
+
# Show effective defaults (workspace + __GLOBAL__ fallback)
|
|
271
|
+
mcoda routing defaults [--workspace <PATH>] [--json]
|
|
272
|
+
|
|
273
|
+
# Update defaults (only the provided flags are changed)
|
|
274
|
+
mcoda routing defaults \
|
|
275
|
+
--set-command create-tasks=codex \
|
|
276
|
+
--set-qa-profile integration \
|
|
277
|
+
--set-docdex-scope sds
|
|
278
|
+
|
|
279
|
+
# Reset a command to inherit from __GLOBAL__
|
|
280
|
+
mcoda routing defaults --reset-command work-on-tasks
|
|
281
|
+
|
|
282
|
+
# Preview which agent would run a command (honors --agent override)
|
|
283
|
+
mcoda routing preview \
|
|
284
|
+
--command work-on-tasks \
|
|
285
|
+
[--agent <SLUG>] \
|
|
286
|
+
[--task-type <TYPE>] \
|
|
287
|
+
[--project <KEY>] \
|
|
288
|
+
[--json]
|
|
289
|
+
|
|
290
|
+
# Explain the routing decision with candidates/health/capabilities
|
|
291
|
+
mcoda routing explain \
|
|
292
|
+
--command create-tasks \
|
|
293
|
+
[--agent <SLUG>] \
|
|
294
|
+
[--task-type <TYPE>] \
|
|
295
|
+
[--debug] \
|
|
296
|
+
[--json]
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Flags & behavior:
|
|
300
|
+
- `--workspace <PATH>` resolves workspace_id + DB paths via WorkspaceResolver; omitted uses CWD.
|
|
301
|
+
- Defaults: `--set-command <cmd>=<agent>` (validates against global agents + required capabilities), `--reset-command <cmd>`, `--set-qa-profile <NAME>`, `--set-docdex-scope <NAME>`. With no setters, `--list` is implied.
|
|
302
|
+
- Preview/explain: validate command names via OpenAPI `x-mcoda-cli.name`; source shows `override|workspace_default|global_default`; explain prints candidate agents with health/capabilities/missing caps.
|
|
303
|
+
- Output: human-friendly tables by default; `--json` emits raw `RoutingDefaults` or `RoutingPreview` DTOs. `--debug` surfaces extra trace fields when available.
|
|
304
|
+
|
|
305
|
+
## Documentation
|
|
306
|
+
- Usage guide: `docs/usage.md`
|
|
307
|
+
- Quality gates: `docs/quality_gates.md`
|
|
308
|
+
- Release history: `CHANGELOG.md`
|
|
309
|
+
|
|
310
|
+
## Contributing
|
|
311
|
+
- `CONTRIBUTING.md`
|
|
312
|
+
|
|
313
|
+
## License
|
|
314
|
+
MIT - see `LICENSE`.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# mcoda OSS publishing plan
|
|
2
|
+
|
|
3
|
+
## Goals
|
|
4
|
+
- Mirror docdex OSS release hygiene for mcoda: docs, license, CI, release automation, and tests.
|
|
5
|
+
- Prepare npm publishing with clear metadata and repeatable release steps.
|
|
6
|
+
|
|
7
|
+
## Docdex items to replicate
|
|
8
|
+
- Core docs: README, LICENSE, CHANGELOG, CONTRIBUTING, CLA.
|
|
9
|
+
- Npm-facing docs: README, CHANGELOG, LICENSE in the published package.
|
|
10
|
+
- Issue templates and release workflows (ci, nightly, release-please, release, dry-run).
|
|
11
|
+
- Quality gates doc and packaging/test guardrails.
|
|
12
|
+
|
|
13
|
+
## Plan
|
|
14
|
+
1) Documentation and governance
|
|
15
|
+
- Add root LICENSE, CHANGELOG, CONTRIBUTING, CLA.
|
|
16
|
+
- Expand README with npm install, quick start, and support links.
|
|
17
|
+
- Add `docs/usage.md` and `docs/quality_gates.md` for deeper usage + release quality checks.
|
|
18
|
+
|
|
19
|
+
2) Package metadata and npm layout
|
|
20
|
+
- Decide package name (`mcoda` vs `@mcoda/cli`) and versioning scheme.
|
|
21
|
+
- Ensure runtime packages are publishable (cli, core, shared, db, integrations, agents).
|
|
22
|
+
- Mark non-public packages as private.
|
|
23
|
+
- Add metadata (description, repository, bugs, homepage, keywords, engines, license, files).
|
|
24
|
+
- Add npm packaging guard test (tarball content sanity).
|
|
25
|
+
|
|
26
|
+
3) CI and release automation
|
|
27
|
+
- Add CI workflow: build + test on push/PR.
|
|
28
|
+
- Add nightly quality workflow: audit + tests + packaging checks.
|
|
29
|
+
- Add release-please config + manifest for versioning.
|
|
30
|
+
- Add release workflow for npm publish with OIDC.
|
|
31
|
+
- Add release dry-run workflow.
|
|
32
|
+
- Add GitHub issue templates.
|
|
33
|
+
|
|
34
|
+
4) Verification
|
|
35
|
+
- Run local build/tests and npm pack dry-run for the CLI.
|
|
36
|
+
- Validate workflows are consistent with the repo structure.
|
|
37
|
+
|
|
38
|
+
## Decisions (current)
|
|
39
|
+
- npm package name: `mcoda`.
|
|
40
|
+
- Published packages: `mcoda`, `@mcoda/core`, `@mcoda/shared`, `@mcoda/db`, `@mcoda/integrations`, `@mcoda/agents`.
|
|
41
|
+
- Private packages: `@mcoda/generators`, `@mcoda/testing`.
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# mcoda Quality Gates
|
|
2
|
+
|
|
3
|
+
This document defines baseline quality gates for mcoda releases. Use it for release readiness checks and nightly CI.
|
|
4
|
+
|
|
5
|
+
## Release targets (global)
|
|
6
|
+
- Stability:
|
|
7
|
+
- Core CLI flows complete without unhandled exceptions.
|
|
8
|
+
- Workspace initialization creates `.mcoda` and the SQLite DB reliably.
|
|
9
|
+
- Task creation, ordering, and migrations succeed on sample projects.
|
|
10
|
+
- Performance:
|
|
11
|
+
- Dependency ordering completes within 5s for 10k tasks on a laptop.
|
|
12
|
+
- Backlog listing for 1k tasks completes within 3s.
|
|
13
|
+
- Security:
|
|
14
|
+
- No critical/high CVEs in direct dependencies.
|
|
15
|
+
- Secrets are never printed in CLI output or logs.
|
|
16
|
+
- Documentation:
|
|
17
|
+
- README and `docs/usage.md` cover new flags and behavior changes.
|
|
18
|
+
- Changelog updated for user-facing changes.
|
|
19
|
+
- Tests:
|
|
20
|
+
- Unit and integration tests pass across workspace packages.
|
|
21
|
+
- Packaging guardrails pass (no accidental artifacts in npm tarball).
|
|
22
|
+
|
|
23
|
+
## Nightly checks
|
|
24
|
+
- `pnpm -r run build`
|
|
25
|
+
- `node tests/all.js`
|
|
26
|
+
- `pnpm --filter mcoda run pack:verify`
|
|
27
|
+
- `pnpm audit --audit-level high`
|
|
28
|
+
|
|
29
|
+
## Evidence artifacts
|
|
30
|
+
- Test logs from CI runs.
|
|
31
|
+
- Pack dry-run output from `npm pack --dry-run --json`.
|
|
32
|
+
- Audit output stored in CI logs.
|
|
File without changes
|