Skip to content

Commit 03ba180

Browse files
authored
Merge pull request #189 from raifdmueller/feat/workflow-docs-page
feat: add Spec-Driven Workflow documentation page
2 parents 568d4ab + d97201c commit 03ba180

8 files changed

Lines changed: 2669 additions & 14 deletions

File tree

docs/spec-driven-workflow.de.html

Lines changed: 1301 additions & 0 deletions
Large diffs are not rendered by default.

docs/spec-driven-workflow.html

Lines changed: 1300 additions & 0 deletions
Large diffs are not rendered by default.

scripts/render-docs.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,41 @@ renderFile(
7878

7979
// all-anchors.adoc uses include:: directives — resolved automatically in Node.js
8080
renderFile(path.join(ROOT, 'docs/all-anchors.adoc'), path.join(WEB_DOCS, 'all-anchors.html'))
81+
82+
// Pre-rendered HTML docs (no .adoc source available) — copy with link rewriting
83+
function copyHtmlDoc(srcPath, destPath) {
84+
if (!fs.existsSync(srcPath)) return
85+
try {
86+
fs.mkdirSync(path.dirname(destPath), { recursive: true })
87+
let html = fs.readFileSync(srcPath, 'utf-8')
88+
// Extract content from full HTML page (between <div id="content"> and <div id="footer">)
89+
const contentStart = html.indexOf('<div id="content">')
90+
const contentEnd = html.indexOf('<div id="footer">')
91+
if (contentStart !== -1) {
92+
const titleMatch = html.match(/<h1>(.*?)<\/h1>/)
93+
const title = titleMatch ? titleMatch[1] : ''
94+
const content = html.slice(contentStart, contentEnd !== -1 ? contentEnd : undefined).trim()
95+
html = `<h1>${title}</h1>\n${content}`
96+
}
97+
// Convert absolute Semantic Anchors links to relative hash links
98+
html = html.replace(
99+
/https:\/\/llm-coding\.github\.io\/Semantic-Anchors\/#\/anchor\//g,
100+
'#/anchor/'
101+
)
102+
html = html.replace(/https:\/\/llm-coding\.github\.io\/Semantic-Anchors\//g, '#/')
103+
fs.writeFileSync(destPath, html, 'utf-8')
104+
console.log(`Copied: ${path.relative(ROOT, destPath)}`)
105+
} catch (err) {
106+
console.error(`Failed to copy ${path.relative(ROOT, srcPath)}:`, err.message)
107+
process.exit(1)
108+
}
109+
}
110+
111+
copyHtmlDoc(
112+
path.join(ROOT, 'docs/spec-driven-workflow.html'),
113+
path.join(WEB_DOCS, 'spec-driven-workflow.html')
114+
)
115+
copyHtmlDoc(
116+
path.join(ROOT, 'docs/spec-driven-workflow.de.html'),
117+
path.join(WEB_DOCS, 'spec-driven-workflow.de.html')
118+
)

website/package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/src/components/header.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export function renderHeader() {
3939
<a href="#/contributing" class="nav-link text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition-colors" data-route="/contributing" data-i18n="nav.contributing">${i18n.t('nav.contributing')}</a>
4040
<a href="#/changelog" class="nav-link text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition-colors" data-route="/changelog" data-i18n="nav.changelog">${i18n.t('nav.changelog')}</a>
4141
<a href="#/agentskill" class="nav-link text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition-colors" data-route="/agentskill" data-i18n="nav.agentskill">${i18n.t('nav.agentskill')}</a>
42+
<a href="#/workflow" class="nav-link text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition-colors" data-route="/workflow" data-i18n="nav.workflow">${i18n.t('nav.workflow')}</a>
4243
</div>
4344
<div class="flex items-center gap-3">
4445
<button
@@ -144,6 +145,7 @@ export function renderHeader() {
144145
<a href="#/contributing" class="nav-link mobile-nav-link px-3 py-2 rounded-md text-[var(--color-text-secondary)] hover:text-[var(--color-text)] hover:bg-[var(--color-bg-secondary)] transition-colors" data-route="/contributing" data-i18n="nav.contributing">${i18n.t('nav.contributing')}</a>
145146
<a href="#/changelog" class="nav-link mobile-nav-link px-3 py-2 rounded-md text-[var(--color-text-secondary)] hover:text-[var(--color-text)] hover:bg-[var(--color-bg-secondary)] transition-colors" data-route="/changelog" data-i18n="nav.changelog">${i18n.t('nav.changelog')}</a>
146147
<a href="#/agentskill" class="nav-link mobile-nav-link px-3 py-2 rounded-md text-[var(--color-text-secondary)] hover:text-[var(--color-text)] hover:bg-[var(--color-bg-secondary)] transition-colors" data-route="/agentskill" data-i18n="nav.agentskill">${i18n.t('nav.agentskill')}</a>
148+
<a href="#/workflow" class="nav-link mobile-nav-link px-3 py-2 rounded-md text-[var(--color-text-secondary)] hover:text-[var(--color-text)] hover:bg-[var(--color-bg-secondary)] transition-colors" data-route="/workflow" data-i18n="nav.workflow">${i18n.t('nav.workflow')}</a>
147149
</div>
148150
</div>
149151
</nav>

website/src/main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ function initApp() {
106106
addRoute('/agentskill', renderAgentSkillPage)
107107
addRoute('/rejected-proposals', renderRejectedProposalsPage)
108108
addRoute('/all-anchors', renderAllAnchorsPage)
109+
addRoute('/workflow', renderWorkflowPage)
109110

110111
const app = document.querySelector('#app')
111112
if (!app) return
@@ -217,6 +218,15 @@ function renderAllAnchorsPage() {
217218
loadDocContent('docs/all-anchors.adoc')
218219
}
219220

221+
function renderWorkflowPage() {
222+
const pageContent = document.getElementById('page-content')
223+
if (!pageContent) return
224+
225+
pageContent.innerHTML = renderDocPage()
226+
updateActiveNavLink()
227+
loadDocContent('docs/spec-driven-workflow.adoc')
228+
}
229+
220230
function updateActiveNavLink() {
221231
const currentRoute = window.location.hash.slice(1) || '/'
222232
document.querySelectorAll('.nav-link').forEach((link) => {
@@ -419,6 +429,8 @@ function handleLanguageChange() {
419429
loadDocContent('docs/rejected-proposals.adoc')
420430
} else if (currentRoute === '/all-anchors') {
421431
loadDocContent('docs/all-anchors.adoc')
432+
} else if (currentRoute === '/workflow') {
433+
loadDocContent('docs/spec-driven-workflow.adoc')
422434
} else if (currentRoute === '/') {
423435
initCardGridVisualization()
424436
}

website/src/translations/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"nav.contributing": "Mitwirken",
1111
"nav.changelog": "Änderungsprotokoll",
1212
"nav.agentskill": "AgentSkill",
13+
"nav.workflow": "Workflow",
1314
"main.heading": "Semantic Anchors erkunden",
1415
"main.subheading": "Ein kuratierter Katalog klar definierter Begriffe, Methoden und Frameworks für effektive LLM-Kommunikation.",
1516
"main.aboutLink": "Über",

website/src/translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"nav.contributing": "Contributing",
1111
"nav.changelog": "Changelog",
1212
"nav.agentskill": "AgentSkill",
13+
"nav.workflow": "Workflow",
1314
"main.heading": "Explore Semantic Anchors",
1415
"main.subheading": "A curated catalog of well-defined terms, methodologies, and frameworks for effective LLM communication.",
1516
"main.aboutLink": "About",

0 commit comments

Comments
 (0)