Initialize Shipyard for a new project or onboard to an existing codebase
Initializes project workflows by analyzing codebases, gathering requirements, and generating structured development roadmaps.
/plugin marketplace add lgbarn/shipyard/plugin install shipyard@shipyardYou 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.
.shipyard/ directory and proceed.Determine whether this is a brownfield (existing source code) or greenfield (empty/new project).
If this is a brownfield project (determined in Step 2), ask the user where to store codebase analysis documentation using AskUserQuestion:
Where should codebase analysis documentation be stored?
.shipyard/codebase/-- Private, gitignored with the rest of.shipyard/docs/codebase/-- Committed to git, visible to collaborators in the repository
Store the chosen path for use in Step 3 and Step 5:
codebase_docs_path = ".shipyard/codebase"codebase_docs_path = "docs/codebase"Create the target directory if it does not exist (mkdir -p).
Dispatch 4 parallel mapper agents using the Task tool to analyze the existing codebase. Each agent writes its findings to the configured codebase docs path (from Step 2.5).
Use subagent_type: "shipyard:mapper" for each. Pass the target output path to each agent.
Agent 1 -- Technology Focus:
{codebase_docs_path}/STACK.md (languages, frameworks, versions, build tools){codebase_docs_path}/INTEGRATIONS.md (external services, APIs, databases)Agent 2 -- Architecture Focus:
{codebase_docs_path}/ARCHITECTURE.md (patterns, layers, data flow){codebase_docs_path}/STRUCTURE.md (directory layout with purpose annotations)Agent 3 -- Quality Focus:
{codebase_docs_path}/CONVENTIONS.md (naming, formatting, patterns in use){codebase_docs_path}/TESTING.md (test framework, coverage, test patterns)Agent 4 -- Concerns Focus:
{codebase_docs_path}/CONCERNS.md (prioritized list with evidence)Wait for all 4 agents to complete before proceeding.
Invoke the shipyard:shipyard-brainstorming skill to conduct a Socratic dialogue with the user.
When the user indicates they are satisfied with the requirements exploration, capture all decisions into .shipyard/PROJECT.md with these sections:
Ask the user about their preferred workflow using these questions:
Also ask about quality gates: 4. Security auditing: "Should Shipyard run a security audit after each phase build? (Recommended for production projects)" 5. Code simplification: "Should Shipyard check for duplication and complexity after each phase? (Recommended for AI-heavy workflows)" 6. IaC validation: "Should Shipyard run infrastructure validation when Terraform/Ansible/Docker files are changed? (auto = detect IaC files automatically)" 7. Documentation generation: "Should Shipyard generate documentation after each phase build? (Recommended for all projects — helps maintain up-to-date docs)"
Also ask about model and context preferences: 8. Model routing: "Which model routing strategy should Shipyard use for its agents?"
Also ask about memory (cross-session recall): 10. Memory: Present this question using AskUserQuestion:
Enable Memory?
This lets Claude recall past conversations across all your projects. When you're stuck on a problem, Claude can search previous sessions to find how you solved similar issues before.
Conversations are stored locally on your machine in
~/.config/shipyard/memory.db. You can disable this anytime with/shipyard:memory-disable.
- Yes, enable Memory (Recommended) -- Index conversations for cross-session recall
- No, skip Memory -- Conversations are not indexed
If user selects "Yes":
~/.config/shipyard/config.json with "memory": true~/.claude/projects/If user selects "No":
/shipyard:memory-enableStore preferences in .shipyard/config.json. Follow Model Routing Protocol (see docs/PROTOCOLS.md) for the full config.json structure, model routing keys, and defaults.
Non-routing fields: interaction_mode, git_strategy, review_depth, security_audit, simplification_review, iac_validation, documentation_generation, codebase_docs_path, context_tier, created_at, version.
Defaults: security_audit: true, simplification_review: true, iac_validation: "auto", documentation_generation: true, context_tier: "auto".
Dispatch an architect agent (subagent_type: "shipyard:architect") with:
The architect agent must produce .shipyard/ROADMAP.md containing:
Present the roadmap to the user for approval. Allow up to 3 revision cycles where the user can request changes. After approval (or 3 rounds), finalize.
Follow Native Task Scaffolding Protocol (see docs/PROTOCOLS.md) -- create a native task for each phase in the approved roadmap.
Follow State Update Protocol (see docs/PROTOCOLS.md) -- create .shipyard/STATE.md with:
[{timestamp}] Project initializedCreate a git commit with the .shipyard/ directory and, if codebase_docs_path is docs/codebase, also stage docs/codebase/:
git add .shipyard/
# If codebase docs are in docs/codebase/, also stage them (they are git-committed, not gitignored)
git add docs/codebase/ # only if codebase_docs_path = "docs/codebase"
git commit -m "shipyard: initialize project"
Tell the user initialization is complete and suggest:
"Project initialized! Run
/shipyard:plan 1to begin planning Phase 1."
Display a brief summary of the roadmap phases.
/initBuild UI with craft and consistency. For interface design (dashboards, apps, tools) — not marketing sites.
/initBuild UI with craft and consistency. For interface design (dashboards, apps, tools) — not marketing sites.