feat: template plugin system for board data models (NEBULA-79)#1
Closed
exisz wants to merge 1 commit into
Closed
Conversation
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
Owner
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 prefixedagentbase-template-*. Core stays template-agnostic; the loader + validator + model card parser do the rest.New CLI
Built-in templates
status-pipeline— formalises the legacy kanban defaultcorrespondence-versioned— mirrors the hand-built rffi board (round-based collection)Backward compatibility
Boards without a
🧬 DATA MODELcard are treated asstatus-pipeline@0(assumed default). No config migration needed.Verified
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)
~/.openclaw/workspaces/nebula/agentbase-templates-design.md~/.openclaw/.dna/conventions/board-template-plugins.mdagentbase-template-status-pipelineandagentbase-template-correspondence-versionedas 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