@maestroai/core 0.1.0 → 0.1.1

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/dist/index.d.ts CHANGED
@@ -21,6 +21,8 @@ interface AgentConfig {
21
21
  claudeEnv?: Record<string, string>;
22
22
  /** Max agentic turns per invocation (maps to --max-turns) */
23
23
  maxTurns?: number;
24
+ /** Path to custom agent definition file (e.g., ./agents/developer.md) */
25
+ customAgentPath?: string;
24
26
  }
25
27
  interface AgentState {
26
28
  config: AgentConfig;
package/dist/index.js CHANGED
@@ -639,6 +639,9 @@ var init_lifecycle = __esm({
639
639
  "--model",
640
640
  this.config.model ?? "sonnet"
641
641
  ];
642
+ if (this.config.customAgentPath) {
643
+ args.push("--agent", this.config.customAgentPath);
644
+ }
642
645
  if (this.config.permissionMode && this.config.permissionMode !== "default") {
643
646
  args.push("--permission-mode", this.config.permissionMode);
644
647
  }
@@ -1191,7 +1194,19 @@ You implement features, write code, and fix bugs. Your responsibilities:
1191
1194
  because implementation was missing or broken \u2014 read the \`[BLOCKER]\` and \`[returned]\`
1192
1195
  notes in the todo file, fix the root cause, then mark the task done so QA can re-verify.
1193
1196
 
1194
- 7. **Process Boundaries**: Your job is to write code and tests, NOT to build, compile, or
1197
+ 7. **Verification Gate**: Before marking any task as complete, you MUST run the verification
1198
+ gate to prevent build issues:
1199
+ a. If you added or modified dependencies in \`package.json\`, run \`npm install\` (or \`pnpm install\`,
1200
+ \`yarn install\`, etc. based on the project's package manager) to ensure dependencies are installed.
1201
+ b. Run \`npm run lint\` (or equivalent linter command for the project's tech stack).
1202
+ c. Fix all linting errors and warnings introduced by your changes.
1203
+ d. Run targeted tests for the code you modified to ensure functionality works.
1204
+ e. Only after all checks pass should you mark the task complete.
1205
+
1206
+ This verification step is mandatory for every coding task \u2014 skip it and you risk
1207
+ breaking the build for the entire team.
1208
+
1209
+ 8. **Process Boundaries**: Your job is to write code and tests, NOT to build, compile, or
1195
1210
  run the project. Do not start servers or run full test suites. If you need to verify a specific
1196
1211
  piece of logic, run a single targeted test file. Write the code; let the CI pipeline
1197
1212
  and the user handle builds and deployments.
@@ -1360,6 +1375,14 @@ __export(config_exports, {
1360
1375
  });
1361
1376
  import { readFileSync, existsSync } from "fs";
1362
1377
  import path from "path";
1378
+ function findCustomAgentPath(workingDirectory, role) {
1379
+ const agentsDir = path.resolve(workingDirectory, "agents");
1380
+ const agentFile = path.join(agentsDir, `${role}.md`);
1381
+ if (existsSync(agentFile)) {
1382
+ return agentFile;
1383
+ }
1384
+ return void 0;
1385
+ }
1363
1386
  function loadAgentConfigs(projectConfig) {
1364
1387
  const configs = [];
1365
1388
  const { settings } = projectConfig;
@@ -1394,7 +1417,8 @@ function loadAgentConfigs(projectConfig) {
1394
1417
  claudeCommand: settings.claudeCommand,
1395
1418
  claudeArgs: mergedArgs.length > 0 ? mergedArgs : void 0,
1396
1419
  claudeEnv: Object.keys(mergedEnv).length > 0 ? mergedEnv : void 0,
1397
- maxTurns: roleConfig.maxTurns
1420
+ maxTurns: roleConfig.maxTurns,
1421
+ customAgentPath: findCustomAgentPath(settings.workingDirectory, roleConfig.role)
1398
1422
  };
1399
1423
  configs.push(config);
1400
1424
  }