Skip to content

Add finding-workflow-examples skill indexing book/ corpus#328

Draft
jgodwin-ai wants to merge 28 commits intoahay:masterfrom
jgodwin-ai:workflow-recipe-skills
Draft

Add finding-workflow-examples skill indexing book/ corpus#328
jgodwin-ai wants to merge 28 commits intoahay:masterfrom
jgodwin-ai:workflow-recipe-skills

Conversation

@jgodwin-ai
Copy link
Copy Markdown

Summary

Adds a navigation skill that lets agents find end-to-end SConstruct examples in `book/` by workflow domain (NMO, migration, denoising, well-tie, rock physics, ...) and by canonical dataset (Marmousi, Sigsbee, Hess VTI, SEG/EAGE Salt, ...).

New files:

  • `src/skills/finding-workflow-examples/SKILL.md` — three-step discovery workflow (check catalog → read the real SConstruct → grep fallback) and a six-step adaptation pattern
  • `src/skills/finding-workflow-examples/CATALOG.md` — hand-curated index pointing at existing `book/` SConstructs: ~33 Workflow entries across 11 domains + ~24 Dataset entries (gallery helpers and `data/` fetch-and-prep recipes)

Modified:

  • `src/AGENTS.md` — one row added to the skills table
  • `src/skills/writing-rsf-flows/SKILL.md` — one-line pointer
  • `src/skills/using-sf-programs/SKILL.md` — one-line pointer

No files in `book/` are modified — the catalog is a pointer index, not a duplicate.

Design rationale

Agents repeatedly asked "how do I write a flow that does X?" — a question already answered by 1,747 worked examples in `book/`, but hard to find without insider knowledge of the tree layout. Two approaches considered:

  1. Rewrite canonical recipes as new skill prose. Rejected — invites drift from `book/`, duplicates maintained content.
  2. Add a thin catalog that points at existing `book/` files. Chosen — zero duplication, 2-minute edit to add an entry, the curation itself is the value.

Selection rule when multiple `book/` files cover a domain: `tutorials/` > `school/` > `school2020+` > `gallery/` > `research/`.

Verification

Smoke test: a fresh-context agent given only AGENTS.md + foundational skills + this new skill, prompted with "make me an NMO correction flow for a synthetic CMP", successfully navigated via CATALOG.md to `book/rsf/tutorials/nmo/SConstruct`, adapted it (stripped the `.npz` Fetch, substituted an `sfmath`-based hyperbolic CMP synthesis, kept the `sfnmo` core, used `SideBySideAniso` composition), and produced a runnable SConstruct.

Every path in CATALOG.md has been verified to exist and to demonstrate the claimed domain (two rerouting fixes + one description correction caught during review, included in the branch history).

Test plan

  • Every path named in `CATALOG.md` resolves to an existing file in `book/`
  • Spot-check: at least 3 Workflow entries and 3 Dataset entries do what the description claims
  • AGENTS.md renders cleanly with the new skill row

Dependency

Depends on #327. Until #327 merges, this PR's diff includes that branch's commits as well — the novel content in this PR is the `finding-workflow-examples/` skill directory plus the three small cross-reference edits listed above.

jgoai and others added 28 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>
Teaches agents the three-step discovery workflow (catalog, real
SConstruct, grep fallback) and adaptation pattern for adapting book/
recipes to user projects without duplicating content into skill prose.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… grep

Review caught three issues in the initial SKILL.md:
- "sibling directory" was directionally misleading (real flow lives in a
  child directory of the tex-wrapper SConstruct, not a peer)
- "^import sigsbee" anchor missed the dominant "from rsf.gallery import"
  import pattern
- End(color='vel') wasn't a real value observed in the corpus; use '...'
  to mark the argument as illustrative

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hand-curated index of ~30 end-to-end workflow recipes across modeling,
NMO, migration, denoising, transforms, interpolation, well-tie,
geometry, rock physics, facies/attributes, and plotting idioms. Each
entry points at a real book/ SConstruct; no content duplicated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Spec review caught two domain/path mismatches:
- "Simple layered / impulse model" pointed at school/marm (eikonal
  traveltimes) which is not synthetic modeling; moved to school/ray
  (actual layered-model + ray tracing).
- "Sigsbee migration (school)" pointed at school/sigsbee (FD modeling
  with RTM) with a description that only mentioned modeling; replaced
  with gallery/sigsbee/oway, a pure one-way wave-equation migration,
  paralleling how the Marmousi migration entry already resolved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop "2D FFT / F-K" entry (timefreq uses fft1, not fft2, no F-K)
- Drop "Bandpass filtering (inline)" (bandpass is only on a synthetic
  spike in that file, not the main flow)
- Drop "stack" from Velocity scan title+description (file does not stack)
- Add framing note before Recipes/*.py entries (Python helpers, not
  SConstructs)
- Rename "Simple layered model" -> "Analytic velocity model" (file
  actually builds a gradient field with a Gaussian anomaly)
- Add concrete descriptions to 13 previously bare entries (interp,
  spitz, well-tie, rockphysic, petro1/2, facies, attr, nn, colormaps,
  colored, lineaments, hilbert)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds ~23 dataset entries: 16 book/gallery Python helpers (marmousi,
sigsbee, bp, bptti, pluto, overthrust, teapot, french, hessvti,
segsalt, twohalf, vofz, constant, gradient, model94, statics94) plus
notable book/data fetch-and-prep recipes (marmousi2, SEAM Phase 1 2D,
NZ 3D, Chevron 2013/2014, freeusp, alaska, oz).

Function names verified by reading each gallery .py helper. Two entries
corrected: pluto has no .py helper (points to model/SConstruct), and
statics94 has no .py helper (points to gallery SConstruct + data dir).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous description claimed "no callable functions" but
hessvti.py defines get_model, get_shots, and get_zodata. Both the
module-level Fetch/Flow calls and these three callable helpers exist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the skill to the AGENTS.md skills table so agents discover it at
session start.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Points agents at the workflow catalog when they arrive at rsf.proj DSL
mechanics looking for an actual recipe.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Points agents at the workflow catalog when they are composing a
pipeline from sf* primitives and want a canonical example.

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