agentleFS
QinghongLinQinghongLin/data2story-skill/skills/data2story/programmer/SKILL.md

programmer

Skill155 starsChanged 4 months agoMITView on GitHub

Read editor.md, editor.json, analyst.json, and designer.json. Resolve chart data from analyst data_tables. Build the final index.html with data-* traceability attributes. Pure implementation — no editorial or visual decisions, no raw data access.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read these files before writing any code:

    line 15
  2. Very specific:

    You do NOT have access to raw data files: All chart data comes from analyst.json data_tables.

    line 22
  3. Distinctive:

    Before writing any code, check the error knowledge base (relative to the skills directory):

    line 26
  4. Very specific:

    If ../errors/digest.md exists, read it in full.

    line 28
  5. Very specific:

    If ../errors/base_css.css exists, you will copy its contents verbatim in Step 2 (see below).

    line 29
  6. Distinctive:

    If neither file exists, skip this step.

    line 30
  7. Distinctive:

    If a spec is ambiguous, implement the most literal interpretation

    line 36
  8. Very specific:

    Do not add sections, intros, summaries, or CTAs not in editor.md

    line 37
  9. Distinctive:

    Before finishing, walk through every section and confirm:

    line 65
  10. Very specific:

    All chart divs render with correct data from analyst.json data_tables.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Programmer

Your job is faithful implementation. Build exactly what the Editor wrote and the Designer specified. You do not make editorial decisions. You do not make visual decisions. You make them real.

Setup

  • PROJECT_DIR = first argument
  • Read these files before writing any code:
    • PROJECT_DIR/editor.md — verbatim prose for the blog
    • PROJECT_DIR/editor.json — section structure with edt_xx IDs
    • PROJECT_DIR/analyst.json — data findings with ana_xx IDs and data_tables
    • PROJECT_DIR/designer.json — visual specs with des_xx IDs
  • Output: PROJECT_DIR/index.html

You do NOT have access to raw data files. All chart data comes from analyst.json data_tables.

Step 0: Learn from Past Mistakes

Before writing any code, check the error knowledge base (relative to the skills directory):

  1. If ../errors/digest.md exists, read it in full. It is a compact, ranked list of the most frequent errors — one line each. Treat every entry as a rule to follow.
  2. If ../errors/base_css.css exists, you will copy its contents verbatim in Step 2 (see below).
  3. If neither file exists, skip this step.

Rules

  • Copy prose from editor.md verbatim — do not paraphrase, shorten, or rewrite
  • Implement visuals exactly as specced in designer.json — do not substitute or simplify
  • If a spec is ambiguous, implement the most literal interpretation
  • Do not add sections, intros, summaries, or CTAs not in editor.md
  • All numbers in the HTML must come from analyst.json — never compute or approximate values yourself

Step 1: Resolve Chart Data from analyst.json

For every des_xx chart in designer.json, read content.data_source (an ana_xx ID or array), look up that item's data_table in analyst.json, and convert its columns + rows into Vega-Lite inline values. Stat callouts read content.value directly; interactives with a data_source resolve like charts. The exact conversion snippet and the missing-data_table fallback are in references/data_resolution.json.

Step 2: Build index.html

Single self-contained HTML file. No build step, no framework. Allowed CDNs: Vega-Embed, Leaflet.js (plus PDF.js / D3.js where a component needs them).

Base CSS injection — if ../errors/base_css.css exists (checked in Step 0), read its contents and paste them verbatim as the very first block inside <style>. Do not modify, reformat, or omit any rule. This is auto-generated defensive CSS from past error patterns.

Page structure:

  1. Teaser — full viewport, no prose. Implements the teaser spec from designer.json exactly.
  2. Headline + subheadline — appears after the teaser.
  3. Sections — in the exact order from editor.json (edt_01, edt_02, ...). For each: prose verbatim → visual (chart / image / video / interactive) directly below.

End the page with a compact References section (data source, studies, benchmarks, tools — pulled from detective.json). See references_section in references/component_implementations.json.

Traceability — tag every element with its source IDs. This is critical for the Inspector: data-edt on sections, paragraph-level data-ana/data-det on each <p>, and data-des on every visual (no image or video without it). The full attribute rules and a worked HTML example are in references/traceability.json.

Layout. Max content width 720px centered; charts/teasers may break to full width; serif body, system-ui UI; responsive, no horizontal scroll. All non-text elements must be wrapped and spaced to avoid overlap — the complete container/CSS rules, per-element rules, and the teaser full-bleed exception are in references/layout_rules.json.

Components. Build recipes for every visual mode — Vega-Lite charts (and their pitfalls), interactive elements, instance embeds, maps, timelines, scrollytelling, before/after sliders, card decks, stat callouts, assets, audio/music (Spotify, generated, sonification, ambient — never autoplay sound), and the science-paper components (PDF preview, citation network, review visualizations, paper+review browser, task demo) — are all in references/component_implementations.json.

Step 3: Verify

Before finishing, walk through every section and confirm:

  • All chart divs render with correct data from analyst.json data_tables; none renders blank/axis-only from a zero-width mount or an invalid baseline/domain assumption
  • Full-bleed visuals are actually centered (not inheriting a narrow max-width); multi-view charts and timelines fit the column and read on mobile
  • Prose matches editor.md exactly; all assets load from correct relative paths; interactive elements follow the full spec; no extra sections; References section present with correct links
  • Every section has data-edt; every chart/visual has data-des; every data-driven element has data-ana

Output

PROJECT_DIR/index.html

Done when the file opens in a browser, tells the story as the Editor wrote it, looks as the Designer specified, and every element is tagged with data-* attributes for full traceability.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.