-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Problem Statement
CogSol Cookbook contains curated templates and examples for using the CogSol Framework, but the current CLI does not provide a streamlined way to bootstrap a new workspace from one of these starter assets. As a result, users must manually browse the repository and copy files, which adds friction and makes onboarding slower.
Proposed Solution
Extend the startproject CLI command to support initializing a project directly from the Cookbook:
--from-template <template-name>--from-example <example-name>
When provided, the CLI should:
- Resolve the requested template/example name within the Cookbook repository (
templates/<name>orexamples/<name>). - Download (or otherwise fetch) the selected folder contents.
- Materialize the files into the user’s target workspace directory (e.g., the current directory or a provided output path).
Optional (nice-to-have) flags:
--list-templates/--list-examplesto display available options.--forceto overwrite existing files when conflicts occur.--ref <tag|commit|branch>to pin the Cookbook version for reproducibility.
Alternative Solutions
Instead of fetching from cogsol-cookbook at runtime, the framework could ship templates/examples as packaged assets.
Pros
- Works offline.
- Fast and deterministic (assets match the installed framework version).
Cons
- Requires an update strategy to keep assets in sync with the Cookbook (e.g., periodic sync, release coupling, or a refresh mechanism).
The proposed solution (fetching from Cookbook) is preferred for its simplicity and for keeping the Cookbook as the source of truth.
Use Case
A user wants to start a new project using the "subagents" template. Today they must locate the folder in the Cookbook and manually copy it. With this change they can run:
cogsol startproject my-agent --from-template subagents…and immediately get a ready-to-run workspace scaffolded locally.
Additional Context
-
Cookbook paths:
- Templates live under
templates/ - Examples live under
examples/
- Templates live under
-
Implementation can be GitHub-specific (download directory contents) or Git-based (sparse checkout). Caching the fetched assets locally (e.g., under
~/.cache/cogsol/) would speed up repeated usage.