From shipyard
Initializes Shipyard project by creating or resetting .shipyard/ directory, detecting brownfield/greenfield status, and collecting workflow preferences via interactive prompts. Supports --fresh flag.
How this command is triggered — by the user, by Claude, or both
Slash command
/shipyard:init [--fresh] — start over with a fresh .shipyard/ directoryThe summary Claude sees in its command listing — used to decide when to auto-load this command
# /shipyard:init - Project Initialization You are executing the Shipyard initialization workflow. Follow these steps precisely and in order. <prerequisites> ## Step 1: Check Existing State Check if a `.shipyard/` directory already exists in the current project root. - **If it exists AND `.shipyard/config.json` exists:** Read existing config.json values. These become the pre-filled defaults shown in Step 3 (in parentheses after each option). Proceed to Step 2 — the user may want to change any or all settings. - **If `--fresh` flag is provided:** Require explicit confirmation from the u...
You are executing the Shipyard initialization workflow. Follow these steps precisely and in order.
Check if a .shipyard/ directory already exists in the current project root.
If it exists AND .shipyard/config.json exists: Read existing config.json values. These become the pre-filled defaults shown in Step 3 (in parentheses after each option). Proceed to Step 2 — the user may want to change any or all settings.
If --fresh flag is provided: Require explicit confirmation from the user before proceeding. If confirmed, rename .shipyard/ to .shipyard-archive-{YYYY-MM-DD}/ and create a fresh .shipyard/ directory (no pre-filled defaults). If not confirmed, stop.
If .shipyard/ does not exist: Create the .shipyard/ directory and proceed to Step 2.
Determine whether this is a brownfield (existing source code) or greenfield (empty/new project) by checking for source files and package manifests (e.g., package.json, go.mod, Cargo.toml, requirements.txt, *.py, *.ts, *.go, *.rs, etc.).
Also check if docs/codebase/ exists and contains .md files. If it does, this means a previous /shipyard:map was run and committed — store this as detected_codebase_path = "docs/codebase" for use in Step 4.
This is used to tailor next-steps guidance in Step 5 and to set a smart default for codebase_docs_path — no codebase mapping or analysis is performed.
Collect workflow preferences from the user using three AskUserQuestion calls. Each call stays within the 4-question limit. Wait for the user's answers before proceeding to the next batch.
Use AskUserQuestion with these 3 questions:
Interaction style — "Do you prefer interactive mode or autonomous mode?"
Interactive (Recommended) — Approve each phase before execution. Safer for unfamiliar codebases.Autonomous — Execute full roadmap with checkpoints. Faster for well-defined projects.Git tracking — "How should Shipyard create commits?"
Per task (Recommended) — Atomic commit after each completed task. Easy to review and revert.Per phase — Batch all task changes into one commit per phase. Cleaner history.Manual — Shipyard won't commit. You control all git operations.Review depth — "How thorough should review gates be?"
Detailed (Recommended) — Two-stage review (spec compliance + code quality) between build steps.Lightweight — Quick verification only. Faster but catches fewer issues.Use AskUserQuestion with these 4 questions:
Security auditing — "Should Shipyard run a security audit after each phase build?"
Yes (Recommended) — OWASP checks, secrets detection, dependency vulnerabilities. Recommended for production projects.No — Skip security auditing. You can still run /shipyard:audit manually.Code simplification — "Should Shipyard check for duplication and complexity after each phase?"
Yes (Recommended) — Detects AI-generated bloat, dead code, and over-engineering. Recommended for AI-heavy workflows.No — Skip simplification review. You can still run /shipyard:simplify manually.IaC validation — "Should Shipyard validate infrastructure-as-code files (Terraform, Ansible, Docker)?"
Auto (Recommended) — Validate only when IaC files are detected in the changeset.Always — Run IaC validation on every phase regardless.Never — Skip IaC validation entirely.Documentation generation — "Should Shipyard generate documentation after each phase build?"
Yes (Recommended) — Auto-generate and update docs after each phase. Keeps documentation current.No — Skip documentation generation. You can still run /shipyard:document manually.Use AskUserQuestion with these 3 questions:
Codebase docs location — "Where should Shipyard store codebase analysis docs?"
.shipyard/codebase (Recommended) — Keeps analysis in the local .shipyard/ directory (gitignored by default).docs/codebase — Stores in the project's docs/ directory so analysis is committed and shared with the team.
If a docs/codebase/ directory with .md files was detected in Step 2, note this to the user and default to docs/codebase.Model routing — "Which model routing strategy should Shipyard use for its agents?"
Default routing (Recommended) — Haiku for validation, Sonnet for building/review/planning/auditing/simplification/documentation/mapping, Opus for architecture/debugging. Balances cost and quality.All Sonnet — Use Sonnet for everything. Good balance of speed and capability.All Opus — Use Opus for everything. Maximum quality, highest cost.Context loading — "How much project context should Shipyard load at session start?"
Auto (Recommended) — Adjusts based on current state (minimal when idle, full during execution).Minimal — Always load minimal context. Fastest startup, less awareness.Full — Always load everything including codebase docs. Slowest startup, maximum awareness.After collecting all answers, write the following files:
Write .shipyard/config.json with the user's choices. Map answers to config keys:
interaction_mode ("interactive" / "autonomous"), git_strategy ("per_task" / "per_phase" / "manual"), review_depth ("detailed" / "lightweight")security_audit (true / false), simplification_review (true / false), iac_validation ("auto" / true / false), documentation_generation (true / false), plan_critique (true / false)codebase_docs_path (".shipyard/codebase" / "docs/codebase"), model_routing (object — see Model Routing Protocol in docs/PROTOCOLS.md for the full key set and defaults per strategy), context_tier ("auto" / "minimal" / "full")Also include: created_at (ISO timestamp), version ("1.3").
Use defaults from docs/PROTOCOLS.md for any unanswered or skipped fields: security_audit: true, simplification_review: true, iac_validation: "auto", documentation_generation: true, plan_critique: true, codebase_docs_path: ".shipyard/codebase", context_tier: "auto".
Follow State Update Protocol (update .shipyard/STATE.json and .shipyard/HISTORY.md via state-write.sh; see docs/PROTOCOLS.md) -- create initial state:
Project initializedgit add .shipyard/
git commit -m "shipyard: initialize project"
Display contextual guidance based on brownfield/greenfield detection from Step 2:
Brownfield (existing codebase):
Project initialized! Your next step:
Run
/shipyard:map— This analyzes your codebase so Shipyard understands your project's stack, architecture, conventions, and concerns. It takes a few minutes and everything after this will be better for it.After mapping, Shipyard will guide you to the next step.
Greenfield (new project):
Project initialized! Your next step:
Run
/shipyard:brainstorm— This walks you through a requirements conversation to define what you're building, your goals, constraints, and success criteria. Shipyard will capture everything into a project definition.Already have a spec? Use one of these instead:
/shipyard:import-spec <feature-path>— import from a spec-kit feature directory/shipyard:import-spec-file <path/to/spec.md>— import a handwritten or freeform spec fileAfter brainstorming or importing, Shipyard will guide you to the next step.
npx claudepluginhub lgbarn/shipyard --plugin shipyard/project-initInitializes new projects with git repository, Makefile, pre-commit hooks, GitHub CI/CD workflows, and language-specific tooling for Python, Rust, or TypeScript.
/setupRuns interactive setup wizard: installs plugin files from GitHub, creates .env config, analyzes tech stack, generates PROJECT.md, configures hooks.
/setupScaffolds project and initializes Conductor environment, guiding through discovery of new/existing projects, product definition, tech stack selection, code styles, workflows, and initial track generation.
/startInitializes a new project repository with stack definition, project structure, and team configuration. Interviews the founder to determine repo type (hub or service) and tech stack.
/initInitializes beads issue tracking database in current directory with optional prefix (defaults to dir name). Shows DB location, prefix, workflow overview, next steps; displays stats if already set up.
/initInitializes guided UI design for dashboards, apps, and tools. Assesses intent, proposes styles with rationale, builds components, and offers to save patterns.