scaffold
Use when starting hyperflow in a new project, refreshing the .hyperflow/ cache, or installing auto-detection shims (AGENTS.md, CLAUDE.md). One-shot project setup; does not start the spec → scope → dispatch chain. Trigger with /hyperflow:scaffold, "init hyperflow", "set up hyperflow", "refresh hyperflow", "install hyperflow shims".
What this skill does
# Scaffold
One-shot project setup. Analyzes the codebase, builds the `.hyperflow/` cache, seeds the memory skeleton, and optionally installs detection shims for other AI tools. Does not start the spec → scope → dispatch chain — invoke `/hyperflow:spec` (or `/hyperflow:scope`) when you're ready for that.
## Step 1 — Analysis Cache
Check for `.hyperflow/` at project root.
**If absent — dispatch parallel searchers (single message, six Agent calls):**
| Label | File generated | Discovers |
|---|---|---|
| `Searcher — analyzing tech stack` | `profile.md` | Name, language, framework, build commands |
| `Searcher — mapping folder structure` | `architecture.md` | Dirs, patterns, routing, data flow |
| `Searcher — extracting conventions` | `conventions.md` | Naming, style, linting rules |
| `Searcher — scanning dependencies` | `dependencies.md` | UI lib, state, data fetching, DB, auth |
| `Searcher — auditing test setup` | `testing.md` | Runner, E2E, patterns, commands |
| `Searcher — reading git workflow` | `git-workflow.md` | Branches, commits, CI/CD, PR conventions |
See [project-analysis.md](references/project-analysis.md) for what each file captures.
**If present — staleness check:**
Compute SHA256 of tracked config files, compare against `.hyperflow/.checksums`. Refresh only stale files. Print `Refreshing — <comma-separated list of stale files>`.
**After analysis:**
- Write `.hyperflow/.checksums` (SHA256 of `package.json`, `tsconfig.json`, eslint/biome config, etc.)
- Append to `.gitignore` if `.hyperflow/` is not already excluded
## Step 2 — Memory Skeleton
Create `.hyperflow/memory/` if absent:
```
.hyperflow/memory/
├── doctrine.md ← copied from skills/hyperflow/DOCTRINE.md
├── index.md
├── learnings.md ← empty stub (populated by /hyperflow:dispatch wrap-up)
├── decisions.md
├── pitfalls.md
├── patterns.md
├── conventions.md
├── session-context.md ← [populated by session-start hook, NOT by scaffold]
└── archive/.gitkeep
```
**session-context.md — populated by the session-start hook, not scaffold:**
Scaffold creates the empty `.hyperflow/memory/` directory; it does NOT write `session-context.md`. That file is generated at the start of each Claude Code session by `hooks/session-start`, which concatenates `.hyperflow/profile.md`, `architecture.md`, and `conventions.md` into a single bundled file. This enables Pattern L3 (session-cached context): lean workers read one bundled file instead of three separate source files.
**Limit:** mid-session changes to `profile.md`, `architecture.md`, or `conventions.md` won't propagate to `session-context.md` until the next session-start. Workers can still `Read` the source files directly if they suspect staleness.
**doctrine.md generation (idempotent):**
- Source: `skills/hyperflow/DOCTRINE.md` (canonical orchestration rules)
- If `.hyperflow/memory/doctrine.md` is absent — copy it.
- If it already exists — compare modification timestamps (or SHA256) against the source. If the source is newer, re-copy. If up-to-date, skip and print `doctrine.md — checksum match`.
- This enables Pattern P5 (lean worker prompts): workers `Read` doctrine on demand instead of receiving it inlined in every prompt.
**learnings.md (idempotent):**
- If absent — create as an empty stub with a single heading `# Learnings` and the line `<!-- populated by /hyperflow:dispatch wrap-up -->`.
- If it already exists with content — do NOT overwrite. Accumulated learnings from prior runs must be preserved across refreshes.
**Other stubs** — if any of `index.md`, `decisions.md`, `pitfalls.md`, `patterns.md`, `conventions.md` are absent, create them as an empty stub: one H1 matching the filename (title-cased) and the line `<!-- to be populated by future runs -->`.
**Lean prompt note:** scaffold has now populated the memory skeleton. Run `/hyperflow:dispatch` and workers will use `skills/hyperflow/worker-prompt-lean.md` by default; pass `--thorough` to fall back to the full inlined template.
**Migration:** If `~/.claude/hyperflow-memory.md` exists, migrate entries matching the current project path into the appropriate memory files. Tag migrated entries `[migrated]`.
## Step 3 — Detection Shims
Offer to run `scripts/setup-detection.sh --tools all` to generate AGENTS.md and CLAUDE.md.
Supported tools: `claude-code` (writes CLAUDE.md), `opencode` / `agents` (writes AGENTS.md), `all` (both).
Flags — `--tools <all|claude-code|opencode|agents>`, `--force`, `--dry-run`.
Default — `--tools all`. Ask once via `AskUserQuestion` if the user wants to skip any tool.
## Step 4 — Summary
Print what was created, skipped, and migrated (elegant style, no icons):
```
Hyperflow init complete
Created .hyperflow/{profile,architecture,conventions,dependencies,testing,git-workflow}.md
Created .hyperflow/.checksums
Created .hyperflow/memory/doctrine.md — copied from skills/hyperflow/DOCTRINE.md
Created .hyperflow/memory/{index,learnings,decisions,pitfalls,patterns,conventions}.md
Created .hyperflow/memory/session-context.md — populated by hooks/session-start (not scaffold)
Skipped .gitignore entry — already present
Migrated 3 entries from ~/.claude/hyperflow-memory.md
Shims AGENTS.md, CLAUDE.md
Memory skeleton populated — workers will use lean prompts (skills/hyperflow/worker-prompt-lean.md) by default.
Pass --thorough to /hyperflow:dispatch to fall back to the full inlined template.
```
## Hand-off
This skill **does not** auto-chain. Init is project setup, not feature work. When the user wants to start a feature, they invoke `/hyperflow:spec` (for ambiguous scope) or `/hyperflow:scope` (for clear specs).
## Doctrine
Full rules in [DOCTRINE.md](references/DOCTRINE.md). Output style in [output-style.md](references/output-style.md).
## Overview
`/hyperflow:scaffold` is one-shot project setup. It analyzes the codebase via 6 parallel Sonnet searchers, builds the `.hyperflow/` cache (profile, architecture, conventions, dependencies, testing, git-workflow), seeds the memory skeleton, and optionally writes detection shims (CLAUDE.md for Claude Code, AGENTS.md for OpenCode). Does not start the spec → scope → dispatch chain — invoke `/hyperflow:spec` (ambiguous scope) or `/hyperflow:scope` (clear spec) when ready.
## Prerequisites
- Git repository (recommended for tag detection + git-workflow analysis; degrades gracefully if absent).
- Write access to the project root for `.hyperflow/` creation.
- For migration only: existing `~/.claude/hyperflow-memory.md` from a prior global install.
## Instructions
Numbered steps are in [Step 1 — Analysis Cache](#step-1--analysis-cache) through [Step 4 — Summary](#step-4--summary) above. Summary:
1. Check for `.hyperflow/` at project root; if absent, dispatch 6 parallel searchers (single message) to produce profile.md, architecture.md, conventions.md, dependencies.md, testing.md, git-workflow.md.
2. If present, recompute SHA256 checksums and refresh only stale files.
3. Create `.hyperflow/memory/` skeleton: copy `skills/hyperflow/DOCTRINE.md` → `doctrine.md` (idempotent — re-copy only if source is newer); create `learnings.md` empty stub (skip if content exists); create `index.md`, `decisions.md`, `pitfalls.md`, `patterns.md`, `conventions.md` stubs if absent.
4. Migrate matching entries from legacy `~/.claude/hyperflow-memory.md` if found.
5. Offer `scripts/setup-detection.sh --tools all` to write CLAUDE.md + AGENTS.md.
6. Print summary of created / skipped / migrated artifacts.
## Output
See the summary block under [Step 4 — Summary](#step-4--summary) above. Format: plain English, em-dash separator, sections for Created / Skipped / Migrated / Shims. No icons.
Step 2 generates the following files under `.hyperflow/memory/`:
| File | Source | Idempotence |
|---|---|---|
| `doctrine.md` | Copied from `skills/hyperflow/DOCTRINE.md` | Re-copied if source is newer; skipped if checksum matches |
| `learnings.md` | Empty stub (`# Learnings` heading) | Never overwRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.