@agenticprimitives/create-app
v0.0.0-alpha.7
Published
The Developer Kit generator (spec 398 §10.3, spec 399 §3.6): `create-app <dir> --template product-repo` writes a product repository — pnpm workspace, exact @agenticprimitives/* pins, agentic.lock.json, `ap doctor` + `ap test` CI, a nightly live-gates work
Maintainers
Readme
@agenticprimitives/create-app
Part of Agentic Primitives — the open-source trust substrate for agentic applications: identity that can sign, authority checked at act time, evidence the owner carries. Developer kit · All packages
npx @agenticprimitives/create-app my-agent-app --template home-client # the first app: a client of the person's agent
cd my-agent-app && pnpm install && npx ap doctor && pnpm dev # Connect with your Home → ask → an act parks for HER signature
npx @agenticprimitives/create-app my-product --template product-repo --pin 1.0.0-alpha.24
cd my-product && pnpm install && npx ap doctor--template home-client — the Developer Kit's first app (spec 398 §10.1)
A Next.js client of the person's own agent through her Home (spec 397): the app registers itself at her Home MCP
(RFC 7591 — no operator step; localhost redirects are accepted), sends her to her Home to connect (OAuth 2.1 + PKCE),
holds an opaque bearer bound to /mcp sealed in an httpOnly cookie, and asks her agent as her. A read answers under
her standing; an act comes back authority_required with the page on her Home where she signs — the app never
collects a signature. pnpm verify runs the two acts live against a development estate's demo person;
scripts/verify-devkit-starter.mts in Ring 0 is the G2 exit: generate → install from the registry → doctor → typecheck
→ tests → build → the two acts, from a clean directory. Files: src/lib/home-agent.ts (the whole protocol, no
dependency), src/lib/server.ts, app/api/{connect,callback,ask,me,disconnect}, app/page.tsx,
scripts/verify-two-acts.ts, README.md, the projected AGENTS.md/CLAUDE.md/.cursor/rules, .mcp.json (the
Developer MCP), agentic.lock.json pinning @agenticprimitives/devkit alone. If the generator is newer than the pinned
devkit, npx ap doctor --rules --write re-projects the rules with the pinned corpus (the doctor names the drift).
Writes a product repository the way spec 399 §3.6 describes it — the shape ap-discovery, ap-home and
ap-naming are created from, never a copy of the monorepo root:
| Written | Purpose |
| --- | --- |
| package.json, pnpm-workspace.yaml, .npmrc, tsconfig.base.json | pnpm workspace over apps/* + examples/*; strict peers; exact @agenticprimitives/* pins |
| agentic.lock.json | the coherent pin set, the rules-source digests, the doctor config, the template revision |
| AGENTS.md, CLAUDE.md, .cursor/rules/*.mdc | projected from the pinned rules source (edit the source, run ap doctor --rules --write) |
| .github/workflows/ci.yml | typecheck · test · ap doctor · ap doctor --rules |
| .github/workflows/live-gates-nightly.yml | ap test --live-gates live-gates.json + ap conform a2a\|mcp against the shadow deployment |
| live-gates.json | the gates ledger (spec 392 shape), empty until the first verify script moves in |
| wrangler.example.toml | the env layout: env-a / env-b live (Ring 0 deploys until the cut), env-a-split shadow (this repo) |
| scripts/set-cloudflare-secrets.sh | per-env secrets from a gitignored .secrets.<env> file, never echoed |
| DEPLOYER.md, docs/MOVED.md | deployer of record per app + env; the text the cut PR leaves in Ring 0 |
Options: --name <kebab> (defaults to the directory name), --pin <exact version> (defaults to the generating
devkit's version; resolve a dist-tag afterwards with ap upgrade --pin <tag>), --json.
Exit codes: 0 written · 2 usage (non-empty dir, bad name, bad pin, unknown template) · 3 error.
The template carries no hostname, no vertical vocabulary and no key (ADR-0021): every deployment-specific value
is a <placeholder> the product fills in.
