fix(agents-md): enforce the conditional-files table (closes broken contract)
Summary
agents-md's SKILL.md table names four .ai/<topic>.md files as conditional on project shape. The check.sh enforced none of them — the contract was prose-only. A consumer with a .gitlab-ci.yml but no .ai/ci-cd.md would pass the check while the prose said it should fail.
What lands
Tenth check primitive: check_file_exists_when <required> <predicate>...
Per-assertion conditional. If any predicate-pattern matches a file in the repo (same scan rules as applies_when_file), asserts the required path exists. Otherwise SKIPs that one assertion and continues. Recorded in _lib.sh's header + scripts/guard-checks.sh's whitelist per the project's vocabulary-extension convention.
standards/agents-md/check.sh: four new lines using the primitive.
check_file_exists_when .ai/merge-requests.md CONTRIBUTING.md
check_file_exists_when .ai/ci-cd.md .gitlab-ci.yml
check_file_exists_when .ai/design.md astro.config.mjs index.html
check_file_exists_when .ai/compliance.md unified.yamlstandards/agents-md/SKILL.md: conditional column rewritten to name the concrete file predicates (was prose-only, vague: "Project accepts external MRs"; now names CONTRIBUTING.md, etc.).
Scope
- Status of
agents-mdstays atintroduced. This MR closes the broken contract; the flip toenforcingis a separate decision. - No other changes. Five files, 73+/20-.
Test plan
-
bash scripts/guard-checks.shclean (10 primitives whitelisted) -
make validategreen -
bash scripts/check-with-deviations.shshowsagents-mdPASSing on the reference itself (it ships all four.ai/<topic>.mdfiles as the canonical example) - MR CI green
What this is not
This is not the bundled v1.2.0 release that the closed MR !8 (closed) proposed. The other Tier 2/3 items there (sector bundles, applicable_frameworks: rename, hipaa → health rename, SOX promotion, vale disable_rules, stale-prose sweep, standard-status flips) are deferred until there's a coherent v1.2.0 story to tell. This MR closes one real broken contract; that's the whole scope.