Skip to content

Project Scaffolding Engine

The gosec Scaffolding Engine (gosec init / pkg/scaffold) generates production-grade Go starter projects with selective modular components and Antigravity AI tooling.


🏗️ Supported Archetypes

When generating a new project, choose one of five specialized archetypes:

Archetype Description Primary Use Case
cli Command-line tool Systems utilities, admin tools, developer CLIs
api High-performance REST service Microservices, backend APIs, webhook receivers
mcp-server Stdio JSON-RPC 2.0 tool server Custom AI agent tooling for Antigravity & Claude
library Pure Go modular package Zero-dependency reusable Go libraries
astro Full-stack Go API + Astro portal SaaS dashboards, edge web apps on Cloudflare

🧩 Modular Add-on Components

Each archetype can selectively bundle modular capabilities:

flowchart TD
    Scaffold["gosec init / pkg/scaffold"] --> Arch{"Select Archetype"}
    Arch --> CLI["CLI Tool"]
    Arch --> API["REST API"]
    Arch --> MCP["MCP Server"]
    Arch --> LIB["Go Library"]
    Arch --> ASTRO["Astro Full-Stack"]

    CLI & API & MCP & LIB & ASTRO --> Addons["Modular Add-ons"]
    Addons --> M1["antigravity (Agent Skills & Rules)"]
    Addons --> M2["backlog (Pure SQLite DAG)"]
    Addons --> M3["ollama (Local LLM Tiering)"]
    Addons --> M4["ci (GitHub Actions & Triage)"]
    Addons --> M5["docs (Material for MkDocs)"]
    Addons --> M6["ctxsec (Security Hypervisor)"]
Hold "Alt" / "Option" to enable pan & zoom
Add-on Flag Description Generated Assets
--with-antigravity Antigravity AI tooling .agents/skills/, AGENTS.md, GEMINI.md, mcp_config.json
--with-backlog SQLite task DAG ledger pkg/backlog, db/backlog/backlog.sqlite, CLI subcommands
--with-ollama Local LLM tiering ($0.00) pkg/ollama, multi-model fallback routines
--with-devcontainer Hermetic environment .devcontainer/Dockerfile, devcontainer.json
--with-docs Technical documentation mkdocs.yml, docs/, deployment workflow
--with-ci GitHub Actions CI/CD Continuous testing, linting, and Gemini triage
--with-astro Astro + Cloudflare Pages web/ (astro.config.mjs, Tailwind v4, Wrangler)

💻 CLI Invocation Examples

./bin/gosec init
Launches an interactive prompt guiding you through project name, module path, archetype selection, and feature toggles.

./bin/gosec init my-service \
  --archetype=api \
  --module=github.com/myorg/my-service \
  --with-antigravity \
  --with-backlog \
  --with-ci
./bin/gosec init my-app \
  --archetype=astro \
  --module=github.com/myorg/my-app
cd my-app/web
npm install
npm run build

🔒 Runtime Protection with ctxsec.io

All microservices and MCP servers generated by gosec can be seamlessly wrapped with ctxsec.io to enforce declarative security policies and prevent unauthorized tool execution.