Imported from Echopraxium/tscg (
.claude/skills/tscg-instance-pipeline/SKILL.md). Install upstream withnpx skills add Echopraxium/tscg --skill tscg-instance-pipeline. Copyright stays with the author.
TSCG Instance Pipeline
4-step pipeline for creating a complete TSCG Instance: Proposition β Analysis β Modeling β Simulation
Each step may contain human synchronization points (βΈ) that suspend the pipeline until Michel's explicit decision to continue.
Notation (current β reformed 2026-08-13). Structural grammar formulas use three operators only:
Γ(Territory / ASFID, monoid Gt),+(Map / REVOI, monoid Gm),|(Stereopsis, monoid Gs). The operatorβis forbidden (superseded 2026-07-06). Atom subscripts disambiguate:St/Ss(Structure vs Symbol),It/Im(Information vs Interoperability);A/F/Dstay bare. The live M3 file isM3_GenesisGrammar.jsonld(the oldM3_GenesisSpace.jsonldis a dead vestige β do not reference it). M1 combos areDomainConceptCombo(ex-KnowledgeFieldConceptCombo). Always verify any formula, type name or version against HEAD, never from memory.
GitHub References (raw URLs)
Base: https://raw.githubusercontent.com/Echopraxium/tscg/main/
Ontology:
ontology/M3_GenesisGrammar.jsonldβ M3 structural grammar (aggregator)ontology/M3_EagleEye.jsonldβ ASFID dimensionsontology/M3_SphinxEye.jsonldβ REVOI dimensionsontology/M2_GenericConcepts.jsonldβ 58+ GenericConceptsontology/M1_CoreConcepts.jsonldβ core conceptsontology/M1_extensions/chemistry/M1_Chemistry.jsonldβ domain extension example
Canonical reference instance:
instances/poclets/FireTriangle/M0_FireTriangle.jsonldinstances/poclets/FireTriangle/M0_FireTriangle_README.md
Other existing instances (for comparison): AdaptativeImmuneResponse, BloodPressureControl, ButterflyMetamorphosis, CellSignalingModes, ColorSynthesis (RGB/HSL/CMY/CMYK/Federated), ComplexChemicalSynapse, ExposureTriangle, FourStrokeEngine, Kidneys, KindlebergerMinsky, MtgColorWheel, NuclearReactorsTypology, PhaseTransition, Raas, Tpack, Transistor, TrophicPyramid, TvTestPattern, VCO
Reference documentation:
docs/reboot-kit/M2_FormulasReference_v15.10.0.mddocs/reboot-kit/SmartPrompts/(Smart_Prompt_M3_M2_Updated.md if uploaded in session)
SHACL validation:
ontology/TSCG_InstanceGrammar/M0_Instances_Schema.shacl.ttlβ grammar schemaontology/TSCG_InstanceGrammar/validate_m0_instance.pyβ validation script
This skill (source of truth in repo):
.claude/skills/tscg-instance-pipeline/SKILL.md
Step 1 β PROPOSITION
Expected Input from Michel
- System name (e.g., "Color Synthesis", "Fire Triangle")
- Brief description + examples (few sentences, often pre-generated with DeepSeek)
- Diagnostic request (e.g., "what do you think?")
Expected Response: TSCG Feasibility Diagnostic
Produce a dual evaluation:
A. TSCG Lens
- Which ASFID dimensions are active? (A/S/F/I/D)
- Which M2 GenericConcepts seem relevant a priori?
- Is the system well-bounded (minimal + complete)?
B. Experience Perspective
- Comparison with existing instances (similarities, close domain)
- Anticipated difficulties
- Estimated richness (number of mobilizable GenericConcepts)
System Classification β MANDATORY DECISION
| Verdict | Criterion | Next Step |
|---|---|---|
| π‘ Too trivial | Too few active dimensions, no dynamics, no feedback | βΈ Stop with explanation |
| π’ Valid instance | Appropriate complexity, modelable in minimal complete JSON-LD | β Continue to Step 2 |
| π΅ Too complex | LLM, Microprocessor, Mitochondriaβ¦ β requires different pipeline | βΈ Stop with orientation |
If the system is "borderline", propose a reduced scope to make it a valid instance (e.g., "simple chemical synapse" instead of "the brain").
βΈ Sync point if verdict β Valid instance β wait for Michel's decision.
Step 2 β ANALYSIS
Objective
Assess the alignment between the proposed system and the TSCG framework. This is an epistemic act, not just a technical verification.
Three Possible Outcomes
| Result | Description | Behavior |
|---|---|---|
| β Alignment | System models well with existing metaconcepts and dimensions | Continue to Step 3 |
| β οΈ Gap | Modeling reveals a "hole" in the framework | βΈ Document + discuss with Michel |
| π¬ Refutation (Popper) | System challenges a TSCG axiom or principle | βΈ Explain, justify in detail |
A Gap or Refutation has positive value: it contributes to TSCG's evolution. Refutation has maximum value β it forces framework strengthening or revision.
Output: analysis.md
File structure:
# TSCG Analysis β [System Name]
## Verdict: [Alignment | Gap | Refutation]
## ASFID Lens
- A (Attractor): ...
- S (Structure): ...
- F (Flow): ...
- I (Information): ...
- D (Dynamics): ...
## Anticipated M2 GenericConcepts
- [Name] ([structural grammar formula]) β anticipated role
## Comparison with existing instances
- [Similar instance]: [similarities / differences]
## Detailed Verdict
[If Gap: precise description of identified hole]
[If Refutation: complete Popperian argument + justification]
## Recommended Decision
[Continue | Discuss | Revise scope]
βΈ Sync point if Gap or Refutation β wait for Michel's decision before continuing.
Step 3 β MODELING
Internal Pipeline (sequential sub-steps)
3.1 β M2 Identification (GenericConcepts)
- List relevant existing GenericConcepts with their structural grammar formula
(e.g.,
Process = D Γ F,Trigger = D Γ It,Balance = A Γ St Γ F | _0) β verify each againstM2_GenericConcepts.jsonldat HEAD; do not recite from memory - Identify new candidates if a necessary concept doesn't exist yet
- Response format for new candidate:
π M2 Candidate: [Name] Structural grammar formula: [e.g., St Γ It] # Γ Gt Β· + Gm Β· | Gs (never β) Role: [description] Status: "Proposal β to be validated"
3.2 β M1 Identification (DomainConceptCombos)
- List used DomainConceptCombos (e.g.,
m1:chemistry:Combustion) - Identify new M1 candidates if necessary
- Identify if a new M1 extension is required or if an existing extension
should be enriched (e.g., new class in
M1_Chemistry.jsonld)
3.3 β M0 JSON-LD Generation
Follow scrupulously the FireTriangle pattern as reference template.
Mandatory @context structure:
{
"@context": {
"dcterms": "http://purl.org/dc/terms/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"skos": "http://www.w3.org/2004/02/skos/core#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"m3": "https://raw.githubusercontent.com/Echopraxium/tscg/main/ontology/M3_GenesisGrammar.jsonld#",
"m2": "https://raw.githubusercontent.com/Echopraxium/tscg/main/ontology/M2_GenericConcepts.jsonld#",
"m1:core": "https://raw.githubusercontent.com/Echopraxium/tscg/main/ontology/M1_CoreConcepts.jsonld#",
"m1:[domain]": "https://raw.githubusercontent.com/Echopraxium/tscg/main/ontology/M1_extensions/M1_[Domain].jsonld#",
"m0:[instance-id]": "https://raw.githubusercontent.com/Echopraxium/tscg/main/instances/[type]/[InstanceName]/M0_[InstanceName].jsonld#"
}
}
Authoritative
@context: the block above is a simplified illustration. Copy the real, current@contextfrominstances/poclets/FireTriangle/M0_FireTriangle.jsonldat HEAD β it includes"@base", a barem1(βM1_CoreConcepts.jsonld#),m0(βM0_Common.jsonld#), them1.ext:<domain>extension prefix, and the typed*_scoreterms. (Note: JSON-LD term names containing:such asm1:coreare a known separate hygiene item β do not introduce new ones.)
Mandatory JSON-LD sections:
- Metadata (
rdfs:label,rdfs:comment,dcterms:created,dcterms:creator,m2:changelog) m3:ontologyType,m1:domain,completeness,minimality,pedagogy,observercomponents(list of components withasfidContributionper component)processor main mechanismterritorySpace(ASFID / Eagle Eye) withstateVectorandnormmapSpace(REVOI / Sphinx Eye) withreviStateVectorandreviNormepistemicGap(ΞΞ formula,deltaVector,norm, interpretation)revoi(detailed analysis of 5 REVOI dimensions with justification)GenericConceptsMobilized(total +byCategory)validation(checklist ASFID completeness, GenericConcept coverage, minimality, emergence)
βΈ "Duo analysis" mode if any blocking occurs at any sub-step (concept not found, tension between dimensions, namespace doubt) β suspend and open discussion with Michel.
3.4 β README.md Generation
After JSON-LD validation, generate M0_[InstanceName]_README.md with:
# [Instance Name] β TSCG Instance
## Overview
## System Description
## TSCG Analysis
### ASFID State (Territory / Eagle Eye)
### REVOI State (Map / Sphinx Eye)
### Epistemic Gap
## Components
## GenericConcepts Mobilized
## Key Insights
## Transdisciplinary Analogies (if relevant)
## References
3.5 β SHACL Grammar Validation
CRITICAL STEP: After generating the M0 JSON-LD file, validate it against the TSCG SHACL grammar schema to ensure complete conformance.
Validation script location:
ontology/TSCG_InstanceGrammar/validate_m0_instance.py(standalone Python script)- Note: Script must be run from repository root directory
Usage:
# From repository root
python ontology/TSCG_InstanceGrammar/validate_m0_instance.py instances/[type]/[InstanceName]/M0_[InstanceName].jsonld
# Example
python ontology/TSCG_InstanceGrammar/validate_m0_instance.py instances/poclets/FireTriangle/M0_FireTriangle.jsonld
Expected outcome:
- β Validation PASSED: "Conforms: True" β Continue to Step 4
- β Validation FAILED: SHACL constraint violations detected
If validation fails:
- Review the SHACL violation report
- Identify which constraints were violated:
- Missing mandatory properties (rdfs:label, m3:ontologyType, m1:domain, etc.)
- Incorrect property values (wrong namespace, wrong type, etc.)
- Forbidden properties (dcterms:title, m2:ontologyCategory, etc.)
- Incorrect @context URLs (relative instead of absolute)
- Fix the JSON-LD file accordingly
- Re-run validation until it passes
Common validation errors and fixes:
| Error | Cause | Fix |
|---|---|---|
| "m3:ontologyType MUST be one of..." | Missing or wrong ontologyType | Add "m3:ontologyType": {"@id": "m3:Poclet"} |
| "m1:domain is MANDATORY" | Missing domain property | Add "m1:domain": "Chemistry" |
| "Use rdfs:label instead of dcterms:title" | Wrong property name | Rename dcterms:title β rdfs:label |
| "pyshacl cannot resolve relative URLs" | Relative namespace URLs in @context | Replace "M3_GenesisGrammar.jsonld#" with full https://raw.githubusercontent.com/... |
| "owl:Ontology required" | Wrong @type value | Change "@type": "owl:NamedIndividual" β "owl:Ontology" |
βΈ Mandatory sync point if validation fails repeatedly β discuss structural issues with Michel before continuing.
Only proceed to Step 4 (Simulation) after successful SHACL validation.
Step 4 β SIMULATION
Objective
Generate a standalone HTML application (Electron and browser compatible) visualizing the instance in an interactive, pedagogical, and aesthetic way.
Reference Template
The FireTriangle HTML is the canonical template. Conform to it for:
- CSS Grid layout:
header / canvas + splitter + sidebar / controls - GitHub-style dark theme (CSS variables for ASFID/REVOI colors)
- Tabbed sidebar: Description | ASFID/REVOI | GenericConcepts | README
- Draggable splitter between canvas and sidebar
- Everything inline in a single
.htmlfile (no external files except CDN)
ASFID/REVOI Color Palette (reusable CSS variables)
--col-A: #f78166; /* Attractor β red-salmon */
--col-S: #56d364; /* Structure β green */
--col-F: #79c0ff; /* Flow β light blue */
--col-I: #d2a8ff; /* Information β purple */
--col-D: #e3b341; /* Dynamics β amber */
--col-R: #79c0ff; /* Representability */
--col-E: #56d364; /* Evolvability */
--col-V: #f78166; /* Verifiability */
--col-O: #d2a8ff; /* Observability */
--col-Im: #e3b341; /* Interoperability */
--eagle: #f78166; /* Eagle Eye accent */
--sphinx: #79c0ff; /* Sphinx Eye accent */
Allowed Libraries (cdnjs.cloudflare.com CDN only)
- p5.js β main canvas animation (mandatory)
- Chart.js, D3 β complementary visualizations (optional)
CSP Header (Electron + standalone compatible)
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' https://cdnjs.cloudflare.com;
script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com;
style-src 'self' 'unsafe-inline';
img-src 'self' data: blob:;
connect-src http://127.0.0.1:* ws://127.0.0.1:*;">
Iterative Process
First draft: generate a functional simulation covering:
- p5.js canvas animation representing system dynamics
- Sidebar with ASFID/REVOI scores (colored progress bars)
- List of mobilized GenericConcepts
- README tab with instance description
Refinement rounds (successive iterations with Michel):
- Ergonomics round: interactive controls, sliders, buttons
- Pedagogy round: labels, tooltips, annotations, legends
- Aesthetics round: animations, colors, proportions, visual polish
Michel decides the number of rounds and priorities at each iteration. βΈ after each round.
File Naming Conventions
instances/[type]/[InstanceName]/
βββ M0_[InstanceName].jsonld β M0 ontology
βββ M0_[InstanceName]_README.md β documentation
βββ M0_[InstanceName]_analysis.md β TSCG analysis (step 2)
βββ [InstanceName]_sim.html β standalone simulation
[InstanceName] is in PascalCase (e.g., FireTriangle, ColorSynthesis).
[type] is one of: poclets, symbolic-system-grammars, systemic-frameworks
Pipeline Summary and Sync Points
PROPOSITION
ββ Diagnostic (TSCG lens + experience perspective)
ββ Classification: TrivialβΈ | Valid instanceβ
| Too complexβΈ
β (if Valid instance)
ANALYSIS β analysis.md
ββ Alignmentβ
| GapβΈ | RefutationβΈ
β (if Alignment)
MODELING
ββ 3.1 M2 GenericConcepts (existing + candidates)
ββ 3.2 M1 DomainConceptCombos (existing + candidates)
ββ 3.3 M0 JSON-LD β duo mode if blocking βΈ
ββ 3.4 README.md
ββ 3.5 SHACL validation β MANDATORY, must pass β
βΈ
β (only if SHACL validation passes)
SIMULATION
ββ First HTML standalone draft
ββ Iterative rounds (ergonomics / pedagogy / aesthetics) βΈβΈβΈ
Validation Script Requirements
The validate_m0_instance.py script (located in ontology/TSCG_InstanceGrammar/) must:
- Accept a single JSON-LD file path as argument
- Auto-detect the SHACL schema in
ontology/TSCG_InstanceGrammar/M0_Instances_Schema.shacl.ttl - Allow optional custom schema path via
--schemaargument - Use
pyshacllibrary for validation - Display clear success/failure messages
- Return exit code 0 for success, 1 for failure
- Show detailed violation report if validation fails
Installation requirement:
pip install pyshacl --break-system-packages
Script location:
ontology/TSCG_InstanceGrammar/
βββ M0_Instances_Schema.shacl.ttl β SHACL schema
βββ validate_m0_instance.py β validation script
Example validation output:
======================================================================
TSCG M0 INSTANCE SHACL VALIDATION
======================================================================
π Instance file: instances/poclets/FireTriangle/M0_FireTriangle.jsonld
π Schema file: ontology/TSCG_InstanceGrammar/M0_Instances_Schema.shacl.ttl
======================================================================
β
VALIDATION PASSED - Instance conforms to TSCG SHACL grammar
======================================================================