Custom framework development guidance

I would like to develop a custom framework for an existing platform.
I can see how I can reference a git repo in platformio.ini for platform, however it’s not so straightforward to understand how i can pull in a framework from a git repo.
It appears that the frameworks, tools, etc are all versioned binary packages/artifacts, which need to be hosted somewhere, and need to have some reference to these from a hosted manifest json which my platform.json references. Does this sound accurate so far?

  1. is there some other way for testing which i can specify a custom framework, e.g. reference the git repo from my platformio.ini?
  2. are the packages required to be in tgz format? can they be zip (I’m thinking of using git tagging/release zipping - or is there a way to get git to provide a tgz archive?)
  3. is there deeper documentation on how the frameworks interact with packages and the framework scripts? Frameworks, packages, framework scripts, etc are only briefly touched upon here:
    Custom Development Platforms — PlatformIO latest documentation
    I’m hoping to get a deeper discussion of the ideas and choices behind framework selection, so I understand how to proceed, and not just blindly copy some existing pattern which may not be the best and/or only way to attack it.

Thanks,
Jens

------- update:
ok answering my own questions here…

Looks like it is possible to leverage using just github. A little bit of reverse engineering here:

  1. need to have a package.json at the root of my “framework” project, e.g. from simba:
    https://github.com/eerimoq/simba/blob/master/package.json
    Project should synchronize the version in this file with release/tag versions of repo.
    This way, a binary tgz of the repo at a particular release version (including package.json) can be obtained from github, e.g. “https://github.com/eerimoq/simba/archive/15.0.3.tar.gz

  2. need to have manifest which points to above versioned framework artifact listed in platform.json of platform repo. This can be directly listed in packageRepositories section or pointer to manifest.json kept somewhere else. In this example I see Simba project again has placed this in master branch of framework repo - convenient! e.g.,
    https://github.com/eerimoq/simba/blob/master/make/platformio/manifest.json

  3. also there seems to be how the build integration with target framework is handled by calling the builder framework py script. Again, Simba framework example from esp8266 platform:
    https://github.com/platformio/platform-espressif8266/blob/develop/builder/frameworks/simba.py
    Which instead of hardcoding many things, instead calls makefile targets on simba framework, which just calls another py buildscript which seems to handle the framework specific stuff.
    https://github.com/eerimoq/simba/blob/master/make/platformio/platformio.py

Overall, this seems to be a decent abstraction which keeps most framework details (including metadata) inside the framework repo itself.

ok answering my own questions here…

Looks like it is possible to leverage using just github. A little bit of reverse engineering here:

  1. need to have a package.json at the root of my “framework” project, e.g. from simba:
    https://github.com/eerimoq/simba/blob/master/package.json
    Project should synchronize the version in this file with release/tag versions of repo.
    This way, a binary tgz of the repo at a particular release version (including package.json) can be obtained from github, e.g. “https://github.com/eerimoq/simba/archive/15.0.3.tar.gz

  2. need to have manifest which points to above versioned framework artifact listed in platform.json of platform repo. This can be directly listed in packageRepositories section or pointer to manifest.json kept somewhere else. In this example I see Simba project again has placed this in master branch of framework repo - convenient! e.g.,
    https://github.com/eerimoq/simba/blob/master/make/platformio/manifest.json

  3. also there seems to be how the build integration with target framework is handled by calling the builder framework py script. Again, Simba framework example from esp8266 platform:
    https://github.com/platformio/platform-espressif8266/blob/develop/builder/frameworks/simba.py
    Which instead of hardcoding many things, instead calls makefile targets on simba framework, which just calls another py buildscript which seems to handle the framework specific stuff.
    https://github.com/eerimoq/simba/blob/master/make/platformio/platformio.py

Overall, this seems to be a decent abstraction which keeps most framework details (including metadata) inside the framework repo itself.

You did roll your own fork of the esp8266 platform, right?