docs(prompts): extract all in-repo system prompts into docs/prompts#5299
Open
qiaone wants to merge 1 commit into
Open
docs(prompts): extract all in-repo system prompts into docs/prompts#5299qiaone wants to merge 1 commit into
qiaone wants to merge 1 commit into
Conversation
Collect every LLM-facing system / instruction prompt embedded in the Reasonix source tree into a self-contained reference under docs/prompts. Each file documents the source (file + symbol), purpose, trigger condition, and verbatim text of the prompt. Coverage: 01 default system prompt (DefaultSystemPrompt) 02 global policies (UserDecisionPolicy, LanguagePolicy, ReasoningLanguageBlock) 03 plan mode (marker, auto-plan classifier, planApprovedMessage) 04 goal mode and autoresearch (activeGoalBlock, autoResearchGoalInstructions, goalContinueTurn, goalSelfCheckTurn) 05 coordinator handoff (DefaultPlannerPrompt, formatHandoff, executor handoff retry) 06 task subagents (DefaultTaskSystemPrompt, DefaultReadOnlyTaskSystemPrompt) 07 builtin skills (explore, research, review, security-review, test, init, install-capability) 08 compaction (summarySystemPrompt) 09 retry and recovery (streamRecoveryMessage, emptyFinalRetryMessage, finalReadinessRetryMessage) 10 token economy (tokenEconomyPrompt) 11 server and utility (titlePrompt, conductor, prometheusPrompt) 12 custom commands (.reasonix/commands/*.md user templates) 13 output styles (explanatory, learning, concise, KeepCoding behavior) Pure documentation; no production code is touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
docs/prompts/corpus that captures every LLM-facing system / instruction prompt living inside the Reasonix repository today, organised into 14 focused chapters with a top-level index.The goal is to give contributors and reviewers a single place to:
Nothing executable is touched — this is documentation only.
What's inside
docs/prompts/README.md01-default-system-prompt.mdDefaultSystemPrompt02-policies.mdUserDecisionPolicy,LanguagePolicy,ReasoningLanguageBlock03-plan-mode.mdplanApprovedMessage04-goal-mode-and-autoresearch.mdactiveGoalBlock,autoResearchGoalInstructions,goalContinueTurn,goalSelfCheckTurn, transient compose-time blocks05-coordinator-handoff.mdDefaultPlannerPrompt,formatHandoff, executor-handoff retry06-task-subagents.mdDefaultTaskSystemPrompt,DefaultReadOnlyTaskSystemPrompt,subagentToolBoundarySummary07-builtin-skills.mdexplore/research/review/security-review/test/init/install-capability08-compaction.mdsummarySystemPromptand the three wrap-text variants09-retry-and-recovery.mdstreamRecoveryMessage,emptyFinalRetryMessage,finalReadinessRetryMessage,executorHandoffRetryMessage+ the keyword tables that gate them10-token-economy.mdtokenEconomyPrompt11-server-and-utility.mdtitlePrompt,prometheusPrompt, conductor template, e2e/benchmark prompts12-custom-commands.md.reasonix/commands/*.mduser-level slash templates13-output-styles.mdexplanatory/learning/conciseandKeepCodingoverlayEach chapter follows the same template: source file + symbol → role → injection trigger → verbatim original text → Chinese translation → design notes / cross-refs.
How this was produced
Every string was lifted directly from the Go source (
internal/agent/agent.go,internal/config/config.go,internal/skill/builtins.go,internal/agent/task.go,internal/agent/compact.go,internal/control/*.go,internal/outputstyle/outputstyle.go,internal/serve/serve.go, ...) — never paraphrased. Where a prompt is assembled at runtime (e.g. the/plan-execconductor template,formatHandoff), the doc shows the actualstrings.Builderskeleton with the same\n\nseparators.Why this is worth landing
internal/agent,internal/config,internal/skill,internal/control,internal/outputstyle, etc. The index makes the surface area auditable in one read.DefaultReadOnlyTaskSystemPromptis the very first message of a read-only subagent transcript, how transient<memory-update>/Referenced context:blocks are stripped before they reach the persisted prefix). This complementsREASONIX.md § Cache-impact PR metadataandscripts/check-cache-impact.sh./command, or an MCP integration that respects the existing prompt contract can now read one document instead of reverse-engineering the agent loop.What this PR does not do
internal/**source file is modified.Verification
git diff --name-only upstream/main-v2...HEAD— every entry is underdocs/prompts/.bash scripts/check-cache-impact.shagainst the changed file list printsNo cache-sensitive prompt/tool files changed.and exits 0 (none of the documented chapters touch any path in the script'scache_sensitiveallow-list).go build ./...andgo test ./...are unaffected by this change set.Cache metadata (per
CONTRIBUTING.md § Cache-first review gate)Even though the cache-impact script auto-passes for docs-only diffs, I'm filling these in explicitly so reviewers don't have to double-check:
Cache-impact: none — documentation-only change under
docs/prompts/; no Go source, no system-prompt construction, no tool schema, no provider serialization, and no compaction code is modified. The model-visible byte stream is byte-identical before and after this PR.Cache-guard: not applicable —
scripts/check-cache-impact.shexits 0 withNo cache-sensitive prompt/tool files changed.for the file list in this PR; existingscripts/cache-guard.shrelease-level coverage is unchanged.System-prompt-review: none required — no file under
internal/agent/task.go,internal/boot/,internal/config/,internal/memory/,internal/outputstyle/, orinternal/skill/is modified; the documentation only quotes existing constants verbatim.Follow-ups I'm happy to do in separate PRs
scripts/check-prompt-doc-drift.shthat re-greps the documented constants and fails CI if a quote drifts from the source.Thanks for considering — happy to split, restructure, or shrink the corpus per reviewer preference.