Skip to content

Commit 5397722

Browse files
gmoonclaude
andcommitted
Add blog visual redesign and engagement features
Styled blockquotes with attribution, callout/insight boxes, inline Lattice flow diagram, source cards, author bio, discussion CTA, share links (X, LinkedIn, HN), and Giscus comments integration. Extended markdown renderer with blockquote, callout, and diagram syntax. Added tests for renderer and new data fields (50 tests, up from 29). Implements REQ-WEB-009. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6cdb46d commit 5397722

9 files changed

Lines changed: 758 additions & 32 deletions

File tree

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"format:check": "prettier --check 'src/**/*.{ts,tsx}' 'scripts/**/*.ts'"
1717
},
1818
"dependencies": {
19+
"@giscus/react": "^3.1.0",
1920
"react": "^19.0.0",
2021
"react-dom": "^19.0.0"
2122
},

scripts/prerender.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('pre-rendered blog post', () => {
8787
const html = readFileSync(file, 'utf-8')
8888
expect(html).toContain('<noscript>')
8989
expect(html).toContain('<article')
90-
expect(html).toContain(post.author)
90+
expect(html).toContain(post.author.name)
9191
})
9292

9393
it('noscript contains post headings', () => {

scripts/prerender.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ for (const route of routes) {
7272
const articleHtml = [
7373
`<article style="max-width:800px;margin:0 auto;padding:2rem;font-family:sans-serif">`,
7474
`<h1>${esc(post.title)}</h1>`,
75-
`<p><em>${post.date} · ${esc(post.author)}</em></p>`,
75+
`<p><em>${post.date} · ${esc(post.author.name)}</em></p>`,
7676
contentToHtml(post.content),
7777
`</article>`,
7878
].join('')

src/components/BlogComments.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Giscus from '@giscus/react'
2+
3+
export function BlogComments({ slug }: { slug: string }) {
4+
return (
5+
<Giscus
6+
key={slug}
7+
repo="forkzero/forkzero.ai"
8+
repoId="R_kgDORLeYLw"
9+
category="Blog Comments"
10+
categoryId="" /* TODO: Enable Discussions, create "Blog Comments" category, get ID from https://giscus.app */
11+
mapping="pathname"
12+
strict="0"
13+
reactionsEnabled="1"
14+
emitMetadata="0"
15+
inputPosition="top"
16+
theme="light"
17+
lang="en"
18+
loading="lazy"
19+
/>
20+
)
21+
}

src/data/blog-posts.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,35 @@ describe('blog posts data integrity', () => {
1313
expect(post.title).toBeTruthy()
1414
expect(post.date).toBeTruthy()
1515
expect(post.author).toBeTruthy()
16+
expect(post.author.name).toBeTruthy()
17+
expect(post.author.bio).toBeTruthy()
1618
expect(post.excerpt).toBeTruthy()
1719
expect(post.content).toBeTruthy()
1820
}
1921
})
2022

23+
it('posts with sources have valid source entries', () => {
24+
for (const post of blogPosts) {
25+
if (post.sources) {
26+
expect(post.sources.length).toBeGreaterThan(0)
27+
for (const source of post.sources) {
28+
expect(source.name).toBeTruthy()
29+
expect(source.author).toBeTruthy()
30+
expect(source.description).toBeTruthy()
31+
expect(source.url).toMatch(/^https?:\/\//)
32+
}
33+
}
34+
}
35+
})
36+
37+
it('posts with discussionPrompt have non-empty string', () => {
38+
for (const post of blogPosts) {
39+
if (post.discussionPrompt) {
40+
expect(post.discussionPrompt.length).toBeGreaterThan(0)
41+
}
42+
}
43+
})
44+
2145
it('all slugs are unique', () => {
2246
const slugs = blogPosts.map((p) => p.slug)
2347
expect(new Set(slugs).size).toBe(slugs.length)

src/data/blog-posts.ts

Lines changed: 74 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
export interface BlogAuthor {
2+
name: string
3+
bio: string
4+
github?: string
5+
x?: string
6+
}
7+
8+
export interface BlogSource {
9+
name: string
10+
author: string
11+
description: string
12+
url: string
13+
}
14+
115
export interface BlogPost {
216
id: string
317
slug: string
418
title: string
519
date: string
6-
author: string
20+
author: BlogAuthor
721
excerpt: string
822
content: string
23+
discussionPrompt?: string
24+
sources?: BlogSource[]
925
}
1026

1127
export const blogPosts: BlogPost[] = [
@@ -14,9 +30,55 @@ export const blogPosts: BlogPost[] = [
1430
slug: 'context-engineering-knowledge-layer',
1531
title: 'Context Engineering Needs a Knowledge Layer',
1632
date: '2026-02-10',
17-
author: 'George Moon',
33+
author: {
34+
name: 'George Moon',
35+
bio: 'Building knowledge coordination tools for human-agent collaboration.',
36+
github: 'https://github.com/georgemoon',
37+
x: 'https://x.com/georgemoon',
38+
},
1839
excerpt:
1940
'Context engineering is the term of the moment. But most approaches focus on runtime — what fills the context window for each LLM call. The missing piece is upstream: where does the knowledge come from, and is it still valid?',
41+
discussionPrompt:
42+
"What's your experience with context engineering? Are your agents working from structured knowledge or just RAG?",
43+
sources: [
44+
{
45+
name: 'Context Engineering',
46+
author: 'Andrej Karpathy',
47+
description: 'The tweet that popularized the term, reframing prompt engineering as context engineering.',
48+
url: 'https://x.com/karpathy/status/1937902205765607626',
49+
},
50+
{
51+
name: 'Effective Context Engineering for AI Agents',
52+
author: 'Anthropic',
53+
description: 'A comprehensive guide to building agents that use context effectively.',
54+
url: 'https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents',
55+
},
56+
{
57+
name: 'Context Engineering',
58+
author: 'Tobi Lutke',
59+
description: '"The art of providing all the context for the task to be plausibly solvable by the LLM."',
60+
url: 'https://x.com/tobi/status/1935533422589399127',
61+
},
62+
{
63+
name: 'The Rise of Context Engineering',
64+
author: 'LangChain',
65+
description:
66+
'Harrison Chase organizes context engineering into four strategies: write, select, compress, isolate.',
67+
url: 'https://blog.langchain.com/the-rise-of-context-engineering/',
68+
},
69+
{
70+
name: 'Context Engineering for AI Agents',
71+
author: 'Manus',
72+
description: 'Lessons from production — KV-cache hit rate as the most important metric.',
73+
url: 'https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus',
74+
},
75+
{
76+
name: 'Context Engineering Is In, Prompt Engineering Is Out',
77+
author: 'Gartner',
78+
description: 'The analyst take on why context engineering has replaced prompt engineering.',
79+
url: 'https://www.gartner.com/en/articles/context-engineering',
80+
},
81+
],
2082
content: `Context engineering is the term of the moment. Andrej Karpathy, Tobi Lutke, and Gartner all agree: it has replaced prompt engineering as the core discipline for building with LLMs.
2183
2284
But most of the conversation focuses on runtime — what fills the context window for each call. There's a missing layer underneath.
@@ -25,7 +87,10 @@ But most of the conversation focuses on runtime — what fills the context windo
2587
2688
Harrison Chase at LangChain organized context engineering into four strategies: **write** context (persist for later retrieval), **select** context (pull what's relevant), **compress** context (reduce tokens), and **isolate** context (segregate via sub-agents).
2789
28-
Anthropic's guide defines the goal as finding "the smallest set of high-signal tokens that maximize the likelihood of your desired outcome." Manus reported that KV-cache hit rate is their most important metric in production.
90+
> Anthropic's guide defines the goal as finding "the smallest set of high-signal tokens that maximize the likelihood of your desired outcome."
91+
> — Anthropic, *Effective Context Engineering for AI Agents*
92+
93+
Manus reported that KV-cache hit rate is their most important metric in production.
2994
3095
These are useful frameworks. They describe the mechanics of filling a context window well. But they share an assumption: that the knowledge you're selecting from is already organized, versioned, and traceable.
3196
@@ -48,18 +113,16 @@ This is knowledge coordination, not information retrieval. The relationships bet
48113
49114
This is the problem Lattice solves. It's a knowledge coordination protocol that connects research, strategy, requirements, and implementation into a traversable, version-aware graph.
50115
51-
**Typed nodes** represent different kinds of knowledge:
52-
- **Sources**: Primary research (papers, articles, data)
53-
- **Theses**: Strategic claims derived from research
54-
- **Requirements**: Testable specifications derived from theses
55-
- **Implementations**: Code that satisfies requirements
116+
<!-- diagram:lattice-flow -->
56117
57118
**Version-bound edges** connect them:
58119
- A source *supports* a thesis
59120
- A thesis *derives* a requirement
60121
- An implementation *satisfies* a requirement
61122
123+
:::insight
62124
Every edge records the version of both source and target. When a node changes, edges bound to the old version are flagged as potentially stale. This is drift detection — and it's something no vector store provides.
125+
:::
63126
64127
## In practice
65128
@@ -84,7 +147,8 @@ Lattice answers: **"What is the structured knowledge that informs those decision
84147
85148
Think of it as the coordination layer underneath. RAG selects *from* knowledge; Lattice ensures that knowledge is organized, versioned, and traceable. The four strategies Chase describes — write, select, compress, isolate — all work better when the underlying knowledge has structure.
86149
87-
As Tobi Lutke put it: context engineering is "the art of providing all the context for the task to be plausibly solvable by the LLM." Lattice makes that context trustworthy.
150+
> Context engineering is "the art of providing all the context for the task to be plausibly solvable by the LLM." Lattice makes that context trustworthy.
151+
> — Tobi Lutke
88152
89153
## Get started
90154
@@ -98,16 +162,6 @@ lattice init
98162
99163
- [Lattice on GitHub](https://github.com/forkzero/lattice)
100164
- [Live dashboard](https://forkzero.ai/reader?url=https://forkzero.github.io/lattice/lattice-data.json)
101-
- [Forkzero](https://forkzero.ai)
102-
103-
---
104-
105-
**Sources:**
106-
- [Andrej Karpathy on context engineering](https://x.com/karpathy/status/1937902205765607626)
107-
- [Anthropic: Effective Context Engineering for AI Agents](https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents)
108-
- [Tobi Lutke on context engineering](https://x.com/tobi/status/1935533422589399127)
109-
- [LangChain: The Rise of Context Engineering](https://blog.langchain.com/the-rise-of-context-engineering/)
110-
- [Manus: Context Engineering for AI Agents](https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus)
111-
- [Gartner: Context Engineering Is In, Prompt Engineering Is Out](https://www.gartner.com/en/articles/context-engineering)`,
165+
- [Forkzero](https://forkzero.ai)`,
112166
},
113167
]

0 commit comments

Comments
 (0)