Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

requirements.cli.requirements_review_skill.review_prompt.examples

Requirements index · View definition

evidence Valid

Requirement

The review prompt MUST include at least one worked example of a mechanical change and at least one worked example of a design question. The mechanical example MUST show a flawed draft together with the change the reviewer makes to it.

Rationale

The requirement has two obligations. The review prompt must include at least one worked mechanical example, and that example must show a flawed draft together with the change the reviewer makes. It must also include at least one worked design-question example.

tests/authoring_cli.rs#fn[the_review_prompt_works_a_mechanical_example_and_a_design_question] covers both. It takes the ## Examples section of the prompt file assets/skills/habeas-requirements/references/review-prompt.md. The section helper stops at the next heading outside a code fence. The test then calls assert_text_in_order on that section, which requires each phrase to appear after the previous one.

  • Mechanical example:
    • The phrase Compound, with a mechanical fix: marks the example.
    • The phrase > The \refactor` command MUST` marks the flawed draft, which is a blockquoted compound requirement.
    • The phrase Split into marks the reviewer’s change.
    • The phrase Not a question marks the mechanical classification.
    • The actual prompt text has all of these in that order.
  • Design question: The ordered phrases A design question:, Options: and Recommend come after the mechanical example. The prompt’s second example has a blockquoted problem, options (a) to (c), and a recommendation.

Because the check is ordered and scoped to the ## Examples section, the draft and its fix must both be present. The flawed draft must come before the fix. The design example must come after the mechanical one. If the examples were removed, or the draft or fix were dropped, the test would fail. A section that only mentioned the words elsewhere in the prompt would not satisfy it.

The test is phrase-based, so it cannot judge whether the draft is truly flawed. The requirement does not ask for that. It asks only that a draft and a change be shown. I found no gap.

Inputs

Implementation

Input 3: outline assets/skills/habeas-requirements/references/review-prompt.md section[Requirement%20group%20review]/section[Examples]
## Examples

Compound, with a mechanical fix:

> The `refactor` command MUST accept file, node, and definition mappings, MUST
> reject overlapping mappings, and MUST rewrite references and anchors. It MUST
> also update evidence rationales.

Split into `mappings.file`, `mappings.node`, `mappings.definition`,
`mappings.overlap`, `rewrite.references`, and `rewrite.rationale`. Not a
question.

Not questions, just change them: "Should 'shall' be 'MUST'?"; "Consider
calling 'the tool' `habeas refactor`."

A design question:

> After the split, `rewrite.rationale` says rationales are updated, but not what
> happens to a path mentioned inside rationale prose. Options: (a) rewrite it;
> (b) leave it and list it for the user; (c) make the record stale. Recommend
> (b): rewriting prose could change meaning the assessment did not produce.

Tests

Input 2: outline tests/authoring_cli.rs fn[the_review_prompt_works_a_mechanical_example_and_a_design_question]
// {test}`requirements.cli.requirements_review_skill.review_prompt.examples`
#[test]
fn the_review_prompt_works_a_mechanical_example_and_a_design_question() {
    assert_text_in_order(
        "examples",
        &section(review_prompt(), "## Examples"),
        &[
            "Compound, with a mechanical fix:",
            "> The `refactor` command MUST",
            "Split into",
            "Not a question",
            "A design question:",
            "Options:",
            "Recommend",
        ],
    );
}

Other sources

Input 1: requirements selection requirements.cli.requirements_review_skill.review_prompt.examples
:::{req} requirements_review_skill.review_prompt.examples
The review prompt MUST include at least one worked example of a mechanical change and at least one worked example of a design question. The mechanical example MUST show a flawed draft together with the change the reviewer makes to it.
:::