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.commit.revert

Requirements index · View definition

evidence Valid

Requirement

Before that commit, the habeas-requirements skill MUST direct agents to revert the drafts the user rejected or deferred and to list them in their report.

Rationale

The requirement has two obligations. The habeas-requirements skill must direct agents to revert the drafts the user rejected or deferred. It must also direct them to list those drafts in their report. Both must come before the commit.

tests/authoring_cli.rs#fn[the_requirements_skill_reverts_rejected_and_deferred_drafts_before_committing] covers both.

  • It finds the workflow step of habeas-requirements that contains “all groups together”. That is the commit step, step 5 in assets/skills/habeas-requirements/SKILL.md, “Commit. Revert drafts the user rejected or deferred (git restore -p) and list them in your report…”.
  • It then uses assert_text_in_order to require two phrases in that step, in this order:
    • “Revert drafts the user rejected or deferred (git restore -p) and list them in your report”
    • “then commit it”
  • The first phrase covers reverting the rejected or deferred drafts and listing them in the report. Putting it before “then commit it” covers the “before that commit” ordering.
  • If the phrases were missing, reordered, or moved out of the commit step, the test would fail. assert_text_in_order panics when a phrase is not found after the previous one, and step panics when the step number does not exist.

I did not read the bodies of workflow_steps or step_of. I relied on the workflow_steps snippets that the search output showed and on the matching text in SKILL.md, so I judge the test’s check to be sound.

No gaps found, and no {fixme} acknowledgments apply.

Inputs

Tests

Input 2: outline tests/authoring_cli.rs fn[the_requirements_skill_reverts_rejected_and_deferred_drafts_before_committing]
// {test}`requirements.cli.requirements_review_skill.commit.revert`
#[test]
fn the_requirements_skill_reverts_rejected_and_deferred_drafts_before_committing() {
    assert_text_in_order(
        "commit step",
        &step(
            "habeas-requirements",
            step_of("habeas-requirements", "all groups together"),
        ),
        &[
            "Revert drafts the user rejected or deferred (`git restore -p`) and list them in your report",
            "then commit it",
        ],
    );
}

Other sources

Input 1: requirements selection requirements.cli.requirements_review_skill.commit.revert
:::{req} requirements_review_skill.commit.revert
Before that commit, the `habeas-requirements` skill MUST direct agents to revert the drafts the user rejected or deferred and to list them in their report.
:::