Skip to content

Commit eb9ba96

Browse files
raifdmuellerclaude
andcommitted
fix: add brownfield workflow page rendering and SPA routing
- Add brownfield-workflow.adoc to render-docs.js prebuild step - Register /brownfield route in main.js and router.js - Fix AsciiDoc cross-links to use SPA hash routes (#/brownfield, #/workflow) instead of .adoc file references Without this, the brownfield page returns 404 on the deployed site. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d7b402c commit eb9ba96

5 files changed

Lines changed: 23 additions & 5 deletions

File tree

docs/brownfield-workflow.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Ralf D. Müller
66

77
== Introduction
88

9-
You have mastered the link:spec-driven-workflow.adoc[greenfield workflow].
9+
You have mastered the link:#/workflow[greenfield workflow].
1010
Now you want to apply it to an existing codebase.
1111

1212
The core principles remain the same: small steps, high autonomy, error correction loops.
@@ -152,7 +152,7 @@ Stable code that nobody touches does not need specs.
152152
|link:#/anchor/tdd-london-school[TDD London] / link:#/anchor/tdd-chicago-school[Chicago]
153153

154154
|Continue
155-
|Follow link:spec-driven-workflow.adoc[the standard workflow] from Step 3 (PRD) or Step 8 (Implementation), depending on whether you are adding new features or fixing bugs.
155+
|Follow link:#/workflow[the standard workflow] from Step 3 (PRD) or Step 8 (Implementation), depending on whether you are adding new features or fixing bugs.
156156
|{empty}--
157157
|===
158158

docs/spec-driven-workflow.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Click on any anchor to see its full definition on the Semantic Anchors website.
3131
[IMPORTANT]
3232
====
3333
This workflow is designed for greenfield projects built from scratch with AI assistance.
34-
For existing codebases, see link:brownfield-workflow.adoc[Adapting the Workflow to Brownfield Projects].
34+
For existing codebases, see link:#/brownfield[Adapting the Workflow to Brownfield Projects].
3535
====
3636

3737
== The Key Principle: Small Steps, High Autonomy
@@ -434,7 +434,7 @@ Consider assigning different AI models to different review roles.
434434
Run ATAM reviews after each major architectural change, not just once.
435435
Groom the backlog more frequently as the project grows.
436436
*Legacy codebases*:: This workflow assumes you start from scratch.
437-
See link:brownfield-workflow.adoc[Adapting the Workflow to Brownfield Projects] for a dedicated guide covering reverse engineering, baseline test coverage, and incremental migration using bounded contexts.
437+
See link:#/brownfield[Adapting the Workflow to Brownfield Projects] for a dedicated guide covering reverse engineering, baseline test coverage, and incremental migration using bounded contexts.
438438
*Frontend / HTML applications*:: This workflow works well for backend code, CLIs, and libraries where the compiler and TDD provide strong error correction.
439439
Frontend applications can be built with the same approach, but consistent UI is harder to verify automatically.
440440
The error correction layers that make backend development reliable (compiler errors, test failures) have no direct equivalent for visual consistency.
@@ -532,7 +532,7 @@ Start with the Socratic Method for requirements and see where it leads.
532532
If you discover anchors that work well in your workflow, https://github.com/LLM-Coding/Semantic-Anchors/blob/main/CONTRIBUTING.md[contribute them to the collection].
533533

534534
Once you are comfortable with this greenfield workflow, you can adapt it to existing codebases.
535-
See link:brownfield-workflow.adoc[Adapting the Workflow to Brownfield Projects] for a step-by-step guide.
535+
See link:#/brownfield[Adapting the Workflow to Brownfield Projects] for a step-by-step guide.
536536

537537
=== Further Reading
538538

scripts/render-docs.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ renderFile(
8484
path.join(WEB_DOCS, 'spec-driven-workflow.html')
8585
)
8686

87+
renderFile(
88+
path.join(ROOT, 'docs/brownfield-workflow.adoc'),
89+
path.join(WEB_DOCS, 'brownfield-workflow.html')
90+
)
91+
8792
renderFile(
8893
path.join(ROOT, 'docs/anchor-evaluations.adoc'),
8994
path.join(WEB_DOCS, 'anchor-evaluations.html')

website/src/main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ function initApp() {
110110
addRoute('/rejected-proposals', renderRejectedProposalsPage)
111111
addRoute('/all-anchors', renderAllAnchorsPage)
112112
addRoute('/workflow', renderWorkflowPage)
113+
addRoute('/brownfield', renderBrownfieldPage)
113114
addRoute('/contracts', renderContractsPageHandler)
114115
addRoute('/evaluations', renderEvaluationsPage)
115116

@@ -233,6 +234,15 @@ function renderWorkflowPage() {
233234
loadDocContent('docs/spec-driven-workflow.adoc')
234235
}
235236

237+
function renderBrownfieldPage() {
238+
const pageContent = document.getElementById('page-content')
239+
if (!pageContent) return
240+
241+
pageContent.innerHTML = renderDocPage()
242+
updateActiveNavLink()
243+
loadDocContent('docs/brownfield-workflow.adoc')
244+
}
245+
236246
function renderContractsPageHandler() {
237247
const pageContent = document.getElementById('page-content')
238248
if (!pageContent) return
@@ -458,6 +468,8 @@ function handleLanguageChange() {
458468
loadDocContent('docs/all-anchors.adoc')
459469
} else if (currentRoute === '/workflow') {
460470
loadDocContent('docs/spec-driven-workflow.adoc')
471+
} else if (currentRoute === '/brownfield') {
472+
loadDocContent('docs/brownfield-workflow.adoc')
461473
} else if (currentRoute === '/') {
462474
initCardGridVisualization()
463475
}

website/src/utils/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const ROUTE_TITLES = {
1717
'/about': 'About — Semantic Anchors',
1818
'/contracts': 'Semantic Contracts — Semantic Anchors',
1919
'/workflow': 'Development Workflow — Semantic Anchors',
20+
'/brownfield': 'Brownfield Workflow — Semantic Anchors',
2021
'/evaluations': 'Evaluations — Semantic Anchors',
2122
'/contributing': 'Contributing — Semantic Anchors',
2223
'/changelog': 'Changelog — Semantic Anchors',

0 commit comments

Comments
 (0)