foundation
Establish technical foundation for a new project. Proactively suggests stack-appropriate decisions including project structure. Creates .claude/rules/tech-stack.md with project conventions. Triggers: "foundation", "tech stack", "setup project", "project structure"
From sdlc-toolkitnpx claudepluginhub youarenext/sdlc-toolkit --plugin sdlc-toolkitThis skill is limited to using the following tools:
templates/project-structures.mdtemplates/tech-stack-presets.mdtemplates/tech-stack-rules.mdFoundation Skill
Establish technical foundation before writing PRDs. Proactively suggests best practices for the chosen stack.
When to use: Greenfield projects, or when starting a major new component. PRD skill will suggest this automatically if system-context is empty and no tech-stack.md exists.
Output
.claude/rules/tech-stack.md— rules for Claude to follow (auto-loaded)docs/system-context.md— updated with Tech Stack section
ADRs are created separately via /sdlc-toolkit:adr if the user wants detailed documentation.
Instructions
Phase 1: Language & Scale
- Check if
.claude/rules/tech-stack.mdalready exists — if yes, ask if user wants to update or skip - Read
docs/system-context.mdif it exists — understand current state - Ask the user:
- What language/framework? (e.g., FastAPI, Django, Express, Go, Spring Boot)
- Estimated scale? How many endpoints/features are planned?
< 5 endpoints→ suggest MVP structure (simple, flat)> 5 endpoints→ suggest Scalable structure (DDD-lite, bounded contexts)
Phase 2: Project Structure (CRITICAL)
- Based on language + scale, show the CONCRETE folder structure from templates/project-structures.md
- Explain WHY this structure is recommended:
- Separation of concerns
- Testability (tests next to code)
- Scalability path
- IMPORTANT: Explain the "tests next to code" rule:
- Unit tests live INSIDE each module:
users/tests/test_service.py - Integration/E2E tests live in root
tests/folder - NEVER dump all tests into a single
tests/folder
- Unit tests live INSIDE each module:
- Confirm or adjust the structure with the user
Phase 3: Tech Stack Decisions
-
Based on the chosen language/framework, PROACTIVELY SUGGEST a complete stack. Use templates/tech-stack-presets.md as reference:
Stack Suggested Preset FastAPI SQLModel, pytest-asyncio, Pydantic v2, Alembic Django Django ORM, pytest-django, DRF Express Prisma or TypeORM, Jest, Zod Go sqlc or GORM, go test, chi/gin Spring Boot JPA/Hibernate, JUnit 5, Flyway -
Walk through each category, confirming or adjusting:
- Database — type, dev/prod differences
- ORM/Data Access — ORM vs raw SQL, migrations
- API Style — REST/GraphQL, versioning
- Authentication — strategy (JWT, sessions, OAuth)
- Testing — framework, coverage targets
- Deployment — target environment (Docker, serverless, etc.)
Phase 4: Generate Output
- Create
.claude/rules/tech-stack.mdusing templates/tech-stack-rules.md- Include ALL decided rules
- Include project structure rules
- Include test location rules
- Update
docs/system-context.md:- Add "Tech Stack" section at the top
- If file doesn't exist, create it with Tech Stack section
- Offer to create ADRs for major decisions via
/sdlc-toolkit:adr
Important
- Be proactive: Don't just ask questions — SUGGEST solutions based on the stack
- Show concrete examples: Always show actual folder structures, not abstract descriptions
- Explain trade-offs: Help user understand MVP vs Scalable choice
- Focus on rules that matter: Only include rules that affect how Claude writes code
- The goal is to prevent technical debt by making decisions explicit BEFORE development starts
Supporting files
- templates/tech-stack-rules.md — Template for .claude/rules/
- templates/tech-stack-presets.md — Presets for popular stacks
- templates/project-structures.md — MVP and Scalable folder structures