# Implementation Guideline

> Project Name: [Your Project Name]  
> Author(s): [Team Member Names]  
> Date: [YYYY-MM-DD]  
> Version: 1.0  

---

## Code Style and Conventions
*Rules everyone on the team will follow.*

### General
- [ ] Use meaningful variable/function names (`calculateTotalPrice` vs `func1`)
- [ ] Write comments for complex logic (not obvious code)
- [ ] Keep functions small and single-responsibility (< 30 lines ideal)

### Language-Specific
#### For JavaScript/TypeScript:
- [ ] Use `const`/`let`, avoid `var`
- [ ] Prefer async/await over `.then()` chains
- [ ] Use ESLint + Prettier config (provide `.eslintrc` if possible)

#### For Python:
- [ ] Follow PEP 8 style guide
- [ ] Use type hints where helpful
- [ ] Use `black` or `ruff` for formatting

*(Add rules for your chosen stack)*

---

## Project Structure
*Recommended folder/file organization.*

```
project-root/
|-- src/
|   |-- components/    # Reusable UI components
|   |-- pages/         # Page/views
|   |-- utils/         # Helper functions
|   |-- services/      # API calls, external logic
|   |-- styles/        # CSS/SCSS files
|-- public/            # Static assets
|-- tests/             # Test files
|-- docs/              # Documentation
|-- .env.example       # Env var template
|-- README.md          # Setup instructions
|-- package.json       # Dependencies and scripts
```

*(Adapt to your framework: Next.js, Flask, Django, etc.)*

---

## Do's and Don'ts

### DO:
- Commit small, logical changes with clear messages  
  `git commit -m "feat: add task creation form validation"`
- Write tests for critical functions (auth, data processing)
- Use environment variables for secrets (API keys, DB URLs)
- Review your own code before pushing (rubber duck debug!)

### DON'T:
- Hardcode secrets or credentials in source code
- Ignore console errors or warnings
- Push broken code to main branch (use feature branches)
- Copy-paste code without understanding it

---

## Testing Guidelines
*How to write and run tests for this project.*

```bash
# Run all tests
npm test  # or pytest

# Run tests in watch mode (during development)
npm run test:watch
```

### Test Checklist:
- [ ] Test happy path (expected user behavior)
- [ ] Test edge cases (empty input, invalid data)
- [ ] Test error states (network failure, auth denied)

---

## Git Workflow
*How the team will collaborate on code.*

1. Create a feature branch: `git checkout -b feat/add-task-filter`
2. Code, commit often with clear messages
3. Push branch: `git push origin feat/add-task-filter`
4. Open a Pull Request (PR) with:
   - Description of changes
   - Screenshots (if UI change)
   - Checklist: [ ] Tests pass [ ] Lint clean
5. Get at least 1 team member review before merging

---

## Debugging and Logging
*How to find and fix issues.*

- Use `console.log()` / `print()` strategically (remove before PR)
- For backend: use structured logging (e.g., `winston`, `logging` module)
- Keep a `DEBUG.md` for known issues and solutions

---

> Tips for Implementation
> - Start with the smallest working feature (vertical slice)
> - If stuck >30 mins, ask for help or take a break
> - Document as you code -- future you will thank present you

---

> **Endpoint:** `/formats/implementation-template`
> [formats](/formats) > [implementation-template](/formats/implementation-template)
> Up: [/formats](/formats)
> Previous: [/formats/future-template](/formats/future-template) | Next: [/formats/introduction](/formats/introduction)
> [Index](/)