mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -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.
|
||||
- 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.
|
||||
- If chat directly addresses or clearly talks about the Overseer/bot, respond with one line instead of SKIP.
|
||||
|
||||
Hard skip rules:
|
||||
- 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 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."
|
||||
- If the line does not contain a concrete anchor from current context (person, rover, or event), output SKIP.
|
||||
|
||||
Quiet-period policy:
|
||||
- If active drivers are 0 and chat is quiet, strongly prefer SKIP.
|
||||
- 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.
|
||||
- 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:
|
||||
- Use timeline context for narrative flow.
|
||||
@@ -52,6 +55,14 @@ Repetition policy:
|
||||
- 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 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 fields are internal context only.
|
||||
@@ -62,3 +73,4 @@ Style:
|
||||
- Slightly ominous, atmospheric, playful.
|
||||
- Natural commentary, not a dry status report.
|
||||
- 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-title" content="Multi Roomba Rover" />
|
||||
<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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -37,6 +37,8 @@ let timer = null;
|
||||
let inFlight = false;
|
||||
let tickCount = 0;
|
||||
let skipStreak = 0;
|
||||
let generationCount = 0;
|
||||
let generationTotalMs = 0;
|
||||
let contextResetAt = Date.now();
|
||||
let clearCount = 0;
|
||||
const roverActivity = new Map(); // roverId -> { buckets: Map(bucketTs -> { distanceMm, turnDeg, bumps }), bumpLeftActive, bumpRightActive }
|
||||
@@ -75,6 +77,9 @@ let status = {
|
||||
lastClearedAt: contextResetAt,
|
||||
clearCount,
|
||||
skipStreak: 0,
|
||||
lastGenerationMs: null,
|
||||
avgGenerationMs: null,
|
||||
generationCount: 0,
|
||||
lastGeneratedText: null,
|
||||
lastPostedText: null,
|
||||
lastPostedAt: null,
|
||||
@@ -182,12 +187,17 @@ function clearRuntimeHistory() {
|
||||
contextResetAt = Date.now();
|
||||
clearCount += 1;
|
||||
skipStreak = 0;
|
||||
generationCount = 0;
|
||||
generationTotalMs = 0;
|
||||
roverActivity.clear();
|
||||
lastRoverStateById.clear();
|
||||
updateStatus({
|
||||
lastClearedAt: contextResetAt,
|
||||
clearCount,
|
||||
skipStreak,
|
||||
lastGenerationMs: null,
|
||||
avgGenerationMs: null,
|
||||
generationCount,
|
||||
lastInfoSnapshot: null,
|
||||
lastModelMessages: null,
|
||||
lastModelRawOutput: null,
|
||||
@@ -623,9 +633,17 @@ async function runTick() {
|
||||
lastInfoSnapshot: snapshot,
|
||||
});
|
||||
const systemPrompt = await readSystemPrompt();
|
||||
const generationStartMs = Date.now();
|
||||
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({
|
||||
lastModelRawOutput: modelResult?.raw || '',
|
||||
lastGenerationMs: generationMs,
|
||||
avgGenerationMs,
|
||||
generationCount,
|
||||
});
|
||||
const text = modelResult?.normalized;
|
||||
if (!text) {
|
||||
|
||||
@@ -296,6 +296,9 @@ function LlmCommentaryPanel({ status, onClearHistory, clearingHistory }) {
|
||||
{ label: 'frequency', value: `${status.frequencyMs} ms` },
|
||||
{ label: 'tick count', value: status.tickCount ?? 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 reason', value: status.lastReason || '--' },
|
||||
{ label: 'last tick', value: lastTickAt },
|
||||
|
||||
Reference in New Issue
Block a user