CR-2026-03-25: Domus Digitalis AsciiDoc + Seed Implementation
Change Summary
| Field | Value |
|---|---|
Change ID |
CR-2026-03-25-DOMUS-DIGITALIS |
Application |
domus-digitalis (Project Management App) |
Location |
|
Status |
COMPLETED |
Implemented By |
Claude Code |
Date |
2026-03-25 |
Risk Level |
Low (additive changes, no breaking modifications) |
Scope of Work
Two deliverables completed in this session:
-
Seed Script - Idempotent project seeding from JSON
-
AsciiDoc Workspace - Standalone editor in Visual Atelier
Deliverable 1: Seed Script
Problem
35 projects defined in projects.json needed to be loaded into PostgreSQL. Manual entry unacceptable.
Solution
Created prisma/seed.js with:
-
dotenv loading for DATABASE_URL
-
Slug generation from title
-
Upsert logic (create if new, update if exists)
-
Filter for valid project objects (skip comment-only entries)
Files Created
| File | Purpose |
|---|---|
|
Seed script (~125 lines) |
|
35 projects with metadata (existed, populated earlier) |
Key Code
require('dotenv').config(); // Critical - loads DATABASE_URL
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
// Filter out pure comment entries (objects with only _comment, no title)
const projects = data.projects.filter(p => p.title);
// Upsert logic using slug as unique identifier
const existing = await prisma.projects.findUnique({ where: { slug } });
if (existing) {
await prisma.projects.update({ where: { slug }, data: projectData });
} else {
await prisma.projects.create({ data: { ...projectData, slug } });
}
Execution Result
π Domus Digitalis Project Seeder
ββββββββββββββββββββββββββββββββββββββββ
π± Seeding 35 projects...
β
Created: Cisco ISE 3.4 Upgrade
β
Created: iPSK Manager HA Deployment
... (8 more created)
βοΈ Updated: Vault SSH Certificate Authority
βοΈ Updated: Network Automation CLI
... (23 more updated)
π Seed Summary:
Created: 10
Updated: 25
Errors: 0
Total: 35
β¨ Seeding complete!
Issues Encountered and Fixed
| Issue | Cause | Fix |
|---|---|---|
|
dotenv not loaded |
Added |
Only 25 of 35 projects processed |
Filter |
Changed to |
Deliverable 2: AsciiDoc Workspace Editor
Problem
Visual Atelier workspace (/atelier/workspace) had Mermaid, PlantUML, Draw.io but no AsciiDoc. User preference is AsciiDoc for all documentation.
Solution
Added AsciiDoc as fourth editor in Visual Atelier with:
-
Live preview using asciidoctor.js
-
14 example templates (organized in 4 categories)
-
Export to HTML and .adoc
-
Save/Load via useDiagramStorage hook
-
Fullscreen preview mode
-
Share functionality
Files Modified
| File | Action | Changes |
|---|---|---|
|
Modified |
Added "Document Tools" category with AsciiDoc entry |
|
Modified |
Changed grid from 3 to 4 columns, added AsciiDoc card |
|
Created |
Full standalone editor (~1170 lines, includes 14 example templates) |
Layout Changes
// Added new category in tools array
{
category: 'Document Tools',
items: [
{
icon: 'π',
name: 'AsciiDoc',
desc: 'Technical documentation',
route: '/atelier/workspace/asciidoc',
status: 'ready'
}
]
}
Editor Features
| Feature | Implementation |
|---|---|
Live Preview |
asciidoctor.js with dynamic import (client-side only) |
Templates |
14 templates in 4 categories (see below) |
Export HTML |
Blob download with rendered HTML |
Export .adoc |
Blob download with source |
Save/Load |
useDiagramStorage('asciidoc') hook |
Fullscreen |
Preview-only fullscreen mode |
Share |
URL token generation |
Example Templates Included (14 total)
Basics:
-
(1) Basic Document - Headers, paragraphs, lists
-
(2) Tables - Column specs, alignment
-
(3) Code Blocks - Source highlighting, callouts
-
(4) Admonitions - NOTE, TIP, WARNING, IMPORTANT, CAUTION
Advanced:
-
(5) Advanced Tables - Colspan, rowspan, AsciiDoc content in cells, nested tables
-
(6) Definition Lists - Glossary style, horizontal definitions, Q&A format
-
(7) Blocks & Quotes - Sidebars, blockquotes, verse, example blocks, open blocks
-
(8) Attributes & Variables - Document attributes, conditionals, counters
Macros & Formatting:
-
(9) UI Macros - kbd, menu, btn macros, icons, text formatting
-
(10) Footnotes & Anchors - Inline/named footnotes, custom anchors, bibliography
-
(11) Checklists - Task lists, nested checklists, project status tables
-
(12) Passthrough & Raw - Raw HTML, literal blocks, stem/math notation
Templates:
-
(13) Includes & Refs - Partial and example includes, cross-references
-
(14) Runbook Template - Phase structure with validation steps
Bug Fix: White Window / Narrow Fullscreen
Initial implementation had rendering issues:
| Issue | Root Cause | Fix |
|---|---|---|
White window (no preview) |
|
Added |
Narrow fullscreen |
|
Changed to |
Textarea fixed height |
|
Changed to |
TypeScript errors |
|
Added |
HTML generated but invisible |
|
Installed plugin, added to |
cd apps/frontend
npm install @tailwindcss/typography
plugins: [
require('@tailwindcss/typography'),
],
Verification
Seed Script
cd ~/atelier/_projects/personal/domus-digitalis/apps/backend
npm run db:seed
Expected: 35 projects, 0 errors
AsciiDoc Workspace
-
Navigate to localhost:3000/atelier/workspace
-
Click AsciiDoc card (or use sidebar)
-
Select template from Examples dropdown
-
Verify live preview renders correctly
-
Test Export HTML and Export .adoc
-
Test Save, refresh page, verify Load works
Documentation Updates
| File | Changes |
|---|---|
|
Created comprehensive project documentation with full stack enumeration |
|
Added Domus Digitalis to Personal Projects table |
Sign-Off
| Role | Name | Date |
|---|---|---|
Requestor |
Evan Rosado |
2026-03-25 |
Implementer |
Claude Code |
2026-03-25 |
Status |
COMPLETED |
2026-03-25 |