Architecture
One shared automation engine. Many form configs. A new Google Form is a new YAML file — not a new code path.
Packages
text
packages/core/src/ @zamdevio/gform-core — config, engine, paths, content, artifacts
packages/cli/src/ Commander commands + edit/--ask UI
dist/cli.js published bin (tsup from root)
docs/ canonical user docs (synced into apps/docs)
apps/docs/ VitePress site → thegform.pages.dev
maintainer/ contributor systems / phases (not published)
forms/_template.yaml starter shipped with root package files[]
profiles/ unused stub — not runtime| Surface | Package |
|---|---|
CLI bin gform | root package gform |
| Engine SDK | @zamdevio/gform-core |
| Re-export | gform/core from the root package |
ts
import { loadFormConfig, runFormBatch } from "@zamdevio/gform-core";
// or
import { loadFormConfig, runFormBatch } from "gform/core";Runtime Node adapters publish via @zamdevio/gform-core’s documented runtime entry points as the purity refactor lands — hosts supply adapters; core does not silently default-resolve Node for new code paths.
Data flow
text
$GFORM_HOME/forms/<form>.yaml (or optional ./forms/)
│
▼
@zamdevio/gform-core load ──zod──► FormConfig
│
▼
runner (+ inspect preflight)
│
├─ browser.launch (+ storageState only if CLI --auth)
├─ page.goto(url)
└─ for step in steps: runStep(page, step)
│
▼
artifacts/<16-hex>/ + history.jsonlWhy Playwright (not raw POST)
Google Forms UI is multi-page JS. A /formResponse POST needs hidden entry.* IDs and page history that break when the owner edits the form. Playwright follows visible controls — slower to run, easier to maintain when the form changes.
Design rules
- Core knows actions, not business answers
- Form YAML owns URL + ordered answers
- Auth is optional and CLI-opt-in (
--auth) - CLI stays thin; logic lives in
@zamdevio/gform-core - Interactive
--askUI lives inpackages/cli - Soft walls → human assist; hard walls → reason + artifacts
- No CAPTCHA bypass
Contributor maps and phases live in the repository under maintainer/ (not published). See also CONTRIBUTING.md.