pi-crew 0.1.30 → 0.1.32

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 (159) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +80 -27
  3. package/agents/analyst.md +11 -11
  4. package/agents/critic.md +11 -11
  5. package/agents/executor.md +11 -11
  6. package/agents/explorer.md +11 -11
  7. package/agents/planner.md +11 -11
  8. package/agents/reviewer.md +11 -11
  9. package/agents/security-reviewer.md +11 -11
  10. package/agents/test-engineer.md +11 -11
  11. package/agents/verifier.md +11 -11
  12. package/agents/writer.md +11 -11
  13. package/docs/architecture.md +173 -164
  14. package/docs/refactor-tasks-phase3.md +394 -394
  15. package/docs/refactor-tasks-phase4.md +564 -564
  16. package/docs/refactor-tasks-phase5.md +402 -402
  17. package/docs/refactor-tasks-phase6.md +662 -662
  18. package/docs/research-extension-examples.md +297 -0
  19. package/docs/research-extension-system.md +324 -0
  20. package/docs/research-optimization-plan.md +548 -0
  21. package/docs/research-pi-coding-agent.md +357 -0
  22. package/docs/resource-formats.md +4 -3
  23. package/docs/runtime-flow.md +148 -148
  24. package/docs/source-runtime-refactor-map.md +83 -83
  25. package/docs/usage.md +3 -3
  26. package/index.ts +6 -6
  27. package/package.json +1 -1
  28. package/schema.json +53 -1
  29. package/skills/git-master/SKILL.md +24 -19
  30. package/skills/read-only-explorer/SKILL.md +26 -21
  31. package/skills/safe-bash/SKILL.md +21 -16
  32. package/skills/task-packet/SKILL.md +28 -23
  33. package/skills/verify-evidence/SKILL.md +27 -22
  34. package/src/agents/agent-serializer.ts +34 -34
  35. package/src/agents/discover-agents.ts +102 -102
  36. package/src/config/config.ts +14 -1
  37. package/src/config/defaults.ts +3 -2
  38. package/src/extension/cross-extension-rpc.ts +82 -82
  39. package/src/extension/import-index.ts +4 -3
  40. package/src/extension/management.ts +2 -2
  41. package/src/extension/project-init.ts +9 -7
  42. package/src/extension/register.ts +63 -0
  43. package/src/extension/registration/artifact-cleanup.ts +15 -14
  44. package/src/extension/registration/commands.ts +208 -208
  45. package/src/extension/registration/compaction-guard.ts +125 -0
  46. package/src/extension/registration/subagent-tools.ts +27 -8
  47. package/src/extension/registration/team-tool.ts +61 -44
  48. package/src/extension/result-watcher.ts +98 -98
  49. package/src/extension/run-import.ts +4 -4
  50. package/src/extension/run-index.ts +14 -14
  51. package/src/extension/run-maintenance.ts +24 -24
  52. package/src/extension/team-tool/api.ts +3 -0
  53. package/src/extension/team-tool/cancel.ts +31 -31
  54. package/src/extension/team-tool/doctor.ts +179 -178
  55. package/src/extension/team-tool/inspect.ts +41 -41
  56. package/src/extension/team-tool/lifecycle-actions.ts +79 -79
  57. package/src/extension/team-tool/plan.ts +19 -19
  58. package/src/extension/team-tool/status.ts +73 -73
  59. package/src/prompt/prompt-runtime.ts +68 -68
  60. package/src/runtime/agent-control.ts +64 -64
  61. package/src/runtime/agent-memory.ts +72 -72
  62. package/src/runtime/agent-observability.ts +113 -113
  63. package/src/runtime/async-marker.ts +26 -26
  64. package/src/runtime/background-runner.ts +53 -53
  65. package/src/runtime/crew-agent-runtime.ts +58 -58
  66. package/src/runtime/direct-run.ts +35 -35
  67. package/src/runtime/foreground-control.ts +82 -82
  68. package/src/runtime/green-contract.ts +46 -46
  69. package/src/runtime/group-join.ts +88 -88
  70. package/src/runtime/live-agent-control.ts +78 -78
  71. package/src/runtime/live-agent-manager.ts +85 -85
  72. package/src/runtime/live-control-realtime.ts +36 -36
  73. package/src/runtime/live-session-runtime.ts +299 -299
  74. package/src/runtime/manifest-cache.ts +212 -214
  75. package/src/runtime/model-fallback.ts +261 -261
  76. package/src/runtime/parallel-research.ts +44 -44
  77. package/src/runtime/parallel-utils.ts +99 -99
  78. package/src/runtime/pi-json-output.ts +111 -111
  79. package/src/runtime/pi-spawn.ts +96 -96
  80. package/src/runtime/policy-engine.ts +78 -78
  81. package/src/runtime/post-exit-stdio-guard.ts +86 -86
  82. package/src/runtime/process-status.ts +56 -56
  83. package/src/runtime/progress-event-coalescer.ts +43 -43
  84. package/src/runtime/recovery-recipes.ts +74 -74
  85. package/src/runtime/role-permission.ts +39 -39
  86. package/src/runtime/session-usage.ts +79 -79
  87. package/src/runtime/sidechain-output.ts +28 -28
  88. package/src/runtime/subagent-manager.ts +29 -2
  89. package/src/runtime/task-display.ts +38 -38
  90. package/src/runtime/task-output-context.ts +106 -106
  91. package/src/runtime/task-packet.ts +84 -84
  92. package/src/runtime/task-runner/live-executor.ts +98 -98
  93. package/src/runtime/task-runner/progress.ts +111 -111
  94. package/src/runtime/task-runner/prompt-builder.ts +72 -72
  95. package/src/runtime/task-runner/result-utils.ts +14 -14
  96. package/src/runtime/task-runner/state-helpers.ts +22 -22
  97. package/src/runtime/worker-heartbeat.ts +21 -21
  98. package/src/runtime/worker-startup.ts +57 -57
  99. package/src/schema/config-schema.ts +12 -0
  100. package/src/schema/team-tool-schema.ts +100 -100
  101. package/src/state/artifact-store.ts +108 -108
  102. package/src/state/contracts.ts +105 -105
  103. package/src/state/jsonl-writer.ts +77 -77
  104. package/src/state/state-store.ts +8 -9
  105. package/src/state/task-claims.ts +42 -42
  106. package/src/state/types.ts +180 -180
  107. package/src/state/usage.ts +29 -29
  108. package/src/subagents/async-entry.ts +1 -1
  109. package/src/subagents/index.ts +3 -3
  110. package/src/subagents/live/control.ts +1 -1
  111. package/src/subagents/live/manager.ts +1 -1
  112. package/src/subagents/live/realtime.ts +1 -1
  113. package/src/subagents/live/session-runtime.ts +1 -1
  114. package/src/subagents/manager.ts +1 -1
  115. package/src/subagents/spawn.ts +1 -1
  116. package/src/teams/discover-teams.ts +2 -2
  117. package/src/teams/team-serializer.ts +36 -36
  118. package/src/types/diff.d.ts +18 -0
  119. package/src/ui/crew-footer.ts +101 -101
  120. package/src/ui/crew-select-list.ts +111 -111
  121. package/src/ui/crew-widget.ts +285 -285
  122. package/src/ui/dynamic-border.ts +25 -25
  123. package/src/ui/layout-primitives.ts +106 -106
  124. package/src/ui/loaders.ts +158 -158
  125. package/src/ui/mascot.ts +441 -441
  126. package/src/ui/powerbar-publisher.ts +94 -94
  127. package/src/ui/render-diff.ts +119 -119
  128. package/src/ui/run-dashboard.ts +372 -372
  129. package/src/ui/status-colors.ts +54 -54
  130. package/src/ui/syntax-highlight.ts +116 -116
  131. package/src/ui/transcript-viewer.ts +302 -302
  132. package/src/utils/completion-dedupe.ts +63 -63
  133. package/src/utils/file-coalescer.ts +84 -84
  134. package/src/utils/frontmatter.ts +36 -36
  135. package/src/utils/fs-watch.ts +31 -31
  136. package/src/utils/git.ts +262 -262
  137. package/src/utils/ids.ts +12 -12
  138. package/src/utils/names.ts +26 -26
  139. package/src/utils/paths.ts +34 -7
  140. package/src/utils/sleep.ts +32 -32
  141. package/src/utils/timings.ts +31 -31
  142. package/src/utils/visual.ts +159 -159
  143. package/src/workflows/discover-workflows.ts +2 -2
  144. package/src/workflows/validate-workflow.ts +40 -40
  145. package/src/worktree/branch-freshness.ts +45 -45
  146. package/src/worktree/cleanup.ts +71 -69
  147. package/src/worktree/worktree-manager.ts +3 -1
  148. package/teams/default.team.md +12 -12
  149. package/teams/fast-fix.team.md +11 -11
  150. package/teams/implementation.team.md +18 -18
  151. package/teams/parallel-research.team.md +14 -14
  152. package/teams/research.team.md +11 -11
  153. package/teams/review.team.md +12 -12
  154. package/workflows/default.workflow.md +29 -29
  155. package/workflows/fast-fix.workflow.md +22 -22
  156. package/workflows/implementation.workflow.md +38 -38
  157. package/workflows/parallel-research.workflow.md +46 -46
  158. package/workflows/research.workflow.md +22 -22
  159. package/workflows/review.workflow.md +30 -30
@@ -1,69 +1,71 @@
1
- import { execFileSync } from "node:child_process";
2
- import * as fs from "node:fs";
3
- import * as path from "node:path";
4
- import type { TeamRunManifest } from "../state/types.ts";
5
- import { writeArtifact } from "../state/artifact-store.ts";
6
-
7
- export interface WorktreeCleanupResult {
8
- removed: string[];
9
- preserved: Array<{ path: string; reason: string }>;
10
- artifactPaths: string[];
11
- }
12
-
13
- function git(cwd: string, args: string[]): string {
14
- return execFileSync("git", args, { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim();
15
- }
16
-
17
- function isDirty(worktreePath: string): boolean {
18
- try {
19
- return git(worktreePath, ["status", "--porcelain"]).trim().length > 0;
20
- } catch {
21
- return true;
22
- }
23
- }
24
-
25
- function captureDiff(worktreePath: string): string {
26
- try {
27
- return [git(worktreePath, ["status", "--porcelain"]), "", git(worktreePath, ["diff", "--stat"]), "", git(worktreePath, ["diff"])].join("\n");
28
- } catch (error) {
29
- const message = error instanceof Error ? error.message : String(error);
30
- return `Failed to capture cleanup diff for ${worktreePath}: ${message}`;
31
- }
32
- }
33
-
34
- export function cleanupRunWorktrees(manifest: TeamRunManifest, options: { force?: boolean } = {}): WorktreeCleanupResult {
35
- const worktreeRoot = path.join(manifest.cwd, ".pi", "teams", "worktrees", manifest.runId);
36
- const result: WorktreeCleanupResult = { removed: [], preserved: [], artifactPaths: [] };
37
- if (!fs.existsSync(worktreeRoot)) return result;
38
-
39
- for (const entry of fs.readdirSync(worktreeRoot)) {
40
- const worktreePath = path.join(worktreeRoot, entry);
41
- if (!fs.statSync(worktreePath).isDirectory()) continue;
42
- const dirty = isDirty(worktreePath);
43
- if (dirty && !options.force) {
44
- const artifact = writeArtifact(manifest.artifactsRoot, {
45
- kind: "diff",
46
- relativePath: `cleanup/${entry}.diff`,
47
- content: captureDiff(worktreePath),
48
- producer: "worktree-cleanup",
49
- });
50
- result.artifactPaths.push(artifact.path);
51
- result.preserved.push({ path: worktreePath, reason: "dirty worktree preserved" });
52
- continue;
53
- }
54
- try {
55
- git(manifest.cwd, ["worktree", "remove", options.force ? "--force" : "", worktreePath].filter(Boolean));
56
- result.removed.push(worktreePath);
57
- } catch (error) {
58
- const message = error instanceof Error ? error.message : String(error);
59
- result.preserved.push({ path: worktreePath, reason: message });
60
- }
61
- }
62
-
63
- try {
64
- if (fs.existsSync(worktreeRoot) && fs.readdirSync(worktreeRoot).length === 0) fs.rmSync(worktreeRoot, { recursive: true, force: true });
65
- } catch {
66
- // Non-critical cleanup.
67
- }
68
- return result;
69
- }
1
+ import { execFileSync } from "node:child_process";
2
+ import * as fs from "node:fs";
3
+ import * as path from "node:path";
4
+ import type { TeamRunManifest } from "../state/types.ts";
5
+ import { writeArtifact } from "../state/artifact-store.ts";
6
+ import { projectCrewRoot } from "../utils/paths.ts";
7
+ import { DEFAULT_PATHS } from "../config/defaults.ts";
8
+
9
+ export interface WorktreeCleanupResult {
10
+ removed: string[];
11
+ preserved: Array<{ path: string; reason: string }>;
12
+ artifactPaths: string[];
13
+ }
14
+
15
+ function git(cwd: string, args: string[]): string {
16
+ return execFileSync("git", args, { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim();
17
+ }
18
+
19
+ function isDirty(worktreePath: string): boolean {
20
+ try {
21
+ return git(worktreePath, ["status", "--porcelain"]).trim().length > 0;
22
+ } catch {
23
+ return true;
24
+ }
25
+ }
26
+
27
+ function captureDiff(worktreePath: string): string {
28
+ try {
29
+ return [git(worktreePath, ["status", "--porcelain"]), "", git(worktreePath, ["diff", "--stat"]), "", git(worktreePath, ["diff"])].join("\n");
30
+ } catch (error) {
31
+ const message = error instanceof Error ? error.message : String(error);
32
+ return `Failed to capture cleanup diff for ${worktreePath}: ${message}`;
33
+ }
34
+ }
35
+
36
+ export function cleanupRunWorktrees(manifest: TeamRunManifest, options: { force?: boolean } = {}): WorktreeCleanupResult {
37
+ const worktreeRoot = path.join(projectCrewRoot(manifest.cwd), DEFAULT_PATHS.state.worktreesSubdir, manifest.runId);
38
+ const result: WorktreeCleanupResult = { removed: [], preserved: [], artifactPaths: [] };
39
+ if (!fs.existsSync(worktreeRoot)) return result;
40
+
41
+ for (const entry of fs.readdirSync(worktreeRoot)) {
42
+ const worktreePath = path.join(worktreeRoot, entry);
43
+ if (!fs.statSync(worktreePath).isDirectory()) continue;
44
+ const dirty = isDirty(worktreePath);
45
+ if (dirty && !options.force) {
46
+ const artifact = writeArtifact(manifest.artifactsRoot, {
47
+ kind: "diff",
48
+ relativePath: `cleanup/${entry}.diff`,
49
+ content: captureDiff(worktreePath),
50
+ producer: "worktree-cleanup",
51
+ });
52
+ result.artifactPaths.push(artifact.path);
53
+ result.preserved.push({ path: worktreePath, reason: "dirty worktree preserved" });
54
+ continue;
55
+ }
56
+ try {
57
+ git(manifest.cwd, ["worktree", "remove", options.force ? "--force" : "", worktreePath].filter(Boolean));
58
+ result.removed.push(worktreePath);
59
+ } catch (error) {
60
+ const message = error instanceof Error ? error.message : String(error);
61
+ result.preserved.push({ path: worktreePath, reason: message });
62
+ }
63
+ }
64
+
65
+ try {
66
+ if (fs.existsSync(worktreeRoot) && fs.readdirSync(worktreeRoot).length === 0) fs.rmSync(worktreeRoot, { recursive: true, force: true });
67
+ } catch {
68
+ // Non-critical cleanup.
69
+ }
70
+ return result;
71
+ }
@@ -2,6 +2,8 @@ import { execFileSync, spawnSync } from "node:child_process";
2
2
  import * as fs from "node:fs";
3
3
  import * as path from "node:path";
4
4
  import { loadConfig } from "../config/config.ts";
5
+ import { projectCrewRoot } from "../utils/paths.ts";
6
+ import { DEFAULT_PATHS } from "../config/defaults.ts";
5
7
  import type { TeamRunManifest, TeamTaskState } from "../state/types.ts";
6
8
 
7
9
  export interface PreparedTaskWorkspace {
@@ -85,7 +87,7 @@ export function prepareTaskWorkspace(manifest: TeamRunManifest, task: TeamTaskSt
85
87
  const repoRoot = findGitRoot(manifest.cwd);
86
88
  const loadedConfig = loadConfig(manifest.cwd);
87
89
  if (loadedConfig.config.requireCleanWorktreeLeader !== false) assertCleanLeader(repoRoot);
88
- const worktreeRoot = path.join(repoRoot, ".pi", "teams", "worktrees", manifest.runId);
90
+ const worktreeRoot = path.join(projectCrewRoot(manifest.cwd), DEFAULT_PATHS.state.worktreesSubdir, manifest.runId);
89
91
  fs.mkdirSync(worktreeRoot, { recursive: true });
90
92
  const worktreePath = path.join(worktreeRoot, task.id);
91
93
  const branch = `pi-crew/${sanitizeBranchPart(manifest.runId)}/${sanitizeBranchPart(task.id)}`;
@@ -1,12 +1,12 @@
1
- ---
2
- name: default
3
- description: Balanced team for ordinary implementation tasks
4
- defaultWorkflow: default
5
- workspaceMode: single
6
- maxConcurrency: 2
7
- ---
8
-
9
- - explorer: agent=explorer fast discovery
10
- - planner: agent=planner plan the work
11
- - executor: agent=executor implement changes
12
- - verifier: agent=verifier verify completion
1
+ ---
2
+ name: default
3
+ description: Balanced team for ordinary implementation tasks
4
+ defaultWorkflow: default
5
+ workspaceMode: single
6
+ maxConcurrency: 2
7
+ ---
8
+
9
+ - explorer: agent=explorer fast discovery
10
+ - planner: agent=planner plan the work
11
+ - executor: agent=executor implement changes
12
+ - verifier: agent=verifier verify completion
@@ -1,11 +1,11 @@
1
- ---
2
- name: fast-fix
3
- description: Small team for quick bug fixes
4
- defaultWorkflow: fast-fix
5
- workspaceMode: single
6
- maxConcurrency: 1
7
- ---
8
-
9
- - explorer: agent=explorer find the relevant files
10
- - executor: agent=executor make the fix
11
- - verifier: agent=verifier verify the fix
1
+ ---
2
+ name: fast-fix
3
+ description: Small team for quick bug fixes
4
+ defaultWorkflow: fast-fix
5
+ workspaceMode: single
6
+ maxConcurrency: 1
7
+ ---
8
+
9
+ - explorer: agent=explorer find the relevant files
10
+ - executor: agent=executor make the fix
11
+ - verifier: agent=verifier verify the fix
@@ -1,18 +1,18 @@
1
- ---
2
- name: implementation
3
- description: Full implementation team with parallel specialists, critique, execution, review, and verification
4
- defaultWorkflow: implementation
5
- workspaceMode: single
6
- maxConcurrency: 3
7
- ---
8
-
9
- - explorer: agent=explorer map the codebase
10
- - analyst: agent=analyst clarify requirements and constraints
11
- - planner: agent=planner create execution plan
12
- - critic: agent=critic challenge and synthesize specialist findings
13
- - executor: agent=executor implement the plan
14
- - reviewer: agent=reviewer review the implementation
15
- - security-reviewer: agent=security-reviewer review security and trust boundaries
16
- - test-engineer: agent=test-engineer design and run verification
17
- - verifier: agent=verifier verify done
18
- - writer: agent=writer summarize documentation or release notes when needed
1
+ ---
2
+ name: implementation
3
+ description: Full implementation team with parallel specialists, critique, execution, review, and verification
4
+ defaultWorkflow: implementation
5
+ workspaceMode: single
6
+ maxConcurrency: 3
7
+ ---
8
+
9
+ - explorer: agent=explorer map the codebase
10
+ - analyst: agent=analyst clarify requirements and constraints
11
+ - planner: agent=planner create execution plan
12
+ - critic: agent=critic challenge and synthesize specialist findings
13
+ - executor: agent=executor implement the plan
14
+ - reviewer: agent=reviewer review the implementation
15
+ - security-reviewer: agent=security-reviewer review security and trust boundaries
16
+ - test-engineer: agent=test-engineer design and run verification
17
+ - verifier: agent=verifier verify done
18
+ - writer: agent=writer summarize documentation or release notes when needed
@@ -1,14 +1,14 @@
1
- ---
2
- name: parallel-research
3
- description: Parallel research team for multi-project/source audits
4
- workspaceMode: single
5
- defaultWorkflow: parallel-research
6
- maxConcurrency: 4
7
- triggers: đọc sâu, deep read, deep research, source audit, multiple projects, parallel research, pi-*
8
- category: research
9
- cost: cheap
10
- ---
11
-
12
- - explorer: agent=explorer gather source facts in parallel shards
13
- - analyst: agent=analyst synthesize shard findings
14
- - writer: agent=writer produce final notes
1
+ ---
2
+ name: parallel-research
3
+ description: Parallel research team for multi-project/source audits
4
+ workspaceMode: single
5
+ defaultWorkflow: parallel-research
6
+ maxConcurrency: 4
7
+ triggers: đọc sâu, deep read, deep research, source audit, multiple projects, parallel research, pi-*
8
+ category: research
9
+ cost: cheap
10
+ ---
11
+
12
+ - explorer: agent=explorer gather source facts in parallel shards
13
+ - analyst: agent=analyst synthesize shard findings
14
+ - writer: agent=writer produce final notes
@@ -1,11 +1,11 @@
1
- ---
2
- name: research
3
- description: Team for investigation and documentation
4
- defaultWorkflow: research
5
- workspaceMode: single
6
- maxConcurrency: 2
7
- ---
8
-
9
- - explorer: agent=explorer gather codebase facts
10
- - analyst: agent=analyst analyze findings
11
- - writer: agent=writer produce final notes
1
+ ---
2
+ name: research
3
+ description: Team for investigation and documentation
4
+ defaultWorkflow: research
5
+ workspaceMode: single
6
+ maxConcurrency: 2
7
+ ---
8
+
9
+ - explorer: agent=explorer gather codebase facts
10
+ - analyst: agent=analyst analyze findings
11
+ - writer: agent=writer produce final notes
@@ -1,12 +1,12 @@
1
- ---
2
- name: review
3
- description: Team for code review and security review
4
- defaultWorkflow: review
5
- workspaceMode: single
6
- maxConcurrency: 2
7
- ---
8
-
9
- - explorer: agent=explorer understand changed areas
10
- - reviewer: agent=reviewer review correctness and maintainability
11
- - security-reviewer: agent=security-reviewer review security risks
12
- - verifier: agent=verifier summarize pass/fail
1
+ ---
2
+ name: review
3
+ description: Team for code review and security review
4
+ defaultWorkflow: review
5
+ workspaceMode: single
6
+ maxConcurrency: 2
7
+ ---
8
+
9
+ - explorer: agent=explorer understand changed areas
10
+ - reviewer: agent=reviewer review correctness and maintainability
11
+ - security-reviewer: agent=security-reviewer review security risks
12
+ - verifier: agent=verifier summarize pass/fail
@@ -1,29 +1,29 @@
1
- ---
2
- name: default
3
- description: Explore, plan, execute, and verify
4
- ---
5
-
6
- ## explore
7
- role: explorer
8
-
9
- Explore the codebase for the goal: {goal}
10
-
11
- ## plan
12
- role: planner
13
- dependsOn: explore
14
- output: plan.md
15
-
16
- Create a concise implementation plan for: {goal}
17
-
18
- ## execute
19
- role: executor
20
- dependsOn: plan
21
-
22
- Implement the plan for: {goal}
23
-
24
- ## verify
25
- role: verifier
26
- dependsOn: execute
27
- verify: true
28
-
29
- Verify completion for: {goal}
1
+ ---
2
+ name: default
3
+ description: Explore, plan, execute, and verify
4
+ ---
5
+
6
+ ## explore
7
+ role: explorer
8
+
9
+ Explore the codebase for the goal: {goal}
10
+
11
+ ## plan
12
+ role: planner
13
+ dependsOn: explore
14
+ output: plan.md
15
+
16
+ Create a concise implementation plan for: {goal}
17
+
18
+ ## execute
19
+ role: executor
20
+ dependsOn: plan
21
+
22
+ Implement the plan for: {goal}
23
+
24
+ ## verify
25
+ role: verifier
26
+ dependsOn: execute
27
+ verify: true
28
+
29
+ Verify completion for: {goal}
@@ -1,22 +1,22 @@
1
- ---
2
- name: fast-fix
3
- description: Minimal workflow for small fixes
4
- ---
5
-
6
- ## explore
7
- role: explorer
8
-
9
- Find the likely source of the issue: {goal}
10
-
11
- ## execute
12
- role: executor
13
- dependsOn: explore
14
-
15
- Make the smallest safe fix.
16
-
17
- ## verify
18
- role: verifier
19
- dependsOn: execute
20
- verify: true
21
-
22
- Verify the fix with available evidence.
1
+ ---
2
+ name: fast-fix
3
+ description: Minimal workflow for small fixes
4
+ ---
5
+
6
+ ## explore
7
+ role: explorer
8
+
9
+ Find the likely source of the issue: {goal}
10
+
11
+ ## execute
12
+ role: executor
13
+ dependsOn: explore
14
+
15
+ Make the smallest safe fix.
16
+
17
+ ## verify
18
+ role: verifier
19
+ dependsOn: execute
20
+ verify: true
21
+
22
+ Verify the fix with available evidence.
@@ -1,38 +1,38 @@
1
- ---
2
- name: implementation
3
- description: Adaptive implementation workflow where a planner agent decides the subagent fanout
4
- ---
5
-
6
- ## assess
7
- role: planner
8
- output: adaptive-plan.json
9
-
10
- Assess this task and decide how many subagents are actually needed for: {goal}
11
-
12
- You are the orchestration planner. Inspect the repository enough to choose an efficient crew; do not use a fixed template. Small/simple tasks may need one executor plus one verifier. Risky or broad tasks may need parallel explorers, specialists, implementers, reviewers, security reviewers, or test engineers.
13
-
14
- Return a concise rationale, then include exactly one JSON block between these markers:
15
-
16
- ADAPTIVE_PLAN_JSON_START
17
- {
18
- "phases": [
19
- {
20
- "name": "short-phase-name",
21
- "tasks": [
22
- {
23
- "role": "explorer|analyst|planner|critic|executor|reviewer|security-reviewer|test-engineer|verifier|writer",
24
- "title": "short task title",
25
- "task": "specific autonomous task prompt for this subagent"
26
- }
27
- ]
28
- }
29
- ]
30
- }
31
- ADAPTIVE_PLAN_JSON_END
32
-
33
- Rules:
34
- - Choose the smallest effective number of subagents.
35
- - Use parallel tasks in the same phase only when their work is independent.
36
- - Later phases depend on all tasks in the previous phase.
37
- - Include verification/review tasks when implementation is requested.
38
- - Do not include more than 12 total subagents; split or summarize oversized plans instead.
1
+ ---
2
+ name: implementation
3
+ description: Adaptive implementation workflow where a planner agent decides the subagent fanout
4
+ ---
5
+
6
+ ## assess
7
+ role: planner
8
+ output: adaptive-plan.json
9
+
10
+ Assess this task and decide how many subagents are actually needed for: {goal}
11
+
12
+ You are the orchestration planner. Inspect the repository enough to choose an efficient crew; do not use a fixed template. Small/simple tasks may need one executor plus one verifier. Risky or broad tasks may need parallel explorers, specialists, implementers, reviewers, security reviewers, or test engineers.
13
+
14
+ Return a concise rationale, then include exactly one JSON block between these markers:
15
+
16
+ ADAPTIVE_PLAN_JSON_START
17
+ {
18
+ "phases": [
19
+ {
20
+ "name": "short-phase-name",
21
+ "tasks": [
22
+ {
23
+ "role": "explorer|analyst|planner|critic|executor|reviewer|security-reviewer|test-engineer|verifier|writer",
24
+ "title": "short task title",
25
+ "task": "specific autonomous task prompt for this subagent"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ ADAPTIVE_PLAN_JSON_END
32
+
33
+ Rules:
34
+ - Choose the smallest effective number of subagents.
35
+ - Use parallel tasks in the same phase only when their work is independent.
36
+ - Later phases depend on all tasks in the previous phase.
37
+ - Include verification/review tasks when implementation is requested.
38
+ - Do not include more than 12 total subagents; split or summarize oversized plans instead.
@@ -1,46 +1,46 @@
1
- ---
2
- name: parallel-research
3
- description: Parallel research with shard exploration and synthesis
4
- ---
5
-
6
- ## discover
7
- role: explorer
8
-
9
- Discover the relevant files/projects for: {goal}. Return a shard plan with paths grouped by topic. Do not deeply read every file yet; focus on routing the work.
10
-
11
- ## explore-core
12
- role: explorer
13
- parallelGroup: explore
14
-
15
- Explore the core/runtime shard from the discover output. Focus on architecture, package config, docs, and reusable patterns for: {goal}
16
-
17
- ## explore-ui
18
- role: explorer
19
- parallelGroup: explore
20
-
21
- Explore the UI/TUI/extension-interface shard from the discover output. Focus on widgets, overlays, commands, status bars, package config, docs, and reusable patterns for: {goal}
22
-
23
- ## explore-runtime
24
- role: explorer
25
- parallelGroup: explore
26
-
27
- Explore the worker/runtime/subagent/runtime-control shard from the discover output. Focus on process/session/runtime orchestration, event streams, logs, package config, docs, and reusable patterns for: {goal}
28
-
29
- ## explore-extensions
30
- role: explorer
31
- parallelGroup: explore
32
-
33
- Explore the extension bundle/small-package shard from the discover output. Focus on package config, extension registration, commands/tools, docs, and reusable patterns for: {goal}
34
-
35
- ## synthesize
36
- role: analyst
37
- dependsOn: explore-core, explore-ui, explore-runtime, explore-extensions
38
-
39
- Synthesize all shard findings. Use discover output if available, but do not require it. Identify common patterns, gaps, and concrete recommendations.
40
-
41
- ## write
42
- role: writer
43
- dependsOn: synthesize
44
- output: research-summary.md
45
-
46
- Write a concise final summary with evidence, risks, and actionable next steps.
1
+ ---
2
+ name: parallel-research
3
+ description: Parallel research with shard exploration and synthesis
4
+ ---
5
+
6
+ ## discover
7
+ role: explorer
8
+
9
+ Discover the relevant files/projects for: {goal}. Return a shard plan with paths grouped by topic. Do not deeply read every file yet; focus on routing the work.
10
+
11
+ ## explore-core
12
+ role: explorer
13
+ parallelGroup: explore
14
+
15
+ Explore the core/runtime shard from the discover output. Focus on architecture, package config, docs, and reusable patterns for: {goal}
16
+
17
+ ## explore-ui
18
+ role: explorer
19
+ parallelGroup: explore
20
+
21
+ Explore the UI/TUI/extension-interface shard from the discover output. Focus on widgets, overlays, commands, status bars, package config, docs, and reusable patterns for: {goal}
22
+
23
+ ## explore-runtime
24
+ role: explorer
25
+ parallelGroup: explore
26
+
27
+ Explore the worker/runtime/subagent/runtime-control shard from the discover output. Focus on process/session/runtime orchestration, event streams, logs, package config, docs, and reusable patterns for: {goal}
28
+
29
+ ## explore-extensions
30
+ role: explorer
31
+ parallelGroup: explore
32
+
33
+ Explore the extension bundle/small-package shard from the discover output. Focus on package config, extension registration, commands/tools, docs, and reusable patterns for: {goal}
34
+
35
+ ## synthesize
36
+ role: analyst
37
+ dependsOn: explore-core, explore-ui, explore-runtime, explore-extensions
38
+
39
+ Synthesize all shard findings. Use discover output if available, but do not require it. Identify common patterns, gaps, and concrete recommendations.
40
+
41
+ ## write
42
+ role: writer
43
+ dependsOn: synthesize
44
+ output: research-summary.md
45
+
46
+ Write a concise final summary with evidence, risks, and actionable next steps.
@@ -1,22 +1,22 @@
1
- ---
2
- name: research
3
- description: Research and write up findings
4
- ---
5
-
6
- ## explore
7
- role: explorer
8
-
9
- Gather relevant facts for: {goal}
10
-
11
- ## analyze
12
- role: analyst
13
- dependsOn: explore
14
-
15
- Analyze and organize the findings.
16
-
17
- ## write
18
- role: writer
19
- dependsOn: analyze
20
- output: research-summary.md
21
-
22
- Write a concise final summary with evidence and open questions.
1
+ ---
2
+ name: research
3
+ description: Research and write up findings
4
+ ---
5
+
6
+ ## explore
7
+ role: explorer
8
+
9
+ Gather relevant facts for: {goal}
10
+
11
+ ## analyze
12
+ role: analyst
13
+ dependsOn: explore
14
+
15
+ Analyze and organize the findings.
16
+
17
+ ## write
18
+ role: writer
19
+ dependsOn: analyze
20
+ output: research-summary.md
21
+
22
+ Write a concise final summary with evidence and open questions.