skill-author
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for human review and approval. Use…
Retrieve relevant Agentic SWMM modeling memory from audited runs, modeling-memory summaries, and Obsidian-compatible notes at query time. Use when a user asks for RAG, similar past runs, evidence-linked memory retrieval, historical QA/failure patterns, or memory-grounded answers.
$ npx -y skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-rag-memory --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/swmm-rag-memoryContext preview
The summary Claude sees to decide when to auto-load this skill.
Retrieve relevant Agentic SWMM modeling memory from audited runs, modeling-memory summaries, and Obsidian-compatible notes at query time. Use when a user asks for RAG, similar past runs, evidence-linked memory retrieval, historical QA/failure patterns, or memory-grounded answers.
name: swmm-rag-memory description: Retrieve relevant Agentic SWMM modeling memory from audited runs, modeling-memory summaries, and Obsidian-compatible notes at query time. Use when a user asks for RAG, similar past runs, evidence-linked memory retrieval, historical QA/failure patterns, or memory-grounded answers.
This skill reads existing audit and modeling-memory artifacts. It does not run SWMM, modify model inputs, rewrite skills, or claim that retrieved memory proves a modeling conclusion.
`swmm-modeling-memory` summarizes audited runs after experiments have been recorded.
`swmm-rag-memory` retrieves the most relevant historical memory for a current question.
The intended loop is:
1. Run SWMM or attempt a workflow. 2. Audit the run. 3. Refresh `swmm-modeling-memory`. 4. Ask a current modeling question. 5. Retrieve relevant historical memory with `swmm-rag-memory`. 6. Answer with explicit source boundaries and citations.
The corpus builder writes these files to the selected RAG-memory output directory:
The retriever writes JSON results by default and can also write a Markdown context pack. Failure advice writes `failure_advice.json` and `failure_advice.md` into the run directory. Verified repairs can be recorded as `resolution_memory.json`.
Build a corpus from existing memory and audited runs:
python3 skills/swmm-rag-memory/scripts/build_memory_corpus.py \ --memory-dir memory/modeling-memory \ --runs-dir runs \ --out-dir memory/rag-memory
Retrieve relevant memory:
python3 skills/swmm-rag-memory/scripts/retrieve_memory.py \ --query "peak flow parsing is missing" \ --memory-dir memory/modeling-memory \ --runs-dir runs \ --top-k 5
Hybrid retrieval:
python3 skills/swmm-rag-memory/scripts/retrieve_memory.py \ --query "peak flow was not parsed from the report" \ --index-dir memory/rag-memory \ --retriever hybrid \ --top-k 5
Generate an LLM-ready context pack:
python3 skills/swmm-rag-memory/scripts/answer_with_memory.py \ --query "Why does high continuity error keep recurring?" \ --memory-dir memory/modeling-memory \ --runs-dir runs \ --retriever hybrid \ --top-k 6 \ --format markdown
Optional Obsidian export:
python3 skills/swmm-rag-memory/scripts/answer_with_memory.py \ --query "How should I investigate missing peak-flow parsing?" \ --memory-dir memory/modeling-memory \ --runs-dir runs \ --obsidian-dir "$HOME/Documents/Agentic-SWMM-Obsidian-Vault/10_Memory_Layer/RAG Queries"
Generate advice after a failed, partial, or warning run:
python3 skills/swmm-rag-memory/scripts/generate_failure_advice.py \ --run-dir runs/<case> \ --index-dir memory/rag-memory \ --retriever hybrid
Record a repair only after review and verification:
python3 skills/swmm-rag-memory/scripts/record_resolution_memory.py \ --run-dir runs/<case> \ --action-taken "Updated runner parser to read Node Inflow Summary." \ --file-changed skills/swmm-runner/scripts/run_swmm.py \ --verification "python3 -m pytest tests/test_swmm_runner_peak_parser.py" \ --human-reviewed \ --benchmark-verified
One-command post-audit refresh:
python3 skills/swmm-rag-memory/scripts/refresh_after_run.py \ --run-dir runs/<case> \ --runs-dir runs \ --memory-dir memory/modeling-memory \ --rag-dir memory/rag-memory
This rebuilds the RAG corpus, generates failure advice only if trigger conditions are met, and rebuilds the corpus again if advice was written. It does not regenerate curated `memory/modeling-memory` outputs unless `--refresh-modeling-memory` is provided.
Pre-1.0 · stable v0.9.4 · pip install aiswmm==0.9.4 · CHANGELOG Headaches from tedious model setup? Try our another project SWMMCanada, our automated model-building project: draw an area anywhere in Canada and get a ready-to-run SWMM model. Up and running now.
Repo: Zhonghao1995/agentic-swmm-workflow
Draft a well-formed new skill (a SKILL.md scaffold, optionally with scripts/references) from a described recurring need, for human review and approval. Use…
Synthesize a plausible SWMM drainage network from public data (OSM streets + DEM) when NO real pipe-network data exists — input is just a bbox. Use ONLY when…
Assemble a runnable SWMM INP deterministically from subcatchment geometry/attributes, merged parameter JSON, network JSON, and climate references. Use when…
Calibration and validation scaffold for EPA SWMM. Use when an agent needs to (1) compare simulated vs observed flow, (2) evaluate candidate parameter sets, (3)…
Fetch a ready-to-run SWMM model for any Canadian area from the SWMMCanada upstream service — real published municipal storm pipes where a supported city covers…
Deterministic rainfall/climate formatting for SWMM. Use when converting timestamped rainfall CSV files into SWMM-ready [TIMESERIES] lines and [RAINGAGES]…