close
Skip to content

Add AGENTS.md + foundational skills for AI coding agents#327

Draft
jgodwin-ai wants to merge 18 commits intoahay:masterfrom
jgodwin-ai:agents-and-authoring-skills
Draft

Add AGENTS.md + foundational skills for AI coding agents#327
jgodwin-ai wants to merge 18 commits intoahay:masterfrom
jgodwin-ai:agents-and-authoring-skills

Conversation

@jgodwin-ai
Copy link
Copy Markdown

@jgodwin-ai jgodwin-ai commented Apr 20, 2026

Hi @sfomel and others, this is my experiment with making Madagascar more friendly for coding agents like Claude Code and Codex. I'd love it if others play around with this to see if helps or not, but right now I'm not really asking for this to be merged!

Summary

Adds agent-facing orientation and skill documentation under src/, entirely additive — no existing files modified, no build changes.

New files:

  • src/AGENTS.md — one-page orientation for AI coding agents (Claude Code, GitHub Copilot CLI, Codex, Gemini CLI). Covers Madagascar's mental model: RSF data plane, `sf*` compute plane, SConstruct orchestration, vplot visualization; repo map; running/discovering programs; common gotchas.
  • `src/skills/` — on-demand skills loadable by agent harnesses that support the Skills spec:
    • Foundational: `writing-rsf-flows`, `using-sf-programs`, `working-with-rsf-data`, `plotting-with-vplot`
    • Authoring (shared): `authoring-sf-programs` — conventions common to all languages
    • Authoring (per language): `authoring-sf-programs-c`, `-python`, `-cpp`, `-f90`, `-f77`, `-java`, `-julia`, `-matlab`, `-octave`, `-chapel`

All skills are Markdown with YAML frontmatter — they read as plain docs for humans and are discoverable by agent tools that honor the `SKILL.md` convention.

Motivation

Modern coding assistants work better when grounded in a project's actual mental model and conventions. Without a file like AGENTS.md, agents default to guessing from filenames — which for Madagascar tends to produce non-idiomatic results (e.g., writing `sf*` prefix inside Flow strings, forgetting vplot escape codes, mishandling RSF complex `data_format`). These docs give an agent enough orientation to produce idiomatic Madagascar code on first try.

Test plan

  • AGENTS.md renders cleanly on GitHub
  • A fresh agent given only AGENTS.md can name the correct skill for tasks like "write a new sf program in Python", "debug an RSF header", "plot a velocity model"
  • Each authoring-sf-programs- skill points at real reference Mprograms in the repo

Notes for maintainers

  • This is the first of three planned agent-tooling additions. The follow-up PR (stacked on this branch) adds `finding-workflow-examples`, a skill that indexes the `book/` corpus by workflow/dataset — also additive, no book/ modifications.
  • Happy to split into smaller PRs if preferred, or to adjust tone/placement of AGENTS.md.

jgoai and others added 18 commits April 19, 2026 11:47
Add SKILL.md and runnable example SConstruct for the writing-rsf-flows
skill. Signatures transcribed from framework/rsf/proj.py; smoke test
confirms example-flow.SConstruct runs cleanly under Madagascar.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds SKILL.md (~477 lines, all 9 required sections) and a runnable
example-pipeline.sh verified against a live Madagascar installation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add skill covering the RSF two-file model, axis conventions, data
types (native_float/native_complex etc.), essential tools (sfin,
sfattr, sfput, sfrm, sfheadermath), binary location under $DATAPATH,
header manipulation without data copy, and recovery scenarios.
Includes runnable example script verified smoke-test clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cenario

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comprehensive vplot visualization skill covering sfgrey, sfgraph, sfwiggle,
sfcontour, sfdots, sfbargraph — with verified examples, color scheme codes
sourced from coltab.c, label escape codes from vplottext.mn, composition
modes from rsf.proj, and universal parameters from sfdoc stdplot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd sfcontour

- plotcol=3: revert purple→magenta (authoritative: sfdoc stdplot shows '3 magenta')
- Composition section: document all 8 modes (OverUnderAniso, OverUnderIso, TwoRows, TwoColumns were missing); add overview table with vppen args sourced from framework/rsf/proj.py:255-264
- zplot=: fix mechanism description to match wiggle.c:131 (zplot *= d2; half-width per trace relative to d2 interval)
- sfcontour scalebar: add gotcha note that barlabel= is required alongside scalebar=y or bar is silently suppressed (contour.c:97-99)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ty, and C++ scraper claim

- C1: remove invented rsf.api.error(); replace with sys.stderr/SystemExit idiom
- C2: Chapel uses sf_error() via RSF module, not halt()
- C3: mark .f/.jl/.java/.m extensions as having no existing M*.<ext> programs in tree
- I1: include full Mpick.c comment block (was silently truncated 2 lines)
- I2: C++ doc scraper matches only a single // line, not multiple lines
- I3: document that HuiSconsTargets handles .cc/.cu; UserSconsTargets does not
- M1: remove brittle line-number citation from doc.py reference
- M2: replace non-existent 'scons test' alias with correct 'scons' invocation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Tier 1 C-language skill grounding all signatures in build/api/c/rsf.h
and api/c/Test*.c examples; references Mpick.c as real-world worked example.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tier 1 Python authoring skill with smoke-tested skeleton, accurate
rsf.api API surface, self-doc regex, numpy shape conventions, and
SConstruct integration details.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant