desktop-team-doc 0.1.0

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.
Files changed (151) hide show
  1. package/README.md +89 -0
  2. package/content/docs/README.md +227 -0
  3. package/content/docs/index.md +352 -0
  4. package/content/docs/instructions/coding-conventions/.clang-format +65 -0
  5. package/content/docs/instructions/coding-conventions/cpp.md +132 -0
  6. package/content/docs/instructions/coding-conventions/frontend.md +612 -0
  7. package/content/docs/instructions/coding-conventions/team-wide.md +176 -0
  8. package/content/docs/instructions/workflows/assets/jira-1.png +0 -0
  9. package/content/docs/instructions/workflows/assets/jira-comment.png +0 -0
  10. package/content/docs/instructions/workflows/assets/jira-release-note.png +0 -0
  11. package/content/docs/instructions/workflows/assets/jira-tag.png +0 -0
  12. package/content/docs/instructions/workflows/code-review.md +451 -0
  13. package/content/docs/instructions/workflows/git-branch-convention.md +246 -0
  14. package/content/docs/instructions/workflows/git-commit.md +95 -0
  15. package/content/docs/instructions/workflows/jira-process.md +173 -0
  16. package/content/docs/instructions/workflows/jira-ticket-guide.md +105 -0
  17. package/content/docs/instructions/workflows/pull-request-generation.md +319 -0
  18. package/content/docs/instructions/workflows/scrum-process.md +104 -0
  19. package/content/docs/instructions/workflows/survey-project-setup.md +76 -0
  20. package/content/docs/knowledge/architecture/README.md +11 -0
  21. package/content/docs/knowledge/architecture/audio-plugin-architecture.md +213 -0
  22. package/content/docs/knowledge/architecture/cross-platform-design.md +176 -0
  23. package/content/docs/knowledge/architecture/frontend-native-bridge.md +193 -0
  24. package/content/docs/knowledge/architecture/native-command.md +189 -0
  25. package/content/docs/knowledge/architecture/state-management-architecture.md +105 -0
  26. package/content/docs/knowledge/component-library/ControlComponent/README.md +281 -0
  27. package/content/docs/knowledge/component-library/ControlComponent/accessibility/accessibility-implementation.md +503 -0
  28. package/content/docs/knowledge/component-library/ControlComponent/common-mechanisms.md +278 -0
  29. package/content/docs/knowledge/component-library/ControlComponent/core/error-handling.md +451 -0
  30. package/content/docs/knowledge/component-library/ControlComponent/core/native-interface.md +515 -0
  31. package/content/docs/knowledge/component-library/ControlComponent/core/state-management.md +509 -0
  32. package/content/docs/knowledge/component-library/ControlComponent/creating-new-controls.md +654 -0
  33. package/content/docs/knowledge/component-library/ControlComponent/design/api-design-reference.md +1142 -0
  34. package/content/docs/knowledge/component-library/ControlComponent/design/design-principles.md +336 -0
  35. package/content/docs/knowledge/component-library/ControlComponent/design/styling-architecture.md +595 -0
  36. package/content/docs/knowledge/component-library/ControlComponent/design/visual-feedback.md +456 -0
  37. package/content/docs/knowledge/component-library/ControlComponent/development-environment.md +213 -0
  38. package/content/docs/knowledge/component-library/ControlComponent/interaction/gesture-algorithms.md +705 -0
  39. package/content/docs/knowledge/component-library/ControlComponent/interaction/touch-support.md +525 -0
  40. package/content/docs/knowledge/component-library/ControlComponent/interaction/value-processing-patterns.md +801 -0
  41. package/content/docs/knowledge/component-library/ControlComponent/interaction/velocity-damping-systems.md +741 -0
  42. package/content/docs/knowledge/component-library/ControlComponent/knob/architecture.md +490 -0
  43. package/content/docs/knowledge/component-library/ControlComponent/knob/how-to-use.md +304 -0
  44. package/content/docs/knowledge/component-library/ControlComponent/knob/index.md +105 -0
  45. package/content/docs/knowledge/component-library/ControlComponent/optimization/performance-benchmarks.md +535 -0
  46. package/content/docs/knowledge/component-library/ControlComponent/optimization/performance-optimization.md +1092 -0
  47. package/content/docs/knowledge/component-library/ControlComponent/quick-start.md +345 -0
  48. package/content/docs/knowledge/component-library/ControlComponent/slider/architecture.md +444 -0
  49. package/content/docs/knowledge/component-library/ControlComponent/slider/how-to-use.md +470 -0
  50. package/content/docs/knowledge/component-library/ControlComponent/slider/index.md +107 -0
  51. package/content/docs/knowledge/component-library/ControlComponent/testing-guide.md +950 -0
  52. package/content/docs/knowledge/component-library/ControlComponent/troubleshooting.md +657 -0
  53. package/content/docs/knowledge/component-library/frontend-develop/LICENSE.txt +176 -0
  54. package/content/docs/knowledge/component-library/frontend-develop/SKILL.md +124 -0
  55. package/content/docs/knowledge/component-library/frontend-develop/references/code-organization.md +620 -0
  56. package/content/docs/knowledge/component-library/frontend-develop/references/coding-standards.md +275 -0
  57. package/content/docs/knowledge/component-library/frontend-develop/references/component-reusability.md +559 -0
  58. package/content/docs/knowledge/component-library/frontend-develop/references/examples.md +554 -0
  59. package/content/docs/knowledge/component-library/frontend-develop/references/layout-separation.md +638 -0
  60. package/content/docs/knowledge/component-library/frontend-develop/references/performance-optimization.md +678 -0
  61. package/content/docs/knowledge/component-library/frontend-develop/references/state-management.md +331 -0
  62. package/content/docs/knowledge/component-library/frontend-develop/references/styling-guidelines.md +349 -0
  63. package/content/docs/knowledge/component-library/frontend-develop/references/type-safety.md +493 -0
  64. package/content/docs/knowledge/development/assets/cyberduck-aws-credentials.png +0 -0
  65. package/content/docs/knowledge/development/assets/postman-environment-setup.png +0 -0
  66. package/content/docs/knowledge/development/aws-storage.md +95 -0
  67. package/content/docs/knowledge/development/crm-system.md +22 -0
  68. package/content/docs/knowledge/development/glossary.md +246 -0
  69. package/content/docs/knowledge/development/pg-api-guide.md +71 -0
  70. package/content/docs/knowledge/development/staging-license-management.md +44 -0
  71. package/content/docs/knowledge/development/tech-stack.md +240 -0
  72. package/content/docs/knowledge/domain/popup-system.md +106 -0
  73. package/content/docs/knowledge/domain/sigpath.md +264 -0
  74. package/content/docs/knowledge/environment-setup/aax-signing-update.md +149 -0
  75. package/content/docs/knowledge/environment-setup/assets/aax-1.png +0 -0
  76. package/content/docs/knowledge/environment-setup/assets/aax-2.png +0 -0
  77. package/content/docs/knowledge/environment-setup/assets/aax-3.png +0 -0
  78. package/content/docs/knowledge/environment-setup/assets/aax-4.png +0 -0
  79. package/content/docs/knowledge/environment-setup/assets/aax-5.png +0 -0
  80. package/content/docs/knowledge/environment-setup/assets/aax-6.png +0 -0
  81. package/content/docs/knowledge/environment-setup/assets/aax-7.png +0 -0
  82. package/content/docs/knowledge/environment-setup/assets/buildmachine-1.png +0 -0
  83. package/content/docs/knowledge/environment-setup/assets/buildmachine-10.png +0 -0
  84. package/content/docs/knowledge/environment-setup/assets/buildmachine-11.png +0 -0
  85. package/content/docs/knowledge/environment-setup/assets/buildmachine-12.png +0 -0
  86. package/content/docs/knowledge/environment-setup/assets/buildmachine-13.png +0 -0
  87. package/content/docs/knowledge/environment-setup/assets/buildmachine-14.png +0 -0
  88. package/content/docs/knowledge/environment-setup/assets/buildmachine-2.png +0 -0
  89. package/content/docs/knowledge/environment-setup/assets/buildmachine-3.png +0 -0
  90. package/content/docs/knowledge/environment-setup/assets/buildmachine-4.png +0 -0
  91. package/content/docs/knowledge/environment-setup/assets/buildmachine-5.png +0 -0
  92. package/content/docs/knowledge/environment-setup/assets/buildmachine-6.png +0 -0
  93. package/content/docs/knowledge/environment-setup/assets/buildmachine-7.png +0 -0
  94. package/content/docs/knowledge/environment-setup/assets/buildmachine-8.png +0 -0
  95. package/content/docs/knowledge/environment-setup/assets/buildmachine-9.png +0 -0
  96. package/content/docs/knowledge/environment-setup/build-machine-setup.md +224 -0
  97. package/content/docs/knowledge/environment-setup/build-machine-troubleshooting.md +193 -0
  98. package/content/docs/knowledge/implementation-guides/adding-amp.md +190 -0
  99. package/content/docs/knowledge/implementation-guides/adding-fx.md +111 -0
  100. package/content/docs/knowledge/implementation-guides/cab-integration.md +194 -0
  101. package/content/docs/knowledge/implementation-guides/custom-pedal-integration.md +309 -0
  102. package/content/docs/knowledge/projects/BIAS_ONE_GUI/README.md +17 -0
  103. package/content/manifest.json +122 -0
  104. package/content/rules/cpp.mdc +135 -0
  105. package/content/rules/frontend.mdc +615 -0
  106. package/content/rules/index.mdc +256 -0
  107. package/content/rules/knowledge.mdc +46 -0
  108. package/content/rules/team-wide.mdc +179 -0
  109. package/content/rules/workflows.mdc +43 -0
  110. package/content/tools/agents/context-compressor.md +357 -0
  111. package/content/tools/agents/context-writer.md +328 -0
  112. package/content/tools/agents/release-notes-generator.md +389 -0
  113. package/content/tools/agents/srs-writer-agent.md +63 -0
  114. package/content/tools/mcp/README.md +25 -0
  115. package/content/tools/mcp/mcp-desktop-team.example.json +13 -0
  116. package/content/tools/skills/frontend-develop/LICENSE.txt +176 -0
  117. package/content/tools/skills/frontend-develop/SKILL.md +124 -0
  118. package/content/tools/skills/frontend-develop/references/code-organization.md +620 -0
  119. package/content/tools/skills/frontend-develop/references/coding-standards.md +275 -0
  120. package/content/tools/skills/frontend-develop/references/component-reusability.md +559 -0
  121. package/content/tools/skills/frontend-develop/references/examples.md +554 -0
  122. package/content/tools/skills/frontend-develop/references/layout-separation.md +638 -0
  123. package/content/tools/skills/frontend-develop/references/performance-optimization.md +678 -0
  124. package/content/tools/skills/frontend-develop/references/state-management.md +331 -0
  125. package/content/tools/skills/frontend-develop/references/styling-guidelines.md +349 -0
  126. package/content/tools/skills/frontend-develop/references/type-safety.md +493 -0
  127. package/content/tools/slash-commands/commit.md +17 -0
  128. package/content/tools/slash-commands/context-compress.md +149 -0
  129. package/content/tools/slash-commands/context-write.md +92 -0
  130. package/content/tools/slash-commands/jira.md +12 -0
  131. package/content/tools/slash-commands/pr-gen.md +12 -0
  132. package/content/tools/slash-commands/pr-review.md +12 -0
  133. package/dist/commands/detect.d.ts +1 -0
  134. package/dist/commands/detect.js +33 -0
  135. package/dist/commands/install.d.ts +1 -0
  136. package/dist/commands/install.js +100 -0
  137. package/dist/commands/uninstall.d.ts +1 -0
  138. package/dist/commands/uninstall.js +132 -0
  139. package/dist/index.d.ts +2 -0
  140. package/dist/index.js +53 -0
  141. package/dist/lib/detect-env.d.ts +3 -0
  142. package/dist/lib/detect-env.js +52 -0
  143. package/dist/lib/prompt-env.d.ts +3 -0
  144. package/dist/lib/prompt-env.js +16 -0
  145. package/dist/lib/resolve-doc-repo.d.ts +14 -0
  146. package/dist/lib/resolve-doc-repo.js +61 -0
  147. package/dist/lib/symlink.d.ts +7 -0
  148. package/dist/lib/symlink.js +60 -0
  149. package/dist/lib/sync-from-manifest.d.ts +8 -0
  150. package/dist/lib/sync-from-manifest.js +64 -0
  151. package/package.json +46 -0
@@ -0,0 +1,176 @@
1
+ # Team-wide Coding Conventions
2
+
3
+ *Last Updated: 2025-10-14*
4
+
5
+ This document outlines the coding conventions that apply to all Desktop Team projects across all programming languages.
6
+
7
+ ## Commenting Policy: Minimalist, Purposeful, and Agent-Aware
8
+
9
+ ### Core Principle: Code Should Be Self-Documenting
10
+
11
+ Prioritize clear naming, logical structure, and breaking down complexity over adding comments.
12
+
13
+ ### NO REDUNDANT COMMENTS
14
+
15
+ Absolutely do not add comments that simply restate what a line or block of code obviously does in plain language. This applies especially to comments that merely translate code to English.
16
+
17
+ ### EXPLAIN 'WHY', NOT 'WHAT'
18
+
19
+ If an inline comment is necessary, it MUST explain the reasoning, intent, or trade-offs behind a non-obvious piece of code, not describe the operation itself.
20
+
21
+ **Good Example:**
22
+
23
+ ```cpp
24
+ // Using a loop here due to X library's lack of batch processing for Y.
25
+ ```
26
+
27
+ **Bad Example:**
28
+
29
+ ```cpp
30
+ // Loop through the items.
31
+ ```
32
+
33
+ ### AVOID COMMENT 'NOISE'
34
+
35
+ * Do not add decorative comment blocks (e.g., `/*** Section ***/`).
36
+ * Do not comment obvious sections or self-explanatory code.
37
+ * Avoid placeholder comments like `# TODO: Add comments` or `# Further explanation needed`.
38
+
39
+ ### PERMITTED & CONCISE COMMENTS
40
+
41
+ * Explaining complex algorithms or business logic (high-level overview, not line-by-line).
42
+ * Documenting non-obvious choices or workarounds for external issues/bugs.
43
+ * `TODO`/`FIXME` notes: Must be actionable and ideally include a JIRA ticket or owner.
44
+ * Conciseness is Key: Even permitted comments should be as brief as possible while conveying the necessary information.
45
+
46
+ ### AGENT-SPECIFIC GUIDANCE (For AI Code Generation/Modification)
47
+
48
+ * **Assume Minimal Comments First**: When generating or modifying code, agents should default to adding no comments unless explicitly justified by the rules above (e.g., a non-obvious 'why').
49
+ * **Review Agent-Added Comments**: Human reviewers should be particularly critical of comments added by agents, ensuring they are not just descriptive paraphrases of the code.
50
+ * **Shell Script Comments**: For shell scripts, comments are permissible to explain complex command pipelines, non-obvious flags, or the purpose of a sequence of commands if it's not immediately clear from the commands themselves. However, avoid commenting simple, standard commands.
51
+ * Good Shell Example: `# Ensure script exits if any command fails` (before `set -e`)
52
+ * Bad Shell Example: `# List files` (before `ls -la`)
53
+
54
+ ### Header Comments
55
+
56
+ File-level header comments (explaining the purpose of a file/module) are generally acceptable if they provide a high-level overview not immediately obvious from the filename or its contents. Keep them brief.
57
+
58
+ ---
59
+
60
+ ## General Formatting Principles
61
+
62
+ ### Universal Formatting Rules
63
+
64
+ * Strive for consistent code formatting across all languages to enhance readability and maintainability.
65
+ * Specific formatting tools and configurations (e.g., `.clang-format` for C++, Prettier/ESLint for Frontend) are detailed in the language-specific guidelines.
66
+ * **As a universal rule:**
67
+ * Do not add indentation (spaces) to empty lines.
68
+ * Avoid all trailing whitespace on any line.
69
+
70
+ ---
71
+
72
+ ## Naming Conventions
73
+
74
+ ### Variables and Functions
75
+ - Use camelCase for variable and function names
76
+ - Use descriptive names that clearly indicate purpose
77
+ - Avoid abbreviations unless widely understood
78
+ - Boolean variables should start with "is", "has", or "should"
79
+
80
+ ### Classes and Interfaces
81
+ - Use PascalCase for class and interface names
82
+ - Class names should be nouns or noun phrases
83
+ - Interface names should be adjectives or nouns prefixed with "I"
84
+
85
+ ### Constants
86
+ - Use UPPER_SNAKE_CASE for constants
87
+ - Define constants at the top of the file or in a dedicated constants file
88
+
89
+ ### File Names
90
+ - Use kebab-case for file names
91
+ - Match file names to the primary class or function they contain
92
+ - Use consistent extensions (.ts, .cpp, etc.)
93
+
94
+ ## Code Formatting
95
+
96
+ ### Indentation
97
+ - Use 2 spaces for indentation (not tabs)
98
+ - Maintain consistent indentation throughout the codebase
99
+
100
+ ### Line Length
101
+ - Maximum line length: 100 characters
102
+ - Break long lines at logical points
103
+
104
+ ### Braces
105
+ - Opening braces on the same line as the statement
106
+ - Closing braces on their own line
107
+ - Always use braces for control structures, even for single-line blocks
108
+
109
+ ### Spacing
110
+ - One space after keywords (if, for, while, etc.)
111
+ - No space between function name and parentheses
112
+ - One space around operators (=, +, -, etc.)
113
+ - No trailing whitespace
114
+
115
+ ## Documentation
116
+
117
+ ### Comments
118
+ - Use JSDoc/Doxygen style for function and class documentation
119
+ - Comment complex algorithms and business logic
120
+ - Avoid obvious comments that duplicate code
121
+ - Keep comments up-to-date with code changes
122
+
123
+ ### README Files
124
+ - Each project should have a README.md file
125
+ - Include setup instructions, dependencies, and usage examples
126
+ - Document any non-standard configurations
127
+
128
+ ## Common Patterns and Anti-patterns
129
+
130
+ ### Patterns to Follow
131
+ - Dependency injection for better testability
132
+ - Early returns to reduce nesting
133
+ - Error handling with appropriate logging
134
+ - Immutable data structures where possible
135
+
136
+ ### Anti-patterns to Avoid
137
+ - Global state
138
+ - Deep nesting (more than 3 levels)
139
+ - Magic numbers (use named constants)
140
+ - Commented-out code (remove or use version control)
141
+ - Duplicate code (extract to functions/utilities)
142
+
143
+ ## Language-specific Guidelines
144
+
145
+ For detailed language-specific coding standards, see:
146
+
147
+ * [C++ Coding Standards](./cpp.md) - C++ specific rules and best practices
148
+ * [Frontend Coding Standards](./frontend.md) - React/TypeScript/JavaScript frontend development
149
+
150
+ ### Language-Specific Exceptions to Team-Wide Standards
151
+
152
+ Some languages have established conventions that differ from team-wide defaults. These exceptions are documented in their respective language-specific guides and take precedence for that language:
153
+
154
+ #### C++ Exceptions
155
+
156
+ C++ projects follow `.clang-format` configuration which differs from team-wide defaults in these areas:
157
+
158
+ * **Indentation**: 4 spaces (team-wide default: 2 spaces)
159
+ * **Function Braces**: Opening brace on separate line (team-wide default: same line)
160
+ * **Constant Naming**: `kCamelCase` prefix (team-wide default: `UPPER_SNAKE_CASE`)
161
+ * **Pointer Alignment**: Right-aligned `int *ptr` (team-wide default: unspecified)
162
+
163
+ See [C++ Coding Standards](./cpp.md) for complete details.
164
+
165
+ ## Linting and Formatting
166
+
167
+ * **Frontend (React/TypeScript/JavaScript)**: Use ESLint and Prettier (see [Frontend Coding Standards](./frontend.md))
168
+ * **TypeScript/JavaScript**: Use ESLint and Prettier
169
+ * **C++**: Use clang-format with project configuration
170
+ * Configure IDE to format on save
171
+ * Run linters as part of CI/CD pipeline
172
+
173
+ ## Related Documentation
174
+
175
+ * [Code Review Process](../workflows/code-review.md) - How to review code against these standards
176
+ * [Git Commit Convention](../workflows/git-commit.md) - How to write commit messages
@@ -0,0 +1,451 @@
1
+ # Team-wide Code Review Guidelines
2
+
3
+ Last Updated: 2025-10-16
4
+
5
+ This document outlines the code review process and guidelines for all Desktop Team projects on GitHub.
6
+
7
+ ## Code Review Checklist
8
+
9
+ ### Task Completion
10
+
11
+ - [ ] Implements requirements from JIRA ticket (verify ticket description and acceptance criteria)
12
+ - [ ] Resolves all issues mentioned in the JIRA ticket
13
+ - [ ] All acceptance criteria are met
14
+ - [ ] Testing scenarios from ticket are covered
15
+
16
+ ### Commit Quality
17
+
18
+ - [ ] Follows team git commit convention: `<type> BFD-<issue-number>: <subject>`
19
+ - [ ] Commit messages are clear and accurately describe changes
20
+ - [ ] Commit message explains "why", not just "what"
21
+ - [ ] No unnecessary merge commits (use rebase when appropriate)
22
+ - [ ] Each commit represents a logical unit of work
23
+
24
+ ### Functionality
25
+
26
+ - [ ] Code works as expected and meets requirements
27
+ - [ ] Edge cases are handled appropriately
28
+ - [ ] Error handling is implemented correctly with proper logging
29
+ - [ ] Performance considerations are addressed
30
+ - [ ] No potential crashes or logic errors
31
+
32
+ ### Code Quality
33
+
34
+ - [ ] Follows team coding style guidelines (see [Coding Conventions Reference](#coding-conventions-reference))
35
+ - [ ] No code smells (duplicated code, overly complex methods)
36
+ - [ ] Appropriate abstractions and design patterns
37
+ - [ ] Maintainable and readable code
38
+ - [ ] No deep nesting (max 3 levels)
39
+ - [ ] No magic numbers (use named constants)
40
+
41
+ ### Commenting Policy (Critical)
42
+
43
+ - [ ] **NO redundant comments** that restate what code obviously does
44
+ - [ ] Comments explain "WHY", not "WHAT"
45
+ - [ ] No decorative comment blocks or placeholder comments
46
+ - [ ] TODOs/FIXMEs include actionable notes and JIRA tickets
47
+ - [ ] Comments are concise and purposeful
48
+ - [ ] Code is self-documenting through clear naming and structure
49
+
50
+ ### Naming Conventions
51
+
52
+ - [ ] Variables/functions use proper casing (camelCase for TS/JS, per language standards)
53
+ - [ ] Classes/interfaces use PascalCase
54
+ - [ ] Constants properly formatted (UPPER_SNAKE_CASE for TS/JS, kCamelCase for C++)
55
+ - [ ] Boolean variables start with "is", "has", or "should"
56
+ - [ ] Names are descriptive and avoid unclear abbreviations
57
+ - [ ] File names follow conventions (kebab-case for TS/JS, PascalCase for C++)
58
+
59
+ ### Formatting
60
+
61
+ - [ ] Indentation correct (2 spaces for TS/JS, 4 spaces for C++)
62
+ - [ ] Line length under limit (100 chars for C++, 120 chars for frontend)
63
+ - [ ] Braces used for all control structures (even single-line)
64
+ - [ ] No trailing whitespace
65
+ - [ ] No indentation on empty lines
66
+ - [ ] Passes linter checks (ESLint/Prettier for frontend, clang-format for C++)
67
+
68
+ ### Testing
69
+
70
+ - [ ] Unit tests cover critical functionality
71
+ - [ ] Tests are meaningful and not just for coverage
72
+ - [ ] Edge cases are tested
73
+ - [ ] Mocks and test doubles are used appropriately
74
+ - [ ] Tests follow testing best practices (test behavior, not implementation)
75
+
76
+ ### Documentation
77
+
78
+ - [ ] README and project documentation updated if needed
79
+ - [ ] API documentation complete for public interfaces
80
+ - [ ] Complex algorithms include high-level overview comments (not line-by-line)
81
+ - [ ] Non-obvious design choices are documented
82
+
83
+ ### Security
84
+
85
+ - [ ] No obvious security vulnerabilities
86
+ - [ ] Sensitive data is handled securely
87
+ - [ ] Input validation is implemented
88
+ - [ ] Authentication and authorization checks are in place
89
+ - [ ] No hardcoded credentials or secrets
90
+
91
+ ### Architecture & Patterns
92
+
93
+ - [ ] Follows established architectural patterns from knowledge base
94
+ - [ ] Consistent with existing codebase patterns
95
+ - [ ] No violations of dependency injection principles
96
+ - [ ] Proper separation of concerns
97
+ - [ ] Cross-references knowledge base for affected components
98
+
99
+ ### Frontend-Specific (React/TypeScript)
100
+
101
+ - [ ] Components follow proper structure (imports, types, hooks, handlers, render)
102
+ - [ ] State management: Redux 或 Local State;不新增 Zustand
103
+ - [ ] Props are properly typed with interfaces
104
+ - [ ] Always use braces for functions and control statements
105
+ - [ ] Use `axios` for API calls (exception: XMLHttpRequest for native commands)
106
+ - [ ] Avoid indiscriminate props spreading
107
+ - [ ] Use `twMerge` for Tailwind class merging
108
+ - [ ] Path aliases use `@/src/` pattern
109
+ - [ ] Custom hooks start with `use` prefix
110
+ - [ ] No `any` types (use specific types or `unknown`)
111
+
112
+ ### C++-Specific
113
+
114
+ - [ ] Follows `.clang-format` configuration exactly
115
+ - [ ] Smart pointers used for ownership management
116
+ - [ ] Lambda capture lists are explicit
117
+ - [ ] Auto with trailing return type syntax: `auto func() -> ReturnType`
118
+ - [ ] Class members end with underscore, struct members do not
119
+ - [ ] Header guards use `#pragma once`
120
+ - [ ] Pointer alignment is right-aligned (`int *ptr`)
121
+
122
+ ## Review Process Workflow on GitHub
123
+
124
+ ### 1. Preparation (Author)
125
+
126
+ - Create a pull request (PR) on GitHub
127
+ - Link JIRA ticket in PR description (use "Fixes BFD-XXX" or "Resolves BFD-XXX")
128
+ - Assign appropriate reviewers
129
+ - Provide context and testing instructions in PR description
130
+ - Ensure PR title follows format: `<type> BFD-<issue-number>: <subject>`
131
+ - Add appropriate labels (bug, enhancement, documentation, etc.)
132
+
133
+ ### 2. Initial Review (Reviewer)
134
+
135
+ - Review code changes within expected time frame (see [Time Expectations](#time-expectations))
136
+ - Check out the branch locally if needed for testing
137
+ - Use the review checklist above systematically
138
+ - Add review comments directly on specific code lines in GitHub
139
+ - Provide constructive feedback with clear explanations
140
+ - Reference knowledge base when applicable
141
+ - Mark conversations as resolved only when issue is addressed
142
+
143
+ ### 3. Discussion
144
+
145
+ - Author responds to all feedback
146
+ - Discussions happen in PR comments (use GitHub's threaded conversations)
147
+ - Complex issues may require video calls or pair programming
148
+ - Tag reviewers with @mention when clarification is needed
149
+ - Use "Request changes" for blocking issues, "Comment" for suggestions
150
+
151
+ ### 4. Revisions (Author)
152
+
153
+ - Make requested changes in new commits (don't force-push during review)
154
+ - Respond to all comments explaining changes or providing rationale
155
+ - Mark conversations as resolved after addressing
156
+ - Request re-review from reviewers when ready
157
+ - Update PR description if scope changes
158
+
159
+ ### 5. Approval (Reviewer)
160
+
161
+ - Re-review changes after author updates
162
+ - Approve when all blocking issues are addressed
163
+ - Required number of approvals must be met (see [Required Approvals](#required-approvals))
164
+ - All CI/CD checks must pass (build, tests, linters)
165
+ - All conversations should be resolved
166
+
167
+ ### 6. Merge (Author or Tech Lead)
168
+
169
+ - Ensure all approvals are obtained
170
+ - Verify CI/CD pipeline is green
171
+ - Use appropriate merge strategy:
172
+ - **Squash and merge** for feature branches with many small commits
173
+ - **Rebase and merge** for clean commit history
174
+ - **Merge commit** when preserving branch history is important
175
+ - Delete source branch after merge
176
+ - Verify JIRA ticket is automatically updated/closed
177
+ - Monitor deployment if auto-deploy is enabled
178
+
179
+ ## Systematic Review Process
180
+
181
+ For thorough code reviews, follow this systematic approach:
182
+
183
+ ### Phase 1: Context Understanding
184
+
185
+ 1. **Read JIRA Ticket**
186
+ - Understand requirements and acceptance criteria
187
+ - Note specific testing scenarios
188
+ - Check for architectural decisions or constraints
189
+
190
+ 2. **Review PR Description**
191
+ - Understand author's approach and reasoning
192
+ - Note any specific areas author flagged for attention
193
+ - Check for related PRs or dependencies
194
+
195
+ 3. **Check Commit History**
196
+ - Review commit messages for clarity
197
+ - Understand logical progression of changes
198
+ - Verify each commit is atomic and follows conventions
199
+
200
+ ### Phase 2: Code Analysis
201
+
202
+ 1. **Examine Diff Summary**
203
+ - Get overview of all changed files
204
+ - Identify scope and impact of changes
205
+ - Check for unexpected file changes
206
+
207
+ 2. **Review Files Systematically**
208
+ - Start with core logic files (header → source, core → peripheral)
209
+ - Check test files for adequate coverage
210
+ - Review configuration or build file changes
211
+ - Examine documentation updates
212
+
213
+ 3. **Deep Dive Analysis**
214
+ - Check against coding standards and conventions
215
+ - Verify logic correctness and edge case handling
216
+ - Look for potential performance issues
217
+ - Check for security vulnerabilities
218
+ - Cross-reference with knowledge base patterns
219
+
220
+ ### Phase 3: Holistic Review
221
+
222
+ 1. **Test Coverage**
223
+ - Verify tests exist for new functionality
224
+ - Check if edge cases are tested
225
+ - Ensure tests are meaningful
226
+
227
+ 2. **Architecture Consistency**
228
+ - Verify changes align with existing patterns
229
+ - Check if new patterns are documented
230
+ - Ensure proper separation of concerns
231
+
232
+ 3. **Documentation**
233
+ - Verify README or docs are updated if needed
234
+ - Check if complex logic has appropriate comments
235
+ - Ensure API changes are documented
236
+
237
+ ### Phase 4: Providing Feedback
238
+
239
+ 1. **Categorize Comments**
240
+ - **Blocking**: Must be fixed before merge (security, bugs, violations)
241
+ - **Important**: Should be addressed (best practices, maintainability)
242
+ - **Suggestion**: Nice to have (optimizations, alternative approaches)
243
+
244
+ 2. **Write Clear Comments**
245
+ - Be specific about the issue
246
+ - Explain WHY, not just WHAT
247
+ - Suggest concrete solutions when possible
248
+ - Reference documentation or standards
249
+ - Use GitHub's suggestion feature for simple fixes
250
+
251
+ 3. **Provide Summary**
252
+ - Give overall assessment
253
+ - Highlight good practices
254
+ - Summarize key concerns
255
+ - Suggest next steps
256
+
257
+ ## Feedback Guidelines
258
+
259
+ ### For Reviewers
260
+
261
+ - Be specific and clear about issues with file paths and line numbers
262
+ - Explain why a change is needed, not just what to change
263
+ - Suggest solutions when possible with code examples
264
+ - Distinguish between blocking issues and suggestions
265
+ - Acknowledge good code and practices
266
+ - Be timely with reviews (see [Time Expectations](#time-expectations))
267
+ - Use a constructive and respectful tone
268
+ - Reference relevant documentation or standards
269
+ - Avoid redundancy - check if others already raised the same point
270
+
271
+ ### For Authors
272
+
273
+ - Be open to feedback and assume good intent
274
+ - Explain design decisions when necessary
275
+ - Ask for clarification if feedback is unclear
276
+ - Address all comments before requesting re-review
277
+ - Thank reviewers for their time and input
278
+ - Don't take criticism personally
279
+ - If you disagree, explain your reasoning respectfully
280
+ - Update code and respond to comments promptly
281
+
282
+ ## Required Approvals
283
+
284
+ ### Standard Changes
285
+
286
+ - At least **one approval** from a team member
287
+ - Changes affecting multiple components require approval from each component owner
288
+ - All automated checks must pass (CI/CD, tests, linters)
289
+
290
+ ### Critical Changes
291
+
292
+ - At least **two approvals**, including one senior developer
293
+ - Changes to core functionality require approval from the technical lead
294
+ - Security-related changes require approval from the security team
295
+ - Database schema changes require DBA review
296
+
297
+ ### Documentation Changes
298
+
299
+ - One approval from a team member
300
+ - Major documentation changes require approval from the technical writer or documentation owner
301
+
302
+ ## Time Expectations
303
+
304
+ - **Small changes (< 200 lines)**: Review within 24 hours
305
+ - **Medium changes (200-1000 lines)**: Review within 48 hours
306
+ - **Large changes (> 1000 lines)**: Break into smaller PRs when possible, otherwise allow up to 72 hours
307
+
308
+ **Note**: Authors should break down large features into smaller, reviewable PRs. If a PR exceeds 1000 lines, consider whether it can be split into logical increments.
309
+
310
+ ## Using GitHub CLI for Reviews
311
+
312
+ You can use the GitHub CLI (`gh`) for efficient PR reviews:
313
+
314
+ ```bash
315
+ # View PR details
316
+ gh pr view <PR-number>
317
+
318
+ # Check out PR branch locally
319
+ gh pr checkout <PR-number>
320
+
321
+ # List all open PRs
322
+ gh pr list
323
+
324
+ # Add review comment
325
+ gh pr review <PR-number> --comment -b "Review comments"
326
+
327
+ # Approve PR
328
+ gh pr review <PR-number> --approve
329
+
330
+ # Request changes
331
+ gh pr review <PR-number> --request-changes -b "Changes needed"
332
+
333
+ # Check PR status and checks
334
+ gh pr checks <PR-number>
335
+ ```
336
+
337
+ ## Commit-by-Commit Review
338
+
339
+ For complex PRs, reviewers may request a commit-by-commit walkthrough:
340
+
341
+ 1. **Review Each Commit Individually**
342
+ - Examine what each commit changes
343
+ - Verify commit message accurately describes changes
344
+ - Check that each commit is logical and atomic
345
+
346
+ 2. **Check Commit Progression**
347
+ - Ensure commits build upon each other logically
348
+ - Verify no "fix previous commit" commits (should be squashed)
349
+ - Check that test commits come with implementation commits
350
+
351
+ 3. **Provide Targeted Feedback**
352
+ - Comment on specific commits when issues are introduced
353
+ - Help author understand where to refactor
354
+ - Guide on commit organization for future PRs
355
+
356
+ ## Handling Disagreements
357
+
358
+ 1. **Discuss in PR comments** with clear reasoning and references to standards
359
+ 2. **If unresolved**, schedule a short meeting with relevant stakeholders
360
+ 3. **If still unresolved**, escalate to the technical lead for final decision
361
+ 4. **Document the decision** and reasoning in the PR comments
362
+ 5. **Update documentation** if the decision affects team standards
363
+
364
+ ## Common Review Pitfalls to Avoid
365
+
366
+ ### Pitfalls for Reviewers
367
+
368
+ - ❌ Nitpicking on style (should be caught by linters)
369
+ - ❌ Requesting changes without explanation
370
+ - ❌ Being vague ("this could be better")
371
+ - ❌ Reviewing entire PR in one massive comment
372
+ - ❌ Not testing changes locally when needed
373
+ - ❌ Ignoring PR for days
374
+
375
+ ### Pitfalls for Authors
376
+
377
+ - ❌ Getting defensive about feedback
378
+ - ❌ Making changes without explaining why
379
+ - ❌ Marking conversations as resolved before addressing
380
+ - ❌ Force-pushing during active review
381
+ - ❌ Creating PRs that are too large
382
+ - ❌ Not responding to comments
383
+
384
+ ## Coding Conventions Reference
385
+
386
+ ### Quick Reference by Language
387
+
388
+ #### TypeScript/JavaScript (Frontend)
389
+
390
+ - Indentation: 2 spaces
391
+ - Line length: 120 characters
392
+ - Naming: camelCase (variables/functions), PascalCase (components/classes)
393
+ - Constants: UPPER_SNAKE_CASE
394
+ - Files: kebab-case.tsx
395
+ - Comments: Explain "why", not "what"
396
+ - Linter: ESLint + Prettier
397
+
398
+ #### C++ (Native)
399
+
400
+ - Indentation: 4 spaces
401
+ - Line length: 100 characters
402
+ - Naming: camelCase (variables), PascalCase (classes), kCamelCase (constants)
403
+ - Class members: trailing underscore (camelCase_)
404
+ - Files: PascalCase.hpp / PascalCase.cpp
405
+ - Pointer: Right-aligned (`int *ptr`)
406
+ - Comments: Explain "why", not "what"
407
+ - Format: clang-format (source of truth)
408
+
409
+ ### Detailed Conventions
410
+
411
+ For complete details, see:
412
+
413
+ - [Team-wide Coding Conventions](../coding-conventions/team-wide.md)
414
+ - [C++ Coding Standards](../coding-conventions/cpp.md)
415
+ - [Frontend Coding Standards](../coding-conventions/frontend.md)
416
+ - [Git Commit Convention](./git-commit.md)
417
+
418
+ ## Technology Stack Reference
419
+
420
+ ### Frontend Stack
421
+
422
+ - **Framework**: React 18.2+ with TypeScript 5.0+
423
+ - **Build Tool**: Vite 4.4+
424
+ - **State**: Redux 或 Local State(Zustand 僅既有保留)
425
+ - **Styling**: TailwindCSS(專案已不再使用 Emotion)
426
+ - **API Client**: Axios (standard), XMLHttpRequest (native commands only)
427
+ - **Testing**: Vitest + React Testing Library
428
+
429
+ ### C++ Native Stack
430
+
431
+ - **Standard**: C++17/20
432
+ - **Memory**: Smart pointers (std::unique_ptr, std::shared_ptr)
433
+ - **Build**: CMake
434
+ - **Testing**: Catch2 or Google Test
435
+
436
+ ## Continuous Improvement
437
+
438
+ - Regularly review and update these guidelines
439
+ - Share best practices from reviews in team meetings
440
+ - Use metrics to identify bottlenecks in the review process
441
+ - Provide training for new team members on effective code reviews
442
+ - Collect feedback on the review process and iterate
443
+
444
+ ## Related Resources
445
+
446
+ - [Git Commit Convention](./git-commit.md) - Commit message format
447
+ - [JIRA Process](./jira-process.md) - Ticket workflow
448
+ - [Team-wide Coding Conventions](../coding-conventions/team-wide.md) - Universal standards
449
+ - [C++ Coding Standards](../coding-conventions/cpp.md) - C++ specific rules
450
+ - [Frontend Coding Standards](../coding-conventions/frontend.md) - React/TypeScript standards
451
+ - [Knowledge Base](../../knowledge/) - Architectural patterns and decisions