120 lines
4.9 KiB
Markdown
120 lines
4.9 KiB
Markdown
# CHRNX Projects as First-Class Entities — Design
|
|
|
|
<!-- markdownlint-disable MD013 -->
|
|
|
|
**Status:** Approved 2026-08-15
|
|
**Supersedes:** the `projects` topic term as a grouping mechanism
|
|
|
|
## Problem
|
|
|
|
`projects` is a topic term, so it cannot separate the thing from the writing about it.
|
|
Green Tea is a project with a repository, a published package, and a release status.
|
|
The posts about Green Tea are a different kind of object. Today both collapse into one
|
|
term, and the term cannot hold a repository URL or a cover.
|
|
|
|
That collapse already produced an inconsistency. Announcement posts landed in
|
|
`projects` while deep dives on the same product landed in `code`:
|
|
|
|
| Product | Announcement | Deep dive |
|
|
|---|---|---|
|
|
| Expressive Tea | 692 (`projects`) | 695 (`code`) |
|
|
| Ailed | 678 (`projects`) | 716 (`code`) |
|
|
| Green Tea | 838 (`projects`) | 730 (`code`) |
|
|
|
|
A reader browsing Green Tea finds half its material. The split exists only because one
|
|
term was doing two jobs.
|
|
|
|
Music and podcasts already solved this. `chrnx_release` is the album, `chrnx_show` is the
|
|
programme, and posts reference them. Projects never got the same treatment.
|
|
|
|
## Solution
|
|
|
|
Promote projects to an entity taxonomy modelled on `chrnx_release`, and return `code`
|
|
to being a general topic about writing code.
|
|
|
|
### Content model
|
|
|
|
New taxonomy `chrnx_project`, registered through the existing
|
|
`chrnx_register_editorial_taxonomy` contract with `rest_base` `project`.
|
|
|
|
Seeded terms: `green-tea` (Green Tea), `ailed` (Ailed).
|
|
|
|
Term meta, mirroring `chrnx_release`:
|
|
|
|
| Meta key | Type | Sanitizer | Purpose |
|
|
|---|---|---|---|
|
|
| `chrnx_project_cover` | integer | `absint` | Attachment ID for the project cover |
|
|
| `chrnx_project_status` | string | `sanitize_text_field` | Free text, e.g. `Beta`, `Activo`, `Archivado` |
|
|
| `chrnx_project_repo` | string | `chrnx_sanitize_https_url` | Source repository |
|
|
| `chrnx_project_site` | string | `chrnx_sanitize_https_url` | Documentation or product site |
|
|
| `chrnx_project_package` | string | `chrnx_sanitize_https_url` | Where the package lives |
|
|
|
|
`chrnx_project_package` is deliberately one generic URL rather than an npm-specific
|
|
field. Green Tea publishes to npm, a Rust project would publish to crates.io, a Python
|
|
one to PyPI. One URL covers all three; a per-registry field list would need editing
|
|
every time a new language shows up.
|
|
|
|
Cover falls back to shared placeholder art when unset, exactly as
|
|
`chrnx_release_cover` falls back to `placeholder-release`.
|
|
|
|
### Retired
|
|
|
|
`chrnx_project_featured` (post meta), `chrnx_get_selected_project_ids()`, and the
|
|
`chrnx/selected-work` block are removed.
|
|
|
|
Music proves they are unnecessary. `music-landing` lists every release through
|
|
`chrnx/release-list` with no notion of a featured release, and `home-music` carries no
|
|
list at all. With two or three projects, picking a favourite is ceremony, not curation.
|
|
|
|
The `projects` topic term is retired. Posts that carried it move to `code`, and grouping
|
|
moves to their project term.
|
|
|
|
### Surfaces
|
|
|
|
| Surface | Today | After |
|
|
|---|---|---|
|
|
| `/projects/` page (740) | `chrnx/home-projects` pattern + `journal-stream {"topic":"projects"}` | `chrnx/projects-landing` pattern |
|
|
| Project archive | none | `templates/taxonomy-chrnx_project.html` |
|
|
| Home section | `chrnx/selected-work` inside `home-projects` | banner copy only, mirroring `home-music` |
|
|
|
|
The landing gets a character-stage banner in the established three-layer shape
|
|
(atmosphere, content, art), followed by `chrnx/project-list`.
|
|
|
|
Landing copy, in the author's voice:
|
|
|
|
> **Proyectos**
|
|
> Aquí va lo que mi cerebro tira en formato de código.
|
|
> Una noche me agarra la loquera y sale código. A veces sirve, a veces nomás me deja
|
|
> dormir. Lo que sobrevive lo dejo aquí, con su repo y su estado real, sin adornos.
|
|
|
|
### Debt repaid alongside
|
|
|
|
`chrnx_show` has no `taxonomy-chrnx_show.html` and falls through to the generic archive,
|
|
so a podcast programme page never renders its own detail block. Adding
|
|
`templates/taxonomy-chrnx_show.html` alongside the project template closes that gap
|
|
while the same shape is fresh.
|
|
|
|
## Migration
|
|
|
|
Pages store pattern references rather than expanded markup, so theme changes propagate
|
|
without touching stored content. Verified on production:
|
|
|
|
```text
|
|
740 /projects/ <!-- wp:pattern {"slug":"chrnx/home-projects"} /-->
|
|
<!-- wp:chrnx/journal-stream {"topic":"projects"} /-->
|
|
743 /music/ <!-- wp:pattern {"slug":"chrnx/music-landing"} /-->
|
|
```
|
|
|
|
One stored block breaks: `journal-stream {"topic":"projects"}` on page 740, because its
|
|
topic disappears. Page 740 becomes a single `chrnx/projects-landing` pattern reference.
|
|
|
|
Six published posts need project terms assigned and their topic corrected. The exact
|
|
post-to-project mapping is supplied by the author, not inferred.
|
|
|
|
## Non-goals
|
|
|
|
- No custom post type. Projects are terms, like releases and shows.
|
|
- No per-registry package fields.
|
|
- No project-level prose page beyond the term description.
|
|
- No changes to `chrnx_release`, `chrnx_show`, Related Stories, or theme preference.
|