Guide for creating DAAF agent definition files. Covers 12-section template, hook registration, skills-in-frontmatter, integration checklist. Use when adding or revising agents. For SKILL.md files, use skill-authoring instead.
中文简介正在准备中。当前显示原文说明。
Quarto document system for R: .qmd format with knitr engine, YAML frontmatter, code chunks with execution options, rendering to HTML/PDF. DAAF's R notebook format — Stage 9 literally archives executed R scripts in globally and per-chunk non-evaluating chunks paired with real execution logs. Optional display-only content may preview existing Parquet data or show already-created figures, but may not analyze data or generate figures. Use when execution language is R. Python equivalent: marimo.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Quarto open-source publishing system for R-based reproducible documents. Covers .qmd document format with knitr engine, YAML frontmatter configuration, R code chunks with #| execution options, inline R expressions, rendering to HTML/PDF/Word via quarto render, figure and table output from ggplot2/gt/kable, and cross-referencing. In DAAF Stage 9, its role narrows to literal non-evaluating script-and-log archival, with only bounded existing-data or existing-figure display allowed; broader report-authoring capabilities apply outside Stage 9. Use when the execution language is R and you need to assemble research notebooks, render analysis reports, or produce reproducible documents. Python equivalent: marimo skill.
Quarto is an open-source scientific and technical publishing system built on Pandoc:
quarto render produces output from the command lineIn DAAF, Quarto serves the same role as marimo in Python pipelines: the Stage 9 notebook format that compiles executed scripts into a reviewable document artifact.
This skill targets Quarto 1.7.29 with knitr 1.51 and rmarkdown 2.31.
Key features in Quarto 1.7.x:
#| (hash-pipe) chunk option syntax is the standard (replaces legacy {r, ...} header syntax)@fig-, @tbl-, @sec- prefixesquarto render CLI replaces rmarkdown::render() as the standard rendering pathThe quarto R package is NOT required. Quarto CLI invokes knitr directly -- the R package is a thin convenience wrapper that adds no functionality beyond what the CLI provides.
Each topic in ./references/ contains focused documentation:
| File | Purpose | When to Read |
|---|---|---|
quickstart.md | Basic .qmd structure, YAML, R chunks, rendering | Starting a new .qmd document |
chunks.md | Code chunk options (`# | ` syntax), all execution options |
format.md | YAML frontmatter for HTML, PDF, Word, themes, TOC | Choosing and configuring output format |
figures.md | Figure output from ggplot2, captions, sizing, cross-refs | Adding figures to documents |
tables.md | Table output from gt, kable, kableExtra, cross-refs | Adding tables to documents |
daaf-notebook.md | DAAF Stage 9 notebook assembly pattern for .qmd | Required for Stage 9 notebook assembly |
rendering.md | quarto render CLI, format selection, parameters, batch | Rendering documents from command line |
gotchas.md | Common pitfalls: chunk syntax, YAML, figure paths, cache | Debugging rendering issues |
quickstart.md then chunks.mdformat.md then rendering.mdfigures.md or tables.mddaaf-notebook.md (required)gotchas.md firstAlways Load Together (when execution language is R):
ggplot2 -- Visualization library used for figure chunks in .qmd documentsdata-scientist -- Methodology and validation principles that inform notebook structureLoad for Specific Features:
gt -- Publication-quality tables in .qmd documentsfixest -- Fixed effects regression output in .qmd documentsPython Equivalent:
marimo -- DAAF's Python notebook format (same Stage 9 compilation role)For DAAF research workflows, the Stage 9 Quarto notebook has ONE job: compile executed script contents into .qmd code chunks verbatim.
Stage 9 is handled by the notebook-assembler agent (see .claude/agents/notebook-assembler.md), which:
.R scripts from scripts/stage{5,6,7,8}_*/execute: eval: false, then one literal R archive chunk per script with exactly one #| code-fold: false, exactly one #| eval: false, and the exact # --- VERBATIM COPY of scripts/<stage>/<filename>.R --- marker as the first nonblank non-option line::: {.callout-note collapse="true" title="Execution Log"} block with one plain fenced body; a missing or ambiguous log blocks assemblyThe assembler emits only this canonical form. Bounded legacy containers accepted by scripts/decompile_notebook.R exist solely for intake compatibility and are not valid templates for new Stage 9 output. Structural recognition intentionally centers on the exact VERBATIM COPY marker; the Python/Marimo Plan-template path instead centers on literal mo.md() headers.
| Prohibited Element | Why |
|---|---|
New library() calls beyond arrow | No new analysis -- copy script code only |
New dplyr::filter() | No filtering -- just load and display |
New dplyr::mutate() | No transforms -- just load and display |
New dplyr::summarize() | No new aggregations -- copy script code only |
New ggplot() calls | No new plots -- copy script code only |
| Shiny runtime elements | Not an interactive app |
params: YAML for dynamic reports | Not a parameterized report |
Stage 9 permits exactly two bounded display forms:
df <- arrow::read_parquet("path/to/file.parquet")
dplyr::glimpse(df)
head(df, 20)

When a chunk is needed, it must contain only knitr::include_graphics("output/figures/existing-figure.png") with #| eval: true and #| echo: false.
No filtering, mutation, selection, aggregation, plotting, or figure generation. The preview is bounded to the first 20 rows. (dplyr::glimpse() is namespace-qualified because inspection chunks attach no libraries — a bare glimpse() fails at render time.)
See:
.claude/agents/notebook-assembler.md for the complete behavioral protocolagent_reference/WORKFLOW_PHASE4_ANALYSIS.md Stage 9 for template./references/daaf-notebook.md for the .qmd-specific assembly patternCreating a .qmd?
|- Basic document structure -> ./references/quickstart.md
|- YAML frontmatter options -> ./references/format.md
|- R code chunks -> ./references/chunks.md
|- Rendering to output -> ./references/rendering.md
\- DAAF Stage 9 notebook -> ./references/daaf-notebook.md
Choosing output format?
|- HTML (default, recommended) -> ./references/format.md
|- PDF (requires LaTeX or Typst) -> ./references/format.md
|- Word (.docx) -> ./references/format.md
|- Multiple formats -> ./references/rendering.md
\- Self-contained HTML -> ./references/format.md
Adding visual elements?
|- ggplot2 figure -> ./references/figures.md
|- Base R plot -> ./references/figures.md
|- Figure sizing/captions -> ./references/figures.md
|- gt table -> ./references/tables.md
|- kable/kableExtra table -> ./references/tables.md
\- Cross-referencing -> ./references/figures.md or ./references/tables.md
Chunk execution options?
|- Show/hide code (echo) -> ./references/chunks.md
|- Run/skip code (eval) -> ./references/chunks.md
|- Suppress warnings/messages -> ./references/chunks.md
|- Figure dimensions -> ./references/chunks.md
|- Cache expensive chunks -> ./references/chunks.md
\- Label chunks for cross-ref -> ./references/chunks.md
Having issues?
|- Chunk options not working -> ./references/gotchas.md (#| syntax)
|- YAML parse error -> ./references/gotchas.md (indentation)
|- Figures not showing -> ./references/gotchas.md (figure paths)
|- PDF won't render -> ./references/gotchas.md (LaTeX/Typst)
|- Cache problems -> ./references/gotchas.md (knitr cache)
\- quarto render fails -> ./references/rendering.md + ./references/gotchas.md
Quarto .qmd documents fit DAAF's file-first execution model naturally:
quarto render document.qmd --to html--output-dir)The .qmd source file is the permanent record. The rendered output (HTML/PDF) is the deliverable. Both are stored in the project directory.
For Stage 9 notebooks specifically, the .qmd is assembled from existing executed scripts -- no new code execution occurs during assembly.
---
title: "Analysis Title"
author: "Researcher Name"
date: today
format: html
---
## Section Heading
Narrative text with **bold** and *italic*.
```{r}
#| label: load-data
#| message: false
library(arrow)
df <- read_parquet("data/analysis_data.parquet")
head(df)
Results show r nrow(df) observations.
### Essential Chunk Options
| Option | Values | Purpose |
|--------|--------|---------|
| `echo` | `true`/`false` | Show/hide source code |
| `eval` | `true`/`false` | Execute/skip the chunk |
| `warning` | `true`/`false` | Show/suppress warnings |
| `message` | `true`/`false` | Show/suppress messages |
| `include` | `true`/`false` | Include chunk in output at all |
| `label` | string | Name the chunk (for cross-refs) |
| `fig-cap` | string | Figure caption |
| `fig-width` | number | Figure width in inches |
| `fig-height` | number | Figure height in inches |
| `tbl-cap` | string | Table caption |
### Essential CLI Commands
| Command | Purpose |
|---------|---------|
| `quarto render doc.qmd` | Render to default format |
| `quarto render doc.qmd --to html` | Render to HTML |
| `quarto render doc.qmd --to pdf` | Render to PDF |
| `quarto render doc.qmd --to docx` | Render to Word |
| `quarto preview doc.qmd` | Live preview with auto-reload |
| `quarto check knitr` | Verify R/knitr installation |
## Topic Index
| Topic | Reference File |
|-------|---------------|
| Document structure | `./references/quickstart.md` |
| YAML frontmatter | `./references/quickstart.md`, `./references/format.md` |
| R code chunks | `./references/quickstart.md`, `./references/chunks.md` |
| Chunk options (`#|` syntax) | `./references/chunks.md` |
| HTML format | `./references/format.md` |
| PDF format | `./references/format.md` |
| Word format | `./references/format.md` |
| Themes and styling | `./references/format.md` |
| Figure output | `./references/figures.md` |
| Figure cross-references | `./references/figures.md` |
| Table output | `./references/tables.md` |
| Table cross-references | `./references/tables.md` |
| DAAF Stage 9 notebook | `./references/daaf-notebook.md` |
| Script compilation pattern | `./references/daaf-notebook.md` |
| `quarto render` CLI | `./references/rendering.md` |
| Batch rendering | `./references/rendering.md` |
| Parameterized rendering | `./references/rendering.md` |
| Chunk syntax pitfalls | `./references/gotchas.md` |
| YAML indentation errors | `./references/gotchas.md` |
| Figure path issues | `./references/gotchas.md` |
| knitr cache problems | `./references/gotchas.md` |
| PDF rendering issues | `./references/gotchas.md` |
## Citation
When Quarto is used as the document format, include in the report's
Software & Tools references:
> Allaire, J.J., Teague, C., Scheidegger, C., Xie, Y., & Dervieux, C. (2024). Quarto (Version 1.7) [Computer software]. https://quarto.org
**Cite when:** The analysis notebook or report is delivered as a Quarto document (typically always true in DAAF R pipelines).
**Do not cite when:** Quarto is not used for document delivery.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Guide for creating DAAF agent definition files. Covers 12-section template, hook registration, skills-in-frontmatter, integration checklist. Use when adding or revising agents. For SKILL.md files, use skill-authoring instead.
中文简介正在准备中。当前显示原文说明。
Researcher-facing analytic triangulation ("creative verification") for stress-testing provisional findings and designing pre-specified challenges before an analysis runs. Turns a researcher's concern or focal claim into competing explanations, bounded discriminating tests, audited diagnostic artifacts, and evidence-calibrated interpretations in a hypothesis/evidence ledger — behavioral, output-level verification replacing line-by-line code review. Covers 12 challenge families organized by Shadish-Cook-Campbell validity type, named sensitivity statistics, pre-committed interpretation rules, anti-fishing guardrails, and interactive diagnostic-artifact QA. Use in Ad Hoc Collaboration to verify, challenge, or stress-test a result, or to design discriminating tests before an analysis runs. Not code-change verification (verify skill / code review) and not final adjudication or re-execution (data-verifier, Reproducibility Verification) — prospective, hypothesis-driven challenge design of analytic claims.
中文简介正在准备中。当前显示原文说明。
In-situ smoke testing that verifies a LIVE DAAF deployment functions end-to-end in whatever provider route it is configured for. Auto-detects the active install route (anthropic-subscription, openrouter, chatgpt-subscription shim, openai-api shim) and runs tiered probes: Tier 0 free preflight (route/env coherence, hooks, statuslines, shim health); Tier 1 one live round-trip (~cents); Tier 2 a six-probe functional battery (dispatch, coding, web, skill loading, isolation-strip, nested-dispatch deny); Tier D a zero-cost deterministic battery (bats, Pester, lint, safety-hook tests). Use after install, after a rebuild or update, after any provider/config change (new API key, model remap, shim change), for pre-release validation, or when asked "is my install working" or to "smoke test the deployment/config." Requires the DAAF_DEV=1 dev image; a contributor tool, not end-user-facing. NOT DAAFBench (model behavioral-adherence evaluation under benchmarks/) and NOT scripts/smoke_tests/ (R/Python library-package smoke tests).
中文简介正在准备中。当前显示原文说明。
Operational framework for the DAAF orchestrator. Defines engagement modes, confirmation protocol, subagent dispatch, context budget, and reference-loading. Loaded exclusively by the orchestrator — not for subagents or user questions.
中文简介正在准备中。当前显示原文说明。
Data science methodology and method-selection routing for quantitative research. Covers EDA, data validation, descriptive analysis, causal inference (IV, DiD, RD, synthetic control), clustering/PCA/UMAP, supervised ML, geospatial analysis, network analysis, and visualization design. Contains the canonical method-to-library routing tree, routed by execution language — Python: statsmodels (OLS/GLM/time series), pyfixest (FE/DiD), linearmodels (RE/GMM/SUR), svy (complex surveys), scikit-learn (clustering/prediction ML), geopandas (spatial), igraph (network analysis); R: r-stats (OLS/GLM/time series), fixest (FE/DiD), plm (panel/RE/IV), survey-r (complex surveys), tidymodels (ML), sf-terra (spatial), igraph-r (network analysis). Load the routed tool-specific skill before giving tool-specific advice or writing code — library skills encode environment constraints and curated caveats absent from general knowledge.
中文简介正在准备中。当前显示原文说明。
Interpretation guidance for Urban Institute Education Data Portal datasets. The Portal is a curation layer over federal data: lowercase variable names, integer-encoded categoricals, standardized missing codes (-1 missing, -2 not applicable, -3 suppressed). Covers year definitions, grade encoding (grade=-1 is Pre-K, not missing), suppression rates, ODC-By licensing, and cross-source join identifiers. Load before analyzing any Portal data. Routes to source-specific deep-dive skills for individual datasets.
中文简介正在准备中。当前显示原文说明。