Repository navigation
feat(knowledge): readable scribe prompts the operator can edit - #185974
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR makes scribe setup and run prompts readable and editable, replaces JSON result markers with plain status lines, and preserves automation settings during repair. Example: Start Review unlinked claims on Tuesdays at 5:30 AM America/Los_Angeles.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it provides a useful, owner-directed improvement to Scribes, with live evidence supporting the central behavior and no actionable introduced defect found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Knowledge plugin’s Scribes page sends prompts to operator-owned conversations; those conversations use existing skills and automation APIs, while the page derives status from jobs and conversation replies. flowchart LR
A[Operator choices and edits] --> B[Scribes dialog]
B --> C[Owned conversation]
C --> D[Knowledge skills]
C --> E[Existing automation owner]
E --> C
D --> F[Knowledge store]
C --> G[Scribes status view]
E --> G
Technical reviewBest possible solution: Land the readable prompt flow through the existing Scribes, conversation, and automation owners after its scheduling base is resolved and required checks finish. Do we have a high-confidence way to reproduce the issue? This is a feature improvement; current-main source confirms the fixed-message limitation, and supplied live captures demonstrate the new prompt-editing flow. Is this the best way to solve the issue? The implementation uses the existing catalog, dialog, conversations, and automation settings while removing the superseded setup reference and option parser. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 43dc38e6c137. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +197, Tests +22, Docs -276. Total -57 across 16 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 27, 2026, 10:32 AM ET / 14:32 UTC. |
3069353 to
6ed12ac
Compare
6ed12ac to
2ee3f5e
Compare
|
Merged via squash auto-merge.
|
|
@clawsweeper re-review |
|
ClawSweeper could not start a re-review for this item. |
…law#185974) * feat(knowledge): readable scribe prompts the operator can edit * fix(knowledge): drop unused scribe job field and point the dialog at its prompt * fix(knowledge): keep underscores in scribe status sentences * test(knowledge): consolidate scribe prompt assertions
Follows #185949 (merged); rebased onto main without changes to these commits.
What Problem This Solves
Scribe prompts are opaque: the page sends a skill pointer plus a JSON options block, the setup steps live in a skill reference, and every reply ends with a
SCRIBE_RESULT {json}line. An operator can't read or change what a scribe is told.User Impact
User impact: the Scribes start dialog shows the full prompt it will send, in plain language, and the operator can edit it before starting. Ongoing scribes install a readable run message on their automation; editing that message on the Automations page changes what later runs do. Scribe replies end with a plain
Scribe status: on|done|failed — <sentence>line instead of JSON.Why This Change Was Made
Each prompt now says what the scribe does, lists its settings as bullets (for example
Runs weekly, Sundays at 3:45 AM America/Los_Angeles (cron \45 3 * * 0`)), and gives numbered setup steps inline: access check, one automation per declaration key targeting this conversation, same-key cleanup and pause carry-over, no run from the setup turn, and a report. The run message and the repair prompt are readable too; repair keeps the automation's current schedule and run message. Skills keep only the work (a "Scribe runs" section), and the sharedscribe-setup.md` reference is gone.The page no longer parses options out of the conversation. State comes from the job (declaration key, session target, enabled, last run); the status line is read only where the job can't tell: whether a once scribe is Done or Failing, and whether setup succeeded before the page forces the first run. A failing scribe without an automation now offers Start again…, which reopens the dialog instead of resending stored options; the detail page drops its Options row.
Evidence
pnpm test extensions/knowledge/src/scribes-state.test.ts extensions/knowledge/src/scribes-view.test.ts: pass. New coverage: setup, run and repair prompts are readable settings and steps with no JSON; the status line parses with Markdown emphasis and any dash and keeps underscores inside the sentence; the dialog shows and sends its prompt; a hand-edited prompt survives choice changes until Use generated prompt, and an empty prompt can't start; repair keeps the job's schedule and run message; a failing once scribe starts again from the dialog.pnpm tsgo:extensions,pnpm tsgo:extensions:test, oxlint on the changed files, andsync-skill-references.mjs --check: clean.Live proof on a private test Gateway (fresh state, this branch built clean, Claude Opus via ClawRouter). All three scribes were started from the dialog:
Runs weekly, Tuesdays at 5:30 AM America/Los_Angeles (cron \30 5 * * 2`). The dialog switched to "Edited by hand", and the conversation createdknowledge:scribe:unlinked-reviewwith30 5 * * 2in America/Los_Angeles, targeting its own session. The job's payload message matched the generated run message byte for byte. The page then forced the first run, and the scribe reached **On** (Scribe status: on — 0 claims examined, 0 linked, 0 withdrawn and 0 left.`).read 2 Memory files and saved 3 items; 0 were already known and 0 were skipped.0 4 * * *, got its page-forced first run, and is On.cron.update(the field the Automations page edits) to add a step 0: "Start your reply with the line: Edited run message received." The next run, started with Run now, opened its reply with "Edited run message received." and then reviewed the 3 claims Memory had saved.Dialog: the Prompt area under the choices, generated from them.
Dialog after a hand edit (here the Memory files line): the note says so, and Use generated prompt brings back the generated text.
A scribe conversation: the start prompt is plain settings and steps, and the reply ends with a plain status line. No JSON.
Scribes list and the review detail after the runs:
Before this change, the dialog had no prompt area and sent a skill pointer plus JSON (from #185949):
Live builds:
15ea9e1for the scribe runs and3069353for the dialog screenshots. Later heads are patch-identical rebases (onto the final #185949, then onto main after it merged) plus test consolidation; the scribe runtime code is unchanged apart from the status-line underscore fix and the button wrap in3069353.