When working on a task, load context in this order:
wiki/INDEX.md — find the relevant section (Calculators, Blog, Infrastructure, CSS)wiki/graph.json — find the feature node, follow edges to fileswiki/adscalculator-xyz.md only for strategy/roadmap questionsINDEX.md → Simple Calculators → ROAS row → JS, HTML, schema
graph.json → node "roas" → edges:
- simple-main-js (implements — shared with CPC, CPM, CTR, Revenue!)
- roas-html (renders)
- roas-schema (has_schema)
- cpc, cpm, ctr, roi-ltv (related_to)
- campaign-funnel, email-marketing, mmo (related_to from other side)
→ read_file(js/simple-main.js) # targeted, not monolith
⚠️ BUG WARNING: simple-main.js is shared by 5 calculators — a bug here breaks all 5
INDEX.md → Blog table → "CPA vs ROAS" → related calcs: [[roas]], [[cpc]]
INDEX.md → Calculators → ROAS + CPC rows → schemas, JS
graph.json → node "roas" → has_schema → roas-schema
node "cpc" → has_schema → cpc-schema
wiki/content-strategy.md → editorial guidelines
wiki/adscalculator-xyz.md for file/code questions (it's strategy only)patch tool on HTML with complex quotes (Escape-drift bug) — use write_fileWhen you add, remove, or rename a file:
wiki/graph.json — add/remove node + edgeswiki/INDEX.md — add/remove row in the relevant tablesrc/ subfolder)npx @11ty/eleventy after every change (must be 0 errors)node serve.js on port 8080style/ → concatenated to style/style.css (NEVER @import)tests/ (currently only calculations.test.js)blog/<slug>/index.md + PNG images, shared blog/blog.json frontmatter_includes/schemas/<name>.njk| Tool | Issue | Workaround |
|---|---|---|
patch |
Escape-drift on HTML with quotes | Use write_file instead |
python |
Not found on PATH | Use node for scripts |
sharp |
Must use local node_modules |
node convert-images.js |
simple-main.js |
Shared by 5 calculators | Bug here = 5 calculators break |
| CSS @import | Unreliable on Cloudflare Pages | Concatenate at build time |
| Type | Location | Example |
|---|---|---|
| Calculator HTML | <name>.html (root) |
roas-calculator.html |
| Calculator JS (simple) | js/simple-main.js |
shared for ROAS/CPC/CPM/CTR/Revenue |
| Calculator JS (complex) | js/<name>-main.js |
js/ecom-profit-main.js |
| Schema | _includes/schemas/<name>.njk |
schemas/roas-calculator.njk |
| Test | tests/<name>.test.js |
tests/calculations.test.js |
| Blog post | blog/<slug>/index.md |
blog/roas-vs-roi/index.md |
| CSS module | style/<name>.css |
style/simple-calc.css |
| Layout | _includes/layout.html |
base layout |