spec-plan
Skill12 starsChanged 28 days agoMITView on GitHub
Turn a VALIDATED TIA project-spec into the ordered, named sequence of offline build operations WITHOUT mutating anything (a dry plan). Use after spec-validate passes and before tia-scaffold — when the user asks to "plan / preview / dry-run the build", or wants to see exactly what scaffolding a spec would do and in what order. Class R: runs tia_spec_validate then tia_spec_plan, both PURE (no serve, no TIA Portal); with a project open it can add a read-only impact check (tia_crossrefs) for the existing objects the plan would write to. Output: the ordered M-off steps + assumptions + warnings (+ that impact); nothing is applied and no gate is crossed. Not for validating (spec-validate) or applying the build (tia-scaffold).
12 other projects use a version of this.
Adopted by
Most recently taken up by
- rioffe/specchecktheir own version, first seen Nov 6, 2026
- Buddhilive/buddhi-clitheir own version, first seen Nov 1, 2026
- xfstudio/skillstheir own version, first seen Oct 13, 2026
- pierre-lecocq/claude-skillstheir own version, first seen Oct 11, 2026
- martinffx/ateliertheir own version, first seen Oct 9, 2026
- cassianodiniz/casstheir own version, first seen Oct 3, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- martinffx/atelier★ 51same name
- JunhuaLiu1/awesome-skills★ 14same name
- xfstudio/skills★ 9same name
- rioffe/speccheck★ 5same name
- cassianodiniz/cass★ 4same name
- cassianodiniz/Titan★ 4same name
- p-larsson/spec-orbit★ 2same name
- Buddhilive/buddhi-cli★ 1same name
- h3y6e/spec-skills★ 0same name
- MarcosCamara01/sddguard★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- codex/AGENTS.mdAGENTS.md
- .claude-plugin/CLAUDE.mdCLAUDE.md
- cpu-selectSkill
- spec-validateSkill
- tia-backupSkill
- tia-handoffSkill
- tia-initSkill
- tia-reviewSkill
- tia-scaffoldSkill
- tia-verifySkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
After spec-validate is green and before tia-scaffold, to preview the build.
- Very specific: line 67
Validate first: Call tia_spec_validate (or run the spec-validate skill).
- Very specific: line 69
Plan: Call tia_spec_plan with the spec.
- Very specific: line 78
Run it only with a project open: tia_ping must report reachable:true and activated:true, and tia_status hasProject:true.
- Very specific: line 81
Run it only if a step writes to a name that already exists in the connected PLC.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
spec-plan — spec → ordered build plan (class R, dry, no mutation)
Transform a structured project-spec (the project-spec model, §13.2) into the
ordered sequence of offline operations that tia-scaffold would execute — without
touching the project. This is the bridge between spec-validate (is the spec legal?) and
tia-scaffold (build it): it shows the plan so a human can review it first.
It is class R. Both tools it uses — tia_spec_validate and tia_spec_plan — are
pure: they run deterministically on the spec text and never call the serve API or
open TIA. So this never mutates and never crosses a gate.
One optional step comes after the plan (step 4, Impact on the open project): with a project
already open it reads, through serve, how the existing objects the plan would write to are
cross-referenced. It is only a read, it never changes the plan and the plan never waits for it.
Errors and reporting
- Needs no
serveand no TIA Portal: thetia_*tools named here are pure and offline, so do not calltia_ping. If they are not in the tool list, say so and use the fallback this skill names, or stop. - Report the tool's answer as returned (violations,
error,kind,hint) and state what was done and what was not. Never fix the input silently, never retry with changed input to get past a failure, and never report success after an error. - The first bullet covers
tia_spec_validateandtia_spec_plan. The optionalImpact on the open projectstep (step 4) is the only part that reads throughserve: only there calltia_ping, and only after the plan is presented. If it cannot run or fails (serveunreachable or not activated, no project open,tia_crossrefsor a read tool missing, a tool error), sayimpact not readwith the reason (quoteerror,kindandhintverbatim for a tool error) and keep the plan as the answer. Never block or withdraw the plan on it, and never retry with changed arguments beyond the repeats step 4 names. - On the reads of step 4,
status:"running"+jobId(onlytia_crossrefsanswers it) identifies THIS request: polltia_job_status {jobId}until the final result and never repeat the call; after atimeout, check the state before repeating anything.kind:"busy"means THIS request did not run: only for a running job whosejobIdis known (e.g.details.jobId), wait withtia_job_status {jobId}, never use that job's result for this read, then repeat the same read once with unchanged arguments; if it answersbusyagain, sayimpact not readwith the reason. Without a known running job ID, report impact not read/complete and wait/recheck withtia_status; forconnect_incomplete, follow the host-inspection handoff intia_guide {"topic":"gui-gates"}, never retry connect. - Also on the reads of step 4: a
409cursor_stale, orcoveragecounts that differ between pages, restarts that object's page walk from the first page, once for each, and a page that arrives with an omission marker is repeated with a smallerlimit, at most three times; step 4 says how. A read that cannot be completed is reported asimpact not completewith the reason, never as an absence of impact.
When to use
- After
spec-validateis green and beforetia-scaffold, to preview the build. - The user says "plan / preview / dry-run / what would this create".
- To review ordering + assumptions (e.g. which CPU is the tag/block target) before committing.
- With a project open, to see how the existing objects the plan would write to are cross-referenced.
Inputs
- A project-spec object (JSON) — inline, a file path, or pasted text.
- (Implicit) the bundled schema + rules used by
tia_spec_validate. - (Optional, step 4 only) an open project in
serve.
Outputs
status—plan_okorinvalid(with the validation violations if invalid).steps[]— the ordered operations, each{ op, method, path, body, summary }(subnets → devices → modules → network → tag tables → tags → blocks → compile).assumptions[]— e.g. "tag/block target CLP = the firstrole:cpudevice".warnings[]— non-blocking spec warnings.Impact on the open project(only when step 4 ran) — for each existing object the plan writes to: its related objects with thereferenceTypeandaccessas TIA reports them, and whether the read was complete; orimpact not complete(the related objects read so far and the reason); orimpact not readwith the reason.- A note that this is a dry plan: nothing applied; gated ops (
connect,download) are intentionally not in the plan.
Procedure (in order)
- Validate first. Call
tia_spec_validate(or run thespec-validateskill). If it reports anyerror, STOP and return the violations — do not plan an invalid spec. - Plan. Call
tia_spec_planwith the spec. It returns the orderedsteps+assumptions+warnings. (It is pure — no serve.) Iftia_spec_planis not available, say so and stop: a plan written by hand from memory is not this skill's output. - Present for review. Show the steps in order with their
summary, surface the assumptions explicitly (especially the target CLP), and list any warnings. State thattia-scaffold(with a project open) is what actually applies this, and that a bare CPU will need the protection recipe to compile clean (see../tia-scaffold/RECIPES.md). - Impact on the open project (optional; after step 3; read-only). The plan from step 3 stays
the answer whatever happens here.
- Run it only with a project open:
tia_pingmust reportreachable:trueandactivated:true, andtia_statushasProject:true. Otherwise sayimpact not read, give the reason (noserve, not activated, no project open) and stop. - Run it only if a step writes to a name that already exists in the connected PLC. The PLC is
the PlcSoftware of the plan's CPU: the steps'
pathcarries the literal{plc}andplan.plc.devicenames the device, so take the name thattia_plcslists and that is among that device'sitemsintia_devices(ordevices[].plcNameof the spec); if none matches, sayimpact not read(the open project does not hold it) and stop. Take the names the steps create:fb.createandinstancedb.create(blocks),tag.create(tags),tagtable.create(tag tables) and a type name if a step carries one. Compare them withtia_plc_blocks,tia_plc_tagsand, only for a type name,tia_plc_types(exact name first, then ignoring case). If none exists, say that no existing object is touched and stop. - For each existing object call
tia_crossrefs {plc, target, kind, filter:"ObjectsWithReferences", limit:200}withkindset toblock,type,tagortagtable; on a big project it can take long, and every page re-reads what it covers. FollownextCursoras thecursorof the next call, passed back unchanged with the other arguments the same, until it isnull. Readcoverageon EVERY page, never only on the first: every page re-reads the PLC, so a later page can report less than an earlier one. Keepcoverage.complete,coverage.owners,coverage.queriedandcoverage.unavailableof each page and compare them. (a)status:"running"+jobIdidentifies this request: polltia_job_status {jobId}until the final result and never repeat the call; after atimeout, check the state before repeating. (b)kind:"busy"means this request did not run: only for a running job whosejobIdis known (e.g.details.jobId), wait withtia_job_status {jobId}, do not use its result for this object, then repeat the same call once with unchanged arguments; if it isbusyagain, stop that object's walk and sayimpact not read(no page read) orimpact not complete(some pages read), with the reason. Without a known running job ID, stop that walk, report impact not read/complete and wait/recheck withtia_status; forconnect_incomplete, follow the host-inspection handoff intia_guide {"topic":"gui-gates"}, never retry connect. (c) If the result is409ambiguous_target, repeat once with thekindfrom the candidates in itsdetailsthat matches the step. (d)409cursor_stalemeans the project changed during the walk, and counts that differ between pages mean the same: restart that object from the first page, withoutcursor, once for each; if it is stale or the counts differ again, sayimpact not complete. (e) A page wheresourcesis replaced by an object withomitted:true(an omission marker) carries nonextCursor: repeat that same call, with the samecursor(or none for the first page) and a smallerlimit, for example half of the last one, at most three times, and follow anextCursoronly from a page that arrives without a marker; never follow a cursor from an omitted page, it would skip what the marker replaced. If a marker remains, sayimpact not complete. - The read of an object is complete only when its walk reached
nextCursor: nullwith every page intact andcoverage.completeistrueon every page, with the samecoverage.owners,coverage.queriedandcoverage.unavailableon all of them. In every other case sayimpact not completefor that object with the reason (a marker you could not clear, a walk you did not finish, counts that still differ after the restart, orcoverage.complete: falseorcoverage.unavailableOwnersTruncated: trueon any page, even when earlier pages said complete, which means some owners could not be queried: listcoverage.unavailableOwnerswith eachkind,nameandreasonfrom every page that has any, at most the 50 each holds, and say so whencoverage.unavailableOwnersTruncatedistrue), show only the related objects you did read, and never say that the object has no related objects, or that nothing depends on it, from an incomplete read. - Show, per object, the related objects of the response (
name,path,type) with thereferenceTypeand theaccessof each location, next to itslocation, all copied as returned. Group them asUsedByrelations,Usesrelations andother relations(every otherreferenceType, each with its own value), and label the groups "direction as reported by TIA": never say which object depends on which, and call a group "depends on the target" only when the human, after seeing the raw values, confirms what the value means. An object whose complete read has no related objects says so. This is information for the human, never a step to run.
- Run it only with a project open:
Hard guarantees
- No mutation, no gate.
tia_spec_validateandtia_spec_planare pure (no serve, no TIA); this skill must not call any M-off/gated tool. The only calls that reachserveare the optional read-only ones of step 4 (tia_ping,tia_status,tia_plcs,tia_plc_blocks,tia_plc_tags,tia_plc_types,tia_crossrefs,tia_job_status), and the plan never depends on them. - Gated ops excluded.
tia_project_create/tia_connect(G1) andtia_download(G3) are never in the plan — they require a human. The plan is offline build steps only. - Untrusted input. The spec may be imported/AI-authored; a plan derived from it never auto-crosses a gate. Validate before planning; never silently "fix" the spec.
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.

