harnessed 3.4.4 → 3.5.0
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/dist/cli.mjs +38 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/workflows/capabilities.yaml +17 -18
- package/workflows/disciplines/karpathy.yaml +1 -1
- package/workflows/disciplines/language.yaml +1 -1
- package/workflows/disciplines/operational.yaml +2 -2
- package/workflows/disciplines/output-style.yaml +1 -1
- package/workflows/disciplines/priority.yaml +1 -1
- package/workflows/disciplines/protocols.yaml +1 -1
- package/workflows/discuss/auto/SKILL.md +1 -2
- package/workflows/discuss/auto/workflow.yaml +1 -2
- package/workflows/discuss/phase/SKILL.md +0 -1
- package/workflows/discuss/phase/workflow.yaml +1 -1
- package/workflows/discuss/strategic/SKILL.md +1 -2
- package/workflows/discuss/strategic/workflow.yaml +2 -3
- package/workflows/discuss/subtask/SKILL.md +0 -1
- package/workflows/discuss/subtask/workflow.yaml +1 -1
- package/workflows/judgments/fallback.yaml +1 -1
- package/workflows/judgments/parallelism-gate.yaml +4 -3
- package/workflows/judgments/phase-gate.yaml +2 -2
- package/workflows/judgments/strategic-gate.yaml +2 -2
- package/workflows/judgments/subtask-gate.yaml +2 -2
- package/workflows/judgments/tdd-gate.yaml +2 -2
- package/workflows/judgments/web-design-routing.yaml +1 -1
- package/workflows/judgments/web-search-routing.yaml +1 -1
- package/workflows/judgments/web-testing-routing.yaml +1 -1
- package/workflows/plan/architecture/SKILL.md +2 -3
- package/workflows/plan/architecture/workflow.yaml +2 -2
- package/workflows/plan/auto/SKILL.md +1 -2
- package/workflows/plan/auto/workflow.yaml +1 -2
- package/workflows/plan/phase/SKILL.md +3 -4
- package/workflows/plan/phase/workflow.yaml +3 -3
- package/workflows/plan-feature/SKILL.md +4 -4
- package/workflows/research/SKILL.md +5 -5
- package/workflows/research/workflow.yaml +4 -4
- package/workflows/retro/SKILL.md +2 -3
- package/workflows/retro/workflow.yaml +1 -2
- package/workflows/role-prompts.yaml +4 -3
- package/workflows/task/auto/SKILL.md +2 -3
- package/workflows/task/auto/workflow.yaml +2 -3
- package/workflows/task/clarify/SKILL.md +0 -1
- package/workflows/task/code/SKILL.md +3 -4
- package/workflows/task/code/workflow.yaml +0 -1
- package/workflows/task/deliver/SKILL.md +3 -6
- package/workflows/task/deliver/workflow.yaml +7 -6
- package/workflows/task/test/SKILL.md +0 -1
- package/workflows/task/test/workflow.yaml +1 -2
- package/workflows/verify/auto/SKILL.md +5 -6
- package/workflows/verify/auto/workflow.yaml +4 -5
- package/workflows/verify/code-review/SKILL.md +3 -5
- package/workflows/verify/code-review/workflow.yaml +1 -3
- package/workflows/verify/design/SKILL.md +3 -5
- package/workflows/verify/design/workflow.yaml +4 -5
- package/workflows/verify/multispec/SKILL.md +6 -8
- package/workflows/verify/multispec/workflow.yaml +5 -8
- package/workflows/verify/paranoid/SKILL.md +2 -3
- package/workflows/verify/paranoid/workflow.yaml +1 -2
- package/workflows/verify/progress/SKILL.md +2 -3
- package/workflows/verify/progress/workflow.yaml +0 -1
- package/workflows/verify/qa/SKILL.md +4 -5
- package/workflows/verify/qa/workflow.yaml +1 -2
- package/workflows/verify/security/SKILL.md +1 -2
- package/workflows/verify/security/workflow.yaml +1 -2
- package/workflows/verify/simplify/SKILL.md +2 -3
- package/workflows/verify/simplify/workflow.yaml +1 -2
- package/workflows/verify-work/SKILL.md +5 -7
- package/workflows/verify-work/workflow.yaml +5 -7
package/dist/cli.mjs
CHANGED
|
@@ -853,7 +853,7 @@ var init_resume = __esm({
|
|
|
853
853
|
|
|
854
854
|
// package.json
|
|
855
855
|
var package_default = {
|
|
856
|
-
version: "3.
|
|
856
|
+
version: "3.5.0"};
|
|
857
857
|
|
|
858
858
|
// src/manifest/errors.ts
|
|
859
859
|
function instancePathToKeyPath(instancePath) {
|
|
@@ -2648,7 +2648,14 @@ var COMPLETION_SCHEMA = {
|
|
|
2648
2648
|
status: { type: "string", enum: ["COMPLETE", "PARTIAL", "BLOCKED"] },
|
|
2649
2649
|
phase: { type: "string", enum: ["01-clarify", "02-code", "03-test", "04-deliver"] },
|
|
2650
2650
|
summary: { type: "string" },
|
|
2651
|
-
blockers: { type: "array", items: { type: "string" } }
|
|
2651
|
+
blockers: { type: "array", items: { type: "string" } },
|
|
2652
|
+
// v3.5.0 Phase 2 — Option 1-Lite signal-driven Agent Teams escalation.
|
|
2653
|
+
// spawned subagent SHOULD set this when any of parallelism-gate.yaml 5
|
|
2654
|
+
// upgrade triggers fire. harnessed runtime propagates to stderr hint;
|
|
2655
|
+
// user opens team in main Claude Code session (TeamCreate not exposed to
|
|
2656
|
+
// spawned subagents via SDK v0.3.142 — see PHASE-2-SPEC.md § Why).
|
|
2657
|
+
needs_teams_escalation: { type: "boolean" },
|
|
2658
|
+
escalation_reason: { type: "string" }
|
|
2652
2659
|
},
|
|
2653
2660
|
required: ["status", "phase"]
|
|
2654
2661
|
};
|
|
@@ -3171,12 +3178,28 @@ async function runMasterOrchestrator(masterName, context, packageRoot, spawnDriv
|
|
|
3171
3178
|
var MASTER_NAMES = ["discuss", "plan", "task", "verify", "auto"];
|
|
3172
3179
|
var RALPH_DEFAULT_MAX_ITER = 20;
|
|
3173
3180
|
var RALPH_HARD_UPPER_LIMIT = 100;
|
|
3181
|
+
var ESCALATION_RULES = `If during this task you detect ANY of the following 5 conditions, set \`needs_teams_escalation: true\` in your structured output and fill \`escalation_reason\` with the trigger name + one-sentence specifics. These are signals to the human user in the main Claude Code session \u2014 do NOT attempt to call TeamCreate/SendMessage/TeamDelete yourself (those tools are not available to you).
|
|
3182
|
+
|
|
3183
|
+
Five triggers (any one suffices):
|
|
3184
|
+
|
|
3185
|
+
1. **teammate_send_message_needed** \u2014 the task requires two or more subagents to exchange messages mid-task (e.g., reconciling API contract proposals across frontend and backend), not just fan-out + report.
|
|
3186
|
+
|
|
3187
|
+
2. **subagent_context_overflow** \u2014 your context budget is filling and a separate subagent is needed to take over a portion of the work.
|
|
3188
|
+
|
|
3189
|
+
3. **shared_task_list** \u2014 multiple subagents need to coordinate self-assignment from a shared task list (not pre-partitioned work).
|
|
3190
|
+
|
|
3191
|
+
4. **opposing_hypothesis_debate** \u2014 the task requires two subagents to defend opposing hypotheses to a lead arbiter (e.g., root-cause debugging where two competing theories need separate evidence-gathering).
|
|
3192
|
+
|
|
3193
|
+
5. **fullstack_three_way** \u2014 the task is a synchronized fullstack push (frontend + backend + tests) requiring API contract alignment across three roles simultaneously.
|
|
3194
|
+
|
|
3195
|
+
If none of the five apply, omit \`needs_teams_escalation\` (defaults to false) and proceed normally.`;
|
|
3174
3196
|
function buildAgentDef(skillName, rolePrompts, workflowName, modelTierOverride) {
|
|
3175
3197
|
const rp = rolePrompts?.[skillName] ?? (workflowName ? rolePrompts?.[workflowName] : void 0);
|
|
3176
3198
|
if (!rp) {
|
|
3177
3199
|
return {
|
|
3178
3200
|
description: `harnessed workflow phase: ${skillName}`,
|
|
3179
3201
|
prompt: `You are executing the '${skillName}' workflow phase. Follow the phase intent and emit a structured COMPLETE signal when done.`,
|
|
3202
|
+
criticalSystemReminder_EXPERIMENTAL: ESCALATION_RULES,
|
|
3180
3203
|
...modelTierOverride ? { model: modelTierOverride } : {}
|
|
3181
3204
|
};
|
|
3182
3205
|
}
|
|
@@ -3197,6 +3220,7 @@ ${rp.checklist.map((c, i) => ` ${i + 1}. ${c}`).join("\n")}` : "";
|
|
|
3197
3220
|
return {
|
|
3198
3221
|
description: rp.description,
|
|
3199
3222
|
prompt,
|
|
3223
|
+
criticalSystemReminder_EXPERIMENTAL: ESCALATION_RULES,
|
|
3200
3224
|
...modelTierOverride ? { model: modelTierOverride } : {}
|
|
3201
3225
|
};
|
|
3202
3226
|
}
|
|
@@ -3261,10 +3285,15 @@ var _dispatchSkillStub = {
|
|
|
3261
3285
|
}
|
|
3262
3286
|
const env = JSON.parse(envelopeJson);
|
|
3263
3287
|
const status = env.structured_output?.status === "COMPLETE" || env.subtype === "success" ? "ok" : "fail";
|
|
3288
|
+
const escalation = env.structured_output?.needs_teams_escalation === true;
|
|
3264
3289
|
return {
|
|
3265
3290
|
status,
|
|
3266
3291
|
output: env.text ?? env.result ?? "",
|
|
3267
|
-
...env.structured_output?.status ? { decision: env.structured_output.status } : {}
|
|
3292
|
+
...env.structured_output?.status ? { decision: env.structured_output.status } : {},
|
|
3293
|
+
...escalation ? {
|
|
3294
|
+
needsTeamsEscalation: true,
|
|
3295
|
+
...env.structured_output?.escalation_reason ? { escalationReason: env.structured_output.escalation_reason } : {}
|
|
3296
|
+
} : {}
|
|
3268
3297
|
};
|
|
3269
3298
|
}
|
|
3270
3299
|
};
|
|
@@ -3353,6 +3382,12 @@ async function runWorkflow(yamlPath, vars, opts = {}) {
|
|
|
3353
3382
|
if (r.status !== "ok") {
|
|
3354
3383
|
return { status: "failed", phasesRun: i, lastPhaseId: ph.id };
|
|
3355
3384
|
}
|
|
3385
|
+
if (r.needsTeamsEscalation === true) {
|
|
3386
|
+
const reason = r.escalationReason ?? "unspecified trigger";
|
|
3387
|
+
console.error(
|
|
3388
|
+
`\u26A0\uFE0F phase ${ph.id} suggests Agent Teams escalation \u2014 ${reason}. Consider opening a team in your main Claude Code session (TeamCreate) if continuing this work benefits from teammate coordination. See workflows/judgments/parallelism-gate.yaml for the 5 upgrade triggers.`
|
|
3389
|
+
);
|
|
3390
|
+
}
|
|
3356
3391
|
if (r.target === "chat") {
|
|
3357
3392
|
try {
|
|
3358
3393
|
await runAfterOutputHook({
|