mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 18:10:47 -04:00
promptong
This commit is contained in:
@@ -19,18 +19,21 @@ Decision policy:
|
|||||||
- Long SKIP streaks are acceptable. Do not post just to break a streak.
|
- Long SKIP streaks are acceptable. Do not post just to break a streak.
|
||||||
- Treat chat energy and rover telemetry as equal signal sources.
|
- Treat chat energy and rover telemetry as equal signal sources.
|
||||||
- A strong chat moment alone can justify speaking, but only if it is clearly new and worth reacting to.
|
- A strong chat moment alone can justify speaking, but only if it is clearly new and worth reacting to.
|
||||||
|
- If chat directly addresses or clearly talks about the Overseer/bot, respond with one line instead of SKIP.
|
||||||
|
|
||||||
Hard skip rules:
|
Hard skip rules:
|
||||||
- If nothing clearly changed since recent context, output SKIP.
|
- If nothing clearly changed since recent context, output SKIP.
|
||||||
- If your idea is a generic status line that could have been said on many ticks, output SKIP.
|
- If your idea is a generic status line that could have been said on many ticks, output SKIP.
|
||||||
- If the topic matches last_message_focus and there is no clear new angle, output SKIP.
|
- If the topic matches last_message_focus and there is no clear new angle, output SKIP.
|
||||||
- Never post on a fixed cadence. Never post "just because time passed."
|
- Never post on a fixed cadence. Never post "just because time passed."
|
||||||
|
- If the line does not contain a concrete anchor from current context (person, rover, or event), output SKIP.
|
||||||
|
|
||||||
Quiet-period policy:
|
Quiet-period policy:
|
||||||
- If active drivers are 0 and chat is quiet, strongly prefer SKIP.
|
- If active drivers are 0 and chat is quiet, strongly prefer SKIP.
|
||||||
- During quiet periods, posting should be rare, not routine.
|
- During quiet periods, posting should be rare, not routine.
|
||||||
- Do not narrate silence itself ("still", "quiet", "silent", "nothing happening") unless there is a fresh, specific reason.
|
- Do not narrate silence itself ("still", "quiet", "silent", "nothing happening") unless there is a fresh, specific reason.
|
||||||
- If you recently made a quiet/atmospheric line and conditions are unchanged, output SKIP.
|
- If you recently made a quiet/atmospheric line and conditions are unchanged, output SKIP.
|
||||||
|
- Exception: if users are actively talking to/about the Overseer/bot, respond.
|
||||||
|
|
||||||
Grounding policy:
|
Grounding policy:
|
||||||
- Use timeline context for narrative flow.
|
- Use timeline context for narrative flow.
|
||||||
@@ -52,6 +55,14 @@ Repetition policy:
|
|||||||
- Never post generic filler (for example: "X is on the move").
|
- Never post generic filler (for example: "X is on the move").
|
||||||
- Avoid repeating the same subject on consecutive posts unless there is a clear escalation.
|
- Avoid repeating the same subject on consecutive posts unless there is a clear escalation.
|
||||||
- Avoid repeating ambient "vibe" lines in low-activity periods.
|
- Avoid repeating ambient "vibe" lines in low-activity periods.
|
||||||
|
- Avoid reusing the same opening pattern in consecutive posts.
|
||||||
|
|
||||||
|
Banned filler patterns:
|
||||||
|
- "the fleet is still and silent"
|
||||||
|
- "all quiet"
|
||||||
|
- "nothing happening"
|
||||||
|
- "is on the move"
|
||||||
|
- If your draft is close to these, output SKIP.
|
||||||
|
|
||||||
Numeric policy:
|
Numeric policy:
|
||||||
- Numeric fields are internal context only.
|
- Numeric fields are internal context only.
|
||||||
@@ -62,3 +73,4 @@ Style:
|
|||||||
- Slightly ominous, atmospheric, playful.
|
- Slightly ominous, atmospheric, playful.
|
||||||
- Natural commentary, not a dry status report.
|
- Natural commentary, not a dry status report.
|
||||||
- Short and punchy.
|
- Short and punchy.
|
||||||
|
- Pick one tone per post: ominous, dry-witty, play-by-play, or deadpan.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||||
<title>Multi Roomba Rover</title>
|
<title>Multi Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-uxgU4yzq.js"></script>
|
<script type="module" crossorigin src="/assets/index-CkACp-FG.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-C_i0uH-D.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-C_i0uH-D.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ let timer = null;
|
|||||||
let inFlight = false;
|
let inFlight = false;
|
||||||
let tickCount = 0;
|
let tickCount = 0;
|
||||||
let skipStreak = 0;
|
let skipStreak = 0;
|
||||||
|
let generationCount = 0;
|
||||||
|
let generationTotalMs = 0;
|
||||||
let contextResetAt = Date.now();
|
let contextResetAt = Date.now();
|
||||||
let clearCount = 0;
|
let clearCount = 0;
|
||||||
const roverActivity = new Map(); // roverId -> { buckets: Map(bucketTs -> { distanceMm, turnDeg, bumps }), bumpLeftActive, bumpRightActive }
|
const roverActivity = new Map(); // roverId -> { buckets: Map(bucketTs -> { distanceMm, turnDeg, bumps }), bumpLeftActive, bumpRightActive }
|
||||||
@@ -75,6 +77,9 @@ let status = {
|
|||||||
lastClearedAt: contextResetAt,
|
lastClearedAt: contextResetAt,
|
||||||
clearCount,
|
clearCount,
|
||||||
skipStreak: 0,
|
skipStreak: 0,
|
||||||
|
lastGenerationMs: null,
|
||||||
|
avgGenerationMs: null,
|
||||||
|
generationCount: 0,
|
||||||
lastGeneratedText: null,
|
lastGeneratedText: null,
|
||||||
lastPostedText: null,
|
lastPostedText: null,
|
||||||
lastPostedAt: null,
|
lastPostedAt: null,
|
||||||
@@ -182,12 +187,17 @@ function clearRuntimeHistory() {
|
|||||||
contextResetAt = Date.now();
|
contextResetAt = Date.now();
|
||||||
clearCount += 1;
|
clearCount += 1;
|
||||||
skipStreak = 0;
|
skipStreak = 0;
|
||||||
|
generationCount = 0;
|
||||||
|
generationTotalMs = 0;
|
||||||
roverActivity.clear();
|
roverActivity.clear();
|
||||||
lastRoverStateById.clear();
|
lastRoverStateById.clear();
|
||||||
updateStatus({
|
updateStatus({
|
||||||
lastClearedAt: contextResetAt,
|
lastClearedAt: contextResetAt,
|
||||||
clearCount,
|
clearCount,
|
||||||
skipStreak,
|
skipStreak,
|
||||||
|
lastGenerationMs: null,
|
||||||
|
avgGenerationMs: null,
|
||||||
|
generationCount,
|
||||||
lastInfoSnapshot: null,
|
lastInfoSnapshot: null,
|
||||||
lastModelMessages: null,
|
lastModelMessages: null,
|
||||||
lastModelRawOutput: null,
|
lastModelRawOutput: null,
|
||||||
@@ -623,9 +633,17 @@ async function runTick() {
|
|||||||
lastInfoSnapshot: snapshot,
|
lastInfoSnapshot: snapshot,
|
||||||
});
|
});
|
||||||
const systemPrompt = await readSystemPrompt();
|
const systemPrompt = await readSystemPrompt();
|
||||||
|
const generationStartMs = Date.now();
|
||||||
const modelResult = await generateCommentary(systemPrompt, snapshot);
|
const modelResult = await generateCommentary(systemPrompt, snapshot);
|
||||||
|
const generationMs = Math.max(0, Date.now() - generationStartMs);
|
||||||
|
generationCount += 1;
|
||||||
|
generationTotalMs += generationMs;
|
||||||
|
const avgGenerationMs = Math.round(generationTotalMs / generationCount);
|
||||||
updateStatus({
|
updateStatus({
|
||||||
lastModelRawOutput: modelResult?.raw || '',
|
lastModelRawOutput: modelResult?.raw || '',
|
||||||
|
lastGenerationMs: generationMs,
|
||||||
|
avgGenerationMs,
|
||||||
|
generationCount,
|
||||||
});
|
});
|
||||||
const text = modelResult?.normalized;
|
const text = modelResult?.normalized;
|
||||||
if (!text) {
|
if (!text) {
|
||||||
|
|||||||
@@ -296,6 +296,9 @@ function LlmCommentaryPanel({ status, onClearHistory, clearingHistory }) {
|
|||||||
{ label: 'frequency', value: `${status.frequencyMs} ms` },
|
{ label: 'frequency', value: `${status.frequencyMs} ms` },
|
||||||
{ label: 'tick count', value: status.tickCount ?? 0 },
|
{ label: 'tick count', value: status.tickCount ?? 0 },
|
||||||
{ label: 'skip streak', value: status.skipStreak ?? 0 },
|
{ label: 'skip streak', value: status.skipStreak ?? 0 },
|
||||||
|
{ label: 'last gen', value: status.lastGenerationMs != null ? `${status.lastGenerationMs} ms` : '--' },
|
||||||
|
{ label: 'avg gen', value: status.avgGenerationMs != null ? `${status.avgGenerationMs} ms` : '--' },
|
||||||
|
{ label: 'gen count', value: status.generationCount ?? 0 },
|
||||||
{ label: 'last outcome', value: status.lastOutcome || '--' },
|
{ label: 'last outcome', value: status.lastOutcome || '--' },
|
||||||
{ label: 'last reason', value: status.lastReason || '--' },
|
{ label: 'last reason', value: status.lastReason || '--' },
|
||||||
{ label: 'last tick', value: lastTickAt },
|
{ label: 'last tick', value: lastTickAt },
|
||||||
|
|||||||
Reference in New Issue
Block a user