Skip to content

Per-tool YAML licenses (#4) + review-grounded meta-skills (#7)#20

Merged
lfnothias merged 4 commits into
devfrom
feat/tool-yaml-and-review-meta
Jun 26, 2026
Merged

Per-tool YAML licenses (#4) + review-grounded meta-skills (#7)#20
lfnothias merged 4 commits into
devfrom
feat/tool-yaml-and-review-meta

Conversation

@lfnothias

Copy link
Copy Markdown
Contributor

Two features (#4 per-tool YAML licenses, #7 review-grounded meta-skills). Merged dev in to resolve the check_proposals.py overlap with #19. 434 tests; all gates green.

#4 — per-tool YAML license enrichment

  • scripts/enrich_tool_yaml.py writes license_tier / license / license_detection into all 909 tools/<slug>.yaml (joined by slug from tools_index.json), idempotent + byte-identical to render_tool_yaml style.
  • check_tools_index extended to cross-check each tools/<slug>.yaml license_tier == its tools_index tier (0 mismatch on real data).
  • Dropped the vendored asb_skill_bundle.yaml the workflow had added: that schema is owned by the unpublished asb-schema sibling package (the LinkML gate is warn-only + asb-schema not on PyPI). Vendoring a 639-line copy here = divergence risk with no CI benefit. Follow-up (asb-schema repo): add the 3 license slots to the Tool class so the enriched YAMLs validate once published.

#7 — review-grounded (literature-tier) meta-skills

  • synthesize_meta_skill.meta_frontmatter gains review_doi= → a super-skill grounded in a review article becomes provenance_tier: literature (dois/derived_from set), vs the default synthetic path.
  • check_proposals now delegates the provenance invariant to provenance_tier.validate_entry (community/synthetic/literature ⇒ ≥1 doi), a DRY refactor; META_SKILLS.md + synthesize-meta-skill.md document --review-doi.

Verification

lfnothias and others added 4 commits June 26, 2026 17:21
Propagate license_tier/license/license_detection from tools_index.json into
the 909 tools/<slug>.yaml LinkML records, schema-correctly.

- scripts/enrich_tool_yaml.py: tier_map(tools_index) -> per-slug license rows;
  enrich(collection_dir) joins by slug and writes the three fields right after
  schema_version (idempotent, _yaml_dump style-preserving, no git/network).
- asb_skill_bundle.yaml: vendor the LinkML schema at repo root (where
  validate.yml gate 1 expects it) and add optional license_tier/license/
  license_detection slots to the ASBTool class + a LicenseTierEnum
  {open,noncommercial,restricted}. Verified: ASBTool instances with the new
  fields validate clean and an invalid tier is rejected; the gate's result on
  collection.yaml is unchanged.
- check_tools_index.check_collection: cross-check each tools/<slug>.yaml
  license_tier == its tools_index license_tier (tools without a yaml skipped).
- Ran on collections/metabolomics/v2: 909 enriched, 0 mismatches
  (511 open / 389 restricted / 9 noncommercial); re-run is a byte-stable no-op.

Tests: 19 new (enrich + cross-check), full suite 397 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A super-skill can now be grounded in a review article instead of being
purely composed from the skills it orchestrates.

- synthesize_meta_skill.meta_frontmatter: optional review_doi=None. When
  given -> provenance_tier="literature", metadata.dois=[review_doi],
  derived_from=[{doi:review_doi}], keeping skill_kind="super"+orchestrates.
  Default path stays synthetic (no dois/derived_from).
- check_proposals.check_collection: accept staged literature super-skills,
  reusing scripts.provenance_tier.validate_entry semantics
  (literature => >=1 doi; synthetic => synthesized_from; community =>
  related_skills key). Super/skill_kind/orchestrates checks intact.
- governance/META_SKILLS.md: document the three meta-skill origins
  (synthetic / community / literature = review-grounded) + review-DOI flow.
- commands/synthesize-meta-skill.md: document the --review-doi option.
- Tests: literature super-skill with a review DOI passes; without a doi
  fails; synthetic path unchanged. Full suite 404 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…asb-schema package

The LinkML Tool-class slots (license_tier/license/license_detection) should be
added in the unpublished asb-schema sibling package, not vendored as a 639-line
copy here (divergence risk; the gate is warn-only + asb-schema not on PyPI, so
this preserves dev's behavior). The real deliverable — 909 enriched tools/*.yaml
+ the check_tools_index cross-check + enrich_tool_yaml — is retained.

FOLLOW-UP (asb-schema repo): add the 3 license slots to the Tool class so the
enriched tools/*.yaml validate once asb-schema is published.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…iew-meta

# Conflicts:
#	scripts/check_proposals.py

@lfnothias lfnothias left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-review — VERDICT: MERGEABLE ✅

Workflow final review returned MERGEABLE; its one Important finding (a vendored 639-line asb_skill_bundle.yaml that won't load under local linkml) is resolved by removing that file — the schema is owned by the unpublished asb-schema package, the gate is warn-only, and the data deliverable is independent of it. Independently verified in the worktree:

  • pytest434 passed (includes #19's tests after merging dev in).
  • check_proposals / check_tools_index / check_provenance_tiers / check_license_tiers → exit 0.
  • #4: all 909 tools/*.yaml carry license_tier/license/license_detection matching tools_index (0 mismatch); enrich_tool_yaml idempotent.
  • #7: a review-grounded super-skill validates as literature (≥1 doi); the synthetic path is unchanged.
  • Merge with #19: clean — no conflict markers; validate_provenance (provenance) + contributor_violations (contributors) both wired in check_proposals.
  • No git/gh/network in new scripts.

Follow-up flagged (separate asb-schema repo): add the 3 license slots to the Tool class so enriched YAMLs validate once asb-schema is published.

@github-actions

Copy link
Copy Markdown

Gate 15: Paper Access Tier Validation FAILED

One or more papers in this PR have missing or non-open-access tiers. Please:

  1. Verify the access tier for each flagged paper (check publisher, DOI resolver, or institutional access)
  2. Update the access.type field in the relevant corpus.yaml file
  3. For v0 (require_open_access=true), only open-access papers are permitted

See OPEN_ACCESS_POLICY.md for the full policy and allowed access tiers.

@lfnothias
lfnothias merged commit 1ef6a27 into dev Jun 26, 2026
1 check failed
lfnothias added a commit that referenced this pull request Jun 26, 2026
Propagates two post-#19 merges into the 8 packs (which weren't rebuilt after):
- synthesize-meta-skill.md: the #7 --review-doi addition (PR #20)
- kb_bundle.json: related_skills from the #1 embedding precompute (PR #21)

claim-skill.md was already shipped to all packs in 2be335f (PR #19) and is
unchanged here. Idempotent: re-running build_all_grounding.sh now yields no diff.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant