@deimoscloud/coreai 0.1.18 → 0.1.20
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/README.md +68 -63
- package/agents/_templates/ic-engineer.md +0 -8
- package/agents/android-engineer.md +0 -3
- package/agents/backend-engineer.md +0 -3
- package/agents/database-administrator.md +0 -3
- package/agents/devops-engineer.md +0 -3
- package/agents/engineering-manager.md +0 -3
- package/agents/frontend-engineer.md +0 -3
- package/agents/product-manager.md +0 -3
- package/agents/react-engineer.md +0 -3
- package/agents/react-native-engineer.md +0 -3
- package/agents/software-security-engineer.md +0 -3
- package/agents/software-solutions-architect.md +0 -3
- package/agents/sre-huawei-cloud-architect.md +0 -3
- package/agents/sre-iac-specialist.md +0 -3
- package/agents/sre-kubernetes-specialist.md +0 -3
- package/agents/sre-network-specialist.md +0 -3
- package/agents/wearos-engineer.md +0 -3
- package/dist/cli/index.js +111 -62
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +4 -12
- package/dist/index.js +8 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/coreai.config.schema.json +3 -27
- package/skills/core/sprint-status/SKILL.md +65 -0
- package/skills/docs/docs-update/SKILL.md +201 -0
- package/skills/git/git-commit/SKILL.md +145 -0
- package/skills/git/pr-create/SKILL.md +195 -0
- package/skills/git/worktree-cleanup/SKILL.md +168 -0
- package/skills/git/worktree-setup/SKILL.md +112 -0
- package/skills/jira/jira-create/SKILL.md +201 -0
- package/skills/jira/jira-transition/SKILL.md +185 -0
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ A configurable, team-ready AI agent orchestration platform for Claude Code.
|
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **Variable resolution** - Use `${config.*}`, `${agent.*}`, and `${remote.*}` variables in
|
|
7
|
+
- **Markdown-based agent definitions** - Define agents in rich Markdown templates with YAML frontmatter
|
|
8
|
+
- **Variable resolution** - Use `${config.*}`, `${agent.*}`, and `${remote.*}` variables in templates
|
|
9
9
|
- **Core + custom agents** - Built-in agent library with support for project-specific customizations
|
|
10
10
|
- **Team filtering** - Configure which agents are available per project
|
|
11
11
|
- **Override system** - Customize core agents without modifying the source
|
|
@@ -197,32 +197,38 @@ Create a `coreai.config.yaml` in your project root:
|
|
|
197
197
|
```yaml
|
|
198
198
|
project:
|
|
199
199
|
name: "My Project"
|
|
200
|
-
description: "
|
|
200
|
+
description: "Brief description of your project"
|
|
201
201
|
|
|
202
|
+
# Default: [engineering-manager]
|
|
203
|
+
# Add agents with: coreai agents add <name>
|
|
202
204
|
team:
|
|
203
205
|
agents:
|
|
206
|
+
- engineering-manager
|
|
204
207
|
- backend-engineer
|
|
205
208
|
- frontend-engineer
|
|
206
|
-
- devops-engineer
|
|
207
209
|
|
|
208
210
|
integrations:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
git:
|
|
212
|
+
provider: github
|
|
213
|
+
config:
|
|
214
|
+
owner: "your-org"
|
|
215
|
+
repo: "your-repo"
|
|
216
|
+
default_branch: main
|
|
217
|
+
issue_tracker:
|
|
218
|
+
provider: jira
|
|
219
|
+
config:
|
|
220
|
+
project_key: "PROJ"
|
|
221
|
+
base_url: "https://your-org.atlassian.net"
|
|
213
222
|
|
|
214
223
|
quality_gates:
|
|
215
|
-
lint:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
frameworks:
|
|
224
|
-
- Express
|
|
225
|
-
- React
|
|
224
|
+
lint:
|
|
225
|
+
command: npm run lint
|
|
226
|
+
required: true
|
|
227
|
+
test:
|
|
228
|
+
command: npm test
|
|
229
|
+
required: true
|
|
230
|
+
build:
|
|
231
|
+
command: npm run build
|
|
226
232
|
```
|
|
227
233
|
|
|
228
234
|
## Built-in Agents
|
|
@@ -249,71 +255,70 @@ CoreAI includes these core agents:
|
|
|
249
255
|
|
|
250
256
|
## Custom Agents
|
|
251
257
|
|
|
252
|
-
Create custom agents in `coreai/agents/` directory:
|
|
258
|
+
Create custom agents as Markdown files in `coreai/agents/` directory:
|
|
253
259
|
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
quality_gates:
|
|
275
|
-
- lint
|
|
276
|
-
- test
|
|
277
|
-
- build
|
|
260
|
+
```markdown
|
|
261
|
+
---
|
|
262
|
+
name: mobile-engineer
|
|
263
|
+
description: React Native mobile development specialist
|
|
264
|
+
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
# Mobile Engineer
|
|
268
|
+
|
|
269
|
+
## Role
|
|
270
|
+
|
|
271
|
+
React Native mobile development specialist focused on cross-platform mobile apps.
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Your Responsibilities
|
|
276
|
+
|
|
277
|
+
- Implement mobile features using React Native
|
|
278
|
+
- Ensure cross-platform compatibility (iOS and Android)
|
|
279
|
+
- Optimize mobile performance and user experience
|
|
278
280
|
```
|
|
279
281
|
|
|
280
282
|
### Overriding Core Agents
|
|
281
283
|
|
|
282
284
|
To customize a core agent, create a file with the same name in `coreai/agents/`:
|
|
283
285
|
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
```markdown
|
|
287
|
+
---
|
|
288
|
+
name: backend-engineer
|
|
289
|
+
description: Custom backend engineer for our Python stack
|
|
290
|
+
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
291
|
+
---
|
|
287
292
|
|
|
288
|
-
|
|
289
|
-
type: ic-engineer
|
|
290
|
-
display_name: "Backend Engineer"
|
|
291
|
-
description: "Custom backend engineer for our Python stack"
|
|
293
|
+
# Backend Engineer
|
|
292
294
|
|
|
293
|
-
|
|
295
|
+
## Role
|
|
296
|
+
|
|
297
|
+
Custom backend engineer specializing in our Python/FastAPI stack.
|
|
298
|
+
|
|
299
|
+
<!-- Your custom agent content here -->
|
|
294
300
|
```
|
|
295
301
|
|
|
296
302
|
## Variable Resolution
|
|
297
303
|
|
|
298
|
-
Agent
|
|
304
|
+
Agent templates support three variable namespaces:
|
|
299
305
|
|
|
300
306
|
### `${config.*}` - Project Configuration
|
|
301
307
|
|
|
302
|
-
```
|
|
303
|
-
|
|
308
|
+
```markdown
|
|
309
|
+
Working on project: ${config.project.name}
|
|
304
310
|
```
|
|
305
311
|
|
|
306
312
|
### `${agent.*}` - Agent Self-Reference
|
|
307
313
|
|
|
308
|
-
```
|
|
309
|
-
|
|
314
|
+
```markdown
|
|
315
|
+
You are the ${agent.name}, responsible for ${agent.role}
|
|
310
316
|
```
|
|
311
317
|
|
|
312
318
|
### `${remote.*}` - Remote Content
|
|
313
319
|
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
- "${remote.confluence.architecture-docs}"
|
|
320
|
+
```markdown
|
|
321
|
+
Reference the architecture documentation: ${remote.documentation}
|
|
317
322
|
```
|
|
318
323
|
|
|
319
324
|
## Skills (Claude Slash Commands)
|
|
@@ -468,7 +473,7 @@ your-project/
|
|
|
468
473
|
├── coreai.config.yaml # Project configuration
|
|
469
474
|
├── coreai/
|
|
470
475
|
│ ├── agents/ # Custom agent definitions
|
|
471
|
-
│ │ └── my-agent.
|
|
476
|
+
│ │ └── my-agent.md
|
|
472
477
|
│ └── skills/ # Custom skill templates
|
|
473
478
|
│ └── my-skill.md
|
|
474
479
|
├── .claude/
|
|
@@ -537,9 +542,9 @@ See [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md) for detailed implementation
|
|
|
537
542
|
### Phase 1 (Complete)
|
|
538
543
|
|
|
539
544
|
- Project foundation (TypeScript, CLI, configuration)
|
|
540
|
-
- Agent
|
|
545
|
+
- Agent schema and validation
|
|
541
546
|
- Variable resolution system
|
|
542
|
-
- Agent compiler (
|
|
547
|
+
- Agent compiler (Markdown templates to Claude-compatible output)
|
|
543
548
|
- Agent CLI commands (build, list, show)
|
|
544
549
|
- Integration adapter framework
|
|
545
550
|
- MCP integration layer with server discovery
|
|
@@ -12,14 +12,6 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__github, mcp__atlassian
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
## Technical Stack
|
|
16
|
-
|
|
17
|
-
- [Technology 1]
|
|
18
|
-
- [Technology 2]
|
|
19
|
-
- [Technology 3]
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
15
|
## Knowledge Library Structure
|
|
24
16
|
|
|
25
17
|
You have access to shared and personal knowledge files:
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[API specs, Gradle configs, architecture diagrams]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design and build native Android applications using Kotlin, Jetpack Compose, and modern architecture patterns. Focus on performant, user-friendly mobile experiences with robust testing and security.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement native Android applications
|
|
18
15
|
- Build responsive UIs using Jetpack Compose and XML layouts
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[API specs, schemas, migration scripts]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Build and maintain APIs, database schemas, and server-side infrastructure. Focus on robust, scalable, and maintainable backend systems.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement RESTful APIs and GraphQL endpoints
|
|
18
15
|
- Architect database schemas and optimize queries
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[schemas, migration scripts, query plans, ERDs]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design, optimize, and operate database systems. Focus on ensuring data integrity, performance, availability, and security across relational and NoSQL database platforms.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement database schemas and data models
|
|
18
15
|
- Optimize query performance and indexing strategies
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Infrastructure configs, runbooks, deployment docs]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design, build, and maintain CI/CD pipelines, infrastructure as code, and cloud resources. Ensure reliable deployments, system observability, and operational excellence across all environments.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and maintain CI/CD pipelines
|
|
18
15
|
- Implement infrastructure as code (Terraform, Pulumi, CloudFormation, etc.)
|
|
@@ -9,9 +9,6 @@ tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
9
9
|
## Role
|
|
10
10
|
Coordinate the engineering team, breaking down requirements into tasks, delegating to specialists, and ensuring alignment between product and engineering. You do NOT write code. You plan, delegate, track, and unblock.
|
|
11
11
|
|
|
12
|
-
## Technical Stack
|
|
13
|
-
${config.tech_stack}
|
|
14
|
-
|
|
15
12
|
---
|
|
16
13
|
|
|
17
14
|
## CRITICAL: FORBIDDEN ACTIONS
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Component specs, style guides, design tokens]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Build and maintain responsive, accessible web interfaces with modern JavaScript frameworks. Focus on performant, user-friendly experiences and robust component architectures.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Build responsive and accessible user interfaces
|
|
18
15
|
- Implement component libraries and design systems
|
|
@@ -9,9 +9,6 @@ tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
9
9
|
## Role
|
|
10
10
|
Define product vision, strategy, and requirements. Bridge business objectives with technical execution by prioritizing features, writing specifications, and ensuring product-market fit. You do NOT write code. You define what to build, why, and in what order.
|
|
11
11
|
|
|
12
|
-
## Technical Stack
|
|
13
|
-
${config.tech_stack}
|
|
14
|
-
|
|
15
12
|
## Responsibilities
|
|
16
13
|
- Define product vision, strategy, and roadmap
|
|
17
14
|
- Write detailed product requirements and user stories
|
package/agents/react-engineer.md
CHANGED
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Component specs, API integration docs, design system tokens]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design and build modern web applications using React, TypeScript, and the React ecosystem. Focus on performant, accessible, and maintainable user interfaces with robust component architectures and state management.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement React components and applications
|
|
18
15
|
- Build reusable component libraries and design systems
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Native module docs, platform configs, release notes]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design and build cross-platform mobile applications using React Native and TypeScript. Focus on performant iOS and Android experiences with a shared codebase, native module integration, and platform-specific adaptations where needed.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement cross-platform mobile applications
|
|
18
15
|
- Build reusable components with platform-specific adaptations
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Threat models, security assessments, vulnerability reports, po
|
|
|
10
10
|
## Role
|
|
11
11
|
Conduct secure code reviews, perform security assessments, and ensure software is built with security as a core principle. Review PRs for security vulnerabilities, authentication/authorization correctness, and compliance with security standards.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Conduct secure code reviews and threat modeling
|
|
18
15
|
- Perform security assessments and penetration testing
|
|
@@ -9,9 +9,6 @@ tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
9
9
|
## Role
|
|
10
10
|
Design high-level system architecture, make technology decisions, and ensure technical solutions align with business goals. Review PRs for architectural compliance and create Architecture Decision Records (ADRs). You operate across both implementation (ticket-based) and review workflows.
|
|
11
11
|
|
|
12
|
-
## Technical Stack
|
|
13
|
-
${config.tech_stack}
|
|
14
|
-
|
|
15
12
|
## Responsibilities
|
|
16
13
|
- Design high-level system architecture and technical solutions
|
|
17
14
|
- Evaluate and recommend technology stacks and frameworks
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[architecture diagrams, runbooks, IaC configs]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design and operate resilient, scalable infrastructure on Huawei Cloud. Focus on high availability, operational excellence, and cost-effective cloud architecture using Huawei Cloud services.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement Huawei Cloud infrastructure architecture
|
|
18
15
|
- Configure and manage ECS, CCE, OBS, RDS, and other Huawei services
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Terraform modules, IaC templates, policy files]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Automate infrastructure provisioning and maintain reproducible environments. Focus on Infrastructure as Code solutions, GitOps workflows, and reusable infrastructure patterns across cloud platforms.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement infrastructure as code solutions
|
|
18
15
|
- Develop and maintain Terraform modules and configurations
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Helm charts, manifests, cluster configs, runbooks]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design, deploy, and operate production-grade Kubernetes clusters. Focus on container orchestration, GitOps workflows, service mesh, and ensuring scalability, security, and operational excellence.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and manage Kubernetes cluster architecture
|
|
18
15
|
- Deploy and configure workloads, services, and ingress
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[network diagrams, CIDR plans, firewall rules, runbooks]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design and operate secure, high-performance network infrastructure. Focus on network architecture, connectivity, DNS, load balancing, VPN, firewall management, and reliable communication across distributed systems.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement cloud network architectures
|
|
18
15
|
- Configure VPCs, subnets, and network segmentation
|
|
@@ -10,9 +10,6 @@ tech_artifacts: "[Sensor specs, watch face configs, tile layouts]"
|
|
|
10
10
|
## Role
|
|
11
11
|
Design and build Wear OS smartwatch applications with optimized, battery-efficient experiences. Focus on glanceable interfaces, sensor integration, and seamless phone-watch communication.
|
|
12
12
|
|
|
13
|
-
## Technical Stack
|
|
14
|
-
${config.tech_stack}
|
|
15
|
-
|
|
16
13
|
## Responsibilities
|
|
17
14
|
- Design and implement Wear OS applications
|
|
18
15
|
- Build watch faces and complications
|
package/dist/cli/index.js
CHANGED
|
@@ -30,9 +30,6 @@ var ConfigError = class extends Error {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
var DEFAULT_AGENTS = [
|
|
33
|
-
"backend-engineer",
|
|
34
|
-
"frontend-engineer",
|
|
35
|
-
"devops-engineer",
|
|
36
33
|
"engineering-manager"
|
|
37
34
|
];
|
|
38
35
|
function findConfigFile(startDir = process.cwd()) {
|
|
@@ -92,13 +89,16 @@ function validateConfig(config) {
|
|
|
92
89
|
return config;
|
|
93
90
|
}
|
|
94
91
|
function applyDefaults(config) {
|
|
92
|
+
const project = {
|
|
93
|
+
name: config.project?.name ?? "unnamed",
|
|
94
|
+
root: config.project?.root ?? process.cwd()
|
|
95
|
+
};
|
|
96
|
+
if (config.project?.description) {
|
|
97
|
+
project.description = config.project.description;
|
|
98
|
+
}
|
|
95
99
|
return {
|
|
96
100
|
...config,
|
|
97
|
-
project
|
|
98
|
-
name: config.project?.name ?? "unnamed",
|
|
99
|
-
type: config.project?.type ?? "software",
|
|
100
|
-
root: config.project?.root ?? process.cwd()
|
|
101
|
-
},
|
|
101
|
+
project,
|
|
102
102
|
team: {
|
|
103
103
|
agents: config.team?.agents ?? DEFAULT_AGENTS
|
|
104
104
|
}
|
|
@@ -2028,9 +2028,6 @@ function extractVariables2(config) {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
vars.PROJECT_NAME = config.project.name;
|
|
2030
2030
|
vars.PROJECT_ROOT = config.project.root;
|
|
2031
|
-
if (config.project.type) {
|
|
2032
|
-
vars.PROJECT_TYPE = config.project.type;
|
|
2033
|
-
}
|
|
2034
2031
|
if (config.integrations?.issue_tracker) {
|
|
2035
2032
|
const tracker = config.integrations.issue_tracker;
|
|
2036
2033
|
if (tracker.config?.project_key) {
|
|
@@ -2080,9 +2077,6 @@ function extractVariables2(config) {
|
|
|
2080
2077
|
}
|
|
2081
2078
|
}
|
|
2082
2079
|
}
|
|
2083
|
-
if (config.tech_stack?.primary_language) {
|
|
2084
|
-
vars.PRIMARY_LANGUAGE = config.tech_stack.primary_language;
|
|
2085
|
-
}
|
|
2086
2080
|
return vars;
|
|
2087
2081
|
}
|
|
2088
2082
|
function substituteVariables(content, variables) {
|
|
@@ -3001,52 +2995,107 @@ function detectProjectName(projectRoot) {
|
|
|
3001
2995
|
}
|
|
3002
2996
|
return basename3(projectRoot);
|
|
3003
2997
|
}
|
|
2998
|
+
function detectQualityGates(projectRoot) {
|
|
2999
|
+
const gates = {};
|
|
3000
|
+
const packageJsonPath = join11(projectRoot, "package.json");
|
|
3001
|
+
if (existsSync7(packageJsonPath)) {
|
|
3002
|
+
try {
|
|
3003
|
+
const pkg = JSON.parse(readFileSync8(packageJsonPath, "utf-8"));
|
|
3004
|
+
if (pkg.scripts?.lint) {
|
|
3005
|
+
gates.lint = "npm run lint";
|
|
3006
|
+
}
|
|
3007
|
+
if (pkg.scripts?.test) {
|
|
3008
|
+
gates.test = "npm test";
|
|
3009
|
+
}
|
|
3010
|
+
} catch {
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
return gates;
|
|
3014
|
+
}
|
|
3004
3015
|
function generateConfigYaml(options) {
|
|
3005
|
-
|
|
3006
|
-
#
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
- engineering-manager
|
|
3020
|
-
|
|
3016
|
+
const lines = [
|
|
3017
|
+
"# CoreAI Configuration",
|
|
3018
|
+
"# See https://coreai.dev/docs/config for full schema",
|
|
3019
|
+
"",
|
|
3020
|
+
'version: "1.0"',
|
|
3021
|
+
"",
|
|
3022
|
+
"project:",
|
|
3023
|
+
` name: "${options.name}"`,
|
|
3024
|
+
' # description: "Brief description of your project"',
|
|
3025
|
+
"",
|
|
3026
|
+
"# Agents to compile. Add more with: coreai agents add <name>",
|
|
3027
|
+
"# See available agents with: coreai agents list",
|
|
3028
|
+
"team:",
|
|
3029
|
+
" agents:",
|
|
3030
|
+
" - engineering-manager",
|
|
3031
|
+
""
|
|
3032
|
+
];
|
|
3033
|
+
const gates = options.qualityGates;
|
|
3034
|
+
if (gates?.lint || gates?.test) {
|
|
3035
|
+
lines.push("# Commands agents must run before finishing work.");
|
|
3036
|
+
lines.push("quality_gates:");
|
|
3037
|
+
if (gates.lint) {
|
|
3038
|
+
lines.push(" lint:");
|
|
3039
|
+
lines.push(` command: ${gates.lint}`);
|
|
3040
|
+
lines.push(" required: true");
|
|
3041
|
+
}
|
|
3042
|
+
if (gates.test) {
|
|
3043
|
+
lines.push(" test:");
|
|
3044
|
+
lines.push(` command: ${gates.test}`);
|
|
3045
|
+
lines.push(" required: true");
|
|
3046
|
+
}
|
|
3047
|
+
lines.push(" # typecheck:");
|
|
3048
|
+
lines.push(" # command: npx tsc --noEmit");
|
|
3049
|
+
lines.push(" # required: true");
|
|
3050
|
+
} else {
|
|
3051
|
+
lines.push("# Commands agents must run before finishing work.");
|
|
3052
|
+
lines.push("# quality_gates:");
|
|
3053
|
+
lines.push("# lint:");
|
|
3054
|
+
lines.push("# command: npm run lint");
|
|
3055
|
+
lines.push("# required: true");
|
|
3056
|
+
lines.push("# test:");
|
|
3057
|
+
lines.push("# command: npm test");
|
|
3058
|
+
lines.push("# required: true");
|
|
3059
|
+
}
|
|
3060
|
+
lines.push("");
|
|
3021
3061
|
if (options.gitInfo?.provider) {
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
#
|
|
3033
|
-
#
|
|
3034
|
-
#
|
|
3035
|
-
#
|
|
3036
|
-
#
|
|
3037
|
-
#
|
|
3038
|
-
|
|
3039
|
-
#
|
|
3040
|
-
#
|
|
3041
|
-
#
|
|
3042
|
-
|
|
3043
|
-
#
|
|
3044
|
-
#
|
|
3045
|
-
#
|
|
3046
|
-
#
|
|
3047
|
-
# -
|
|
3048
|
-
|
|
3049
|
-
|
|
3062
|
+
lines.push("integrations:");
|
|
3063
|
+
lines.push(" git:");
|
|
3064
|
+
lines.push(` provider: ${options.gitInfo.provider}`);
|
|
3065
|
+
lines.push(" config:");
|
|
3066
|
+
lines.push(` owner: "${options.gitInfo.owner}"`);
|
|
3067
|
+
lines.push(` repo: "${options.gitInfo.repo}"`);
|
|
3068
|
+
lines.push(" # issue_tracker:");
|
|
3069
|
+
lines.push("# provider: jira # jira | linear | github-issues | azure-devops");
|
|
3070
|
+
lines.push("# config:");
|
|
3071
|
+
lines.push('# project_key: "PROJ"');
|
|
3072
|
+
lines.push('# base_url: "https://your-instance.atlassian.net"');
|
|
3073
|
+
lines.push(" # documentation:");
|
|
3074
|
+
lines.push("# provider: confluence # confluence | notion | github-wiki | local");
|
|
3075
|
+
lines.push("# config:");
|
|
3076
|
+
lines.push('# base_url: "https://your-instance.atlassian.net/wiki"');
|
|
3077
|
+
lines.push('# space_key: "TEAM"');
|
|
3078
|
+
} else {
|
|
3079
|
+
lines.push("# External tool integrations");
|
|
3080
|
+
lines.push("# integrations:");
|
|
3081
|
+
lines.push("# git:");
|
|
3082
|
+
lines.push("# provider: github # github | gitlab | bitbucket | azure-devops");
|
|
3083
|
+
lines.push("# config:");
|
|
3084
|
+
lines.push('# owner: "your-org"');
|
|
3085
|
+
lines.push('# repo: "your-repo"');
|
|
3086
|
+
lines.push("# issue_tracker:");
|
|
3087
|
+
lines.push("# provider: jira # jira | linear | github-issues | azure-devops");
|
|
3088
|
+
lines.push("# config:");
|
|
3089
|
+
lines.push('# project_key: "PROJ"');
|
|
3090
|
+
lines.push('# base_url: "https://your-instance.atlassian.net"');
|
|
3091
|
+
lines.push("# documentation:");
|
|
3092
|
+
lines.push("# provider: confluence # confluence | notion | github-wiki | local");
|
|
3093
|
+
lines.push("# config:");
|
|
3094
|
+
lines.push('# base_url: "https://your-instance.atlassian.net/wiki"');
|
|
3095
|
+
lines.push('# space_key: "TEAM"');
|
|
3096
|
+
}
|
|
3097
|
+
lines.push("");
|
|
3098
|
+
return lines.join("\n");
|
|
3050
3099
|
}
|
|
3051
3100
|
function createDirectories(projectRoot) {
|
|
3052
3101
|
const dirs = [
|
|
@@ -3073,8 +3122,8 @@ function init(options = {}) {
|
|
|
3073
3122
|
}
|
|
3074
3123
|
const gitInfo = detectGitInfo();
|
|
3075
3124
|
const name = options.name ?? detectProjectName(projectRoot);
|
|
3076
|
-
const
|
|
3077
|
-
const configContent = generateConfigYaml({ name,
|
|
3125
|
+
const qualityGates = detectQualityGates(projectRoot);
|
|
3126
|
+
const configContent = generateConfigYaml({ name, gitInfo, qualityGates });
|
|
3078
3127
|
const configPath = join11(projectRoot, "coreai.config.yaml");
|
|
3079
3128
|
try {
|
|
3080
3129
|
writeFileSync4(configPath, configContent, "utf-8");
|
|
@@ -3126,8 +3175,8 @@ Detected ${result.gitInfo.provider} repository: ${result.gitInfo.owner}/${result
|
|
|
3126
3175
|
}
|
|
3127
3176
|
lines.push("\nNext steps:");
|
|
3128
3177
|
lines.push(" 1. Edit coreai.config.yaml to configure your project");
|
|
3129
|
-
lines.push(" 2.
|
|
3130
|
-
lines.push(" 3. Run `coreai
|
|
3178
|
+
lines.push(" 2. Add agents with `coreai agents add <name>`");
|
|
3179
|
+
lines.push(" 3. Run `coreai build` to compile agents");
|
|
3131
3180
|
return lines.join("\n");
|
|
3132
3181
|
}
|
|
3133
3182
|
|