Skip to content

Commit 7c2cf75

Browse files
committed
feat: add comprehensive blog knowledge base and structured post index for enhanced querying and navigation
1 parent 0d83bc0 commit 7c2cf75

3 files changed

Lines changed: 9382 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Portfolio Repository
2+
3+
Personal portfolio + technical blog (~90 posts on RAG, agents, knowledge graphs, data engineering, ML internals, math curiosities). React app under `front/`, blog content under `front/public/blog/posts/`.
4+
5+
## Knowledge base for blog content
6+
7+
When the user asks about blog topics — what they have written about, what to read on a topic, where to cite their own work, what concepts a post covers, prerequisites between posts — use the knowledge base in `knowledge-base/`.
8+
9+
**Always start with `knowledge-base/KNOWLEDGE_BASE.md`.** It contains the manifest, reading paths, cross-cutting views (by stack / audience / depth / format), author context, and the full post catalog (slug + 1-line + concepts for every post).
10+
11+
**For structured queries, use `knowledge-base/posts.json` via `jq`.** Examples:
12+
13+
```bash
14+
# What does the blog cover about a concept?
15+
jq '.concept_index["rag"]' knowledge-base/posts.json
16+
17+
# Posts that use a specific tech?
18+
jq '.tech_index["neo4j"]' knowledge-base/posts.json
19+
20+
# Full metadata for one post (concepts, prereqs, teaches, depth, audio):
21+
jq '.posts["query-routing-agent-decisions"]' knowledge-base/posts.json
22+
23+
# What posts depend on this one?
24+
jq '.prereq_graph.edges[] | select(.from=="model-context-protocol")' knowledge-base/posts.json
25+
26+
# What should I read before this post?
27+
jq '.posts["ontology-to-agent-toolbox"].prereqs' knowledge-base/posts.json
28+
```
29+
30+
`posts.json` is ~250K — never `cat` it whole, always `jq` to extract the section you need.
31+
32+
**To read the full text of a post**, open the file at `front/public/blog/posts/<category>/<slug>.md`. Slugs are stable canonical IDs.
33+
34+
When citing a post to the user, link as `https://juanlara18.github.io/portfolio/#/blog/<slug>`.
35+
36+
## Build pipeline
37+
38+
Blog content flows through `npm run prebuild` (in `front/`):
39+
40+
1. `build-blog-data` — scans `posts/*.md`, parses frontmatter, writes `front/src/data/blogData.json`.
41+
2. `build-knowledge-base` — reads `blogData.json` + the YAML augmentation block in `KNOWLEDGE_BASE.md`, regenerates `knowledge-base/posts.json` and re-injects the auto-catalog into `KNOWLEDGE_BASE.md` (between `<!-- AUTO-CATALOG:* -->` markers).
42+
3. `build-sitemap`, `build-rss` — site metadata.
43+
44+
To enrich a post's metadata (concepts, prereqs, teaches, tech, depth), edit the YAML block under `## Augmentation` in `KNOWLEDGE_BASE.md` and re-run `npm run build-knowledge-base`. Posts without an augmentation entry get sensible defaults (concepts ← tags, depth ← word count).
45+
46+
## Authoring posts
47+
48+
Use the `new-blog-post` skill for the full workflow (frontmatter, header image, audio generation). The post becomes available to the knowledge base on the next build.

0 commit comments

Comments
 (0)