requirements.cli.skill_structure.refer
Requirements index · View definition
Requirement
A skill that needs a topic whose home under
is another skill MUST refer to that skill instead of restating the topic. It MAY summarize the topic in a few lines.
Rationale
Obligations derived from requirements.cli.skill_structure.refer
- A skill that needs a topic homed in another skill MUST refer to that skill.
- It MUST NOT restate the topic instead of referring. That means a skill’s
SKILL.mdandreferences/files must not state another skill’s topic in full. - It MAY summarize the topic in a few lines. A MAY imposes nothing to check.
The cited parent requirements.cli.skill_structure fixes the framing. A skill is its SKILL.md plus its references/ files, and each topic has exactly one home. The homes themselves are checked by the per-skill refining requirements and their the_*_is_home_of_* tests. I did not reassess those.
Test: tests/authoring_cli.rs#fn[bundled_skills_refer_to_a_topic_home_instead_of_restating_it]
Referral obligation.
- For each of the five bundled skills, the test calls
assert_phraseswith a list of cross-reference phrases.assert_phrasesrunsassert_textoverbundled_skill(name), which isSKILL.mdplus the reference files with whitespace collapsed. Each phrase must therefore appear. - The phrases name the home skill and, where relevant, the section or reference file. Examples:
habeas: “the habeas-evidence skill’sreferences/fixme.md”.habeas-requirements: “Uncovered Rust items” in the habeas-evidence skill.habeas-evidence: “Choosing references” in the habeas-requirements skill.habeas-bootstrap-requirements: the habeas skill’sreferences/distributed-requirements.md.habeas-refactor: “following the habeas-evidence skill”.
- Dropping any of these referrals fails the test, so every skill is covered.
Non-restatement obligation.
- For every skill, the test loops over all other skills as homes.
- It asserts that the skill’s collapsed text contains none of
home_markers(home). These are verbatim phrases that state part of that home’s topic in full. - The markers span each home’s topics:
- Routing table and selection syntax for
habeas. - Review gates and the definition of a root for
habeas-requirements. - Judgment outcomes and
## Fixing findingsforhabeas-evidence. ## Proposing requirementsforhabeas-bootstrap-requirements.habeas refactor --dry-runand--mapforhabeas-refactor.
- Routing table and selection syntax for
- Copying one of these into another skill fails with “{name} restates {marker}”.
- Spot-checked markers do occur in their home skills. Examples are
## Fixing findingsin habeas-evidence,## Proposing requirementsin the bootstrap skill, and “Fence a reference to attach commentary” in habeas. The negative check is therefore not vacuous.
Summaries. Nothing in the test forbids a short summary, which fits the MAY.
Residual limitation The non-restatement check is phrase-based. A paraphrased restatement would not be caught. The requirement’s “restating” cannot be checked mechanically in any other way. The markers cover each home’s distinctive topics, and the positive referral assertions check the required behaviour in the other direction. I treat this as adequate, not as a gap.
No acknowledgments apply, and I found no unacknowledged gap.
Inputs
Tests
Input 3: outline tests/authoring_cli.rs fn[bundled_skills_refer_to_a_topic_home_instead_of_restating_it]
- File:
tests/authoring_cli.rs - Selector:
fn[bundled_skills_refer_to_a_topic_home_instead_of_restating_it] - Kind:
fn tests/authoring_cli.rs:3246–3308
// {test}`requirements.cli.skill_structure.refer`
#[test]
fn bundled_skills_refer_to_a_topic_home_instead_of_restating_it() {
for (name, referrals) in [
(
"habeas",
&[
"the habeas-requirements skill says which to use",
"the habeas-evidence skill's `references/fixme.md`",
"(habeas-evidence, \"Rules\")",
][..],
),
(
"habeas-requirements",
&[
"The habeas skill has the directive and reference syntax",
"use `{fixme}` as the habeas-evidence skill's `references/fixme.md` describes",
"follow the habeas-evidence skill to author evidence",
"follow its \"Disagreeing assessments\"",
"\"Uncovered Rust items\" in the habeas-evidence skill",
"is a habeas-refactor task",
][..],
),
(
"habeas-evidence",
&[
"\"What the review checks\" in the habeas-requirements skill",
"\"Choosing references\" in the habeas-requirements skill",
"goes through habeas-requirements steps 3 to 5",
"(habeas-refactor)",
"the habeas skill's `references/distributed-requirements.md`",
][..],
),
(
"habeas-bootstrap-requirements",
&[
"Read the habeas skill for directive syntax, and the habeas-requirements skill",
"through habeas-requirements steps 3 to 5",
"\"Choosing references\" in the habeas-requirements skill",
"the habeas-evidence skill's `references/authoring-failures.md`",
"the habeas skill's `references/distributed-requirements.md`",
"\"Disagreeing assessments\" in the habeas-evidence skill",
][..],
),
(
"habeas-refactor",
&[
"following the habeas-evidence skill",
"under the habeas-requirements skill",
"needs reassessment with habeas-evidence",
][..],
),
] {
assert_phrases(name, referrals);
// No skill restates what another skill is the home of.
let text = bundled_skill(name);
for home in SKILLS.into_iter().filter(|home| *home != name) {
for marker in home_markers(home) {
assert!(!text.contains(marker), "{name} restates {marker:?}");
}
}
}
}
Referenced definitions
Input 2: requirements selection requirements.cli.skill_structure
requirements.cli.skill_structure:md/requirements/cli.md:444–451
:::{req} skill_structure
Habeas's bundled agent skills MUST jointly give the direction that the requirements on them specify. A skill consists of its `SKILL.md` and the files under its `references/` directory. Each topic MUST be stated in full in exactly one skill, its home.
:::
Other sources
Input 1: requirements selection requirements.cli.skill_structure.refer
requirements.cli.skill_structure.refer:md/requirements/cli.md:453–460
:::{req} skill_structure.refer
A skill that needs a topic whose home under {cite}`requirements.cli.skill_structure` is another skill MUST refer to that skill instead of restating the topic. It MAY summarize the topic in a few lines.
:::
Input 4: outline tests/authoring_cli.rs fn[home_markers]
- File:
tests/authoring_cli.rs - Selector:
fn[home_markers] - Kind:
fn tests/authoring_cli.rs:3040–3090
/// Phrases that state part of a topic in full, by the skill that is its home.
// {cite}`habeas:util`
fn home_markers(home: &str) -> &'static [&'static str] {
match home {
"habeas" => &[
"| Task | Skill |",
"A selection is a full name or a glob in which `*` matches any characters",
"Its full name is the chapter path relative to that directory",
"Fence a reference to attach commentary",
"`:::{violations} <name>` selects constructs likely to break it",
"Each site-query match makes a site",
"omit a leading `reqs/` and a trailing `/index` or `/README`",
"silently defines nothing",
"needs a longer outer fence such as `::::{req}`",
"Profiles, reports, and captured source under the Cargo target directory",
"Install prerequisites",
],
"habeas-requirements" => &[
"Write drafts from the request straight into the chapter",
"For each group, start a read-only subagent",
"**Gate:** no implementation or test code",
"A *root* is an item that carries out part of a requirement",
"## What the review checks",
"# Requirement group review",
"**Compound:** a requirement that lists several independent forms",
],
"habeas-evidence" => &[
"A judgment is one of three outcomes",
"`habeas author --all` assesses every definition whose evidence is missing, stale, or invalid",
"## Fixing findings",
"An item has recent coverage when it has its own reference, or when a recent version of an existing evidence record or review read it",
"A FIXME judgment, such as",
"gets a citation review. For project requirements and examples it checks that",
"For built-ins it checks their permitted forms and stated criteria",
"A site the requirement does not apply to is judged true",
"The goal is that independent assessments of the same subject reach the same determination",
"describing the change relative to the prior commit rather than the drafts that led to it",
],
"habeas-bootstrap-requirements" => &[
"every first-party runnable test or test case",
"## Proposing requirements",
"Independent recount:",
],
"habeas-refactor" => &[
"habeas refactor --dry-run",
"`--map 'src/config.rs#fn[load]=src/config/load.rs#fn[load]'`",
"\"Would leave ... unchanged\" lists records a mapping affects that fail a check",
],
_ => panic!("unknown skill {home}"),
}
}
Input 5: outline tests/authoring_cli.rs fn[assert_text]
- File:
tests/authoring_cli.rs - Selector:
fn[assert_text] - Kind:
fn tests/authoring_cli.rs:3011–3016
// {cite}`habeas:util`
fn assert_text(label: &str, text: &str, phrases: &[&str]) {
for phrase in phrases {
assert!(text.contains(phrase), "{label} lacks {phrase:?}");
}
}
Input 6: outline tests/authoring_cli.rs fn[collapse]
- File:
tests/authoring_cli.rs - Selector:
fn[collapse] - Kind:
fn tests/authoring_cli.rs:2887–2891
/// Text with line wrapping collapsed, so phrases can be matched across lines.
// {cite}`habeas:util`
fn collapse(text: &str) -> String {
text.split_whitespace().collect::<Vec<_>>().join(" ")
}
Input 7: outline tests/authoring_cli.rs const[SKILLS]
- File:
tests/authoring_cli.rs - Selector:
const[SKILLS] - Kind:
const tests/authoring_cli.rs:2817–2825
/// The bundled skills, by name.
// {cite}`habeas:util`
const SKILLS: [&str; 5] = [
"habeas",
"habeas-requirements",
"habeas-evidence",
"habeas-bootstrap-requirements",
"habeas-refactor",
];
Input 8: outline tests/authoring_cli.rs fn[bundled_skill]
- File:
tests/authoring_cli.rs - Selector:
fn[bundled_skill] - Kind:
fn tests/authoring_cli.rs:2909–2918
/// A bundled skill: its `SKILL.md` together with its reference files,
/// collapsed.
// {cite}`habeas:util`
fn bundled_skill(name: &str) -> String {
let files = skill_files(name)
.iter()
.map(|(_, text)| *text)
.collect::<Vec<_>>();
collapse(&files.join("\n"))
}
Input 9: outline tests/authoring_cli.rs fn[assert_phrases]
- File:
tests/authoring_cli.rs - Selector:
fn[assert_phrases] - Kind:
fn tests/authoring_cli.rs:3030–3033
// {cite}`habeas:util`
fn assert_phrases(name: &str, phrases: &[&str]) {
assert_text(name, &bundled_skill(name), phrases);
}