frizz 0.7.8 → 0.8.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/README.md +5 -0
- package/dist/claude-agent-broker.js +7 -4
- package/dist/dev-child.js +225 -214
- package/dist/frizz.js +92 -7
- package/package.json +1 -1
- package/runtime/cc-worker/.claude-plugin/plugin.json +1 -1
- package/runtime/cc-worker/DECISIONS.md +29 -1
- package/runtime/cc-worker/agents/high.md +7 -0
- package/runtime/cc-worker/agents/low.md +7 -0
- package/runtime/cc-worker/agents/max.md +7 -0
- package/runtime/cc-worker/agents/medium.md +7 -0
- package/runtime/cc-worker/agents/xhigh.md +7 -0
- package/runtime/cc-worker/hooks/agent-dispatch.mjs +7 -6
- package/runtime/cc-worker/hooks/hooks.json +0 -2
- package/runtime/cc-worker/hooks/scratchpad.mjs +5 -3
- package/runtime/cc-worker/hooks/session-seed.mjs +17 -17
- package/runtime/cc-worker/skills/gh/SKILL.md +5 -19
- package/web-dist/assets/{TerminalPane-ubcEP7X3.js → TerminalPane-BIBHC61j.js} +1 -1
- package/web-dist/assets/{abnfDiagram-VRR7QNED-0brfnieb.js → abnfDiagram-VRR7QNED-CcFQGFPf.js} +1 -1
- package/web-dist/assets/architecture-TIHT7OUA-BZEZt7jZ.js +1 -0
- package/web-dist/assets/{architectureDiagram-ZJ3FMSHR-Dji-XBdF.js → architectureDiagram-ZJ3FMSHR-DErIQOIs.js} +1 -1
- package/web-dist/assets/{blockDiagram-677ZJIJ3-BQMyz3Q9.js → blockDiagram-677ZJIJ3-CpsUqur1.js} +1 -1
- package/web-dist/assets/{c4Diagram-LMCZKHZV-BMNws0Oi.js → c4Diagram-LMCZKHZV-D2dHmCEJ.js} +1 -1
- package/web-dist/assets/channel-DdFRPviT.js +1 -0
- package/web-dist/assets/{chunk-32BRIVSS-CVv1ae7n.js → chunk-32BRIVSS-aOCEfxRW.js} +1 -1
- package/web-dist/assets/{chunk-52WLFC77-BYhPlKCT.js → chunk-52WLFC77-2iw4nJPC.js} +1 -1
- package/web-dist/assets/{chunk-C7G6YPKG-Cn4HhNwb.js → chunk-C7G6YPKG-BPD3iHVE.js} +1 -1
- package/web-dist/assets/{chunk-EX3LRPZG-P3ZYFC1W.js → chunk-EX3LRPZG-DrefHift.js} +1 -1
- package/web-dist/assets/{chunk-FWX5IMBZ-Ba3NpEQa.js → chunk-FWX5IMBZ-By940EHT.js} +2 -2
- package/web-dist/assets/{chunk-HOUHSVGY-BCWyMhwJ.js → chunk-HOUHSVGY-B1Cqvz7e.js} +1 -1
- package/web-dist/assets/{chunk-ICXQ74PX-DWAAqHL7.js → chunk-ICXQ74PX-1LkVpWuI.js} +1 -1
- package/web-dist/assets/{chunk-MOJQB5TN-pc5VJ4Nq.js → chunk-MOJQB5TN-Ip1cy64r.js} +1 -1
- package/web-dist/assets/{chunk-OGEWGWER-DUxmbiuX.js → chunk-OGEWGWER-CNjVyu8F.js} +1 -1
- package/web-dist/assets/{chunk-PUDLZKDR-DRdZWzxX.js → chunk-PUDLZKDR-9HZR6DAU.js} +1 -1
- package/web-dist/assets/{chunk-Q4XR5HBZ-Bafzu7s-.js → chunk-Q4XR5HBZ-vtWwOCuQ.js} +1 -1
- package/web-dist/assets/{chunk-V7JOEXUC-Bj0A8ftW.js → chunk-V7JOEXUC-DC6YaHG0.js} +1 -1
- package/web-dist/assets/{chunk-VAUOI2AC-DBgVQKIO.js → chunk-VAUOI2AC-CP-xe7SD.js} +1 -1
- package/web-dist/assets/{chunk-VR4S4FIN-DU-1KtuM.js → chunk-VR4S4FIN-wbxDFptH.js} +1 -1
- package/web-dist/assets/{chunk-WYO6CB5R-DzVb3-Rj.js → chunk-WYO6CB5R-dibXmwpK.js} +1 -1
- package/web-dist/assets/{chunk-ZGVPDNZ5-BPKQvduj.js → chunk-ZGVPDNZ5-_y_itJHG.js} +1 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-Bf3duLb8.js +1 -0
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-Bf3duLb8.js +1 -0
- package/web-dist/assets/{cynefin-VYW2F7L2-lo8PqVCk.js → cynefin-VYW2F7L2-D1RYokZP.js} +1 -1
- package/web-dist/assets/{cynefinDiagram-TSTJHNR4-BtQLaDV0.js → cynefinDiagram-TSTJHNR4-qofqoy3T.js} +1 -1
- package/web-dist/assets/{dagre-VKFMJZFB-BJ2-f-A0.js → dagre-VKFMJZFB-CgHLoGFk.js} +1 -1
- package/web-dist/assets/{diagram-FQU43EPY-CLM-8r74.js → diagram-FQU43EPY-JEAs4LOb.js} +1 -1
- package/web-dist/assets/{diagram-G47NLZAW-CfuoJGpN.js → diagram-G47NLZAW--tLd4Lf7.js} +1 -1
- package/web-dist/assets/{diagram-NH7WQ7WH-DfxxRwH8.js → diagram-NH7WQ7WH-DPbw9CJU.js} +1 -1
- package/web-dist/assets/{diagram-OA4YK3LP-D7knxZee.js → diagram-OA4YK3LP-CDrb7nWs.js} +1 -1
- package/web-dist/assets/{diagram-WEI45ONY-C2WfMXWl.js → diagram-WEI45ONY-DJswZe3f.js} +1 -1
- package/web-dist/assets/{ebnfDiagram-CCIWWBDH-DRSZ24tF.js → ebnfDiagram-CCIWWBDH-BP8-PZMF.js} +1 -1
- package/web-dist/assets/{erDiagram-Q63AITRT-DXe0OrbY.js → erDiagram-Q63AITRT-BQXuebf5.js} +1 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-DOLxRQQ5.js +1 -0
- package/web-dist/assets/flowDiagram-23GEKE2U-DoK1yb0H.js +1 -0
- package/web-dist/assets/{ganttDiagram-NO4QXBWP-wGqOgjvs.js → ganttDiagram-NO4QXBWP-DotMb935.js} +1 -1
- package/web-dist/assets/{gitGraph-TEB2WS4Q-BygokG6y.js → gitGraph-TEB2WS4Q-B1vbYyKQ.js} +1 -1
- package/web-dist/assets/{gitGraphDiagram-IHSO6WYX-CV1933_M.js → gitGraphDiagram-IHSO6WYX-BjDXKk4m.js} +1 -1
- package/web-dist/assets/{index-DB1d3eMJ.js → index-Cs0TDGMu.js} +124 -124
- package/web-dist/assets/{info-DKCQHKI2-DLavbzui.js → info-DKCQHKI2-xLTLqQju.js} +1 -1
- package/web-dist/assets/{infoDiagram-FWYZ7A6U-Biouxd9G.js → infoDiagram-FWYZ7A6U-BFfYUsrC.js} +1 -1
- package/web-dist/assets/{ishikawaDiagram-FXEZZL3T-DJxwwS3R.js → ishikawaDiagram-FXEZZL3T-45a7VMwm.js} +1 -1
- package/web-dist/assets/{journeyDiagram-5HDEW3XC-Clx_WkdW.js → journeyDiagram-5HDEW3XC-CEBUpu59.js} +1 -1
- package/web-dist/assets/{kanban-definition-HUTT4EX6-Bf7bX_96.js → kanban-definition-HUTT4EX6-RwKtDFzG.js} +1 -1
- package/web-dist/assets/{line-CV2v49IN.js → line-DStcMIry.js} +1 -1
- package/web-dist/assets/{mermaid-parser.core-BPsFhEi6.js → mermaid-parser.core-B0ekgQMA.js} +3 -3
- package/web-dist/assets/{mermaid.core-0EWDNL_R.js → mermaid.core-w1hcQaPy.js} +3 -3
- package/web-dist/assets/{mindmap-definition-LN4V7U3C-C1y4yy3Z.js → mindmap-definition-LN4V7U3C-D_n38Imb.js} +1 -1
- package/web-dist/assets/{packet-7NZHBO7P-CpcpxruB.js → packet-7NZHBO7P-CstGeBOX.js} +1 -1
- package/web-dist/assets/{pegDiagram-2B236MQR-CVlVP4cH.js → pegDiagram-2B236MQR-DvowVyTO.js} +1 -1
- package/web-dist/assets/{pie-RZYD4A2V-BcVPOhTZ.js → pie-RZYD4A2V-BOP2j_HH.js} +1 -1
- package/web-dist/assets/{pieDiagram-ENE6RG2P-DZv4Tfae.js → pieDiagram-ENE6RG2P-CKRqu_2f.js} +1 -1
- package/web-dist/assets/{quadrantDiagram-ABIIQ3AL-DOzS_U_a.js → quadrantDiagram-ABIIQ3AL-zSArSS8R.js} +1 -1
- package/web-dist/assets/{radar-I7S5WNFK-8YADxkdT.js → radar-I7S5WNFK-BqRdNIBw.js} +1 -1
- package/web-dist/assets/{railroad-3IZDKUUU-DzndPrRy.js → railroad-3IZDKUUU-BaKcl_LU.js} +1 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-itqDLg1p.js +1 -0
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-ze7rLVCi.js +1 -0
- package/web-dist/assets/railroad-peg-LSFZ7HO6-DKsYkEuG.js +1 -0
- package/web-dist/assets/{railroadDiagram-RFXS5EU6-CPJAH-r7.js → railroadDiagram-RFXS5EU6-BrXTQge9.js} +1 -1
- package/web-dist/assets/{requirementDiagram-TGXJPOKE-BVFJZfwl.js → requirementDiagram-TGXJPOKE-DBBNi_SS.js} +1 -1
- package/web-dist/assets/{sankeyDiagram-HTMAVEWB-CUhvFPmE.js → sankeyDiagram-HTMAVEWB-BwFi7xFy.js} +1 -1
- package/web-dist/assets/{sequenceDiagram-DBY2YBRQ-Cy9CGhNq.js → sequenceDiagram-DBY2YBRQ-CeivqMeT.js} +1 -1
- package/web-dist/assets/{stateDiagram-2N3HPSRC-CqOnmPLp.js → stateDiagram-2N3HPSRC-C6NZsnFm.js} +1 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-B3YRnI4W.js +1 -0
- package/web-dist/assets/{swimlanes-5IMT3BWC-c_zBqkb9.js → swimlanes-5IMT3BWC-C0MubXTG.js} +1 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-CXva4Ic9.js +8 -0
- package/web-dist/assets/{timeline-definition-FHXFAJF6-y_QM62SK.js → timeline-definition-FHXFAJF6-CtxwSvFu.js} +1 -1
- package/web-dist/assets/{treeView-QDETBFTQ-T3y_1KXV.js → treeView-QDETBFTQ-CXcwSjey.js} +1 -1
- package/web-dist/assets/{treemap-6X3UGDF4-CzvqucqY.js → treemap-6X3UGDF4-Uspgr-d1.js} +1 -1
- package/web-dist/assets/{vennDiagram-L72KCM5P-6-HNOpN0.js → vennDiagram-L72KCM5P-tZamQQAQ.js} +1 -1
- package/web-dist/assets/{wardley-OPB4EBWU-BrsaqsLL.js → wardley-OPB4EBWU-0_79c19P.js} +1 -1
- package/web-dist/assets/{wardleyDiagram-EHGQE667-Cr_rCzwd.js → wardleyDiagram-EHGQE667-uYmUsP66.js} +1 -1
- package/web-dist/assets/{xychartDiagram-FW5EYKEG-BnX6ccx4.js → xychartDiagram-FW5EYKEG-BsOU7Wf7.js} +1 -1
- package/web-dist/index.html +1 -1
- package/runtime/cc-worker/agents/fable-high.md +0 -8
- package/runtime/cc-worker/agents/fable-low.md +0 -8
- package/runtime/cc-worker/agents/fable-max.md +0 -8
- package/runtime/cc-worker/agents/fable-medium.md +0 -8
- package/runtime/cc-worker/agents/fable-xhigh.md +0 -8
- package/runtime/cc-worker/agents/haiku.md +0 -7
- package/runtime/cc-worker/agents/opus-high.md +0 -8
- package/runtime/cc-worker/agents/opus-low.md +0 -8
- package/runtime/cc-worker/agents/opus-max.md +0 -8
- package/runtime/cc-worker/agents/opus-medium.md +0 -8
- package/runtime/cc-worker/agents/opus-xhigh.md +0 -8
- package/runtime/cc-worker/agents/sonnet-high.md +0 -8
- package/runtime/cc-worker/agents/sonnet-low.md +0 -8
- package/runtime/cc-worker/agents/sonnet-max.md +0 -8
- package/runtime/cc-worker/agents/sonnet-medium.md +0 -8
- package/runtime/cc-worker/agents/sonnet-xhigh.md +0 -8
- package/runtime/cc-worker/bin/browser-mcp-tools.json +0 -1192
- package/runtime/cc-worker/bin/browser-mcp.mjs +0 -730
- package/runtime/cc-worker/hooks/precompact-instructions.mjs +0 -133
- package/runtime/cc-worker/skills/waits/SKILL.md +0 -84
- package/web-dist/assets/architecture-TIHT7OUA-DksosNDW.js +0 -1
- package/web-dist/assets/channel-DqoPvfQz.js +0 -1
- package/web-dist/assets/classDiagram-OUVF2IWQ-DwUs74RB.js +0 -1
- package/web-dist/assets/classDiagram-v2-EOCWNBFH-DwUs74RB.js +0 -1
- package/web-dist/assets/eventmodeling-45OFAUF4-CUIjQ7kE.js +0 -1
- package/web-dist/assets/flowDiagram-23GEKE2U-Dka-3F3n.js +0 -1
- package/web-dist/assets/railroad-abnf-AHOZXSZD-CCnWa6K9.js +0 -1
- package/web-dist/assets/railroad-ebnf-EBAXGLYW-jtVdzv7e.js +0 -1
- package/web-dist/assets/railroad-peg-LSFZ7HO6-B8D6TyEe.js +0 -1
- package/web-dist/assets/stateDiagram-v2-6OUMAXLB-DWKW-4qu.js +0 -1
- package/web-dist/assets/swimlanesDiagram-G3AALYLV-DZKoB7ae.js +0 -8
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-check
|
|
3
|
-
// PreCompact hook (frizz-worker) — steers WHAT SURVIVES a compaction. Run directly with node (zero
|
|
4
|
-
// deps, max Node compat), mirroring cc's hook idiom.
|
|
5
|
-
//
|
|
6
|
-
// WHY THIS EXISTS: compaction is the single largest source of context loss in a long worker session.
|
|
7
|
-
// A ~967k-token session collapses to a ~10-15k summary, and what gets dropped first is the HIGH-LEVEL
|
|
8
|
-
// approach — the plan, the alternatives rejected, the reasoning — leaving a worker that remembers
|
|
9
|
-
// mechanics but has lost the thread. `session-seed.mjs` already re-grounds AFTER the fact on
|
|
10
|
-
// SessionStart(compact); this hook is the other half, steering the summary itself BEFORE it is written.
|
|
11
|
-
//
|
|
12
|
-
// THE CHANNEL — and it is unusual, so do not "fix" it to JSON: unlike every other hook in this
|
|
13
|
-
// plugin, a PreCompact hook's PLAIN STDOUT becomes the compaction instructions. Claude Code collects
|
|
14
|
-
// the trimmed stdout of every succeeding, non-blocking PreCompact hook, joins them with a blank line,
|
|
15
|
-
// and splices the result into the summarization prompt as a literal `Additional Instructions:`
|
|
16
|
-
// section (verified live: cli 2.1.220, `FTe`/`Ysd`). Emitting `hookSpecificOutput` JSON here would
|
|
17
|
-
// send the summarizer a blob of JSON as its instructions. The matcher is the TRIGGER string
|
|
18
|
-
// (`auto` / `manual`), which is why hooks.json registers this twice.
|
|
19
|
-
//
|
|
20
|
-
// LENGTH IS ONLY STEERABLE BY AN EXPLICIT NUMBER — measured, so do not soften WORD_TARGET into prose.
|
|
21
|
-
// Single-variable differential, three `--fork-session` branches off one identical 345,898-token seed:
|
|
22
|
-
//
|
|
23
|
-
// no hook (control) postTokens 4,060
|
|
24
|
-
// qualitative "prefer a long summary" postTokens 4,429 (+9% — noise)
|
|
25
|
-
// explicit ">= 15,000 words" postTokens 20,339 (5.0x the control)
|
|
26
|
-
// explicit ">= 35,000 words" postTokens 5,182 (WORSE, and slower + dearer)
|
|
27
|
-
//
|
|
28
|
-
// The response is NON-MONOTONIC, so do not move WORD_TARGET far in either direction without
|
|
29
|
-
// re-measuring. 35,000 words is past what the model will produce in one response and asking for it
|
|
30
|
-
// degraded compliance badly — a quarter the output of the 15,000 ask (2,174 words vs 9,829), at
|
|
31
|
-
// 11.2 min / $3.73 vs 8.6 min / $2.04. Three single samples; treat the exact figures as indicative.
|
|
32
|
-
//
|
|
33
|
-
// WHY IT IS NO LONGER 15,000 (2026-08-06, maintainer: "let's tone this down a bit"). That row is the
|
|
34
|
-
// one that reads as a win in isolation and is the expensive one in production: a 20,339-token summary
|
|
35
|
-
// is where the next context STARTS, so every compaction handed the thread ~16k tokens of overhead over
|
|
36
|
-
// the control before it did any work. On a long-lived thread that compounds — each cycle begins nearer
|
|
37
|
-
// the ceiling, so the next compaction arrives sooner, and the window between them shrinks. Observed on
|
|
38
|
-
// the maintainer's own 10-day `are-taking-over-an-in-flight-epic` thread: 31 compactions, then a
|
|
39
|
-
// cold resume whose replay overflowed the window outright ("Prompt is too long"), leaving a thread that
|
|
40
|
-
// could not complete the one turn that would have compacted it. The latency was the visible cost; the
|
|
41
|
-
// post-compaction FOOTPRINT was the one that actually mattered.
|
|
42
|
-
//
|
|
43
|
-
// 5,000 is UNMEASURED — an explicit number (adjectives measurably do nothing) at a third of the ask,
|
|
44
|
-
// chosen to keep the mechanism that works while cutting what it leaves behind. There is no data point
|
|
45
|
-
// between the qualitative row and 15,000; if this matters, re-run the differential above and add rows.
|
|
46
|
-
//
|
|
47
|
-
// The remaining COST is latency. That is acceptable because frizz workers run with
|
|
48
|
-
// `precomputeCompactionEnabled`, which arms summary generation in a background sidecar at ~80% of the
|
|
49
|
-
// window and swaps it in at the real threshold — so on an `auto` trigger the wait is largely hidden. A
|
|
50
|
-
// `manual` /compact pays it in front of the human.
|
|
51
|
-
//
|
|
52
|
-
// HARD CEILING: the summary is ONE model response, so it is bounded by max output tokens (64k for
|
|
53
|
-
// Opus 5 / Sonnet 5, ~48k words). A 200k-token summary is unreachable at any prompt.
|
|
54
|
-
//
|
|
55
|
-
// TONE MATTERS: an instruction that reads like injected prompt-hijacking gets REFUSED by the
|
|
56
|
-
// summarizer — measured: an early probe demanding a sentinel token produced a summary that explicitly
|
|
57
|
-
// declined to comply and called the instructions fake. Keep this legible as an ordinary editorial
|
|
58
|
-
// brief about what to retain.
|
|
59
|
-
//
|
|
60
|
-
// GATE: everything is gated on FRIZZ_THREAD, so the plugin stays inert when loaded outside a
|
|
61
|
-
// frizz worker. Sub-agent contexts are skipped, matching session-seed.mjs — the scratch-directory path
|
|
62
|
-
// below is only guaranteed correct for the top-level worker session.
|
|
63
|
-
import { readFileSync } from 'node:fs';
|
|
64
|
-
import { currentSessionId } from '../scripts/frizz/config.mjs';
|
|
65
|
-
|
|
66
|
-
// See "LENGTH IS ONLY STEERABLE BY AN EXPLICIT NUMBER" and "WHY IT IS NO LONGER 15,000" above before
|
|
67
|
-
// changing this. The number is load-bearing; the prose around it is not.
|
|
68
|
-
const WORD_TARGET = 5000;
|
|
69
|
-
|
|
70
|
-
/** @type {{ agent_id?: unknown, agentId?: unknown, trigger?: string, session_id?: string }} */
|
|
71
|
-
let input = {};
|
|
72
|
-
try {
|
|
73
|
-
input = JSON.parse(readFileSync(0, 'utf8'));
|
|
74
|
-
} catch {
|
|
75
|
-
/* no stdin / not JSON → input stays {} → proceed with the generic brief */
|
|
76
|
-
}
|
|
77
|
-
// Skip inside sub-agent contexts (they carry agent_id) — see GATE above.
|
|
78
|
-
if (input.agent_id ?? input.agentId) process.exit(0);
|
|
79
|
-
|
|
80
|
-
// WORKER GATE — inert unless this is a frizz worker session.
|
|
81
|
-
const thread = (process.env.FRIZZ_THREAD ?? '').trim();
|
|
82
|
-
if (!thread) process.exit(0);
|
|
83
|
-
|
|
84
|
-
let sid = null;
|
|
85
|
-
try {
|
|
86
|
-
sid = currentSessionId(input.session_id);
|
|
87
|
-
} catch {
|
|
88
|
-
/* best-effort — fall back to the generic path shape below */
|
|
89
|
-
}
|
|
90
|
-
const scratch = sid
|
|
91
|
-
? '.frizz/threads/' + sid + '/'
|
|
92
|
-
: '.frizz/threads/<session-id>/';
|
|
93
|
-
|
|
94
|
-
// Written as an editorial brief, not as a command block — see TONE MATTERS above.
|
|
95
|
-
const brief = [
|
|
96
|
-
'This is a frizz worker session driving one engineering effort (`' + thread + '`). Three things to ' +
|
|
97
|
-
'get right, because they are what actually gets lost in compaction:',
|
|
98
|
-
'',
|
|
99
|
-
'1. LENGTH. Target about ' + WORD_TARGET.toLocaleString('en-US') + ' words — long enough that ' +
|
|
100
|
-
'nothing load-bearing has to be dropped, but this is a working handover and not an archive. ' +
|
|
101
|
-
'Spend the length on what the next turn cannot recover for itself.',
|
|
102
|
-
'',
|
|
103
|
-
'2. THE HIGH-LEVEL APPROACH, AT HIGH FIDELITY. Preserve the shape of the work, not just its ' +
|
|
104
|
-
'mechanics: what problem is being solved, the approach chosen, the approaches considered and ' +
|
|
105
|
-
'REJECTED and why, and the reasoning that led there. This is the part worth its space — a summary ' +
|
|
106
|
-
'that lists edits but loses the plan leaves the next turn unable to judge whether a step is still ' +
|
|
107
|
-
'the right one. Quote code and output where the exact text matters; summarize where it does not.',
|
|
108
|
-
'',
|
|
109
|
-
'Carry forward:',
|
|
110
|
-
'- The task list and its state — every item, marked done / in progress / not started / blocked.',
|
|
111
|
-
'- Decisions made and the rationale for each, especially any the human made, approved, or reversed.',
|
|
112
|
-
'- Constraints, conventions, and explicit human instructions or corrections — in the human\'s own ' +
|
|
113
|
-
'wording where you can, since paraphrase is where intent gets lost.',
|
|
114
|
-
'- Paths of every file created, read, or modified, and what changed in each.',
|
|
115
|
-
'- Commands that matter (build / test / run / verification) and their OBSERVED results.',
|
|
116
|
-
'- What has been VERIFIED by actually running it versus what is merely believed to work. Keep that ' +
|
|
117
|
-
'distinction explicit — it is routinely lost in compaction and its loss causes false claims of ' +
|
|
118
|
-
'completion.',
|
|
119
|
-
'- Open questions, known failures, dead ends already ruled out, and anything left unfinished.',
|
|
120
|
-
'',
|
|
121
|
-
'3. RE-GROUNDING. End the summary with a final section headed exactly "Re-grounding before ' +
|
|
122
|
-
'continuing:" that tells the next turn what to re-establish BEFORE it asserts anything or resumes ' +
|
|
123
|
-
'editing. Make it concrete and specific to this session — not generic advice:',
|
|
124
|
-
'- Read whatever the worker left in `' + scratch + '` first. That is its durable working state and it ' +
|
|
125
|
-
'outlives this summary.',
|
|
126
|
-
'- Name the specific files to re-read before describing or changing them, rather than relying on ' +
|
|
127
|
-
'remembered contents.',
|
|
128
|
-
'- Name any verification that was in flight and should be re-run rather than assumed.',
|
|
129
|
-
'- State the single next action to take.',
|
|
130
|
-
].join('\n');
|
|
131
|
-
|
|
132
|
-
process.stdout.write(brief + '\n');
|
|
133
|
-
process.exit(0);
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: waits
|
|
3
|
-
description: How a frizz worker waits on something without going silent or falling out of the board's Active state (invoke as frizz:waits) — choosing between a wait-owning sub-agent, background Bash, native Monitor, and a durable timer fence; frizz's portable monitor scripts; and the CI/PR/release recipes. Load this when your effort needs to wait on CI, a release, a deploy, a merge, or another long-running condition.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Waiting, without going silent
|
|
7
|
-
|
|
8
|
-
Your system prompt carries the one rule that decides the mechanism. This is the playbook.
|
|
9
|
-
|
|
10
|
-
## The rule
|
|
11
|
-
|
|
12
|
-
**Only a live dispatched sub-agent keeps a rested thread out of the human's queue.** A background
|
|
13
|
-
`Bash`/`Monitor` does not: `run_in_background` means "don't block my turn", and frizz cannot tell a CI
|
|
14
|
-
watcher that ends in minutes from a `vite` dev server that runs forever, so neither holds a rested
|
|
15
|
-
thread in Active.
|
|
16
|
-
|
|
17
|
-
| You will… | Use |
|
|
18
|
-
|---|---|
|
|
19
|
-
| REST until the condition is met (the usual CI / PR / release wait) | a **sub-agent** that owns the wait |
|
|
20
|
-
| KEEP WORKING alongside a process you launched (dev server, log tail) | `Bash` + `run_in_background: true` |
|
|
21
|
-
| stream events into the turn you are actively working in | `Monitor` |
|
|
22
|
-
| re-check at a named wall-clock instant, across a process exit | `mcp__frizz__timer`, named in a `timers:` fence list |
|
|
23
|
-
|
|
24
|
-
Never fake a wait with `echo waiting`, repeated foreground sleeps, or an `awaiting` fence for CI, bots,
|
|
25
|
-
releases, or merge progression.
|
|
26
|
-
|
|
27
|
-
Never fake Claude's native background mechanism with shell job control (`cmd &`, `nohup … &`, or
|
|
28
|
-
`disown`). The child may survive after Bash returns, but it has no Claude task id, output-file
|
|
29
|
-
lifecycle, completion notification, or wake. Use `run_in_background: true` with the long command
|
|
30
|
-
itself in the foreground. Shell-level concurrency is only self-contained: explicitly `wait` for its
|
|
31
|
-
children or own cleanup with an EXIT trap before that Bash call returns.
|
|
32
|
-
|
|
33
|
-
## Choosing a monitor implementation
|
|
34
|
-
|
|
35
|
-
1. **Look for project-declared tooling first** — `AGENTS.md`, project skills, docs, package scripts.
|
|
36
|
-
Prefer it only after validating its absolute command and its terminal event/exit semantics. Invalid
|
|
37
|
-
declared tooling is a visible configuration error to report, not something to silently shadow. Never
|
|
38
|
-
select a monitor merely by filename.
|
|
39
|
-
2. **Otherwise use frizz's portable Node scripts** in `monitors/` (zero-dep, NDJSON on stdout, they exit
|
|
40
|
-
at a terminal verdict).
|
|
41
|
-
3. **Native `Monitor`** is the Claude adapter for a changing condition — a quiet
|
|
42
|
-
`until ...; do sleep ...; done`, emitting one event per meaningful transition. `persistent: true`
|
|
43
|
-
runs until `TaskStop` or session end.
|
|
44
|
-
|
|
45
|
-
## The sub-agent-owns-the-wait pattern
|
|
46
|
-
|
|
47
|
-
This is the prescribed way to wait while you rest. Dispatch with the plain Agent tool +
|
|
48
|
-
`run_in_background: true`, no `name` field. The child runs the watcher in **its own foreground** and
|
|
49
|
-
returns the verdict; you stay Active, and its return re-invokes you so you can act on the result.
|
|
50
|
-
|
|
51
|
-
Foreground Bash is timeout-capped at ~10 minutes, so for a longer wait the child must loop until its
|
|
52
|
-
terminal condition rather than issuing one long call. A helper must not hand back its final report
|
|
53
|
-
while its own watcher is still live — the wait IS its work.
|
|
54
|
-
|
|
55
|
-
Give the child, literally, in the prompt:
|
|
56
|
-
|
|
57
|
-
- the exact command to run and the terminal condition to stop on;
|
|
58
|
-
- the repo path and the thread's scratch-directory path;
|
|
59
|
-
- what to return: the verdict plus enough detail to act on a failure (job name, failing step, log tail);
|
|
60
|
-
- an instruction not to fix anything — it observes and reports; you decide.
|
|
61
|
-
|
|
62
|
-
## Recipes
|
|
63
|
-
|
|
64
|
-
**GitHub CI on a PR head.** `gh run watch <run-id> --exit-status` blocks to completion, or loop
|
|
65
|
-
`gh pr checks <n> --json name,state,link`. A partial `gh pr checks` rollup is **not** a green verdict:
|
|
66
|
-
also inspect the workflow runs for the exact PR head, and treat `ACTION_REQUIRED` fork gates as pending,
|
|
67
|
-
not passing.
|
|
68
|
-
|
|
69
|
-
**PR review activity.** Do not build a watcher — register the PR with `mcp__frizz__watch_pr`, then name
|
|
70
|
-
it in your `awaiting` fence's `prs:` list. Frizz polls it for you, waking on any new review, approval,
|
|
71
|
-
or comment, bot or human. The registration creates the wait; the fence only declares it.
|
|
72
|
-
|
|
73
|
-
**A release or deploy.** Poll the artifact that proves it, not the pipeline that promises it — the
|
|
74
|
-
published version on the registry, the health endpoint, the deployed asset hash.
|
|
75
|
-
|
|
76
|
-
**Another long-running local process.** Read its output path with `Read` for diagnostics (`TaskOutput`
|
|
77
|
-
is deprecated). `TaskStop` is only for your own monitor after its terminal handoff — never to cut off a
|
|
78
|
-
sub-agent or a writer.
|
|
79
|
-
|
|
80
|
-
## Liveness caveats
|
|
81
|
-
|
|
82
|
-
Live tasks do not survive the Claude process or session ending. A durable `timer:` fence is the only
|
|
83
|
-
wait that survives a restart, so use it when the next meaningful check genuinely belongs at a later
|
|
84
|
-
instant rather than continuously monitored now.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BfrZ3jm6.js";import{M as e}from"./mermaid-parser.core-BPsFhEi6.js";export{e as createArchitectureServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ot as t}from"./chunk-WYO6CB5R-DzVb3-Rj.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-DzVb3-Rj.js";import"./chunk-ICXQ74PX-DWAAqHL7.js";import"./chunk-HOUHSVGY-BCWyMhwJ.js";import"./chunk-Q4XR5HBZ-Bafzu7s-.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DUxmbiuX.js";import"./chunk-32BRIVSS-CVv1ae7n.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-DU-1KtuM.js";import"./chunk-C7G6YPKG-Cn4HhNwb.js";import"./chunk-ZGVPDNZ5-BPKQvduj.js";import"./chunk-52WLFC77-BYhPlKCT.js";import"./chunk-FWX5IMBZ-Ba3NpEQa.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Bj0A8ftW.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-DzVb3-Rj.js";import"./chunk-ICXQ74PX-DWAAqHL7.js";import"./chunk-HOUHSVGY-BCWyMhwJ.js";import"./chunk-Q4XR5HBZ-Bafzu7s-.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DUxmbiuX.js";import"./chunk-32BRIVSS-CVv1ae7n.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-DU-1KtuM.js";import"./chunk-C7G6YPKG-Cn4HhNwb.js";import"./chunk-ZGVPDNZ5-BPKQvduj.js";import"./chunk-52WLFC77-BYhPlKCT.js";import"./chunk-FWX5IMBZ-Ba3NpEQa.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Bj0A8ftW.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BfrZ3jm6.js";import{O as e}from"./mermaid-parser.core-BPsFhEi6.js";export{e as createEventModelingServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-DzVb3-Rj.js";import"./chunk-ICXQ74PX-DWAAqHL7.js";import"./chunk-HOUHSVGY-BCWyMhwJ.js";import"./chunk-Q4XR5HBZ-Bafzu7s-.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DUxmbiuX.js";import"./chunk-32BRIVSS-CVv1ae7n.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-DU-1KtuM.js";import"./chunk-C7G6YPKG-Cn4HhNwb.js";import"./chunk-ZGVPDNZ5-BPKQvduj.js";import"./chunk-52WLFC77-BYhPlKCT.js";import"./chunk-FWX5IMBZ-Ba3NpEQa.js";import"./chunk-ZIRB5QZD-C6fEPe3t.js";import{n as e}from"./chunk-PUDLZKDR-DRdZWzxX.js";export{e as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BfrZ3jm6.js";import{m as e}from"./mermaid-parser.core-BPsFhEi6.js";export{e as createRailroadAbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BfrZ3jm6.js";import{f as e}from"./mermaid-parser.core-BPsFhEi6.js";export{e as createRailroadEbnfServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BfrZ3jm6.js";import{u as e}from"./mermaid-parser.core-BPsFhEi6.js";export{e as createRailroadPegServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-DzVb3-Rj.js";import"./chunk-ICXQ74PX-DWAAqHL7.js";import"./chunk-HOUHSVGY-BCWyMhwJ.js";import"./chunk-Q4XR5HBZ-Bafzu7s-.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DUxmbiuX.js";import"./chunk-32BRIVSS-CVv1ae7n.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-DU-1KtuM.js";import"./chunk-C7G6YPKG-Cn4HhNwb.js";import"./chunk-ZGVPDNZ5-BPKQvduj.js";import"./chunk-52WLFC77-BYhPlKCT.js";import"./chunk-FWX5IMBZ-Ba3NpEQa.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-P3ZYFC1W.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-C4XfhTaE.js";import"./chunk-WYO6CB5R-DzVb3-Rj.js";import"./chunk-ICXQ74PX-DWAAqHL7.js";import"./chunk-HOUHSVGY-BCWyMhwJ.js";import"./chunk-Q4XR5HBZ-Bafzu7s-.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-DUxmbiuX.js";import"./chunk-32BRIVSS-CVv1ae7n.js";import"./chunk-XXDRQBXY-DYlTP5J-.js";import"./chunk-VR4S4FIN-DU-1KtuM.js";import"./chunk-C7G6YPKG-Cn4HhNwb.js";import"./chunk-ZGVPDNZ5-BPKQvduj.js";import"./chunk-52WLFC77-BYhPlKCT.js";import"./chunk-FWX5IMBZ-Ba3NpEQa.js";import"./chunk-ZIRB5QZD-C6fEPe3t.js";import{r as t,t as n}from"./chunk-PUDLZKDR-DRdZWzxX.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)});export{r as diagram};
|