Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills/pegma/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ decision:
Index (short): `https://pegma.dev/llms.txt`
Human stack pages: `https://pegma.dev/stack`
Recipe index: `https://pegma.dev/examples`
Environment runbooks: `https://pegma.dev/runbooks`
This skill (judgment only): `https://pegma.dev/skill.md`
Optional MCP (same catalog facts): `https://pegma.dev/api/mcp`

Expand Down
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
.git
.astro
dist
coverage
.wrangler
worker/.dev.vars
*.tsbuildinfo
.env
.env.*
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ retiregolden.org, runs the stack on Azure).
Identity and its Authorization adapter remain fail-closed injected ports
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
until their first exact public versions can replace the release boundary in
`worker/src/identity-runtime.ts`.
- **Environment runbooks** for a synthetic Bench Ticket demo (email-code
identity, sessions, mail catcher, support desk, health):
[https://pegma.dev/runbooks](https://pegma.dev/runbooks).

## Local development

Expand Down
22 changes: 14 additions & 8 deletions docs/catalog/RECIPE_BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,20 @@ deferred).
| **capabilityTags** | `static_host` only (not bare `cloudflare` — host-tag alone must not select this scaffold) |
| **Fixture** | green — [`recipes/scaffold-cf-minimal/`](../../recipes/scaffold-cf-minimal/) |

### P7 — `support-queue-slice` (Bench Ticket)

| | |
| --- | --- |
| **Intent** | A fictional makerspace helpdesk (“Bench Ticket”) runs a small support-desk site with first-party email-code login, sessions, mail to a catcher, and ticket create/list/reply. |
| **Packages (published)** | `@pegma/identity`, `@pegma/sessions`, `@pegma/mail`, `@pegma/rate-limit`, `@pegma/health`, `@pegma/support-desk-*`, `@pegma/storage-core`, `@pegma/spine` |
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
| **Adapters** | memory (local Docker); `storage-cloudflare-d1`; `storage-azure-tables`; forthcoming `storage-dynamodb` |
| **Host must provide** | HTTP, cookies, injected Store, mail catcher, email-code secret |
| **Non-goals** | Auth0/Entra/Cognito, Stripe, production email, passkeys-required login |
| **Anti-patterns** | Treating Support Desk as hosted SaaS; giving Audit/Mail their own store |
| **requiresPublished** | identity, sessions, mail, rate-limit, health, support-desk, storage-core, spine, authorization-core |
| **Fixture** | green — [`recipes/bench-ticket/`](../../recipes/bench-ticket/) |
| **Runbooks** | `/runbooks` (Local Docker, Cloudflare, Azure, AWS) |

## Deferred (missing package or fixture)

Do not offer for production assembly until required packages are on npm and a
Expand All @@ -97,14 +111,6 @@ CI-tested fixture is green.
| **Blocks** | CI-tested synthetic fixture not yet built |
| **Anti-patterns** | Exactly-once claims; storing full payloads in the receipt ledger; ordering guarantees |

### D2 — `support-queue-slice` (when Support Desk packages are published)

| | |
| --- | --- |
| **Intent** | A fictional maker-space helpdesk (“Bench Ticket”) runs a composable support queue for web and email with permission-checked agents and outbox-backed mail. |
| **Blocks** | support-desk packages unpublished |
| **Anti-patterns** | Treating Support Desk as hosted SaaS; AI on ticket bodies before the host documents egress |

## Explicitly out of backlog (non-goals)

- Recipes that copy pegma.dev or retiregolden.org route maps, schemas, or ops topology
Expand Down
12 changes: 12 additions & 0 deletions evals/assembly-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,16 @@ export const ASSEMBLY_EVAL_CASES: readonly AssemblyEvalCase[] = [
mustNotRecommendSubstrings: ['password'],
mustSurfaceRefusalSubstrings: ['password'],
},
{
id: 'support-desk-email-code',
prompt:
'Small support desk with first-party email-code login. No Stripe, no Auth0, no passwords.',
capabilityTags: ['support_queue', 'accounts', 'email_codes'],
mustPrimaryRecipeId: 'support-queue-slice',
mustIncludePackageNames: [
'@pegma/identity',
'@pegma/support-desk-application',
],
mustNotRecommendSubstrings: ['stripe', 'auth0', 'password'],
},
];
43 changes: 23 additions & 20 deletions evals/assembly-eval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,28 @@ const EVAL_NPM: Record<string, string | null> = {
'@pegma/spine': '0.1.1',
'@pegma/storage-core': '0.4.0',
'@pegma/storage-azure-tables': '0.4.0',
'@pegma/storage-cloudflare-d1': '0.4.0',
'@pegma/storage-cloudflare-d1': '0.4.1',
'@pegma/storage-blobs': '0.1.0',
'@pegma/storage-azure-blob': '0.1.0',
'@pegma/storage-cloudflare-r2': '0.1.0',
'@pegma/storage-s3': '0.1.0',
'@pegma/authorization-contracts': '0.1.2',
'@pegma/authorization-core': '0.1.2',
'@pegma/authorization-policy': '0.1.2',
'@pegma/authorization-auth0': '0.1.2',
'@pegma/authorization-stripe': '0.1.2',
'@pegma/authorization-storage': '0.1.2',
'@pegma/authorization-tokens': '0.1.2',
'@pegma/authorization-identity': '0.1.2',
'@pegma/audit': '0.1.0',
'@pegma/support-desk-contracts': '0.1.0',
'@pegma/support-desk-core': '0.1.0',
'@pegma/support-desk-application': '0.1.0',
'@pegma/support-desk-templates': '0.1.0',
'@pegma/webhooks': '0.1.0',
'@pegma/sessions': '0.1.0',
'@pegma/mail': '0.1.0',
'@pegma/authorization-contracts': '0.4.0',
'@pegma/authorization-core': '0.4.0',
'@pegma/authorization-policy': '0.4.0',
'@pegma/authorization-auth0': '0.4.0',
'@pegma/authorization-entra': '0.4.0',
'@pegma/authorization-stripe': '0.4.0',
'@pegma/authorization-storage': '0.4.0',
'@pegma/authorization-tokens': '0.4.0',
'@pegma/authorization-identity': '0.4.0',
'@pegma/audit': '0.2.0',
'@pegma/support-desk-contracts': '0.1.1',
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
'@pegma/support-desk-core': '0.1.1',
'@pegma/support-desk-application': '0.1.1',
'@pegma/support-desk-templates': '0.1.1',
'@pegma/webhooks': '0.1.1',
'@pegma/sessions': '0.2.0',
'@pegma/mail': '0.1.1',
'@pegma/billing-core': '0.1.1',
'@pegma/billing-stripe': '0.1.1',
'@pegma/cache-core': '0.1.1',
Expand All @@ -58,13 +59,13 @@ const EVAL_NPM: Record<string, string | null> = {
'@pegma/flags-cloudflare-flagship': '0.1.1',
'@pegma/flags-flagd': '0.1.1',
'@pegma/flags-launchdarkly': '0.1.1',
'@pegma/identity': '0.1.0',
'@pegma/rate-limit': '0.1.0',
'@pegma/identity': '0.1.2',
'@pegma/rate-limit': '0.2.0',
'@pegma/logger-tee': '0.1.1',
'@pegma/logger-applicationinsights': '0.1.1',
'@pegma/logger-cloudflare': '0.1.1',
'@pegma/logger-datadog': '0.1.1',
'@pegma/health': '0.1.1',
'@pegma/health': '0.2.0',
};

async function compileEvalCatalog(): Promise<CompositionCatalog> {
Expand Down Expand Up @@ -93,6 +94,7 @@ describe('assembly eval harness (Phase 5)', () => {
'no-passwords',
'passkey-accounts-workers',
'static-brochure',
'support-desk-email-code',
].sort(),
);
});
Expand All @@ -116,6 +118,7 @@ describe('assembly eval harness (Phase 5)', () => {
expect(byId['passkey-accounts-workers']?.pass).toBe(false);
expect(byId['health-endpoint-only']?.pass).toBe(false);
expect(byId['no-passwords']?.pass).toBe(false);
expect(byId['support-desk-email-code']?.pass).toBe(false);
expect(report.passRate).toBeGreaterThan(0);
expect(report.passRate).toBeLessThan(1);
});
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"dev": "astro dev",
"build": "astro build",
"check": "astro check && tsc -p worker/tsconfig.json --noEmit && tsc -p recipes/tsconfig.json --noEmit",
"test": "vitest run --config vitest.config.ts && vitest run --config vitest.d1.config.ts",
"test": "vitest run --config vitest.config.ts && vitest run --config vitest.d1.config.ts && vitest run --config vitest.bench-ticket.config.ts",
"test:node": "vitest run --config vitest.config.ts",
"test:d1": "vitest run --config vitest.d1.config.ts",
"test:d1": "vitest run --config vitest.d1.config.ts && vitest run --config vitest.bench-ticket.config.ts",
"eval:assembly": "vitest run --config vitest.config.ts evals/assembly-eval.test.ts",
"preview": "astro preview",
"demo:bench-ticket": "tsx recipes/bench-ticket/host.ts",
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
"worker:dev": "wrangler dev -c worker/wrangler.jsonc",
"worker:deploy": "wrangler deploy -c worker/wrangler.jsonc",
"worker:tail": "wrangler tail pegma-dev-api",
Expand Down Expand Up @@ -50,6 +51,7 @@
"@cloudflare/vitest-pool-workers": "0.18.8",
"@types/node": "26.1.1",
"astro": "7.1.4",
"tsx": "^4.23.13",
"typescript": "^5.9.2",
"vitest": "4.1.10",
"wrangler": "^4.114.0"
Expand Down
59 changes: 37 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading