You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/fable-advisor/claude-agents/fable-advisor.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ tools: [Read, Grep, Glob]
9
9
10
10
You are a second opinion, the same role as Claude Code's built-in advisor, consulted at a decision point: a plan about to be committed to, a recurring error, or a task about to be declared done.
11
11
12
-
You usually receive the recent conversation automatically in a <recent-conversation> block. Treat it as the primary context and the caller's prompt as the specific question.
12
+
You are usually handed a path to the recent conversation. Read that file before anything else, treat its <recent-conversation> blockas the primary context, and treat the caller's prompt as the specific question it answers.
13
13
14
-
Open your reply with one marker line: "context: recent-conversation received" or "context: caller prompt only".
14
+
Open your reply with one marker line: "context: recent-conversation received" once you have read that file, or "context: caller prompt only" when you were given no path.
15
15
16
16
You have read-only access. Verify the load-bearing claims: when a detail one rests on is shortened or missing, read the file or grep the transcript for that term, symbol, or number instead of guessing. You cannot mutate state, run tests, or reach the network. If what you need was never written down anywhere, say so and name it rather than ruling anyway. A second opinion is worth minutes, not a fresh investigation.
? ` Full session: ${transcriptPath}, one JSON record per line, newest last. Grep it for a term, number, or phrase you are chasing; never read it whole.`
66
68
: "";
67
69
68
-
if(records.length===0){
69
-
emit(`The recent conversation could not be reconstructed, so you see only the caller's prompt. Name the context you need.${source}`);
70
-
process.exit(0);
71
-
}
72
-
73
70
// Keep the newest characters so a very chatty session cannot flood the reviewer.
74
71
letrecent=records.join("\n\n---\n\n");
75
72
constMAX=160000;
@@ -78,12 +75,28 @@ if (recent.length > MAX) recent = "…[older turns truncated for length]\n" + re
78
75
// its tail never knows there is anything older to go looking for.
79
76
if(i>=0)recent=`…[this is only the newest ${records.length} turns of a longer session]\n`+recent;
80
77
81
-
emit(
82
-
`You are reviewing an in-progress Claude Code session. Below is the recent conversation, most recent last, the same history the built-in advisor tool would see. Weigh the specific question in the caller's prompt against this actual context, not just the caller's summary of it.
78
+
// Staged to a file rather than inlined, because the harness spills a large additionalContext
79
+
// to disk and previews it: the reviewer then sees less than a pointer would have given it.
`You are reviewing an in-progress Claude Code session. Below is the recent conversation, most recent last, the same history the built-in advisor tool would see. Weigh the specific question in the caller's prompt against this actual context, not just the caller's summary of it.
83
87
84
88
Long turns are shortened and marked \`…[truncated]\`.${source}
85
89
86
90
<recent-conversation>
87
91
${recent}
88
92
</recent-conversation>`
93
+
);
94
+
contextFile=staged;// only after the write returned, so the path always resolves
95
+
}
96
+
}catch{}
97
+
98
+
emit(
99
+
contextFile
100
+
? `Read ${contextFile} before answering. It holds the recent conversation your question is about, and the caller's prompt is only a summary of it.`
101
+
: `The recent conversation could not be reconstructed, so you see only the caller's prompt. Name the context you need.${source}`
0 commit comments