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

Requirements index · View definition

evidence Valid

Requirement

The habeas-requirements skill MUST direct agents to write drafts as uncommitted, unstaged edits to the book with no draft marker, adding a new chapter file to SUMMARY.md and recording it with git add -N.

Rationale

The requirement has one obligation with several parts. The habeas-requirements skill must direct agents to do four things:

  • write drafts as uncommitted, unstaged edits;
  • leave out any draft marker;
  • add a new chapter file to SUMMARY.md;
  • record the new chapter with git add -N.

tests/authoring_cli.rs#fn[the_requirements_skill_writes_drafts_as_unstaged_edits_without_markers] covers all four.

  • Step lookup. The test finds the workflow step with step_of("habeas-requirements", "Write drafts") and reads its collapsed text with step. workflow_steps joins the step’s indented continuation lines, so the skill’s wrapped lines are matched as single sentences.
  • Draft assertion. The test asserts that the step contains “Write drafts from the request straight into the chapter as uncommitted, unstaged edits, with no draft marker”. This covers the uncommitted, unstaged and no-marker parts.
  • New-chapter assertion. The test asserts that the step contains “For a new chapter, add it to SUMMARY.md and git add -N it”. This covers both the SUMMARY.md addition and the git add -N step.
  • Assertion strength. assert_text panics with a labelled message if any phrase is missing, so each phrase is enforced.

The skill text in assets/skills/habeas-requirements/SKILL.md (Workflow step 2) matches these phrases, which supports the expected result.

The requirement states a documentation obligation for the skill, so a text-content test is the appropriate check. It has no other modes or boundary cases. No gaps were found.

Inputs

Tests

Input 2: outline tests/authoring_cli.rs fn[the_requirements_skill_writes_drafts_as_unstaged_edits_without_markers]
// {test}`requirements.cli.requirements_review_skill.drafts`
#[test]
fn the_requirements_skill_writes_drafts_as_unstaged_edits_without_markers() {
    assert_text(
        "draft step",
        &step(
            "habeas-requirements",
            step_of("habeas-requirements", "Write drafts"),
        ),
        &[
            "Write drafts from the request straight into the chapter as uncommitted, unstaged edits, with no draft marker",
            "For a new chapter, add it to `SUMMARY.md` and `git add -N` it",
        ],
    );
}

Other sources

Input 1: requirements selection requirements.cli.requirements_review_skill.drafts
:::{req} requirements_review_skill.drafts
The `habeas-requirements` skill MUST direct agents to write drafts as uncommitted, unstaged edits to the book with no draft marker, adding a new chapter file to `SUMMARY.md` and recording it with `git add -N`.
:::