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.skill_conventions.next

Requirements index · View definition

evidence Valid

Requirement

Each bundled skill’s workflow MUST end by naming the bundled skill for the next task, or, when different outcomes lead to different tasks, the skill for each such outcome. An outcome that leads to no further task needs no skill named. Each bundled skill, recognized by its front matter, is a site:
::{sites} skills
language: markdown
paths: [assets/skills]
rule:
  kind: minus_metadata
match:
  - "---\nname: example\n---\n\n# Example\n"
no_match:
  - "# Example\n"

:::

Rationale

Obligation. The requirement has one obligation: each bundled skill’s workflow ends by naming the skill for the next task, or one skill per outcome when outcomes differ. Each site upholds it on its own, so no code needs an {impl} reference.

Site query skills.

  • Running requirements.cli.skill_conventions.next/skills returned exactly five files: habeas, habeas-requirements, habeas-evidence, habeas-refactor and habeas-bootstrap-requirements, each at assets/skills/<name>/SKILL.md.
  • A search of assets for ^name: found the same five and no other front-matter files.
  • tests/authoring_cli.rs#const[SKILLS] also lists five skills, so the query matches the full bundled set.
  • It selects nothing outside assets/skills.

Query snippets. The match snippet has front matter followed by a heading, which shows the minus_metadata selection. The no_match snippet is a heading with no front matter, which shows that plain markdown is not selected. That is adequate for a single-condition rule.

Test. tests/authoring_cli.rs#fn[bundled_skill_workflows_end_by_naming_the_skill_for_the_next_task] carries a {test} reference to the subject. For each of the five skills it reads the last workflow step and asserts that it names the next skill. For habeas-refactor, which has two outcomes, it asserts both the habeas-evidence follow-up and the habeas-requirements follow-up. It also asserts that the routing table in the habeas skill names every other skill. The test therefore covers the whole obligation, including the multi-outcome case.

Gaps. I found none.

Inputs

Tests

Input 2: outline tests/authoring_cli.rs fn[bundled_skill_workflows_end_by_naming_the_skill_for_the_next_task]
// {test}`requirements.cli.skill_conventions.next`
#[test]
fn bundled_skill_workflows_end_by_naming_the_skill_for_the_next_task() {
    for (name, next) in [
        // The habeas skill's next task is the one its routing table picks.
        ("habeas", &["Follow that skill"][..]),
        (
            "habeas-requirements",
            &["Next, follow the habeas-evidence skill"][..],
        ),
        (
            "habeas-evidence",
            &[
                "Next: for findings that need code or tests, or requirement text that must change, return to the habeas-requirements skill",
            ][..],
        ),
        (
            "habeas-bootstrap-requirements",
            &["Next: for gap-list items the user decides, follow the habeas-requirements skill"][..],
        ),
        (
            "habeas-refactor",
            &[
                "Next, reassess what remains stale with `habeas author --all`, following the habeas-evidence skill",
                "then make any behavior or text changes as separate commits under the habeas-requirements skill",
            ][..],
        ),
    ] {
        let (_, last) = workflow_steps(name).pop().unwrap();
        assert_text(&format!("{name}'s last step"), &last, next);
    }
    // The table the habeas skill routes from names every other skill.
    let table = step("habeas", 1);
    for name in SKILLS.into_iter().filter(|name| *name != "habeas") {
        assert!(table.contains(&format!("| {name} |")), "{name}");
    }
}

Other sources

Input 1: requirements selection requirements.cli.skill_conventions.next
::::{req} skill_conventions.next
Each bundled skill's workflow MUST end by naming the bundled skill for the next task, or, when different outcomes lead to different tasks, the skill for each such outcome. An outcome that leads to no further task needs no skill named. Each bundled skill, recognized by its front matter, is a site:

:::{sites} skills
```yaml
language: markdown
paths: [assets/skills]
rule:
  kind: minus_metadata
match:
  - "---\nname: example\n---\n\n# Example\n"
no_match:
  - "# Example\n"
```
:::
::::