Skip to content

Purge the legacy status vocabulary from docs; delete a dead seed file - #322

Merged
ProfessorPolymorphic merged 2 commits into
mainfrom
fix/taxonomy-docs-and-dead-seed
Jul 27, 2026
Merged

Purge the legacy status vocabulary from docs; delete a dead seed file#322
ProfessorPolymorphic merged 2 commits into
mainfrom
fix/taxonomy-docs-and-dead-seed

Conversation

@ProfessorPolymorphic

Copy link
Copy Markdown
Collaborator

Part of making the ADR 0001 taxonomy the only lifecycle vocabulary on the site. This PR deliberately does not touch the admin registry files — a background task is already working those (app/admin/registry/[id]/page.tsx, app/admin/registry/page.tsx, app/api/registry/route.ts).

Docs — my miss in #321

#321 refreshed these pages but left two lines still describing the pre-ADR-0001 lifecycle:

  • /docs/api-reference documented the registry PATCH status parameter as idea | approved | in-development | staging | production | retired — the legacy submission lifecycle, not the operational ladder. Now lists the twelve real values and states the consequence of sending anything else: the column is plain TEXT with no CHECK, so a bad value writes successfully and renders as Exploring.
  • /docs/architecture had two contradictory status lines in the same applications block — the legacy one it always had, and the correct twelve-value one Refresh the technical docs against the current codebase #321 added below it. Removed the legacy line.

db/seed_applications.sql — deleted

An unreferenced, byte-identical copy of migration 004, whose header says:

-- Run with: psql "$DATABASE_URL" -f db/seed_applications.sql

That is precisely what #312 established as forbidden and what /docs/deployment warns against. Running it would TRUNCATE applications and repopulate every row with 2026-era statuses like in-development — values that no longer exist in the taxonomy and that publicStageFromStatus() buckets as Exploring. A loaded gun with instructions attached, referenced by nothing.

Data is already clean

Checked both databases directly rather than assuming:

rows statuses
dev 29 building 7 · production 5 · approved 5 · piloting 3 · paused 3 · tracked 3 · prototype 1 · archived 1 · scoping 1
prod 15 building 5 · production 4 · tracked 2 · piloting 2 · paused 2

Every row on the current taxonomy. No data repair needed — the exposure was a form that could write bad values, not values already written.

Left alone deliberately

Applied migrations 003 and 004 still contain the legacy vocabulary in comments and seed data. They are history, they have already run, and rewriting them would misrepresent what was applied.

Note for the admin-registry work

While surveying I found there are four hardcoded status lists, and app/admin/registry/new/page.tsx already has the correct taxonomy — someone updated that copy and not [id]/page.tsx. That is the argument for deriving the list from lib/portfolio.ts (e.g. Object.keys(OPERATIONAL_LABEL), which tsc keeps exhaustive) rather than fixing one more copy by hand.

🤖 Generated with Claude Code

ProfessorPolymorphic and others added 2 commits July 27, 2026 07:18
Closes the /docs drift tracked since May as #94, #96, and #97.

API Reference (#94) documented the submissions and registry endpoints
and missed three others entirely: POST /api/ask (the site assistant),
POST /api/similarity/preview, and POST /internal/sync. All three are now
covered with their real contracts — /api/ask's rate limits and headers,
its 200-with-fallback behaviour on a MindRouter outage (it deliberately
does not 500, so the chat widget degrades), the 0.2-vs-0.3 threshold that
distinguishes the preview endpoint from the persisting one, and the sync
trigger's 409-when-in-flight. Verified against the route handlers, and
all twelve routes under app/api and app/internal now appear.

Architecture (#96) described the migration-003 schema: five tables, no
lifecycle columns, no friction ledger, no ClickUp projections, no request
registry, no agent log. It now covers all seventeen tables, the ~40
columns added to applications since, and why the enums carry no CHECK
constraints (the typed modules and verify:portfolio are the enforcement,
so adding a lifecycle state stays a governance change rather than a
migration). The component diagram showed a browser-calls-API architecture
that was never true of most of this site — it now says plainly that pages
are server components reading lib/* directly, and that the route handlers
exist for mutations, the agent, and the sync trigger.

Admin Guide (#97) listed a six-state lifecycle superseded by ADR 0001.
It now carries the real twelve-state ladder and states where the admin
surfaces actually sit: registry edits are overwritten by the next
seed:portfolio TRUNCATE, status narrative comes from ClickUp, requests
live in the tech_requests registry. Submissions review is the part that
is still the live workflow.

Also documents a defect found while checking that page rather than
papering over it: STATUS_OPTIONS in app/admin/registry/[id]/page.tsx
still offers the legacy submission states and the pre-ADR-0001
capitalised union. applications.status is plain TEXT with no CHECK, so
those values write successfully, and publicStageFromStatus() buckets
anything unrecognised as Exploring — an admin can silently misfile a
project on /portfolio, and verify:portfolio won't catch it because the
verifier reads lib/portfolio.ts, not the database. The page now warns
against using that control until the list is fixed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…file

Follow-up to #321, which refreshed these pages but left two lines still
describing the pre-ADR-0001 lifecycle — my miss.

/docs/api-reference documented the registry PATCH `status` parameter as
"idea | approved | in-development | staging | production | retired". That
is the legacy submission lifecycle, not the operational ladder. It now
lists the twelve real values and states the consequence of sending
anything else: the column is plain TEXT with no CHECK, so a bad value
writes successfully and renders as Exploring.

/docs/architecture had two contradictory `status` lines in the same
applications block — the legacy one it always had, and the correct
twelve-value one #321 added lower down. Removed the legacy line.

Deletes db/seed_applications.sql. It is an unreferenced, byte-identical
copy of migration 004 whose header instructs the reader to run it with
`psql "$DATABASE_URL" -f db/seed_applications.sql`. That is precisely
what #312 established as forbidden and what /docs/deployment warns
against: it would TRUNCATE applications and repopulate every row with
2026-era statuses like 'in-development', which no longer exist in the
taxonomy and which publicStageFromStatus() buckets as Exploring. A
loaded gun with instructions attached, referenced by nothing.

Verified both databases are already clean — every row in dev (29) and
prod (15) carries a current-taxonomy value, so no data repair is needed.

The applied migrations 003 and 004 still contain the legacy vocabulary in
comments and seed data. Left alone deliberately: they are history, they
have already run, and rewriting them would misrepresent what was applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Vendored strategic-plan submodule is behind upstream

The vendored submodule pointer at vendor/strategic-plan is pinned to 434de6e, which was committed 117 day(s) ago (threshold: 14 days).

The submodule is pinned at upstream main HEAD, but that HEAD itself is older than the threshold. No action needed in this repo — upstream simply hasn't moved.

This is an advisory comment from strategic-plan-pr-summary.yml. It does not block the build. Threshold is configurable via the STALE_AFTER_DAYS workflow env var (currently 14). This comment is updated in place across pushes.

@ProfessorPolymorphic
ProfessorPolymorphic merged commit 1e4e1e2 into main Jul 27, 2026
7 checks passed
@ProfessorPolymorphic
ProfessorPolymorphic deleted the fix/taxonomy-docs-and-dead-seed branch July 27, 2026 16:37
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.

1 participant