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_skill

Requirements index · View definition

evidence Valid

Requirement

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.

Rationale

The tests adequately cover the requirement.

Obligations derived from requirements.cli.requirements_skill:

  1. Habeas bundles a skill named habeas-requirements.
  2. Its description tells agents to use it during design sessions.
  3. Its description tells agents to use it before changing code, tests, or requirement text in a Habeas project.
  4. 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 helper description("habeas-requirements").
  • The helper calls skill_md and skill_files. skill_files pulls in the real bundled asset assets/skills/habeas-requirements/SKILL.md with include_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.toml with source.path = "assets/skills". The directory name habeas-requirements supplies 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]
// {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
:::{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]
/// 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"))
}