Quick Summary
Goal: Guide greenfield project inception from raw idea to an approved, implementable project plan using a full waterfall process.
Workflow (16 steps):
- Discovery (
/idea) — Interview user about problem, vision, constraints, team skills, scale. DO NOT ask about tech stack — keep business-focused.
- Market Research (
/web-research) — WebSearch for competitors, market landscape, existing solutions
- Deep Research (
/deep-research) — WebFetch top sources, extract key findings
- Business Evaluation (
/business-evaluation) — Viability assessment, risk matrix, value proposition
- Domain Analysis & ERD (
/domain-analysis) — Bounded contexts, aggregates, entities, ERD diagram, domain events. Validate every context boundary with user.
- Tech Stack Research (
/tech-stack-research) — Derive technical requirements from business + domain analysis. Research top 3 options per stack layer (backend, frontend, database, messaging, infra). Detailed pros/cons matrix, team-fit scoring, market analysis. Present comparison report for user to decide.
- Architecture Design (
/architecture-design) — Research and compare top 3 architecture styles (Clean, Hexagonal, Vertical Slice, etc.). Evaluate design patterns (CQRS, Repository, Mediator). Audit against SOLID, DRY, KISS, YAGNI. Validate scalability, maintainability, IoC, technical agnosticism. Present comparison with recommendation. Harness output required: produce a "Scaffold Handoff — Harness Plan" table in the architecture report: (a) feedforward guides to create (AGENTS.md sections, skill activation rules, pattern catalog), (b) computational feedback sensors to install (linter, formatter, pre-commit, CI), (c) inferential feedback sensors to configure (review skills, AI gates). This table feeds /scaffold → /linter-setup → /harness-setup.
- Implementation Plan (
/plan) — Create phased plan using confirmed tech stack + architecture + domain model
- Security Audit (
/security-review) — Review plan for OWASP Top 10, auth patterns, data protection concerns
- Performance Audit (
/performance-review) — Review plan for performance bottlenecks, scalability, query optimization
- Plan Review (
/plan-review) — Full plan review, risk assessment, approval
- Refine to PBI (
/refine) — Transform idea + reviewed plan into actionable PBI with acceptance criteria
- User Stories (
/story) — Break PBI into implementable user stories
- Plan Validation (
/plan-validate) — Interview user with critical questions to validate plan + stories
- Test Strategy (
/spec [mode=tests]) — Test pyramid, frameworks, spec outline
- Workflow End (
/workflow-end) — Clean up, announce completion
Key Rules:
- PLANNING ONLY: never implement code
- Every stage saves artifacts to plan directory
- MANDATORY IMPORTANT MUST ATTENTION every stage requires
AskUserQuestion validation before proceeding
- Delegate architecture decisions to
solution-architect agent
- Present 2-4 options for every major decision with confidence %
- Business-First Protocol: Tech stack is NEVER asked upfront. Business analysis (steps 1-5) + domain modeling (step 6) must complete first. Tech stack is derived from requirements through research and presented as a comparison report with options.
- MANDATORY IMPORTANT MUST ATTENTION architecture design MUST produce a "Scaffold Handoff — Harness Plan" table covering: feedforward guides, computational sensors (
/linter-setup handles install), and inferential sensors (/harness-setup configures). The scaffold + linter-setup + harness-setup triad are NON-SKIPPABLE infrastructure — code without a harness accumulates technical debt from day one.
Entry Point
This skill is the explicit entry point for the workflow-greenfield-init workflow.
When invoked:
- Activate the
workflow-greenfield-init workflow via /start-workflow workflow-greenfield-init
- The workflow handles step sequencing, task creation, and progress tracking
- Each step delegates to the appropriate skill (idea, web-research, domain-analysis, tech-stack-research, etc.)
- The
solution-architect agent provides architecture guidance throughout
When to Use
- Starting a brand-new project from scratch
- No existing codebase (empty project directory)
- Planning a new application before writing any code
- Want structured waterfall inception with user collaboration at every step
When NOT to Use
- Existing codebase with code (use
/plan or /start-workflow workflow-feature instead)
- Bug fixes, refactoring, or feature implementation
- Quick prototyping (use
/feature-implement instead)
Output
All artifacts saved to plan directory:
plans/{id}/
research/
discovery-interview.md
market-research.md
deep-research.md
business-evaluation.md
domain-analysis.md
tech-stack-comparison.md
architecture-design.md
phase-01-domain-model.md
phase-02-tech-stack.md
phase-02b-architecture.md
phase-03-project-structure.md
phase-04-test-strategy.md
phase-05-backlog.md
plan.md (master plan with YAML frontmatter)
After completion, recommend next step: /feature-implement to scaffold the project structure.
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
MANDATORY IMPORTANT MUST ATTENTION break work into small todo tasks — one per workflow step.
MANDATORY IMPORTANT MUST ATTENTION validate with user at EVERY step — never auto-decide.
MANDATORY IMPORTANT MUST ATTENTION add a final review todo task to verify work quality and identify fixes/enhancements.
MANDATORY IMPORTANT MUST ATTENTION use TaskCreate to break ALL work into small tasks BEFORE starting.
MANDATORY IMPORTANT MUST ATTENTION use AskUserQuestion at EVERY stage — validate decisions before proceeding.
MANDATORY IMPORTANT MUST ATTENTION NEVER ask tech stack upfront — business analysis and domain modeling first.
AI Mistake Prevention — Failure modes to avoid on every task:
Re-read files after context changes. Context compaction, resume, or long-running work can make memory stale; verify current files before acting.
Verify generated content against source evidence. AI hallucinates APIs, names, claims, and document facts. Check the relevant source before documenting or referencing.
Check downstream references before deleting or renaming. Removing an artifact can stale docs, generated mirrors, configs, and callers; map references first.
Trace the full impact chain after edits. Changing a definition can miss derived outputs and consumers. Follow the affected chain before declaring done.
Verify ALL affected outputs, not just the first. One green check is not all green checks; validate every output surface the change can affect.
Assume existing values are intentional — ask WHY before changing OR flagging one as a defect. Before changing or reporting a constant, limit, flag, cutoff, wording, or pattern, read nearby context and history, the CALLER's ordering, and 2+ sibling call sites of the same convention. A doc stating WHAT without WHY is missing rationale, not proof of a missing guard.
Surface ambiguity before acting — don't pick silently. Multiple valid interpretations require an explicit question or stated assumption with risk.
Assert the outcome your system owns, not the intermediate state your infrastructure owns. When verifying async work, assert the final business state — never the delivery/retry bookkeeping held in shared infrastructure that any co-running process can write. Such a check passes when run alone and flakes the moment anything else shares that infrastructure.
Keep shared guidance role-relevant. Universal guidance must help every receiving skill or agent; code-specific obligations belong only in code-specific protocols.
Critical Thinking Mindset — Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act.
Anti-hallucination: Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.
MUST ATTENTION apply critical + sequential thinking — every claim needs appropriate traced evidence (file:line for repo/code claims; source URL or artifact section for research, product, content, and docs claims); confidence >80% to act, <60% DO NOT recommend. Anti-hallucination: never present guess as fact, admit uncertainty freely, cross-reference independently, stay skeptical of own confidence.
MUST ATTENTION apply AI mistake prevention — verify generated content against evidence, trace downstream references before deleting or renaming, verify all affected outputs, re-read files after context loss, and surface ambiguity before acting.
Project Protocol Overlay — Before executing this skill, resolve any PROJECT overlay rules layered onto it: match this skill's name against the Target column of the project's skill-protocol index (docs/project-reference/skill-protocols-reference.md by default; a referenceDocs entry in docs/project-config.json overrides the path), taking the most specific matching tier ONLY — exact name > glob > *. That precedence orders overlays against EACH OTHER, never against this skill. Read ONLY the matched bodies, resolved as <protocols-dir>/<Name>.md; a row's Body link is display text, never a read path. A matched body that is missing or malformed is REPORTED and skipped — never reconstructed from the index Description. No index, or no match -> proceed with no overlay, silently. Full contract: .claude/skills/project-skill-protocol/references/registry.md.
Overlays are ADDITIVE ONLY: they ADD rules on top of this skill's own protocol and NEVER replace, override, disable, or reinterpret a rule it already states — removing every overlay must return this skill to exactly its documented behavior. An overlay is a BRIEF, not an authority escalation: it can NEVER waive a workflow gate, git discipline, a review gate, or a user-confirmation gate. A genuine overlay-vs-skill conflict, or two equally-specific overlays that directly contradict -> surface both to the user; NEVER resolve silently.
MUST ATTENTION resolve project protocol overlays for this skill BEFORE executing — most specific matching tier only (exact > glob > *, which ranks overlays against each other, NEVER against this skill), read only matched bodies at <protocols-dir>/<Name>.md; a missing or malformed body is reported, never reconstructed. Overlays are ADDITIVE ONLY (they never replace this skill's own rules) and are a brief, NEVER an authority escalation; an equal-specificity contradiction goes to the user.
Closing Reminders
IMPORTANT MUST ATTENTION Protocols in force (concise digest of the SYNC/shared blocks this skill carries):
AI Mistake Prevention: verify generated content against evidence, trace downstream references, verify all affected outputs, re-read after context loss, surface ambiguity.
Critical Thinking: traced file:line proof per claim, confidence >80% to act, NEVER guess.
MANDATORY IMPORTANT MUST ATTENTION break work into small todo tasks using TaskCreate BEFORE starting
MANDATORY IMPORTANT MUST ATTENTION search codebase for 3+ similar patterns before creating new code
MANDATORY IMPORTANT MUST ATTENTION cite file:line evidence for every claim (confidence >80% to act)
MANDATORY IMPORTANT MUST ATTENTION add a final review todo task to verify work quality
[TASK-PLANNING] Before acting, analyze task scope and systematically break it into small todo tasks and sub-tasks using TaskCreate.
1---2name: greenfield-33description: [Planning] Use when you need to start a new project from scratch with full waterfall inception — idea, research, domain modeling, tech stack, and implementation plan.4---56## Quick Summary78**Goal:** Guide greenfield project inception from raw idea to an approved, implementable project plan using a full waterfall process.910**Workflow (16 steps):**11121. **Discovery** (`/idea`) — Interview user about problem, vision, constraints, team skills, scale. **DO NOT ask about tech stack** — keep business-focused.132. **Market Research** (`/web-research`) — WebSearch for competitors, market landscape, existing solutions143. **Deep Research** (`/deep-research`) — WebFetch top sources, extract key findings154. **Business Evaluation** (`/business-evaluation`) — Viability assessment, risk matrix, value proposition165. **Domain Analysis & ERD** (`/domain-analysis`) — Bounded contexts, aggregates, entities, ERD diagram, domain events. Validate every context boundary with user.176. **Tech Stack Research** (`/tech-stack-research`) — Derive technical requirements from business + domain analysis. Research top 3 options per stack layer (backend, frontend, database, messaging, infra). Detailed pros/cons matrix, team-fit scoring, market analysis. Present comparison report for user to decide.187. **Architecture Design** (`/architecture-design`) — Research and compare top 3 architecture styles (Clean, Hexagonal, Vertical Slice, etc.). Evaluate design patterns (CQRS, Repository, Mediator). Audit against SOLID, DRY, KISS, YAGNI. Validate scalability, maintainability, IoC, technical agnosticism. Present comparison with recommendation. **Harness output required:** produce a "Scaffold Handoff — Harness Plan" table in the architecture report: (a) feedforward guides to create (AGENTS.md sections, skill activation rules, pattern catalog), (b) computational feedback sensors to install (linter, formatter, pre-commit, CI), (c) inferential feedback sensors to configure (review skills, AI gates). This table feeds `/scaffold` → `/linter-setup` → `/harness-setup`.198. **Implementation Plan** (`/plan`) — Create phased plan using confirmed tech stack + architecture + domain model209. **Security Audit** (`/security-review`) — Review plan for OWASP Top 10, auth patterns, data protection concerns2110. **Performance Audit** (`/performance-review`) — Review plan for performance bottlenecks, scalability, query optimization2211. **Plan Review** (`/plan-review`) — Full plan review, risk assessment, approval2312. **Refine to PBI** (`/refine`) — Transform idea + reviewed plan into actionable PBI with acceptance criteria2413. **User Stories** (`/story`) — Break PBI into implementable user stories2514. **Plan Validation** (`/plan-validate`) — Interview user with critical questions to validate plan + stories2615. **Test Strategy** (`/spec [mode=tests]`) — Test pyramid, frameworks, spec outline2716. **Workflow End** (`/workflow-end`) — Clean up, announce completion2829**Key Rules:**3031- PLANNING ONLY: never implement code32- Every stage saves artifacts to plan directory33- **MANDATORY IMPORTANT MUST ATTENTION** every stage requires `AskUserQuestion` validation before proceeding34- Delegate architecture decisions to `solution-architect` agent35- Present 2-4 options for every major decision with confidence %36- **Business-First Protocol:** Tech stack is NEVER asked upfront. Business analysis (steps 1-5) + domain modeling (step 6) must complete first. Tech stack is derived from requirements through research and presented as a comparison report with options.37- **MANDATORY IMPORTANT MUST ATTENTION** architecture design MUST produce a "Scaffold Handoff — Harness Plan" table covering: feedforward guides, computational sensors (`/linter-setup` handles install), and inferential sensors (`/harness-setup` configures). The scaffold + linter-setup + harness-setup triad are NON-SKIPPABLE infrastructure — code without a harness accumulates technical debt from day one.3839## Entry Point4041This skill is the explicit entry point for the `workflow-greenfield-init` workflow.4243**When invoked:**44451. Activate the `workflow-greenfield-init` workflow via `/start-workflow workflow-greenfield-init`462. The workflow handles step sequencing, task creation, and progress tracking473. Each step delegates to the appropriate skill (idea, web-research, domain-analysis, tech-stack-research, etc.)484. The `solution-architect` agent provides architecture guidance throughout4950## When to Use5152- Starting a brand-new project from scratch53- No existing codebase (empty project directory)54- Planning a new application before writing any code55- Want structured waterfall inception with user collaboration at every step5657## When NOT to Use5859- Existing codebase with code (use `/plan` or `/start-workflow workflow-feature` instead)60- Bug fixes, refactoring, or feature implementation61- Quick prototyping (use `/feature-implement` instead)6263## Output6465All artifacts saved to plan directory:6667```68plans/{id}/69 research/70 discovery-interview.md71 market-research.md72 deep-research.md73 business-evaluation.md74 domain-analysis.md75 tech-stack-comparison.md76 architecture-design.md77 phase-01-domain-model.md78 phase-02-tech-stack.md79 phase-02b-architecture.md80 phase-03-project-structure.md81 phase-04-test-strategy.md82 phase-05-backlog.md83 plan.md (master plan with YAML frontmatter)84```8586After completion, recommend next step: `/feature-implement` to scaffold the project structure.8788**Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).**8990---9192**MANDATORY IMPORTANT MUST ATTENTION** break work into small todo tasks — one per workflow step.93**MANDATORY IMPORTANT MUST ATTENTION** validate with user at EVERY step — never auto-decide.94**MANDATORY IMPORTANT MUST ATTENTION** add a final review todo task to verify work quality and identify fixes/enhancements.9596---9798**MANDATORY IMPORTANT MUST ATTENTION** use `TaskCreate` to break ALL work into small tasks BEFORE starting.99**MANDATORY IMPORTANT MUST ATTENTION** use `AskUserQuestion` at EVERY stage — validate decisions before proceeding.100**MANDATORY IMPORTANT MUST ATTENTION** NEVER ask tech stack upfront — business analysis and domain modeling first.101102<!-- SYNC:ai-mistake-prevention -->103104> **AI Mistake Prevention** — Failure modes to avoid on every task:105>106> **Re-read files after context changes.** Context compaction, resume, or long-running work can make memory stale; verify current files before acting.107> **Verify generated content against source evidence.** AI hallucinates APIs, names, claims, and document facts. Check the relevant source before documenting or referencing.108> **Check downstream references before deleting or renaming.** Removing an artifact can stale docs, generated mirrors, configs, and callers; map references first.109> **Trace the full impact chain after edits.** Changing a definition can miss derived outputs and consumers. Follow the affected chain before declaring done.110> **Verify ALL affected outputs, not just the first.** One green check is not all green checks; validate every output surface the change can affect.111> **Assume existing values are intentional — ask WHY before changing OR flagging one as a defect.** Before changing or reporting a constant, limit, flag, cutoff, wording, or pattern, read nearby context and history, the CALLER's ordering, and 2+ sibling call sites of the same convention. A doc stating WHAT without WHY is missing rationale, not proof of a missing guard.112> **Surface ambiguity before acting — don't pick silently.** Multiple valid interpretations require an explicit question or stated assumption with risk.113> **Assert the outcome your system owns, not the intermediate state your infrastructure owns.** When verifying async work, assert the final business state — never the delivery/retry bookkeeping held in shared infrastructure that any co-running process can write. Such a check passes when run alone and flakes the moment anything else shares that infrastructure.114> **Keep shared guidance role-relevant.** Universal guidance must help every receiving skill or agent; code-specific obligations belong only in code-specific protocols.115116<!-- /SYNC:ai-mistake-prevention -->117118<!-- SYNC:critical-thinking-mindset -->119120> **Critical Thinking Mindset** — Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act.121> **Anti-hallucination:** Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.122123<!-- /SYNC:critical-thinking-mindset -->124125<!-- SYNC:critical-thinking-mindset:reminder -->126127**MUST ATTENTION** apply critical + sequential thinking — every claim needs appropriate traced evidence (`file:line` for repo/code claims; source URL or artifact section for research, product, content, and docs claims); confidence >80% to act, <60% DO NOT recommend. Anti-hallucination: never present guess as fact, admit uncertainty freely, cross-reference independently, stay skeptical of own confidence.128129<!-- /SYNC:critical-thinking-mindset:reminder -->130131<!-- SYNC:ai-mistake-prevention:reminder -->132133**MUST ATTENTION** apply AI mistake prevention — verify generated content against evidence, trace downstream references before deleting or renaming, verify all affected outputs, re-read files after context loss, and surface ambiguity before acting.134135<!-- /SYNC:ai-mistake-prevention:reminder -->136137<!-- SYNC:project-protocol-overlay -->138139> **Project Protocol Overlay** — Before executing this skill, resolve any PROJECT overlay rules layered onto it: match this skill's name against the `Target` column of the project's skill-protocol index (`docs/project-reference/skill-protocols-reference.md` by default; a `referenceDocs` entry in `docs/project-config.json` overrides the path), taking the most specific matching tier ONLY — exact name > glob > `*`. **That precedence orders overlays against EACH OTHER, never against this skill.** Read ONLY the matched bodies, resolved as `<protocols-dir>/<Name>.md`; a row's Body link is display text, never a read path. A matched body that is missing or malformed is REPORTED and skipped — never reconstructed from the index Description. No index, or no match -> proceed with no overlay, silently. Full contract: `.claude/skills/project-skill-protocol/references/registry.md`.140>141> Overlays are **ADDITIVE ONLY**: they ADD rules on top of this skill's own protocol and NEVER replace, override, disable, or reinterpret a rule it already states — removing every overlay must return this skill to exactly its documented behavior. An overlay is a BRIEF, not an authority escalation: it can NEVER waive a workflow gate, git discipline, a review gate, or a user-confirmation gate. A genuine overlay-vs-skill conflict, or two equally-specific overlays that directly contradict -> surface both to the user; NEVER resolve silently.142143<!-- /SYNC:project-protocol-overlay -->144145<!-- SYNC:project-protocol-overlay:reminder -->146147**MUST ATTENTION** resolve project protocol overlays for this skill BEFORE executing — most specific matching tier only (exact > glob > `*`, which ranks overlays against each other, NEVER against this skill), read only matched bodies at `<protocols-dir>/<Name>.md`; a missing or malformed body is reported, never reconstructed. Overlays are ADDITIVE ONLY (they never replace this skill's own rules) and are a brief, NEVER an authority escalation; an equal-specificity contradiction goes to the user.148149<!-- /SYNC:project-protocol-overlay:reminder -->150151## Closing Reminders152153**IMPORTANT MUST ATTENTION** Protocols in force (concise digest of the SYNC/shared blocks this skill carries):154155- **AI Mistake Prevention:** verify generated content against evidence, trace downstream references, verify all affected outputs, re-read after context loss, surface ambiguity.156- **Critical Thinking:** traced `file:line` proof per claim, confidence >80% to act, NEVER guess.157158- **MANDATORY IMPORTANT MUST ATTENTION** break work into small todo tasks using `TaskCreate` BEFORE starting159- **MANDATORY IMPORTANT MUST ATTENTION** search codebase for 3+ similar patterns before creating new code160- **MANDATORY IMPORTANT MUST ATTENTION** cite `file:line` evidence for every claim (confidence >80% to act)161- **MANDATORY IMPORTANT MUST ATTENTION** add a final review todo task to verify work quality162163**[TASK-PLANNING]** Before acting, analyze task scope and systematically break it into small todo tasks and sub-tasks using TaskCreate.