@phi-code-admin/phi-code 0.58.5 → 0.58.6

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.
@@ -399,33 +399,35 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
399
399
  name: "orchestrate",
400
400
  label: "Project Orchestrator",
401
401
  description: "Create a project plan AND automatically execute all tasks with sub-agents in parallel. Each agent gets its own isolated context, model, and system prompt. Tasks without dependencies run simultaneously.",
402
- promptSnippet: "Plan + execute projects. Creates spec/todo, then runs tasks in parallel waves with isolated sub-agents.",
402
+ promptSnippet: "Plan + execute projects in parallel waves. Each sub-agent gets isolated context + model. Use prompt-architect patterns for structured task descriptions.",
403
403
  promptGuidelines: [
404
- "When asked to plan or build a project: analyze the request, then call orchestrate. It will plan AND execute automatically.",
405
- "Break tasks into small, actionable items. Each task is executed by an isolated sub-agent.",
406
- "Assign agent types: 'explore' (analysis), 'plan' (design), 'code' (implementation), 'test' (validation), 'review' (quality).",
407
- "Set dependencies carefully: tasks without dependencies run in parallel. Tasks with dependencies wait for their prerequisites.",
408
- "Independent tasks run simultaneously (same wave). Dependent tasks wait for their prerequisites to complete.",
404
+ "When asked to plan or build a project: analyze the request thoroughly, then call the orchestrate tool. It plans AND executes automatically.",
405
+ "CRITICAL: Each task description must be SELF-CONTAINED. The sub-agent has NO shared history, NO access to the conversation, NO memory of previous tasks. Include ALL context it needs: file paths, expected behavior, relevant code patterns, and success criteria.",
406
+ "Structure each task description using the prompt-architect pattern: [CONTEXT] what exists and why [TASK] what to do specifically → [FORMAT] expected output → [CONSTRAINTS] rules and limitations.",
407
+ "Assign agent types strategically: 'explore' (read-only analysis, codebase understanding), 'plan' (architecture, design decisions), 'code' (implementation, file creation/modification), 'test' (write + run tests, validate behavior), 'review' (security audit, quality check, read-only).",
408
+ "Set dependencies to maximize parallelism: tasks without dependencies run simultaneously in the same wave. Only add dependencies when a task truly needs another task's output.",
409
+ "Order tasks logically: explore → plan → code → test → review. But allow independent tasks at each stage to run in parallel.",
410
+ "Set priority=high for critical-path tasks, medium for standard work, low for nice-to-haves.",
409
411
  ],
410
412
  parameters: Type.Object({
411
- title: Type.String({ description: "Project title" }),
412
- description: Type.String({ description: "Full project description with context" }),
413
- goals: Type.Array(Type.String(), { description: "List of project goals" }),
413
+ title: Type.String({ description: "Concise project title" }),
414
+ description: Type.String({ description: "Full project description: what to build, why, and any relevant context" }),
415
+ goals: Type.Array(Type.String(), { description: "Measurable project goals (what success looks like)" }),
414
416
  requirements: Type.Array(Type.String(), { description: "Technical and functional requirements" }),
415
- architecture: Type.Optional(Type.Array(Type.String(), { description: "Architecture decisions" })),
417
+ architecture: Type.Optional(Type.Array(Type.String(), { description: "Architecture decisions, tech stack choices, trade-offs" })),
416
418
  tasks: Type.Array(
417
419
  Type.Object({
418
- title: Type.String({ description: "Task title" }),
419
- description: Type.String({ description: "Detailed task description with enough context for the agent to work independently" }),
420
- agent: Type.Optional(Type.String({ description: "Agent type: explore, plan, code, test, or review" })),
421
- priority: Type.Optional(Type.String({ description: "high, medium, or low" })),
422
- dependencies: Type.Optional(Type.Array(Type.Number(), { description: "IDs of prerequisite tasks (1-indexed)" })),
423
- subtasks: Type.Optional(Type.Array(Type.String(), { description: "Sub-task descriptions" })),
420
+ title: Type.String({ description: "Clear, action-oriented task title" }),
421
+ description: Type.String({ description: "SELF-CONTAINED task description. Include ALL context the sub-agent needs: file paths, expected behavior, code patterns, conventions. The agent has NO shared history." }),
422
+ agent: Type.Optional(Type.String({ description: "Agent type: explore (read-only analysis), plan (architecture), code (implementation), test (write+run tests), review (quality audit)" })),
423
+ priority: Type.Optional(Type.String({ description: "high (critical path), medium (standard), low (nice-to-have)" })),
424
+ dependencies: Type.Optional(Type.Array(Type.Number(), { description: "Task numbers this depends on (1-indexed). Only add when truly needed — fewer dependencies = more parallelism" })),
425
+ subtasks: Type.Optional(Type.Array(Type.String(), { description: "Specific sub-steps within this task" })),
424
426
  }),
425
- { description: "Ordered list of tasks to execute" }
427
+ { description: "Ordered list of tasks. Independent tasks run in parallel. Dependent tasks wait for prerequisites." }
426
428
  ),
427
- constraints: Type.Optional(Type.Array(Type.String(), { description: "Project constraints" })),
428
- successCriteria: Type.Optional(Type.Array(Type.String(), { description: "Completion criteria" })),
429
+ constraints: Type.Optional(Type.Array(Type.String(), { description: "Hard constraints: frameworks, patterns, rules, things to avoid" })),
430
+ successCriteria: Type.Optional(Type.Array(Type.String(), { description: "How to verify the project is complete and correct" })),
429
431
  }),
430
432
 
431
433
  async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
@@ -527,18 +529,36 @@ All files in \`.phi/plans/\``;
527
529
  }
528
530
 
529
531
  ctx.sendUserMessage(
530
- `Analyze this project request and execute it using the orchestrate tool.
531
- The orchestrate tool will create the plan AND execute all tasks automatically with sub-agents.
532
-
533
- Project: ${description}
534
-
535
- Instructions:
536
- - Identify goals, requirements, architecture decisions
537
- - Break into small tasks (each executable by one sub-agent independently)
538
- - Each task description must contain FULL context — the sub-agent has NO shared history
539
- - Assign agent types: explore (analysis), plan (design), code (implementation), test (validation), review (quality)
540
- - Set priorities and dependencies
541
- - Call the orchestrate tool — it handles everything from there`
532
+ `Analyze this project and call the orchestrate tool. It will create the plan AND execute all tasks automatically with parallel sub-agents.
533
+
534
+ ## Project
535
+ ${description}
536
+
537
+ ## Instructions
538
+
539
+ 1. **Analyze** the project: identify goals, requirements, technical constraints, and architecture decisions.
540
+
541
+ 2. **Decompose** into tasks. Each task will be executed by an isolated sub-agent that has:
542
+ - NO access to this conversation
543
+ - NO shared memory or context
544
+ - Its own model and system prompt
545
+ - Full tool access (read, write, edit, bash, grep, find, ls)
546
+
547
+ 3. **Write self-contained task descriptions** using this pattern:
548
+ - CONTEXT: What exists, relevant file paths, current state
549
+ - TASK: Exactly what to implement/analyze/test
550
+ - FORMAT: Expected output (files created, test results, etc.)
551
+ - CONSTRAINTS: Rules, conventions, things to avoid
552
+
553
+ 4. **Assign agents**: explore (read-only analysis), plan (design), code (implementation), test (write+run tests), review (quality audit)
554
+
555
+ 5. **Set dependencies** to maximize parallelism:
556
+ - Tasks without dependencies → same wave → run simultaneously
557
+ - Only add a dependency when a task truly needs another's output
558
+ - Typical flow: explore(wave 1) → plan(wave 2) → code(wave 3) → test(wave 4) → review(wave 5)
559
+ - But independent code tasks can run in parallel within the same wave
560
+
561
+ 6. **Call the orchestrate tool** with all structured data. It handles execution automatically.`
542
562
  );
543
563
  },
544
564
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phi-code-admin/phi-code",
3
- "version": "0.58.5",
3
+ "version": "0.58.6",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {