zrb 1.18.0__py3-none-any.whl → 1.18.1__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.
- zrb/task/llm/default_workflow/coding/cpp.md +33 -0
- zrb/task/llm/default_workflow/coding/csharp.md +35 -0
- zrb/task/llm/default_workflow/coding/git.md +43 -127
- zrb/task/llm/default_workflow/coding/golang.md +41 -21
- zrb/task/llm/default_workflow/coding/html-css.md +34 -0
- zrb/task/llm/default_workflow/coding/java.md +37 -0
- zrb/task/llm/default_workflow/coding/javascript.md +43 -22
- zrb/task/llm/default_workflow/coding/kotlin.md +41 -0
- zrb/task/llm/default_workflow/coding/php.md +30 -0
- zrb/task/llm/default_workflow/coding/python.md +42 -21
- zrb/task/llm/default_workflow/coding/ruby-on-rails.md +34 -0
- zrb/task/llm/default_workflow/coding/ruby.md +33 -0
- zrb/task/llm/default_workflow/coding/rust.md +36 -21
- zrb/task/llm/default_workflow/coding/shell.md +29 -225
- zrb/task/llm/default_workflow/coding/sql.md +38 -0
- zrb/task/llm/default_workflow/coding/swift.md +38 -0
- zrb/task/llm/default_workflow/coding/workflow.md +61 -43
- zrb/task/llm/default_workflow/copywriting/workflow.md +40 -17
- zrb/task/llm/default_workflow/researching/workflow.md +41 -18
- {zrb-1.18.0.dist-info → zrb-1.18.1.dist-info}/METADATA +1 -1
- {zrb-1.18.0.dist-info → zrb-1.18.1.dist-info}/RECORD +23 -13
- {zrb-1.18.0.dist-info → zrb-1.18.1.dist-info}/WHEEL +0 -0
- {zrb-1.18.0.dist-info → zrb-1.18.1.dist-info}/entry_points.txt +0 -0
|
@@ -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
|
|
1
|
+
# Git Workflow Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This guide governs all version control operations. Adhere to it for safety and consistency.
|
|
4
4
|
|
|
5
|
-
|
|
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
|
-
|
|
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
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# Check current status and branch
|
|
15
|
-
git status
|
|
16
|
-
git branch -v
|
|
14
|
+
## 2. Standard Workflow
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
git diff
|
|
20
|
-
git diff --staged
|
|
21
|
-
```
|
|
16
|
+
This is the primary development cycle.
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
git
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
33
|
-
git branch -a
|
|
34
|
-
```
|
|
32
|
+
## 3. Command Reference
|
|
35
33
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
git
|
|
40
|
-
git
|
|
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
|
-
|
|
43
|
-
git
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
git
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
git stash
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
git
|
|
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
|
-
|
|
141
|
-
git
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
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`
|