add fem theory query skill
Tests / Hermetic test suite (push) Has been cancelled
Tests / Skill frontmatter validation (push) Has been cancelled

This commit is contained in:
김경종
2026-06-04 15:00:16 +09:00
parent e2078ef8d7
commit 702f28a758
4 changed files with 161 additions and 10 deletions
+13 -10
View File
@@ -13,12 +13,12 @@
"state": {
"type": "markdown",
"state": {
"file": "WIKI.md",
"file": "AGENTS.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "WIKI"
"title": "AGENTS"
}
}
]
@@ -197,6 +197,17 @@
},
"active": "31299cd80f02d44f",
"lastOpenFiles": [
"skills/fem-theory-query/vault-path.txt",
"skills/fem-theory-query/agents/openai.yaml",
"skills/fem-theory-query/agents",
"skills/fem-theory-query/SKILL.md",
"skills/fem-theory-query",
"wiki/getting-started.md",
"wiki/hot.md",
"wiki/index.md",
"wiki/log.md",
"wiki/overview.md",
"WIKI.md",
"wiki/concepts/Midas NFX Structural Optimization and Forming Limit Analysis.md",
"wiki/concepts/Midas NFX Heat Transfer Joule Heating and Thermal Stress.md",
"wiki/concepts/Midas NFX Fatigue Analysis.md",
@@ -215,15 +226,7 @@
"wiki/sources/On-the-Finite-Element-Analysis-of-Shell-Structures.md",
"wiki/concepts/Midas FEA Embedded Reinforcement Modeling.md",
"wiki/concepts/Midas Civil PSC and Prestress Loss Analysis.md",
"wiki/concepts/Finite Element Heat Transfer and Field Problems.md",
"wiki/concepts/Finite Element Contact Formulation.md",
"wiki/overview.md",
"wiki/Wiki Map.canvas",
"wiki/concepts/Midas Civil Special Load and Design Utilities.md",
"wiki/concepts/Midas Civil Moving Load Bridge Analysis.md",
"wiki/concepts/Midas Civil Heat of Hydration and Thermal Stress Analysis.md",
"wiki/concepts/Midas Civil Construction Stage and Time-Dependent Analysis.md",
"wiki/concepts/Midas Civil Nonlinear Time History and Hysteresis Models.md",
"wiki/canvases/main.canvas",
"wiki/meta/dashboard.base",
"wiki/questions",
+141
View File
@@ -0,0 +1,141 @@
---
name: fem-theory-query
description: Use when answering finite element method, structural analysis solver, element formulation, residual/tangent, constitutive integration, contact, dynamics, eigenproblem, or verification questions from a configured FEM wiki vault.
---
# FEM Theory Query
Use this skill as a portable domain router for finite element method and structural solver theory questions. Ground answers in a configured FEM wiki vault, then compose sibling skills instead of reimplementing their workflows.
## FEM Vault Resolution
Resolve the FEM wiki vault in this order:
1. Skill-local config file: `vault-path.txt` in this skill folder. Read the first non-empty, non-comment line as the vault root path.
2. Current project instructions: `AGENTS.md`, `CLAUDE.md`, or an equivalent section named `FEM Solver Theory Wiki`.
3. Environment variable: `FEM_THEORY_WIKI_VAULT`.
If no valid vault is found, ask the user for the vault path. A valid vault must contain `wiki/hot.md` or `wiki/index.md`.
Keep `vault-path.txt` PC-specific. When the vault moves, update that file instead of editing this skill body.
## Companion Skill Protocols
This skill is an orchestrator. Do not reimplement sibling skills. Use the sibling skill instructions as authoritative when available.
### Companion skill path resolution
After reading `vault-path.txt`, call that value `FEM_VAULT_ROOT`. Resolve companion skill files from that absolute vault root:
- `FEM_VAULT_ROOT\skills\think\SKILL.md`: use for non-trivial FEM formulation, solver architecture, ambiguity, tradeoffs, verification design, or gap assessment.
- `FEM_VAULT_ROOT\skills\wiki-query\SKILL.md`: use for normal wiki-grounded answers from the configured FEM vault.
- `FEM_VAULT_ROOT\skills\autoresearch\SKILL.md`: use only when the user explicitly asks to research, find sources, update the wiki, or fill missing wiki coverage.
If the runtime provides a skill activation mechanism, activate the companion skill by name. If not, read the absolute companion `SKILL.md` path constructed from `vault-path.txt` and follow its workflow. If an absolute companion path does not exist, tell the user which path is missing and ask them to fix `vault-path.txt`.
### Relative paths inside companion skills
When a companion skill refers to another file by a relative path, resolve that path from the absolute directory of the companion skill file under `FEM_VAULT_ROOT`, not from the caller project or current working directory. Normalize `..` segments after joining paths. Keep the resolved path inside `FEM_VAULT_ROOT` unless the companion skill explicitly requires an external path.
Examples from `FEM_VAULT_ROOT\skills\autoresearch\SKILL.md`:
- `../wiki-cli/SKILL.md` resolves to `FEM_VAULT_ROOT\skills\wiki-cli\SKILL.md`.
- `../../wiki/references/transport-fallback.md` resolves to `FEM_VAULT_ROOT\wiki\references\transport-fallback.md`.
- `references/program.md` resolves to `FEM_VAULT_ROOT\skills\autoresearch\references\program.md`.
If a resolved companion-relative path is missing, report the missing absolute path and ask the user to fix `vault-path.txt` or install the full `skills/` bundle.
### How to use `think`
Use `think` as a compact internal preflight before answering FEM solver questions.
Do:
- Identify the user's real question: theory derivation, implementation design, verification, comparison, or missing source.
- Check whether you are relying on memory instead of wiki evidence.
- Decide whether the answer can be handled by wiki query or needs autoresearch.
- For complex questions, surface the reasoning structure briefly in the answer.
Do not:
- Print all 10 stages for routine factual questions.
- Use `think` as a substitute for reading wiki sources.
- Skip the `ACCEPT` step when the wiki has insufficient coverage.
### How to use `wiki-query`
Use `wiki-query` for the default answer path.
Follow this order:
1. Resolve the FEM vault path.
2. Read `wiki/hot.md`.
3. If needed, use `wiki-retrieve` when provisioned: `python scripts/retrieve.py "<question>" --top 5`.
4. If retrieval is not provisioned or fails, read `wiki/index.md`.
5. Read 3-7 relevant wiki pages.
6. Synthesize with Obsidian wikilink citations.
Do:
- Cite every core claim with `[[Page Name]]`.
- Prefer vault evidence over model memory.
- Say clearly when the wiki lacks enough evidence.
Do not:
- Answer a vault-specific question from training data alone.
- Open many pages when 3-7 are enough.
- Write to the wiki unless the user explicitly asks.
### How to use `autoresearch`
Use `autoresearch` only for explicit research or wiki-expansion requests.
Trigger examples:
- "Find sources and strengthen this wiki coverage."
- "If the wiki does not cover this, research it."
- "Research and file this topic."
- "Create source and concept pages for this topic."
Before starting:
- Tell the user it will use web search/fetch and write new wiki pages.
- Mention that fetched content is subject to the `autoresearch` web egress hygiene rules.
- Ask for approval unless the user already gave explicit approval in the same request.
Do:
- Read `FEM_VAULT_ROOT\skills\autoresearch\SKILL.md` and `FEM_VAULT_ROOT\skills\autoresearch\references\program.md`.
- File results into the configured FEM vault, not the caller project.
- Use wiki locks and transport rules from the sibling skill.
Do not:
- Run autoresearch for ordinary Q&A.
- Fetch web sources silently.
- Write into `.raw/` or `wiki/` without explicit user intent.
## Answer Contract
Answer in the user's language. For Korean questions, translate the section headings naturally.
Use this structure unless the user asks for another format:
- Summary conclusion
- Formulation
- Solver implementation view
- Verification and benchmarks
- Evidence
- Wiki gap
Every core technical claim should trace to wiki evidence. Use Obsidian wikilinks such as `[[Finite Element Method]]`, `[[Solid Element Stiffness Integration]]`, or the relevant source page. If the wiki does not cover a point, label it as a gap instead of presenting model memory as vault knowledge.
## FEM Query Expansion
When a user asks a short FEM question, expand the retrieval intent before searching:
- Element formulation: shape functions, DOFs, Jacobian, `B` matrix, integration, load vector, result recovery.
- Nonlinear solve: residual, tangent, Newton update, convergence norms, load/time increments, cutback policy.
- Constitutive update: stress update, material tangent, state variables, return mapping, history evolution.
- Dynamics/eigen: mass, damping, time integration, modal extraction, normalization, residual checks.
- Contact/constraints: gap, normal/tangential law, penalty or multiplier enforcement, search, tangent contribution.
- Verification: patch tests, convergence, benchmark problems, matrix checks, residual norms, source-solver comparison.
Keep expansion internal unless showing it helps the user understand the answer.
## Deployment Notes
Distribute this skill with the whole `skills/` bundle so sibling paths remain valid. After installing or symlinking the bundle into another agent, update `vault-path.txt` for that PC or set `FEM_THEORY_WIKI_VAULT`.
@@ -0,0 +1,4 @@
interface:
display_name: "FEM Theory Query"
short_description: "Query FEM solver theory from wiki."
default_prompt: "Use $fem-theory-query to answer a finite-element structural solver formulation question from the wiki."
+3
View File
@@ -0,0 +1,3 @@
# FEM wiki vault root path.
# Edit this per PC. Use an absolute path to the vault that contains wiki/ and .raw/.
D:\Obsidian\MultiPhysicsVault