requirements.cli.requirements_review_skill.commit.revert
Requirements index · View definition
Requirement
Before that commit, the
habeas-requirementsskill 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-requirementsthat contains “all groups together”. That is the commit step, step 5 inassets/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_orderto 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”
- “Revert drafts the user rejected or deferred (
- 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_orderpanics when a phrase is not found after the previous one, andsteppanics 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]
- File:
tests/authoring_cli.rs - Selector:
fn[the_requirements_skill_reverts_rejected_and_deferred_drafts_before_committing] - Kind:
fn tests/authoring_cli.rs:4076–4090
// {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
requirements.cli.requirements_review_skill.commit.revert:md/requirements/cli.md:207–210
:::{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.
:::