feat: distinguish premise and policy in prompt construction#45
Merged
Conversation
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
Strengthens the generic prompt-construction writing-assistant example by showing premise and policy as distinct authoritative state roles.
The example now uses premise for factual document context, such as:
set premise draft is a board update summarizing quarterly resultschange premise to draft is an internal engineering handoff for a sev-1 incidentIt keeps
use concise_styleas the policy contrast.The observable behavior remains provider-free and deterministic: the host builds different system prompts based on authoritative state. Premise changes document-context guidance, while policy changes explicit writing constraints.
Why
Most existing examples visibly emphasize policy-style state such as
useandprohibit.This change gives prompt construction a clearer premise-based example:
authoritative fact -> host-derived prompt constructionThat helps show Context Compiler state is not only allow/deny policy. Premise represents factual context that changes how host request construction is derived.
Example metadata
Checklist
Notes
Validation performed:
uv run --no-sync pytest python/tests/test_prompt_construction_writing_assistant.py./scripts/validate_python.shcd typescript/examples/prompt_construction/writing_assistant && npm testcd typescript/examples/prompt_construction/writing_assistant && npm run typecheckcd typescript/examples/prompt_construction/writing_assistant && npm run build./scripts/validate_typescript_fast.shnpx --yes markdownlint-cli2 python/examples/prompt_construction/writing_assistant/README.md typescript/examples/prompt_construction/writing_assistant/README.md python/examples/prompt_construction/README.md typescript/examples/prompt_construction/README.mdAll validation passed.