agentleFS
KcAnomKcAnom/pi-fairy-tales-chains/skills/research-artifact/SKILL.md

research-artifact

Skill0 starsChanged 4 months agoMITView on GitHub

Phase 3 of 3 (final) in the research chain (gather → synthesize → artifact). Uses the artifact tool to turn the Phase 2 synthesis into a polished, theme-aware, self-contained HTML research report, opens it, and closes the chain. Trigger when the previous phase says "run research-artifact next", or standalone via "research-artifact", "phase 3 of research", "build the research report".

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

11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All chain state is managed by the chain tool: authoritative JSON at .pi/fairy-tales/chains/research/state.json with a human-readable …

    line 24
  2. Very specific:

    Call the chain tool with action: "status", chain: "research" (a legacy .research-state.md from an older version is imported automatically):

    line 31
  3. Very specific:

    If there is no run → abort: "No research run found.

    line 34
  4. Very specific:

    If the run is not active with currentPhase: "artifact" → abort: "Expected the run to be at phase artifact but it is at …

    line 35
  5. Very specific:

    If data.themes (or the synthesize phase summary) is missing → abort: "Phase pointer looks right but the Phase 2 output is missing.

    line 38
  6. Very specific:

    If the tool reports the chain is locked by another session, abort.

    line 41
  7. Distinctive:

    Use the artifact tool to render the report as a polished, self-contained, theme-aware HTML page (works in both light and dark viewer …

    line 55
  8. Very specific:

    Call out, in the chat response (not just inside the artifact), any open gaps from data.gaps that are substantial enough to justify a …

    line 62
  9. Distinctive:

    Call the chain tool:

    line 68
  10. Distinctive:

    After completing this phase, output exactly:

    line 83
  11. Distinctive:

    Do not continue. Stop here.

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Research: Artifact

Chain version: 2 (durable state contract — see docs/STATE-CONTRACT.md)

Phase 3 of 3: research-gather → research-synthesize → research-artifact

Overview

Final phase. Turns the themes, findings, contradictions, and gaps from Phase 2 into a polished, human-readable deliverable: a self-contained HTML research report produced with the artifact tool and opened for the user. Notes any gaps worth a follow-up research round, then marks the chain complete.

All chain state is managed by the chain tool: authoritative JSON at .pi/fairy-tales/chains/research/state.json with a human-readable state.md projection beside it. Never create or edit state files by hand, and never create lock files — the tool locks for you.

Load State

Call the chain tool with action: "status", chain: "research" (a legacy .research-state.md from an older version is imported automatically):

  • If there is no run → abort: "No research run found. Run research-gather first."
  • If the run is not active with currentPhase: "artifact" → abort: "Expected the run to be at phase artifact but it is at <currentPhase/status>. Run that phase's skill instead."
  • If data.themes (or the synthesize phase summary) is missing → abort: "Phase pointer looks right but the Phase 2 output is missing. Treat as corrupted — restart the chain or repair via chain action 'update'."
  • If the tool reports the chain is locked by another session, abort; a dead session's lock can be cleared with action: "unlock". Never create lock files yourself.

Workflow

Step 1 — Build the report content

Turn data.themes, data.contradictions, and data.gaps into report sections: an overview of the research question, the themes with findings and source citations, a contradictions section, and an open gaps / follow-up section. Write this content to a file the artifact tool can publish.

Step 2 — Produce the artifact

Use the artifact tool to render the report as a polished, self-contained, theme-aware HTML page (works in both light and dark viewer themes) and open it for the user. Give it a concise title and a one-sentence description summarizing the research question.

Step 3 — Note follow-up gaps

Call out, in the chat response (not just inside the artifact), any open gaps from data.gaps that are substantial enough to justify a follow-up research-gather round.

Step 4 — Complete the phase

Call the chain tool:

action: "complete-phase", chain: "research", phase: "artifact",
summary: "HTML research report produced via the artifact tool and opened; gaps flagged for follow-up (if any)",
data: {},
artifacts: { "reportUrl": "<artifact tool URL>" }

The tool validates this is the current phase, marks the run complete, and rewrites the JSON + markdown projection atomically — this is the final phase, so the run's status becomes complete and its lock is released.

Handoff

After completing this phase, output exactly:

Chain complete! All 3 phases finished. Chain state updated (.pi/fairy-tales/chains/research/state.json). Run research-gather again to start a new session.

Do not continue. Stop here.

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.