@codedrifters/configulator 0.0.286 → 0.0.288

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/lib/index.mjs CHANGED
@@ -8082,7 +8082,7 @@ function buildDocsSyncSubAgent(_paths) {
8082
8082
  "persisted at:",
8083
8083
  "",
8084
8084
  "```",
8085
- ".claude/state/docs-sync/<issue-number>-audit.json",
8085
+ ".state/docs-sync/<issue-number>-audit.json",
8086
8086
  "```",
8087
8087
  "",
8088
8088
  "Every report carries a `schemaVersion`, the `issueNumber`, the",
@@ -11198,7 +11198,7 @@ function assertValidEligibleLabels(labels) {
11198
11198
 
11199
11199
  // src/agent/bundles/run-ratio.ts
11200
11200
  var DEFAULT_DISPATCH_TO_HOUSEKEEPING_RATIO = 4;
11201
- var DEFAULT_STATE_FILE_PATH = ".claude/state/orchestrator-runs.json";
11201
+ var DEFAULT_STATE_FILE_PATH = ".state/orchestrator-runs.json";
11202
11202
  var DEFAULT_DISPATCH_MODEL = "opus";
11203
11203
  var DEFAULT_HOUSEKEEPING_MODEL = "sonnet";
11204
11204
  function resolveRunRatio(config) {
@@ -11853,10 +11853,33 @@ function renderPipelineSkillBody(task, lines) {
11853
11853
  "filter issues by `type:*` or phase label. Each invocation runs the",
11854
11854
  `target sub-agent's full end-to-end cycle exactly once.`,
11855
11855
  "",
11856
- `Run \`.claude/agents/${task.agent}.md\` and follow its workflow`,
11857
- "from start to finish. The sub-agent is responsible for picking the",
11858
- "next unit of work, delegating implementation to other workers as",
11859
- "needed, and exiting cleanly.",
11856
+ "## Depth-0 execution contract",
11857
+ "",
11858
+ "**You \u2014 the scheduled-task session \u2014 are the pipeline manager.**",
11859
+ "Do **not** spawn the target sub-agent via the `Agent` tool. The",
11860
+ "Claude Code runtime forbids nested sub-agent spawning: a depth-1",
11861
+ "sub-agent cannot invoke `Agent` to reach depth-2, so a pipeline",
11862
+ "manager that delegates to other workers must run at depth-0 (this",
11863
+ "scheduled-task session). See",
11864
+ '<https://code.claude.com/docs/en/sub-agents> \u2014 *"Subagents cannot',
11865
+ "spawn other subagents. If your workflow requires nested delegation,",
11866
+ 'use Skills or chain subagents from the main conversation."*',
11867
+ "",
11868
+ "Therefore:",
11869
+ "",
11870
+ `1. **Read \`.claude/agents/${task.agent}.md\` in this session** and`,
11871
+ " execute its phase pipeline directly. Treat the agent file as a",
11872
+ " workflow runbook the scheduled-task session follows step-by-step,",
11873
+ " not as a sub-agent to spawn.",
11874
+ "2. **Use the `Agent` tool (with the `subagent_type` parameter set",
11875
+ " to the target worker name) to delegate one tier down.** From",
11876
+ " depth-0, you can spawn a depth-1 sub-agent (e.g. `issue-worker`,",
11877
+ " `pr-reviewer`) for the implementation, review, or merge step the",
11878
+ " pipeline calls out.",
11879
+ "3. **Never spawn the pipeline manager itself as a sub-agent.** Do",
11880
+ ` not call \`Agent(subagent_type: "${task.agent}", ...)\`. That`,
11881
+ " would put the pipeline manager at depth-1 and break every",
11882
+ " subsequent delegation step.",
11860
11883
  "",
11861
11884
  "## Recommended model",
11862
11885
  "",
@@ -13278,7 +13301,6 @@ var orchestratorSubAgent = {
13278
13301
  description: "End-to-end pipeline manager that runs one full cycle every invocation: pre-flight PR merge \u2192 triage \u2192 maintenance \u2192 queue scan \u2192 delegate the picked issue to the issue-worker \u2192 cleanup",
13279
13302
  model: AGENT_MODEL.POWERFUL,
13280
13303
  maxTurns: 100,
13281
- canDelegateToAgents: ["issue-worker", "pr-reviewer"],
13282
13304
  platforms: { cursor: { exclude: true } },
13283
13305
  prompt: [
13284
13306
  "# Orchestrator Agent",
@@ -13659,7 +13681,6 @@ var issueWorkerSubAgent = {
13659
13681
  description: "Selects the next ready issue from the queue, claims it, and implements the change end-to-end following repository conventions",
13660
13682
  model: AGENT_MODEL.POWERFUL,
13661
13683
  maxTurns: 100,
13662
- canDelegateToAgents: [],
13663
13684
  platforms: { cursor: { exclude: true } },
13664
13685
  prompt: [
13665
13686
  "# Issue Worker",
@@ -14088,7 +14109,13 @@ var ORCHESTRATOR_CONVENTIONS_PREAMBLE = [
14088
14109
  "- The queue scan reads only `priority:*` and `status:*` labels \u2014 type-routing (which typed agent handles a given `type:*` label) is the `issue-worker`'s concern, not the orchestrator's. The orchestrator's funnel-tier sort is a tie-breaker on `priority:*`, not a routing decision.",
14089
14110
  "- Priority order: critical > high > medium > low > trivial, then **funnel tier asc** (lower tier wins ties), then FIFO by issue number",
14090
14111
  "- Stale thresholds: 72h for in-progress, 168h for blocked",
14091
- "- Flagged issues get `status:needs-attention` \u2014 they are not auto-reset"
14112
+ "- Flagged issues get `status:needs-attention` \u2014 they are not auto-reset",
14113
+ "",
14114
+ "## Depth-0 invocation requirement",
14115
+ "",
14116
+ 'The orchestrator agent **must run as the top-level (depth-0) session** when its Phase G needs to delegate work to the `issue-worker` sub-agent. The Claude Code harness forbids nested sub-agent spawning \u2014 *"Subagents cannot spawn other subagents. If your workflow requires nested delegation, use Skills or chain subagents from the main conversation."* (see <https://code.claude.com/docs/en/sub-agents>). If the orchestrator itself were spawned as a depth-1 sub-agent (e.g. via `Agent(subagent_type: "orchestrator")` from another session), the `Agent` tool needed to reach the `issue-worker` at depth-2 would not be available and Phase G would silently abort.',
14117
+ "",
14118
+ 'Practical implication for scheduled-task wiring: the `worker-orchestrator` scheduled task\'s `SKILL.md` instructs the **scheduled-task session itself** to read `.claude/agents/orchestrator.md` and execute its phase pipeline in-session, then use the `Agent` tool to delegate the picked work item to `issue-worker` (depth-1). The scheduled task does **not** call `Agent(subagent_type: "orchestrator")` \u2014 that would put the orchestrator at depth-1 and break the chain.'
14092
14119
  ].join("\n");
14093
14120
  function buildOrchestratorConventionsContent(tiers, scopeGate = resolveScopeGate(), runRatio = resolveRunRatio(), preflight = resolvePreflightPr(), scheduledTasks = resolveScheduledTasks(), unblockDependents = resolveUnblockDependents()) {
14094
14121
  return [
@@ -27260,12 +27287,6 @@ var ClaudeRenderer = class _ClaudeRenderer {
27260
27287
  if (agent.platforms?.claude?.memory) {
27261
27288
  lines.push(`memory: ${agent.platforms.claude.memory}`);
27262
27289
  }
27263
- if (agent.canDelegateToAgents && agent.canDelegateToAgents.length > 0) {
27264
- lines.push(`canDelegateToAgents:`);
27265
- for (const delegateName of agent.canDelegateToAgents) {
27266
- lines.push(` - "${delegateName}"`);
27267
- }
27268
- }
27269
27290
  lines.push("---");
27270
27291
  lines.push("");
27271
27292
  lines.push(...agent.prompt.split("\n"));
@@ -29923,7 +29944,7 @@ function toPosix3(p) {
29923
29944
  // src/docs-sync/scan/run-scan.ts
29924
29945
  import * as fs3 from "fs";
29925
29946
  import * as path6 from "path";
29926
- var DEFAULT_AUDIT_REPORT_DIR = ".claude/state/docs-sync";
29947
+ var DEFAULT_AUDIT_REPORT_DIR = ".state/docs-sync";
29927
29948
  var SEVERITY_RANK = {
29928
29949
  blocking: 0,
29929
29950
  advisory: 1,