requirements.cli.requirements_skill
Requirements index · View definition
Requirement
Habeas MUST bundle a
habeas-requirementsskill whose description tells agents to use it during design sessions and before changing code, tests, or requirement text in a Habeas project, including when the user asks for a feature, bug fix, or other change without mentioning requirements.
Rationale
The tests adequately cover the requirement.
Obligations derived from requirements.cli.requirements_skill:
- Habeas bundles a skill named
habeas-requirements. - Its description tells agents to use it during design sessions.
- Its description tells agents to use it before changing code, tests, or requirement text in a Habeas project.
- Its description says to use it even when the user asks for a feature, bug fix, or other change without mentioning requirements.
How the test covers them:
tests/authoring_cli.rs#fn[the_requirements_skill_is_used_for_design_and_before_any_change]reads the description through the helperdescription("habeas-requirements").- The helper calls
skill_mdandskill_files.skill_filespulls in the real bundled assetassets/skills/habeas-requirements/SKILL.mdwithinclude_str!. The test therefore reads the shipped file, not a fixture. If the file were missing, the test would not compile. - The helper takes the front-matter
description:line and panics if there is none. - The test asserts that the description contains three phrases:
- “Use during design sessions and before changing code, tests, or requirement text in a project that tracks requirements with Habeas”. This covers obligations 2 and 3.
- “even when the user only asks for a feature, bug fix,”. This covers the “without being asked about requirements” case in obligation 4.
- “and never says "requirement"”. This also covers obligation 4.
- The actual description in the asset matches these phrases. It also lists a CLI flag, a test, a dependency bump, and a wording tweak.
- The skill’s bundling is configured in
Cargo.tomlwithsource.path = "assets/skills". The directory namehabeas-requirementssupplies obligation 1, and the test indexes by that name.
Gaps considered: The test does not assert the name: front-matter field. The requirement does not say anything specific about it beyond the skill’s identity, and the asset’s name: is habeas-requirements. I do not treat this as a gap. No {fixme} acknowledgments apply.
Inputs
Tests
Input 2: outline tests/authoring_cli.rs fn[the_requirements_skill_is_used_for_design_and_before_any_change]
- File:
tests/authoring_cli.rs - Selector:
fn[the_requirements_skill_is_used_for_design_and_before_any_change] - Kind:
fn tests/authoring_cli.rs:3801–3812
// {test}`requirements.cli.requirements_skill`
#[test]
fn the_requirements_skill_is_used_for_design_and_before_any_change() {
let description = description("habeas-requirements");
for phrase in [
"Use during design sessions and before changing code, tests, or requirement text in a project that tracks requirements with Habeas",
"even when the user only asks for a feature, bug fix,",
"and never says \"requirement\"",
] {
assert!(description.contains(phrase), "{phrase}");
}
}
Other sources
Input 1: requirements selection requirements.cli.requirements_skill
requirements.cli.requirements_skill:md/requirements/cli.md:122–125
:::{req} requirements_skill
Habeas MUST bundle a `habeas-requirements` skill whose description tells agents to use it during design sessions and before changing code, tests, or requirement text in a Habeas project, including when the user asks for a feature, bug fix, or other change without mentioning requirements.
:::
Input 3: outline tests/authoring_cli.rs fn[description]
- File:
tests/authoring_cli.rs - Selector:
fn[description] - Kind:
fn tests/authoring_cli.rs:2920–2927
/// A bundled skill's front-matter description.
// {cite}`habeas:util`
fn description(name: &str) -> &'static str {
skill_md(name)
.lines()
.find_map(|line| line.strip_prefix("description: "))
.unwrap_or_else(|| panic!("{name} has no description"))
}