Skip to content

Commit 9fe0928

Browse files
Merge pull request #58 from arvoreeducacao/ricardo-/-pi-orchestrator-neutral-agents-path
fix(pi): orchestrator prompt points to ./agents, not .kiro/agents
2 parents a82bef6 + 4bfa7e2 commit 9fe0928

5 files changed

Lines changed: 23 additions & 7 deletions

File tree

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arvoretech/hub-core",
3-
"version": "0.23.2",
3+
"version": "0.23.3",
44
"description": "Core config loader, types, and prompt builders for hub workspaces",
55
"main": "dist/index.js",
66
"type": "module",

packages/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export {
6060
buildKiroPipelineSection,
6161
buildOpenCodePipelineSection,
6262
buildKiroOrchestratorRule,
63+
buildOrchestratorPrompt,
6364
buildOrchestratorRule,
6465
buildOpenCodeOrchestratorRule,
6566
buildSkillsSection,

packages/core/src/prompt-builders.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,21 +1235,26 @@ If any validation agent leaves comments requiring fixes, call the relevant codin
12351235
return parts.join("\n");
12361236
}
12371237

1238-
export function buildKiroOrchestratorRule(config: HubConfig): string {
1238+
export function buildOrchestratorPrompt(
1239+
config: HubConfig,
1240+
options: { agentsDir?: string; assistantName?: string } = {},
1241+
): string {
12391242
const taskFolder = config.workflow?.task_folder || "./tasks/<TASK_ID>/";
12401243
const steps = config.workflow?.pipeline || [];
12411244
const prompt = config.workflow?.prompt;
12421245
const enforce = config.workflow?.enforce_workflow ?? false;
1246+
const agentsDir = options.agentsDir || "./agents";
1247+
const assistantName = options.assistantName || "the agent";
12431248

12441249
const sections: string[] = [];
12451250

12461251
sections.push(`# Orchestrator
12471252
12481253
## Your Main Responsibility
12491254
1250-
You are the development orchestrator. Your job is to ensure that any feature or task requested by the user is completed end-to-end by following a structured pipeline. You delegate specialized work to subagents defined in \`.kiro/agents/\`.
1255+
You are the development orchestrator. Your job is to ensure that any feature or task requested by the user is completed end-to-end by following a structured pipeline. You delegate specialized work to subagents defined in \`${agentsDir}\`.
12511256
1252-
> **Note:** This workspace has custom subagents in \`.kiro/agents/\`. Each pipeline step delegates to the appropriate subagent. Use \`/agent-name\` or instruct Kiro to "use the X subagent" to invoke them.`);
1257+
> **Note:** This workspace has custom subagents in \`${agentsDir}\`. Each pipeline step delegates to the appropriate subagent. Use \`/agent-name\` or instruct ${assistantName} to "use the X subagent" to invoke them.`);
12531258

12541259
if (enforce) {
12551260
sections.push(`
@@ -1377,6 +1382,13 @@ For bug reports or unexpected behavior, follow the debugging process from the \`
13771382
return sections.join("\n");
13781383
}
13791384

1385+
export function buildKiroOrchestratorRule(config: HubConfig): string {
1386+
return buildOrchestratorPrompt(config, {
1387+
agentsDir: ".kiro/agents/",
1388+
assistantName: "Kiro",
1389+
});
1390+
}
1391+
13801392
export function buildOrchestratorRule(config: HubConfig): string {
13811393
const taskFolder = config.workflow?.task_folder || "./tasks/<TASK_ID>/";
13821394
const steps = config.workflow?.pipeline || [];

packages/pi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@arvoretech/hub-pi",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Pi runtime package for hub.yaml workspaces — interprets config at runtime with no static generation",
55
"type": "module",
66
"keywords": [

packages/pi/src/extensions/hub-runtime.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { join, resolve } from "node:path";
44
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
55
import {
66
loadHubConfig,
7-
buildKiroOrchestratorRule,
7+
buildOrchestratorPrompt,
88
buildSkillsSection,
99
stripFrontMatter,
1010
type HubConfig,
@@ -58,7 +58,10 @@ export function hubRuntime(pi: ExtensionAPI) {
5858
return;
5959
}
6060

61-
const orchestratorRule = buildKiroOrchestratorRule(config);
61+
const orchestratorRule = buildOrchestratorPrompt(config, {
62+
agentsDir: "./agents",
63+
assistantName: "the agent",
64+
});
6265
const skillsSection = await buildSkillsSection(hubDir, config);
6366

6467
const sections: string[] = [orchestratorRule];

0 commit comments

Comments
 (0)