zrb 1.18.0__py3-none-any.whl → 1.18.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ # C++ Development Guide
2
+
3
+ This guide provides the baseline for C++ development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Build System:** `CMakeLists.txt` (CMake), `Makefile` (Make), or a Visual Studio solution file (`*.sln`).
10
+ - **C++ Standard:** Look for flags like `-std=c++11`, `-std=c++14`, `-std=c++17`, or `-std=c++20` in the build files.
11
+ - **Style & Linting Config:** `.clang-format`, `.clang-tidy`. These define the coding standard.
12
+ - **Testing Framework:** Look for a `tests/` directory and check the build files for dependencies like `gtest` or `catch2`.
13
+
14
+ ## 2. Core Principles
15
+
16
+ - **Style:** Strictly adhere to the project's configured formatter (e.g., clang-format) and linter (e.g., clang-tidy). If none exist, default to the Google C++ Style Guide.
17
+ - **Modern C++:** Use modern C++ features, such as smart pointers, range-based for loops, and auto.
18
+ - **RAII (Resource Acquisition Is Initialization):** Use RAII to manage resources like memory, files, and network connections.
19
+
20
+ ## 3. Implementation Patterns
21
+
22
+ - **Error Handling:** Replicate existing patterns for error handling. Use exceptions for errors that cannot be handled locally.
23
+ - **Testing:** Use the project's existing test structure. Write unit tests for all new code.
24
+
25
+ ## 4. Common Commands
26
+
27
+ - **CMake:**
28
+ - **Configure:** `cmake -B build`
29
+ - **Build:** `cmake --build build`
30
+ - **Test:** `cd build && ctest`
31
+ - **Make:**
32
+ - **Build:** `make`
33
+ - **Test:** `make test`
@@ -0,0 +1,35 @@
1
+ # C# Development Guide
2
+
3
+ This guide provides the baseline for C# development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Project File:** `*.csproj`. This defines the project structure, dependencies, and build settings.
10
+ - **Solution File:** `*.sln`. This defines the solution that contains one or more projects.
11
+ - **.NET Version:** Look for a `global.json` file, or check the `*.csproj` file.
12
+ - **Style & Linting Config:** `.editorconfig`, `.stylecop.json`. These define the coding standard.
13
+ - **Testing Framework:** Look for a `*Tests` directory and check the project file for dependencies like `xunit`, `nunit`, or `mstest`.
14
+
15
+ ## 2. Core Principles
16
+
17
+ - **Style:** Strictly adhere to the project's configured linter (e.g., StyleCop). If none exists, default to the .NET coding conventions.
18
+ - **Idiomatic C#:** Embrace C#'s core features:
19
+ - Use properties instead of public fields.
20
+ - Use LINQ for data manipulation.
21
+ - Use `async/await` for asynchronous programming.
22
+ - **Object-Oriented Design:** Follow SOLID principles and use design patterns where appropriate.
23
+
24
+ ## 3. Implementation Patterns
25
+
26
+ - **Error Handling:** Replicate existing patterns for exceptions. Use `try-catch-finally` blocks for exception handling.
27
+ - **Testing:** Use the project's existing test structure. Write unit tests for all new code.
28
+
29
+ ## 4. Common Commands
30
+
31
+ - **Build:** `dotnet build`
32
+ - **Run:** `dotnet run`
33
+ - **Test:** `dotnet test`
34
+ - **Clean:** `dotnet clean`
35
+ - **Publish:** `dotnet publish`
@@ -1,142 +1,58 @@
1
- # Git Command Guidelines
1
+ # Git Workflow Guide
2
2
 
3
- ## Core Principles
3
+ This guide governs all version control operations. Adhere to it for safety and consistency.
4
4
 
5
- - **Safety First:** Always verify current branch and status before destructive operations
6
- - **Atomic Commits:** Each commit should represent a single logical change
7
- - **Descriptive Messages:** Write clear, concise commit messages that explain "why" not just "what"
8
- - **Interactive Mode:** Use interactive rebase and staging for precise control
5
+ ## 1. Core Principles & Safety
9
6
 
10
- ## Essential Commands
7
+ - **Atomic Commits:** One logical change per commit. Use `git add -p` for precision.
8
+ - **Descriptive Messages:** Explain the "why" in the imperative mood (e.g., "Add feature"). Follow the 50/72 format.
9
+ - **Safety First:**
10
+ - Always run `git status` before operations.
11
+ - Use `git push --force-with-lease`, not `--force`.
12
+ - Ensure the working directory is clean before `git rebase`.
11
13
 
12
- ### Repository Status
13
- ```bash
14
- # Check current status and branch
15
- git status
16
- git branch -v
14
+ ## 2. Standard Workflow
17
15
 
18
- # See uncommitted changes
19
- git diff
20
- git diff --staged
21
- ```
16
+ This is the primary development cycle.
22
17
 
23
- ### Safe Branch Operations
24
- ```bash
25
- # Create and switch to new branch
26
- git checkout -b feature/new-feature
18
+ 1. **Branch:** `git checkout -b <branch-name>`
19
+ 2. **Code & Verify:** Make changes, then run all tests, linters, and builds.
20
+ 3. **Stage:** `git add <file>` or, for more precision, `git add -p`.
21
+ 4. **Commit:** `git commit` with a descriptive message.
22
+ ```
23
+ feat: Add user authentication endpoint
27
24
 
28
- # Switch branches safely
29
- git switch main
30
- git switch feature/branch-name
25
+ Implement the /login endpoint using JWT for token-based auth.
26
+ This resolves issue #123 by providing a mechanism for users to
27
+ log in and receive an access token.
28
+ ```
29
+ 5. **Review/Amend:** Use `git log -1` to review. If needed, fix with `git commit --amend`.
30
+ 6. **Push:** `git push origin <branch-name>`
31
31
 
32
- # List all branches
33
- git branch -a
34
- ```
32
+ ## 3. Command Reference
35
33
 
36
- ### Staging and Committing
37
- ```bash
38
- # Stage specific files
39
- git add path/to/file.py
40
- git add src/
34
+ ### Status & History
35
+ - `git status`: Check working directory status.
36
+ - `git diff`: See uncommitted changes to tracked files.
37
+ - `git diff --staged`: See staged changes.
38
+ - `git log --oneline --graph -10`: View recent commit history.
39
+ - `git blame <file>`: See who changed what in a file.
41
40
 
42
- # Stage interactively
43
- git add -p
44
-
45
- # Commit with descriptive message
46
- git commit -m "feat: add user authentication
47
-
48
- - Implement JWT token generation
49
- - Add login/logout endpoints
50
- - Add password hashing"
51
-
52
- # Amend last commit (use carefully)
53
- git commit --amend
54
- ```
55
-
56
- ### History and Logs
57
- ```bash
58
- # View commit history
59
- git log --oneline --graph -10
60
- git log --stat
61
-
62
- # See who changed what
63
- git blame file.py
64
- ```
65
-
66
- ## Advanced Operations
67
-
68
- ### Rebasing and Merging
69
- ```bash
70
- # Update feature branch from main
71
- git switch feature/branch
72
- git rebase main
73
-
74
- # Interactive rebase for cleanup
75
- git rebase -i HEAD~5
76
-
77
- # Safe merge
78
- git merge --no-ff feature/branch
79
- ```
41
+ ### Branching & Merging
42
+ - `git checkout -b <name>`: Create and switch to a new branch.
43
+ - `git switch <name>`: Switch to an existing branch.
44
+ - `git rebase main`: Update the current branch from `main`. **(Use with care)**.
45
+ - `git merge --no-ff <branch>`: Merge a branch without fast-forwarding.
80
46
 
81
47
  ### Stashing
82
- ```bash
83
- # Save uncommitted changes temporarily
84
- git stash push -m "WIP: feature implementation"
85
-
86
- # List stashes
87
- git stash list
88
-
89
- # Apply and keep stash
90
- git stash apply stash@{0}
91
-
92
- # Apply and drop stash
93
- git stash pop
94
- ```
48
+ - `git stash push -m "msg"`: Save uncommitted changes temporarily.
49
+ - `git stash list`: List all stashes.
50
+ - `git stash pop`: Apply and remove the last stash.
95
51
 
96
52
  ### Remote Operations
97
- ```bash
98
- # Fetch and check before pulling
99
- git fetch origin
100
- git log origin/main..main
101
-
102
- # Push safely
103
- git push origin feature/branch
104
- git push --force-with-lease # Safer than --force
105
- ```
106
-
107
- ## Safety Checklist
108
-
109
- 1. **Before destructive operations:** Always run `git status` and `git branch -v`
110
- 2. **Before force push:** Use `--force-with-lease` instead of `--force`
111
- 3. **Before rebase:** Ensure working directory is clean
112
- 4. **Before merge:** Resolve conflicts immediately
113
- 5. **Regularly:** Fetch and integrate upstream changes
114
-
115
- ## Common Patterns
116
-
117
- ### Feature Development
118
- ```bash
119
- git checkout -b feature/new-feature
120
- # ... make changes ...
121
- git add .
122
- git commit -m "feat: implement new feature"
123
- git push origin feature/new-feature
124
- ```
125
-
126
- ### Hotfix Workflow
127
- ```bash
128
- git checkout -b hotfix/critical-bug main
129
- # ... fix the bug ...
130
- git add .
131
- git commit -m "fix: resolve critical issue"
132
- git push origin hotfix/critical-bug
133
- ```
134
-
135
- ### Cleanup
136
- ```bash
137
- # Delete merged branches locally
138
- git branch --merged main | grep -v "main" | xargs git branch -d
53
+ - `git fetch origin`: Fetch updates from the remote repository.
54
+ - `git push origin <branch>`: Push a branch to the remote.
55
+ - `git push origin --delete <branch>`: Delete a remote branch.
139
56
 
140
- # Delete remote branches
141
- git push origin --delete old-branch
142
- ```
57
+ ### Advanced
58
+ - `git cherry-pick <commit-hash>`: Apply a specific commit from another branch. **(Use with caution to avoid duplicate commits)**.
@@ -1,23 +1,43 @@
1
1
  # Go Development Guide
2
2
 
3
- ## Core Principles
4
- - **Follow Go conventions** and effective Go patterns
5
- - **Use `go fmt`** for consistent formatting
6
- - **Follow project's package structure** and naming
7
-
8
- ## Project Analysis
9
- - Check for: `go.mod`, `go.sum`, `Makefile`
10
- - Look for project-specific patterns in existing code
11
- - Identify testing approach: table tests, integration tests
12
-
13
- ## Implementation Patterns
14
- - **Error Handling:** Follow project's error wrapping and handling style
15
- - **Package Organization:** Match existing package boundaries and dependencies
16
- - **Naming:** Follow Go conventions (camelCase, short names)
17
- - **Testing:** Use same test organization and helper patterns
18
-
19
- ## Common Commands
20
- - Formatting: `go fmt`
21
- - Testing: `go test`
22
- - Linting: `golangci-lint`, `staticcheck`
23
- - Building: `go build`
3
+ This guide provides the baseline for Go development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Module Information:** `go.mod` to identify the module path and dependencies. `go.sum` for dependency checksums.
10
+ - **Workspace:** `go.work` to see if the project is part of a multi-module workspace.
11
+ - **Tooling:** A `Makefile` is common for defining build, test, and lint commands.
12
+ - **CI/CD Configuration:** Files like `.github/workflows/go.yml` can reveal the exact commands used for verification.
13
+ - **Linting Config:** `.golangci.yml` defines the linting rules for `golangci-lint`.
14
+ - **Package Structure:** Analyze the `pkg/` and `internal/` directories to understand the project's layout.
15
+
16
+ ## 2. Core Principles
17
+
18
+ - **Formatting:** `go fmt` is mandatory. All code must be formatted before committing.
19
+ - **Linting:** Adhere to the project's `golangci-lint` configuration. If none exists, use a sensible default.
20
+ - **Package Naming:** Use short, concise, all-lowercase package names.
21
+ - **Simplicity:** Write clear, simple, and readable code. Avoid unnecessary complexity or "clever" tricks.
22
+
23
+ ## 3. Project Structure
24
+
25
+ - **`cmd/`:** Main applications for the project. Each subdirectory is a separate command.
26
+ - **`pkg/`:** Library code that's okay to be used by external applications.
27
+ - **`internal/`:** Private application and library code. It's not importable by other projects.
28
+
29
+ ## 4. Implementation Patterns
30
+
31
+ - **Error Handling:** Match the existing error handling strategy. Check if the project uses a library like `pkg/errors` for wrapping or if it relies on the standard library's `fmt.Errorf` with `%w`.
32
+ - **Testing:** Replicate the existing test structure. Use table-driven tests if they are prevalent in the codebase. Place tests in `_test.go` files within the same package.
33
+ - **Concurrency:** Follow existing concurrency patterns. Pay close attention to how goroutines, channels, and mutexes are used.
34
+ - **Debugging:** Use the `delve` debugger for debugging Go applications.
35
+
36
+ ## 5. Common Commands
37
+
38
+ - **Tidy Dependencies:** `go mod tidy`
39
+ - **Formatting:** `go fmt ./...`
40
+ - **Linting:** `golangci-lint run`
41
+ - **Testing:** `go test ./...`
42
+ - **Building:** `go build ./...`
43
+ - **Run:** `go run ./cmd/my-app`
@@ -0,0 +1,34 @@
1
+ # HTML/CSS Development Guide
2
+
3
+ This guide provides the baseline for HTML and CSS development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **HTML Files:** `*.html`. Look for the overall structure, doctype, and meta tags.
10
+ - **CSS Files:** `*.css`. Look for the CSS architecture (e.g., BEM, SMACSS), preprocessors (e.g., Sass, Less), and frameworks (e.g., Bootstrap, Tailwind CSS).
11
+ - **Style & Linting Config:** `.stylelintrc`, `.prettierrc`. These define the coding standard.
12
+
13
+ ## 2. Core Principles
14
+
15
+ - **HTML:**
16
+ - **Semantic HTML:** Use HTML elements for their intended purpose. For example, use `<nav>` for navigation, `<main>` for the main content, and `<article>` for articles.
17
+ - **Accessibility:** Follow accessibility best practices, such as using `alt` attributes for images and `aria-*` attributes for dynamic content.
18
+ - **CSS:**
19
+ - **Separation of Concerns:** Keep your CSS separate from your HTML. Use external stylesheets instead of inline styles.
20
+ - **Responsive Design:** Use media queries to create a responsive design that works on all screen sizes.
21
+ - **CSS Methodologies:** If the project uses a CSS methodology like BEM or SMACSS, follow it.
22
+
23
+ ## 3. Implementation Patterns
24
+
25
+ - **HTML:**
26
+ - **Validation:** Validate your HTML using the W3C Markup Validation Service.
27
+ - **CSS:**
28
+ - **Prefixing:** Use a tool like Autoprefixer to add vendor prefixes to your CSS.
29
+ - **Minification:** Use a tool like cssnano to minify your CSS for production.
30
+
31
+ ## 4. Common Commands
32
+
33
+ - **Linting:** `stylelint "**/*.css"`, `prettier --check "**/*.html"`
34
+ - **Formatting:** `prettier --write "**/*.{html,css}"`
@@ -0,0 +1,37 @@
1
+ # Java Development Guide
2
+
3
+ This guide provides the baseline for Java development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Build System:** `pom.xml` (Maven) or `build.gradle` (Gradle). Note the dependencies, plugins, and build lifecycle.
10
+ - **Java Version:** Look for a `.java-version` file, or check the `pom.xml` or `build.gradle` file.
11
+ - **Style & Linting Config:** `.checkstyle.xml`, `.pmd.xml`. These define the coding standard.
12
+ - **Testing Framework:** Look for a `src/test/java` directory and check the build file for dependencies like `junit` or `testng`.
13
+
14
+ ## 2. Core Principles
15
+
16
+ - **Style:** Strictly adhere to the project's configured linter (e.g., Checkstyle, PMD). If none exist, default to the Google Java Style Guide.
17
+ - **Object-Oriented Design:** Follow SOLID principles and use design patterns where appropriate.
18
+ - **API Design:** Follow the principles of good API design, such as keeping APIs small and focused.
19
+
20
+ ## 3. Implementation Patterns
21
+
22
+ - **Error Handling:** Replicate existing patterns for exceptions. Use checked exceptions for recoverable errors and unchecked exceptions for programming errors.
23
+ - **Testing:** Use the project's existing test structure. Write unit tests for all new code.
24
+ - **Concurrency:** Follow existing concurrency patterns. Use the `java.util.concurrent` package for high-level concurrency abstractions.
25
+
26
+ ## 4. Common Commands
27
+
28
+ - **Maven:**
29
+ - **Clean:** `mvn clean`
30
+ - **Compile:** `mvn compile`
31
+ - **Test:** `mvn test`
32
+ - **Package:** `mvn package`
33
+ - **Install:** `mvn install`
34
+ - **Gradle:**
35
+ - **Clean:** `./gradlew clean`
36
+ - **Build:** `./gradlew build`
37
+ - **Test:** `./gradlew test`
@@ -1,24 +1,45 @@
1
1
  # JavaScript/TypeScript Development Guide
2
2
 
3
- ## Core Principles
4
- - **Follow project's style guide** (ESLint, Prettier, etc.)
5
- - **Use TypeScript** if the project uses it
6
- - **Match module system** (CommonJS, ES modules)
7
-
8
- ## Project Analysis
9
- - Check for: `package.json`, `tsconfig.json`, `jsconfig.json`
10
- - Look for style guides: `.eslintrc`, `.prettierrc`, `.editorconfig`
11
- - Identify testing framework: `jest`, `mocha`, `vitest`
12
- - Check build tools: `webpack`, `vite`, `rollup`
13
-
14
- ## Implementation Patterns
15
- - **Module System:** Follow project's import/export patterns
16
- - **Error Handling:** Match promise/async patterns and error types
17
- - **TypeScript:** Use same strictness level and type patterns
18
- - **Testing:** Use project's test utilities and mocking patterns
19
-
20
- ## Common Commands
21
- - Package management: `npm`, `yarn`, `pnpm`
22
- - Testing: `npm test`, `npm run test`
23
- - Linting: `npm run lint`, `eslint`
24
- - Building: `npm run build`, `tsc`
3
+ This guide provides the baseline for JS/TS development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Package Manager:** `package.json` (and `package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`). Note the `scripts` and `dependencies`.
10
+ - **TypeScript/JavaScript Config:** `tsconfig.json` or `jsconfig.json`. This defines module system, strictness, and paths.
11
+ - **Style & Linting Config:** `.eslintrc.js`, `.prettierrc`, `package.json` (for `eslintConfig`, `prettier`). These define the coding standard.
12
+ - **Build/Vite Config:** `webpack.config.js`, `vite.config.ts`, `rollup.config.js`.
13
+ - **Testing Framework:** Look for a `tests/` or `__tests__/` directory, and config files like `jest.config.js` or `vitest.config.ts`.
14
+
15
+ ## 2. Core Principles
16
+
17
+ - **Style:** Strictly adhere to the project's configured linter (`ESLint`) and formatter (`Prettier`).
18
+ - **TypeScript:** If the project uses TypeScript (`tsconfig.json` exists), you MUST use it for all new code. Adhere to the configured strictness level.
19
+ - **Module System:** Match the project's module system (e.g., ES Modules `import/export` or CommonJS `require/module.exports`). This is usually defined in `package.json` (`"type": "module"`) or `tsconfig.json`.
20
+
21
+ ## 3. Package Management
22
+
23
+ - **`npm`:** If the project uses `package-lock.json`, add new dependencies using `npm install <package-name>`.
24
+ - **`yarn`:** If the project uses `yarn.lock`, add new dependencies using `yarn add <package-name>`.
25
+ - **`pnpm`:** If the project uses `pnpm-lock.yaml`, add new dependencies using `pnpm add <package-name>`.
26
+
27
+ ## 4. Framework Conventions
28
+
29
+ - **React:** If the project uses React, follow its component structure (e.g., functional components with hooks), state management (e.g., `useState`, `useReducer`, Redux), and JSX syntax.
30
+ - **Vue:** If the project uses Vue, follow its single-file component structure, `v-` directives, and state management patterns (e.g., Pinia).
31
+ - **Angular:** If the project uses Angular, follow its module and component structure, dependency injection, and RxJS-based patterns.
32
+
33
+ ## 5. Implementation Patterns
34
+
35
+ - **Error Handling:** Replicate existing patterns for `try/catch`, Promises (`.catch()`), and async/await error handling.
36
+ - **Testing:** Use the project's existing test runner (`Jest`, `Vitest`, `Mocha`), assertion library, and mocking patterns. Add tests for all new code.
37
+ - **Debugging:** Use the browser's developer tools for front-end code and the Node.js debugger (`node --inspect`) for back-end code.
38
+
39
+ ## 6. Common Commands
40
+
41
+ - **Install Dependencies:** `npm install`, `yarn install`, `pnpm install`
42
+ - **Linting/Formatting:** `npm run lint`, `npm run format`
43
+ - **Type Checking:** `npm run typecheck`, `tsc --noEmit`
44
+ - **Testing:** `npm test`, `npm run test`
45
+ - **Building:** `npm run build`
@@ -0,0 +1,41 @@
1
+ # Kotlin Development Guide
2
+
3
+ This guide provides the baseline for Kotlin development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Build System:** `build.gradle.kts` (Gradle with Kotlin DSL) or `pom.xml` (Maven). Note the dependencies, plugins, and build lifecycle.
10
+ - **Kotlin Version:** Look for a `.kotlin-version` file, or check the `build.gradle.kts` or `pom.xml` file.
11
+ - **Style & Linting Config:** `.editorconfig`, `.ktlint.ruleset.json`. These define the coding standard.
12
+ - **Testing Framework:** Look for a `src/test/kotlin` directory and check the build file for dependencies like `junit` or `kotest`.
13
+
14
+ ## 2. Core Principles
15
+
16
+ - **Style:** Strictly adhere to the project's configured linter (e.g., `ktlint`). If none exists, default to the official Kotlin coding conventions.
17
+ - **Idiomatic Kotlin:** Embrace Kotlin's core features:
18
+ - Use `val` and `var` correctly.
19
+ - Use null safety features (`?`, `!!`, `let`).
20
+ - Use data classes for immutable data.
21
+ - Use extension functions to add functionality to existing classes.
22
+ - **Functional Programming:** Use higher-order functions, lambdas, and collections API where it improves clarity.
23
+
24
+ ## 3. Implementation Patterns
25
+
26
+ - **Error Handling:** Replicate existing patterns for exceptions. Use `try-catch` expressions and the `Result` type.
27
+ - **Testing:** Use the project's existing test structure. Write unit tests for all new code.
28
+ - **Coroutines:** Follow existing concurrency patterns. Use coroutines for asynchronous programming.
29
+
30
+ ## 4. Common Commands
31
+
32
+ - **Gradle:**
33
+ - **Clean:** `./gradlew clean`
34
+ - **Build:** `./gradlew build`
35
+ - **Test:** `./gradlew test`
36
+ - **Maven:**
37
+ - **Clean:** `mvn clean`
38
+ - **Compile:** `mvn compile`
39
+ - **Test:** `mvn test`
40
+ - **Package:** `mvn package`
41
+ - **Install:** `mvn install`
@@ -0,0 +1,30 @@
1
+ # PHP Development Guide
2
+
3
+ This guide provides the baseline for PHP development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Dependency Management:** `composer.json` and `composer.lock`. Note the dependencies and scripts.
10
+ - **PHP Version:** Look for a `.php-version` file or check `composer.json`.
11
+ - **Style & Linting Config:** `.php-cs-fixer.php`, `phpcs.xml`. These define the coding standard.
12
+ - **Testing Framework:** Look for a `tests/` directory and check `composer.json` for dependencies like `phpunit`.
13
+
14
+ ## 2. Core Principles
15
+
16
+ - **Style:** Strictly adhere to the project's configured linter (e.g., PHP-CS-Fixer, PHP_CodeSniffer). If none exists, default to PSR-12.
17
+ - **Modern PHP:** Use modern PHP features, such as type declarations, strict types, and the null coalescing operator.
18
+ - **Frameworks:** If the project uses a framework like Laravel or Symfony, follow its conventions.
19
+
20
+ ## 3. Implementation Patterns
21
+
22
+ - **Error Handling:** Replicate existing patterns for exceptions. Use `try-catch` blocks for exception handling.
23
+ - **Testing:** Use the project's existing test structure. Write unit tests for all new code.
24
+
25
+ ## 4. Common Commands
26
+
27
+ - **Install Dependencies:** `composer install`
28
+ - **Update Dependencies:** `composer update`
29
+ - **Linting:** `vendor/bin/php-cs-fixer fix`, `vendor/bin/phpcs`
30
+ - **Testing:** `vendor/bin/phpunit`
@@ -1,23 +1,44 @@
1
1
  # Python Development Guide
2
2
 
3
- ## Core Principles
4
- - **Follow PEP 8** unless project has specific style guides
5
- - **Use type hints** if the project uses them
6
- - **Match existing patterns** for imports, docstrings, and error handling
7
-
8
- ## Project Analysis
9
- - Check for: `pyproject.toml`, `requirements.txt`, `setup.py`, `.python-version`
10
- - Look for style guides: `.flake8`, `.pylintrc`, `ruff.toml`, `mypy.ini`
11
- - Identify testing framework: `pytest`, `unittest`, `nose`
12
-
13
- ## Implementation Patterns
14
- - **Imports:** Follow project's import organization (stdlib, third-party, local)
15
- - **Error Handling:** Match existing exception patterns and logging
16
- - **Documentation:** Use same docstring format (Google, NumPy, reStructuredText)
17
- - **Testing:** Use project's test organization and fixtures
18
-
19
- ## Common Commands
20
- - Formatting: `black`, `autopep8`, `yapf`
21
- - Linting: `flake8`, `pylint`, `ruff`
22
- - Testing: `pytest`, `python -m unittest`
23
- - Type checking: `mypy`, `pyright`
3
+ This guide provides the baseline for Python development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Dependency Management:** `pyproject.toml` (and `poetry.lock` or `pdm.lock`), `requirements.txt`, `setup.py`. Note the exact libraries and versions used.
10
+ - **Virtual Environment:** Check for a `.venv` or `venv` directory. If it exists, activate it using `source .venv/bin/activate`. If not, create one using `python -m venv .venv` and then activate it.
11
+ - **Python Version:** Look for a `.python-version` file or check `pyproject.toml`.
12
+ - **Style & Linting Config:** `ruff.toml`, `pyproject.toml` (for `black`, `isort`, `ruff`), `.flake8`, `.pylintrc`. These define the coding standard.
13
+ - **Type Checking Config:** `mypy.ini`, `pyrightconfig.json`.
14
+ - **Testing Framework:** Look for a `tests/` directory, `pytest.ini`, or `tox.ini` to identify `pytest`, `unittest`, etc.
15
+
16
+ ## 2. Core Principles
17
+
18
+ - **Style:** Strictly adhere to the project's configured linter (e.g., `ruff`, `flake8`) and formatter (e.g., `black`, `autopep8`). If none exist, default to PEP 8.
19
+ - **Type Hints:** If the project uses type hints, you MUST use them for all new code. Match the existing style.
20
+ - **Imports:** Follow the project's import organization (e.g., stdlib, third-party, local). Use the configured import sorter (like `isort`).
21
+ - **Docstrings:** Match the existing docstring format (e.g., Google, NumPy, reStructuredText).
22
+
23
+ ## 3. Dependency Management
24
+
25
+ - **`pip`:** If the project uses `requirements.txt`, add new dependencies to the file and then run `pip install -r requirements.txt`.
26
+ - **`poetry`:** If the project uses `pyproject.toml` with poetry, add new dependencies using `poetry add <package-name>` and install them with `poetry install`.
27
+
28
+ ## 4. Implementation Patterns
29
+
30
+ - **Error Handling:** Replicate the existing patterns for exceptions, logging, and error wrapping.
31
+ - **Testing:** Use the project's existing test structure, fixtures, and mocking libraries. Add tests for all new code.
32
+ - **Debugging:** Use the built-in `pdb` for debugging, or `ipdb` if it's available in the project.
33
+
34
+ ## 5. Project Structure
35
+
36
+ - **Simple scripts:** For single-file scripts, keep them in the root of the project.
37
+ - **Larger projects:** For larger projects, use a `src` layout, where the main source code resides in a `src` directory. Tests should be in a separate `tests` directory.
38
+
39
+ ## 6. Common Commands
40
+
41
+ - **Formatting:** `black .`, `autopep8 .`
42
+ - **Linting:** `ruff check .`, `flake8 .`, `pylint .`
43
+ - **Type Checking:** `mypy .`, `pyright .`
44
+ - **Testing:** `pytest`, `python -m unittest discover`
@@ -0,0 +1,34 @@
1
+ # Ruby on Rails Development Guide
2
+
3
+ This guide provides the baseline for Ruby on Rails development. It is superseded by project-specific conventions.
4
+
5
+ ## 1. Project Analysis Checklist
6
+
7
+ Before coding, inspect the project for these files to determine its conventions:
8
+
9
+ - **Gemfile:** This file contains all the gems used in the project.
10
+ - **config/routes.rb:** This file defines the application's routes.
11
+ - **app/models/:** This directory contains the application's models.
12
+ - **app/views/:** This directory contains the application's views.
13
+ - **app/controllers/:** This directory contains the application's controllers.
14
+ - **db/schema.rb:** This file defines the database schema.
15
+
16
+ ## 2. Core Principles
17
+
18
+ - **Convention over Configuration:** Follow the Rails conventions for file and class naming.
19
+ - **Fat Model, Skinny Controller:** Keep your controllers thin and your models fat.
20
+ - **RESTful Design:** Use RESTful principles for your application's design.
21
+
22
+ ## 3. Implementation Patterns
23
+
24
+ - **Active Record:** Use Active Record for database interaction.
25
+ - **Action View:** Use Action View for creating views.
26
+ - **Action Controller:** Use Action Controller for handling requests and responses.
27
+
28
+ ## 4. Common Commands
29
+
30
+ - **Start the server:** `bin/rails server`
31
+ - **Run the console:** `bin/rails console`
32
+ - **Run the tests:** `bin/rails test`
33
+ - **Generate code:** `bin/rails generate`
34
+ - **Run database migrations:** `bin/rails db:migrate`