Skip to content

[v0.8 Prompts P01] preserve typed system-prompt provenance - #1177

Open
sethkarten wants to merge 20 commits into
mainfrom
v080/prompts
Open

[v0.8 Prompts P01] preserve typed system-prompt provenance#1177
sethkarten wants to merge 20 commits into
mainfrom
v080/prompts

Conversation

@sethkarten

@sethkarten sethkarten commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

P01 — typed system-prompt provenance

Published main-based head: 1a53c7064c8689f39c56da4639be7df1738fbc8e
Base: main; authoritative integrated main parent 47dccfad4c0e71cd357f12d233ac44cc803af8c5.
Ordered parents: prior corrected P01 4043f6b2418c636b0d27844af1f34ae0919bc1e3, then main 47dccfad4c0e71cd357f12d233ac44cc803af8c5.
Incremental scope: exactly nine P01 paths; corrected P01 semantic patch only, with all main-only content preserved.

P01 distinguishes built-in, custom (including present-empty), and unknown prompt provenance; unknown fails closed. Root, rebuild, runtime replacement, and actual child routes are covered. The prior depth-test defect was corrected append-only. Independent Terra review accepted the final main-based tree; neutral focused validation passes 94/94 and root type-check passes.

P02 is the separate child PR #1237 based on v080/prompts and must merge after P01.


Note

Cursor Bugbot is generating a summary for commit 1a53c70. Configure here.

Note

Preserve typed system prompt provenance through session and resource loader assembly

  • Introduces a SystemPromptSource discriminated union (built_in, custom, unknown) in system-prompt.ts to carry authoritative provenance and content through prompt assembly.
  • DefaultResourceLoader in resource-loader.ts gains a getSystemPromptSource() method and tracks provenance when resolving system prompts, including a systemPromptSourceOverride option with malformed-input diagnostics.
  • buildSystemPrompt now routes on provenance: custom preserves content verbatim (plus context/guidelines appendages), built_in uses default RLM assembly, and unknown returns an empty string.
  • AgentSession in agent-session.ts replaces getSystemPrompt() with a source-aware flow, passing systemPromptSource downstream instead of customPrompt.
  • New control-loop and clear-direct-prose guidance blocks are prepended to all default-built RLM prompts in rlm.ts, and IPython guidance gains explicit anti-polling language.
  • Risk: unknown provenance now yields an empty system prompt rather than falling back to built-in defaults, which is a failure-closed behavior change for malformed overrides.

Macroscope summarized 1a53c70.

samsja and others added 8 commits August 10, 2026 14:33
Add an IPYTHON_CONTROL_PROMPT line instructing the agent to never block the
kernel with time.sleep() loops or long sleeps to await slow external work
(background runs, sandboxes, sub-agents, remote jobs). A blocked cell holds
the turn open, wastes wall-clock, and prevents user interaction. The agent
should kick off the work, record its handle/output location, end the turn,
and check results on a later turn.

Update system-prompt.test.ts exact-match block and add a toContain assertion.
@sethkarten

Copy link
Copy Markdown
Contributor Author

v0.8 stack checkpoint — 2026-08-11 15:50 UTC

This draft PR remains the GitHub Prompts stack surface and will be kept current.

  • Parent Core candidate: 41ef592f8474a1d67b25ee6e495df24be3ab804e (feat(coding-agent): finalize v0.8 Core lifecycle and project MCP hardening #1224), exact CI green.
  • Latest independently reviewed local prompt candidate: 839e06651165255e4802215c69ff7a5a49e082b0 (nine exact prompt/test paths).
  • Active next step: semantic reconstruction of that reviewed tree onto Core 41ef, full prompt/resource/system tests, typecheck, nonwriting Biome, fresh review, then append-only/non-force advancement of this PR branch.

The current remote tip is historical until that verified successor lands; this is not a readiness claim.

@sethkarten sethkarten changed the title [v0.8 Prompts 1/2] add nonblocking and plain-language defaults [v0.8 Prompts P01] preserve typed system-prompt provenance Aug 11, 2026
@sethkarten
sethkarten changed the base branch from main to v080/final-core-main-project-mcp-hardened August 11, 2026 16:58
@macroscopeapp

macroscopeapp Bot commented Aug 11, 2026

Copy link
Copy Markdown

Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies.

@sethkarten
sethkarten changed the base branch from v080/final-core-main-project-mcp-hardened to main August 11, 2026 18:11
@sethkarten sethkarten closed this Aug 11, 2026
Comment thread packages/coding-agent/src/core/agent-session.ts
@sethkarten sethkarten reopened this Aug 11, 2026
@sethkarten
sethkarten marked this pull request as ready for review August 11, 2026 18:22
@sethkarten
sethkarten requested review from alexzhang13, skirsten and snimu and removed request for skirsten August 11, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants