extend-schema
/extend-schema
Change the IngestMech data model in src/ingestmech/schema/ingestmech.yaml: add, narrow, rename or remove a class, slot or enum, and migrate existing records. Use when a curation need has no place in the schema, or when deciding whether it warrants one. Not for filling existing slots.
- Author
- monarch-initiative ↗
- Repository
- mechmaker ↗
- Licence
- BSD-3-Clause
- Last repository change
- 23.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 23.10.2026, without references to retired models or APIs.
BSD-3-Clause, otwarta.
What it does and when to use it
Change the IngestMech data model in src/ingestmech/schema/ingestmech.yaml: add, narrow, rename or remove a class, slot or enum, and migrate existing records. Use when a curation need has no place in the schema, or when deciding whether it warrants one. Not for filling existing slots.
Original author description
Change the IngestMech data model in src/ingestmech/schema/ingestmech.yaml: add, narrow, rename or remove a class, slot or enum, and migrate existing records. Use when a curation need has no place in the schema, or when deciding whether it warrants one. Not for filling existing slots.
How it works
- First, decide whether to
- Never edit these
- Making the change
- Migrating records
- Afterward
SKILL.md preview
--- name: extend-schema description: >- Change the IngestMech data model in src/ingestmech/schema/ingestmech.yaml: add, narrow, rename or remove a class, slot or enum, and migrate existing records. Use when a curation need has no place in the schema, or when deciding whether it warrants one. Not for filling existing slots. --- # Extend the schema ## First, decide whether to A new slot is cheap to add and costly to fill. Before proposing one: - Search the schema. The need may already have a place. - Check `mech_shared.yaml`. Open questions and gaps are `Discussion`, and datasets are `Dataset`. Do not rebuild them. - Write the population strategy. Who fills the slot, from what source, by what rule? If an agent fills it by judgment, the rule must be written down well enough that two agents fill it the same way. ## Never edit these `mech_shared.yaml` and `history.yaml` are vendored. A test pins their hashes. Changes go upstream to the fleet canon and come back by re-vendoring. ## Making the change 1. Edit `src/ingestmech/schema/ingestmech.yaml`. Give every new element a `description`. 2. For an ontology-bound slot, use the descriptor pattern: a `Descriptor` subclass whose `term` binds to a dynamic enum with a verified root. See the `ontology-terms` skill. 3. For evidence, reuse `EvidenceItem`. It carries the `implements` markers the reference validator looks for. 4. A new prefix goes in the schema's `prefixes` with its full URI, looked up, not composed. RDF exports turn CURIEs into IRIs through it, and `just export` fails on one that does not expand. A slot that means what a standard property means gets that `slot_uri` (`dcterms:description`, `skos:altLabel`). 5. A new section whose items bind terms gets an entry in `conf/kgx.yaml` (predicate and category), or the KGX export leaves it out. 6. Update `tests/data/example_record.yaml` to exercise the change. 7. Run `just lint`, `just test` and `just export`. ## Migrating records A change that makes existing records invalid ships with its migration in the same pull request: 1. Write the migration as a script under `scripts/migrations/`, named for the change. It reads each record, transforms it, and writes through `write_validated_record` in `src/ingestmech/records.py`. 2. Run it. Run `just validate-all`. Commit the script and the records. 3. Add one history record with `--kind schema` describing the change, and one with `--kind record` per record changed by hand. ## Afterward Update `docs/DOMAIN.md` so the design record matches the schema. Update `CLAUDE.md` if a rule changed.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · monarch-initiative/mechmaker | 90 | BSD-3-Clause |
| monarch-initiative/dismech | 100 | BSD-3-Clause |
| monarch-initiative/mechmaker | 90 | BSD-3-Clause |
| monarch-initiative/mechmaker | 90 | BSD-3-Clause |
Database snapshot: 13.11.2026 · package version 3cde83b2873f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90review-record
Audit one IngestMech record, or a pull request that changes records, without editing anything. Use when asked to review, check, audit or assess an ingest record or a curation pull request. Produces findings; changes nothing. - 100curate-record
Create or improve one IngestMech ingest record end to end: scaffold, research, bind terms, quote evidence, validate, record history. Use when asked to add, curate, fill in, expand or fix an ingest record in data/ingests/. Not for read-only audits (use review-record) or for… - 100dt-data
用 dt CLI 读写动态表格里的数据:先查域、再按描述挑表、看字段说明,然后查询、插入(含子表嵌套、批量)、更新、删除、挂附件(agent 产出物的绝对路径)、看变更历史、查记录之间的关联。用户说「记一条任务」「查一下进行中的任务」「把任务改成完成」「写一条日志」「把产出物挂到任务上」「看看某个项目里有什么数据」「这个任务关联了哪些东西」「谁引用了它」时使用。建域、建表、改字段用 dt-schema。