Skip to content

Commit db06ff2

Browse files
Merge pull request #119 from CodeWithJuber/claude/repo-review-agentic-generics-tteyld
feat(docs): forge docs render — self-writing doc surfaces + one brand diagram theme
2 parents a77b846 + ff8bb49 commit db06ff2

13 files changed

Lines changed: 631 additions & 88 deletions

File tree

ARCHITECTURE.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ native config. The four layers are how the brain is expressed; the compiler is h
4242
is delivered.
4343

4444
```mermaid
45-
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','fontFamily':'ui-sans-serif, system-ui, sans-serif'}}}%%
45+
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
4646
flowchart TD
4747
S["source/<br/>rules.json · substrate.json · mcp.json"] -->|"forge sync<br/>content-hash + DO-NOT-EDIT headers"| N["native configs<br/>CLAUDE.md · AGENTS.md · .cursor · .gemini · .aider · …"]
4848
S -. configures .-> L
@@ -87,7 +87,7 @@ checks and returns a single verdict. It composes the individually-callable stage
8787
`anchor`, `verify`) into one pre-action contract.
8888

8989
```mermaid
90-
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','fontFamily':'ui-sans-serif, system-ui, sans-serif'}}}%%
90+
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
9191
flowchart TD
9292
RE["referenced entities"] --> INTAKE
9393
subgraph INTAKE["intake"]
@@ -136,7 +136,7 @@ claims into `.forge/ledger/`. Because a claim's bytes are a pure function of
136136
fold together over plain git with no conflicts.
137137

138138
```mermaid
139-
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','fontFamily':'ui-sans-serif, system-ui, sans-serif'}}}%%
139+
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
140140
flowchart LR
141141
subgraph EV["local events"]
142142
direction TB
@@ -171,7 +171,7 @@ dependencies still resolve. Otherwise it falls through to generation and mints a
171171
claim on the way back.
172172

173173
```mermaid
174-
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','fontFamily':'ui-sans-serif, system-ui, sans-serif'}}}%%
174+
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
175175
flowchart LR
176176
SP["spec"] --> FP["fingerprint<br/>MinHash + LSH"]
177177
FP --> LD["match ladder<br/>exact → near → adapt → miss"]
@@ -510,3 +510,31 @@ asserts all three resolve to `global/`.
510510

511511
See [ROADMAP.md](ROADMAP.md) for direction and [`docs/adr/`](docs/adr/) for the recorded
512512
architecture decisions (zero runtime deps, the SKILL.md standard, guard-over-prose).
513+
514+
## Repo map (generated)
515+
516+
Top-level directories sized by file count, edges = import counts between them —
517+
rendered from the live import graph by `forge docs render`, so it can never drift
518+
from the tree it describes.
519+
520+
<!-- forge:render:repo-map:begin (generated by `forge docs render` — do not edit) -->
521+
```mermaid
522+
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
523+
flowchart LR
524+
test["test<br/>98 files"]
525+
src["src<br/>93 files"]
526+
landing["landing<br/>60 files"]
527+
research["research<br/>35 files"]
528+
bench["bench<br/>2 files"]
529+
global["global<br/>2 files"]
530+
scripts["scripts<br/>2 files"]
531+
docs["docs<br/>1 file"]
532+
examples["examples<br/>1 file"]
533+
test -- 191 --> src
534+
bench -- 7 --> src
535+
examples -- 4 --> src
536+
test -- 2 --> scripts
537+
scripts --> src
538+
test --> bench
539+
```
540+
<!-- forge:render:repo-map:end -->

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- **`forge docs render` — the docs that can write themselves, do.** `docs check` could
12+
only detect drift; every fix was still a human hand-editing tables across five files.
13+
The derivable doc surfaces are now generated from the same registries the check reads,
14+
into marker-managed blocks (the `reports/benchmarks.md` pattern): the README command
15+
table and the GUIDE group map from `COMMANDS`/`GROUPS`, the MCP tool table from the
16+
`TOOLS` registry, every literal "N MCP tools" count phrase across all six files it
17+
lives in, one shared mermaid theme derived from `brand.json` (change the brand,
18+
re-render, every diagram in every tracked markdown file re-themes), and a repo map in
19+
`ARCHITECTURE.md` drawn from the live import graph. `docs check` gains a `render`
20+
reconciler: a stale registry-derived block is an error whose message is the fix
21+
(`forge docs render`); tree-derived output (repo map, diagram theme) warns without
22+
failing unrelated PRs.
23+
924
## [0.28.0] - 2026-08-07
1025

1126
### Added

ONBOARDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This page is the fast path: install, configure a repo, do a task, and watch the
1111
start paying off on day two.
1212

1313
```mermaid
14-
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','fontFamily':'ui-sans-serif, system-ui, sans-serif'}}}%%
14+
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#201a15','primaryTextColor':'#f2ede7','primaryBorderColor':'#372c22','lineColor':'#f26430','secondaryColor':'#272019','tertiaryColor':'#171310','edgeLabelBackground':'#201a15','clusterBkg':'#171310','clusterBorder':'#4a3b2e','fontFamily':'ui-sans-serif, system-ui, sans-serif','fontSize':'14px'},'flowchart':{'curve':'basis','padding':10,'nodeSpacing':36,'rankSpacing':44}}}%%
1515
flowchart TD
1616
I["forge init"] --> Cfg["every tool configured<br/>from one source"]
1717
Cfg --> Work["you work as usual"]

0 commit comments

Comments
 (0)