ontoref-code/install/resources/templates/glossary/ontoterm-update.md

46 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

---
description: Update an existing glossary term (definition, aliases, examples, verify status)
argument-hint: "<term-id> [field-hint: definition|aliases|examples|forbidden|verify]"
allowed-tools: Bash, Read, Edit
---
# Update an existing glossary term
## Discovery
1. Run `./ontoref describe term <id> --fmt json` to load the current state.
If the term doesn't exist, redirect the user to `/ontoterm-propose` and stop.
2. Identify whether the term lives in:
- `reflection/defaults/glossary.ncl` (seed — touch only with explicit user
authorization; changes propagate to consumer projects)
- `.ontology/glossary.ncl::project_terms` (project-specific — safe to edit)
## What can be updated
- `definition.en` / `definition.es` — improve wording, fix mistakes
- `aliases` — add an alternate spelling encountered in conversation
- `examples.en` / `examples.es` — add a new usage from the current session
- `forbidden.en` / `forbidden.es` — add an antipattern encountered
- `related_terms` / `related_nodes` — wire to other entries
- `verified` — flip `false → true` to promote a draft (REQUIRES user
confirmation; promotion is a deliberate act)
- `notes` — internal annotation, not rendered
## Important rules
- DO NOT change `id` — it's the stable handle. Add an alias instead.
- DO NOT change `category` without confirming the conceptual recategorization.
- DO NOT silently drop `forbidden` or `examples`. If you need to remove an
entry, justify it to the user.
- If editing the seed (`reflection/defaults/glossary.ncl`), warn the user:
changes propagate to all projects that apply migration 0019.
## After editing
1. `nickel export --import-path . --format json .ontology/glossary.ncl > /dev/null`
→ verify parse, report exit code.
2. `./ontoref describe term <id>` → confirm the visible result.
3. If `verified` was flipped to `true`, note it explicitly in the response.
Arguments received: `$ARGUMENTS`