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.test-coverage.setup.bootstrap

Requirements index · View definition

evidence Valid

Requirement

The habeas-bootstrap-requirements skill MUST direct agents to check the coverage setup under cite requirements.test-coverage.setup.validation and help establish or repair it with habeas setup before bootstrapping requirement evidence. It MUST direct agents to report conflicting configuration for review rather than overwrite project-specific nextest settings.

Rationale

The test is adequate. It checks every clause of requirements.test-coverage.setup.bootstrap. This requirement is guidance text in the habeas-bootstrap-requirements skill, so phrase assertions on the bundled skill text are the right kind of test.

The {test} item is tests/authoring_cli.rs#fn[bootstrap_checks_and_repairs_coverage_setup_and_preserves_conflicts]. It loads the skill and its reference files through bundled_skill("habeas-bootstrap-requirements") and asserts that each required phrase is present.

How the obligations map to assertions:

  • Check coverage setup before bootstrapping evidence. The assertion on “Before bootstrapping evidence, check coverage readiness with habeas status” covers this, including the “before” ordering. The assertion on “saved .config/nextest.toml collector and default-profile rules” ties the check to the validation requirement’s collector settings and default profile.
  • Help establish or repair the setup with habeas setup. The assertion on “Use habeas setup to establish or repair” covers this.
  • Report conflicting configuration for review rather than overwrite project-specific nextest settings. The assertions on “Report conflicting nextest settings for review” and “preserve project-specific settings” cover the report-for-review half and the no-overwrite half.

I read the skill in assets/skills/habeas-bootstrap-requirements/SKILL.md, in the Workflow section, step 1. It contains all of these phrases in one passage, so the assertions match real text and the test should pass.

The cited requirements.test-coverage.setup.validation is context only. The skill’s mention of the validation test’s nextest check is covered by the “saved .config/nextest.toml collector and default-profile rules” assertion. I found no unacknowledged gap.

Inputs

Implementation

Input 5: 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 3: outline tests/authoring_cli.rs fn[bootstrap_checks_and_repairs_coverage_setup_and_preserves_conflicts]
// {test}`requirements.test-coverage.setup.bootstrap`
#[test]
fn bootstrap_checks_and_repairs_coverage_setup_and_preserves_conflicts() {
    let text = bundled_skill("habeas-bootstrap-requirements");
    for required in [
        "Before bootstrapping evidence, check coverage readiness with `habeas status`",
        "saved `.config/nextest.toml` collector and default-profile rules",
        "Use `habeas setup` to establish or repair",
        "Report conflicting nextest settings for review",
        "preserve project-specific settings",
    ] {
        assert!(text.contains(required), "bootstrap omits {required}");
    }
}

Referenced definitions

Input 2: requirements selection requirements.test-coverage.setup.validation
:::{req} setup.validation
Repository validation, including the test calling `habeas::validate()` under
{cite}`requirements.integration.validate`, MUST check that the saved nextest
integration required by
{cite}`requirements.test-coverage.setup.configuration` is present and valid
for the coverage workflow's default profile, accounting for profile inheritance
and wrapper-rule precedence. A missing, unreadable, malformed, or incompatible
integration MUST be a validation error naming the affected file or setting and
directing the agent to repair it with `habeas setup`. The check MUST inspect the
collector settings and selection rules rather than only the file's existence.
Nextest's unrelated settings MUST retain their native meaning.
:::

Other sources

Input 1: requirements selection requirements.test-coverage.setup.bootstrap
:::{req} setup.bootstrap
The `habeas-bootstrap-requirements` skill MUST direct agents to check the
coverage setup under {cite}`requirements.test-coverage.setup.validation` and
help establish or repair it with `habeas setup` before bootstrapping requirement
evidence. It MUST direct agents to report conflicting configuration for review
rather than overwrite project-specific nextest settings.
:::
Input 4: outline tests/authoring_cli.rs fn[bundled_skill]
/// 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"))
}