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
package/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # desktop-team-doc CLI
2
+
3
+ CLI to install Desktop Team AI rules, skills, MCP, and commands into a project.
4
+
5
+ ## One-Shot Install (Recommended)
6
+
7
+ Users who install the packaged CLI can run `install` **without** specifying a doc repo. The doc content is bundled in the package.
8
+
9
+ ```bash
10
+ npm install -D desktop-team-doc
11
+ npx desktop-team-doc install
12
+ ```
13
+
14
+ The CLI will prompt you to select your AI environment (Cursor, Claude Code, Roo Code, or Gemini), then copy docs, rules, commands, skills, and agents to the appropriate location. Re-running install syncs files from the manifest, restoring deleted or modified files.
15
+
16
+ ## Install Structure
17
+
18
+ Paths are relative to the target project directory (default: cwd).
19
+
20
+ | Environment | docs | rules | commands | skills | agents | mcp |
21
+ |--------------|------|-------|----------|--------|--------|-----|
22
+ | **cursor** | `.cursor/docs` | `.cursor/rules` | `.cursor/commands/team` | `.cursor/skills` | `.cursor/agents` | `.cursor/mcp.json` (optional, `--mcp`) |
23
+ | **claude** | `.claude/docs` | `.claude/rules` | `.claude/commands/team` | `.claude/skills` | `.claude/agents` | - |
24
+ | **roo** | `.roo/rules/desktop-team-documentation` | - | - | - | - | `.cursor/mcp.json` (optional, `--mcp`) |
25
+ | **gemini** | `.gemini/docs` | `.gemini/rules` | `.gemini/commands/team` | - | `.gemini/agents` | - |
26
+
27
+ ### docs/knowledge Structure
28
+
29
+ Installed under `docs/knowledge`:
30
+
31
+ | Subdirectory | Contents |
32
+ |---------------|----------|
33
+ | `architecture/` | Team-wide architecture patterns (audio-plugin, frontend-native-bridge, state-management) |
34
+ | `development/` | Dev resources, glossary, API guides, project setup |
35
+ | `environment-setup/` | Build machine, AAX signing, troubleshooting |
36
+ | `projects/` | Project-specific knowledge (e.g. BIAS_ONE_GUI) |
37
+ | `implementation-guides/` | How-to guides (adding amp, FX, cab, custom pedal) |
38
+ | `component-library/` | Reusable component docs (ControlComponent, frontend-develop Skill) |
39
+ | `domain/` | Domain concepts (signal-path, popup-system) |
40
+
41
+ ## Local Pack and Use in Another Project
42
+
43
+ ### 1. Build and Pack (from this repo)
44
+
45
+ ```bash
46
+ cd tools/cli
47
+ npm run pack:local # Runs bundle, then packs
48
+ ```
49
+
50
+ This bundles the doc content and produces `packages/desktop-team-doc-0.1.0.tgz`.
51
+
52
+ ### 2. Install CLI in Your Project
53
+
54
+ ```bash
55
+ # From tarball
56
+ npm install -D /path/to/desktop-team-documentation/tools/cli/packages/desktop-team-doc-0.1.0.tgz
57
+
58
+ # Or from directory
59
+ npm install -D file:../path/to/desktop-team-documentation/tools/cli
60
+ ```
61
+
62
+ ### 3. Install AI Docs
63
+
64
+ ```bash
65
+ npx desktop-team-doc install
66
+ ```
67
+
68
+ Content is bundled in the package.
69
+
70
+ ### 4. Verify
71
+
72
+ ```bash
73
+ npx desktop-team-doc detect
74
+ ```
75
+
76
+ ## Commands
77
+
78
+ | Command | Description |
79
+ |---------|-------------|
80
+ | `desktop-team-doc install [options]` | Install Rules, Skills, Commands, MCP into current project |
81
+ | `desktop-team-doc detect` | Show detected environment and install targets |
82
+ | `desktop-team-doc uninstall` | Remove installed files and MCP config |
83
+
84
+ ## Install Options
85
+
86
+ - `--target-dir=PATH` - Target project directory (default: cwd)
87
+ - `--environment=cursor|claude|roo|all` - Override auto-detection
88
+ - `--rules` / `--skills` / `--mcp` - Install only specific components
89
+ - `--dry-run` - Preview what would be installed without making changes
@@ -0,0 +1,227 @@
1
+ # Desktop Team Documentation
2
+
3
+ > **Architecture Version**: 1.0 (Context Engineering Model)
4
+ > **Last Updated**: 2025-10-16
5
+
6
+ This repository contains comprehensive documentation for the Desktop Team, structured using **Context Engineering** principles for optimal AI assistant integration and human readability.
7
+
8
+ ## 🎯 Quick Start
9
+
10
+ **New to this documentation?** Start here:
11
+
12
+ 1. Read [index.md](./index.md) to understand the Context Engineering architecture
13
+ 2. Check [Instructions](#instructions-must-follow) for coding standards and workflows
14
+ 3. Explore [Knowledge](#knowledge-reference-information) for system architecture
15
+ 4. Use [Tools](#tools-automation) for automation and workflows
16
+
17
+ ## 📂 Repository Structure
18
+
19
+ This repository is organized into three context types based on AI Engineering best practices:
20
+
21
+ ### `instructions/` - Context Type: Instructions
22
+
23
+ **What**: Rules, standards, and processes that must be followed
24
+
25
+ **Contains**:
26
+
27
+ * [coding-conventions/](./instructions/coding-conventions/) - How code should be written
28
+ * [team-wide.md](./instructions/coding-conventions/team-wide.md) - Universal coding conventions
29
+ * [cpp.md](./instructions/coding-conventions/cpp.md) - C++ specific standards
30
+ * [frontend.md](./instructions/coding-conventions/frontend.md) - React/TypeScript/JavaScript frontend development
31
+ * [typescript.md](./instructions/coding-conventions/typescript.md) - TypeScript/JavaScript standards
32
+ * [workflows/](./instructions/workflows/) - How work should be done
33
+ * [git-commit.md](./instructions/workflows/git-commit.md) - Git commit message standards
34
+ * [code-review.md](./instructions/workflows/code-review.md) - Code review process
35
+ * [jira-ticket-guide.md](./instructions/workflows/jira-ticket-guide.md) - How to create proper Jira tickets
36
+ * [jira-process.md](./instructions/workflows/jira-process.md) - JIRA automated workflow
37
+ * [projects/](./instructions/projects/) - Project-specific guidelines
38
+ * [BIAS_ONE/coding-style.md](./instructions/projects/BIAS_ONE/coding-style.md) - BIAS_ONE coding style
39
+ * [BIAS_ONE/pg-log-guide.md](./instructions/projects/BIAS_ONE/pg-log-guide.md) - PG logging guide
40
+ * [documentation-standards.md](./instructions/documentation-standards.md) - How to maintain documentation
41
+ * [knowledge-base-management.md](./instructions/knowledge-base-management.md) - KB management rules
42
+
43
+ ### `knowledge/` - Context Type: Knowledge
44
+
45
+ **What**: Factual information, architectural decisions, and domain expertise
46
+
47
+ **Contains**:
48
+
49
+ * [development/](./knowledge/development/) - Development resources, tech stack, glossary
50
+ * [tech-stack.md](./knowledge/development/tech-stack.md) - Development tech stack overview
51
+ * [glossary.md](./knowledge/development/glossary.md) - Variable naming and domain terminology
52
+ * [environment-setup/](./knowledge/environment-setup/) - Build machines, CI/CD infrastructure setup
53
+ * [build-machine-setup.md](./knowledge/environment-setup/build-machine-setup.md) - Build machine setup guide
54
+ * [build-machine-troubleshooting.md](./knowledge/environment-setup/build-machine-troubleshooting.md) - Build machine troubleshooting
55
+ * [aax-signing-update.md](./knowledge/environment-setup/aax-signing-update.md) - AAX signing update guide
56
+ * [architecture/](./knowledge/architecture/) - Architecture patterns & design principles (team-wide, reusable)
57
+ * [component-library/](./knowledge/component-library/) - Reusable UI component documentation
58
+ * [implementation-guides/](./knowledge/implementation-guides/) - How-to guides (adding amp, FX, cab, etc.)
59
+ * [projects/](./knowledge/projects/) - Project-specific knowledge (e.g. BIAS_ONE_GUI)
60
+ * [domain/](./knowledge/domain/) - Domain knowledge (audio DSP, plugin formats, etc.)
61
+
62
+ ### `tools/` - Context Type: Tools
63
+
64
+ **What**: Executable tools, scripts, and automation
65
+
66
+ **Contains**:
67
+
68
+ * [agents/](./tools/agents/) - AI agent definitions
69
+ * [context-writer.md](./tools/agents/context-writer.md) - Interactive workflow for adding new documentation
70
+ * [slash-commands/](./tools/slash-commands/) - Claude Code workflow commands
71
+ * [context-write.md](./tools/slash-commands/context-write.md) - Create new documentation
72
+ * [jira.md](./tools/slash-commands/jira.md) - JIRA ticket implementation
73
+ * [pr-gen.md](./tools/slash-commands/pr-gen.md) - Pull request generation
74
+ * [pr-review.md](./tools/slash-commands/pr-review.md) - Pull request review
75
+ * [commit.md](./tools/slash-commands/commit.md) - Standardized commits
76
+ * [utilities/](./tools/utilities/) - Helper scripts and tools
77
+
78
+ ## 🚀 Integration with AI Code Assistants
79
+
80
+ This documentation is optimized for AI assistant integration using Context Engineering principles.
81
+
82
+ ### Claude Code Integration
83
+
84
+ #### 1. Reference Team Documentation
85
+
86
+ Add to your `~/.claude/CLAUDE.md`:
87
+
88
+ ```markdown
89
+ ## Team Rules (Desktop Team)
90
+ @/path/to/desktop-team-documentation/index.md
91
+ ```
92
+
93
+ This allows Claude Code to automatically reference team guidelines with proper context type understanding.
94
+
95
+ #### 2. Set Up Team Slash Commands
96
+
97
+ ```bash
98
+ # Create the commands directory
99
+ mkdir -p ~/.claude/commands
100
+
101
+ # Create a symbolic link to team slash commands
102
+ ln -s /path/to/desktop-team-documentation/tools/slash-commands ~/.claude/commands/team
103
+ ```
104
+
105
+ **Available commands:**
106
+
107
+ * `/team:context-write [topic?] [type?]` - Create new documentation (interactive workflow)
108
+ * `/team:context-compress [mode?]` - Maintain repository quality (fix broken links, remove obsolete content)
109
+ * `/team:jira [ticket-url-or-number]` - JIRA ticket implementation workflow
110
+ * `/team:pr-gen [jira-tickets?] [target-branch?]` - Generate pull request
111
+ * `/team:pr-review [pr-link-or-branch?]` - Review pull request
112
+ * `/team:commit [repo-path?] [issue-number?]` - Standardized git commit
113
+
114
+ ### Roo Code Integration
115
+
116
+ ```bash
117
+ # Create the .roo/rules directory
118
+ mkdir -p <working_directory>/.roo/rules
119
+
120
+ # Create a symbolic link
121
+ ln -s /path/to/desktop-team-documentation <working_directory>/.roo/rules/desktop-team-documentation
122
+ ```
123
+
124
+ ## 📖 Usage Guide
125
+
126
+ ### For Developers
127
+
128
+ **I want to...**
129
+
130
+ * **Write code** → Check [instructions/coding-conventions/](./instructions/coding-conventions/)
131
+ * **Understand workflows** → Check [instructions/workflows/](./instructions/workflows/)
132
+ * **Learn architecture patterns** → Check [knowledge/architecture/](./knowledge/architecture/)
133
+ * **Set up my environment** → Check [knowledge/development/](./knowledge/development/)
134
+ * **Debug an issue** → Check [knowledge/debugging/](./knowledge/debugging/)
135
+ * **Use automation tools** → Check [tools/](./tools/)
136
+
137
+ ### For AI Assistants
138
+
139
+ When processing requests, load context based on type:
140
+
141
+ 1. **Generating/reviewing code?** → Load `instructions/coding-conventions/`
142
+ 2. **Understanding architecture patterns?** → Load `knowledge/architecture/`
143
+ 3. **Executing workflows?** → Load `tools/slash-commands/` or `tools/agents/`
144
+ 4. **Multiple needs?** → Load in priority: Instructions → Knowledge → Tools
145
+
146
+ See [index.md](./index.md) for detailed guidance on context usage.
147
+
148
+ ## 🏗️ Architecture Principles
149
+
150
+ This documentation structure implements:
151
+
152
+ * **Context Management** - Write, Select, Compress, Isolate
153
+ * **Failure Prevention** - No context poisoning, distraction, confusion, or clash
154
+ * **AI Optimization** - Clear intent, efficient loading, reduced pollution
155
+ * **Human Usability** - Easy navigation, clear organization, logical hierarchy
156
+
157
+ For detailed explanation of the architecture, see [index.md](./index.md).
158
+
159
+ ## 🤝 Contributing
160
+
161
+ ### Adding New Content
162
+
163
+ **Before adding content, determine the context type:**
164
+
165
+ 1. **Is it prescriptive?** (telling people what to do) → `instructions/`
166
+ 2. **Is it descriptive?** (explaining how things work) → `knowledge/`
167
+ 3. **Is it functional?** (providing automation) → `tools/`
168
+
169
+ ### Contribution Guidelines
170
+
171
+ * Follow the established three-tier structure
172
+ * Include "Last Updated" timestamps in file headers
173
+ * Submit changes via pull request with review
174
+ * Maintain cross-references between related content
175
+ * Update [index.md](./index.md) when adding major sections
176
+
177
+ ## 🔄 Maintenance Schedule
178
+
179
+ * **Instructions**: Review quarterly or when standards change
180
+ * **Knowledge**: Update when architecture or design decisions change
181
+ * **Tools**: Maintain when workflows evolve
182
+
183
+ ## 🆕 Setup for New Team Members
184
+
185
+ 1. **Clone this repository:**
186
+
187
+ ```bash
188
+ git clone git@github.com:Positive-LLC/desktop-team-documentation.git
189
+ ```
190
+
191
+ 2. **Read the architecture guide:**
192
+
193
+ Start with [index.md](./index.md) to understand the Context Engineering model
194
+
195
+ 3. **Set up AI assistant integration:**
196
+
197
+ Follow the [Integration](#integration-with-ai-code-assistants) instructions above
198
+
199
+ 4. **Review relevant documentation:**
200
+
201
+ * [Team-wide Coding Conventions](./instructions/coding-conventions/team-wide.md)
202
+ * Language-specific standards: [C++](./instructions/coding-conventions/cpp.md), [Frontend](./instructions/coding-conventions/frontend.md), [TypeScript](./instructions/coding-conventions/typescript.md)
203
+ * [Git Commit Convention](./instructions/workflows/git-commit.md)
204
+ * [Code Review Process](./instructions/workflows/code-review.md)
205
+ * [Architecture Patterns](./knowledge/architecture/) - Team-wide reusable patterns
206
+
207
+ 5. **Bookmark key documents**
208
+
209
+ ## 📝 Version History
210
+
211
+ | Version | Date | Changes |
212
+ |---------|------------|-------------------------------------------|
213
+ | 2.0 | 2025-10-14 | Restructured to Context Engineering model |
214
+ | 1.0 | 2025-05-13 | Initial flat structure |
215
+
216
+ ## 💬 Feedback
217
+
218
+ For questions, suggestions, or major structural changes:
219
+
220
+ * **Architecture Owner**: Gary Hsieh (<gary.hsieh@positivegrid.com>)
221
+ * **Discussion**: Please discuss major structural changes with the team before implementation
222
+
223
+ ---
224
+
225
+ **Team**: Positive Grid Desktop Team
226
+ **Repository**: desktop-team-documentation
227
+ **Architecture**: Context Engineering (v2.0)
@@ -0,0 +1,352 @@
1
+ # Desktop Team Documentation - Context Engineering Architecture
2
+
3
+ > **Last Updated**: 2025-10-16
4
+ > **Maintained by**: Positive Grid Desktop Team
5
+ > **Architecture Version**: 1.0
6
+
7
+ ---
8
+
9
+ ## 🎯 Architecture Overview
10
+
11
+ This documentation repository is structured based on **Context Engineering** principles, specifically designed for optimal AI assistant integration and human readability. The architecture follows the three fundamental context types defined in modern AI engineering practices.
12
+
13
+ ### Why This Structure?
14
+
15
+ Traditional documentation often mixes "what to do" (instructions), "what we know" (knowledge), and "how to do it" (tools) in a single hierarchy, leading to:
16
+
17
+ - **Context Confusion** - AI assistants struggle to distinguish between rules and reference information
18
+ - **Context Distraction** - Irrelevant information dilutes critical context
19
+ - **Inefficient Retrieval** - Harder for both humans and AI to locate the right information quickly
20
+
21
+ By separating content into three distinct context types, we achieve:
22
+
23
+ - **Clear Intent** - Each directory has a single, well-defined purpose
24
+ - **Efficient Context Loading** - AI assistants can load only relevant context
25
+ - **Scalable Organization** - Easy to maintain and extend as the team grows
26
+ - **Better AI Performance** - Reduced context pollution and improved accuracy
27
+
28
+ ---
29
+
30
+ ## 📂 Three-Tier Context Architecture
31
+
32
+ ### 1. `instructions/` - Context Type: Instructions
33
+
34
+ **Purpose**: Defines behavioral rules, standards, and processes that must be followed.
35
+
36
+ **Content Type**: Prescriptive, normative, actionable
37
+
38
+ **When to use**:
39
+
40
+ - When you need to enforce coding standards
41
+ - When defining workflows and processes
42
+ - When setting team conventions
43
+
44
+ **Structure**:
45
+
46
+ ```text
47
+ instructions/
48
+ ├── coding-conventions/ # How code should be written
49
+ │ ├── team-wide.md # Universal rules across all languages
50
+ │ ├── cpp.md # C++ specific rules
51
+ │ ├── frontend.md # React/TypeScript/JavaScript frontend development
52
+ │ └── typescript.md # TypeScript/JavaScript specific rules
53
+ ├── workflows/ # How work should be done
54
+ │ ├── git-commit.md # Git commit message standards
55
+ │ ├── code-review.md # Code review process
56
+ │ ├── jira-ticket-guide.md # How to create proper Jira tickets
57
+ │ └── jira-process.md # JIRA automated workflow
58
+ └── documentation-standards.md # How to maintain this documentation
59
+ ```
60
+
61
+ **AI Assistant Behavior**: When loading context from `instructions/`, AI should:
62
+
63
+ - Treat content as strict rules to follow
64
+ - Apply these standards when generating or reviewing code
65
+ - Flag violations during code reviews
66
+ - Prioritize these instructions over general knowledge
67
+
68
+ **Example Use Cases**:
69
+
70
+ - "Follow the team's C++ coding style when refactoring this class"
71
+ - "Review this commit message against our standards"
72
+ - "Generate code that adheres to our naming conventions"
73
+
74
+ ---
75
+
76
+ ### 2. `knowledge/` - Context Type: Knowledge
77
+
78
+ **Purpose**: Stores factual information, architectural decisions, and domain expertise.
79
+
80
+ **Content Type**: Descriptive, informational, contextual
81
+
82
+ **When to use**:
83
+
84
+ - When documenting system architecture
85
+ - When explaining "why" decisions were made
86
+ - When providing domain-specific background
87
+ - When sharing debugging techniques
88
+
89
+ **Structure**:
90
+
91
+ ```text
92
+ knowledge/
93
+ ├── architecture/ # Architecture patterns & design principles (team-wide)
94
+ ├── development/ # Development resources, tech stack, glossary
95
+ ├── environment-setup/ # Build machines, CI/CD infrastructure setup
96
+ ├── projects/ # Project-specific knowledge (e.g. BIAS_ONE_GUI)
97
+ ├── implementation-guides/ # How-to guides (adding amp, FX, cab, etc.)
98
+ ├── component-library/ # Reusable UI component documentation
99
+ └── domain/ # Domain knowledge (audio DSP, plugin formats, etc.)
100
+ ```
101
+
102
+ **AI Assistant Behavior**: When loading context from `knowledge/`, AI should:
103
+
104
+ - Use content for understanding and decision-making
105
+ - Reference architectural patterns when designing solutions
106
+ - Apply domain knowledge to problem-solving
107
+ - Respect documented design decisions
108
+
109
+ **Example Use Cases**:
110
+
111
+ - "Explain the architecture of the preset management system"
112
+ - "What are the common debugging techniques for audio glitches?"
113
+ - "Why did we choose this particular state management approach?"
114
+
115
+ ---
116
+
117
+ ### 3. `tools/` - Context Type: Tools
118
+
119
+ **Purpose**: Provides executable tools, scripts, and automation that extend capabilities.
120
+
121
+ **Content Type**: Functional, executable, operational
122
+
123
+ **When to use**:
124
+
125
+ - When defining AI agents for specialized tasks
126
+ - When creating workflow automation
127
+ - When building reusable utilities
128
+
129
+ **Structure**:
130
+
131
+ ```text
132
+ tools/
133
+ ├── agents/ # AI agent definitions
134
+ │ └── context-writer.md # Guide for adding new documentation
135
+ ├── slash-commands/ # Claude Code slash command scripts
136
+ │ └── context-write.md # Create new documentation workflow
137
+ └── utilities/ # Helper scripts and tools
138
+ ```
139
+
140
+ **AI Assistant Behavior**: When loading context from `tools/`, AI should:
141
+
142
+ - Understand available capabilities and when to use them
143
+ - Invoke appropriate tools for specific tasks
144
+ - Follow tool-specific instructions and parameters
145
+ - Compose tools to solve complex problems
146
+
147
+ **Example Use Cases**:
148
+
149
+ - "Use the PR review agent to analyze this pull request"
150
+ - "Run the commit slash command to create a standardized commit"
151
+ - "Check available agents for JIRA ticket processing"
152
+
153
+ ---
154
+
155
+ ## 🧠 Context Engineering Principles Applied
156
+
157
+ This architecture implements key Context Engineering concepts:
158
+
159
+ ### Context Management Abstractions
160
+
161
+ 1. **Write (寫入)** - Clear pathways for adding new content
162
+ - New coding rule? → `instructions/coding-conventions/`
163
+ - New architecture doc? → `knowledge/architecture/`
164
+ - New automation? → `tools/`
165
+
166
+ 2. **Select (選擇)** - Easy filtering of relevant context
167
+ - Need rules? → Load `instructions/`
168
+ - Need background? → Load `knowledge/`
169
+ - Need capabilities? → Load `tools/`
170
+
171
+ 3. **Compress (壓縮)** - Eliminates redundancy and maintains quality
172
+ - Single source of truth for each topic
173
+ - No duplicate rules across files
174
+ - Clear hierarchy prevents overlap
175
+ - Rule-based pruning of invalid references, obsolete content, duplicate definitions, and structural violations
176
+ - Tool: `/team:context-compress` for automated maintenance and quality assurance
177
+
178
+ 4. **Isolate (隔離)** - Prevents context pollution
179
+ - Instructions don't mix with knowledge
180
+ - Tools are separate from rules
181
+ - Each directory has single responsibility
182
+
183
+ ### Avoiding Context Failure Modes
184
+
185
+ - **No Context Poisoning** - Accurate, verified information only
186
+ - **No Context Distraction** - Relevant information grouped together
187
+ - **No Context Confusion** - Clear boundaries between types
188
+ - **No Context Clash** - Hierarchical priority (instructions > knowledge > tools)
189
+
190
+ ---
191
+
192
+ ## 🔍 Navigation Guide
193
+
194
+ ### For AI Assistants
195
+
196
+ When processing a request, determine the context type needed:
197
+
198
+ 1. **Generating or reviewing code?** → Load `instructions/coding-conventions/`
199
+ 2. **Understanding system design?** → Load `knowledge/architecture/`
200
+ 3. **Executing a workflow?** → Load `tools/slash-commands/` or `tools/agents/`
201
+ 4. **Multiple needs?** → Load contexts in order: Instructions → Knowledge → Tools
202
+
203
+ ### For Human Developers
204
+
205
+ **I want to...**
206
+
207
+ - Know how to write code → [`instructions/coding-conventions/`](./instructions/coding-conventions/)
208
+ - Understand our workflows → [`instructions/workflows/`](./instructions/workflows/)
209
+ - Learn system architecture → [`knowledge/architecture/`](./knowledge/architecture/) or [`knowledge/projects/`](./knowledge/projects/)
210
+ - Set up development environment → [`knowledge/development/`](./knowledge/development/)
211
+ - Set up build infrastructure → [`knowledge/environment-setup/`](./knowledge/environment-setup/)
212
+ - Use available tools → [`tools/`](./tools/)
213
+ - Debug an issue → [`knowledge/debugging/`](./knowledge/debugging/)
214
+
215
+ ---
216
+
217
+ ## 📚 Quick Reference
218
+
219
+ ### Instructions (Must Follow)
220
+
221
+ **Coding Conventions:**
222
+
223
+ - [Team-wide Coding Conventions](./instructions/coding-conventions/team-wide.md)
224
+ - [C++ Coding Standards](./instructions/coding-conventions/cpp.md)
225
+ - [Frontend Coding Standards](./instructions/coding-conventions/frontend.md)
226
+ - [TypeScript Coding Standards](./instructions/coding-conventions/typescript.md)
227
+
228
+ **Workflows:**
229
+
230
+ - [Git Branch Convention](./instructions/workflows/git-branch-convention.md)
231
+ - [Git Commit Convention](./instructions/workflows/git-commit.md)
232
+ - [Code Review Process](./instructions/workflows/code-review.md)
233
+ - [JIRA Ticket Guide](./instructions/workflows/jira-ticket-guide.md) - How to create proper Jira tickets
234
+ - [JIRA Workflow](./instructions/workflows/jira-process.md) - Automated Jira processing workflow
235
+ - [Scrum Process](./instructions/workflows/scrum-process.md)
236
+ - [Survey Project Setup](./instructions/workflows/survey-project-setup.md)
237
+
238
+
239
+ ### Knowledge (Background Context)
240
+
241
+ **Development Resources:**
242
+
243
+ - [Tech Stack Overview](./knowledge/development/tech-stack.md)
244
+ - [Development Glossary](./knowledge/development/glossary.md)
245
+ - [AWS Storage Access](./knowledge/development/aws-storage.md)
246
+ - [PG API Getting Started](./knowledge/development/pg-api-guide.md)
247
+ - [Staging License Management](./knowledge/development/staging-license-management.md)
248
+ - [CRM System Access](./knowledge/development/crm-system.md)
249
+ - [Development Guide](./knowledge/development/)
250
+
251
+ **Environment Setup:**
252
+
253
+ - [Build Machine Setup](./knowledge/environment-setup/build-machine-setup.md) - 如何建置新的 build machine
254
+ - [Build Machine Troubleshooting](./knowledge/environment-setup/build-machine-troubleshooting.md) - Build machine 常見問題排查
255
+ - [AAX Signing Update](./knowledge/environment-setup/aax-signing-update.md) - AAX plugin 簽名認證更新
256
+ - [Environment Setup Guide](./knowledge/environment-setup/)
257
+
258
+ **Architecture & Patterns:**
259
+
260
+ - [Architecture Patterns](./knowledge/architecture/)
261
+ - [Domain Knowledge](./knowledge/domain/)
262
+ - [Component Library](./knowledge/component-library/)
263
+ - [Implementation Guides](./knowledge/implementation-guides/)
264
+ - [Projects (BIAS_ONE_GUI)](./knowledge/projects/BIAS_ONE_GUI/)
265
+
266
+ ### Tools (Automation & Utilities)
267
+
268
+ **Agents:**
269
+
270
+ - [Context Writer Agent](./tools/agents/context-writer.md) - Interactive workflow for adding new documentation
271
+ - [Context Compressor Agent](./tools/agents/context-compressor.md) - Repository maintenance through context trimming
272
+
273
+ **Slash Commands:**
274
+
275
+ - `/team:context-write` - [Create new documentation](./tools/slash-commands/context-write.md)
276
+ - `/team:context-compress` - [Maintain repository quality](./tools/slash-commands/context-compress.md)
277
+ - `/team:commit` - [Create git commit](./tools/slash-commands/commit.md)
278
+ - `/team:jira` - [JIRA ticket workflow](./tools/slash-commands/jira.md)
279
+ - `/team:pr-gen` - [Generate pull request](./tools/slash-commands/pr-gen.md)
280
+ - `/team:pr-review` - [Review pull request](./tools/slash-commands/pr-review.md)
281
+
282
+ **Utilities:**
283
+
284
+ - [Pull Request Generation](./instructions/workflows/pull-request-generation.md)
285
+ - [Code Review](./instructions/workflows/code-review.md)
286
+
287
+ ---
288
+
289
+ ## 🔄 Maintenance Guidelines
290
+
291
+ ### Adding New Content
292
+
293
+ **Before adding any content, ask:**
294
+
295
+ 1. Is this prescriptive (telling people what to do)? → `instructions/`
296
+ 2. Is this descriptive (explaining how things work)? → `knowledge/`
297
+ 3. Is this functional (providing automation)? → `tools/`
298
+
299
+ ### Keeping Content Fresh
300
+
301
+ - **Instructions**: Review quarterly or when standards change
302
+ - **Knowledge**: Update when architecture or design decisions change
303
+ - **Tools**: Maintain when workflows evolve
304
+
305
+ ### Version Control
306
+
307
+ All changes to this documentation should be:
308
+
309
+ - Committed with clear, descriptive messages
310
+ - Reviewed by at least one team member
311
+ - Tagged with update dates in file headers
312
+
313
+ ---
314
+
315
+ ## 🤝 Contributing
316
+
317
+ When contributing to this documentation:
318
+
319
+ 1. **Respect the architecture** - Place content in the correct context type
320
+ 2. **Maintain clarity** - Use clear, concise language
321
+ 3. **Provide examples** - Include practical examples where helpful
322
+ 4. **Update index** - Keep this index.md current with new content
323
+ 5. **Cross-reference** - Link related content across context types
324
+
325
+ ---
326
+
327
+ ## 📖 Further Reading
328
+
329
+ ### Related Documentation
330
+
331
+ - [README.md](./README.md) - Setup and integration instructions
332
+
333
+ ### Context Engineering Resources
334
+
335
+ - Anthropic's Context Engineering Documentation
336
+ - Modern AI Engineering Best Practices
337
+ - Agentic Workflow Design Patterns
338
+
339
+ ---
340
+
341
+ ## 📝 Document History
342
+
343
+ | Version | Date | Changes | Author |
344
+ |---------|------------|----------------------------------------------|-------------|
345
+ | 2.0 | 2025-10-14 | Restructured to Context Engineering model | Gary Hsieh |
346
+ | 1.0 | 2025-05-13 | Initial flat structure | Gary Hsieh |
347
+
348
+ ---
349
+
350
+ **Architecture Owner**: Gary Hsieh (<gary.hsieh@positivegrid.com>)
351
+ **Team**: Positive Grid Desktop Team
352
+ **Feedback**: Please discuss major structural changes with the team before implementation