# Spec boards: GitHub-aligned issues in Markdown

> Draft PRD for spec boards, a content type that keeps GitHub-style issues as numbered Markdown files in a fixed directory layout, with GitHub's statuses, types, fields, labels, milestones, sub-issues and dependencies, statically built views, enforced numbering, and the OINK Design section as the first board.

---

LLMS index: [llms.txt](/llms.txt)

---

> [!WARNING] Draft, 2026-12-03
> This proposal describes behavior that does not exist. It is not a
> configuration reference. Current behavior is defined by the
> [Shell](/docs/design/shell/) and [Architecture](/docs/design/architecture/)
> contracts.

| Record | Value |
| --- | --- |
| Status | Draft PRD, second revision, 2026-12-03; not accepted and not implemented |
| Owner | OINK maintainers |
| Owner decisions so far | The working name is `spec`; GitHub's nine default labels are built in; the OINK Design section becomes the first board ([decision log](#decision-log)) |
| Alignment baseline | GitHub Issues as documented on 2026-12-03: issue statuses (public preview since 2026-11-23), issue types, issue fields, sub-issues, issue dependencies and issue templates; repository boards and the Table, Board and Roadmap layouts of GitHub Projects |
| Form | A `spec` content type in the documentation family, rendered in the shared reading shell. A board can be a top-level section or a section inside a docs tree |
| New public API | Content type `spec`; the board layout with its reserved directories `issues/` and `templates/`; the issue number rule; issue front matter keys ([mapping](#mapping)); `params.ui.spec` and a board's `spec` map; opt-in output format `SPECJSON`; archetypes `spec` and `spec-board` |
| Runtime | None required; one optional chunk for view tabs, table sorting and date-relative hints |
| Affected contracts | [Shell](/docs/design/shell/), [Architecture · outputs and runtime](/docs/design/architecture/#outputs-and-runtime), the configuration reference, the generated front matter and site parameter schemas, all 32 locales, and the structure of this Design section |
| Related | [oink serve](/docs/design/proposals/oink-serve/) (later browser write-back), [OINK CLI roadmap](/docs/design/proposals/oink-cli-roadmap/) (spec commands), [knowledge graph G1](/docs/design/proposals/knowledge-graph/) (backlinks as "mentioned in") |

## Summary {#summary}

A spec board is a section of Markdown files that reads like a GitHub
repository's issues. It has one fixed layout. The board page and the fixed
documents sit at the top. Every issue sits in one flat `issues/` directory, and
issue templates sit in `templates/`. An issue's number is the four-digit prefix
of its file name. Its front matter uses GitHub's names: `status`, `labels`,
`assignees`, `milestone`, `priority` and so on.

```text
content/spec/                     the board
├── _index.md                     board page: README and configuration
├── RULE.md                       RULE: the charter agents read first
├── ARCH.md                       ARCH: the architecture to respect
├── issues/                       every issue, flat and numbered
│   ├── _index.md                 the issue list
│   ├── 0001-local-search.md      issue #1
│   ├── 0001-local-search.zh.md   its translation
│   └── 0042-spec-boards/         issue #42, a leaf bundle with its images
│       └── index.md
└── templates/                    issue templates
    └── feature.md
```

```yaml
---
title: Render spec boards
status: In progress
issue_type: Feature
labels: [enhancement]
assignees: [alice]
milestone: v1.9.0
priority: High
start_date: 2026-12-05
target_date: 2026-12-20
parent: 12
blocked_by: [7, 9]
date: 2026-12-03
---
```

The board page renders saved views laid out as a board, a table or a roadmap.
The issue list renders every issue, the counterpart of a repository's Issues
tab. Git is the database, a commit is the transaction and history is the audit
log. The theme only reads files. Agents read and write the same files that
people read as pages, with no API, token or service between them.

The rules fit in two lines. **The place of a file decides its kind, and the
name of an issue decides its number.** Mistakes are reported when the archetype
creates a file, on every build, and optionally before a merge.

## Background and evidence {#background}

**The request.** On 2026-12-03 the owner asked for a file-based board that does
what GitHub Projects and Issues do without depending on GitHub. Specs drive the
work, each item has a natural number, status is kept in front matter, RULE and
ARCH are fixed charter pages, and a companion CLI may manage files later. The
owner then asked that the data model follow GitHub's field names and available
statuses. In a second round the owner kept the working name, chose to build in
GitHub's default labels, and named the OINK Design section as the first board.
The owner also asked for two more parts of the design. One is a numbering
scheme that users can actually be held to, with the number fixed at the front
of the name. The other is a designed directory layout instead of an unstated
flat folder.

**GitHub moved toward a model that files can mirror.** On 2026-11-23 GitHub put
issue statuses into public preview. Seven statuses, each in a category, now
decide whether an issue is open or closed and why it was closed; setting a
status through the REST API updates `state` and `state_reason`. The same release
added repository boards, which are saved views that render one column per
status. Issue types (default Task, Bug, Feature), issue fields (default Priority,
Effort, Start date, Target date), sub-issues, "blocked by" dependencies and issue
templates were already in place. One key, `status`, now decides the column, the
open or closed state and the closing reason. That is what makes a faithful
file-based mirror practical.

**Prior art covers the parts separately.**

- *File-based trackers* keep one Markdown or YAML file per issue in the
  repository. Examples are ditz (2008), git-issue, git-issues, tisket, ditz2 and
  [Backlog.md](https://github.com/MrLesk/Backlog.md), which adds a terminal
  board, a local web board, decisions, docs and an MCP server for agents. All of
  them are CLIs or local servers. None publishes a static reading site.
  Backlog.md moves finished tasks into other directories, so a task's path
  changes with its state.
- *Spec-driven development tools* use the same three parts proposed here.
  [Spec Kit](https://github.com/github/spec-kit) has a constitution
  (`memory/constitution.md`) and numbered `specs/001-…/` folders. Kiro has
  steering files (`product.md`, `tech.md`, `structure.md`) and `.kiro/specs/`.
  OpenSpec keeps current `specs/` beside proposed `changes/`. They generate files
  and drive workflows, but they have no board and no reading site.
- *Numbered proposal series* show that numbered Markdown with status metadata
  and a generated index works at scale: PEPs, EIPs, Swift Evolution, Rust RFCs,
  Kubernetes KEPs, and ADRs published with log4brains. All of them put the
  number at the front of the name. They assign it through a person or a tool:
  PEP editors assign numbers, a Rust RFC takes its pull request number when it
  merges, a KEP takes its tracking issue number, and adr-tools and Spec Kit's
  scripts compute the next number. None checks uniqueness when the site builds.
- A search on 2026-12-03 found no Hugo theme that provides this.

**OINK already uses the pattern by hand.** This Design section holds 18
proposals and 24 dated research records. They carry `design_kind`,
`design_status`, `proposal_date` and `last_verified`, and two index pages keep
tables of them by hand. An inventory on 2026-12-03 found two proposals whose
front matter status disagrees with the proposals index
([findings](#oink-design-status)). A board would generate those tables and give
each record one status.

**Consumer evidence.** On 2026-12-03 no primary Hugo checkout under `~/www` or
`~/pgsty` had a `content/spec`, `content/issues` or `content/proj` directory, so
a new `spec` type collides with no maintained site.

## Goals and non-goals {#goals}

### Goals {#goals-list}

1. **One file is one issue, in GitHub's model.** An issue exported from GitHub
   and an issue written by hand use the same keys and the same values: status
   names and categories, closing reasons, issue types, issue fields, labels,
   milestones, parent and sub-issues, and blocked-by relations.
2. **One fixed layout.** A file's kind follows from where it is and an issue's
   number from its name. People and agents can find, create and check files
   with `ls` alone.
3. **Numbers are enforceable.** Violations are reported when the file is
   created, on every build, and optionally before a merge. Nothing depends on
   people remembering a convention.
4. **Views are built statically.** Board, Table and Roadmap views are rendered
   at build time. They can be read without JavaScript, printed, and indexed by
   search.
5. **Documents come first.** RULE, ARCH and the other documents come before the
   issues in every listing and output. They are the charter that agents read
   before they touch an issue.
6. **Outputs are ready for agents.** Each issue and board has a Markdown output,
   and an opt-in JSON output follows the shape of GitHub's REST issue objects.
7. **Hugo is enough.** Theme archetypes create boards and issues and check the
   number. A CLI can add convenience but is never required.
8. **Invalid input warns and falls back.** `hugo server` stays usable.
9. **The first board is OINK Design.** The design is accepted only when it can
   carry this section's real records without losing information.

### Non-goals {#non-goals}

- Write-back from the browser, such as dragging cards or editing forms. Moving a
  card means editing a line of front matter. A served write path belongs to
  [oink serve](/docs/design/proposals/oink-serve/), not to the theme.
- Comments, reactions, notifications, subscriptions, locking, pinned issues,
  participants and permissions.
- Pull requests and the status transitions GitHub drives from linked pull
  requests and assignment.
- The parts of GitHub Projects beyond view layouts: cross-repository
  aggregation, draft issues, iteration fields, insights charts and project
  status updates. These are [phase 3](#phases) candidates.
- Synchronization with GitHub. Import and export belong to the CLI track, which
  has its own lifecycle.
- Any build-time meaning of "now". A static page cannot know today, so overdue
  marks and the roadmap's today line are client-side hints only.
- Replacing a public bug intake. Readers who cannot commit to the repository
  cannot open issues on a board.

## Alignment model {#alignment}

### Mapping {#mapping}

Front matter keys use GitHub's REST names in snake case. Three exceptions are
forced by Hugo: `type` selects a page's layout, `date` and `lastmod` are Hugo's
own dates, and `authors` is OINK's existing author key.

| GitHub concept | GitHub API name | Board front matter | Notes |
| --- | --- | --- | --- |
| Issue number | `number` | Prefix of the issue's file or bundle name in `issues/`, such as `0042-` | Sole authority; displayed as `#42`; see [numbering](#numbering) |
| Title | `title` | `title` | |
| Body | `body` | Markdown body | |
| Status | `status` | `status` | Sole workflow authority ([statuses](#statuses)) |
| State | `state` | derived | Accepted as input only when `status` is absent |
| Closing reason | `state_reason` | derived | Same as `state` |
| Issue type | `type` | `issue_type` | Hugo reserves `type`; the name follows GraphQL `issueType` |
| Labels | `labels` | `labels` | List of names |
| Assignees | `assignees` | `assignees` | List of logins; resolved through the `authors` taxonomy when a term exists |
| Milestone | `milestone` | `milestone` | Milestone title |
| Author | `user` | `authors` | OINK's existing key; the first entry is the issue's author |
| Created | `created_at` | `date` | Hugo's date; a future date hides the page unless the site builds future content |
| Updated | `updated_at` | `lastmod` | From Git when `enableGitInfo` is on |
| Closed | `closed_at` | `closed_at` | A plain parameter, not a Hugo date |
| Closed by | `closed_by` | `closed_by` | Optional login |
| Parent issue | `parent_issue_url` | `parent` | Issue number |
| Sub-issues | `sub_issues_summary` | derived from `parent` | |
| Blocked by | `blockedBy` | `blocked_by` | List of issue numbers |
| Blocking | `blocking` | derived from `blocked_by` | |
| Duplicate of | `duplicate_issue_id` | `duplicate_of` | Issue number; required by a status in the `duplicate` category |
| Issue fields | `issue_field_values` | One flat key per field: `priority`, `effort`, `start_date`, `target_date`, custom keys | See [issue fields](#issue-fields) |
| Development | Development sidebar | `development` | List of URLs to pull requests, branches or commits on any forge |
| Comments, reactions, lock, pin, draft | various | none | Not mirrored; see [non-goals](#non-goals) |

The vocabularies that GitHub keeps at repository or organization level are
declared once per board:

| GitHub vocabulary | Where GitHub keeps it | Board configuration key | Inheritance |
| --- | --- | --- | --- |
| Statuses (fixed in the preview; a project's Status options are editable) | Issue statuses, Projects | `spec.statuses` | Replaces |
| Issue types | Organization or personal account | `spec.issue_types` | Replaces |
| Issue fields | Organization or personal account | `spec.fields` | Replaces |
| Labels | Repository | `spec.labels` | Merges by name |
| Milestones | Repository | `spec.milestones` | Merges by title |
| Saved views and repository boards; project views | Repository, Projects | `spec.views` | Replaces |
| Issue templates | `.github/ISSUE_TEMPLATE/` | The board's `templates/` directory | Per board |

### Statuses {#statuses}

The default list is GitHub's seven issue statuses, in GitHub's order.

| Status | Category | State | Closing reason |
| --- | --- | --- | --- |
| Backlog | `backlog` | open | |
| Todo | `planned` | open | |
| In progress | `started` | open | |
| In review | `started` | open | |
| Done | `completed` | closed | `completed` |
| Not planned | `not_planned` | closed | `not_planned` |
| Duplicate | `duplicate` | closed | `duplicate` |

1. **`status` is the only authority.** `state` and `state_reason` are derived
   from the status category, as GitHub derives them when a status is set.
2. **Matching follows GitHub's project sync.** Case, extra spaces and emoji are
   ignored, so `In Progress` and `in progress` both select `In progress`. Pages
   always show the declared name.
3. **A missing status is derived.** An issue with `state: closed` takes the
   first status whose category matches its `state_reason`: `completed` or an
   absent reason gives Done, `not_planned` gives Not planned, `duplicate` gives
   Duplicate. Every other issue takes the first status in the `backlog`
   category, which matches GitHub giving new and reopened issues Backlog.
4. **Disagreement warns.** If `status` and `state` or `state_reason` are both
   present and disagree, the build warns and `status` wins. GitHub's API rejects
   such a mismatch.
5. **An unknown status warns.** The issue is treated as open and placed in a
   **No status** column. GitHub boards also show items without a status.
6. **Duplicates need a target.** A status in the `duplicate` category requires
   `duplicate_of`. Without it the build warns and the page shows "Closed as
   duplicate" with no link.
7. **Boards may replace the list.** Each entry needs a `name` and one of the six
   categories, and may add a `color` and a `description`. An entry without a
   valid category is dropped with a warning. GitHub Projects allow custom Status
   options in the same way. The category, not the name, carries the meaning, so
   a status such as `Sandbox` in the `backlog` category behaves like Backlog.

```yaml
spec:
  statuses:
    - {name: Sandbox, category: backlog, color: gray}
    - {name: Todo, category: planned}
    - {name: In progress, category: started, color: yellow}
    - {name: Done, category: completed, color: purple}
    - {name: Dropped, category: not_planned}
```

GitHub's statuses are a public preview and may change. Categories are the
stable anchor here. If GitHub renames a status, only the theme's default list
changes, in a release with a migration note.

### Issue types {#issue-types}

The default types are GitHub's organization defaults: **Task**, **Bug** and
**Feature**. Each has a `name`, a `description` and a `color` taken from
GitHub's named palette: gray, blue, green, yellow, orange, red, pink and
purple. The default descriptions and colors must be checked against GitHub
before implementation.

An issue with an undeclared `issue_type` builds with a warning and renders
untyped. A board can declare its own list. A spec-driven board might use
Research, Design, Feature, Bug and Verify. The type names the kind of
deliverable, and the status names how far the work has gone.

A file that writes GitHub's own `type:` key changes the page's Hugo content
type. The page then leaves the board and renders with another layout. The
board's resolver looks for pages under the board whose content type differs
from the board's and whose `type` value matches a declared issue type. For each
one it warns: use `issue_type`.

### Issue fields {#issue-fields}

The default fields are GitHub's four defaults:

| Field | Key | Type | Options |
| --- | --- | --- | --- |
| Priority | `priority` | single select | Urgent, High, Medium, Low |
| Effort | `effort` | single select | High, Medium, Low |
| Start date | `start_date` | date | |
| Target date | `target_date` | date | |

The field types are GitHub's: `text`, `number`, `date`, `single_select` and
`multi_select`. A field's key is its name in lower case, with spaces and hyphens
turned into underscores, unless the field declares an explicit `key`. Dates are
written `YYYY-MM-DD`. Option names are matched the same way as statuses.

A field whose key collides with a reserved key warns and is dropped. Reserved
keys are Hugo's front matter fields, the issue keys in the [mapping](#mapping),
and OINK page parameters. An invalid value, or an option that is not declared,
warns and leaves that field empty for that issue.

### Labels and milestones {#labels-and-milestones}

Labels and milestones are open vocabularies. Any name works without being
declared, and a declaration only adds a color, a description or a due date.
Statuses, issue types and single-select options are closed vocabularies because
they control state, grouping and order.

The theme ships the nine labels GitHub gives a new repository, an owner
decision of 2026-12-03:

| Label | Color | Description |
| --- | --- | --- |
| `bug` | `d73a4a` | Something isn't working |
| `documentation` | `0075ca` | Improvements or additions to documentation |
| `duplicate` | `cfd3d7` | This issue or pull request already exists |
| `enhancement` | `a2eeef` | New feature or request |
| `good first issue` | `7057ff` | Good for newcomers |
| `help wanted` | `008672` | Extra attention is needed |
| `invalid` | `e4e669` | This doesn't seem right |
| `question` | `d876e3` | Further information is requested |
| `wontfix` | `ffffff` | This will not be worked on |

Declarations merge by name from the theme to `params.ui.spec.labels` to the
board's `spec.labels`. A board adds labels or recolors a default without
repeating the other eight. An unused default label costs nothing, because pages
show only the labels that issues use. The descriptions are translated into all
32 locales.

Label colors are six-digit hex values, with or without `#`, as on GitHub. Pages
show a label's color only as a small swatch beside text in the preset's own ink.
Author colors never set chip backgrounds, so contrast, dark mode and forced
colors stay under the preset's control.

A milestone declaration has `title`, `description`, `due_on` and `state` (open
or closed), as on GitHub. A declared milestone shows its due date and a progress
count of closed issues out of all its issues. An undeclared milestone shows its
title only.

### Relationships {#relationships}

- **Parent and sub-issues.** `parent: 12` makes this issue a sub-issue of #12.
  The parent lists its sub-issues and a summary in GitHub's shape: `total`,
  `completed` and `percent_completed`. As proposed here, `completed` counts
  sub-issues in a closed category; GitHub's exact count must be checked before
  implementation. The theme follows GitHub's limits of 100 sub-issues per parent
  and eight levels of nesting.
- **Dependencies.** `blocked_by: [7, 9]` is stored on the blocked issue, and
  `blocking` is derived on #7 and #9. While any blocker is open, cards and the
  issue header show a **Blocked** mark, as GitHub boards and issue lists do.
- **Duplicates.** `duplicate_of: 17` links "Closed as duplicate of #17".
- **Integrity.** A reference to a missing number, to a number that two issues
  share, to the issue itself, or an edge that closes a parent cycle warns, and
  that edge is ignored. In version 1, references stay within one board.

Relationships live in front matter, never in directories. Sub-issues sit beside
their parent in `issues/`, so changing a parent edits one line and moves no
file.

### Issue templates {#templates}

GitHub keeps Markdown issue templates in `.github/ISSUE_TEMPLATE/`, with front
matter `name`, `about`, `title`, `labels`, `assignees` and `type`. A board keeps
them in `templates/`. GitHub's `title` and `type` collide with Hugo's own keys,
and a template page needs Hugo's `title` and `description` for itself, so the
keys move as follows:

| GitHub template key | Board template key | Meaning |
| --- | --- | --- |
| `name` | `title` | The template's name, shown in navigation |
| `about` | `description` | What the template is for |
| `title` | `issue_title` | Default title of a new issue, such as `"[Bug] "` |
| `labels` | `labels` | Default labels |
| `assignees` | `assignees` | Default assignees |
| `type` | `issue_type` | Default issue type |

The body is the skeleton of a new issue. A template may also set default issue
fields, such as `priority`, and a default `status`.

## Board layout {#layout}

The layout is fixed, as a filesystem hierarchy standard is. Every board has the
same shape, so a person, an agent, the archetypes and the CLI all know where
anything is without configuration.

```text
<board>/                          board root: any section of type spec
├── _index.md                     board page: README body and spec configuration
├── RULE.md                       document: RULE, weight 1
├── RULE.zh.md                    its translation
├── ARCH.md                       document: ARCH, weight 2
├── <name>.md                     more documents: contracts, glossary, process
├── <group>/                      a group of documents, such as decisions/
│   ├── _index.md
│   └── <name>.md
├── issues/                       reserved: every issue, flat
│   ├── _index.md                 the issue list
│   ├── 0001-<slug>.md            issue #1
│   ├── 0001-<slug>.zh.md         its translation
│   └── 0042-<slug>/              issue #42 as a leaf bundle
│       ├── index.md
│       └── sequence.png
└── templates/                    reserved: issue templates
    ├── _index.md
    └── <name>.md
```

1. **Place decides kind.** The board root's `_index.md` is the board page.
   `issues/_index.md` is the issue list, and every regular page under `issues/`
   is an issue. A page under `templates/` is a template. Every other page under the board is a document.
   `issues` and `templates` are reserved names at the board root and nowhere
   else.
2. **The name decides the number.** An issue's number is the prefix of its file
   name, or of its directory name when it is a bundle ([numbering](#numbering)).
   Outside `issues/` a leading number is only part of a name. An ADR-style
   `decisions/0001-use-hugo.md` stays a document.
3. **Fixed parts sit at the top and growth goes below.** The board root holds
   only fixed things: the board page, documents and the two reserved
   directories. Only `issues/` grows. In navigation, in the board's Markdown
   output and in LLMS output, documents come before issues, ordered by
   `weight`. The `spec-board` archetype gives RULE weight 1 and ARCH weight 2.
   Their upper-case names follow `README.md` and `AGENTS.md`, so they stand out
   in a repository listing; Hugo still serves them at `/spec/rule/` and
   `/spec/arch/`.
4. **Issues are flat.** `issues/` contains issue files and issue bundles,
   nothing else. Status, type, parent, milestone and date are front matter.
   Directories for them would move a file, change its URL and split its Git
   history whenever a value changed. Closed issues stay where they are; there is
   no `archive/` or `done/`.
5. **A bundle is one issue.** An issue that needs images or attachments is a
   leaf bundle, `0042-<slug>/index.md`. Its other files are page resources. Hugo
   does not publish Markdown files inside a leaf bundle as pages. Long
   supporting work, such as a plan or a test report, becomes a sub-issue.
6. **The layout is relative to the board root.** It is the same at
   `content/spec/`, at `content/docs/design/`, or in a repository that keeps
   `spec/` beside its code and mounts it at `content/spec` with a Hugo module
   mount.

| Path | Kind | Numbered | URL | Listed |
| --- | --- | --- | --- | --- |
| `_index.md` | Board page | No | `/spec/` | Navigation root |
| `RULE.md`, `ARCH.md`, other root pages | Documents | No | `/spec/rule/` | First, by weight |
| `<group>/…` | Documents | No | `/spec/decisions/…` | After root documents |
| `issues/_index.md` | Issue list | No | `/spec/issues/` | One navigation entry with a count |
| `issues/0042-<slug>.md` or `issues/0042-<slug>/index.md` | Issue | Yes | `/spec/issues/0042-<slug>/` | Views and the issue list, never one by one in navigation |
| `templates/<name>.md` | Template | No | `/spec/templates/<name>/` | One navigation group |

**Size.** Git and Hugo handle thousands of files in one directory. GitHub's web
file browser lists at most 1,000 entries of a directory, and GitHub recommends
at most 3,000. A bilingual board has two files per issue, so GitHub's listing
shows every file up to 500 issues. Boards beyond that are
[open decision 7](#open-decisions).

## Numbering {#numbering}

### Rules {#numbering-rules}

1. **Form.** The number is the first part of the name: four decimal digits,
   zero-padded, then a hyphen and a slug, as in `0042-spec-boards`. Numbers
   above 9999 use as many digits as they need. The slug uses lower-case ASCII
   letters, digits and single hyphens. A translation keeps the name and adds its
   language: `0042-spec-boards.zh.md`, or `index.zh.md` inside a bundle.
2. **Value.** The number is the integer value of the prefix and starts at 1.
   `0000` is not a number.
3. **Unique.** A number belongs to one issue in the board, in every language.
   Translations share it because they share the name.
4. **Permanent.** A number never changes and is never reused. Abandoned work is
   closed as Not planned or Duplicate rather than deleted. A deleted issue's
   number stays retired. The slug may change; the old URL then becomes an alias.
5. **Next.** A new issue takes the highest number in the board plus one,
   counting closed issues and all languages. Gaps are never filled.
6. **Only the name.** Front matter has no `number` key, so there is never a
   second copy to disagree with the name.

The fixed width makes alphabetical order equal number order in `ls`, in editors
and in GitHub's file list. `ls issues | tail -1` shows the highest number. That
is the simplest way for a person or an agent to find the next one.

### Enforcement {#numbering-enforcement}

A naming rule that only people remember fails at the first busy week. Each
layer below catches what the one before it lets through.

| Layer | When | Owner | What it does |
| --- | --- | --- | --- |
| E1 Written rule | Before writing | `spec-board` archetype | Writes an "Issues and numbers" section with rules 1 to 6 into `RULE.md`, where agents read first. The board page and its Markdown output show the next number and the exact path to create, such as `issues/0043-<slug>.md` |
| E2 Creation | `hugo new content` | `spec` archetype | Computes the next number from the board, fills `title`, `status` and `date`, and warns when the given name is malformed, already taken, or not the next number. A probe on Hugo 0.171.0 on 2026-12-03 confirmed that an archetype can read the board and warn |
| E3 Build | Every build and `hugo server` | Board resolver | Warns for every violation ([diagnostics](#diagnostics)) and shows it. Unnumbered and conflicting issues are listed under **Needs attention** at the top of the issue list, and a shared number cannot be referenced |
| E4 Gate | Pre-commit hook, CI | `oink spec check` (CLI, own lifecycle) | Exits non-zero for every E3 problem and for problems that need Git: a number reused after a deletion, a renumbered issue that was already published, and a collision with a base branch (`--against main`) |
| E5 Repair | After a collision | `oink spec renumber` | Moves the later issue to the next free number and rewrites `parent`, `blocked_by` and `duplicate_of` references to it |

Hugo alone provides E1 to E3. E4 and E5 serve teams and agents that work on
parallel branches. The theme's E3 warnings never stop a build; a site that wants
a hard gate runs E4.

### Collisions {#numbering-collisions}

- **Two agents in one worktree.** `oink spec new` allocates under an exclusive
  lock, so two sessions never receive the same number. Agents without the CLI
  rely on E2 and E3.
- **Two branches.** Two branches can both create #43 with different slugs. Git
  reports no conflict because the file names differ. E3 reports the duplicate
  after the merge, and E4 with `--against` reports it before. The issue that
  reaches the default branch first keeps the number. The other renumbers with
  E5 before it merges. It was never published, so it needs no alias.
- **Imports.** Issues imported from GitHub keep their GitHub numbers. Local
  numbering continues from the highest number. Pull requests also consume
  GitHub numbers, so imported boards have gaps, which rule 5 allows.

## Proposed behavior {#design}

### Boards {#boards}

A board is the topmost section of content type `spec`. A top-level section named
`spec` gets the type from its name. Any other section sets `type: spec` and
cascades it, which the `spec-board` archetype writes:

```yaml
---
title: Theme work
description: Specs and work items for the theme.
type: spec
cascade:
  type: spec
  backlinks: true   # "mentioned in" on every issue
spec:
  milestones:
    - {title: v1.9.0, due_on: 2027-01-15}
  labels:
    - {name: presets, color: 5319e7, description: Visual presets}
  views:
    - {name: Board, layout: board, query: "-status:Duplicate"}
    - name: Open bugs
      layout: table
      query: "is:open type:Bug"
      fields: [title, status, assignees, labels, priority]
      sort_by: priority-desc
---

The README of the board. It follows the views on the board page.
```

**`spec` belongs to the documentation family.** Today the shell treats `docs`
and `book` alike in several places: the sidebar root, the sequential pager,
navigation JSON, the section index, translation comparison and the Docs entry
of the navbar. It treats `spec` the same, through one helper that replaces
those repeated type lists. A board can therefore live inside a docs tree.
`content/docs/design/` keeps the docs sidebar and the Docs navbar entry, and a
reader moves between the board and the rest of the docs without changing
shells.

**Navigation.** The shared sidebar lists the board's documents as ordinary
entries, `issues/` as one entry with its count, and templates as one group. It
never lists individual issues, because a board can hold thousands. On an issue
page, the pager moves to the previous and the next issue by number. A nested
section with its own `spec` map warns, and the map is ignored.

### Configuration {#configuration}

Site defaults live in `params.ui.spec`, and a board's `_index.md` overrides
them with a `spec` map, following the theme rule that page overrides drop
`ui.`. The keys are `statuses`, `issue_types`, `fields`, `labels`, `milestones`
and `views`. A closed vocabulary present on the board replaces the site's whole
list: statuses, issue types, fields and views. An open vocabulary merges by name:
labels and milestones. The resolver validates entries with the shared
`validate.html` pattern. It runs once per board and language through
`partialCached`, and every template that needs the board reads its result.

### Views {#views}

A view follows a saved view in GitHub's repository boards and projects. It has
a `name`, a `layout` (`board`, `table` or `roadmap`), a `query`, the `fields` it
shows and a `sort_by` setting. Board views also accept `column_by`, `columns`
and `closed_limit`. Roadmap views also accept `dates`. `fields` may name any
issue key in the [mapping](#mapping), any declared field, and Hugo's `date` and
`description`.

When a board declares no views, it gets two:

| View | Behavior |
| --- | --- |
| **Board** | One column per status, in declared order. Columns in the `not_planned` and `duplicate` categories are collapsed in a native disclosure. Each closed column shows its `closed_limit` (default 20) most recently closed issues, sorted by `closed_at`, then `lastmod`, and links to the issue list for the rest. A No status column appears only when it has issues. |
| **Roadmap** | Bars from `start_date` to `target_date` on a month grid, with declared milestones' `due_on` dates as markers. An issue with one date is a point. Issues without dates are counted and linked to the issue list. The view is omitted when no issue has a date. |

`column_by` defaults to `status`. It may name any single-select field, as a
GitHub project board can, for example to show columns by priority. `columns`
picks and orders the visible options.

**Query.** The `query` uses GitHub's issue search syntax. Version 1 applies this
subset at build time:

- Space-separated terms are combined with AND. A comma separates alternatives
  within a qualifier, as in `label:bug,docs`. A leading `-` negates a term.
  Double quotes hold values with spaces.
- Qualifiers: `is:open`, `is:closed`, `is:issue`, `status:`, `category:`
  (written `not-planned` for the `not_planned` category, as in GitHub search),
  `reason:` (`completed`, `"not planned"`, `duplicate`), `type:`, `label:`,
  `assignee:`, `author:`, `milestone:`, `no:` and `has:` (with `label`,
  `assignee`, `milestone` or `type`), and `field.<name>:` with `>`, `>=`, `<`
  and `<=` for number and date fields.
- `sort:` with `created` or `updated` and `-asc` or `-desc`. A view's
  `sort_by`, which is GitHub Projects' "Sort by" setting and may name any
  field, takes precedence over `sort:`.
- The build cannot apply free text, the `AND` and `OR` keywords, parentheses,
  `@me`, `@today` and relative dates, `involves:`, `linked:`, `user:`, `org:`,
  or unknown qualifiers. Each one warns and is ignored, so a view shows more
  issues, never fewer. A client-side parser for the full syntax is a phase 3
  candidate.

**Cards** show the number and title, the type, up to three labels and a count
of the rest, assignees, sub-issue progress, the Blocked mark, and the view's
`fields`.

**Rendering.** All views of a board are rendered into the board's one HTML page
as sections. Without JavaScript they stack, and a link list at the top jumps
between them. With the optional chunk they become tabs, and the selected tab is
kept in the URL hash. The README follows the views as one more section, which
becomes one more tab. Whether very large boards also need separate URLs per
view is [open decision 2](#open-decisions).

### Issue list {#issue-list}

`issues/_index.md` renders the counterpart of a repository's Issues tab. It is a
table of every issue, newest number first, in two parts with counts: **Open**
and **Closed**. The Closed part is a native disclosure. The columns are number
and title, status, type, assignees, labels, milestone and `lastmod`. When the
board has unnumbered issues or shared numbers, a **Needs attention** part comes
first. The page is the complete table, so board views link here for anything
they leave out. Print expands everything.

### Issue page {#issue-page}

- **Header.** The title followed by `#42`, a state badge with an icon and the
  status name, and a byline such as "alice opened on 2026-12-03". A closed issue
  reads "Closed as completed", "Closed as not planned" or "Closed as duplicate
  of #17", with `closed_at` when it is known.
- **Body.** The Markdown body, followed by a **Sub-issues** block with a
  progress meter and the sub-issues' numbers, titles and states. Authors can
  record activity with [Update](/docs/design/proposals/component-update/)
  headings or a [Timeline](/docs/design/proposals/component-timeline/) list;
  Git history remains the event log.
- **Right rail.** Groups appear in GitHub's sidebar order: Assignees, Labels,
  Type, Fields, Milestone, Relationships (Parent issue, Blocked by, Blocking,
  Duplicate of), and Development. The existing TOC group and the backlinks
  group follow. The backlinks group serves as GitHub's "mentioned in".
- **Left sidebar.** The shared sidebar, as described in [boards](#boards).

### Documents and templates {#documents}

Documents render as ordinary reading pages with the shell's TOC. The board's
`_index.md` body is its README, the counterpart of a GitHub project's README.
The theme gives no file name special meaning; order comes from `weight`.

RULE has a single authority. The repository's `AGENTS.md` says "read
`content/spec/RULE.md` first" rather than copy the rules. People read the
rendered page and agents read the source, so both see the same text.

Templates render in their navigation group as reading pages. A list of their
defaults (issue title, labels, assignees, type and fields) comes before the
skeleton. They never appear in views or in the issue list. `oink spec new
--template feature` copies a template into a new issue; without the CLI an
author copies one by hand.

### Outputs {#outputs}

| Output | Board | Issue list | Issue |
| --- | --- | --- | --- |
| HTML | Views and README | Open, Closed and Needs attention tables | Page described above |
| Print | The README and every view, with disclosures expanded | Every issue in full | Metadata as a static list, then the body |
| Markdown | README; then documents in order with their Markdown URLs; then "Next issue: `issues/0043-<slug>.md`"; then a list per status such as `- #42 Render spec boards · Feature · @alice · High`, with closed statuses limited by `closed_limit` | One table of every issue | `# Render spec boards (#42)`, a metadata list, the body, sub-issues and relationships; no component markup |
| LLMS / LLMSFULL | Documents first, then issues by number; LLMSFULL, when the board enables it, concatenates in the same order | Listed as a section | Included as a page |
| RSS | Issues by `date`, through the shared safe RSS template | | |
| `SPECJSON` (opt-in) | `issues.json`: an array of objects shaped like GitHub's REST issues (`number`, `title`, `state`, `state_reason`, `status`, `type`, `labels`, `assignees`, `milestone`, `user`, `created_at`, `updated_at`, `closed_at`, `html_url`, `parent`, `sub_issues_summary`, `issue_dependencies_summary`, `issue_field_values`), plus `markdown_url`; bodies are left out; validated by `schema/spec-issues.v1.schema.json` | | |
| Search | Indexed as a section page | Indexed as a section page | `#42`, status, type and labels are added to the page's keywords |

`SPECJSON` follows the opt-in pattern of `LLMSFULL`: a board adds it to its own
`outputs`, and the theme never adds it to a site.

### Diagnostics {#diagnostics}

| Input | Fallback after the warning |
| --- | --- |
| `params.ui.spec` or `spec` is not a map, or a key has the wrong shape | Defaults for that key |
| A status lacks a valid category, or two names match after normalization | The entry is dropped, or the first one is kept |
| A page in `issues/` whose name has no number | Listed under Needs attention without a number; it cannot be referenced |
| A number written at the wrong width, such as `042-` or `00042-` | The number is used; the warning names the expected `0042-` |
| A `0000` prefix | Treated as unnumbered |
| Two issues with the same number | Both are listed under Needs attention; references to that number are ignored |
| A `number` key in front matter | Ignored; the name decides |
| An issue in a subdirectory of `issues/` that is not its own bundle | Still an issue; the warning asks to keep issues flat |
| A section (`_index.md`) inside `issues/` other than the issue list | Not an issue; the warning suggests `index.md` |
| A board with issues but no `issues/_index.md` | No issue list page; views link to the board page instead |
| Unknown `status` on an issue | Open, in the No status column |
| `status` disagrees with `state` or `state_reason` | `status` wins |
| A duplicate-category status without `duplicate_of` | Rendered without a link |
| Unknown `issue_type` | Untyped |
| A GitHub `type:` key on an issue or template | Warning only; the page keeps the content type Hugo gives it |
| An invalid field value or an undeclared option | Field empty for that issue |
| A field key that collides with a reserved key | Field dropped |
| An invalid label color | No swatch |
| An invalid date (`start_date`, `target_date`, `closed_at`, `due_on`) | Value ignored |
| A relation to a missing, shared or own number, or a parent cycle | Edge ignored |
| An unsupported query term | Term ignored |
| An unknown view layout, or a view without a name | View dropped |

Every warning starts with `spec:` and names the page path and the key, in the
format the theme already uses. None of them stops the build. The `spec`
archetype gives the numbering warnings once more when a file is created.

### Accessibility, responsive and print {#accessibility}

- **Board.** Each column is a `section` labelled by a heading that gives the
  status name and count. Cards sit in an ordered list, and a card has one tab
  stop, its title link. Collapsed columns use native `details`. There is no
  dragging.
- **Tables.** Issue list and table views use a real `table` whose caption names
  it, with `th scope="col"`. When the chunk sorts a column it sets `aria-sort`.
  Wide tables scroll inside their own container.
- **Roadmap.** Each issue's dates appear as text next to its bar, and the bar
  itself is decorative. The axis uses logical properties, so it runs from
  right to left in RTL languages.
- **State and color.** State always shows an icon and text, never color alone.
  The eight named colors map to tokens in each preset's light and dark palettes.
  In forced-colors mode, swatches become outlined marks.
- **Narrow screens.** Board columns stack, and closed columns stay collapsed.
- **Long titles and labels.** Titles wrap. Labels truncate and keep their full
  text in a `title` attribute.
- **Reduced motion.** Nothing animates.

### Security and privacy {#security}

Every name and value from front matter is plain text. Label colors must match a
six-digit hex pattern, and only then reach a CSS custom property. Status and
type colors come from the named enum. `development` URLs pass through the shared
URL policy (`content/url.html`). JSON is produced with `jsonify`. A normal build
fetches nothing, and nothing is vendored.

### Internationalization {#i18n}

Front matter values are canonical names, matching GitHub, so all translations
of an issue share them. The theme translates the display names of its default
vocabularies into all 32 locales: the seven statuses, three types, four fields
and their options, nine label descriptions, two view names, closing phrases,
relationship labels, the issue list parts, the next-number line and counts.
That comes to about 70 strings. Placeholders are preserved and
`bin/check-i18n.py` checks parity.

Custom vocabularies display their declared `name`. A translated board
`_index.<lang>.md` can give an entry a `label` for that language without
changing the `name` that issues use. Each language's board lists the issues in
that language. Falling back to untranslated issues is
[open decision 4](#open-decisions).

## First board: OINK Design {#oink-design}

The owner chose this section as the first board and the prototype corpus. It is
a demanding test. It has six contracts, fourteen decisions, eighteen proposals
and twenty-four research records in two languages, and other pages and
repositories link to it.

### Mapping the layers {#oink-design-layers}

| Today | On the board | Reason |
| --- | --- | --- |
| Contracts: `architecture.md`, `components.md`, `shell.md`, `landing.md`, `migration.md`, `expo.md` | Documents at the board root; URLs unchanged; `architecture.md` serves as ARCH | They describe the present and change in place |
| `decisions/` | A document group; URLs unchanged | Living rationale for current behavior, updated in place |
| Process text in `_index.md`, `proposals/_index.md` and `research/_index.md` | One new `RULE.md` with its translation | One place for authority, lifecycle, review gate, research rules and the numbering rules |
| `proposals/` (18) and `research/` (24) | 42 issues in `issues/`, of type Proposal or Research | They record change, have a date and a lifecycle, and close |
| The hand-written proposals and research tables | The Board view and the Proposals and Research table views | Generated, so they cannot drift |
| The PRD outline under "Where a new PRD goes" | `templates/proposal.md`, plus `templates/research.md` | The eight required parts become the skeleton that a new proposal copies |

Under this mapping a proposal is no longer retired into a decision. The
proposal is an issue that moves from Draft to Done. On the way, its accepted
behavior moves into a contract document and its lasting rationale into a
decision document, as the current lifecycle already requires.

### Vocabularies {#oink-design-vocabularies}

`content/docs/design/_index.md` would carry:

```yaml
type: spec
cascade:
  type: spec
  search_boost: 0.6
  categories: [Design]
spec:
  statuses:
    - {name: Draft, category: backlog, description: Written and under evaluation}
    - {name: Accepted, category: planned, description: Accepted by the owner, not yet implemented}
    - {name: In progress, category: started, color: yellow, description: Partly implemented}
    - {name: Done, category: completed, color: purple, description: Released, or research recorded}
    - {name: Rejected, category: not_planned}
    - {name: Superseded, category: duplicate, description: Replaced by the issue in duplicate_of}
  issue_types:
    - {name: Proposal, color: purple, description: A PRD or RFC}
    - {name: Research, color: blue, description: Dated, non-normative evidence}
    - {name: Task, color: gray}
    - {name: Bug, color: red}
  fields:
    - {name: Evidence, type: text}
  labels:
    - {name: architecture}
    - {name: components}
    - {name: shell}
    - {name: landing}
    - {name: migration}
    - {name: expo}
    - {name: cli}
  milestones:
    - {title: v1.6.0, due_on: 2026-11-23, state: closed}
    - {title: v1.7.0, due_on: 2026-11-28, state: closed}
    - {title: v1.8.0, due_on: 2026-11-28, state: closed}
    - {title: v1.9.0, state: open}
  views:
    - {name: Board, layout: board}
    - name: Proposals
      layout: table
      query: "type:Proposal"
      fields: [title, status, milestone, labels, description]
      sort_by: created-desc
    - name: Research
      layout: table
      query: "type:Research"
      fields: [title, date, evidence]
      sort_by: created-desc
```

The six statuses take one category each. The proposal lifecycle therefore fits
GitHub's model without a new concept, and `Superseded` reuses GitHub's
duplicate link. The labels name the contract a record affects, which the
current PRD outline asks for in prose. The milestones are the theme releases
that shipped a record.

### Numbers {#oink-design-numbers}

Numbers follow creation dates: a proposal's `proposal_date`, and a research
record's date from its file name, or `last_verified` when the name has none.
On the same date a parent comes before its sub-issues, and old paths break the
remaining ties. The migration script derives the same table from these rules.
The date leaves the research file names, because `date` keeps it, and one slug
changes to avoid two issues named `ink-terminal-stabilization`. This proposal
becomes #42.

| # | Name in `issues/` | From | Date | Type | Status | Milestone | Parent |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | `0001-goldmark-attributes` | `research/goldmark-attributes` | 2026-08-16 | Research | Done | | |
| 2 | `0002-knowledge-graph` | `proposals/knowledge-graph` | 2026-08-19 | Proposal | In progress | | |
| 3 | `0003-media-convergence` | `proposals/media-convergence` | 2026-08-20 | Proposal | In progress | | |
| 4 | `0004-consumer-evidence` | `research/consumer-evidence` | 2026-08-24 | Research | Done | | |
| 5 | `0005-comprehensive-review` | `research/2026-08-26-comprehensive-review` | 2026-08-26 | Research | Done | | |
| 6 | `0006-upstream-review` | `research/2026-09-19-upstream-review` | 2026-09-19 | Research | Done | | |
| 7 | `0007-v1-1-release-review` | `research/2026-09-20-release-review` | 2026-09-20 | Research | Done | | |
| 8 | `0008-oink-cli-roadmap` | `proposals/oink-cli-roadmap` | 2026-09-29 | Proposal | In progress | | |
| 9 | `0009-cli-acceptance` | `research/2026-09-29-cli-acceptance` | 2026-09-29 | Research | Done | | |
| 10 | `0010-cli-maintenance-acceptance` | `research/2026-10-03-cli-maintenance-acceptance` | 2026-10-03 | Research | Done | | |
| 11 | `0011-oink-cli-maintenance-roadmap` | `proposals/oink-cli-maintenance-roadmap` | 2026-10-03 | Proposal | Done | | |
| 12 | `0012-cli-maintenance-acceptance-r1-r5` | `research/2026-10-03-cli-maintenance-acceptance-r1-r5` | 2026-10-03 | Research | Done | | #10 |
| 13 | `0013-cli-maintenance-acceptance-r6-r8` | `research/2026-10-03-cli-maintenance-acceptance-r6-r8` | 2026-10-03 | Research | Done | | #10 |
| 14 | `0014-visual-presets` | `proposals/visual-presets` | 2026-10-04 | Proposal | In progress? | | |
| 15 | `0015-ink-terminal-experiment` | `research/2026-10-05-ink-terminal-experiment` | 2026-10-05 | Research | Done | | |
| 16 | `0016-v1-2-release-review` | `research/2026-10-05-v1-2-release-review` | 2026-10-05 | Research | Done | | |
| 17 | `0017-visual-presets-acceptance` | `research/2026-10-05-visual-presets-acceptance` | 2026-10-05 | Research | Done | | |
| 18 | `0018-theme-review` | `research/2026-10-13-theme-review` | 2026-10-13 | Research | Done | | |
| 19 | `0019-consumer-baseline` | `research/2026-10-18-consumer-baseline` | 2026-10-18 | Research | Done | | |
| 20 | `0020-component-refinement` | `research/2026-10-25-component-refinement` | 2026-10-25 | Research | Done | | |
| 21 | `0021-ink-terminal-stabilization` | `proposals/ink-terminal-stabilization` | 2026-10-26 | Proposal | Done? | v1.8.0? | |
| 22 | `0022-ink-terminal-reading-acceptance` | `research/2026-10-26-ink-terminal-stabilization` | 2026-10-26 | Research | Done | | |
| 23 | `0023-large-table-reading` | `research/2026-10-26-large-table-reading` | 2026-10-26 | Research | Done | | |
| 24 | `0024-document-comparison` | `research/2026-10-29-document-comparison` | 2026-10-29 | Research | Done | | |
| 25 | `0025-review-repairs` | `research/2026-11-06-review-repairs` | 2026-11-06 | Research | Done | | |
| 26 | `0026-v1-5-1-release-review` | `research/2026-11-06-v1-5-1-release-review` | 2026-11-06 | Research | Done | | |
| 27 | `0027-dependency-acceptance` | `research/2026-11-11-dependency-acceptance` | 2026-11-11 | Research | Done | | |
| 28 | `0028-theme-roadmap` | `proposals/theme-roadmap` | 2026-11-21 | Proposal | In progress | | |
| 29 | `0029-local-search-engine` | `proposals/local-search-engine` | 2026-11-23 | Proposal | Done | v1.6.0 | |
| 30 | `0030-content-components-expansion` | `proposals/content-components-expansion` | 2026-11-27 | Proposal | Done | v1.7.0 | |
| 31 | `0031-component-audio` | `proposals/component-audio` | 2026-11-27 | Proposal | Done | v1.7.0 | #30 |
| 32 | `0032-component-map` | `proposals/component-map` | 2026-11-27 | Proposal | Done | v1.7.0 | #30 |
| 33 | `0033-component-social` | `proposals/component-social` | 2026-11-27 | Proposal | Done | v1.7.0 | #30 |
| 34 | `0034-component-timeline` | `proposals/component-timeline` | 2026-11-27 | Proposal | Done | v1.7.0 | #30 |
| 35 | `0035-component-update` | `proposals/component-update` | 2026-11-27 | Proposal | Done | v1.7.0 | #30 |
| 36 | `0036-component-video` | `proposals/component-video` | 2026-11-27 | Proposal | Done | v1.7.0 | #30 |
| 37 | `0037-ink-news-presets` | `proposals/ink-news-presets` | 2026-11-28 | Proposal | In progress | | |
| 38 | `0038-oink-serve` | `proposals/oink-serve` | 2026-11-28 | Proposal | Draft | | |
| 39 | `0039-architecture-review` | `research/2026-11-30-architecture-review` | 2026-11-30 | Research | Done | | |
| 40 | `0040-map-basemaps` | `research/2026-12-01-map-basemaps` | 2026-12-01 | Research | Done | | |
| 41 | `0041-gap-review` | `research/2026-12-02-gap-review` | 2026-12-02 | Research | Done | | |
| 42 | `0042-spec-boards` | `proposals/spec-boards` | 2026-12-03 | Proposal | Draft | | |

A question mark marks a value the owner must confirm.

### Status findings {#oink-design-status}

The inventory turned up what a single status authority would have prevented:

- **#14 `visual-presets`.** Its front matter says `partially-implemented`, and
  its callout keeps it active for the Ink and Terminal design acceptance. The
  proposals index says all six presets ship in v1.8.0.
- **#21 `ink-terminal-stabilization`.** Its front matter says `draft`, and its
  callout says v1.7.0 superseded its typography. The proposals index cites it
  for the v1.8.0 release. Done, Superseded and In progress all have support.
- **Mixed records.** #2 (G1 shipped, G2 and G3 draft), #3 (M4 open), #8 (later
  stages draft), #28 (R0 shipped, R1 to R3 draft) and #37 (three parts open)
  are each part done and part draft. The table gives them In progress. The
  GitHub way would close the shipped part as Done and open the rest as new
  Draft sub-issues. The owner decides whether to split them.
- **Research grades.** The research records use nine `design_status` values,
  such as `review-snapshot`, `local-verification` and `dated-evidence`. They
  grade evidence rather than describe a lifecycle, so they move verbatim into
  the text field `evidence`. Every research issue is Done, with `closed_at` on
  its date.

### Migration steps {#oink-design-migration}

1. **Precondition.** A theme release that contains phase S1 is pinned by the
   site. The site's `check` target uses the local theme, but `build`, `serve`
   and production use the published pin, so the content cannot move before the
   release.
2. **Move.** `git mv` each record and its translation to `issues/`, as in the
   table. Add the old URL to `aliases` in both language files. Map the keys:
   `design_kind` becomes `issue_type`, `design_status` becomes `status` and
   `evidence`, and `proposal_date` becomes `date`. Add `closed_at`,
   `milestone` and `parent`. Drop `weight`, because numbers order issues.
3. **Write.** Write `RULE.md` and `RULE.zh.md` from the process text of the
   three index pages, together with the numbering rules. Write
   `templates/proposal.md` and `templates/research.md` in both languages, and
   the board configuration above. Delete `proposals/_index*.md` and
   `research/_index*.md`, and alias their URLs to `issues/`. Decisions keep
   their current keys.
4. **Links.** Rewrite links in current site content to the new URLs. Historical
   release notes keep their links and rely on the aliases. Regenerate the
   Markdown goldens. Update the Design pointers in the `AGENTS.md` files of the
   theme, the site and the CLI, each in its own repository.
5. **Verify.** The site's `check` and `browser` targets pass. Every old URL in
   both languages redirects. No issue keeps `design_kind` or `design_status`.
   The Board's counts match the table, and the Proposals and Research views list
   the records that the hand-written tables listed.

## Trade-offs and alternatives {#alternatives}

- **Status as a taxonomy (rejected).** A status is a single-valued state
  machine, but a taxonomy is many-to-many. Columns need order, category and
  limits from one declaration, and taxonomies are site configuration that the
  theme does not declare. `labels` can still be backed by a site taxonomy for
  term pages, but no board feature depends on one.
- **`state` as the authority (rejected).** That is GitHub's model before
  2026-11, in which open or closed was the fact and a project's Status was a
  separate field that workflows kept in sync. Two authorities can disagree.
  GitHub's current model, and this proposal, make status the single authority.
- **Separate issue and task directories (rejected).** They would mean two
  number sequences, two templates, and a choice agents can get wrong. Issue
  types and sub-issues express the difference, as GitHub does.
- **Directories for status, type, parent or date (rejected).** Backlog.md moves
  finished tasks to other directories, and Spec Kit nests a feature's tasks in
  its folder. Every change of value would move a file, change its URL and split
  its history. Front matter changes one line.
- **Documents and issues in one flat directory (rejected).** Telling them apart
  would need reserved numbers, such as `0000-` for templates, or a naming rule,
  and fixed documents would be lost among hundreds of issues. A directory is a
  rule nobody has to remember.
- **A number key in front matter (rejected).** It would be a second authority
  beside the file name. Use `slug` to change a URL.
- **A counter file (rejected).** A `next: 43` line in `_index.md` turns parallel
  allocations into a Git conflict. It is also a second authority, and it drifts
  as soon as someone adds a file by hand.
- **Random or time-based IDs (rejected).** ULIDs or date prefixes avoid
  collisions. They give up the natural number the owner asked for and GitHub's
  `#42`.
- **Decisions as numbered issues (rejected for OINK Design).** ADR practice
  numbers decisions. OINK's decisions are living rationale that is updated in
  place, so they stay documents. Another board can still number its decisions
  as issues of a Decision type.
- **Hex colors for every vocabulary (rejected).** GitHub uses named colors for
  issue types and project options. Named colors let each preset keep its own
  voice. Labels keep hex for GitHub compatibility but render as swatches only.
- **Mermaid or ECharts for the roadmap (rejected).** Those need a runtime, are
  hard to print, and ignore presets. A build-time CSS grid has none of these
  problems.
- **Drag and drop through a local server (deferred).** Writing files from a
  browser belongs to [oink serve](/docs/design/proposals/oink-serve/).

## Compatibility and migration {#compatibility}

- The change is additive. No existing key or layout changes meaning. Keys such
  as `issue_type` mean something only on `spec` pages, and `issues/` and
  `templates/` are reserved only at a board root.
- `spec` joins the default `params.ui.shell_types`, because chrome, scripts and
  search depend on membership in that list. A site that sets its own list must
  add `spec`; the upgrade note says so.
- The documentation-family helper replaces type lists that name `docs` and
  `book`. Their behavior for `docs` and `book` pages does not change, and the
  owning checkers prove it.
- Shipping `layouts/spec/` changes the rendering of any existing section whose
  content type is `spec`. The inventory found none among maintained sites. A
  site that has one sets another type for that section.
- The theme gains an `archetypes/` directory for the first time.
- The generated front matter and site parameter schemas gain the new keys.
- If GitHub's status preview changes, the defaults may change in a minor release
  with a migration note. Boards that declare their own statuses are not
  affected.
- The OINK Design migration changes URLs of this site only, with aliases for
  every old URL ([steps](#oink-design-migration)).

## Implementation plan {#implementation}

### Theme {#implementation-theme}

| Area | Change |
| --- | --- |
| Layouts | `layouts/spec/{baseof,list,single}.html`, print variants, and Markdown templates. `baseof` is thin and reuses the shell partials, as Expo's does. The list template renders the board page, the issue list or a group's section page, by place |
| Partials | `layouts/_partials/spec/`: `config.html` (resolver), `issues.html` (collects and resolves a board once per language: kinds by place, numbers by name, derived state, relations and diagnostics), `query.html`, `board.html`, `table.html`, `roadmap.html`, `issue-list.html`, `card.html`, `state.html`, `issue-aside.html`, `template-defaults.html` |
| Shell | One documentation-family helper used by the sidebar root, pager, navigation JSON, section index, translation comparison and navbar; the sidebar shows `issues/` as one entry; the pager steps through issues by number |
| Configuration | `params.ui.spec` defaults in `hugo.yaml`, including the nine labels; `spec` added to `shell_types`; output format `SPECJSON`; regenerated schemas; `schema/spec-issues.v1.schema.json` |
| Styles | A new layer `assets/css/td/spec.css` registered in `layers.html`; tokens for the named colors in every preset |
| Runtime | An optional chunk at `js/chunks/spec` for tabs, hash state, table sorting, the today line and overdue hints, selected through a Page Store capability flag |
| Archetypes | `archetypes/spec.md`: an issue, with next-number computation and the creation warnings. `archetypes/spec-board/`: `_index.md`, `RULE.md` with the numbering section, `ARCH.md`, `issues/_index.md`, `templates/_index.md`, and `templates/{bug,feature,task}.md` for the three default types |
| Locales | About 70 strings in all 32 locale files |
| Checks | A new owning checker `bin/check-spec.py`, added to `ci.yml` beside `check-expo.py`. Fixtures: a top-level board, a board nested under a docs section, and a mounted board, with a case for every numbering and layout diagnostic. HTML, print, Markdown and JSON goldens. `check-output.py`, `check-params.py`, `check-i18n.py`, `check-presets.py` and the schema check |

### Documentation site {#implementation-site}

- A **Spec boards** section in the [Shell contract](/docs/design/shell/), in
  both languages, covering the layout, the numbering rules and the diagnostics.
- The `SPECJSON` output in the
  [Architecture contract](/docs/design/architecture/#outputs-and-runtime).
- A guide at `/docs/write/spec/` beside the [Expo guide](/docs/write/expo/), and
  `params.ui.spec` in the configuration reference.
- The OINK Design migration ([steps](#oink-design-migration)), which is also
  the site's demonstration board and browser-test target.

### CLI (separate lifecycle, non-normative) {#implementation-cli}

`oink spec new` assigns the next number under a lock and can copy a template.
`oink spec check` is the E4 gate, with `--against` for a base branch.
`oink spec renumber` repairs a collision and rewrites references. `oink spec
status` sets a status and stamps `closed_at`. `oink spec import` and `oink spec
export` move issues to and from GitHub; they are the payoff of matching GitHub's
model. None of these is required to use a board.

### Phases {#phases}

| Phase | Scope |
| --- | --- |
| S1 | Layout and numbering: the resolver, diagnostics and archetypes with creation checks. The issue page, issue list, documents and templates, Board view, parent and sub-issues, Markdown and print outputs, the documentation-family helper, locales, `check-spec.py`, goldens, guide and contract. Then the OINK Design migration as the acceptance corpus |
| S2 | Table and Roadmap views, the query subset, blocked-by relations, milestone progress, the `SPECJSON` output, and the optional chunk |
| S3 (candidates) | Swimlanes and table grouping, a client-side parser for the full query syntax, iterations, cross-board projects, `#42` autolinks in prose, a layout for boards beyond 500 bilingual issues, project status updates, CLI import and export, browser write-back through oink serve |

## Acceptance criteria {#acceptance}

1. A fixture board with the default statuses renders seven columns in GitHub's
   order. Not planned and Duplicate are collapsed, closed columns respect
   `closed_limit`, and a No status column appears only for unknown statuses.
2. For every status category, the derived `state` and `state_reason` match
   GitHub's table. Every diagnostics row has a fixture that produces exactly its
   warning and its fallback, and `hugo server` keeps serving.
3. A fixture written from a GitHub REST issue export (`status`, `state`,
   `state_reason`, `type` → `issue_type`, label names, assignee logins,
   milestone title, `created_at` → `date`, `closed_at`) renders the same as a
   hand-written equivalent.
4. Each numbering rule has a fixture that produces its warning and its mark.
   The `spec` archetype warns for a taken, malformed or skipped number. The
   board page and its Markdown output show the next number and path.
5. A top-level board, a board nested in a docs section, and a mounted board all
   build. The nested board keeps the docs sidebar and navbar entry, no sidebar
   lists individual issues, and a numbered file in a document group stays a
   document.
6. Board, issue list, Table and Roadmap are complete and usable with JavaScript
   disabled. Print is static and expanded. Markdown contains no component
   markup. `issues.json` validates against its schema.
7. A page with a GitHub `type:` key inside a board produces the `issue_type`
   warning.
8. The resolver runs once per board and language. Template metrics on a
   generated board of 1,000 issues confirm this, and its build time is recorded
   as a baseline.
9. The OINK Design board holds the 42 records. Every old URL in both languages
   redirects, and the generated views list what the hand-written tables listed.
   The site's `check` and `browser` targets pass.
10. Rendered review on the documentation site covers English and Chinese,
    desktop and mobile, light and dark in all six presets, forced colors and an
    RTL locale.
11. The owning checker, the goldens and the whole `ci.yml` list pass.

## Open decisions {#open-decisions}

1. **Default `shell_types`.** The proposal adds `spec`, given the consumer
   evidence. The alternative is to make boards opt-in through each site's list.
2. **View URLs.** One page holds all views (proposed for version 1), or each
   view gets its own URL through output formats, which suits very large boards.
3. **Sub-issue progress.** Confirm how GitHub counts `completed`, including
   whether Not planned and Duplicate sub-issues count toward `total`.
4. **Multilingual boards.** Each language lists only its own issues (proposed),
   or untranslated issues fall back to the default language with a marker.
5. **`#42` in prose.** Leave plain text (proposed for version 1), or add an
   autolink pass that has to skip code.
6. **Default `closed_limit`.** 20 as proposed, or another value.
7. **Large boards.** Before any board nears GitHub's 1,000-entry listing, either
   define one fixed bucket scheme, such as `issues/1000/1042-…`, or advise
   splitting into several boards.
8. **OINK Design statuses.** Confirm the six statuses, the two conflicting
   records (#14 and #21), and whether the mixed records are split into
   sub-issues.
9. **Document names.** Upper-case `RULE.md` and `ARCH.md` for new boards
   (proposed) or lower case like other content files; and for OINK Design, keep
   `architecture.md` as ARCH (proposed, no URL change) or rename it with an
   alias.

## Decision log {#decision-log}

- **2026-12-03 (owner):** Asked for a new reading surface that tracks specs as
  local Markdown files, with GitHub Projects and Issues as the model and no
  dependency on GitHub. Each item has a natural number, status lives in front
  matter, RULE and ARCH are fixed charter pages, and a companion CLI may follow.
- **2026-12-03 (owner):** Asked that the data model follow GitHub Issues and
  Projects, including default field names and available statuses.
- **2026-12-03 (owner):** Kept `spec` as the working name. Chose to build in
  GitHub's nine default labels. Named the OINK Design section as the prototype
  corpus and first board, to be converted to this model.
- **2026-12-03 (owner):** Asked for a numbering design that users can be held
  to, with the number fixed at the front of the name, and for a designed
  directory layout instead of a flat folder.
- **2026-12-03:** Claude wrote the first draft. It aligns with GitHub's
  2026-11-23 issue status preview, makes `status` the single authority, uses
  `issue_type` because Hugo reserves `type`, and keeps status in front matter
  rather than a taxonomy.
- **2026-12-03:** Claude revised the draft after the owner's second round. It
  adds the fixed layout with reserved `issues/` and `templates/`, the numbering
  rules with five enforcement layers, issue templates, the issue list page, the
  documentation-family type for nested boards, label merging, and the OINK
  Design mapping with 42 numbered records. These are agent recommendations, not
  owner decisions.

---

Backlinks:

- [Proposals](/docs/design/proposals/)
- [Roles](/docs/design/proposals/roles/)
