-
Folder structure at products/<slug>/:
products/<slug>/
├── product.config.json
├── CLAUDE.md
├── scope.md
├── prd.md
├── metrics.md (skeleton, fill in via metric-framework-designer later)
├── SETUP.md (the one-time setup checklist)
├── README.md
├── decisions/
│ └── 0001-scaffold.md
├── validation/
│ └── README.md (the validation ledger — gates `bun run check-validation`)
├── interviews/
│ └── README.md
├── launch/
│ └── README.md
├── analytics/
│ └── README.md
└── (NO code/ here — see step 2: product code lives in its OWN sibling repo)
Layout rule (hard): products/<slug>/ in Hamzaish is metadata only
(markdown + product.config.json + the folders above). A product's actual code
lives in its own repo outside Hamzaish, registered in gitignored
code-paths.local.json. Never create products/<slug>/code/ (or src/, app/,
dist/…) with real source — Hamzaish is always public and nothing excludes it from
commits. bun run check-product-layout enforces this; see
brain/anti-patterns/product-code-inside-factory-repo.md.
-
Code repo — a SIBLING repo, NOT inside Hamzaish. Create the product's code in
its own directory outside this repo (e.g. ~/Claude/<Name>), git init it there
(no remote yet if held local → add a .no-auto-push marker), then register it:
add "<slug>": "/abs/path/to/<Name>" to code-paths.local.json (gitignored) and
keep code_path: null in product.config.json (path-portability rule). For a web
product, seed that sibling repo from templates/product-starter-nextjs/ with the
name, slug, and one-liner substituted into:
package.json (name)
.env.example (NEXT_PUBLIC_APP_NAME)
src/app/(marketing)/page.tsx (hero copy)
src/app/layout.tsx (default metadata)
next.config.mjs (if needed)
README.md
.gitleaks.toml, SETUP.md ({{PRODUCT_NAME}} / {{PRODUCT_SLUG}} placeholders)
.devcontainer/devcontainer.json ({{PRODUCT_NAME}} placeholder)
The starter is secure-by-default — the copy already brings .gitignore
(.env* ignored, !.env.example tracked), the committed .env.example
placeholder, the secret-scan.yml gitleaks workflow, .gitleaks.toml, the
.githooks/pre-commit hook, and a .devcontainer/ (Node + Bun) so builds run
in an isolated container instead of on the bare host. See "Secure-by-default"
below for the scaffold-time steps the template can't carry on its own.
-
product.config.json — the dashboard registry entry:
{
"slug": "<slug>",
"name": "<Title Case Name>",
"one_liner": "<one-liner>",
"created": "<ISO date>",
"stage": "idea",
"status": "scaffolded",
"code_path": null,
"aliases": [],
"analytics": {
"stripe_account_id": null,
"posthog_project_id": null,
"ga4_measurement_id": null,
"plausible_domain": null,
"sentry_org": null,
"sentry_project": null,
"gsc_property": null,
"ahrefs_target": null
},
"links": {
"github": null,
"prod_url": null,
"staging_url": null
}
}
-
CLAUDE.md in the product folder — uses templates/claude-md-template.md with substitutions.
-
scope.md — uses templates/scope-doc-template.md, with Claude's first-pass fill from the one-liner. User edits in next session.
-
PRD skeleton — uses templates/prd-template.md, Claude pre-fills sections that can be inferred from the one-liner; rest are clearly marked TODO.
-
SETUP.md — the exact 11-step setup checklist from stack/analytics-stack.md, with the product's specific URLs for service signups pre-filled.
-
First decision log entry in decisions/0001-scaffold.md:
## YYYY-MM-DD — Scaffolded
Created via /scaffold. One-liner: "<one-liner>".
Stage: idea. Stack: default per stack/tech-stack.md.
Next: complete SETUP.md, run /validate <slug>.
Every scaffolded product ships secure from commit zero. Most of this rides in via
the template copy; a few steps must run at scaffold time.