requirements.cli.requirements_review_skill.drafts
Requirements index · View definition
Requirement
The
habeas-requirementsskill MUST direct agents to write drafts as uncommitted, unstaged edits to the book with no draft marker, adding a new chapter file toSUMMARY.mdand recording it withgit 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 withstep.workflow_stepsjoins 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.mdandgit add -Nit”. This covers both theSUMMARY.mdaddition and thegit add -Nstep. - Assertion strength.
assert_textpanics 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]
- File:
tests/authoring_cli.rs - Selector:
fn[the_requirements_skill_writes_drafts_as_unstaged_edits_without_markers] - Kind:
fn tests/authoring_cli.rs:3875–3889
// {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
requirements.cli.requirements_review_skill.drafts:md/requirements/cli.md:132–135
:::{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`.
:::