Skip to content

Kanban Per-Board Seed Vault Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Let each Kanban board save working-board snapshots and restore any snapshot (or the bible seed) via Full replace or Soft merge, with datetime labels, localStorage vault, and Export/Import.

Architecture: New html/js/kanban-seed-vault.js owns vault CRUD + soft-merge apply. kanban.js replaces Reset-to-seed with Save board seed + Restore seed modals. Toolbar labels updated in kanban.html and build_pb_kanban.py shell. Docs in docs/21-module-kanban.md.

Tech Stack: Vanilla JS · localStorage · existing kanban modal / projectPickList patterns

Spec: docs/superpowers/specs/2026-11-05-kanban-per-board-seed-vault-design.md

  • Do not git commit unless the user explicitly asks.
  • Do not rewrite kanban-seed.js content or bump bible seedVersion from the UI.
  • Vault key: tfa-pb-kanban-board-seeds-v1 (separate from live board tfa-pb-kanban-board-v13).
  • Save = deep clone of current working project only.
  • Restore modes: Full replace | Soft merge (ask each time).
  • Bible seed always offered when project exists in TFA_KANBAN_SEED; not deletable.
  • Import merges by seed id, skip duplicates.
  • Warn (do not block) when a board exceeds ~50 user snapshots.
Path Role
html/js/kanban-seed-vault.js Vault load/save, label format, add/delete, import merge, softMergeProject
html/js/kanban-seed-vault.test.js Node-runnable unit checks for vault helpers
html/js/kanban.js Save / Restore UI; call vault + apply
html/kanban.html Toolbar buttons + script tag
build_pb_kanban.py Keep generated shell toolbar in sync
html/css/kanban.css Seed list / mode radio styles
docs/21-module-kanban.md Document Save / Restore / vault Export-Import

Files:

  • Create: html/js/kanban-seed-vault.js
  • Create: html/js/kanban-seed-vault.test.js

Interfaces:

  • Produces window.TFAKanbanSeedVault with:

    • STORAGE_KEY = "tfa-pb-kanban-board-seeds-v1"
    • emptyVault() → { version: 1, byProjectId: {} }
    • loadVault() / saveVault(vault) (localStorage; no-op storage in tests via inject)
    • formatLocalLabel(iso, note) → "YYYY-MM-DD HH:MM" + optional — note
    • listUserSeeds(vault, projectId) → newest-first array
    • addWorkingSnapshot(vault, project, note) → entry { id, createdAt, label, source:"working", project }; mutates vault; returns entry
    • deleteUserSeeds(vault, projectId, ids[]) → count deleted
    • mergeImport(vault, incoming) → { added, skipped } (skip duplicate ids)
    • softMergeProject(localProj, seedProj) → mutates localProj like ensureSeedModules for one board; for cinematic-benchmark prune non-seed module ids
    • bibleProject(rawSeed, projectId) → project object or null
  • Step 1: Implement vault module (pure helpers + optional storage arg for tests).

  • Step 2: Write kanban-seed-vault.test.js covering: add → list order, delete, mergeImport skip dup, softMerge keeps column/notes and refreshes tasks, formatLocalLabel with note, warn threshold helper countWarning(vault, projectId) true at >50.

  • Step 3: Run node html/js/kanban-seed-vault.test.js — expect PASS.


Task 2: Toolbar + Save / Restore in kanban.js

Section titled “Task 2: Toolbar + Save / Restore in kanban.js”

Files:

  • Modify: html/kanban.html (buttons + script)
  • Modify: build_pb_kanban.py (toolbar shell ~3369–3375)
  • Modify: html/js/kanban.js (replace #reset-seed handler; add #save-board-seed)
  • Modify: html/css/kanban.css (seed-pick styles)

UI locks:

  • Save board seed — active board; datetime + optional note; withUndo not required (vault write only).

  • Restore seed — multi-select boards; per-board <select> of Bible + user seeds; radio Full replace / Soft merge; ack + confirm; withUndo before each board apply; delete selected user seeds; Export/Import vault buttons.

  • Step 1: Add toolbar buttons + script tag for vault.

  • Step 2: Implement Save modal.

  • Step 3: Implement Restore modal (replace Reset).

  • Step 4: Manual smoke: save Demo, restore Soft + Full, export/import vault, custom board no Bible row.


Files:

  • Modify: docs/21-module-kanban.md

  • Step 1: Replace Reset-to-seed docs with Save / Restore / vault key / Export-Import seeds.

  • Step 2: graphify update . from pack root.