Proposal: prompt lineage in the knowledge graph
Record every prompt as a node in the knowledge graph, so a reviewer can trace a commit or plan back to the prompt that produced it.
Proposal, not built. No prompt record exists in the knowledge graph or in .robos/ today.
Proposal
- A
robos:Promptnode type with SHACL validation. Fields named in the spec include the prompt text, system prompt, origin, app, agent session, model, provider, token usage, duration and outcome. - An origin on every prompt, so a reviewer can tell how it started: typed in a RobOS app, run by an autonomous RobOS job, run in a terminal outside RobOS, delegated by another agent, or generated by a benchmark.
- Three capture points: submissions from
<robos-ai-textarea>, agent sessions started by RobOS, and a shell wrapper forclaude,geminiandgh copilotrun in a terminal. - Append-only JSON-LD files under
.robos/prompts/YYYY-MM-DD/, committed to Git. - Edges from a prompt to the plan, task and commit it led to.
- A “Prompt History” view in Dev Central and a replay button that loads an old prompt back into the text area.
All logging would stay local.
What exists today
<robos-ai-textarea>is a shared element inpackages/robos-uiand is used in many app windows.- AI Prompt keeps its last 50 runs (
packages/ai-prompt/main.js). packages/robos-graphdefinesrobos:PromptStrategy,robos:PromptOptimizerandrobos:PromptCompiler. These describe prompting techniques, not individual runs. There is norobos:Prompttype and no.robos/prompts/directory.
Source
Raw note: ideas/inbox/prompt-knowledge-graph-logging.txt. The earlier long spec is in the git history of this file.