tlalink-maintain-links
Skill1 starsChanged 14 days agoMITView on GitHub
Create, update, check, remove or explicitly migrate TlaLink model-owned source links using Roslyn selectors and links list/check/set/remove/migrate. Use when an agent must maintain binding/capture metadata or repair attachment drift. Keeps edits separate from inspection, independent requirements, frozen evidence and human approvals.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- tlalink-inspect-correspondenceSkill
- tlalink-source-navigationSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 8
Use this workflow for requested connection changes, not merely to answer an inspection question.
- Distinctive: line 16
Read package instructions and inspect the existing scope, native endpoint, C# attachment and captures.
- Distinctive: line 21
Never provision or substitute tools during analysis.
- Distinctive: line 33
Check the package's selected wrapper/distribution supports the requested action.
- Distinctive: line 89
Do not replace every control's positional selector with exact tokens.
- Distinctive: line 95
Only the TLA+/TLC adapter supports captures, not Dafny/P.
- Distinctive: line 101
Put PlusCal annotations on authored labels, never generated translation bodies.
- Very specific: line 107
Run links migrate with explicit sources/scope and selected pinned tools.
- Very specific: line 114
Use --strip-source false when importing from immutable copies that must remain unchanged.
- Very specific: line 126
Run links check, inspect affected pairs with links inspect, and review the relevant authored diff.
- Distinctive: line 129
Do not overwrite immutable baselines or change checker requirements to clear failures.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Maintain model-owned connections deliberately
Use this workflow for requested connection changes, not merely to answer an inspection question. Start with source navigation and correspondence inspection. The maintenance reference owns syntax/options; agent safeguards own repository policy.
Establish ownership and intended change
- Read package instructions and inspect the existing scope, native endpoint, C# attachment and captures. Preserve unrelated worktree changes.
- Establish explicit compiler context and selected source files. Prefer an
applicable native
--regression-resultover reconstructing references or defines. Supply--annotation-version 4and the selected pinned frontend. Never provision or substitute tools during analysis. - Obtain the actual Roslyn declaration ID through
symbols. Select a native endpoint from its authoritative inventory; do not guess declaration-name pairs. - Decide whether this is metadata maintenance or a behavioral/abstraction change. Surface changed assumptions for an explicit decision; do not silently strengthen a model to fit code or weaken a requirement to pass.
Maintain one convention: formal TLA+/PlusCal, Dafny or P comments own typed
bind.source and associated metadata; maintained C# stays unmodified. Use
stable unique scope::name IDs and the shared source-preparation selector
contract, not line numbers, external JSON binding stores or another parser.
Check the package's selected wrapper/distribution supports the requested action. A usage error for a documented command is a capability/setup problem, not attachment drift: do not edit links to work around it. Pause for authorized documented distribution selection, then repeat preflight and inspection. Changed tool pins do not authorize refreshing requirements or review decisions.
Make the smallest authorized edit
| Operation | Procedure |
| Inventory | links list for the selected scope/target/native tool |
| Validate | links check with explicit C# compilation inputs |
| Create/update | links set --binding <id> --symbol <Roslyn-ID>; new bindings also need --endpoint <native-name> |
| Remove | links remove --binding <id> only when removing that connection is intended |
| Bulk conversion | links migrate plan first; see the separate procedure below |
This independently synthetic recipe runs from the repository root. Keep the common arguments and invocation in the same shell call when shell state is not retained by the agent host.
$common = @(
'--annotation-version', '4',
'--scope', '.\examples\Components\src\Counter\verification\scope.json',
'--target', 'counter',
'--source', '.\examples\Components\src\Counter\Counter.cs',
'--jar', '.\.tools\tla\v1.8.0\tla2tools.jar'
)
.\TlaLink.ps1 links set @common --binding 'counter::step' --endpoint Next --symbol 'M:ComponentsExample.Counter.Step' --syntax ExpressionStatement --tokens 'Value = (Value + 1) % 3;'
if ($LASTEXITCODE -ne 0) { throw 'Link update failed; inspect the emitted diagnostics.' }
.\TlaLink.ps1 links check @common --format summary
if ($LASTEXITCODE -ne 0) { throw 'Link check failed; do not report the edit as validated.' }This example intentionally updates maintained metadata; do not run it during a read-only question. Use the actual user's selected scope and authorized change.
For practice or skill validation, copy the public example's Counter.cs,
Counter.tla and scope.json into a new disposable directory. This scope's
model input is document-relative, so keep scope.json beside Counter.tla.
Point --scope and --source at those copies, keeping the pinned frontend
path absolute. Exercise update, inspect, remove, expected failing check,
recreate and passing check there; assert unchanged original hashes and clean
up only the files/directory created by the exercise. Treat the expected failed
check as a test control, not a reason to modify required binding declarations.
Migration on this already-converted fixture is only a no-op planning test;
use the focused link suite for a real source-owned migration control.
Selector and capture rules
- Omit syntax/tokens for a whole declaration. For a statement/expression use an exact Roslyn syntax kind and token filter when appropriate. Token matching ignores trivia, not semantic changes.
- Repeated syntax requires an explicit one-based
--matchand--expected-matches. Positional selectors can survive equal-count reordering while changing meaning: inspect the resolved statement after editing. - Do not replace every control's positional selector with exact tokens. Independently authored behavioral mutation controls must still reach their intended attachment; an attachment/parser failure is not a successful control.
- Preserve existing captures unless deliberately changing them. Repeated
--capture '<typed JSON>'replaces that binding's capture entries;--clear-capture trueclears them. Capture objects must name this binding. Only the TLA+/TLC adapter supports captures, not Dafny/P. - Preserve binding reasons and exclusions. Exclusions scope correspondence, not runtime code, input pins or relevant argument/callee effects.
- Moving a binding to another native endpoint requires explicit remove then set. Removal does not remove independent required-binding declarations or acceptance policy; a resulting check failure must remain visible.
- Put PlusCal annotations on authored labels, never generated translation bodies. Regenerate translations explicitly through the documented frontend procedure when required; do not hand-edit generated code.
Bulk migration is a separate, reviewed operation
- Run
links migratewith explicit sources/scope and selected pinned tools. It defaults to a plan;--targetnarrows it, otherwise all scope targets participate and each selected language needs its frontend. - Save the plan to a new
--outputfile. Review IDs, exclusions, capture preservation, proposed source stripping and token/byte checks. - Differing reasons block by default. Only after reviewing both meanings use
--reason-policy preserve-both; retaining both does not prove compatibility. - Use
--strip-source falsewhen importing from immutable copies that must remain unchanged. - Apply only the authorized conversion with
--apply true. Keep before/after receipts and investigate interrupted application; edits are not a multi-file crash transaction. Never overwrite historical evidence or prepared outputs.
Migration does not authorize renewing source allowlists, configuration pins, independent requirements or reviews. Handle any intentional successor inputs explicitly under their own package policy, not as automatic drift repair.
Validate and report separately
Run links check, inspect affected pairs with links inspect, and review the
relevant authored diff. For changed behavior/attachment points, run affected
regressions and defect-relevant controls with the same compiler/native context.
Do not overwrite immutable baselines or change checker requirements to clear
failures.
Report edited IDs/files, selector/capture changes, checks and native controls, current applicability and remaining correspondence questions. CLI edits and successful checks do not approve atomicity or semantic equivalence, discharge human gates, or compose backend results into C# correctness. Do not commit or publish private package material or record agent self-review as human approval.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

