requirements.cli.requirements_review_skill.review_prompt.distributed
Requirements index · View definition
Requirement
For a requirement with
{sites}or{violations}queries, the review prompt MUST direct the reviewer to apply the guidance of.
Rationale
The subject has one obligation. For a requirement with {sites} or {violations} queries, the review prompt must direct the reviewer to apply the guidance of requirements.cli.distributed_guidance. That guidance is the bundled skills’ explanation of distributed requirements. It lives in the habeas skill’s references/distributed-requirements.md.
tests/authoring_cli.rs#fn[the_review_prompt_applies_the_distributed_guidance] is marked {test} for the subject. It does three things:
- It loads the review prompt through
review_prompt(), which readsreferences/review-prompt.mdfrom thehabeas-requirementsskill. - It extracts the
## Criteriasection withsection(...), which stops at the next same-level or higher heading outside code fences and collapses whitespace. - It asserts with
assert_textthat the section contains “for a requirement with{sites}or{violations}queries, apply the Do and Don’t lists in the habeas skill’sreferences/distributed-requirements.md”.
I read the prompt source, assets/skills/habeas-requirements/references/review-prompt.md under Criteria. It has a “Distributed:” bullet with that sentence, wrapped across lines. The collapse step normalizes the wrapping, so the assertion matches the wrapped text.
The assertion checks the following:
- It names the trigger condition,
{sites}or{violations}queries. - It contains the directive to apply the guidance.
- It points at the correct guidance file.
- It is scoped to the Criteria section of the review prompt, so a match elsewhere cannot satisfy it.
The test would fail if the directive were removed, moved out of the prompt, or pointed at the wrong file. The requirement has no other modes, boundaries or failure cases. The content of the distributed guidance itself belongs to the cited requirements.cli.distributed_guidance and its own tests, so I did not reassess it. I found no adequacy gap.
Inputs
Tests
Input 3: outline tests/authoring_cli.rs fn[the_review_prompt_applies_the_distributed_guidance]
- File:
tests/authoring_cli.rs - Selector:
fn[the_review_prompt_applies_the_distributed_guidance] - Kind:
fn tests/authoring_cli.rs:4310–4320
// {test}`requirements.cli.requirements_review_skill.review_prompt.distributed`
#[test]
fn the_review_prompt_applies_the_distributed_guidance() {
assert_text(
"criteria",
§ion(review_prompt(), "## Criteria"),
&[
"for a requirement with `{sites}` or `{violations}` queries, apply the Do and Don't lists in the habeas skill's `references/distributed-requirements.md`",
],
);
}
Referenced definitions
Input 2: requirements selection requirements.cli.distributed_guidance
requirements.cli.distributed_guidance:md/requirements/cli.md:376–380
:::{req} distributed_guidance
Habeas's bundled agent skills MUST explain distributed requirements under {cite}`requirements.references.distributed`.
:::
Other sources
Input 1: requirements selection requirements.cli.requirements_review_skill.review_prompt.distributed
requirements.cli.requirements_review_skill.review_prompt.distributed:md/requirements/cli.md:302–305
:::{req} requirements_review_skill.review_prompt.distributed
For a requirement with `{sites}` or `{violations}` queries, the review prompt MUST direct the reviewer to apply the guidance of {cite}`requirements.cli.distributed_guidance`.
:::
Input 4: outline tests/authoring_cli.rs fn[section]
- File:
tests/authoring_cli.rs - Selector:
fn[section] - Kind:
fn tests/authoring_cli.rs:2929–2954
/// The collapsed body of a Markdown section, from the line after `heading` to
/// the next heading of the same or a higher level outside a code fence.
// {cite}`habeas:util`
fn section(raw: &str, heading: &str) -> String {
let level = heading.chars().take_while(|c| *c == '#').count();
let mut lines = raw.lines().skip_while(|line| *line != heading);
assert!(lines.next().is_some(), "no section {heading:?}");
let mut fence: Option<usize> = None;
let mut body = Vec::new();
for line in lines {
let ticks = line.trim_start().chars().take_while(|c| *c == '`').count();
match fence {
Some(open) if ticks >= open && line.trim().chars().all(|c| c == '`') => fence = None,
Some(_) => {}
None if ticks >= 3 => fence = Some(ticks),
None => {
let hashes = line.chars().take_while(|c| *c == '#').count();
if hashes > 0 && hashes <= level && line[hashes..].starts_with(' ') {
break;
}
}
}
body.push(line);
}
collapse(&body.join("\n"))
}
Input 5: outline tests/authoring_cli.rs fn[skill_file]
- File:
tests/authoring_cli.rs - Selector:
fn[skill_file] - Kind:
fn tests/authoring_cli.rs:2899–2907
/// One file of a bundled skill, raw.
// {cite}`habeas:util`
fn skill_file(name: &str, path: &str) -> &'static str {
skill_files(name)
.iter()
.find(|(file, _)| *file == path)
.unwrap_or_else(|| panic!("{name} has no {path}"))
.1
}