Package the canonical PQRST prompt faithfully
examples/pqrst-estimate was not the canonical PQRST prompt. The canonical one is ~/pqrst-practice/PqrstPrompt.md, normatively specified in spec/PqrstEstimationPractice.md, and hall-of-helix CLOSING.md requires pasting that block unmodified. Ours was a paraphrase with a different output shape — no Confidence, no Signature, no Dominant factors — and CANP-WP-0002-T03 made it worse by prepending a house_style inclusion to a prompt whose governing document says do not modify it. A copied prompt that silently forked its source is the exact failure INTENT.md opens with, sitting in this repo's own examples directory. The template is now the canonical block extracted programmatically rather than retyped, and the default render is byte-identical to it: 2886 bytes both ways. The source documents two optional add-ons appended after the block. CPF has no conditionals, so they are not a flag: `add_ons` is an input defaulting to the empty string, and each sanctioned add-on is an example fixture. This is worth noting as evidence about section 23's deferred "richer template syntax" — the workaround is adequate here, but it is a workaround. evals/canonical-fidelity.yaml guards the property with sixteen render checks, including not_contains checks naming the paraphrase this package used to be, so the drift cannot silently recur. Version 0.2.1 -> 1.0.0: changed inputs and a materially different intended output is the MAJOR case in section 17. Section 22's worked example and the house-style README both claimed pqrst-estimate composes the style fragment. It no longer does, by design, so both are corrected; composition is illustrated in section 10.4 instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bjefh8NUiEiahN4JLwoSKM Assistant: claude-code Assistant-Model: opus Assistant-Process: 388925@bnt-lap001 Assistant-Session: 3507023f-e0fd-4a1e-9d90-a0d4217d1502
This commit is contained in:
parent
55b8600946
commit
f55ef13c75
8 changed files with 144 additions and 151 deletions
|
|
@ -1153,7 +1153,9 @@ These semantics are illustrative, not mandatory for other implementations.
|
|||
## 22. Worked example
|
||||
|
||||
This is `examples/pqrst-estimate` in the `canned-prompts` repository, abridged.
|
||||
It composes a shared style fragment, so it also demonstrates § 10.4.
|
||||
It packages a prompt whose governing document requires it be used *unmodified*,
|
||||
so the package's job is fidelity: the default render must equal the source
|
||||
byte for byte, and an eval enforces that.
|
||||
|
||||
`prompt.yaml`:
|
||||
|
||||
|
|
@ -1161,66 +1163,43 @@ It composes a shared style fragment, so it also demonstrates § 10.4.
|
|||
format: canned-prompt/v0.2
|
||||
id: practice/pqrst-estimate
|
||||
name: PQRST Estimate
|
||||
version: 0.2.1
|
||||
summary: Estimate how session effort was distributed across PQRST categories.
|
||||
version: 1.0.0
|
||||
summary: The canonical end-of-session PQRST effort audit.
|
||||
template: prompt.md
|
||||
|
||||
dependencies:
|
||||
prompts:
|
||||
- id: practice/house-style
|
||||
version: ">= 0.1.0"
|
||||
requirement: required
|
||||
|
||||
inputs:
|
||||
- name: house_style
|
||||
- name: add_ons
|
||||
type: content
|
||||
required: false
|
||||
default:
|
||||
include: practice/house-style
|
||||
|
||||
- name: session_summary
|
||||
type: content
|
||||
required: true
|
||||
|
||||
parameters:
|
||||
include_rationale:
|
||||
type: boolean
|
||||
default: true
|
||||
description: Optional text appended after the canonical block.
|
||||
default: ''
|
||||
|
||||
output:
|
||||
format: markdown
|
||||
|
||||
compatibility:
|
||||
capabilities: [long-context]
|
||||
format: text
|
||||
description: A PQRST-Estimate record.
|
||||
|
||||
license: MIT
|
||||
|
||||
examples: [examples/basic.yaml]
|
||||
evals: [evals/quality.yaml]
|
||||
examples: [examples/basic.yaml, examples/with-rationale.yaml]
|
||||
evals: [evals/canonical-fidelity.yaml]
|
||||
|
||||
tags: [retrospective, agentic-coding, pqrst]
|
||||
tags: [pqrst, retrospective, agentic-coding]
|
||||
|
||||
provenance:
|
||||
author: pqrst-practice
|
||||
source: ~/pqrst-practice/PqrstPrompt.md
|
||||
```
|
||||
|
||||
`prompt.md`:
|
||||
The source prompt documents two optional add-ons appended after the main block.
|
||||
CPF has no conditionals (§ 5), so they are not expressed as a flag: `add_ons` is
|
||||
an input whose default is the empty string, and each sanctioned add-on is an
|
||||
example fixture. The default render is therefore the source prompt exactly, and
|
||||
`examples/with-rationale.yaml` supplies one add-on when a reader wants it.
|
||||
|
||||
```markdown
|
||||
{{ house_style }}
|
||||
|
||||
Review the following coding-session summary and estimate the distribution of
|
||||
session effort across PQRST. Percentages must sum to 100%.
|
||||
|
||||
P = main problem
|
||||
Q = quality and tests
|
||||
R = research and context clarification
|
||||
S = security and credentials
|
||||
T = task organization
|
||||
|
||||
Session:
|
||||
|
||||
{{ session_summary }}
|
||||
|
||||
Include rationale: {{ include_rationale }}
|
||||
```
|
||||
`evals/canonical-fidelity.yaml` guards that property — `resolves_all`, the
|
||||
canonical dimension names and rules, and `not_contains` checks naming the
|
||||
paraphrase this package once was (§ 12.1). Composition is illustrated separately
|
||||
in § 10.4.
|
||||
|
||||
## 23. Open questions
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue