@prmichaelsen/reddit-mcp 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 (138) hide show
  1. package/.claude/settings.local.json +23 -0
  2. package/.env.example +13 -0
  3. package/AGENT.md +1772 -0
  4. package/README.md +54 -0
  5. package/agent/commands/acp.clarification-capture.md +386 -0
  6. package/agent/commands/acp.clarification-create.md +432 -0
  7. package/agent/commands/acp.clarifications-research.md +326 -0
  8. package/agent/commands/acp.command-create.md +432 -0
  9. package/agent/commands/acp.design-create.md +286 -0
  10. package/agent/commands/acp.design-reference.md +355 -0
  11. package/agent/commands/acp.index.md +423 -0
  12. package/agent/commands/acp.init.md +546 -0
  13. package/agent/commands/acp.package-create.md +895 -0
  14. package/agent/commands/acp.package-info.md +212 -0
  15. package/agent/commands/acp.package-install.md +539 -0
  16. package/agent/commands/acp.package-list.md +280 -0
  17. package/agent/commands/acp.package-publish.md +541 -0
  18. package/agent/commands/acp.package-remove.md +293 -0
  19. package/agent/commands/acp.package-search.md +307 -0
  20. package/agent/commands/acp.package-update.md +361 -0
  21. package/agent/commands/acp.package-validate.md +540 -0
  22. package/agent/commands/acp.pattern-create.md +386 -0
  23. package/agent/commands/acp.plan.md +577 -0
  24. package/agent/commands/acp.proceed.md +882 -0
  25. package/agent/commands/acp.project-create.md +675 -0
  26. package/agent/commands/acp.project-info.md +312 -0
  27. package/agent/commands/acp.project-list.md +226 -0
  28. package/agent/commands/acp.project-remove.md +379 -0
  29. package/agent/commands/acp.project-set.md +227 -0
  30. package/agent/commands/acp.project-update.md +307 -0
  31. package/agent/commands/acp.projects-restore.md +228 -0
  32. package/agent/commands/acp.projects-sync.md +347 -0
  33. package/agent/commands/acp.report.md +407 -0
  34. package/agent/commands/acp.resume.md +239 -0
  35. package/agent/commands/acp.sessions.md +301 -0
  36. package/agent/commands/acp.status.md +293 -0
  37. package/agent/commands/acp.sync.md +364 -0
  38. package/agent/commands/acp.task-create.md +500 -0
  39. package/agent/commands/acp.update.md +302 -0
  40. package/agent/commands/acp.validate.md +466 -0
  41. package/agent/commands/acp.version-check-for-updates.md +276 -0
  42. package/agent/commands/acp.version-check.md +191 -0
  43. package/agent/commands/acp.version-update.md +289 -0
  44. package/agent/commands/command.template.md +339 -0
  45. package/agent/commands/git.commit.md +526 -0
  46. package/agent/commands/git.init.md +514 -0
  47. package/agent/design/.gitkeep +0 -0
  48. package/agent/design/design.template.md +154 -0
  49. package/agent/design/requirements.md +332 -0
  50. package/agent/design/requirements.template.md +387 -0
  51. package/agent/index/.gitkeep +0 -0
  52. package/agent/index/local.main.template.yaml +37 -0
  53. package/agent/manifest.template.yaml +13 -0
  54. package/agent/manifest.yaml +61 -0
  55. package/agent/milestones/.gitkeep +0 -0
  56. package/agent/milestones/milestone-1-foundation-listings-mvp.md +140 -0
  57. package/agent/milestones/milestone-1-{title}.template.md +206 -0
  58. package/agent/milestones/milestone-2-content-interaction.md +56 -0
  59. package/agent/milestones/milestone-3-users-and-messaging.md +54 -0
  60. package/agent/milestones/milestone-4-subreddits-and-flair.md +56 -0
  61. package/agent/milestones/milestone-5-moderation.md +53 -0
  62. package/agent/milestones/milestone-6-advanced-features-and-polish.md +56 -0
  63. package/agent/package.template.yaml +86 -0
  64. package/agent/patterns/.gitkeep +0 -0
  65. package/agent/patterns/bootstrap.template.md +1237 -0
  66. package/agent/patterns/pattern.template.md +382 -0
  67. package/agent/progress.template.yaml +161 -0
  68. package/agent/progress.yaml +223 -0
  69. package/agent/schemas/package.schema.yaml +276 -0
  70. package/agent/scripts/acp.common.sh +1781 -0
  71. package/agent/scripts/acp.yaml-parser.sh +985 -0
  72. package/agent/tasks/.gitkeep +0 -0
  73. package/agent/tasks/milestone-1-foundation-listings-mvp/task-1-project-scaffolding.md +75 -0
  74. package/agent/tasks/milestone-1-foundation-listings-mvp/task-2-reddit-oauth.md +71 -0
  75. package/agent/tasks/milestone-1-foundation-listings-mvp/task-3-reddit-api-client.md +71 -0
  76. package/agent/tasks/milestone-1-foundation-listings-mvp/task-4-listing-tools.md +65 -0
  77. package/agent/tasks/milestone-1-foundation-listings-mvp/task-5-search-tools.md +43 -0
  78. package/agent/tasks/milestone-1-foundation-listings-mvp/task-6-testing-verification.md +49 -0
  79. package/agent/tasks/milestone-2-content-interaction/task-7-post-tools.md +56 -0
  80. package/agent/tasks/milestone-2-content-interaction/task-8-comment-tools.md +49 -0
  81. package/agent/tasks/milestone-2-content-interaction/task-9-vote-save-report-tools.md +50 -0
  82. package/agent/tasks/milestone-3-users-and-messaging/task-10-account-tools.md +44 -0
  83. package/agent/tasks/milestone-3-users-and-messaging/task-11-user-profile-tools.md +50 -0
  84. package/agent/tasks/milestone-3-users-and-messaging/task-12-private-message-tools.md +50 -0
  85. package/agent/tasks/milestone-4-subreddits-and-flair/task-13-subreddit-tools.md +47 -0
  86. package/agent/tasks/milestone-4-subreddits-and-flair/task-14-flair-tools.md +46 -0
  87. package/agent/tasks/milestone-4-subreddits-and-flair/task-15-http-transport.md +53 -0
  88. package/agent/tasks/milestone-5-moderation/task-16-mod-action-tools.md +48 -0
  89. package/agent/tasks/milestone-5-moderation/task-17-mod-listing-tools.md +47 -0
  90. package/agent/tasks/milestone-5-moderation/task-18-mod-management-tools.md +42 -0
  91. package/agent/tasks/milestone-6-advanced-features-and-polish/task-19-multireddit-tools.md +49 -0
  92. package/agent/tasks/milestone-6-advanced-features-and-polish/task-20-wiki-tools.md +47 -0
  93. package/agent/tasks/milestone-6-advanced-features-and-polish/task-21-documentation-polish.md +65 -0
  94. package/agent/tasks/task-1-{title}.template.md +244 -0
  95. package/dist/auth/oauth.d.ts +15 -0
  96. package/dist/auth/oauth.d.ts.map +1 -0
  97. package/dist/client/reddit.d.ts +28 -0
  98. package/dist/client/reddit.d.ts.map +1 -0
  99. package/dist/factory.d.ts +2 -0
  100. package/dist/factory.d.ts.map +1 -0
  101. package/dist/factory.js +30394 -0
  102. package/dist/factory.js.map +7 -0
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +31955 -0
  106. package/dist/index.js.map +7 -0
  107. package/dist/server.d.ts +5 -0
  108. package/dist/server.d.ts.map +1 -0
  109. package/dist/server.js +30401 -0
  110. package/dist/server.js.map +7 -0
  111. package/dist/tools/listings.d.ts +4 -0
  112. package/dist/tools/listings.d.ts.map +1 -0
  113. package/dist/tools/search.d.ts +4 -0
  114. package/dist/tools/search.d.ts.map +1 -0
  115. package/dist/transport/http.d.ts +7 -0
  116. package/dist/transport/http.d.ts.map +1 -0
  117. package/dist/types/index.d.ts +78 -0
  118. package/dist/types/index.d.ts.map +1 -0
  119. package/esbuild.build.js +21 -0
  120. package/jest.config.js +18 -0
  121. package/package.json +46 -0
  122. package/src/auth/oauth.ts +200 -0
  123. package/src/client/reddit.ts +245 -0
  124. package/src/factory.ts +5 -0
  125. package/src/index.ts +31 -0
  126. package/src/server.ts +36 -0
  127. package/src/tools/listings.ts +202 -0
  128. package/src/tools/search.ts +85 -0
  129. package/src/transport/http.ts +49 -0
  130. package/src/types/index.ts +83 -0
  131. package/tests/fixtures/reddit-responses.ts +132 -0
  132. package/tests/helpers/mock-client.ts +36 -0
  133. package/tests/unit/auth.test.ts +89 -0
  134. package/tests/unit/client.test.ts +218 -0
  135. package/tests/unit/listings.test.ts +113 -0
  136. package/tests/unit/search.test.ts +59 -0
  137. package/tests/unit/server.test.ts +14 -0
  138. package/tsconfig.json +21 -0
@@ -0,0 +1,514 @@
1
+ # Command: init
2
+
3
+ > **🤖 Agent Directive**: If you are reading this file, the command `@git.init` has been invoked. Follow the steps below to execute this command.
4
+
5
+ **Namespace**: git
6
+ **Version**: 1.0.0
7
+ **Created**: 2026-02-16
8
+ **Last Updated**: 2026-02-16
9
+ **Status**: Active
10
+ **Scripts**: None
11
+
12
+ ---
13
+
14
+ **Purpose**: Initialize a git repository with intelligent .gitignore based on project type
15
+ **Category**: Creation
16
+ **Frequency**: Once
17
+
18
+ ---
19
+
20
+ ## What This Command Does
21
+
22
+ This command intelligently initializes a git repository for your project by:
23
+ 1. Analyzing the project structure to detect the project type (Node.js, Python, Rust, etc.)
24
+ 2. Running `git init` to create the repository
25
+ 3. Creating or updating `.gitignore` with sensible defaults based on the detected project type
26
+ 4. Ensuring dependency lock files are NOT ignored (they should be committed)
27
+ 5. Ignoring build directories, distribution directories, and dependency installation directories
28
+
29
+ The command is smart about .gitignore - it evaluates your project to determine what should be ignored rather than using a generic template. This ensures your repository follows best practices for your specific technology stack.
30
+
31
+ **Example**: "For a Node.js project, this command will detect `package.json`, initialize git, and create a `.gitignore` that ignores `node_modules/`, `dist/`, `*.tgz`, but keeps `package-lock.json` committed."
32
+
33
+ ---
34
+
35
+ ## Prerequisites
36
+
37
+ - [ ] Project directory exists and contains project files
38
+ - [ ] Git is installed on the system
39
+ - [ ] No existing `.git` directory (or you want to reinitialize)
40
+
41
+ ---
42
+
43
+ ## Steps
44
+
45
+ ### 1. Evaluate Project Type
46
+
47
+ Analyze the project structure to determine the technology stack and project type.
48
+
49
+ **Actions**:
50
+ - Check for `package.json` (Node.js/npm)
51
+ - Check for `pyproject.toml`, `setup.py`, `requirements.txt` (Python)
52
+ - Check for `Cargo.toml` (Rust)
53
+ - Check for `pom.xml`, `build.gradle` (Java)
54
+ - Check for `go.mod` (Go)
55
+ - Check for `composer.json` (PHP)
56
+ - Check for `.csproj`, `.sln` (C#/.NET)
57
+ - Check for `Gemfile` (Ruby)
58
+ - Identify any other project-specific files
59
+
60
+ **If Project Type is Unknown**:
61
+ - If the project type cannot be determined from known patterns, use available web search tools (e.g., `mcp--brave-search--brave_web_search`) to research the project structure
62
+ - Search for: "{detected_file_pattern} gitignore best practices"
63
+ - Search for: "{detected_file_pattern} project structure"
64
+ - Search for: "{language_or_framework} build artifacts"
65
+ - Use the search results to determine:
66
+ - What directories should be ignored (build output, dependencies)
67
+ - What lock files exist and should be committed
68
+ - What temporary files should be ignored
69
+ - Common IDE/editor files for that ecosystem
70
+
71
+ **Expected Outcome**: Determine the primary project type(s) and technology stack, using web research if necessary.
72
+
73
+ **Example**:
74
+ ```bash
75
+ # Check for various project files
76
+ ls -la | grep -E "(package.json|pyproject.toml|Cargo.toml|go.mod)"
77
+ ```
78
+
79
+ ### 2. Initialize Git Repository
80
+
81
+ Create the git repository if it doesn't exist.
82
+
83
+ **Actions**:
84
+ - Run `git init` to initialize the repository
85
+ - Verify `.git` directory was created
86
+ - Set initial branch name (typically `main` or `mainline`)
87
+
88
+ **Expected Outcome**: Git repository initialized with `.git` directory created.
89
+
90
+ **Example**:
91
+ ```bash
92
+ git init
93
+ git branch -M main # or mainline, depending on preference
94
+ ```
95
+
96
+ ### 3. Create or Update .gitignore
97
+
98
+ Generate a `.gitignore` file with intelligent defaults based on the detected project type.
99
+
100
+ **Actions**:
101
+ - Create `.gitignore` if it doesn't exist, or read existing one
102
+ - Add project-type-specific ignore patterns
103
+ - Ensure dependency lock files are NOT ignored
104
+ - Add common ignore patterns for build/dist directories
105
+ - Add editor/IDE specific ignores
106
+
107
+ **Expected Outcome**: `.gitignore` file created or updated with appropriate patterns.
108
+
109
+ **Common Patterns to Include**:
110
+
111
+ #### All Projects
112
+ ```gitignore
113
+ # Editor/IDE
114
+ .vscode/
115
+ .idea/
116
+ *.swp
117
+ *.swo
118
+ *~
119
+ .DS_Store
120
+ Thumbs.db
121
+
122
+ # Environment
123
+ .env
124
+ .env.local
125
+ .env.*.local
126
+ *.log
127
+ ```
128
+
129
+ #### Node.js/npm Projects
130
+ ```gitignore
131
+ # Dependencies
132
+ node_modules/
133
+
134
+ # Build output
135
+ dist/
136
+ build/
137
+ out/
138
+ .next/
139
+ .nuxt/
140
+
141
+ # Package files (but NOT lock files)
142
+ *.tgz
143
+
144
+ # Testing
145
+ coverage/
146
+ .nyc_output/
147
+
148
+ # Cache
149
+ .npm
150
+ .eslintcache
151
+ .cache/
152
+ ```
153
+
154
+ #### Python Projects
155
+ ```gitignore
156
+ # Dependencies
157
+ __pycache__/
158
+ *.py[cod]
159
+ *$py.class
160
+ .Python
161
+
162
+ # Virtual environments
163
+ venv/
164
+ env/
165
+ ENV/
166
+ .venv
167
+
168
+ # Build output
169
+ dist/
170
+ build/
171
+ *.egg-info/
172
+ .eggs/
173
+
174
+ # Testing
175
+ .pytest_cache/
176
+ .coverage
177
+ htmlcov/
178
+ .tox/
179
+ ```
180
+
181
+ #### Rust Projects
182
+ ```gitignore
183
+ # Build output
184
+ target/
185
+ Cargo.lock # Only for libraries; applications should commit this
186
+
187
+ # Debug
188
+ **/*.rs.bk
189
+ ```
190
+
191
+ #### Go Projects
192
+ ```gitignore
193
+ # Build output
194
+ bin/
195
+ *.exe
196
+ *.exe~
197
+ *.dll
198
+ *.so
199
+ *.dylib
200
+
201
+ # Test
202
+ *.test
203
+ *.out
204
+
205
+ # Vendor (if not using modules)
206
+ vendor/
207
+ ```
208
+
209
+ #### Java Projects
210
+ ```gitignore
211
+ # Build output
212
+ target/
213
+ build/
214
+ out/
215
+ *.class
216
+ *.jar
217
+ *.war
218
+ *.ear
219
+
220
+ # IDE
221
+ .gradle/
222
+ .settings/
223
+ .classpath
224
+ .project
225
+ ```
226
+
227
+ **CRITICAL**: Ensure these are NOT ignored:
228
+ - `package-lock.json` (Node.js)
229
+ - `yarn.lock` (Node.js/Yarn)
230
+ - `pnpm-lock.yaml` (Node.js/pnpm)
231
+ - `Pipfile.lock` (Python/Pipenv)
232
+ - `poetry.lock` (Python/Poetry)
233
+ - `Cargo.lock` (Rust applications)
234
+ - `go.sum` (Go)
235
+ - `composer.lock` (PHP)
236
+ - `Gemfile.lock` (Ruby)
237
+
238
+ ### 4. Verify .gitignore
239
+
240
+ Check that the `.gitignore` file is correct and complete.
241
+
242
+ **Actions**:
243
+ - Read the created `.gitignore` file
244
+ - Verify lock files are not ignored
245
+ - Verify build/dist directories are ignored
246
+ - Verify dependency directories are ignored
247
+ - Check for any project-specific patterns that should be added
248
+
249
+ **Expected Outcome**: `.gitignore` file is correct and follows best practices.
250
+
251
+ ### 5. Display Summary
252
+
253
+ Show what was done and what's ready to be committed.
254
+
255
+ **Actions**:
256
+ - Display detected project type
257
+ - Show `.gitignore` patterns added
258
+ - Run `git status` to show initial state
259
+ - Provide next steps
260
+
261
+ **Expected Outcome**: User understands what was initialized and what to do next.
262
+
263
+ **Example**:
264
+ ```bash
265
+ git status
266
+ ```
267
+
268
+ ---
269
+
270
+ ## Verification
271
+
272
+ - [ ] `.git` directory exists
273
+ - [ ] `.gitignore` file exists and contains appropriate patterns
274
+ - [ ] Dependency lock files are NOT in `.gitignore`
275
+ - [ ] Build directories (dist/, build/, target/) are in `.gitignore`
276
+ - [ ] Dependency install directories (node_modules/, venv/, etc.) are in `.gitignore`
277
+ - [ ] `git status` shows untracked files correctly
278
+ - [ ] No sensitive files (like `.env`) are accidentally tracked
279
+
280
+ ---
281
+
282
+ ## Expected Output
283
+
284
+ ### Files Modified
285
+ - `.git/` - Git repository directory created
286
+ - `.gitignore` - Created or updated with project-specific patterns
287
+
288
+ ### Console Output
289
+ ```
290
+ ✓ Detected project type: Node.js (npm)
291
+ ✓ Initialized git repository
292
+ ✓ Created .gitignore with patterns:
293
+ - node_modules/ (dependencies)
294
+ - dist/ (build output)
295
+ - *.tgz (package archives)
296
+ - .env* (environment files)
297
+ ✓ Preserved lock files:
298
+ - package-lock.json (will be committed)
299
+
300
+ Next steps:
301
+ git add .
302
+ git commit -m "Initial commit"
303
+ ```
304
+
305
+ ### Status Update
306
+ - Git repository initialized
307
+ - `.gitignore` configured for project type
308
+ - Ready for initial commit
309
+
310
+ ---
311
+
312
+ ## Examples
313
+
314
+ ### Example 1: Node.js Project
315
+
316
+ **Context**: Starting a new Node.js project with npm
317
+
318
+ **Invocation**: `@git.init`
319
+
320
+ **Result**:
321
+ - Detects `package.json`
322
+ - Initializes git repository
323
+ - Creates `.gitignore` with:
324
+ - `node_modules/` ignored
325
+ - `dist/`, `build/` ignored
326
+ - `*.tgz` ignored
327
+ - `package-lock.json` NOT ignored (will be committed)
328
+ - `.env*` ignored
329
+
330
+ ### Example 2: Python Project
331
+
332
+ **Context**: Starting a Python project with Poetry
333
+
334
+ **Invocation**: `@git.init`
335
+
336
+ **Result**:
337
+ - Detects `pyproject.toml`
338
+ - Initializes git repository
339
+ - Creates `.gitignore` with:
340
+ - `__pycache__/`, `*.pyc` ignored
341
+ - `venv/`, `.venv/` ignored
342
+ - `dist/`, `build/` ignored
343
+ - `poetry.lock` NOT ignored (will be committed)
344
+ - `.env*` ignored
345
+
346
+ ### Example 3: Rust Project
347
+
348
+ **Context**: Starting a Rust application
349
+
350
+ **Invocation**: `@git.init`
351
+
352
+ **Result**:
353
+ - Detects `Cargo.toml`
354
+ - Initializes git repository
355
+ - Creates `.gitignore` with:
356
+ - `target/` ignored
357
+ - `Cargo.lock` NOT ignored for applications (will be committed)
358
+ - `.env*` ignored
359
+
360
+ ### Example 4: Multi-Language Project
361
+
362
+ **Context**: Project with both Node.js frontend and Python backend
363
+
364
+ **Invocation**: `@git.init`
365
+
366
+ **Result**:
367
+ - Detects both `package.json` and `pyproject.toml`
368
+ - Initializes git repository
369
+ - Creates `.gitignore` with patterns for both:
370
+ - `node_modules/` and `__pycache__/` ignored
371
+ - `dist/`, `build/`, `target/` ignored
372
+ - Both `package-lock.json` and `poetry.lock` NOT ignored
373
+ - `.env*` ignored
374
+
375
+ ### Example 5: Unknown Project Type (Elixir)
376
+
377
+ **Context**: Starting an Elixir project with Mix
378
+
379
+ **Invocation**: `@git.init`
380
+
381
+ **Process**:
382
+ - Detects `mix.exs` file (unknown to built-in patterns)
383
+ - Uses web search: "mix.exs gitignore best practices"
384
+ - Finds that Elixir projects should ignore:
385
+ - `_build/` (build output)
386
+ - `deps/` (dependencies)
387
+ - `*.ez` (compiled archives)
388
+ - `mix.lock` should be committed
389
+
390
+ **Result**:
391
+ - Initializes git repository
392
+ - Creates `.gitignore` based on web research:
393
+ - `_build/` ignored
394
+ - `deps/` ignored
395
+ - `*.ez` ignored
396
+ - `mix.lock` NOT ignored (will be committed)
397
+ - `.env*` ignored
398
+
399
+ ---
400
+
401
+ ## Related Commands
402
+
403
+ - [`@git.commit`](git.commit.md) - Use after initialization to make your first commit
404
+ - [`@acp.init`](acp.init.md) - Use to initialize ACP structure after git init
405
+
406
+ ---
407
+
408
+ ## Troubleshooting
409
+
410
+ ### Issue 1: Git already initialized
411
+
412
+ **Symptom**: Error message "Reinitialized existing Git repository"
413
+
414
+ **Cause**: `.git` directory already exists
415
+
416
+ **Solution**: This is usually fine - git will reinitialize without losing history. If you want a fresh start, delete `.git` directory first: `rm -rf .git`
417
+
418
+ ### Issue 2: .gitignore conflicts with existing file
419
+
420
+ **Symptom**: `.gitignore` already exists with different patterns
421
+
422
+ **Cause**: Project already has a `.gitignore`
423
+
424
+ **Solution**: The command will merge patterns, adding new ones while preserving existing ones. Review the result and manually adjust if needed.
425
+
426
+ ### Issue 3: Lock files are ignored
427
+
428
+ **Symptom**: `git status` shows lock files as ignored
429
+
430
+ **Cause**: Existing `.gitignore` has patterns that ignore lock files
431
+
432
+ **Solution**: Edit `.gitignore` and remove any lines that ignore lock files (e.g., `*.lock`, `*-lock.json`). Lock files should always be committed.
433
+
434
+ ### Issue 4: Too many files shown as untracked
435
+
436
+ **Symptom**: `git status` shows hundreds of dependency files
437
+
438
+ **Cause**: Dependency directories not properly ignored
439
+
440
+ **Solution**: Verify `.gitignore` includes dependency directories for your project type. Add missing patterns manually if needed.
441
+
442
+ ### Issue 5: Unknown or uncommon project type
443
+
444
+ **Symptom**: Project type cannot be automatically detected
445
+
446
+ **Cause**: Using a less common language, framework, or custom project structure
447
+
448
+ **Solution**:
449
+ 1. The command will use web search tools to research the project type
450
+ 2. Search queries will be constructed based on detected files (e.g., "makefile gitignore best practices")
451
+ 3. Review the search results and manually verify the suggested patterns
452
+ 4. If still unclear, create a minimal `.gitignore` with common patterns:
453
+ ```gitignore
454
+ # Dependencies (adjust as needed)
455
+ vendor/
456
+ deps/
457
+
458
+ # Build output (adjust as needed)
459
+ build/
460
+ dist/
461
+ out/
462
+ target/
463
+
464
+ # Environment
465
+ .env
466
+ .env.local
467
+
468
+ # Editor
469
+ .vscode/
470
+ .idea/
471
+ ```
472
+ 5. Refine the `.gitignore` as you learn more about the project's build process
473
+
474
+ ---
475
+
476
+ ## Security Considerations
477
+
478
+ ### File Access
479
+ - **Reads**: Project root directory to detect project type
480
+ - **Writes**: `.git/` directory (git repository), `.gitignore` file
481
+ - **Executes**: `git init` command
482
+
483
+ ### Network Access
484
+ - **APIs**: May use web search APIs (e.g., Brave Search) to research unknown project types
485
+ - **Repositories**: None
486
+
487
+ ### Sensitive Data
488
+ - **Secrets**: Automatically ignores `.env` files and environment-specific files
489
+ - **Credentials**: Does not access any credentials
490
+ - **Important**: Always verify `.env` files are in `.gitignore` before committing
491
+
492
+ ---
493
+
494
+ ## Notes
495
+
496
+ - Lock files (package-lock.json, poetry.lock, etc.) should ALWAYS be committed to ensure reproducible builds
497
+ - Build directories (dist/, build/, target/) should ALWAYS be ignored - they can be regenerated
498
+ - Dependency directories (node_modules/, venv/) should ALWAYS be ignored - they can be reinstalled
499
+ - `.tgz` files should be ignored for npm packages to avoid committing packed archives
500
+ - Environment files (`.env`, `.env.local`) should ALWAYS be ignored to prevent credential leaks
501
+ - The command is idempotent - running it multiple times is safe
502
+ - For monorepos, consider running this at the root and adding workspace-specific patterns
503
+ - Always review the generated `.gitignore` to ensure it matches your project's needs
504
+
505
+ ---
506
+
507
+ **Namespace**: git
508
+ **Command**: init
509
+ **Version**: 1.0.0
510
+ **Created**: 2026-02-16
511
+ **Last Updated**: 2026-02-16
512
+ **Status**: Active
513
+ **Compatibility**: ACP 1.3.0+
514
+ **Author**: Agent Context Protocol
File without changes
@@ -0,0 +1,154 @@
1
+ # {Feature/Pattern Name}
2
+
3
+ **Concept**: [One-line description of what this design addresses]
4
+ **Created**: YYYY-MM-DD
5
+ **Status**: Proposal | Design Specification | Implemented
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ [High-level description of what this design document covers and why it exists. Provide context about the problem space and the importance of this design decision.]
12
+
13
+ **Example**: "This document describes the authentication flow for multi-tenant access, enabling secure per-user data isolation across the system."
14
+
15
+ ---
16
+
17
+ ## Problem Statement
18
+
19
+ [Clearly articulate the problem this design solves. Include:]
20
+ - What challenge or limitation exists?
21
+ - Why is this a problem worth solving?
22
+ - What are the consequences of not solving it?
23
+
24
+ **Example**: "Without proper multi-tenant isolation, users could potentially access each other's data, creating security vulnerabilities and privacy concerns."
25
+
26
+ ---
27
+
28
+ ## Solution
29
+
30
+ [Describe the proposed solution at a conceptual level. Include:]
31
+ - High-level approach
32
+ - Key components involved
33
+ - How the solution addresses the problem
34
+ - Alternative approaches considered (and why they were rejected)
35
+
36
+ **Example**: "Implement row-level security using user_id as a tenant identifier, enforced at both the database and application layers."
37
+
38
+ ---
39
+
40
+ ## Implementation
41
+
42
+ [Provide technical details needed to implement this design. Include:]
43
+ - Architecture diagrams (as ASCII art or references)
44
+ - Data structures and schemas
45
+ - API interfaces
46
+ - Code examples (use placeholder names)
47
+ - Configuration requirements
48
+ - Dependencies
49
+
50
+ **Example**:
51
+ ```typescript
52
+ interface TenantContext {
53
+ userId: string;
54
+ permissions: string[];
55
+ }
56
+
57
+ class DataService {
58
+ constructor(private context: TenantContext) {}
59
+
60
+ async getData(id: string): Promise<Data> {
61
+ // Implementation with tenant filtering
62
+ }
63
+ }
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Benefits
69
+
70
+ [List the advantages of this approach:]
71
+ - Benefit 1: [Description]
72
+ - Benefit 2: [Description]
73
+ - Benefit 3: [Description]
74
+
75
+ **Example**:
76
+ - **Security**: Complete data isolation between tenants
77
+ - **Scalability**: Horizontal scaling without data mixing concerns
78
+ - **Compliance**: Meets data privacy regulations (GDPR, etc.)
79
+
80
+ ---
81
+
82
+ ## Trade-offs
83
+
84
+ [Honestly assess the downsides and limitations:]
85
+ - Trade-off 1: [Description and mitigation strategy]
86
+ - Trade-off 2: [Description and mitigation strategy]
87
+ - Trade-off 3: [Description and mitigation strategy]
88
+
89
+ **Example**:
90
+ - **Performance**: Additional filtering adds query overhead (mitigated by proper indexing)
91
+ - **Complexity**: More complex queries and testing requirements
92
+ - **Migration**: Existing data requires backfill with tenant identifiers
93
+
94
+ ---
95
+
96
+ ## Dependencies
97
+
98
+ [List any dependencies this design has:]
99
+ - External services or APIs
100
+ - Other design documents
101
+ - Infrastructure requirements
102
+ - Third-party libraries
103
+
104
+ ---
105
+
106
+ ## Testing Strategy
107
+
108
+ [Describe how to verify this design works correctly:]
109
+ - Unit test requirements
110
+ - Integration test scenarios
111
+ - Security test cases
112
+ - Performance benchmarks
113
+
114
+ ---
115
+
116
+ ## Migration Path
117
+
118
+ [If this changes existing functionality, describe the migration strategy:]
119
+ 1. Step 1: [Description]
120
+ 2. Step 2: [Description]
121
+ 3. Step 3: [Description]
122
+
123
+ ---
124
+
125
+ ## Key Design Decisions (Optional)
126
+
127
+ <!-- This section is populated by @acp.clarification-capture when
128
+ create commands are invoked with --from-clar, --from-chat, or
129
+ --from-context. It can also be manually authored.
130
+ Omit this section entirely if no decisions to capture.
131
+
132
+ Group decisions by agent-inferred category using tables:
133
+
134
+ ### {Category}
135
+
136
+ | Decision | Choice | Rationale |
137
+ |---|---|---|
138
+ | {decision} | {choice} | {rationale} |
139
+ -->
140
+
141
+ ---
142
+
143
+ ## Future Considerations
144
+
145
+ [Note any future enhancements or related work:]
146
+ - Future enhancement 1
147
+ - Future enhancement 2
148
+ - Related design documents to create
149
+
150
+ ---
151
+
152
+ **Status**: [Current implementation status]
153
+ **Recommendation**: [What should be done next - implement, review, revise, etc.]
154
+ **Related Documents**: [Links to related design docs, milestones, or tasks]