Skip to content

Add schema-gap-analysis skill (CommunityMech-specific operational version)#68

Merged
realmarcin merged 2 commits into
mainfrom
skill/schema-gap-analysis
May 18, 2026
Merged

Add schema-gap-analysis skill (CommunityMech-specific operational version)#68
realmarcin merged 2 commits into
mainfrom
skill/schema-gap-analysis

Conversation

@realmarcin
Copy link
Copy Markdown
Contributor

Adds CommunityMech-specific operational version of the cross-Mech schema-gap-analysis skill. Copy-paste-runnable: schema, kb/communities/, data/isolates/ all baked in (no need to substitute from a cross-Mech config table).

Smoke-tested 2026-05-17: kb/communities/*.yaml (261 records) validates cleanly with 0 errors.

Cross-Mech framework reference: https://github.com/CultureBotAI/culturebotai-claw/blob/main/.claude/skills/schema-gap-analysis/skill.md

🤖 Generated with Claude Code

…sion)

Copy-paste-runnable linkml-validate-based check for schema/data drift
in CommunityMech YAMLs (kb/communities/ + data/isolates/). Three-axis
classification (schema / instances / process); same methodology as
the other Mechs but with CommunityMech paths baked in (so the user
doesn't have to substitute placeholders from a cross-Mech table).

Cross-Mech framework reference:
https://github.com/CultureBotAI/culturebotai-claw/blob/main/.claude/skills/schema-gap-analysis/skill.md

Smoke-tested 2026-05-17: kb/communities/*.yaml (261 records) validates
with 0 errors.

Force-added past .gitignore line 130 (`.claude/`) to match the existing
pattern set by review-communities, evidence-curation, etc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 18, 2026 02:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a CommunityMech-specific operational copy of the cross-Mech schema-gap-analysis skill, intended to be copy/paste runnable for validating CommunityMech YAML instances against the LinkML schema and for spotting generator drift.

Changes:

  • Introduces a new .claude skill document with step-by-step commands for schema validation of kb/communities/ and data/isolates/.
  • Adds simple post-processing (error histograms) and grep-based drift checks over src/ and scripts/.
  • Records a snapshot of validation status as of 2026-05-17.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/skills/schema-gap-analysis/skill.md Outdated
Comment thread .claude/skills/schema-gap-analysis/skill.md
Comment thread .claude/skills/schema-gap-analysis/skill.md
- Step 2: drop the bogus `-C IsolateRecord` (no such class in the schema).
  Per `data/isolates/README.md`, isolates use the same `MicrobialCommunity`
  root as `kb/communities/`. Validate both with `-C MicrobialCommunity`.
- Steps 1/2/5: stop swallowing validator output to /dev/null — `tee` to
  both stdout and log so startup errors are visible. Wrap `grep -c` with
  `|| true` so a 0-error count doesn't break `set -e` recipes.
- Step 4: drop the dead `yaml.dump({"communities": ...})` grep (no
  programmatic writers exist). Replace with broader greps that catch
  `open()`, `Path.write_text()`, and `yaml.(safe_)?dump()` writes against
  `kb/communities/` or `data/isolates/`.
- State table: populate `data/isolates/` row from a real run — 5 files,
  4 missing required `id` slot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@realmarcin realmarcin merged commit 9d56021 into main May 18, 2026
@realmarcin realmarcin deleted the skill/schema-gap-analysis branch May 18, 2026 02:44
realmarcin added a commit that referenced this pull request May 19, 2026
The schema-gap-analysis skill (PR #68) flagged 4 of 5 files under
data/isolates/ as missing the required `id` slot
(`'id' is a required property`). The schema defines `id` on
MicrobialCommunity as `identifier: true, required: true,
pattern: "^CommunityMech:\\d{6}$"`.

Assigned the next four available IDs (max in use was 000270):
- Aspergillus_Indium_LED_Recovery.yaml         → CommunityMech:000271
- BioModels_MODEL2204300002_Kefir_Rothia_Model → CommunityMech:000272
- Chromobacterium_Gold_Biocyanidation.yaml     → CommunityMech:000273
- Methylobacterium_REE_Ewaste_Platform.yaml    → CommunityMech:000274

All 5 isolates now validate clean under
  linkml-validate -C MicrobialCommunity

Co-authored-by: Claude Opus 4.7 (1M context) <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.

2 participants