/synthex:initfrom synthex
Set up the Synthex plugin configuration for a project. This command scaffolds the configuration file and document directories needed for the plugin to operate.
Claude never picks this command on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /synthex:init still runs it.
Set up the Synthex plugin configuration for a project. This command scaffolds the configuration file and document directories needed for the plugin to operate.
| Parameter | Description | Default | Required |
|---|---|---|---|
config_path | Where to create the config file | .synthex/config.yaml | No |
.synthex/config.yaml (or custom path).gitignore to exclude the worktrees directory (.claude/worktrees/) if not already present.worktreeinclude so Claude Code copies env files (e.g., .env, .env.local) into every new worktreedocs/reqs/, docs/plans/, docs/specs/, docs/specs/decisions/, docs/specs/rfcs/, docs/runbooks/, docs/retros/) if they don't existCheck if @{config_path} already exists.
Run plugins/synthex/scripts/init-scaffold.sh (resolved from the installed plugin root — Claude Code: bash "${CLAUDE_PLUGIN_ROOT}/scripts/init-scaffold.sh" "@{config_path}") as ONE Bash call. On other hosts (Codex, Gemini CLI, OpenCode, Grok, Hermes), or if ${CLAUDE_PLUGIN_ROOT} is empty, use the installed plugin root: plugin_root from .synthex/state.json, else the directory two levels above the wrapper you were loaded from.
The script (FR-HM26) does the mechanical work this step and Step 8 used to describe by hand, in one call:
config/defaults.yaml to @{config_path} (default .synthex/config.yaml) byte-for-byte — no transformation. Idempotent: an existing config file is left untouched by this call. If Step 1's "reset to defaults" choice was picked, re-run with a trailing --force to overwrite it.git log) and writes the majority-vote result to git.commit_convention in @{config_path} (one of conventional, issue-key, gitmoji, plain, or auto when no pattern reaches a 60% majority). Prints Detected commit convention: <value> (from <N> commits). This runs on every invocation (not gated by idempotency), so re-running init re-samples history. The scripts/commit-lint.sh PreToolUse hook only lints when this key is explicitly conventional.It checks writability before writing and exits non-zero with a clear message if a target directory can't be written to (e.g. a read-only sandbox). Print its stdout/stderr to the user verbatim — it reports exactly what it created. The plugin's config/defaults.yaml stays read-only; the script never writes to it, and never takes it as anything but a read source.
Fallback (no shell tool, or the script is missing): use the Read tool to load the plugin's config/defaults.yaml and the Write tool to create @{config_path} (skip it if the file exists, unless "reset to defaults" was chosen), then create the Step 8 directories. For the commit-convention detection, read up to 50 subjects from git log (whatever tool the host offers for running git), classify each against Conventional Commits (^(feat|fix|perf|refactor|revert|build|ci|chore|docs|style|test)(\([^)]+\))?!?:), an issue-key prefix (e.g. PROJ-1234: ... or [PROJ-1234] ...), or a gitmoji shortcode (^:[a-z0-9_+-]+:); if one category reaches 60% or more, write that value to git.commit_convention, otherwise write auto. Print the same Detected commit convention: <value> (from <N> commits) line. Do NOT use cp, cat >, sed -i, tee, or any shell command that takes the defaults path as an argument: Claude Code's permission engine flags both paths of cp, and an argument-order slip could overwrite the plugin's template.
FR-HM29 (D12): detect the four project facts below and write them to .synthex/facts.md, each under its own anchor with an inline freshness-rule comment. This is model work (detection reads the repo directly), not a script — there is nothing here a zero-token script does more simply.
| Fact | Anchor | Freshness rule | How to detect |
|---|---|---|---|
commit_convention | #commit-convention | Re-verify when HEAD has moved more than 50 commits past recorded_sha | Read the git.commit_convention value Step 2 just wrote to @{config_path} (FR-HM27) |
test_runner (+ coverage command) | #test-runner | Re-verify when package.json or pytest.ini mtime is newer than recorded_at | Inspect package.json scripts/devDependencies, pytest.ini, vitest.config.*, jest.config.* |
frontend_framework | #frontend-framework | Same rule as test_runner | Inspect package.json dependencies for React/Vue/Angular/Svelte, or @docs/specs/frontend.md |
spec_index (path glob to spec file map) | #spec-index | Re-verify when docs/specs mtime is newer than recorded_at | Glob docs/specs/**/*.md and record a path → title map |
Write .synthex/facts.md with the Write tool in this format (omit a fact's section entirely if it can't be detected — never write a guess):
# Project Facts
Auto-generated by `/synthex:init`. Commands read this file first; if a fact
is missing or stale per its freshness rule, they fall back to detecting it
directly, the same way they did before this file existed.
## commit_convention {#commit-convention}
<!-- freshness: re-verify when HEAD is >50 commits past recorded_sha -->
recorded_sha: <sha>
value: conventional | issue-key | gitmoji | plain | auto
## test_runner {#test-runner}
<!-- freshness: re-verify when package.json or pytest.ini mtime > recorded_at -->
recorded_at: <ISO-8601 timestamp>
runner: vitest
coverage_command: npx vitest run --coverage
## frontend_framework {#frontend-framework}
<!-- freshness: re-verify when package.json or pytest.ini mtime > recorded_at -->
recorded_at: <ISO-8601 timestamp>
value: react | vue | angular | svelte | none
## spec_index {#spec-index}
<!-- freshness: re-verify when docs/specs mtime > recorded_at -->
recorded_at: <ISO-8601 timestamp>
paths:
- docs/specs/foo.md: "Foo Spec"
Print Wrote <N> facts to .synthex/facts.md, where <N> is the count of fact sections actually written (0-4).
Prompt the user to choose how many parallel tasks Synthex should run. This value controls implementation_plan.concurrent_tasks and next_priority.concurrent_tasks in the config file.
Detect the number of logical CPUs on the machine using the appropriate system command:
| Platform | Command |
|---|---|
| macOS | sysctl -n hw.ncpu |
| Linux | nproc |
| Windows (PowerShell) | $env:NUMBER_OF_PROCESSORS |
Fallback: If CPU detection fails for any reason, default to 12.
Store the detected CPU count as cpus.
Compute the following preset values:
| Option | Value | Description |
|---|---|---|
| Yolo | cpus | Use all available CPUs — maximum parallelism |
| Aggressive | max(floor(cpus * 0.75), 8) | High parallelism with headroom for system processes. If CPU detection failed, use 8. |
| Default | 3 | Conservative — works well on any machine |
Use the AskUserQuestion tool to present the options. The question should be formatted as:
How many parallel tasks should Synthex run?
This controls how many tasks execute concurrently during planning and execution (e.g.,
next-priority,write-implementation-plan). Higher values speed up work but use more system resources.
- Yolo ({cpus}) — All CPUs, maximum parallelism
- Aggressive ({aggressive_value}) — 75% of CPUs, leaves headroom
- Default (3) — Conservative, works on any machine
Or type a custom number.
Where {cpus} and {aggressive_value} are the computed values from step 3b.
The response must resolve to a positive integer. Apply these rules:
If the user picks an option by number (e.g., "1", "2", "3") or name (e.g., "yolo", "aggressive", "default"), resolve it to the corresponding integer value.
If the user types a plain integer (e.g., "6"), use that value directly.
If the response is NOT a valid positive integer and cannot be resolved to one, re-ask using AskUserQuestion:
That doesn't look like a valid number.
concurrent_tasksmust be a positive integer (e.g., 3, 8, 16). Please enter a number or pick one of the options above.
Repeat validation until a valid positive integer is obtained. Do NOT proceed until you have a valid integer.
Replace both concurrent_tasks values in the config file at @{config_path}:
implementation_plan.concurrent_tasks — set to the chosen valuenext_priority.concurrent_tasks — set to the chosen valueDelegate to the /synthex:configure-multi-model wizard at plugins/synthex/commands/configure-multi-model.md. Read that file and follow Steps 1a–1d (Detection Scan, Surface Three Options, Data-Transmission Warning, Apply the Chosen Option) inline as part of init. Skip Step 0 (re-entry check) — init always invokes the wizard in fresh-configuration mode.
Check if .gitignore exists in the project root. Ensure it contains entries for five synthex-managed paths:
.claude/worktrees by default, or the value from worktrees.base_path in the config file)..synthex/state.json) — per FR-UO24, this file is per-developer/per-clone and must not be committed..synthex/loops/) — per D-NL14, loop state is per-developer/per-clone (each loop is per-session and includes a session_id)..synthex/facts.md) — per FR-HM29 (D12), facts carry recorded SHAs and mtimes that differ per clone, so it is not committed..synthex/config.local.yaml) — one developer's overrides for this repo; the shared .synthex/config.yaml is the committed one.For each entry:
.gitignore exists and does NOT contain the path: Append it..gitignore exists and already contains the path: Do nothing for that entry..gitignore does not exist: Create it.Concretely, the resulting block to append (omitting any lines already present) is:
# Synthex worktrees (parallel task execution)
.claude/worktrees/
# Synthex per-developer state (upgrade-nudge tracking)
.synthex/state.json
# Synthex native-looping state (per-session, per-developer)
.synthex/loops/
# Synthex cached project facts (per-clone SHAs and mtimes; FR-HM29)
.synthex/facts.md
# Synthex project-local config (one developer's overrides for this repo)
.synthex/config.local.yaml
.worktreeincludeClaude Code's built-in worktree support (claude --worktree, subagent isolation: worktree) creates a fresh checkout that does NOT include gitignored files like .env. A .worktreeinclude file at the project root tells Claude Code which gitignored files to copy into each new worktree, using .gitignore syntax. Only files that both match a pattern AND are gitignored get copied — tracked files are never duplicated.
Check if .worktreeinclude exists in the project root.
If it does NOT exist: Use the Write tool to create it with the following starter content:
# Files copied into every Claude Code worktree (--worktree, subagent isolation, desktop parallel sessions).
# Syntax matches .gitignore. Only files that both match here AND are gitignored are copied.
# Add anything a fresh checkout needs: env files, local credentials, generated config not in source control.
.env
.env.local
If it already exists: Do not overwrite or modify it. Inform the user briefly: ".worktreeinclude already exists — left unchanged."
The file is committed to the repo so the whole team benefits from the same worktree-population behavior. Mention this in the confirmation step (Step 9).
After the configuration scaffolding is in place, ask the user whether they'd like to star the Lumenai marketplace repository on GitHub. Stars help more developers find the project — which means more eyeballs for new features and bug fixes.
Delegate to the /synthex:star command at plugins/synthex/commands/star.md. Read that file and follow Steps 2 and 3 (Ask the user → Apply the user's choice) inline as part of init. Skip Step 1 (the state-existence check) — init has already ensured .synthex/ exists. If the user picks "Maybe later", do nothing extra; the upgrade-nudge hook will surface the prompt again on the next version bump.
Already done — the Step 2 script call (init-scaffold.sh) created these directories if they didn't already exist:
docs/reqs/ — Product requirements documentsdocs/plans/ — Implementation plansdocs/specs/ — Technical specificationsdocs/specs/decisions/ — Architecture Decision Records (ADRs)docs/specs/rfcs/ — Requests for Comments (RFCs)docs/runbooks/ — Operational runbooksdocs/retros/ — Retrospective documentsNo action needed here; this step is a no-op kept for numbering continuity with Step 9's confirmation output. Do NOT create any files inside these directories — just the directories, and only via the Step 2 script (never ad hoc).
Inform the user what was created and provide guidance:
Synthex initialized for this project.
Created:
.synthex/config.yaml — Project configuration (concurrent_tasks: {chosen_value})
.synthex/facts.md — Cached project facts (Wrote {N} facts to .synthex/facts.md)
.gitignore — Added worktrees path (if not present)
.worktreeinclude — Env files copied into new Claude Code worktrees (if not present)
docs/reqs/ — Product requirements (PRDs)
docs/plans/ — Implementation plans
docs/specs/ — Technical specifications
docs/specs/decisions/ — Architecture Decision Records (ADRs)
docs/specs/rfcs/ — Requests for Comments (RFCs)
docs/runbooks/ — Operational runbooks
docs/retros/ — Retrospective documents
docs/reviews/ — Multi-model review audit artifacts (if multi-model enabled)
Next steps:
1. Review .synthex/config.yaml and customize for your project
2. Create your PRD with the `write-implementation-plan` command
3. Or write your PRD manually at docs/reqs/main.md
Available commands:
/write-implementation-plan — Transform a PRD into an implementation plan
/next-priority — Execute the next highest-priority tasks
/review-code — Multi-perspective code review
/write-adr — Create an Architecture Decision Record
/write-rfc — Create a Request for Comments
/test-coverage-analysis — Analyze test gaps, optionally write tests
/design-system-audit — Audit frontend for design system compliance
/retrospective — Facilitate a structured retrospective
/reliability-review — Assess operational readiness
/performance-audit — Full-stack performance analysis
Configuration guide:
- Add reviewers: Add entries to implementation_plan.reviewers
- Remove reviewers: Set enabled: false on any default reviewer
- Adjust rigor: Change review_loops.max_cycles or review_loops.min_severity_to_address
- Full reference: See .synthex/config.yaml for all settings
The configuration file controls how the Synthex plugin behaves in this project. Key settings:
By default, three sub-agents review every draft implementation plan:
| Reviewer | Focus |
|---|---|
| Architect | Technical architecture, feasibility, NFR coverage, missing technical tasks |
| Designer | Design tasks, UX impact, visual/interaction design clarity |
| Tech Lead | Task clarity, acceptance criteria, parallelizability, dependency accuracy |
Adding a reviewer (e.g., for a security-sensitive project):
implementation_plan:
reviewers:
- agent: architect
enabled: true
focus: "Technical architecture, feasibility, NFR coverage"
- agent: design-system-agent
enabled: true
focus: "Design tasks, UX impact, visual design clarity"
- agent: tech-lead
enabled: true
focus: "Task clarity, acceptance criteria, parallelizability"
- agent: security-reviewer
enabled: true
focus: "Security requirements, threat modeling coverage, compliance tasks"
Disabling a reviewer (e.g., for a backend-only project with no design needs):
implementation_plan:
reviewers:
- agent: design-system-agent
enabled: false
| Setting | Default | Description |
|---|---|---|
review_loops.max_cycles | 2 | Global max review loop iterations (all commands) |
review_loops.min_severity_to_address | high | Global minimum severity that must be resolved |
implementation_plan.review_loops.max_cycles | 3 | Per-command override for implementation plans |
| Setting | Default | Description |
|---|---|---|
documents.requirements | docs/reqs/main.md | Default PRD location |
documents.implementation_plan | docs/plans/main.md | Default plan location |
documents.specs | docs/specs | Technical specs directory |
documents.decisions | docs/specs/decisions | Architecture Decision Records |
documents.rfcs | docs/specs/rfcs | Requests for Comments |
documents.runbooks | docs/runbooks | Operational runbooks |
documents.retros | docs/retros | Retrospective documents |
The Synthex uses a convention over configuration approach:
.synthex/config.yaml is a project file, version-controlled alongside code, so the team shares the same configuration.Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
haiku7-day visitors to each command page
npx claudepluginhub bluminal/lumenai --plugin synthex22 commands in this plugin
/cancel-loopCancel one or all native-looping loopsMark a running loop as cancelled. The cancel is **polled at the iteration boundary** by the looping command (FR-NL31) — a loop that's mid-iteration when you cancel it will finish that iteration's work, then exit cleanly on the next boundary check. Worst case: one iteration delay./configure-multi-modelConfigure Multi-Model ReviewConfigure (or re-configure) multi-model review for this project. Multi-model review fans review prompts out to multiple LLM-family proposers (OpenAI, Google, xAI, local Ollama, etc.) and consolidates findings into a single attributed list. This catches errors a single model would miss./configure-teamsConfigure Standing Review PoolsConfigure (or re-configure) standing review pool routing for this project. Standing pools keep reviewers warm between reviews — useful when you run many code reviews per session and want to amortize the reviewer spawn cost./design-system-auditDesign System AuditAudit the frontend codebase for design system compliance — identifying hardcoded values, incorrect component usage, accessibility violations, and opportunities to improve visual consistency./dismiss-upgrade-nudgeDismiss Synthex Upgrade NudgeSilence the synthex SessionStart upgrade nudge for this project. After running this command, the one-line nudge that appears on session start (when synthex has been upgraded across a feature-introducing version threshold) will not print again — even on future sessions where the threshold check would otherwise fire./list-loopsList native-looping loops in this projectEnumerate every loop tracked in `<project>/.synthex/loops/` — running first, then recent terminal-status loops. Output is short, human-readable, and consistent (FR-NL32 / FR-NL33).Other plugins' commands for the same job