requirements.cli.requirements_review_skill.no_change
Requirements index · View definition
Requirement
The
habeas-requirementsskill MUST direct agents, when a change adds, alters, or removes no end-user-observable behavior, to tell the user that no requirement is needed, and when an existing requirement already specifies the behavior the change produces, to tell the user which requirement covers it; in either case it MUST direct them to proceed to implementation without drafting.
Rationale
The tests adequately check the requirement.
Obligations derived from requirements.cli.requirements_review_skill.no_change. The habeas-requirements skill must direct agents as follows:
- When a change adds, alters, or removes no end-user-observable behavior, tell the user that no requirement is needed.
- When an existing requirement already specifies the behavior, tell the user which requirement covers it.
- In both cases, proceed to implementation without drafting.
Test. tests/authoring_cli.rs#fn[the_requirements_skill_skips_drafting_when_no_requirement_changes] is marked {test} for the subject. It takes step 1 of the skill’s Workflow with the helper step. That helper uses workflow_steps, which parses the real assets/skills/habeas-requirements/SKILL.md and collapses whitespace across continuation lines. The test then uses assert_text to require two phrases in step 1:
- “If the change adds, alters, or removes no observable behavior”. This covers the no-behavior-change trigger.
- “or an existing requirement already specifies it (most bug fixes), tell the user which requirement covers it, or that none is needed, and go to step 6”. This covers the already-specified trigger, both messages to the user (“which requirement covers it” and “none is needed”), and the instruction to go to step 6.
assert_text uses text.contains and fails if a phrase is missing. The test also asserts step_of(SKILL, "Implement and test") == 6, so “go to step 6” really points at implementation. Steps 2–5 are the drafting and review steps, so jumping to step 6 skips drafting. This matches the SKILL.md workflow, where step 2 is “Draft” and step 6 is “Implement and test”.
Remaining considerations. The skill text says “observable behavior” where the requirement says “end-user-observable”. The test pins the skill’s actual wording, so this is a wording choice and not a testing gap. The requirement states no further distinct modes, boundaries, or failure cases. Each obligation is mapped to an assertion that would fail if the skill text were removed or reworded, or if step 6 stopped being the implementation step.
Inputs
Tests
Input 2: outline tests/authoring_cli.rs fn[the_requirements_skill_skips_drafting_when_no_requirement_changes]
- File:
tests/authoring_cli.rs - Selector:
fn[the_requirements_skill_skips_drafting_when_no_requirement_changes] - Kind:
fn tests/authoring_cli.rs:3860–3873
// {test}`requirements.cli.requirements_review_skill.no_change`
#[test]
fn the_requirements_skill_skips_drafting_when_no_requirement_changes() {
const SKILL: &str = "habeas-requirements";
assert_text(
"step 1",
&step(SKILL, 1),
&[
"If the change adds, alters, or removes no observable behavior",
"or an existing requirement already specifies it (most bug fixes), tell the user which requirement covers it, or that none is needed, and go to step 6",
],
);
assert_eq!(step_of(SKILL, "Implement and test"), 6);
}
Other sources
Input 1: requirements selection requirements.cli.requirements_review_skill.no_change
requirements.cli.requirements_review_skill.no_change:md/requirements/cli.md:127–130
:::{req} requirements_review_skill.no_change
The `habeas-requirements` skill MUST direct agents, when a change adds, alters, or removes no end-user-observable behavior, to tell the user that no requirement is needed, and when an existing requirement already specifies the behavior the change produces, to tell the user which requirement covers it; in either case it MUST direct them to proceed to implementation without drafting.
:::
Input 3: outline tests/authoring_cli.rs fn[workflow_steps]
- File:
tests/authoring_cli.rs - Selector:
fn[workflow_steps] - Kind:
fn tests/authoring_cli.rs:2956–2989
/// The numbered steps of a bundled skill's "Workflow" section, each with its
/// number and collapsed text, including its indented continuation lines.
// {cite}`habeas:util`
fn workflow_steps(name: &str) -> Vec<(u32, String)> {
let (_, rest) = skill_md(name)
.split_once("\n## Workflow\n")
.unwrap_or_else(|| panic!("{name} has no workflow"));
let mut steps: Vec<(u32, Vec<&str>)> = Vec::new();
let mut open = false;
for line in rest.lines() {
if line.starts_with("## ") {
break;
}
let numbered = line
.strip_prefix("- [ ] ")
.and_then(|step| step.split_once(". "))
.and_then(|(number, text)| Some((number.parse().ok()?, text)));
if let Some((number, text)) = numbered {
steps.push((number, vec![text]));
open = true;
continue;
}
if !line.is_empty() && !line.starts_with(' ') {
open = false;
}
if open {
steps.last_mut().unwrap().1.push(line);
}
}
steps
.into_iter()
.map(|(number, lines)| (number, collapse(&lines.join("\n"))))
.collect()
}