Repository navigation
Expand file tree
/
Copy pathclp-plugin-architecture.html
More file actions
107 lines (107 loc) · 30.7 KB
/
Copy pathclp-plugin-architecture.html
File metadata and controls
107 lines (107 loc) · 30.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>How the CLP plugin analyzes logs</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans+Condensed:wght@600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap"><style>
:root {
--bg: #f4f6f8; --surface: #ffffff; --ink: #161a21; --ink-2: #485160; --muted: #6b7482;
--rule: #d8dde5; --head: #f7f8fa; --chip: #e8ecf2; --accent: #2a78d6; --quote: #e4eefb;
--sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
--cond: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
--mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--bg: #0f1216; --surface: #161a20; --ink: #e8ebf0; --ink-2: #b3bbc7; --muted: #8b94a3;
--rule: #2a3039; --head: #1b2028; --chip: #232932; --accent: #5b9ef0; --quote: #16263b;
}
}
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #0f1216; --surface: #161a20; --ink: #e8ebf0; --ink-2: #b3bbc7; --muted: #8b94a3;
--rule: #2a3039; --head: #1b2028; --chip: #232932; --accent: #5b9ef0; --quote: #16263b;
}
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--sans); }
.page { max-width: 980px; margin: 0 auto; padding-inline: 20px; padding-block: 40px 72px; display: grid; gap: 28px; }
header { display: grid; gap: 10px; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h1, h2 { font-family: var(--cond); font-weight: 600; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.2; padding-top: 20px; border-top: 1px solid var(--rule); }
h3 { font: 600 16px/1.35 var(--sans); margin: 8px 0 0; }
h4, h5, h6 { font: 600 14px/1.4 var(--sans); margin: 4px 0 0; color: var(--ink-2); }
.meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav { display: flex; flex-wrap: wrap; gap: 6px; }
nav a { font-size: 13px; color: var(--ink-2); text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 4px 10px; }
nav a:hover, nav a:focus-visible { color: var(--ink); border-color: var(--muted); }
article { display: grid; gap: 14px; min-width: 0; }
article > * { margin: 0; min-width: 0; }
ul, ol { padding-left: 22px; display: grid; gap: 4px; }
li > ul, li > ol { margin-top: 4px; }
li > p { margin: 0; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: .86em; background: var(--chip); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.codewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
pre { margin: 0; padding: 12px 14px; }
pre code { background: none; padding: 0; font-size: 13px; overflow-wrap: normal; white-space: pre; }
blockquote { margin: 0; padding: 10px 14px; background: var(--quote); border-radius: 8px; color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--rule); }
details { margin: 8px 0 4px; }
summary { font-family: var(--sans); font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; padding: 4px 0; }
summary:hover { color: var(--ink); }
details[open] > summary { margin-bottom: 8px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
tr:last-child td { border-bottom: 0; }
th { font: 600 12px/1.3 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; background: var(--head); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td code { font-size: 12.5px; }
footer { font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; }
@media (max-width: 560px) { .page { padding-inline: 16px; padding-block: 28px 48px; } h2 { font-size: 21px; } }
@media print {
:root, :root[data-theme="dark"] { color-scheme: light; --bg: #ffffff; --surface: #ffffff; --ink: #161a21; --ink-2: #485160;
--muted: #6b7482; --rule: #d8dde5; --head: #f7f8fa; --chip: #eef1f5; --accent: #1f5fae; --quote: #eef4fc; }
body { font-size: 11pt; }
.page { max-width: none; padding: 0; }
nav { display: none; }
.tablewrap, .codewrap { overflow: visible; }
pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
tr, pre, blockquote { break-inside: avoid; }
h2, h3 { break-after: avoid; }
}
.figwrap{overflow-x:auto;background:var(--surface);border:1px solid var(--rule);border-radius:8px;padding:12px}.figwrap svg{display:block;width:100%;min-width:760px;height:auto}.figcap{font-size:13px;color:var(--muted);margin:0}
</style></head><body><div class="page"><header><div class="eyebrow">CLP plugin</div><h1>How the CLP plugin analyzes logs</h1></header><article>
<p>The plugin adds log analysis to an AI coding agent such as Claude Code or Codex. It has two parts. The first is a set of written instructions, called a <strong>skill</strong>, that the agent reads when someone asks it about logs. They tell it which steps to run, what to ask the person, and when to hand a piece of work to a second agent working alongside it, called a <strong>subagent</strong>. The second is a <strong>command</strong>, the program <code>clp</code>, that does the actual work: it compresses the logs, loads their structure and shapes, gathers the evidence, and computes the facts that back every figure in the report. The agent runs <code>clp</code> the way a person would in a terminal.</p>
<p>The diagram reads from top to bottom, following the data and the decisions. The steps in the center are shared. Between them the run splits into two routes, and each row pairs the step that does the same job on both. The rows are the jobs, not the skill's five numbered phases.</p>
<p>Claude Code is the one lightly pre-trained application today: its areas, and the queries built around its repetitive shapes, ship with the plugin, so a session skips the classification step. That is a starting point, not a limit: semantic search and any other query still run on the session's archive directly, which is how the agent goes deeper on what the user picks. Any other application is trained on the spot: its shapes are classified on its first run and cached, so later runs on that machine reuse them. Training here means sorting shapes into topics and writing queries for them; no model is trained. To pre-train another application, the plugin needs two things: the fields that identify its logs, so <code>clp</code> recognizes them (Codex and vLLM are already recognized this way), and the application's topics and queries, shipped with the plugin. Then every machine skips classification for it, starting with the first run.</p>
<div class="figwrap"><svg class="arch" viewBox="0 0 960 1828" role="img" aria-labelledby="arch-t arch-d" xmlns="http://www.w3.org/2000/svg"><title id="arch-t">How the CLP plugin analyzes logs</title><desc id="arch-d">The user asks the agent. The clp:analyze-logs skill tells it which clp command to run. clp TARGET prepares an archive and names the application. The two routes then run side by side, one row per job. Relate and compress the files: for a Claude Code session, clp bundle finds the subagent and workflow logs beside the session file, compresses them together, and builds a file-level graph of how they relate, or, with none beside it, clp compress session archives the session file alone; for generic logs, clp compress folder puts the files the user chose into one archive. Either way compressing with CLP exposes the structures it builds: the merged schema tree, the encoded record tables and the log shape dictionary. Load the structure, shared: from the MST, clp bootstrap reads every field, its types and its record count. Load and categorize the shapes: on generic logs, the same clp bootstrap call reads the shapes and the cache, and the baseline queries start. A session's shapes are lightly pre-trained: its repetitive parts, the record kinds, tool calls and harness records, are known in advance and built into its queries, and what is left is free text. Then the shapes are sorted into topics on generic logs, and into areas in a session. A topic is a group of log messages about one subject, such as errors, replication or request handling. An area is one of a session's seven fixed ones: reliability, cost, time, outcomes, harness faults, human loop and rework. Every later step is organized by them. A session's areas ship with the plugin. On generic logs, unless the cache already has the shapes, the plugin clusters them by meaning, and a subagent classifies one shape per cluster into topics for that application, nine generic ones plus any the shapes suggest, and writes the query plan. The plan is checked, each cluster's topic is given to all its shapes, and the result is cached, so the next run starts pre-trained. Evidence is what the queries return: the records and counts. Facts are the figures computed from it in code, and the only numbers a report may quote. Gather overview evidence: clp session measure and the extras subagent, or clp extract and clp run on the overview queries the classifier wrote. Both routes ask the user the same questions. Gather focus evidence: queries the agent writes for the focus the user picks and an optional score, or clp focus queueing the focus queries. Write the facts file: clp session measure, in the same pass as its evidence, or clp facts. Both end in the same report stage: a report writer subagent, clp report check on the general route, and clp report save.</desc><style>
.box{fill:var(--surface);stroke:var(--rule)}
.box.skill{stroke:var(--muted)}
.box.leg{fill:var(--head)}
.grp{fill:var(--head);stroke:var(--muted)}
.gt{font:600 12px var(--sans);fill:var(--accent);letter-spacing:.02em}
.box.ghost{fill:none;stroke:var(--muted);stroke-dasharray:5 4}
.band{fill:var(--head);stroke:var(--rule)}
.pill{fill:var(--chip)}
.dia{fill:var(--head);stroke:var(--muted)}
.t{font:600 13px var(--sans);fill:var(--ink)}
.s{font:400 11px var(--sans);fill:var(--ink-2)}
.s2{font:400 11.5px var(--sans);fill:var(--ink-2)}
.fb,.fb2{margin:0;font:400 11px/15px var(--sans);color:var(--ink-2)}
.fb2{font-size:11.5px;line-height:17px}
.fn{display:block;font-style:italic;color:var(--muted)}
.dt{font:600 12px var(--sans);fill:var(--ink)}
.pn{font:600 12px var(--mono);fill:var(--ink)}
.ps{font:400 10.5px var(--sans);fill:var(--ink-2)}
.cap{font:600 10.5px var(--mono);fill:var(--muted);letter-spacing:.05em}
.lab{font:500 10.5px var(--sans);fill:var(--ink-2)}
.labbg{fill:var(--bg)}
.capd{font:italic 500 11px var(--sans);fill:var(--ink-2)}
.tg-c{fill:var(--accent)} .tt-c{font:600 10px var(--mono);fill:var(--surface)}
.tg-y{fill:var(--chip);stroke:var(--muted)} .tt-y{font:600 10px var(--mono);fill:var(--ink)}
.tg-s{fill:var(--quote);stroke:var(--accent)} .tt-s{font:600 10px var(--mono);fill:var(--accent)}
.e{stroke:var(--ink-2);stroke-width:1.3;fill:none}
.e.a{stroke:var(--accent);stroke-width:1.8}
.mk{fill:var(--ink-2)} .mka{fill:var(--accent)}
</style><defs><marker id="ah" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="mk" d="M0 0L8 4L0 8z"/></marker><marker id="aha" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="mka" d="M0 0L8 4L0 8z"/></marker></defs><rect class="box" x="40" y="10" width="410" height="67" rx="8"/><text class="t" x="54" y="31" text-anchor="start">The user</text><foreignObject x="54" y="38" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Asks the agent to analyze a log file, a folder, a CLP archive or a Claude Code session.</div></foreignObject><rect class="tg-y" x="403.6" y="19" width="36.4" height="16" rx="8"/><text class="tt-y" x="421.8" y="31" text-anchor="middle">user</text><rect class="box leg" x="510" y="10" width="410" height="67" rx="8"/><rect class="tg-c" x="522" y="20" width="30.3" height="16" rx="8"/><text class="tt-c" x="537.1" y="32" text-anchor="middle">clp</text><text class="s" x="560" y="32" text-anchor="start">the command that runs it</text><rect class="tg-y" x="710" y="20" width="36.4" height="16" rx="8"/><text class="tt-y" x="728.2" y="32" text-anchor="middle">user</text><text class="s" x="756" y="32" text-anchor="start">the user answers</text><rect class="tg-s" x="522" y="46" width="60.8" height="16" rx="8"/><text class="tt-s" x="552.4" y="58" text-anchor="middle">subagent</text><text class="s" x="598" y="58" text-anchor="start">a subagent does it</text><text class="s" x="710" y="58" text-anchor="start">Center boxes run on both routes.</text><path class="e a" d="M245 77 L245 91" marker-end="url(#aha)"/><rect class="box skill" x="40" y="93" width="410" height="82" rx="8"/><text class="t" x="54" y="114" text-anchor="start">Skill: clp:analyze-logs</text><foreignObject x="54" y="121" width="382" height="56" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Instructions the agent loads when the user asks about logs. They tell it which clp command to run next and what to ask the user. Codex has its own versions.</div></foreignObject><rect class="box" x="510" y="93" width="410" height="82" rx="8"/><text class="t" x="524" y="114" text-anchor="start">Command: clp</text><foreignObject x="524" y="121" width="382" height="56" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">The one program the plugin ships. The agent runs it for every step.</div></foreignObject><rect class="tg-c" x="879.7" y="102" width="30.3" height="16" rx="8"/><text class="tt-c" x="894.9" y="114" text-anchor="middle">clp</text><path class="e a" d="M450 134 L508 134" marker-end="url(#aha)"/><rect class="labbg" x="463.6" y="115" width="32.8" height="15" rx="3"/><text class="lab" x="480" y="126" text-anchor="middle">runs</text><path class="e" d="M715 175 L715 189 L480 189 L480 203" marker-end="url(#ah)"/><text class="cap" x="40" y="197" text-anchor="start">1 · PREPARE</text><rect class="box" x="180" y="205" width="600" height="52" rx="8"/><text class="t" x="194" y="226" text-anchor="start">Prepare the logs</text><foreignObject x="194" y="233" width="572" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Detects the format and identifies the application that wrote the logs.</div></foreignObject><rect class="tg-c" x="684.8" y="214" width="85.2" height="16" rx="8"/><text class="tt-c" x="727.4" y="226" text-anchor="middle">clp <TARGET></text><path class="e" d="M480 257 L480 273" marker-end="url(#ah)"/><polygon class="dia" points="480,275.0 605.0,307 480,339.0 355.0,307"/><text class="dt" x="480" y="303.5" text-anchor="middle">Which application</text><text class="dt" x="480" y="318.5" text-anchor="middle">wrote the logs?</text><path class="e" d="M355 307 L245 307 L245 371" marker-end="url(#ah)"/><path class="e" d="M605 307 L715 307 L715 371" marker-end="url(#ah)"/><rect class="labbg" x="258.8" y="300" width="78.4" height="15" rx="3"/><text class="lab" x="298" y="311" text-anchor="middle">generic logs</text><rect class="labbg" x="595.1" y="300" width="129.7" height="15" rx="3"/><text class="lab" x="660" y="311" text-anchor="middle">a Claude Code session</text><text class="cap" x="40" y="365" text-anchor="start">2 · RELATE AND COMPRESS</text><rect class="box" x="40" y="373" width="410" height="67" rx="8"/><text class="t" x="54" y="394" text-anchor="start">Collect the files the user chose</text><foreignObject x="54" y="401" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Takes the files or the folder the user named, as they are.</div></foreignObject><rect class="tg-c" x="312.1" y="382" width="127.9" height="16" rx="8"/><text class="tt-c" x="376.1" y="394" text-anchor="middle">clp compress folder</text><rect class="box" x="510" y="373" width="410" height="67" rx="8"/><text class="t" x="524" y="394" text-anchor="start">Find the related files and link them</text><foreignObject x="524" y="401" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Finds the agent and workflow logs saved next to the session and links them in a graph.</div></foreignObject><rect class="tg-c" x="837.0" y="382" width="73.0" height="16" rx="8"/><text class="tt-c" x="873.5" y="394" text-anchor="middle">clp bundle</text><path class="e" d="M245 440 L245 454" marker-end="url(#ah)"/><path class="e" d="M715 440 L715 454" marker-end="url(#ah)"/><rect class="box" x="180" y="456" width="600" height="67" rx="8"/><text class="t" x="194" y="477" text-anchor="start">Compress with CLP</text><foreignObject x="194" y="484" width="572" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Both routes compress the logs with CLP and expose the structures it builds while compressing: the merged schema tree (MST), the encoded record tables (ERTs) and the log shape dictionary. Steps 3 and 4 read them.</div></foreignObject><rect class="tg-c" x="727.5" y="465" width="42.5" height="16" rx="8"/><text class="tt-c" x="748.8" y="477" text-anchor="middle">clp-s</text><path class="e" d="M480 523 L480 551" marker-end="url(#ah)"/><text class="cap" x="40" y="545" text-anchor="start">3 · LOAD THE STRUCTURE</text><rect class="box" x="180" y="553" width="600" height="52" rx="8"/><text class="t" x="194" y="574" text-anchor="start">Load the structure</text><foreignObject x="194" y="581" width="572" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Loads the structure from the MST (merged schema tree): every field path, its types and how many records carry it.</div></foreignObject><rect class="tg-c" x="678.7" y="562" width="91.3" height="16" rx="8"/><text class="tt-c" x="724.4" y="574" text-anchor="middle">clp bootstrap</text><path class="e" d="M245 605 L245 633" marker-end="url(#ah)"/><text class="cap" x="40" y="627" text-anchor="start">4 · LOAD & CATEGORIZE SHAPES</text><rect class="box" x="40" y="635" width="410" height="67" rx="8"/><text class="t" x="54" y="656" text-anchor="start">Load the shapes</text><foreignObject x="54" y="663" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Loads every log shape and its count from the dictionary, and looks up the cache. The baseline queries start next.</div></foreignObject><rect class="tg-c" x="348.7" y="644" width="91.3" height="16" rx="8"/><text class="tt-c" x="394.3" y="656" text-anchor="middle">clp bootstrap</text><path class="e" d="M715 605 L715 633" marker-end="url(#ah)"/><rect class="box" x="510" y="635" width="410" height="67" rx="8"/><text class="t" x="524" y="656" text-anchor="start">Load lightly pre-trained shapes</text><rect class="tg-c" x="782.1" y="644" width="127.9" height="16" rx="8"/><text class="tt-c" x="846.1" y="656" text-anchor="middle">clp session measure</text><foreignObject x="524" y="663" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Its queries start from shapes known in advance: record kinds, tool calls, harness records. Semantic search and any query still work directly.</div></foreignObject><path class="e" d="M715 702 L715 730" marker-end="url(#ah)"/><path class="e" d="M245 702 L245 730" marker-end="url(#ah)"/><rect class="box" x="510" y="732" width="410" height="67" rx="8"/><text class="t" x="524" y="753" text-anchor="start">Seven lightly pre-trained areas</text><foreignObject x="524" y="760" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Reliability, cost, time, outcomes, harness faults, human loop and rework. The plugin ships them, so nothing is classified at run time.</div></foreignObject><polygon class="dia" points="245,732.0 340.0,754 245,776.0 150.0,754"/><text class="dt" x="245" y="758.0" text-anchor="middle">classified before?</text><path class="e" d="M245 776 L245 788" marker-end="url(#ah)"/><rect class="labbg" x="254" y="775" width="106.9" height="15" rx="3"/><text class="lab" x="259" y="786" text-anchor="start">no, or new shapes</text><rect class="grp" x="40" y="790" width="410" height="258" rx="10"/><text class="gt" x="54" y="809" text-anchor="start">Train on the spot: cluster and classify the shapes</text><rect class="box" x="52" y="818" width="386" height="52" rx="8"/><text class="t" x="66" y="839" text-anchor="start">Cluster</text><foreignObject x="66" y="846" width="358" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Groups similar shapes by their embeddings.</div></foreignObject><rect class="tg-c" x="312.3" y="827" width="115.7" height="16" rx="8"/><text class="tt-c" x="370.1" y="839" text-anchor="middle">clp shape-cluster</text><path class="e" d="M245 870 L245 884" marker-end="url(#ah)"/><rect class="box" x="52" y="886" width="386" height="82" rx="8"/><text class="t" x="66" y="907" text-anchor="start">Classify into its own topics</text><foreignObject x="66" y="914" width="358" height="56" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">A subagent further groups the clusters into topics: generic ones such as errors, and domain-specific ones it infers from the logs, such as kv-cache for vLLM. It also writes the queries to run.</div></foreignObject><rect class="tg-s" x="367.2" y="895" width="60.8" height="16" rx="8"/><text class="tt-s" x="397.6" y="907" text-anchor="middle">subagent</text><path class="e" d="M245 968 L245 982" marker-end="url(#ah)"/><rect class="box" x="52" y="984" width="386" height="52" rx="8"/><text class="t" x="66" y="1005" text-anchor="start">Check, then expand</text><foreignObject x="66" y="1012" width="358" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Checks the queries, then gives each shape its group's topic.</div></foreignObject><rect class="tg-c" x="306.2" y="993" width="121.8" height="16" rx="8"/><text class="tt-c" x="367.1" y="1005" text-anchor="middle">clp kql check-plan</text><path class="e" d="M245 1048 L245 1062" marker-end="url(#ah)"/><rect class="box" x="52" y="1064" width="386" height="67" rx="8"/><text class="t" x="66" y="1085" text-anchor="start">Cache it</text><foreignObject x="66" y="1092" width="358" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">The result is stored per application. The next run classifies only the shapes it has not seen.</div></foreignObject><rect class="tg-c" x="324.5" y="1073" width="103.5" height="16" rx="8"/><text class="tt-c" x="376.2" y="1085" text-anchor="middle">clp shape-cache</text><path class="e" d="M245 1131 L245 1159" marker-end="url(#ah)"/><path class="e" d="M715 799 L715 1159" marker-end="url(#ah)"/><text class="cap" x="40" y="1153" text-anchor="start">5 · GATHER OVERVIEW EVIDENCE</text><text class="capd" x="259" y="1153" text-anchor="start">first pass: every topic or area</text><rect class="box" x="40" y="1161" width="410" height="52" rx="8"/><text class="t" x="54" y="1182" text-anchor="start">Query every topic</text><foreignObject x="54" y="1189" width="382" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Runs the overview queries in the background while the user picks a focus.</div></foreignObject><rect class="tg-c" x="385.3" y="1170" width="54.7" height="16" rx="8"/><text class="tt-c" x="412.7" y="1182" text-anchor="middle">clp run</text><path class="e" d="M340 754 L466 754 L466 1181 L452 1181" marker-end="url(#ah)"/><rect class="labbg" x="369.5" y="747" width="67.0" height="15" rx="3"/><text class="lab" x="403" y="758" text-anchor="middle">yes: reuse</text><rect class="box" x="510" y="1161" width="410" height="52" rx="8"/><text class="t" x="524" y="1182" text-anchor="start">Measure every area</text><foreignObject x="524" y="1189" width="382" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Gathers the evidence for all seven areas and computes the facts in one pass.</div></foreignObject><rect class="tg-c" x="782.1" y="1170" width="127.9" height="16" rx="8"/><text class="tt-c" x="846.1" y="1182" text-anchor="middle">clp session measure</text><path class="e" d="M715 1213 L715 1227" marker-end="url(#ah)"/><rect class="box" x="510" y="1229" width="410" height="52" rx="8"/><text class="t" x="524" y="1250" text-anchor="start">Look for what the seven miss</text><foreignObject x="524" y="1257" width="382" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">A subagent proposes extra areas from the fields found in step 3.</div></foreignObject><rect class="tg-s" x="849.2" y="1238" width="60.8" height="16" rx="8"/><text class="tt-s" x="879.6" y="1250" text-anchor="middle">subagent</text><path class="e" d="M245 1213 L245 1309" marker-end="url(#ah)"/><path class="e" d="M715 1281 L715 1309" marker-end="url(#ah)"/><text class="cap" x="40" y="1303" text-anchor="start">6 · ASK THE USER</text><rect class="box" x="180" y="1311" width="600" height="67" rx="8"/><text class="t" x="194" y="1332" text-anchor="start">Questions for the user</text><foreignObject x="194" y="1339" width="572" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">The agent asks what the user knows about the system and which topic or area to look at more closely. On generic logs it asks while the overview evidence is gathered; on a session, after.</div></foreignObject><rect class="tg-y" x="733.6" y="1320" width="36.4" height="16" rx="8"/><text class="tt-y" x="751.8" y="1332" text-anchor="middle">user</text><path class="e" d="M245 1378 L245 1406" marker-end="url(#ah)"/><path class="e" d="M715 1378 L715 1406" marker-end="url(#ah)"/><text class="cap" x="40" y="1400" text-anchor="start">7 · GATHER FOCUS EVIDENCE</text><text class="capd" x="259" y="1400" text-anchor="start">second pass: the topic or area the user picks</text><rect class="box" x="40" y="1408" width="410" height="67" rx="8"/><text class="t" x="54" y="1429" text-anchor="start">Query the focus</text><foreignObject x="54" y="1436" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Queues the focus queries the classifier wrote for the chosen topic.</div></foreignObject><rect class="tg-c" x="373.1" y="1417" width="66.9" height="16" rx="8"/><text class="tt-c" x="406.6" y="1429" text-anchor="middle">clp focus</text><rect class="box" x="510" y="1408" width="410" height="67" rx="8"/><text class="t" x="524" y="1429" text-anchor="start">Go deep on the user's focus</text><foreignObject x="524" y="1436" width="382" height="41" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">The agent writes its own queries for the chosen area, and scores the session on request.</div></foreignObject><rect class="tg-c" x="879.7" y="1417" width="30.3" height="16" rx="8"/><text class="tt-c" x="894.9" y="1429" text-anchor="middle">clp</text><path class="e" d="M245 1475 L245 1503" marker-end="url(#ah)"/><path class="e" d="M715 1475 L715 1503" marker-end="url(#ah)"/><text class="cap" x="40" y="1497" text-anchor="start">8 · COMPUTE THE FACTS</text><rect class="box" x="40" y="1505" width="410" height="52" rx="8"/><text class="t" x="54" y="1526" text-anchor="start">Write the facts file</text><foreignObject x="54" y="1533" width="382" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Computes the figures the report may quote from the evidence.</div></foreignObject><rect class="tg-c" x="373.1" y="1514" width="66.9" height="16" rx="8"/><text class="tt-c" x="406.6" y="1526" text-anchor="middle">clp facts</text><rect class="box" x="510" y="1505" width="410" height="52" rx="8"/><text class="t" x="524" y="1526" text-anchor="start">Write the facts file</text><rect class="tg-c" x="782.1" y="1514" width="127.9" height="16" rx="8"/><text class="tt-c" x="846.1" y="1526" text-anchor="middle">clp session measure</text><foreignObject x="524" y="1533" width="382" height="26" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb">Computes the figures the report may quote, in the same pass as step 5.</div></foreignObject><path class="e" d="M245 1557 L245 1585" marker-end="url(#ah)"/><path class="e" d="M715 1557 L715 1585" marker-end="url(#ah)"/><text class="cap" x="40" y="1579" text-anchor="start">9 · REPORT</text><rect class="box" x="40" y="1587" width="880" height="72" rx="8"/><rect class="pill" x="56" y="1601" width="264" height="44" rx="6"/><text class="pn" x="68" y="1618" text-anchor="start">report writer</text><text class="ps" x="68" y="1634" text-anchor="start">writes it from the facts file only</text><rect class="tg-s" x="251.2" y="1606" width="60.8" height="16" rx="8"/><text class="tt-s" x="281.6" y="1618" text-anchor="middle">subagent</text><rect class="pill" x="348" y="1601" width="264" height="44" rx="6"/><text class="pn" x="360" y="1618" text-anchor="start">clp report check</text><text class="ps" x="360" y="1634" text-anchor="start">checks the figures (general route)</text><rect class="tg-c" x="573.7" y="1606" width="30.3" height="16" rx="8"/><text class="tt-c" x="588.9" y="1618" text-anchor="middle">clp</text><rect class="pill" x="640" y="1601" width="264" height="44" rx="6"/><text class="pn" x="652" y="1618" text-anchor="start">clp report save</text><text class="ps" x="652" y="1634" text-anchor="start">saves it as a file or a page</text><rect class="tg-c" x="865.7" y="1606" width="30.3" height="16" rx="8"/><text class="tt-c" x="880.9" y="1618" text-anchor="middle">clp</text><path class="e" d="M320 1623 L346 1623" marker-end="url(#ah)"/><path class="e" d="M612 1623 L638 1623" marker-end="url(#ah)"/><path class="e" d="M480 1659 L480 1677" marker-end="url(#ah)"/><rect class="box" x="260" y="1679" width="440" height="40" rx="8"/><text class="t" x="480" y="1704" text-anchor="middle">The user gets the report and the source of each figure</text><text class="cap" x="40" y="1741" text-anchor="start">UNDERNEATH BOTH ROUTES</text><rect class="band" x="40" y="1749" width="880" height="69" rx="8"/><foreignObject x="54" y="1758" width="852" height="57" overflow="visible"><div xmlns="http://www.w3.org/1999/xhtml" class="fb2">Records live in clp-s archives, each holding an MST, ERTs and a log shape dictionary. clp compress, bundle, search, schema and bootstrap read or write them through the clp-s binary; the later steps work from their output. Classifications are cached per application, and clustering and semantic search call a remote embedding service.</div></foreignObject></svg></div>
</article></div></body></html>