drannarosen/research-workflow/ownership-and-structure
Claude Code and agent skill by drannarosen/research-workflow
- community
Checking that the SKILL.md file is still in the repository.
Who owns each equation/BC/source term; stop when the architecture is wrong. Use when changing or reviewing solver/IC/mesh/boundary/source/diagnostics code in a research codebase — map who owns each quantity/equation/acceptance decision, define canonical vs legacy lanes, and stop tuning when the architecture itself is structurally wrong. The slash-list above is examples, not a checklist. Don't use to execute the break once a wrong owner is confirmed (→ correct-cutover) or for the close-out evide…
Install
npx vskill@latest install drannarosen/research-workflow/ownership-and-structureSKILL.md
The same SKILL.md was published earlier as drannarosen/research-workflow/ownership-and-structure.
Ownership and structure
Many bad scientific edits come from unclear ownership: a quantity nobody knows is rebuilt, a diagnostic treated as validation, a canonical result quietly fed by a legacy path. Before touching solver, boundary, or source code, make ownership explicit; if the structure itself is wrong, stop tuning and say so. The four moves are map ownership, detect structural mismatch, contract the lanes, and cut over (§4). Changing equation, boundary, or source-term ownership is a researcher checkpoint (→ researcher-in-the-loop).
1. Map ownership first
For the active lane, state:
- Unknowns / DOFs
- Enforced equations / constraints
- Boundary-condition owners
- Source-term owners (e.g.
eps_gravin stellar work, the force kernel in N-body) - Which quantities are rebuilt, solved, projected, or diagnostic-only
- Acceptance owner for stage transitions
- Canonical path vs legacy path
Ownership labels (canonical definition)
This is the canonical definition of these labels; other skills cite them rather than redefining them. Label every quantity or check in a status update as exactly one of:
- solver-owned: the enforced solve sets it (a DOF or a directly enforced constraint).
- rebuilt / externally-imposed: reconstructed each step or set from outside the solve (e.g. an
interpolated table, a fixed boundary value).
- projected output: derived from solved quantities, owns nothing (e.g. a luminosity computed
post-solve).
- diagnostic self-consistency: an internal check (residual, conservation drift); tests the solve,
and does not validate physics on its own.
- independent validation: comparison against a truth outside the solve. An analytic solution or
limit is a development-stage check, run as early as the module can produce the quantity; a published reference or a separate code is the end-stage comparison.
The dangerous confusions are treating a diagnostic as independent validation (a tiny residual says the solve is self-consistent, not that the physics is right) and letting a rebuilt quantity pass as solver-owned. Diagnostics and analytic checks, with the supervisor's physics judgment, are a legitimate basis for continuing development; comparison against a published reference or separate code is owed at the milestone (→ verification-gate, Validation stages). The labels keep the two apart.
2. Stop rule: when the architecture is wrong
If tuning isn't helping and any of these hold, stop tuning, because further tuning only hides the problem:
- equations vs DOFs mismatch
- wrong boundary owner
- a source term rebuilt outside the enforced solve when it must be solver-owned
- canonical path depends on a legacy fallback
- diagnostics used as acceptance owners without independent justification
Then state: (1) the mismatch, (2) why tuning won't fix it, (3) the smallest ownership rewrite needed, (4) what code path must be retired, cut over, or quarantined.
Tolerance tuning, residual weighting, line-search tweaking, compatibility scaffolding, and "let's see if it converges anyway" are not fixes for a structural mismatch, and none of them produces a canonical or reported result. A tolerance or timestep probe is still legitimate as a diagnostic: propose it to the researcher with what it would show (for example, whether an error falls at the scheme's order or only ∝ Δt), run it once approved, and label its output as a probe. It informs the ownership diagnosis and never becomes the fix.
Worked example (computational astrophysics): a stellar-evolution run violates global energy conservation; shrinking the timestep helps, so the temptation is to keep shrinking. But eps_grav = −T ds/dt is rebuilt from the previous converged model outside the Newton iteration instead of being evaluated on the current iterate, a source term rebuilt outside the enforced solve when it must be solver-owned. Stop. (1) Mismatch: the energy equation is solved against a lagged source. (2) Why tuning won't fix it: with the source in the residual, each implicit step's energy budget closes with its own ds to Newton tolerance at any Δt. The lagged source uses the previous step's ds/dt, which differs by ≈ Δt · d(eps_grav)/dt, so the budget no longer closes. For backward Euler that error is O(Δt), the same order as the scheme's truncation, so it shrinks with Δt but never reaches solver tolerance; for a higher-order scheme it also caps the observed order at 1. Shrinking Δt trades cost for a smaller structural error without removing it. (3) Smallest rewrite: evaluate eps_grav inside the residual from the iterate's s, so the Jacobian carries it. (4) Retire the post-step rebuild.
3. Lane contract: canonical vs legacy
When canonical and legacy paths coexist, write the barrier down:
- Canonical lane · 2. Legacy lane · 3. Acceptance owner for canonical · 4. Which code paths may feed
canonical results · 5. Which legacy paths remain for control/debugging only · 6. Exact mechanism preventing legacy contamination.
Canonical results do not route through legacy fallbacks, including "only when needed" fallbacks; legacy paths are labeled non-canonical in code and reporting; a lane is deleted once its replacement is validated.
4. Cutover: replacing a wrong owner
When the owner is wrong, cut it over. New logic built on a known-wrong scientific path inherits the error, and scaffolding (wrappers, aliases, compatibility adapters, "temporary" fallbacks, reporting glue added before the owner fix) is the usual way a wrong owner survives. Breaking a public API or replacing a canonical lane is a researcher checkpoint, so the cutover plan is approved before the edit (→ researcher-in-the-loop). The mechanics and sequencing adapt to the codebase; keeping a scientifically wrong path alive through scaffolding does not.
Priority
- physics ownership > API stability
- falsifiability > compatibility
- delete stale paths after the replacement is validated
- no transition architecture unless the researcher asks for one
Pre-edit contract
The wrong owner, the new owner, and the canonical-vs-legacy lanes after the change come from the §3 lane contract; don't restate them. State only the cutover delta before editing:
- Code to delete now (the stale path).
- Code allowed to remain temporarily (and only this).
- Exact reason the temporary code cannot affect canonical behavior.
Rules
- Break APIs if needed.
- No compatibility shims in the canonical lane.
- No silent fallbacks; they contaminate canonical results.
- Prefer deletion or quarantine over preservation, but validate the replacement before deleting the
stale path (→ verification-gate), so the cutover stays reversible until proven correct.
- If a file is already oversized, put the cutover in a new module.
Worked example (computational astrophysics)
"Wrong/new owner + lanes: see the §3 contract (softening becomessolver-owned). Delta — delete now: the hardcodedEPS = 0.05constant and its import. **Mayremain temporarily:** the oldlegacy_softening()fn, only behind thecontribnamespace for acontrol run. Why it can't contaminate canonical: the canonical IC builder no longer referencesit; it's reachable only by explicit opt-in. I'll validate the new path (two-body |ΔE/E| test) perverification-gatebefore deletinglegacy_softening()."
Anti-scaffolding check
Before adding any wrapper, alias, adapter, or reporting glue, ask what wrong owner it protects, whether it is actually needed, and what direct cutover removes the need for it. If it exists only to preserve a wrong owner, don't add it.
Related
hypothesis-and-test-design— scope the rewrite to the smallest provable slice.verification-gate— prove the new ownership holds before the stale path is deleted, and sweep the docs that described it.research-records— land the cutover as its own evidence-backed commit and record the decision.researcher-in-the-loop— ownership changes, API breaks, and canonical-lane replacement are checkpoints.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ownership-and-structure/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/drannarosen/research-workflow/ownership-and-structure)