groundwork-framework
Manages the user's framework library.
Subcommands
list— list installed frameworks with slug + purposeshow {slug}— print the full framework (frontmatter + body)validate— run the framework schema against every file inframeworks/; report any failuresadd— guide the user to author a new framework (interactive) or accept one via stdin (headless)sync— re-pull canonical frameworks from the installed skill pack'stemplate-vault/.groundwork/frameworks/; ask before overwriting user-edited files
add workflow
- Ask the user what the framework is for (becomes
purpose). - Ask
name(human-facing) andslug(filename-safe). - Ask which
artifacts_servedandwhen_to_usetags apply (multi-select from the schema's enums). - Ask for 3-7 questions; for each: text + tier (wide/deepen/focus/close).
- Write the file under
frameworks/{slug}.md. - Run the schema validator against the new file; if it fails, show the error and let the user fix.
sync workflow
- Diff canonical vs. user's versions. Files only in canonical get copied. Files the user has edited get flagged — ask per-file before overwriting.
- Never delete user-added frameworks.
Tiers
- line: e.g.
"6 frameworks loaded"or"added: {slug}" - brief:
listoutput as a short table - full: full framework bodies for
show; full validation report forvalidate
Headless mode
Accept a JSON blob on stdin for add:
{
"name": "Deep Work",
"slug": "deep-work",
"purpose": "…",
"when_to_use": ["weekly-review"],
"artifacts_served": ["self-map"],
"source": "Cal Newport",
"questions": [ {"slug": "q1", "text": "...", "tier": "wide"} ]
}
Failure modes
validatefinds a broken framework → list the failures; exit non-zero in headless mode.addinput fails validation → show the error; in interactive mode, offer to edit; in headless mode, exit non-zero without writing.