From 03bb53e05db6bf11d017c1c316e2738d0bf7a29d Mon Sep 17 00:00:00 2001 From: Goreng Date: Mon, 6 Jul 2026 19:22:31 +0800 Subject: [PATCH 1/8] plan: Add project-overview-html-skill plan Plan for a new sce-project-overview-html skill that renders context/ Markdown into a single self-contained HTML document with Mermaid.js (CDN) diagrams and inline CSS for human-readable project understanding. Two-phase staging: T01 hand-authors the skill in the repo-root .opencode/skills/ active runtime tree for manual OpenCode testing; T02-T07 promote the validated body into the canonical Pkl pipeline, regenerate all three target trees, and update context discoverability. Affected plan: project-overview-html-skill Task IDs: T01, T02, T03, T04, T05, T06, T07 (all status:todo) Co-authored-by: SCE --- context/plans/project-overview-html-skill.md | 102 +++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 context/plans/project-overview-html-skill.md diff --git a/context/plans/project-overview-html-skill.md b/context/plans/project-overview-html-skill.md new file mode 100644 index 00000000..f4f8bd6d --- /dev/null +++ b/context/plans/project-overview-html-skill.md @@ -0,0 +1,102 @@ +# Plan: project-overview-html-skill + +## Change summary + +Add a new SCE skill `sce-project-overview-html` that generates a single self-contained HTML document from the project's `context/` Markdown files, helping a human reader quickly understand the project and how it works. The HTML embeds Mermaid.js (client-side, CDN) so existing Mermaid diagrams in context render in-browser, and includes CSS styling for a clean, readable layout. Output is written to `context/tmp/project-overview.html` (disposable, gitignored). + +This plan uses a two-phase staging approach: +- **Phase 1 (T01):** Hand-author the skill directly in the repo-root `.opencode/skills/` active runtime tree so the user can manually test it with OpenCode immediately. +- **Phase 2 (T02–T07):** Once manually validated, promote the skill into the canonical Pkl source layer, register it across all metadata/renderers, regenerate the generated config trees, update context discoverability, and validate. + +## Success criteria + +- A new skill `sce-project-overview-html` exists in the repo-root `.opencode/skills/sce-project-overview-html/SKILL.md` and is manually testable via OpenCode (Phase 1). +- The skill is promoted to canonical Pkl sources and generated into all three target trees (manual OpenCode, automated OpenCode, Claude) with parity verified (Phase 2). +- The skill body instructs the agent to read `context/overview.md`, `context/architecture.md`, `context/patterns.md`, `context/glossary.md`, and `context/context-map.md`, plus any linked domain files referenced in `context-map.md`, and render them into a single self-contained HTML document. +- The generated HTML includes: + - Embedded Mermaid.js (CDN ` + + + +``` + +### Section ordering +1. Overview +2. Architecture +3. Patterns +4. Glossary +5. Context Map +6. Domain files (one `
` per linked file, ordered as listed in `context-map.md`) + +### Markdown-to-HTML rendering +- Convert each Markdown file's content to HTML body markup (headings, paragraphs, lists, tables, code blocks, blockquotes). +- Preserve Mermaid blocks as `
...
` so the client-side Mermaid.js library renders them. Do not convert Mermaid fenced blocks to plain code blocks. +- Preserve inline code as `` and fenced code blocks as `
`.
+- Generate heading anchors (`id` attributes) from heading text for in-page navigation.
+
+### Anchor navigation
+- Build a table-of-contents `