@orchestrator-claude/cli 1.4.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.
Files changed (176) hide show
  1. package/README.md +74 -0
  2. package/dist/api-client/OrchestratorAPIClient.d.ts +111 -0
  3. package/dist/api-client/OrchestratorAPIClient.d.ts.map +1 -0
  4. package/dist/api-client/OrchestratorAPIClient.js +176 -0
  5. package/dist/api-client/OrchestratorAPIClient.js.map +1 -0
  6. package/dist/api-client/index.d.ts +11 -0
  7. package/dist/api-client/index.d.ts.map +1 -0
  8. package/dist/api-client/index.js +10 -0
  9. package/dist/api-client/index.js.map +1 -0
  10. package/dist/api-client/retry.d.ts +29 -0
  11. package/dist/api-client/retry.d.ts.map +1 -0
  12. package/dist/api-client/retry.js +85 -0
  13. package/dist/api-client/retry.js.map +1 -0
  14. package/dist/api-client/types.d.ts +148 -0
  15. package/dist/api-client/types.d.ts.map +1 -0
  16. package/dist/api-client/types.js +10 -0
  17. package/dist/api-client/types.js.map +1 -0
  18. package/dist/commands/AgentsCommand.d.ts +74 -0
  19. package/dist/commands/AgentsCommand.d.ts.map +1 -0
  20. package/dist/commands/AgentsCommand.js +170 -0
  21. package/dist/commands/AgentsCommand.js.map +1 -0
  22. package/dist/commands/InitCommand.d.ts +63 -0
  23. package/dist/commands/InitCommand.d.ts.map +1 -0
  24. package/dist/commands/InitCommand.js +150 -0
  25. package/dist/commands/InitCommand.js.map +1 -0
  26. package/dist/commands/MigrateCommand.d.ts +93 -0
  27. package/dist/commands/MigrateCommand.d.ts.map +1 -0
  28. package/dist/commands/MigrateCommand.js +260 -0
  29. package/dist/commands/MigrateCommand.js.map +1 -0
  30. package/dist/commands/StatusCommand.d.ts +61 -0
  31. package/dist/commands/StatusCommand.d.ts.map +1 -0
  32. package/dist/commands/StatusCommand.js +142 -0
  33. package/dist/commands/StatusCommand.js.map +1 -0
  34. package/dist/commands/TemplatesCommand.d.ts +69 -0
  35. package/dist/commands/TemplatesCommand.d.ts.map +1 -0
  36. package/dist/commands/TemplatesCommand.js +147 -0
  37. package/dist/commands/TemplatesCommand.js.map +1 -0
  38. package/dist/commands/WorkflowCommand.d.ts +82 -0
  39. package/dist/commands/WorkflowCommand.d.ts.map +1 -0
  40. package/dist/commands/WorkflowCommand.js +203 -0
  41. package/dist/commands/WorkflowCommand.js.map +1 -0
  42. package/dist/config/CLIConfig.d.ts +66 -0
  43. package/dist/config/CLIConfig.d.ts.map +1 -0
  44. package/dist/config/CLIConfig.js +60 -0
  45. package/dist/config/CLIConfig.js.map +1 -0
  46. package/dist/formatters/OutputFormatter.d.ts +102 -0
  47. package/dist/formatters/OutputFormatter.d.ts.map +1 -0
  48. package/dist/formatters/OutputFormatter.js +182 -0
  49. package/dist/formatters/OutputFormatter.js.map +1 -0
  50. package/dist/index.d.ts +15 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +249 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/templates/.gitkeep +0 -0
  55. package/dist/templates/TemplateEngine.d.ts +90 -0
  56. package/dist/templates/TemplateEngine.d.ts.map +1 -0
  57. package/dist/templates/TemplateEngine.js +149 -0
  58. package/dist/templates/TemplateEngine.js.map +1 -0
  59. package/dist/templates/base/CLAUDE.md.hbs +362 -0
  60. package/dist/templates/base/claude/agents/implementer.md +446 -0
  61. package/dist/templates/base/claude/agents/orchestrator.md +155 -0
  62. package/dist/templates/base/claude/agents/planner.md +348 -0
  63. package/dist/templates/base/claude/agents/researcher.md +390 -0
  64. package/dist/templates/base/claude/agents/reviewer.md +444 -0
  65. package/dist/templates/base/claude/agents/specifier.md +331 -0
  66. package/dist/templates/base/claude/agents/task-generator.md +382 -0
  67. package/dist/templates/base/claude/hooks/post-artifact-generate.sh +39 -0
  68. package/dist/templates/base/claude/hooks/post-implement-validate.sh +139 -0
  69. package/dist/templates/base/claude/hooks/post-phase-checkpoint.sh +322 -0
  70. package/dist/templates/base/claude/hooks/pre-agent-invoke.sh +34 -0
  71. package/dist/templates/base/claude/hooks/pre-phase-advance.sh +40 -0
  72. package/dist/templates/base/claude/hooks/track-agent-invocation.sh +230 -0
  73. package/dist/templates/base/claude/orchestrator-config.json +141 -0
  74. package/dist/templates/base/claude/settings.json +80 -0
  75. package/dist/templates/base/claude/skills/artifact-validator/SKILL.md +226 -0
  76. package/dist/templates/base/claude/skills/docs-guardian/SKILL.md +230 -0
  77. package/dist/templates/base/claude/skills/kb-lookup/SKILL.md +257 -0
  78. package/dist/templates/base/claude/skills/phase-gate-evaluator/SKILL.md +274 -0
  79. package/dist/templates/base/claude/skills/workflow-status/SKILL.md +322 -0
  80. package/dist/templates/base/docker-compose.yml.hbs +20 -0
  81. package/dist/templates/base/mcp.json.hbs +37 -0
  82. package/dist/templates/base/orchestrator/.state/.gitkeep +0 -0
  83. package/dist/templates/base/orchestrator-index.json.hbs +37 -0
  84. package/dist/templates/base/package.json.hbs +40 -0
  85. package/dist/templates/default/.orchestrator/orchestrator-index.json +19 -0
  86. package/dist/templates/default/README.md +58 -0
  87. package/dist/templates/default/docker-compose.yml +24 -0
  88. package/dist/templates/default/template.json +10 -0
  89. package/dist/templates/projects/api/files/index.ts.hbs +30 -0
  90. package/dist/templates/projects/api/files/server.ts.hbs +63 -0
  91. package/dist/templates/projects/api/files/tsconfig.json.hbs +27 -0
  92. package/dist/templates/projects/api/files/vitest.config.ts.hbs +28 -0
  93. package/dist/templates/projects/api/template.config.json +238 -0
  94. package/dist/templates/projects/api/template.config.ts +149 -0
  95. package/dist/templates/projects/cli/files/cli.ts.hbs +50 -0
  96. package/dist/templates/projects/cli/files/index.ts.hbs +8 -0
  97. package/dist/templates/projects/cli/files/tsconfig.json.hbs +27 -0
  98. package/dist/templates/projects/cli/files/vitest.config.ts.hbs +28 -0
  99. package/dist/templates/projects/cli/template.config.json +213 -0
  100. package/dist/templates/projects/cli/template.config.ts +126 -0
  101. package/dist/templates/projects/frontend/files/App.tsx.hbs +31 -0
  102. package/dist/templates/projects/frontend/files/index.html.hbs +13 -0
  103. package/dist/templates/projects/frontend/files/main.tsx.hbs +22 -0
  104. package/dist/templates/projects/frontend/files/tsconfig.json.hbs +34 -0
  105. package/dist/templates/projects/frontend/files/tsconfig.node.json.hbs +10 -0
  106. package/dist/templates/projects/frontend/files/vite.config.ts.hbs +19 -0
  107. package/dist/templates/projects/frontend/files/vitest.config.ts.hbs +36 -0
  108. package/dist/templates/projects/frontend/template.config.json +241 -0
  109. package/dist/templates/projects/frontend/template.config.ts +153 -0
  110. package/dist/templates/projects/minimal/files/claude-settings.json.hbs +20 -0
  111. package/dist/templates/projects/minimal/files/env.example.hbs +17 -0
  112. package/dist/templates/projects/minimal/files/gitignore.hbs +41 -0
  113. package/dist/templates/projects/minimal/files/index.ts.hbs +13 -0
  114. package/dist/templates/projects/minimal/files/tsconfig.json.hbs +27 -0
  115. package/dist/templates/projects/minimal/template.config.json +185 -0
  116. package/dist/templates/projects/minimal/template.config.ts +88 -0
  117. package/package.json +37 -0
  118. package/templates/.gitkeep +0 -0
  119. package/templates/base/CLAUDE.md.hbs +362 -0
  120. package/templates/base/claude/agents/implementer.md +446 -0
  121. package/templates/base/claude/agents/orchestrator.md +155 -0
  122. package/templates/base/claude/agents/planner.md +348 -0
  123. package/templates/base/claude/agents/researcher.md +390 -0
  124. package/templates/base/claude/agents/reviewer.md +444 -0
  125. package/templates/base/claude/agents/specifier.md +331 -0
  126. package/templates/base/claude/agents/task-generator.md +382 -0
  127. package/templates/base/claude/hooks/post-artifact-generate.sh +39 -0
  128. package/templates/base/claude/hooks/post-implement-validate.sh +139 -0
  129. package/templates/base/claude/hooks/post-phase-checkpoint.sh +322 -0
  130. package/templates/base/claude/hooks/pre-agent-invoke.sh +34 -0
  131. package/templates/base/claude/hooks/pre-phase-advance.sh +40 -0
  132. package/templates/base/claude/hooks/track-agent-invocation.sh +230 -0
  133. package/templates/base/claude/orchestrator-config.json +141 -0
  134. package/templates/base/claude/settings.json +80 -0
  135. package/templates/base/claude/skills/artifact-validator/SKILL.md +226 -0
  136. package/templates/base/claude/skills/docs-guardian/SKILL.md +230 -0
  137. package/templates/base/claude/skills/kb-lookup/SKILL.md +257 -0
  138. package/templates/base/claude/skills/phase-gate-evaluator/SKILL.md +274 -0
  139. package/templates/base/claude/skills/workflow-status/SKILL.md +322 -0
  140. package/templates/base/docker-compose.yml.hbs +20 -0
  141. package/templates/base/mcp.json.hbs +37 -0
  142. package/templates/base/orchestrator/.state/.gitkeep +0 -0
  143. package/templates/base/orchestrator-index.json.hbs +37 -0
  144. package/templates/base/package.json.hbs +40 -0
  145. package/templates/default/.orchestrator/orchestrator-index.json +19 -0
  146. package/templates/default/README.md +58 -0
  147. package/templates/default/docker-compose.yml +24 -0
  148. package/templates/default/template.json +10 -0
  149. package/templates/projects/api/files/index.ts.hbs +30 -0
  150. package/templates/projects/api/files/server.ts.hbs +63 -0
  151. package/templates/projects/api/files/tsconfig.json.hbs +27 -0
  152. package/templates/projects/api/files/vitest.config.ts.hbs +28 -0
  153. package/templates/projects/api/template.config.json +238 -0
  154. package/templates/projects/api/template.config.ts +149 -0
  155. package/templates/projects/cli/files/cli.ts.hbs +50 -0
  156. package/templates/projects/cli/files/index.ts.hbs +8 -0
  157. package/templates/projects/cli/files/tsconfig.json.hbs +27 -0
  158. package/templates/projects/cli/files/vitest.config.ts.hbs +28 -0
  159. package/templates/projects/cli/template.config.json +213 -0
  160. package/templates/projects/cli/template.config.ts +126 -0
  161. package/templates/projects/frontend/files/App.tsx.hbs +31 -0
  162. package/templates/projects/frontend/files/index.html.hbs +13 -0
  163. package/templates/projects/frontend/files/main.tsx.hbs +22 -0
  164. package/templates/projects/frontend/files/tsconfig.json.hbs +34 -0
  165. package/templates/projects/frontend/files/tsconfig.node.json.hbs +10 -0
  166. package/templates/projects/frontend/files/vite.config.ts.hbs +19 -0
  167. package/templates/projects/frontend/files/vitest.config.ts.hbs +36 -0
  168. package/templates/projects/frontend/template.config.json +241 -0
  169. package/templates/projects/frontend/template.config.ts +153 -0
  170. package/templates/projects/minimal/files/claude-settings.json.hbs +20 -0
  171. package/templates/projects/minimal/files/env.example.hbs +17 -0
  172. package/templates/projects/minimal/files/gitignore.hbs +41 -0
  173. package/templates/projects/minimal/files/index.ts.hbs +13 -0
  174. package/templates/projects/minimal/files/tsconfig.json.hbs +27 -0
  175. package/templates/projects/minimal/template.config.json +185 -0
  176. package/templates/projects/minimal/template.config.ts +88 -0
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "version": "0.1.0",
4
+ "description": "Project created with Orchestrator CLI",
5
+ "type": "module",
6
+ {{#if main}}"main": "{{main}}",
7
+ {{/if}}"scripts": {
8
+ {{#if scripts.start}}"start": "{{{scripts.start}}}"{{else}}"start": "node dist/index.js"{{/if}},
9
+ {{#if scripts.dev}}"dev": "{{{scripts.dev}}}"{{else}}"dev": "tsx watch src/index.ts"{{/if}},
10
+ {{#if scripts.build}}"build": "{{{scripts.build}}}"{{else}}"build": "tsc"{{/if}},
11
+ {{#if scripts.preview}}"preview": "{{{scripts.preview}}}",
12
+ {{/if}}"test": "{{#if scripts.test}}{{{scripts.test}}}{{else}}vitest{{/if}}",
13
+ "test:coverage": "{{#if scripts.[test:coverage]}}{{{scripts.[test:coverage]}}}{{else}}vitest --coverage{{/if}}",
14
+ "lint": "{{#if scripts.lint}}{{{scripts.lint}}}{{else}}eslint src --ext .ts{{/if}}",
15
+ "lint:fix": "{{#if scripts.[lint:fix]}}{{{scripts.[lint:fix]}}}{{else}}eslint src --ext .ts --fix{{/if}}"
16
+ },
17
+ "keywords": [
18
+ "orchestrator"
19
+ ],
20
+ "author": "",
21
+ "license": "MIT",
22
+ "dependencies": {
23
+ "@orchestrator/core": "git+ssh://git@github.com/orchestratorAII/orchestrator_claude.git#v1.3.0"{{#if dependencies}}{{#each dependencies}},
24
+ "{{@key}}": "{{this}}"{{/each}}{{/if}}
25
+ },
26
+ "devDependencies": {
27
+ "@types/node": "^24.0.0",
28
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
29
+ "@typescript-eslint/parser": "^8.0.0",
30
+ "eslint": "^9.0.0",
31
+ "tsx": "^4.0.0",
32
+ "typescript": "^5.9.0",
33
+ "vitest": "^4.0.0",
34
+ "@vitest/coverage-v8": "^4.0.0"{{#if devDependencies}}{{#each devDependencies}},
35
+ "{{@key}}": "{{this}}"{{/each}}{{/if}}
36
+ },
37
+ "engines": {
38
+ "node": ">=18.0.0"
39
+ }
40
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "1.4.0",
3
+ "activeWorkflow": null,
4
+ "workflows": [],
5
+ "artifacts": [],
6
+ "gates": {},
7
+ "checkpoints": [],
8
+ "agentInvocations": [],
9
+ "hookExecutions": [],
10
+ "defaultHooks": {
11
+ "postImplement": {
12
+ "agent": "docs-guardian",
13
+ "mode": "auto",
14
+ "blocking": false,
15
+ "enabled": true,
16
+ "scope": "all"
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,58 @@
1
+ # {{projectName}}
2
+
3
+ Orchestrator project initialized with version {{orchestratorVersion}}.
4
+
5
+ ## Getting Started
6
+
7
+ ### Using Docker Compose
8
+
9
+ Start the Orchestrator API:
10
+
11
+ ```bash
12
+ docker-compose up -d
13
+ ```
14
+
15
+ Check status:
16
+
17
+ ```bash
18
+ orchestrator status
19
+ ```
20
+
21
+ ### Using CLI
22
+
23
+ Create a new workflow:
24
+
25
+ ```bash
26
+ orchestrator workflow detect "Create authentication API"
27
+ orchestrator workflow start feature_development
28
+ ```
29
+
30
+ Check workflow status:
31
+
32
+ ```bash
33
+ orchestrator status
34
+ ```
35
+
36
+ ## Project Structure
37
+
38
+ ```
39
+ {{projectName}}/
40
+ ├── .orchestrator/ # Orchestrator state and artifacts
41
+ │ ├── orchestrator-index.json
42
+ │ ├── artifacts/
43
+ │ ├── memory/
44
+ │ └── checkpoints/
45
+ ├── docker-compose.yml # Docker Compose configuration
46
+ └── README.md # This file
47
+ ```
48
+
49
+ ## Documentation
50
+
51
+ For more information, see:
52
+ - [Orchestrator Documentation](https://github.com/anthropics/orchestrator)
53
+ - [CLAUDE.md](./CLAUDE.md) - Project instructions for Claude Code
54
+
55
+ ## Version
56
+
57
+ - Orchestrator: {{orchestratorVersion}}
58
+ - Project: {{projectName}}
@@ -0,0 +1,24 @@
1
+ version: '3.8'
2
+
3
+ services:
4
+ orchestrator-api:
5
+ image: orchestrator-api:{{orchestratorVersion}}
6
+ container_name: {{projectName}}-api
7
+ ports:
8
+ - "3000:3000"
9
+ volumes:
10
+ - ./.orchestrator:/app/.orchestrator
11
+ environment:
12
+ NODE_ENV: production
13
+ PORT: 3000
14
+ restart: unless-stopped
15
+
16
+ orchestrator-cli:
17
+ image: orchestrator-cli:{{orchestratorVersion}}
18
+ container_name: {{projectName}}-cli
19
+ volumes:
20
+ - ./.orchestrator:/app/.orchestrator
21
+ environment:
22
+ ORCHESTRATOR_API_URL: http://orchestrator-api:3000
23
+ depends_on:
24
+ - orchestrator-api
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "default",
3
+ "description": "Default Orchestrator project with API and CLI",
4
+ "version": "1.4.0",
5
+ "files": [
6
+ "docker-compose.yml",
7
+ ".orchestrator/orchestrator-index.json",
8
+ "README.md"
9
+ ]
10
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Application Entry Point
3
+ *
4
+ * Bootstraps the Express server with Clean Architecture principles.
5
+ */
6
+
7
+ import { config } from 'dotenv';
8
+ import { createServer } from './server.js';
9
+
10
+ // Load environment variables
11
+ config();
12
+
13
+ const PORT = process.env.PORT || 3000;
14
+ const HOST = process.env.HOST || '0.0.0.0';
15
+
16
+ async function main() {
17
+ try {
18
+ const app = createServer();
19
+
20
+ app.listen(PORT, () => {
21
+ console.log(`🚀 Server running at http://${HOST}:${PORT}`);
22
+ console.log(`📝 Environment: ${process.env.NODE_ENV || 'development'}`);
23
+ });
24
+ } catch (error) {
25
+ console.error('❌ Failed to start server:', error);
26
+ process.exit(1);
27
+ }
28
+ }
29
+
30
+ main();
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Server Configuration
3
+ *
4
+ * Creates and configures the Express application.
5
+ */
6
+
7
+ import express, { type Express, type Request, type Response, type NextFunction } from 'express';
8
+ import cors from 'cors';
9
+ import helmet from 'helmet';
10
+
11
+ /**
12
+ * Creates the Express server with middleware and routes
13
+ */
14
+ export function createServer(): Express {
15
+ const app = express();
16
+
17
+ // Security middleware
18
+ app.use(helmet());
19
+ app.use(cors());
20
+
21
+ // Body parsing middleware
22
+ app.use(express.json());
23
+ app.use(express.urlencoded({ extended: true }));
24
+
25
+ // Health check endpoint
26
+ app.get('/health', (req: Request, res: Response) => {
27
+ res.status(200).json({
28
+ status: 'ok',
29
+ timestamp: new Date().toISOString(),
30
+ service: '{{projectName}}',
31
+ });
32
+ });
33
+
34
+ // API routes
35
+ app.get('/api/v1', (req: Request, res: Response) => {
36
+ res.status(200).json({
37
+ message: 'Welcome to {{projectName}} API',
38
+ version: '1.0.0',
39
+ });
40
+ });
41
+
42
+ // 404 handler
43
+ app.use((req: Request, res: Response) => {
44
+ res.status(404).json({
45
+ error: 'Not Found',
46
+ message: `Route ${req.method} ${req.path} not found`,
47
+ });
48
+ });
49
+
50
+ // Error handler
51
+ app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
52
+ console.error('Error:', err);
53
+
54
+ res.status(500).json({
55
+ error: 'Internal Server Error',
56
+ message: process.env.NODE_ENV === 'production'
57
+ ? 'An unexpected error occurred'
58
+ : err.message,
59
+ });
60
+ });
61
+
62
+ return app;
63
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ES2022",
5
+ "lib": ["ES2022"],
6
+ "moduleResolution": "node",
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "resolveJsonModule": true,
10
+ "isolatedModules": true,
11
+ "strict": true,
12
+ "noUnusedLocals": true,
13
+ "noUnusedParameters": true,
14
+ "noImplicitReturns": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "skipLibCheck": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "outDir": "./dist",
19
+ "rootDir": "./src",
20
+ "declaration": true,
21
+ "declarationMap": true,
22
+ "sourceMap": true,
23
+ "types": ["node", "vitest/globals"]
24
+ },
25
+ "include": ["src/**/*"],
26
+ "exclude": ["node_modules", "dist", "tests"]
27
+ }
@@ -0,0 +1,28 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ environment: 'node',
7
+ coverage: {
8
+ provider: 'v8',
9
+ reporter: ['text', 'json', 'html', 'lcov'],
10
+ exclude: [
11
+ 'node_modules/',
12
+ 'dist/',
13
+ 'tests/',
14
+ '**/*.d.ts',
15
+ '**/*.config.*',
16
+ '**/index.ts',
17
+ ],
18
+ thresholds: {
19
+ lines: 80,
20
+ functions: 80,
21
+ branches: 80,
22
+ statements: 80,
23
+ },
24
+ },
25
+ include: ['tests/**/*.test.ts'],
26
+ exclude: ['node_modules', 'dist'],
27
+ },
28
+ });
@@ -0,0 +1,238 @@
1
+ {
2
+ "name": "api",
3
+ "description": "REST API with Express and Clean Architecture",
4
+ "version": "1.0.0",
5
+ "directories": [
6
+ ".orchestrator",
7
+ ".orchestrator/artifacts",
8
+ ".orchestrator/artifacts/research",
9
+ ".orchestrator/artifacts/specify",
10
+ ".orchestrator/artifacts/plan",
11
+ ".orchestrator/artifacts/tasks",
12
+ ".orchestrator/artifacts/implement",
13
+ ".orchestrator/workflows",
14
+ ".orchestrator/memory",
15
+ ".orchestrator/memory/knowledge-base",
16
+ ".orchestrator/memory/knowledge-base/core",
17
+ ".orchestrator/memory/knowledge-base/contextual",
18
+ ".orchestrator/memory/knowledge-base/research",
19
+ ".orchestrator/checkpoints",
20
+ ".orchestrator/.state",
21
+ ".claude",
22
+ ".claude/agents",
23
+ ".claude/skills",
24
+ ".claude/skills/artifact-validator",
25
+ ".claude/skills/kb-lookup",
26
+ ".claude/skills/phase-gate-evaluator",
27
+ ".claude/skills/workflow-status",
28
+ ".claude/skills/docs-guardian",
29
+ ".claude/hooks",
30
+ "src",
31
+ "src/domain",
32
+ "src/domain/entities",
33
+ "src/domain/value-objects",
34
+ "src/domain/repositories",
35
+ "src/application",
36
+ "src/application/use-cases",
37
+ "src/application/ports",
38
+ "src/infrastructure",
39
+ "src/infrastructure/persistence",
40
+ "src/infrastructure/adapters",
41
+ "src/presentation",
42
+ "src/presentation/routes",
43
+ "src/presentation/middleware",
44
+ "tests",
45
+ "tests/domain",
46
+ "tests/application",
47
+ "tests/infrastructure",
48
+ "tests/presentation"
49
+ ],
50
+ "files": [
51
+ {
52
+ "source": "projects/api/files/index.ts.hbs",
53
+ "destination": "src/index.ts",
54
+ "template": true
55
+ },
56
+ {
57
+ "source": "projects/api/files/tsconfig.json.hbs",
58
+ "destination": "tsconfig.json",
59
+ "template": true
60
+ },
61
+ {
62
+ "source": "projects/api/files/vitest.config.ts.hbs",
63
+ "destination": "vitest.config.ts",
64
+ "template": true
65
+ },
66
+ {
67
+ "source": "projects/api/files/server.ts.hbs",
68
+ "destination": "src/server.ts",
69
+ "template": true
70
+ },
71
+ {
72
+ "source": "projects/minimal/files/gitignore.hbs",
73
+ "destination": ".gitignore",
74
+ "template": true
75
+ },
76
+ {
77
+ "source": "projects/minimal/files/env.example.hbs",
78
+ "destination": ".env.example",
79
+ "template": true
80
+ },
81
+ {
82
+ "source": "base/CLAUDE.md.hbs",
83
+ "destination": "CLAUDE.md",
84
+ "template": true
85
+ },
86
+ {
87
+ "source": "base/mcp.json.hbs",
88
+ "destination": ".mcp.json",
89
+ "template": true
90
+ },
91
+ {
92
+ "source": "base/package.json.hbs",
93
+ "destination": "package.json",
94
+ "template": true
95
+ },
96
+ {
97
+ "source": "base/orchestrator-index.json.hbs",
98
+ "destination": ".orchestrator/orchestrator-index.json",
99
+ "template": true
100
+ },
101
+ {
102
+ "source": "base/claude/settings.json",
103
+ "destination": ".claude/settings.json",
104
+ "template": false
105
+ },
106
+ {
107
+ "source": "base/claude/orchestrator-config.json",
108
+ "destination": ".claude/orchestrator-config.json",
109
+ "template": false
110
+ },
111
+ {
112
+ "source": "base/claude/agents/orchestrator.md",
113
+ "destination": ".claude/agents/orchestrator.md",
114
+ "template": false
115
+ },
116
+ {
117
+ "source": "base/claude/agents/specifier.md",
118
+ "destination": ".claude/agents/specifier.md",
119
+ "template": false
120
+ },
121
+ {
122
+ "source": "base/claude/agents/planner.md",
123
+ "destination": ".claude/agents/planner.md",
124
+ "template": false
125
+ },
126
+ {
127
+ "source": "base/claude/agents/task-generator.md",
128
+ "destination": ".claude/agents/task-generator.md",
129
+ "template": false
130
+ },
131
+ {
132
+ "source": "base/claude/agents/implementer.md",
133
+ "destination": ".claude/agents/implementer.md",
134
+ "template": false
135
+ },
136
+ {
137
+ "source": "base/claude/agents/reviewer.md",
138
+ "destination": ".claude/agents/reviewer.md",
139
+ "template": false
140
+ },
141
+ {
142
+ "source": "base/claude/agents/researcher.md",
143
+ "destination": ".claude/agents/researcher.md",
144
+ "template": false
145
+ },
146
+ {
147
+ "source": "base/claude/skills/artifact-validator/SKILL.md",
148
+ "destination": ".claude/skills/artifact-validator/SKILL.md",
149
+ "template": false
150
+ },
151
+ {
152
+ "source": "base/claude/skills/kb-lookup/SKILL.md",
153
+ "destination": ".claude/skills/kb-lookup/SKILL.md",
154
+ "template": false
155
+ },
156
+ {
157
+ "source": "base/claude/skills/phase-gate-evaluator/SKILL.md",
158
+ "destination": ".claude/skills/phase-gate-evaluator/SKILL.md",
159
+ "template": false
160
+ },
161
+ {
162
+ "source": "base/claude/skills/workflow-status/SKILL.md",
163
+ "destination": ".claude/skills/workflow-status/SKILL.md",
164
+ "template": false
165
+ },
166
+ {
167
+ "source": "base/claude/skills/docs-guardian/SKILL.md",
168
+ "destination": ".claude/skills/docs-guardian/SKILL.md",
169
+ "template": false
170
+ },
171
+ {
172
+ "source": "base/claude/hooks/pre-agent-invoke.sh",
173
+ "destination": ".claude/hooks/pre-agent-invoke.sh",
174
+ "template": false
175
+ },
176
+ {
177
+ "source": "base/claude/hooks/pre-phase-advance.sh",
178
+ "destination": ".claude/hooks/pre-phase-advance.sh",
179
+ "template": false
180
+ },
181
+ {
182
+ "source": "base/claude/hooks/post-artifact-generate.sh",
183
+ "destination": ".claude/hooks/post-artifact-generate.sh",
184
+ "template": false
185
+ },
186
+ {
187
+ "source": "base/claude/hooks/post-implement-validate.sh",
188
+ "destination": ".claude/hooks/post-implement-validate.sh",
189
+ "template": false
190
+ },
191
+ {
192
+ "source": "base/claude/hooks/track-agent-invocation.sh",
193
+ "destination": ".claude/hooks/track-agent-invocation.sh",
194
+ "template": false
195
+ },
196
+ {
197
+ "source": "base/claude/hooks/post-phase-checkpoint.sh",
198
+ "destination": ".claude/hooks/post-phase-checkpoint.sh",
199
+ "template": false
200
+ },
201
+ {
202
+ "source": "base/orchestrator/.state/.gitkeep",
203
+ "destination": ".orchestrator/.state/.gitkeep",
204
+ "template": false
205
+ }
206
+ ],
207
+ "main": "./dist/index.js",
208
+ "dependencies": {
209
+ "express": "^4.18.0",
210
+ "zod": "^3.22.0",
211
+ "cors": "^2.8.5",
212
+ "helmet": "^7.1.0",
213
+ "dotenv": "^16.3.0"
214
+ },
215
+ "devDependencies": {
216
+ "@types/express": "^4.17.0",
217
+ "@types/cors": "^2.8.17",
218
+ "@types/supertest": "^6.0.0",
219
+ "supertest": "^6.3.0"
220
+ },
221
+ "scripts": {
222
+ "start": "node dist/index.js",
223
+ "dev": "tsx watch src/index.ts",
224
+ "build": "tsc",
225
+ "test": "vitest",
226
+ "test:coverage": "vitest --coverage",
227
+ "lint": "eslint src --ext .ts",
228
+ "lint:fix": "eslint src --ext .ts --fix"
229
+ },
230
+ "constitutionExtensions": ["rest-api-conventions"],
231
+ "knowledgeBaseSeeds": [
232
+ "docs-constitution",
233
+ "rest-conventions",
234
+ "error-handling",
235
+ "validation-patterns",
236
+ "auth-strategies"
237
+ ]
238
+ }
@@ -0,0 +1,149 @@
1
+ /**
2
+ * API Project Template Configuration
3
+ */
4
+ import { ProjectTemplate } from '../../../../domain/entities/ProjectTemplate.js';
5
+
6
+ const config = ProjectTemplate.create({
7
+ name: 'api',
8
+ description: 'REST API with Express and Clean Architecture',
9
+ version: '1.0.0',
10
+
11
+ directories: [
12
+ '.orchestrator',
13
+ '.orchestrator/artifacts',
14
+ '.orchestrator/artifacts/research',
15
+ '.orchestrator/artifacts/specify',
16
+ '.orchestrator/artifacts/plan',
17
+ '.orchestrator/artifacts/tasks',
18
+ '.orchestrator/artifacts/implement',
19
+ '.orchestrator/memory',
20
+ '.orchestrator/memory/knowledge-base',
21
+ '.orchestrator/memory/knowledge-base/core',
22
+ '.orchestrator/memory/knowledge-base/contextual',
23
+ '.orchestrator/memory/knowledge-base/research',
24
+ '.orchestrator/checkpoints',
25
+ '.orchestrator/.state',
26
+ 'src',
27
+ 'src/domain',
28
+ 'src/domain/entities',
29
+ 'src/domain/value-objects',
30
+ 'src/domain/repositories',
31
+ 'src/application',
32
+ 'src/application/use-cases',
33
+ 'src/application/ports',
34
+ 'src/infrastructure',
35
+ 'src/infrastructure/persistence',
36
+ 'src/infrastructure/adapters',
37
+ 'src/presentation',
38
+ 'src/presentation/routes',
39
+ 'src/presentation/middleware',
40
+ 'tests',
41
+ 'tests/domain',
42
+ 'tests/application',
43
+ 'tests/infrastructure',
44
+ 'tests/presentation',
45
+ ],
46
+
47
+ files: [
48
+ {
49
+ source: 'projects/api/files/index.ts.hbs',
50
+ destination: 'src/index.ts',
51
+ template: true,
52
+ },
53
+ {
54
+ source: 'projects/api/files/tsconfig.json.hbs',
55
+ destination: 'tsconfig.json',
56
+ template: true,
57
+ },
58
+ {
59
+ source: 'projects/api/files/vitest.config.ts.hbs',
60
+ destination: 'vitest.config.ts',
61
+ template: true,
62
+ },
63
+ {
64
+ source: 'projects/api/files/server.ts.hbs',
65
+ destination: 'src/server.ts',
66
+ template: true,
67
+ },
68
+ {
69
+ source: 'projects/minimal/files/gitignore.hbs',
70
+ destination: '.gitignore',
71
+ template: true,
72
+ },
73
+ {
74
+ source: 'projects/minimal/files/env.example.hbs',
75
+ destination: '.env.example',
76
+ template: true,
77
+ },
78
+ {
79
+ source: 'projects/minimal/files/claude-settings.json.hbs',
80
+ destination: '.claude/claude-settings.json',
81
+ template: true,
82
+ },
83
+ {
84
+ source: 'base/CLAUDE.md.hbs',
85
+ destination: 'CLAUDE.md',
86
+ template: true,
87
+ },
88
+ {
89
+ source: 'base/mcp.json.hbs',
90
+ destination: '.mcp.json',
91
+ template: true,
92
+ },
93
+ {
94
+ source: 'base/package.json.hbs',
95
+ destination: 'package.json',
96
+ template: true,
97
+ },
98
+ {
99
+ source: 'base/orchestrator-index.json.hbs',
100
+ destination: '.orchestrator/orchestrator-index.json',
101
+ template: true,
102
+ },
103
+ {
104
+ source: 'base/orchestrator/.state/.gitkeep',
105
+ destination: '.orchestrator/.state/.gitkeep',
106
+ template: false,
107
+ },
108
+ ],
109
+
110
+ dependencies: {
111
+ express: '^4.18.0',
112
+ zod: '^3.22.0',
113
+ cors: '^2.8.5',
114
+ helmet: '^7.1.0',
115
+ dotenv: '^16.3.0',
116
+ },
117
+
118
+ devDependencies: {
119
+ '@types/express': '^4.17.0',
120
+ '@types/cors': '^2.8.17',
121
+ '@types/supertest': '^6.0.0',
122
+ supertest: '^6.3.0',
123
+ },
124
+
125
+ scripts: {
126
+ start: 'node dist/index.js',
127
+ dev: 'tsx watch src/index.ts',
128
+ build: 'tsc',
129
+ test: 'vitest',
130
+ 'test:coverage': 'vitest --coverage',
131
+ lint: 'eslint src --ext .ts',
132
+ 'lint:fix': 'eslint src --ext .ts --fix',
133
+ },
134
+
135
+ constitutionExtensions: ['rest-api-conventions'],
136
+
137
+ knowledgeBaseSeeds: [
138
+ 'rest-conventions',
139
+ 'error-handling',
140
+ 'validation-patterns',
141
+ 'auth-strategies',
142
+ ],
143
+ });
144
+
145
+ if (config.isErr()) {
146
+ throw new Error(`Failed to create API template config: ${config.error}`);
147
+ }
148
+
149
+ export default config.value;