Skip to content

feat: template plugin system for board data models (NEBULA-79)#1

Closed
exisz wants to merge 1 commit into
mainfrom
feat/template-plugin-system
Closed

feat: template plugin system for board data models (NEBULA-79)#1
exisz wants to merge 1 commit into
mainfrom
feat/template-plugin-system

Conversation

@exisz
Copy link
Copy Markdown
Owner

@exisz exisz commented Apr 22, 2026

Implements NEBULA-79 — the plugin-based template system that backs dna://convention/project-data-model-declaration.

What

Boards now declare their data model via a pinned 🧬 DATA MODEL: <id> card. Templates are pluggable — built-in, user-local (~/.agentbase/templates/), or npm packages prefixed agentbase-template-*. Core stays template-agnostic; the loader + validator + model card parser do the rest.

New CLI

agentbase template ls                         # list installed templates
agentbase template info <ID|PATH>             # template details + schema check
agentbase template scaffold <ID> [-o FILE]    # starter YAML for new template

agentbase model show     [-b BOARD]           # explain board's data model
agentbase model validate [-b BOARD]           # check board against template rules
agentbase model declare  [-b BOARD] -t <ID>   # add the model card to a board

Built-in templates

  • status-pipeline — formalises the legacy kanban default
  • correspondence-versioned — mirrors the hand-built rffi board (round-based collection)

Backward compatibility

Boards without a 🧬 DATA MODEL card are treated as status-pipeline@0 (assumed default). No config migration needed.

Verified

$ agentbase model show -b rffi
Board:    69e8c9a7513c41482cfc2151
Template: correspondence-versioned (v1) — source: builtin
... full axes + statuses + required-lists rendered ...

$ agentbase model validate -b rffi
✅ PASS — no findings.

$ npm test
✔ 10/10 tests pass

A fresh sub-agent given only agentbase model show -b <board> can now answer "what does each list mean?" — the success criterion in the design doc.

Companion work (separate from this PR)

  • Design doc: ~/.openclaw/workspaces/nebula/agentbase-templates-design.md
  • Convention: ~/.openclaw/.dna/conventions/board-template-plugins.md
  • Follow-ups (future PRs): publish agentbase-template-status-pipeline and agentbase-template-correspondence-versioned as standalone npm packages to demonstrate the discovery contract; implement render-hook view bus (matrix view for correspondence-versioned); hook event dispatch.

Schema

See design doc §5 for the full template YAML schema. Minimum viable template needs only id, version, name, axes, status-schema.values — everything else is opt-in.

Tests

  • src/templates/templates.test.ts — 10 tests covering loader discovery, schema validation (built-in templates pass; bad inputs caught), board-against-template validation (rffi fixture passes; missing model card and missing required lists fail).

NEBULA-79

Implements pluggable data-model templates per dna://convention/project-data-model-declaration.

Adds:
- src/templates/{loader,validator,declaration,types}.ts — plugin discovery
  (built-in + ~/.agentbase/templates/ + npm agentbase-template-* packages),
  schema validation, board-against-template validation, model-card parsing.
- src/templates/builtin/{status-pipeline,correspondence-versioned}.yaml —
  two reference templates ship with core. status-pipeline formalises the
  legacy default; correspondence-versioned mirrors the hand-built rffi board.
- src/commands/model.ts — 'agentbase model {show,validate,declare}'.
- src/commands/template.ts — 'agentbase template {ls,info,scaffold}'.
- src/templates/templates.test.ts — 10 tests (loader, validator,
  rffi-shaped board fixture).
- README + help text + package.json copy-templates step.

Backward compat: boards without a 🧬 DATA MODEL card are assumed
status-pipeline@0; behaviour unchanged for legacy boards.

Verified:
  agentbase model show -b rffi      → renders full template + axes + statuses
  agentbase model validate -b rffi  → ✅ PASS — no findings
  agentbase model show -b jobs      → falls back to status-pipeline (assumed)
  npm test                          → 10/10 pass
@exisz
Copy link
Copy Markdown
Owner Author

exisz commented Apr 22, 2026

Squash-merged directly to main. Empire owners (nebula) follow dna://protocol/basic — direct push to main, no PR. CONTRIBUTING.md PR flow applies to external contributors only.

@exisz exisz closed this Apr 22, 2026
@exisz exisz deleted the feat/template-plugin-system branch April 22, 2026 23:55
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