feat: people live on their organization's page until promoted; organization subtype, member-of, broken_anchors lint (#172)
CI / verify (push) Successful in 5m26s
CI / pwsh (push) Successful in 2m8s
Release / release (push) Successful in 34s

Files changed:
- CHANGES.md
- README.md
- VERSION
- instructions/kb-profiles.md
- instructions/link-taxonomy.md
- instructions/page-lifecycle.md
- instructions/wiki-ingest/SKILL.md
- instructions/wiki-lint/SKILL.md
- kb/entities/COLLECTION.md
- kb/entities/INDEX.md
- kb/entities/organizations/E3DC GmbH.md
- kb/entities/people/E3DC GmbH.md
- kb/index.md
- kb/log.md
- tools/CONTRACT.md
- tools/chemenu/commands/lint.py
- tools/chemenu/kb_scan.py
- tools/chemenu/lint_core.py
- tools/chemenu/tests/test_lint.py
- tools/chemenu/tests/test_new_page.py
- tools/chemenu/tests/test_type_resolver.py
- tools/chemenu/tests/test_types_cmd.py
- types/entity.md
- types/entity.organization.md
- types/entity.person.md
- types/entity.schema.yaml

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Opus 5.5 committed 2026-10-04 10:51:46 +02:00
1 parent f3ccbd86f9
commit 4ec22d376d
25 files changed
+368 -30

No files matched your search

+44 -4
View File
@@ -1,7 +1,7 @@
---
type: types/instruction.md
name: page-lifecycle
description: Rename a page, delete one, or drop a single cross-reference without breaking the links that point at it.
description: Rename a page, delete one, move it, promote a section of one to a page of its own, or drop a single cross-reference - without breaking the links that point at it.
---
# Rename, delete, or unlink a page
@@ -20,6 +20,7 @@ one and leaves the others pointing at nothing.
- [Rename](#rename)
- [Delete](#delete)
- [Move](#move)
- [Promote a section to its own page](#promote-a-section-to-its-own-page)
- [Drop a single reference](#drop-a-single-reference)
- [Afterwards](#afterwards)
- [Scope](#scope)
@@ -88,6 +89,45 @@ in case or Unicode normalization - is refused, not silently overwritten. That on
pre-existing duplicate-title collision, which `lint`'s **Duplicate Titles** and **Unportable
Titles** findings report separately.
## Promote a section to its own page
A subject can live as a section of another page until it earns its own - the shipped `entities`
profile does this with people on their organization's page. Promoting one is not a move: a new
page is born, and a section shrinks. No command does it in one step, because two of its steps
are judgments - which edges meant the person and which the organization - and it is rare.
1. **Create the page** from the section's content, with the tool:
```bash
tools/wikitool new entity --name "<Name>" --set entity_type=person --set provenance=<value>
```
Move the section's prose into it, and its citations with `cite add` against the same sources.
2. **Shrink the section** on the parent page to one bullet under the heading that held it -
`- [[<Name>]] - <role>` - and drop the section's own heading. With the heading gone, any link
step 4 misses stops resolving and step 5 reports it, instead of landing quietly on a stub.
3. **Connect the two** - for a person, the membership edge on the new page:
```bash
tools/wikitool xref add --a "<Name>" --b "<Organization>" --rel member-of
```
4. **Find every link that meant the section**, and point it at the new page:
```bash
tools/wikitool search "[[<Organization>#<Name>"
```
Search is literal by default, so the brackets need no escaping. Rewrite each hit to
`[[<Name>]]`, and move any edge on those pages that meant the person - `consults:
<Organization>` for a client contact, say - from the organization to the new page with
`xref remove` and `xref add`. An edge that meant the organization as a whole stays.
5. **Check** - `tools/wikitool lint` reports no `broken_anchors` and no `broken_links`. Then close
out as for a new page.
## Drop a single reference
```bash
@@ -101,9 +141,9 @@ hand-edit gets cleared. Idempotent.
## Afterwards
Always close out with [publish-cycle.md](publish-cycle.md), using `--op rename`, `--op delete`,
or `--op move`. A move changed no reference, so run `wikitool index rebuild` rather than
`sources rebuild-index` - the catalog is built from where a page's file sits, and nothing else
about it moved. Then confirm nothing was left dangling:
`--op move`, or `--op create` for a promotion. A move changed no reference, so run
`wikitool index rebuild` rather than `sources rebuild-index` - the catalog is built from where a
page's file sits, and nothing else about it moved. Then confirm nothing was left dangling:
```bash
tools/wikitool lint