claude-all-hands 1.0.1 → 1.0.2
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/.claude/agents/code-simplifier.md +52 -0
- package/.claude/agents/curator.md +189 -245
- package/.claude/agents/documentor.md +147 -0
- package/.claude/agents/planner.md +123 -166
- package/.claude/agents/researcher.md +58 -41
- package/.claude/agents/surveyor.md +81 -0
- package/.claude/agents/worker.md +74 -0
- package/.claude/commands/audit-docs.md +94 -0
- package/.claude/commands/continue.md +120 -0
- package/.claude/commands/create-docs.md +100 -0
- package/.claude/commands/create-skill.md +107 -0
- package/.claude/commands/create-specialist.md +111 -0
- package/.claude/commands/curator-audit.md +4 -0
- package/.claude/commands/debug.md +183 -0
- package/.claude/commands/plan.md +199 -102
- package/.claude/commands/validate.md +11 -0
- package/.claude/commands/whats-next.md +106 -134
- package/.claude/envoy/envoy +11 -14
- package/.claude/envoy/package-lock.json +1388 -0
- package/.claude/envoy/package.json +29 -0
- package/.claude/envoy/src/cli.ts +126 -0
- package/.claude/envoy/src/commands/base.ts +216 -0
- package/.claude/envoy/src/commands/gemini.ts +999 -0
- package/.claude/envoy/src/commands/git.ts +639 -0
- package/.claude/envoy/src/commands/index.ts +73 -0
- package/.claude/envoy/src/commands/knowledge.ts +187 -0
- package/.claude/envoy/src/commands/perplexity.ts +129 -0
- package/.claude/envoy/src/commands/plan/core.ts +134 -0
- package/.claude/envoy/src/commands/plan/findings.ts +446 -0
- package/.claude/envoy/src/commands/plan/gates.ts +672 -0
- package/.claude/envoy/src/commands/plan/index.ts +135 -0
- package/.claude/envoy/src/commands/plan/lifecycle.ts +648 -0
- package/.claude/envoy/src/commands/plan/plan-file.ts +138 -0
- package/.claude/envoy/src/commands/plan/prompts.ts +285 -0
- package/.claude/envoy/src/commands/plan/protocols.ts +166 -0
- package/.claude/envoy/src/commands/repomix.ts +99 -0
- package/.claude/envoy/src/commands/tavily.ts +220 -0
- package/.claude/envoy/src/commands/xai.ts +168 -0
- package/.claude/envoy/src/lib/design.ts +41 -0
- package/.claude/envoy/src/lib/feedback-schemas.ts +154 -0
- package/.claude/envoy/src/lib/findings.ts +215 -0
- package/.claude/envoy/src/lib/gates.ts +572 -0
- package/.claude/envoy/src/lib/git.ts +132 -0
- package/.claude/envoy/src/lib/index.ts +188 -0
- package/.claude/envoy/src/lib/knowledge.ts +594 -0
- package/.claude/envoy/src/lib/markdown.ts +75 -0
- package/.claude/envoy/src/lib/observability.ts +262 -0
- package/.claude/envoy/src/lib/paths.ts +130 -0
- package/.claude/envoy/src/lib/plan-io.ts +117 -0
- package/.claude/envoy/src/lib/prompts.ts +231 -0
- package/.claude/envoy/src/lib/protocols.ts +314 -0
- package/.claude/envoy/src/lib/repomix.ts +133 -0
- package/.claude/envoy/src/lib/retry.ts +138 -0
- package/.claude/envoy/src/lib/watcher.ts +167 -0
- package/.claude/envoy/tsconfig.json +21 -0
- package/.claude/hooks/scripts/scan_agents.py +62 -0
- package/.claude/hooks/scripts/scan_commands.py +50 -0
- package/.claude/hooks/scripts/scan_skills.py +46 -70
- package/.claude/hooks/scripts/validate_artifacts.py +128 -0
- package/.claude/hooks/startup.sh +26 -24
- package/.claude/protocols/bug-discovery.yaml +55 -0
- package/.claude/protocols/debugging.yaml +51 -0
- package/.claude/protocols/discovery.yaml +53 -0
- package/.claude/protocols/implementation.yaml +84 -0
- package/.claude/settings.json +37 -97
- package/.claude/skills/brainstorming/SKILL.md +54 -0
- package/.claude/skills/commands-development/SKILL.md +630 -0
- package/.claude/skills/commands-development/references/arguments.md +252 -0
- package/.claude/skills/commands-development/references/patterns.md +796 -0
- package/.claude/skills/commands-development/references/tool-restrictions.md +376 -0
- package/.claude/skills/discovery-mode/SKILL.md +108 -0
- package/.claude/skills/hooks-development/SKILL.md +332 -0
- package/.claude/skills/hooks-development/references/command-vs-prompt.md +269 -0
- package/.claude/skills/hooks-development/references/examples.md +658 -0
- package/.claude/skills/hooks-development/references/hook-types.md +463 -0
- package/.claude/skills/hooks-development/references/input-output-schemas.md +469 -0
- package/.claude/skills/hooks-development/references/matchers.md +470 -0
- package/.claude/skills/hooks-development/references/troubleshooting.md +587 -0
- package/.claude/skills/implementation-mode/SKILL.md +171 -0
- package/.claude/skills/research-tools/SKILL.md +35 -33
- package/.claude/skills/skills-development/SKILL.md +192 -0
- package/.claude/skills/skills-development/references/api-security.md +226 -0
- package/.claude/skills/skills-development/references/be-clear-and-direct.md +531 -0
- package/.claude/skills/skills-development/references/common-patterns.md +595 -0
- package/.claude/skills/skills-development/references/core-principles.md +437 -0
- package/.claude/skills/skills-development/references/executable-code.md +175 -0
- package/.claude/skills/skills-development/references/iteration-and-testing.md +474 -0
- package/.claude/skills/skills-development/references/recommended-structure.md +168 -0
- package/.claude/skills/skills-development/references/skill-structure.md +372 -0
- package/.claude/skills/skills-development/references/use-xml-tags.md +466 -0
- package/.claude/skills/skills-development/references/using-scripts.md +113 -0
- package/.claude/skills/skills-development/references/using-templates.md +112 -0
- package/.claude/skills/skills-development/references/workflows-and-validation.md +510 -0
- package/.claude/skills/skills-development/templates/router-skill.md +73 -0
- package/.claude/skills/skills-development/templates/simple-skill.md +33 -0
- package/.claude/skills/skills-development/workflows/add-reference.md +96 -0
- package/.claude/skills/skills-development/workflows/add-script.md +93 -0
- package/.claude/skills/skills-development/workflows/add-template.md +74 -0
- package/.claude/skills/skills-development/workflows/add-workflow.md +120 -0
- package/.claude/skills/skills-development/workflows/audit-skill.md +138 -0
- package/.claude/skills/skills-development/workflows/create-domain-expertise-skill.md +605 -0
- package/.claude/skills/skills-development/workflows/create-new-skill.md +191 -0
- package/.claude/skills/skills-development/workflows/get-guidance.md +121 -0
- package/.claude/skills/skills-development/workflows/upgrade-to-router.md +161 -0
- package/.claude/skills/skills-development/workflows/verify-skill.md +204 -0
- package/.claude/skills/subagents-development/SKILL.md +325 -0
- package/.claude/skills/subagents-development/references/context-management.md +567 -0
- package/.claude/skills/subagents-development/references/debugging-agents.md +714 -0
- package/.claude/skills/subagents-development/references/error-handling-and-recovery.md +502 -0
- package/.claude/skills/subagents-development/references/evaluation-and-testing.md +374 -0
- package/.claude/skills/subagents-development/references/orchestration-patterns.md +591 -0
- package/.claude/skills/subagents-development/references/subagents.md +508 -0
- package/.claude/skills/subagents-development/references/writing-subagent-prompts.md +517 -0
- package/.claude/statusline.sh +24 -0
- package/bin/cli.js +110 -72
- package/package.json +1 -1
- package/.claude/agents/explorer.md +0 -62
- package/.claude/agents/parallel-worker.md +0 -121
- package/.claude/commands/curation-fix.md +0 -92
- package/.claude/commands/new-branch.md +0 -36
- package/.claude/commands/parallel-discovery.md +0 -69
- package/.claude/commands/parallel-orchestration.md +0 -99
- package/.claude/commands/plan-checkpoint.md +0 -37
- package/.claude/envoy/commands/__init__.py +0 -1
- package/.claude/envoy/commands/base.py +0 -95
- package/.claude/envoy/commands/parallel.py +0 -439
- package/.claude/envoy/commands/perplexity.py +0 -86
- package/.claude/envoy/commands/plans.py +0 -451
- package/.claude/envoy/commands/tavily.py +0 -156
- package/.claude/envoy/commands/vertex.py +0 -358
- package/.claude/envoy/commands/xai.py +0 -124
- package/.claude/envoy/envoy.py +0 -122
- package/.claude/envoy/pyrightconfig.json +0 -4
- package/.claude/envoy/requirements.txt +0 -2
- package/.claude/hooks/capture-queries.sh +0 -3
- package/.claude/hooks/scripts/enforce_planning.py +0 -118
- package/.claude/hooks/scripts/enforce_rg.py +0 -34
- package/.claude/hooks/scripts/validate_skill.py +0 -81
- package/.claude/skills/claude-envoy-curation/SKILL.md +0 -162
- package/.claude/skills/claude-envoy-usage/SKILL.md +0 -46
- package/.claude/skills/command-development/SKILL.md +0 -206
- package/.claude/skills/command-development/examples/simple-commands.md +0 -212
- package/.claude/skills/command-development/references/frontmatter-reference.md +0 -221
- package/.claude/skills/hook-development/SKILL.md +0 -127
- package/.claude/skills/hook-development/examples/command-hooks.md +0 -301
- package/.claude/skills/hook-development/examples/prompt-hooks.md +0 -114
- package/.claude/skills/hook-development/references/event-reference.md +0 -226
- package/.claude/skills/repomix-extraction/SKILL.md +0 -91
- package/.claude/skills/skill-development/SKILL.md +0 -168
- package/.claude/skills/skill-development/examples/complete-skill-examples.md +0 -281
- package/.claude/skills/skill-development/references/progressive-disclosure.md +0 -141
- package/.claude/skills/skill-development/references/writing-style.md +0 -180
- package/.claude/skills/skill-development/scripts/validate-skill.sh +0 -144
- package/.claude/skills/specialist-builder/SKILL.md +0 -327
- package/.claude/skills/specialist-builder/docs/agent-catalog.md +0 -28
- package/.claude/skills/specialist-builder/examples/complete-agent-examples.md +0 -206
- package/.claude/skills/specialist-builder/references/system-prompt-patterns.md +0 -281
- package/.claude/skills/specialist-builder/references/triggering-examples.md +0 -162
- package/.claude/skills/specialist-builder/scripts/validate-agent.sh +0 -137
- /package/.claude/{envoy/claude-envoy.py → skills/claude-envoy-patterns/SKILL.md} +0 -0
package/bin/cli.js
CHANGED
|
@@ -4856,9 +4856,79 @@ var Yargs = YargsFactory(esm_default);
|
|
|
4856
4856
|
var yargs_default = Yargs;
|
|
4857
4857
|
|
|
4858
4858
|
// src/commands/init.ts
|
|
4859
|
-
import { existsSync as existsSync3, readFileSync as readFileSync5, writeFileSync, mkdirSync, copyFileSync, renameSync } from "fs";
|
|
4860
|
-
import { join as join2, dirname as dirname4, resolve as resolve6 } from "path";
|
|
4861
4859
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
4860
|
+
import { copyFileSync, existsSync as existsSync3, mkdirSync, readFileSync as readFileSync5, renameSync, writeFileSync } from "fs";
|
|
4861
|
+
import { dirname as dirname4, join as join2, resolve as resolve6 } from "path";
|
|
4862
|
+
import * as readline from "readline";
|
|
4863
|
+
|
|
4864
|
+
// src/lib/git.ts
|
|
4865
|
+
import { execSync, spawnSync } from "child_process";
|
|
4866
|
+
function git(args, cwd) {
|
|
4867
|
+
const result = spawnSync("git", args, {
|
|
4868
|
+
cwd,
|
|
4869
|
+
encoding: "utf-8",
|
|
4870
|
+
maxBuffer: 10 * 1024 * 1024
|
|
4871
|
+
});
|
|
4872
|
+
return {
|
|
4873
|
+
success: result.status === 0,
|
|
4874
|
+
stdout: result.stdout?.trim() || "",
|
|
4875
|
+
stderr: result.stderr?.trim() || ""
|
|
4876
|
+
};
|
|
4877
|
+
}
|
|
4878
|
+
function getCurrentBranch(repoPath) {
|
|
4879
|
+
const result = git(["rev-parse", "--abbrev-ref", "HEAD"], repoPath);
|
|
4880
|
+
return result.success ? result.stdout : "";
|
|
4881
|
+
}
|
|
4882
|
+
function getRepoName(repoPath) {
|
|
4883
|
+
const result = git(["remote", "get-url", "origin"], repoPath);
|
|
4884
|
+
if (result.success) {
|
|
4885
|
+
let name = result.stdout.split("/").pop() || "";
|
|
4886
|
+
if (name.endsWith(".git")) {
|
|
4887
|
+
name = name.slice(0, -4);
|
|
4888
|
+
}
|
|
4889
|
+
return name;
|
|
4890
|
+
}
|
|
4891
|
+
return repoPath.split("/").pop() || "unknown";
|
|
4892
|
+
}
|
|
4893
|
+
function getStagedFiles(repoPath) {
|
|
4894
|
+
const result = git(["diff", "--cached", "--name-only"], repoPath);
|
|
4895
|
+
if (!result.success || !result.stdout) {
|
|
4896
|
+
return /* @__PURE__ */ new Set();
|
|
4897
|
+
}
|
|
4898
|
+
return new Set(result.stdout.split("\n").filter(Boolean));
|
|
4899
|
+
}
|
|
4900
|
+
function isGitRepo(path2) {
|
|
4901
|
+
const result = git(["rev-parse", "--git-dir"], path2);
|
|
4902
|
+
return result.success;
|
|
4903
|
+
}
|
|
4904
|
+
function ghCli(args, cwd) {
|
|
4905
|
+
const result = spawnSync("gh", args, {
|
|
4906
|
+
cwd,
|
|
4907
|
+
encoding: "utf-8",
|
|
4908
|
+
maxBuffer: 10 * 1024 * 1024
|
|
4909
|
+
});
|
|
4910
|
+
return {
|
|
4911
|
+
success: result.status === 0,
|
|
4912
|
+
stdout: result.stdout?.trim() || "",
|
|
4913
|
+
stderr: result.stderr?.trim() || ""
|
|
4914
|
+
};
|
|
4915
|
+
}
|
|
4916
|
+
function checkGitInstalled() {
|
|
4917
|
+
try {
|
|
4918
|
+
execSync("git --version", { stdio: "ignore" });
|
|
4919
|
+
return true;
|
|
4920
|
+
} catch {
|
|
4921
|
+
return false;
|
|
4922
|
+
}
|
|
4923
|
+
}
|
|
4924
|
+
function checkGhInstalled() {
|
|
4925
|
+
try {
|
|
4926
|
+
execSync("gh --version", { stdio: "ignore" });
|
|
4927
|
+
return true;
|
|
4928
|
+
} catch {
|
|
4929
|
+
return false;
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4862
4932
|
|
|
4863
4933
|
// src/lib/manifest.ts
|
|
4864
4934
|
import { readFileSync as readFileSync4, existsSync, readdirSync as readdirSync2 } from "fs";
|
|
@@ -6501,75 +6571,6 @@ function isIgnored(path2, patterns) {
|
|
|
6501
6571
|
return patterns.some((pattern) => minimatch(path2, pattern, { dot: true }));
|
|
6502
6572
|
}
|
|
6503
6573
|
|
|
6504
|
-
// src/lib/git.ts
|
|
6505
|
-
import { execSync, spawnSync } from "child_process";
|
|
6506
|
-
function git(args, cwd) {
|
|
6507
|
-
const result = spawnSync("git", args, {
|
|
6508
|
-
cwd,
|
|
6509
|
-
encoding: "utf-8",
|
|
6510
|
-
maxBuffer: 10 * 1024 * 1024
|
|
6511
|
-
});
|
|
6512
|
-
return {
|
|
6513
|
-
success: result.status === 0,
|
|
6514
|
-
stdout: result.stdout?.trim() || "",
|
|
6515
|
-
stderr: result.stderr?.trim() || ""
|
|
6516
|
-
};
|
|
6517
|
-
}
|
|
6518
|
-
function getCurrentBranch(repoPath) {
|
|
6519
|
-
const result = git(["rev-parse", "--abbrev-ref", "HEAD"], repoPath);
|
|
6520
|
-
return result.success ? result.stdout : "";
|
|
6521
|
-
}
|
|
6522
|
-
function getRepoName(repoPath) {
|
|
6523
|
-
const result = git(["remote", "get-url", "origin"], repoPath);
|
|
6524
|
-
if (result.success) {
|
|
6525
|
-
let name = result.stdout.split("/").pop() || "";
|
|
6526
|
-
if (name.endsWith(".git")) {
|
|
6527
|
-
name = name.slice(0, -4);
|
|
6528
|
-
}
|
|
6529
|
-
return name;
|
|
6530
|
-
}
|
|
6531
|
-
return repoPath.split("/").pop() || "unknown";
|
|
6532
|
-
}
|
|
6533
|
-
function getStagedFiles(repoPath) {
|
|
6534
|
-
const result = git(["diff", "--cached", "--name-only"], repoPath);
|
|
6535
|
-
if (!result.success || !result.stdout) {
|
|
6536
|
-
return /* @__PURE__ */ new Set();
|
|
6537
|
-
}
|
|
6538
|
-
return new Set(result.stdout.split("\n").filter(Boolean));
|
|
6539
|
-
}
|
|
6540
|
-
function isGitRepo(path2) {
|
|
6541
|
-
const result = git(["rev-parse", "--git-dir"], path2);
|
|
6542
|
-
return result.success;
|
|
6543
|
-
}
|
|
6544
|
-
function ghCli(args, cwd) {
|
|
6545
|
-
const result = spawnSync("gh", args, {
|
|
6546
|
-
cwd,
|
|
6547
|
-
encoding: "utf-8",
|
|
6548
|
-
maxBuffer: 10 * 1024 * 1024
|
|
6549
|
-
});
|
|
6550
|
-
return {
|
|
6551
|
-
success: result.status === 0,
|
|
6552
|
-
stdout: result.stdout?.trim() || "",
|
|
6553
|
-
stderr: result.stderr?.trim() || ""
|
|
6554
|
-
};
|
|
6555
|
-
}
|
|
6556
|
-
function checkGitInstalled() {
|
|
6557
|
-
try {
|
|
6558
|
-
execSync("git --version", { stdio: "ignore" });
|
|
6559
|
-
return true;
|
|
6560
|
-
} catch {
|
|
6561
|
-
return false;
|
|
6562
|
-
}
|
|
6563
|
-
}
|
|
6564
|
-
function checkGhInstalled() {
|
|
6565
|
-
try {
|
|
6566
|
-
execSync("gh --version", { stdio: "ignore" });
|
|
6567
|
-
return true;
|
|
6568
|
-
} catch {
|
|
6569
|
-
return false;
|
|
6570
|
-
}
|
|
6571
|
-
}
|
|
6572
|
-
|
|
6573
6574
|
// src/lib/paths.ts
|
|
6574
6575
|
import { existsSync as existsSync2 } from "fs";
|
|
6575
6576
|
import { dirname as dirname3, resolve as resolve5 } from "path";
|
|
@@ -6599,7 +6600,6 @@ function getAllhandsRoot() {
|
|
|
6599
6600
|
}
|
|
6600
6601
|
|
|
6601
6602
|
// src/commands/init.ts
|
|
6602
|
-
import * as readline from "readline";
|
|
6603
6603
|
var MIGRATION_MAP = {
|
|
6604
6604
|
"CLAUDE.md": "CLAUDE.project.md",
|
|
6605
6605
|
".claude/settings.json": ".claude/settings.local.json"
|
|
@@ -6613,6 +6613,34 @@ var HUSKY_HOOKS = [
|
|
|
6613
6613
|
"post-checkout",
|
|
6614
6614
|
"post-rewrite"
|
|
6615
6615
|
];
|
|
6616
|
+
function syncGitignore(allhandsRoot, target) {
|
|
6617
|
+
const sourceGitignore = join2(allhandsRoot, ".gitignore");
|
|
6618
|
+
const targetGitignore = join2(target, ".gitignore");
|
|
6619
|
+
if (!existsSync3(sourceGitignore)) {
|
|
6620
|
+
return { added: [], unchanged: true };
|
|
6621
|
+
}
|
|
6622
|
+
const sourceContent = readFileSync5(sourceGitignore, "utf-8");
|
|
6623
|
+
const sourceLines = sourceContent.split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#"));
|
|
6624
|
+
let targetLines = [];
|
|
6625
|
+
let targetContent = "";
|
|
6626
|
+
if (existsSync3(targetGitignore)) {
|
|
6627
|
+
targetContent = readFileSync5(targetGitignore, "utf-8");
|
|
6628
|
+
targetLines = targetContent.split("\n").map((line) => line.trim()).filter((line) => line && !line.startsWith("#"));
|
|
6629
|
+
}
|
|
6630
|
+
const targetSet = new Set(targetLines);
|
|
6631
|
+
const linesToAdd = sourceLines.filter((line) => !targetSet.has(line));
|
|
6632
|
+
if (linesToAdd.length === 0) {
|
|
6633
|
+
return { added: [], unchanged: true };
|
|
6634
|
+
}
|
|
6635
|
+
const additions = [
|
|
6636
|
+
"",
|
|
6637
|
+
"# AllHands framework ignores",
|
|
6638
|
+
...linesToAdd
|
|
6639
|
+
].join("\n");
|
|
6640
|
+
const newContent = targetContent.trimEnd() + additions + "\n";
|
|
6641
|
+
writeFileSync(targetGitignore, newContent);
|
|
6642
|
+
return { added: linesToAdd, unchanged: false };
|
|
6643
|
+
}
|
|
6616
6644
|
async function confirm(message) {
|
|
6617
6645
|
const rl = readline.createInterface({
|
|
6618
6646
|
input: process.stdin,
|
|
@@ -6737,6 +6765,16 @@ ${"!".repeat(60)}`);
|
|
|
6737
6765
|
copyFileSync(sourceFile, targetFile);
|
|
6738
6766
|
copied++;
|
|
6739
6767
|
}
|
|
6768
|
+
console.log("\nSyncing .gitignore entries...");
|
|
6769
|
+
const gitignoreResult = syncGitignore(allhandsRoot, resolvedTarget);
|
|
6770
|
+
if (gitignoreResult.unchanged) {
|
|
6771
|
+
console.log(" .gitignore already contains all required entries");
|
|
6772
|
+
} else {
|
|
6773
|
+
console.log(` Added ${gitignoreResult.added.length} entries to .gitignore:`);
|
|
6774
|
+
for (const entry of gitignoreResult.added) {
|
|
6775
|
+
console.log(` + ${entry}`);
|
|
6776
|
+
}
|
|
6777
|
+
}
|
|
6740
6778
|
const ignoreFile = join2(resolvedTarget, ".allhandsignore");
|
|
6741
6779
|
if (!existsSync3(ignoreFile)) {
|
|
6742
6780
|
const ignoreContent = `# AllHands Ignore - Exclude files from sync-back to claude-all-hands
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: explorer
|
|
3
|
-
description: |
|
|
4
|
-
Generic codebase explorer. Fallback when no specialist matches. Uses repomix for auto-context adoption of any directory.
|
|
5
|
-
|
|
6
|
-
<example>
|
|
7
|
-
user: "Analyze [directory] | Understand how [subsystem] works | What patterns are used in [path]?"
|
|
8
|
-
</example>
|
|
9
|
-
skills: repomix-extraction
|
|
10
|
-
tools: Read, Glob, Grep, Bash
|
|
11
|
-
model: Haiku 4.5
|
|
12
|
-
color: green
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<objective>
|
|
16
|
-
Explore unfamiliar codebase areas using repomix extraction. Discover patterns, synthesize findings, fill gaps when specialized knowledge doesnt exist. Fallback agent when no specialist matches.
|
|
17
|
-
</objective>
|
|
18
|
-
|
|
19
|
-
<quick_start>
|
|
20
|
-
1. Identify target directory/subsystem and questions to answer
|
|
21
|
-
2. Extract with repomix (MANDATORY for directory/multi-file reads)
|
|
22
|
-
3. Analyze patterns: structure, naming, style, error handling, testing
|
|
23
|
-
4. Return structured exploration findings to main agent
|
|
24
|
-
</quick_start>
|
|
25
|
-
|
|
26
|
-
<success_criteria>
|
|
27
|
-
- Overview explains what the code does
|
|
28
|
-
- Patterns identified with concrete examples
|
|
29
|
-
- Conventions documented (naming, style, error handling)
|
|
30
|
-
- Recommendations actionable for main agent implementation
|
|
31
|
-
</success_criteria>
|
|
32
|
-
|
|
33
|
-
<constraints>
|
|
34
|
-
- READ-ONLY: Return findings, dont implement
|
|
35
|
-
- ALWAYS use repomix for directory/multi-file reads - never individual Read calls
|
|
36
|
-
- Focus on patterns relevant to original prompt
|
|
37
|
-
- Note if area is covered by existing specialist
|
|
38
|
-
</constraints>
|
|
39
|
-
|
|
40
|
-
## Output Format
|
|
41
|
-
|
|
42
|
-
```markdown
|
|
43
|
-
## Exploration: [Directory/Subsystem]
|
|
44
|
-
|
|
45
|
-
### Overview
|
|
46
|
-
[Brief description of what this code does]
|
|
47
|
-
|
|
48
|
-
### Structure
|
|
49
|
-
[Directory organization, key files]
|
|
50
|
-
|
|
51
|
-
### Patterns Found
|
|
52
|
-
- [Pattern 1 with examples]
|
|
53
|
-
- [Pattern 2 with examples]
|
|
54
|
-
|
|
55
|
-
### Conventions
|
|
56
|
-
- Naming: [conventions]
|
|
57
|
-
- Style: [conventions]
|
|
58
|
-
- Error handling: [approach]
|
|
59
|
-
|
|
60
|
-
### Recommendations
|
|
61
|
-
[How main agent should approach implementation in this area]
|
|
62
|
-
```
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: parallel-worker
|
|
3
|
-
description: |
|
|
4
|
-
Thin coordinator for parallel worktree execution. Spawns isolated subprocess worker via envoy, waits for completion, updates plan file. Main agent calls via Task(run_in_background=true).
|
|
5
|
-
|
|
6
|
-
<example>
|
|
7
|
-
user: "Run these tasks in parallel worker | Spawn worker for [isolated tasks] | Execute implementation in worktree"
|
|
8
|
-
</example>
|
|
9
|
-
tools: Read, Edit, Bash(.claude/envoy/envoy parallel:*)
|
|
10
|
-
model: inherit
|
|
11
|
-
color: yellow
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
<objective>
|
|
15
|
-
Coordinate parallel worktree execution. Spawn isolated Claude subprocess via envoy, wait for completion, update plan file with results. Thin wrapper - does NOT implement tasks directly.
|
|
16
|
-
</objective>
|
|
17
|
-
|
|
18
|
-
<quick_start>
|
|
19
|
-
1. Generate mini-plan from tasks as markdown checklist
|
|
20
|
-
2. Generate branch name: `worker/<feature>-<summary>`
|
|
21
|
-
3. Spawn via `envoy parallel spawn` and wait for completion
|
|
22
|
-
4. Update plan file with results and return status to main agent
|
|
23
|
-
</quick_start>
|
|
24
|
-
|
|
25
|
-
<success_criteria>
|
|
26
|
-
- Subprocess completes (exit code 0)
|
|
27
|
-
- Plan file updated with completed tasks and worker branch
|
|
28
|
-
- Return JSON with status, branch, summary, merge_ready flag
|
|
29
|
-
</success_criteria>
|
|
30
|
-
|
|
31
|
-
<constraints>
|
|
32
|
-
- NEVER implement tasks yourself - spawn subprocess to do work
|
|
33
|
-
- NEVER spawn nested workers - PARALLEL_WORKER_DEPTH blocks this
|
|
34
|
-
- NEVER modify code files - only plan file updates
|
|
35
|
-
- Output shielded - only heartbeats and final summary visible
|
|
36
|
-
</constraints>
|
|
37
|
-
|
|
38
|
-
## Input
|
|
39
|
-
|
|
40
|
-
Main agent provides task specification:
|
|
41
|
-
```
|
|
42
|
-
Tasks: [list of sequential tasks with no external dependencies]
|
|
43
|
-
Feature: <feature-name>
|
|
44
|
-
Base branch: <optional, defaults to HEAD>
|
|
45
|
-
Plan branch: <parent plan branch for updating plan file>
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Workflow
|
|
49
|
-
|
|
50
|
-
### 1. Generate Mini-Plan
|
|
51
|
-
|
|
52
|
-
Convert tasks to markdown checklist:
|
|
53
|
-
```markdown
|
|
54
|
-
# Worker Tasks
|
|
55
|
-
|
|
56
|
-
- [ ] Task 1 description
|
|
57
|
-
- [ ] Task 2 description
|
|
58
|
-
|
|
59
|
-
Complete each task sequentially. Commit after each logical change.
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### 2. Generate Branch Name
|
|
63
|
-
|
|
64
|
-
Pattern: `worker/<feature>-<summary>`
|
|
65
|
-
- Sanitize: lowercase, dashes, max 50 chars
|
|
66
|
-
- Example: `worker/api-add-validation-endpoint`
|
|
67
|
-
|
|
68
|
-
### 3. Spawn and Wait
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
.claude/envoy/envoy parallel spawn \
|
|
72
|
-
--branch "worker/<name>" \
|
|
73
|
-
--task "<task_description>" \
|
|
74
|
-
--plan "<mini-plan-markdown>" \
|
|
75
|
-
--from "<base_branch>"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
This blocks until the subprocess completes (always synchronous). Output shielded - only heartbeats and final summary visible.
|
|
79
|
-
|
|
80
|
-
### 4. Parse Result
|
|
81
|
-
|
|
82
|
-
Subprocess returns:
|
|
83
|
-
- Exit code (0 = success)
|
|
84
|
-
- Final summary line
|
|
85
|
-
- Log path for debugging
|
|
86
|
-
|
|
87
|
-
### 5. Update Main Plan File
|
|
88
|
-
|
|
89
|
-
Edit `.claude/plans/<plan_branch>/plan.md`:
|
|
90
|
-
|
|
91
|
-
Mark completed tasks:
|
|
92
|
-
```markdown
|
|
93
|
-
- [x] Task description (branch: worker/<name>)
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Add to `## Worker Branches` section (create if missing):
|
|
97
|
-
```markdown
|
|
98
|
-
## Worker Branches
|
|
99
|
-
- `worker/<name>`: <summary of completed work>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### 6. Return to Main Agent
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"status": "success|partial|failed",
|
|
107
|
-
"branch": "worker/<name>",
|
|
108
|
-
"summary": "What the subprocess accomplished",
|
|
109
|
-
"merge_ready": true,
|
|
110
|
-
"log_path": ".trees/<branch>/.claude-worker.log"
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Error Handling
|
|
115
|
-
|
|
116
|
-
| Scenario | Action |
|
|
117
|
-
|----------|--------|
|
|
118
|
-
| Spawn fails | Return error, include stderr |
|
|
119
|
-
| Subprocess fails | Return failed status with summary |
|
|
120
|
-
| Plan file missing | Skip plan update, still return result |
|
|
121
|
-
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Spawn curator worker for .claude/ infrastructure fixes while on feature branch
|
|
3
|
-
argument-hint: [task-description]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Spawn background worker to handle .claude/ infrastructure changes without interrupting current feature work. Isolates curation changes on separate branch.
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<quick_start>
|
|
11
|
-
1. Validate current branch (handle main specially)
|
|
12
|
-
2. Build task context from $ARGUMENTS
|
|
13
|
-
3. Spawn worker via `envoy parallel spawn`
|
|
14
|
-
4. Return worker info and continue feature work
|
|
15
|
-
</quick_start>
|
|
16
|
-
|
|
17
|
-
<success_criteria>
|
|
18
|
-
- Worker spawned on curation/<task-name> branch
|
|
19
|
-
- Worker has clear mission from task description
|
|
20
|
-
- Main session can continue feature work uninterrupted
|
|
21
|
-
- User has commands to check status/results/cleanup
|
|
22
|
-
</success_criteria>
|
|
23
|
-
|
|
24
|
-
<process>
|
|
25
|
-
|
|
26
|
-
## When to Use
|
|
27
|
-
|
|
28
|
-
- On feature branch, need to fix/add hook, skill, agent, or CLAUDE.md
|
|
29
|
-
- Don't want to context-switch from current implementation
|
|
30
|
-
- Change is unrelated to current plan
|
|
31
|
-
|
|
32
|
-
## Execution
|
|
33
|
-
|
|
34
|
-
### Step 1: Validate Context
|
|
35
|
-
|
|
36
|
-
Check current branch:
|
|
37
|
-
```bash
|
|
38
|
-
git branch --show-current
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
If on `main` or protected branch:
|
|
42
|
-
- Use AskUserQuestion: "You're on main. Create feature branch for curation work instead?"
|
|
43
|
-
- Options: ["Create curation branch", "Cancel"]
|
|
44
|
-
- On create → `git checkout -b curation/<sanitized-task>`
|
|
45
|
-
|
|
46
|
-
### Step 2: Build Task Context
|
|
47
|
-
|
|
48
|
-
Gather context for the worker:
|
|
49
|
-
1. Parse user's task description from $ARGUMENTS
|
|
50
|
-
2. If task mentions specific files, note them
|
|
51
|
-
3. Determine task type: hook | skill | agent | CLAUDE.md | other
|
|
52
|
-
|
|
53
|
-
### Step 3: Spawn Worker
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
.claude/envoy/envoy parallel spawn \
|
|
57
|
-
--branch "curation/$(echo '$ARGUMENTS' | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | cut -c1-30)" \
|
|
58
|
-
--from main \
|
|
59
|
-
--task "CURATOR TASK: $ARGUMENTS
|
|
60
|
-
|
|
61
|
-
You are a curator worker spawned to handle .claude/ infrastructure changes.
|
|
62
|
-
|
|
63
|
-
## Your Mission
|
|
64
|
-
$ARGUMENTS
|
|
65
|
-
|
|
66
|
-
## Guidelines
|
|
67
|
-
1. Use the curator patterns and skills for .claude/ work
|
|
68
|
-
2. Make atomic, focused changes
|
|
69
|
-
3. Commit your work with clear message
|
|
70
|
-
4. DO NOT spawn additional workers (nesting blocked)
|
|
71
|
-
|
|
72
|
-
## When Done
|
|
73
|
-
Commit all changes. The main session will check results via 'envoy parallel results'."
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Step 4: Confirm Launch
|
|
77
|
-
|
|
78
|
-
Return to user:
|
|
79
|
-
- Worker spawned on branch: `curation/<name>`
|
|
80
|
-
- Check status: `envoy parallel status`
|
|
81
|
-
- Get results: `envoy parallel results --worker <name>`
|
|
82
|
-
- Cleanup when done: `envoy parallel cleanup --worker <name>`
|
|
83
|
-
|
|
84
|
-
Continue with current feature work.
|
|
85
|
-
|
|
86
|
-
</process>
|
|
87
|
-
|
|
88
|
-
<constraints>
|
|
89
|
-
- Worker MUST NOT spawn additional workers (nesting blocked)
|
|
90
|
-
- Worker operates on SEPARATE branch from main work
|
|
91
|
-
- Changes isolated until explicitly merged
|
|
92
|
-
</constraints>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Review implementation against plan
|
|
3
|
-
argument-hint: [branch-name]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<objective>
|
|
7
|
-
Create and switch to a new branch, then initiate planning workflow if on a feature branch (non-direct mode).
|
|
8
|
-
</objective>
|
|
9
|
-
|
|
10
|
-
<quick_start>
|
|
11
|
-
1. Get branch name (ask if not provided)
|
|
12
|
-
2. Create branch and switch to it
|
|
13
|
-
3. If not direct-mode branch, run `/plan`
|
|
14
|
-
</quick_start>
|
|
15
|
-
|
|
16
|
-
<success_criteria>
|
|
17
|
-
- New branch created with given name
|
|
18
|
-
- Switched to new branch
|
|
19
|
-
- Planning initiated (if feature branch)
|
|
20
|
-
</success_criteria>
|
|
21
|
-
|
|
22
|
-
<process>
|
|
23
|
-
|
|
24
|
-
If the branch name is not provided, you MUST use AskUserQuestion to ask for the branch name.
|
|
25
|
-
|
|
26
|
-
Create a new branch with the given name and switch to it.
|
|
27
|
-
|
|
28
|
-
If the branch name is not one of "main", "master", "develop", "staging", "production", or starts with "quick/" (ie not in direct mode), run `/plan` to start planning.
|
|
29
|
-
|
|
30
|
-
</process>
|
|
31
|
-
|
|
32
|
-
<constraints>
|
|
33
|
-
- MUST ask for branch name if not provided
|
|
34
|
-
- Direct-mode branches: main, master, develop, staging, production, quick/*
|
|
35
|
-
- Non-direct-mode branches trigger `/plan` automatically
|
|
36
|
-
</constraints>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Parallel discovery - run multiple subagents simultaneously for read-only exploration
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<objective>
|
|
6
|
-
Execute parallel read-only exploration using multiple subagents simultaneously. Gathers diverse perspectives for planning or research without code changes.
|
|
7
|
-
</objective>
|
|
8
|
-
|
|
9
|
-
<quick_start>
|
|
10
|
-
1. Identify 2-4 independent discovery streams from task
|
|
11
|
-
2. Spawn Task tool calls simultaneously with `run_in_background: true`
|
|
12
|
-
3. Aggregate results via AgentOutputTool
|
|
13
|
-
4. Return unified analysis with source attribution
|
|
14
|
-
</quick_start>
|
|
15
|
-
|
|
16
|
-
<success_criteria>
|
|
17
|
-
- Multiple subagents completed exploration in parallel
|
|
18
|
-
- No overlapping scopes between subagents
|
|
19
|
-
- Unified synthesis returned with findings attributed by source
|
|
20
|
-
- No write operations performed (read-only mode)
|
|
21
|
-
</success_criteria>
|
|
22
|
-
|
|
23
|
-
<process>
|
|
24
|
-
|
|
25
|
-
## 1. Analyze Task
|
|
26
|
-
|
|
27
|
-
Identify 2-4 independent discovery streams. Consider:
|
|
28
|
-
- **Explorer**: Code structure, file relationships, implementation details
|
|
29
|
-
- **Curator**: Patterns, best practices, .claude/ infrastructure relevance
|
|
30
|
-
- **Researcher**: External docs, APIs, recent developments
|
|
31
|
-
- **Relevant specialist**: Domain-specific expertise (if exists)
|
|
32
|
-
|
|
33
|
-
## 2. Spawn Parallel Tasks
|
|
34
|
-
|
|
35
|
-
In your NEXT response, invoke multiple Task tool calls simultaneously.
|
|
36
|
-
|
|
37
|
-
**Rules:**
|
|
38
|
-
- Each task has explicit, non-overlapping scope
|
|
39
|
-
- Request CONCISE findings (10-20% of raw analysis)
|
|
40
|
-
- Use `run_in_background: true` for all tasks
|
|
41
|
-
- Max 4 parallel streams
|
|
42
|
-
|
|
43
|
-
**Template:**
|
|
44
|
-
```
|
|
45
|
-
Task 1: subagent_type=Explore, "Analyze [specific code aspect] for: $ARGUMENTS"
|
|
46
|
-
Task 2: subagent_type=curator, "Research [patterns/practices] relevant to: $ARGUMENTS"
|
|
47
|
-
Task 3: subagent_type=researcher, "Find [external info] about: $ARGUMENTS" (if needed)
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 3. Aggregate Results
|
|
51
|
-
|
|
52
|
-
After all subagents complete (use AgentOutputTool):
|
|
53
|
-
- Synthesize key findings from each stream
|
|
54
|
-
- Note conflicts or contradictions
|
|
55
|
-
- Recommend approach based on combined analysis
|
|
56
|
-
|
|
57
|
-
## 4. Return to User
|
|
58
|
-
|
|
59
|
-
Present unified analysis. Cite which subagent contributed what finding.
|
|
60
|
-
|
|
61
|
-
</process>
|
|
62
|
-
|
|
63
|
-
<constraints>
|
|
64
|
-
- NO overlapping scopes between subagents
|
|
65
|
-
- NO verbose subagent prompts (defeats context preservation)
|
|
66
|
-
- NO write operations (this is READ-ONLY discovery)
|
|
67
|
-
- NO use for simple tasks (only when multi-perspective valuable)
|
|
68
|
-
- MAX 4 parallel streams
|
|
69
|
-
</constraints>
|