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.drafts.foreign_edits

Requirements index · View definition

evidence Valid

Requirement

Before drafting, the habeas-requirements skill MUST direct agents to ask the user whether uncommitted edits to the book that the agent did not make in the current task belong to the task.

Rationale

The requirement has two obligations. The habeas-requirements skill must direct agents to ask the user whether uncommitted edits they did not make belong to the task. That direction must come before drafting.

tests/authoring_cli.rs#fn[the_requirements_skill_asks_about_foreign_edits_before_drafting] covers both:

  • It uses step_of to find the numbered Workflow step containing “If it has uncommitted edits you did not make in this task, ask the user whether they belong to it”. That phrase covers the foreign-edits condition, the “did not make in this task” scoping, and the instruction to ask the user. workflow_steps collapses wrapped lines, so the phrase matches the multi-line text in assets/skills/habeas-requirements/SKILL.md (Workflow, step 1).
  • It asserts that this step also contains “Run git status on the book’s source directory”. That ties the question to uncommitted edits in the book.
  • It asserts ask < step_of(SKILL, "Write drafts"). The “Write drafts” phrase appears in step 2, “Draft”, so the question comes before drafting.

I did not read step_of’s body. I assume it panics when the phrase is absent, so a missing instruction would fail the test.

The helpers step, step_of and workflow_steps are reached from the marked test, so they need no reference of their own. A reworded or removed instruction, or one moved after the drafting step, would make the test fail. I found no untested obligation or missing scenario.

Inputs

Tests

Input 2: outline tests/authoring_cli.rs fn[the_requirements_skill_asks_about_foreign_edits_before_drafting]
// {test}`requirements.cli.requirements_review_skill.drafts.foreign_edits`
#[test]
fn the_requirements_skill_asks_about_foreign_edits_before_drafting() {
    const SKILL: &str = "habeas-requirements";
    let ask = step_of(
        SKILL,
        "If it has uncommitted edits you did not make in this task, ask the user whether they belong to it",
    );
    assert!(step(SKILL, ask).contains("Run `git status` on the book's source directory"));
    assert!(ask < step_of(SKILL, "Write drafts"));
}

Other sources

Input 1: requirements selection requirements.cli.requirements_review_skill.drafts.foreign_edits
:::{req} requirements_review_skill.drafts.foreign_edits
Before drafting, the `habeas-requirements` skill MUST direct agents to ask the user whether uncommitted edits to the book that the agent did not make in the current task belong to the task.
:::