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.bootstrap_skill.review

Requirements index · View definition

evidence Valid

Requirement

The habeas-bootstrap-requirements skill MUST direct agents to take the requirements they infer from existing code, and the changes they propose to existing requirement text, through the review and agreement of cite requirements.cli.requirements_review_skill before committing them or tagging code against them. It MUST state that a general request to bootstrap is not agreement to specific text, and MUST direct agents to keep requirements the user rejects or defers on the gap list of cite requirements.cli.bootstrap_skill. Each area’s agreed requirements MUST be committed together before that area’s code is tagged.

Rationale

The one marked test is tests/authoring_cli.rs#fn[bootstrap_skill_reviews_inferred_requirements_before_committing_or_tagging]. It reads the bundled assets/skills/habeas-bootstrap-requirements/SKILL.md, and it covers every obligation in requirements.cli.bootstrap_skill.review.

  • Inferred requirements and changes to existing text go through review and agreement before committing or tagging.
    • The test finds the workflow steps containing “Propose requirements for the area”, “Review, agree, and commit them through habeas-requirements steps 3 to 5”, and “Tag the area’s tests and root items”. It asserts propose < review && review < tag.
    • It asserts that the propose step contains “proposing any changes to their text”, which covers changes to existing requirement text.
    • It asserts the review step contains “don’t commit a requirement or tag code against it until the user agrees to its text”, which is the gate before committing or tagging.
    • It asserts the skill says “every requirement starts as a proposal”.
    • The step helpers (step_of, step, workflow_steps) parse the numbered workflow steps and collapse whitespace. The multi-line phrases therefore match, and a missing or reordered step fails the test.
  • A general request to bootstrap is not agreement to specific text. The review step is asserted to contain the phrase “a general request to bootstrap is not agreement to specific text”.
  • Rejected or deferred requirements stay on the gap list. The review step is asserted to contain “Remove drafts the user rejects, defers, or has not decided from the chapter, and keep them on the gap list”.
  • Each area’s agreed requirements are committed together before that area’s code is tagged.
    • The test asserts the Workflow section says “Repeat steps {propose} to 7 for each area”. That makes propose, review and commit, and tag a per-area loop, with commit at step 5 before tagging at step 6.
    • It asserts the habeas-requirements skill, which the review step delegates to, contains “commit it, all groups together”. I confirmed that text sits in habeas-requirements’s step 5, in its Workflow section, “commit it, all groups together, before any code”.

The assertions are on the skill’s actual wording. If a clause were removed or reordered, the test would fail. The requirement is a text obligation on a skill document, so these phrase and order checks are the appropriate test form. The cited requirements requirements.cli.requirements_review_skill and requirements.cli.bootstrap_skill are context only, and I did not reassess them. No gaps found, and there are no acknowledgments.

Inputs

Implementation

Input 5: outline assets/skills/habeas-bootstrap-requirements/SKILL.md (whole file)
---
name: habeas-bootstrap-requirements
description: Use when adopting Habeas in an existing codebase, when `habeas status --coverage` warns about uncovered items across most of a project's code, or when the user asks for a requirements coverage audit. Inventories tests, Rust items, and user-visible behavior; proposes an initial requirement set for the user's approval; tags every test and each requirement's root items; and drives `habeas author` and validation to full coverage. For a few uncovered items, use habeas-evidence.
---

# Bootstrap requirements

Habeas traces requirements, written in a project's mdBook, to the code and tests
that implement and verify them. Bootstrapping derives requirements from code
that already exists, so every requirement starts as a proposal: observed
behavior may be intended, a bug, or incidental.

Follow the habeas skill's "Testing and coverage artifacts": default to
`habeas coverage` for unit, integration and focused runs through `cargo nextest`;
run doctests separately with `cargo test --doc --workspace`, and never stage or
commit disposable coverage artifacts in the Cargo target directory.

## Workflow

Steps 1 to 3 run once. Repeat steps 4 to 7 for each area, such as one command
or module, then do steps 8 and 9. In a large codebase, give each area's reading
to a subagent to keep it out of your context.

- [ ] 1. Read the habeas skill for directive syntax, and the habeas-requirements
      skill: its steps 3 to 5 review, agree, and commit requirements, and its "Choosing
      references" and "What the review checks" sections govern tagging. Aim for
      accurate references, not a coverage number. If the project has no
      `tests/habeas.rs` calling `habeas::validate()`, Habeas is not set up: ask
      before running `habeas setup`. Before bootstrapping evidence, check coverage readiness with `habeas status`: the validation test also checks the saved `.config/nextest.toml` collector and default-profile rules. Use `habeas setup` to establish or repair the integration under the existing setup authorization. Report conflicting nextest settings for review; preserve project-specific settings. If a requirement already exists, confirm
      authoring works with `habeas author --stdout <full-name>`, which always
      assesses and writes no evidence. If it fails, read the habeas-evidence
      skill's `references/authoring-failures.md`.
- [ ] 2. Read the existing requirements, documentation, public entry points,
      implementation, and tests. Follow behavior through the code rather than
      relying on test names or top-level dispatch.
- [ ] 3. Build the inventories and the gap list (below).
- [ ] 4. Propose requirements for the area (below), reusing existing ones by
      full name and proposing any changes to their text. Write them as
      uncommitted edits to the area's chapter, one file per area, such as
      `md/requirements/cli.md` for `requirements.cli.*`; for a new chapter, add
      it to `SUMMARY.md` and `git add -N` it so reviewers see it.
- [ ] 5. Review, agree, and commit them through habeas-requirements steps 3 to
      5; a general request to bootstrap is not agreement to specific text.
      **Gate:** don't commit a requirement or tag code against it until the user
      agrees to its text. Remove drafts the user rejects, defers, or has not
      decided from the chapter, and keep them on the gap list.
- [ ] 6. Tag the area's tests and root items (below). In the first area, if step 1
      had no requirement to try, run `habeas author <full-name>` on one of the
      area's requirements to confirm authoring works before going on.
- [ ] 7. Validate and author the area:
      - [ ] a. Run `habeas coverage`, which makes no model calls, and fix
            the reference errors in this area's files. Leave uncovered items for
            now: assessments that read reached code cover them, and none have
            run yet. Items in areas not yet bootstrapped wait for their own
            pass; never give them placeholder references.
      - [ ] b. Tell the user how many definitions `habeas status` says need
            authoring.
      - [ ] c. Follow the habeas-evidence workflow for this area's definitions,
            running `habeas author <full-name>` for each, and
            `habeas author sites:<full-name>` for each distributed requirement,
            until each passes or is on the gap list with a reason. Citation
            reviews are authored only by `habeas author --all`, which also
            authors other areas' definitions: run it once the area's own
            definitions pass, then check that this area's items are covered.
            Full validation can pass only after the last area.
- [ ] 8. Have a fresh subagent recount both inventories from the source and tests
      without your lists, and reconcile any differences.
- [ ] 9. Run `habeas test` for full-workspace collection and post-suite coverage
      checking. Include remaining execution-coverage gaps in the report,
      separately from unmapped items and evidence findings. Recommend separate
      successful collection and `habeas coverage-check` steps in project CI,
      using the Habeas [CI example](../habeas/references/ci.md). Collection alone
      does not enforce the coverage policy. Report (below). Next: for gap-list items the user decides, follow the
      habeas-requirements skill.
      {impl}`requirements.test-coverage.check.guidance`

## Inventories

Keep the inventories and the gap list in the conversation or in a file outside
the repository; a staged file listing names in role syntax would add
references.

- **Tests:** every first-party runnable test or test case, including integration
  tests and parameterized cases. Record the behavior each test checks; fill in
  requirement names once they are installed.
- **Items and behavior:** in Rust projects, every function, method, struct,
  enum, and union, listed from the source rather than from the coverage
  warnings, since an assessment's read can cover an item whose
  behavior no requirement states. Add by hand the observable surface: public
  APIs, commands, handlers, UI actions, configuration, outputs, errors, and
  distinct observable branches. A tagged entry point doesn't mean every observable branch beneath
  it has a requirement.
- **Gap list:** each item or behavior you cannot yet map, with its location, the
  reason, and the open question.

Exclude third-party and checked-in generated code. Rust item coverage already
skips the project-root `vendor` directory; for any other such path, add it to
`[evidence] disallow` in `habeas.toml` with the user's agreement, which also
hides it from authoring.

## Proposing requirements

Write one requirement per obligation a user could rely on; the
habeas-requirements review (step 3) splits compound ones. For tests of internal
invariants, write a requirement for the invariant they check rather than
inventing a user-facing promise. Label each proposal and act on the label:

- **Intended:** state the observed behavior.
- **Possible bug:** ask the user what behavior is intended and write the
  requirement for that. Don't change the code during bootstrap unless the user
  asks; the resulting false judgment stays on the gap list, or gets a
  `{fixme}` reference if the user defers it (the habeas-evidence skill's
  `references/fixme.md`).
- **Incidental:** the user chooses between a requirement, often with MAY, and
  removing the behavior. For example, a command that also accepts an
  undocumented alias.

When a convention applies on its own at many sites, such as how every
validation function continues after a failed check, propose a distributed
requirement instead of marking each site `{impl}`; read the habeas skill's
`references/distributed-requirements.md`.

## Tagging

Give every inventoried test and each requirement's roots their references by
"Choosing references" in the habeas-requirements skill: `{test}` on tests and `{impl}`
on roots; code a root or test reaches needs none. Map each other inventoried
item to the requirement whose root reaches it. Every test must end up with a `{test}` reference to a requirement or example,
attached to the test as the habeas-requirements skill describes; a test whose behavior no agreed requirement states goes on the gap
list, never `habeas:util`. For a parameterized test, put the reference on the
case source or the generating declaration; one file-level tag must not stand in
for unrelated tests. Where one behavior follows from several requirements,
mark each with `{impl}` where it applies and explain how they combine, as the
habeas-requirements skill describes. An item that neither carries out a
requirement nor serves other code goes on the gap list: it needs a requirement
or is not needed.

## Report

```text
Tests mapped: <mapped>/<total>
Items mapped: <referenced or reached from a mapped root>/<total>  (covered only by reads: <count>)
Independent recount: <agrees | differences and how reconciled>
Gaps:
- <item or behavior> (<file>:<line>): <reason>; <open question>
```

Claim 100% only when both inventories have no unmapped items, the independent
recount agrees, and every observable branch has been reviewed. Don't silently
exclude difficult cases.

## Gotchas

- Never write evidence yourself or ask another agent to, even over a long
  session (habeas-evidence explains why).
- When assessments of the same subject disagree, follow "Disagreeing
  assessments" in the habeas-evidence skill.
Input 12: outline assets/skills/habeas-bootstrap-requirements/SKILL.md section[Bootstrap%20requirements]/section[Workflow]
## Workflow

Steps 1 to 3 run once. Repeat steps 4 to 7 for each area, such as one command
or module, then do steps 8 and 9. In a large codebase, give each area's reading
to a subagent to keep it out of your context.

- [ ] 1. Read the habeas skill for directive syntax, and the habeas-requirements
      skill: its steps 3 to 5 review, agree, and commit requirements, and its "Choosing
      references" and "What the review checks" sections govern tagging. Aim for
      accurate references, not a coverage number. If the project has no
      `tests/habeas.rs` calling `habeas::validate()`, Habeas is not set up: ask
      before running `habeas setup`. Before bootstrapping evidence, check coverage readiness with `habeas status`: the validation test also checks the saved `.config/nextest.toml` collector and default-profile rules. Use `habeas setup` to establish or repair the integration under the existing setup authorization. Report conflicting nextest settings for review; preserve project-specific settings. If a requirement already exists, confirm
      authoring works with `habeas author --stdout <full-name>`, which always
      assesses and writes no evidence. If it fails, read the habeas-evidence
      skill's `references/authoring-failures.md`.
- [ ] 2. Read the existing requirements, documentation, public entry points,
      implementation, and tests. Follow behavior through the code rather than
      relying on test names or top-level dispatch.
- [ ] 3. Build the inventories and the gap list (below).
- [ ] 4. Propose requirements for the area (below), reusing existing ones by
      full name and proposing any changes to their text. Write them as
      uncommitted edits to the area's chapter, one file per area, such as
      `md/requirements/cli.md` for `requirements.cli.*`; for a new chapter, add
      it to `SUMMARY.md` and `git add -N` it so reviewers see it.
- [ ] 5. Review, agree, and commit them through habeas-requirements steps 3 to
      5; a general request to bootstrap is not agreement to specific text.
      **Gate:** don't commit a requirement or tag code against it until the user
      agrees to its text. Remove drafts the user rejects, defers, or has not
      decided from the chapter, and keep them on the gap list.
- [ ] 6. Tag the area's tests and root items (below). In the first area, if step 1
      had no requirement to try, run `habeas author <full-name>` on one of the
      area's requirements to confirm authoring works before going on.
- [ ] 7. Validate and author the area:
      - [ ] a. Run `habeas coverage`, which makes no model calls, and fix
            the reference errors in this area's files. Leave uncovered items for
            now: assessments that read reached code cover them, and none have
            run yet. Items in areas not yet bootstrapped wait for their own
            pass; never give them placeholder references.
      - [ ] b. Tell the user how many definitions `habeas status` says need
            authoring.
      - [ ] c. Follow the habeas-evidence workflow for this area's definitions,
            running `habeas author <full-name>` for each, and
            `habeas author sites:<full-name>` for each distributed requirement,
            until each passes or is on the gap list with a reason. Citation
            reviews are authored only by `habeas author --all`, which also
            authors other areas' definitions: run it once the area's own
            definitions pass, then check that this area's items are covered.
            Full validation can pass only after the last area.
- [ ] 8. Have a fresh subagent recount both inventories from the source and tests
      without your lists, and reconcile any differences.
- [ ] 9. Run `habeas test` for full-workspace collection and post-suite coverage
      checking. Include remaining execution-coverage gaps in the report,
      separately from unmapped items and evidence findings. Recommend separate
      successful collection and `habeas coverage-check` steps in project CI,
      using the Habeas [CI example](../habeas/references/ci.md). Collection alone
      does not enforce the coverage policy. Report (below). Next: for gap-list items the user decides, follow the
      habeas-requirements skill.
      {impl}`requirements.test-coverage.check.guidance`

Tests

Input 4: outline tests/authoring_cli.rs fn[bootstrap_skill_reviews_inferred_requirements_before_committing_or_tagging]
// {test}`requirements.cli.bootstrap_skill.review`
#[test]
fn bootstrap_skill_reviews_inferred_requirements_before_committing_or_tagging() {
    const SKILL: &str = "habeas-bootstrap-requirements";
    assert_phrases(SKILL, &["every requirement starts as a proposal"]);
    let propose = step_of(SKILL, "Propose requirements for the area");
    let review = step_of(
        SKILL,
        "Review, agree, and commit them through habeas-requirements steps 3 to 5",
    );
    let tag = step_of(SKILL, "Tag the area's tests and root items");
    assert!(propose < review && review < tag);
    assert!(step(SKILL, propose).contains("proposing any changes to their text"));
    assert_text(
        "review step",
        &step(SKILL, review),
        &[
            "a general request to bootstrap is not agreement to specific text",
            "don't commit a requirement or tag code against it until the user agrees to its text",
            "Remove drafts the user rejects, defers, or has not decided from the chapter, and keep them on the gap list",
        ],
    );
    // Each area's requirements are committed together, as habeas-requirements
    // commits all groups, before that area is tagged.
    assert!(
        section(skill_md(SKILL), "## Workflow")
            .contains(&format!("Repeat steps {propose} to 7 for each area"))
    );
    assert_phrases("habeas-requirements", &["commit it, all groups together"]);
}

Referenced definitions

Input 2: requirements selection requirements.cli.requirements_review_skill
:::{req} requirements_review_skill
The `habeas-requirements` skill MUST direct agents adding, changing, or removing end-user-observable behavior that no agreed requirement already specifies in a Habeas project to draft requirements and commit them, once agreed under {cite}`requirements.cli.requirements_review_skill.agreement` and {cite}`requirements.cli.requirements_review_skill.commit`, before writing implementation or test code.
:::
Input 3: requirements selection requirements.cli.bootstrap_skill
:::{req} bootstrap_skill
Habeas MUST bundle a skill for deriving initial requirements from an existing codebase. The skill MUST direct agents to read the code and tests, map every first-party test to at least one requirement or example, identify and map every source unit implementing end-user-visible functionality or interactions to a requirement, and report gaps rather than claim complete coverage without an independent inventory review.
:::

Other sources

Input 1: requirements selection requirements.cli.bootstrap_skill.review
:::{req} bootstrap_skill.review
The `habeas-bootstrap-requirements` skill MUST direct agents to take the requirements they infer from existing code, and the changes they propose to existing requirement text, through the review and agreement of {cite}`requirements.cli.requirements_review_skill` before committing them or tagging code against them. It MUST state that a general request to bootstrap is not agreement to specific text, and MUST direct agents to keep requirements the user rejects or defers on the gap list of {cite}`requirements.cli.bootstrap_skill`. Each area's agreed requirements MUST be committed together before that area's code is tagged.
:::
Input 6: outline tests/authoring_cli.rs fn[skill_md]
/// A bundled skill's raw `SKILL.md`.
// {cite}`habeas:util`
fn skill_md(name: &str) -> &'static str {
    skill_files(name)[0].1
}
Input 7: outline tests/authoring_cli.rs fn[section]
/// 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 8: outline tests/authoring_cli.rs fn[step]
/// The text of one numbered workflow step.
// {cite}`habeas:util`
fn step(name: &str, number: u32) -> String {
    workflow_steps(name)
        .into_iter()
        .find(|(n, _)| *n == number)
        .unwrap_or_else(|| panic!("{name} has no step {number}"))
        .1
}
Input 9: outline tests/authoring_cli.rs fn[step_of]
/// The number of the workflow step that contains `phrase`.
// {cite}`habeas:util`
fn step_of(name: &str, phrase: &str) -> u32 {
    workflow_steps(name)
        .into_iter()
        .find(|(_, text)| text.contains(phrase))
        .unwrap_or_else(|| panic!("no step of {name} contains {phrase:?}"))
        .0
}
Input 10: outline tests/authoring_cli.rs fn[assert_text]
// {cite}`habeas:util`
fn assert_text(label: &str, text: &str, phrases: &[&str]) {
    for phrase in phrases {
        assert!(text.contains(phrase), "{label} lacks {phrase:?}");
    }
}
Input 11: outline tests/authoring_cli.rs fn[assert_phrases]
// {cite}`habeas:util`
fn assert_phrases(name: &str, phrases: &[&str]) {
    assert_text(name, &bundled_skill(name), phrases);
}
Input 13: outline tests/authoring_cli.rs fn[workflow_steps]
/// The numbered steps of a bundled skill's "Workflow" section, each with its
/// number and collapsed text, including its indented continuation lines.
// {cite}`habeas:util`
fn workflow_steps(name: &str) -> Vec<(u32, String)> {
    let (_, rest) = skill_md(name)
        .split_once("\n## Workflow\n")
        .unwrap_or_else(|| panic!("{name} has no workflow"));
    let mut steps: Vec<(u32, Vec<&str>)> = Vec::new();
    let mut open = false;
    for line in rest.lines() {
        if line.starts_with("## ") {
            break;
        }
        let numbered = line
            .strip_prefix("- [ ] ")
            .and_then(|step| step.split_once(". "))
            .and_then(|(number, text)| Some((number.parse().ok()?, text)));
        if let Some((number, text)) = numbered {
            steps.push((number, vec![text]));
            open = true;
            continue;
        }
        if !line.is_empty() && !line.starts_with(' ') {
            open = false;
        }
        if open {
            steps.last_mut().unwrap().1.push(line);
        }
    }
    steps
        .into_iter()
        .map(|(number, lines)| (number, collapse(&lines.join("\n"))))
        .collect()
}
Input 14: outline assets/skills/habeas-requirements/SKILL.md section[Habeas%20requirements]/section[Workflow]
## Workflow

- [ ] 1. Check the starting point. Run `git status` on the book's source
      directory. If it has uncommitted edits you did not make in this task, ask
      the user whether they belong to it. Read the relevant requirements, code,
      and tests; `habeas info <selection>` prints a requirement's text and state.
      If the change adds, alters, or removes no observable behavior (a comment typo, a
      dependency bump, a speed-up), or an existing requirement already specifies
      it (most bug fixes), tell the user which requirement covers it, or that
      none is needed, and go to step 6.
- [ ] 2. Draft. Write drafts from the request straight into the chapter as
      uncommitted, unstaged edits, with no draft marker; Git tracks what is in
      progress. For a new chapter, add it to `SUMMARY.md` and `git add -N` it so
      reviewers and Habeas see it. Ask the user only what the request can't
      answer; the review in step 3 finds the rest. Drafts may be high-level,
      compound, or incomplete. Cover each observable outcome and failure case
      of the change without committing to an implementation. Reuse existing
      requirements by full name, and propose a new one only for behavior none
      covers; one general requirement, such as "invalid arguments MUST be
      reported with usage", can cover many branches. Note the open product
      choices; reviewers get them in step 3.
- [ ] 3. Review. Sort the new and changed requirements into groups that one
      reviewer should see together: requirements that cite each other or
      describe one feature. For each group, start a read-only subagent, all in
      parallel. Tell it to read this skill's `references/review-prompt.md` and
      the habeas skill's `SKILL.md` by absolute path, and give it the group's
      full names and a brief: what the user asked for, the decisions already
      made, and the open choices already noted, which it should not re-raise.
      If you can't start subagents, review each group yourself against the
      prompt, one group at a time. Apply the revised text the reviews return,
      and reconcile reviews that clash, such as two that split the same
      requirement differently; a clash whose resolution changes what is
      promised becomes a design question.
- [ ] 4. Present each group to the user: its exact text, including any `{sites}`
      and `{violations}` queries, and the design questions the review returned,
      each with its options and your recommendation. Show text that was already
      agreed or that the user supplied as a diff against that text, then a
      "Mechanical:" list of the changes. Show the edits reviewers made outside
      their group the same way, and list added `{example}`s, which each need a
      test. Don't raise mechanical changes to new text as questions. Apply the
      user's decisions. If a decision adds an obligation no reviewer saw,
      review that group again.
      **Gate:** no implementation or test code, and no commit, until the user
      has agreed to, rejected, or deferred every group. Exact text the user supplied, or explicit agreement
      earlier in the conversation, counts; a general request to build the
      feature does not. If you cannot ask the user in this session, stop,
      leave the drafts uncommitted, and report them with the design
      questions.
- [ ] 5. Commit. Revert drafts the user rejected or deferred (`git restore -p`)
      and list them in your report. Check with `git diff` that the book holds
      exactly the agreed text, then commit it, all groups together, before any
      code; leave out unrelated edits found in step 1. For a change to agreed
      text, the message gives the reason and the rationale that prompted it,
      relative to the prior commit (habeas-evidence, "Rules"). This commit fails
      validation until evidence is authored; that is expected, as only the pull
      request as a whole must pass. Report the full names. In a design session
      with no code to write, stop here.
- [ ] 6. Implement and test. Add references as "Choosing references" says, then
      check the work against "What the review checks". When a requirement was
      split, move the `{impl}` and `{test}` of each split-off part to its new
      name.
- [ ] 7. Next, follow the habeas-evidence skill to author evidence and fix what
      it reports. When assessments disagree, follow its "Disagreeing
      assessments".

Every change to agreed text, including a rewording for precision or removing a
requirement, goes through steps 3 to 5 before it is committed. If
implementation shows that agreed text must change, stop work that depends on it and take the changed requirements
through steps 3 to 5 first. Behavior no requirement covers goes back to step 2.
Renaming or moving a committed requirement is a habeas-refactor task, agreed
with the user and committed before its text changes. Restructuring code in
place, including renaming an item, needs no requirement review, but references
move with the code and the evidence is reassessed; moving code to another file
or outline node is a habeas-refactor task.

Input 15: outline tests/authoring_cli.rs fn[collapse]
/// 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(" ")
}