@mytechtoday/augment-extensions 1.2.2 → 1.3.1

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 (87) hide show
  1. package/LICENSE +22 -22
  2. package/augment-extensions/domain-rules/software-architecture/README.md +143 -143
  3. package/augment-extensions/domain-rules/software-architecture/examples/banking-layered.md +961 -961
  4. package/augment-extensions/domain-rules/software-architecture/examples/ecommerce-microservices.md +990 -990
  5. package/augment-extensions/domain-rules/software-architecture/examples/iot-eventdriven.md +882 -882
  6. package/augment-extensions/domain-rules/software-architecture/examples/monolith-to-microservices-migration.md +703 -703
  7. package/augment-extensions/domain-rules/software-architecture/examples/serverless-imageprocessing.md +957 -957
  8. package/augment-extensions/domain-rules/software-architecture/examples/trading-eventdriven.md +747 -747
  9. package/augment-extensions/domain-rules/software-architecture/module.json +119 -119
  10. package/augment-extensions/domain-rules/software-architecture/rules/challenges-solutions.md +763 -763
  11. package/augment-extensions/domain-rules/software-architecture/rules/definitions-terminology.md +409 -409
  12. package/augment-extensions/domain-rules/software-architecture/rules/design-principles.md +684 -684
  13. package/augment-extensions/domain-rules/software-architecture/rules/evaluation-testing.md +1381 -1381
  14. package/augment-extensions/domain-rules/software-architecture/rules/event-driven-architecture.md +616 -616
  15. package/augment-extensions/domain-rules/software-architecture/rules/fundamentals.md +306 -306
  16. package/augment-extensions/domain-rules/software-architecture/rules/industry-architectures.md +554 -554
  17. package/augment-extensions/domain-rules/software-architecture/rules/layered-architecture.md +776 -776
  18. package/augment-extensions/domain-rules/software-architecture/rules/microservices-architecture.md +503 -503
  19. package/augment-extensions/domain-rules/software-architecture/rules/modeling-documentation.md +1199 -1199
  20. package/augment-extensions/domain-rules/software-architecture/rules/monolithic-architecture.md +351 -351
  21. package/augment-extensions/domain-rules/software-architecture/rules/principles.md +556 -556
  22. package/augment-extensions/domain-rules/software-architecture/rules/quality-attributes.md +797 -797
  23. package/augment-extensions/domain-rules/software-architecture/rules/scalability-performance.md +1345 -1345
  24. package/augment-extensions/domain-rules/software-architecture/rules/security-architecture.md +1039 -1039
  25. package/augment-extensions/domain-rules/software-architecture/rules/serverless-architecture.md +711 -711
  26. package/augment-extensions/domain-rules/software-architecture/rules/skills-development.md +568 -568
  27. package/augment-extensions/domain-rules/software-architecture/rules/tools-methodologies.md +961 -961
  28. package/augment-extensions/visual-design/CHANGELOG.md +132 -0
  29. package/augment-extensions/visual-design/README.md +255 -0
  30. package/augment-extensions/visual-design/__tests__/README.md +119 -0
  31. package/augment-extensions/visual-design/__tests__/style-selector.test.ts +172 -0
  32. package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +214 -0
  33. package/augment-extensions/visual-design/domains/other/ai-prompt-helper.ts +157 -0
  34. package/augment-extensions/visual-design/domains/other/dotnet-application.ts +156 -0
  35. package/augment-extensions/visual-design/domains/other/linux-platform.ts +156 -0
  36. package/augment-extensions/visual-design/domains/other/mobile-application.ts +157 -0
  37. package/augment-extensions/visual-design/domains/other/motion-picture.ts +156 -0
  38. package/augment-extensions/visual-design/domains/other/os-application.ts +156 -0
  39. package/augment-extensions/visual-design/domains/other/print-campaigns.ts +158 -0
  40. package/augment-extensions/visual-design/domains/other/web-app.ts +157 -0
  41. package/augment-extensions/visual-design/domains/other/website.ts +161 -0
  42. package/augment-extensions/visual-design/domains/other/windows-platform.ts +156 -0
  43. package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +506 -0
  44. package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +615 -0
  45. package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +531 -0
  46. package/augment-extensions/visual-design/examples/README.md +97 -0
  47. package/augment-extensions/visual-design/examples/ai-prompt-generation.md +233 -0
  48. package/augment-extensions/visual-design/examples/basic-usage.md +216 -0
  49. package/augment-extensions/visual-design/examples/domain-workflows.md +257 -0
  50. package/augment-extensions/visual-design/examples/vendor-comparison.md +247 -0
  51. package/augment-extensions/visual-design/module.json +78 -0
  52. package/augment-extensions/visual-design/style-selector.ts +177 -0
  53. package/augment-extensions/visual-design/types.ts +302 -0
  54. package/augment-extensions/visual-design/visual-design-core.ts +469 -0
  55. package/augment-extensions/workflows/adr-support/README.md +227 -0
  56. package/augment-extensions/workflows/adr-support/__tests__/adr-validator.test.ts +203 -0
  57. package/augment-extensions/workflows/adr-support/adr-validator.ts +162 -0
  58. package/augment-extensions/workflows/adr-support/examples/complete-lifecycle-example.md +449 -0
  59. package/augment-extensions/workflows/adr-support/examples/integration-example.md +580 -0
  60. package/augment-extensions/workflows/adr-support/examples/superseding-example.md +436 -0
  61. package/augment-extensions/workflows/adr-support/module.json +112 -0
  62. package/augment-extensions/workflows/adr-support/rules/adr-creation.md +372 -0
  63. package/augment-extensions/workflows/adr-support/rules/beads-integration.md +443 -0
  64. package/augment-extensions/workflows/adr-support/rules/conflict-detection.md +486 -0
  65. package/augment-extensions/workflows/adr-support/rules/decision-detection.md +362 -0
  66. package/augment-extensions/workflows/adr-support/rules/lifecycle-management.md +427 -0
  67. package/augment-extensions/workflows/adr-support/rules/openspec-integration.md +465 -0
  68. package/augment-extensions/workflows/adr-support/rules/template-selection.md +405 -0
  69. package/augment-extensions/workflows/adr-support/rules/validation-rules.md +543 -0
  70. package/augment-extensions/workflows/adr-support/schemas/adr-config.json +191 -0
  71. package/augment-extensions/workflows/adr-support/schemas/adr-metadata.json +172 -0
  72. package/augment-extensions/workflows/adr-support/templates/business-case.md +235 -0
  73. package/augment-extensions/workflows/adr-support/templates/madr-elaborate.md +197 -0
  74. package/augment-extensions/workflows/adr-support/templates/madr-simple.md +68 -0
  75. package/augment-extensions/workflows/adr-support/templates/nygard.md +84 -0
  76. package/augment-extensions/writing-standards/screenplay/rules/file-organization.md +213 -213
  77. package/augment-extensions/writing-standards/screenplay/utils/__tests__/file-organization.test.ts +169 -169
  78. package/augment-extensions/writing-standards/screenplay/utils/file-organization.ts +165 -165
  79. package/cli/dist/utils/auto-sync.js +19 -19
  80. package/package.json +5 -3
  81. package/augment-extensions/workflows/openspec/README.md +0 -96
  82. package/augment-extensions/workflows/openspec/examples/complete-change-example.md +0 -244
  83. package/augment-extensions/workflows/openspec/module.json +0 -54
  84. package/augment-extensions/workflows/openspec/rules/best-practices.md +0 -272
  85. package/augment-extensions/workflows/openspec/rules/manual-setup.md +0 -231
  86. package/augment-extensions/workflows/openspec/rules/spec-format.md +0 -236
  87. package/augment-extensions/workflows/openspec/rules/workflow.md +0 -214
@@ -0,0 +1,362 @@
1
+ # Decision Detection Rules
2
+
3
+ ## Overview
4
+
5
+ This document defines how AI agents detect architectural decisions that warrant ADR creation. The goal is to automatically identify significant decisions during development and prompt for ADR documentation.
6
+
7
+ ## Detection Triggers
8
+
9
+ ### Code-Based Triggers
10
+
11
+ AI agents should detect potential architectural decisions when encountering:
12
+
13
+ #### 1. **Dependency Changes**
14
+ - Adding new external dependencies (npm, pip, composer, etc.)
15
+ - Upgrading major versions of existing dependencies
16
+ - Replacing one dependency with another
17
+ - Removing dependencies
18
+
19
+ **Example Triggers:**
20
+ ```json
21
+ // package.json changes
22
+ "dependencies": {
23
+ "react": "^17.0.0" → "^18.0.0" // Major version upgrade
24
+ "axios": "^1.0.0" // New HTTP client
25
+ }
26
+ ```
27
+
28
+ **Significance Criteria:**
29
+ - Major version upgrades (breaking changes)
30
+ - New categories of dependencies (e.g., first state management library)
31
+ - Security-critical dependencies (auth, crypto, etc.)
32
+
33
+ #### 2. **Schema/Database Changes**
34
+ - Creating new database tables
35
+ - Modifying existing schemas
36
+ - Changing database engines
37
+ - Adding indexes or constraints
38
+
39
+ **Example Triggers:**
40
+ ```sql
41
+ -- New table creation
42
+ CREATE TABLE user_sessions (
43
+ id UUID PRIMARY KEY,
44
+ user_id UUID REFERENCES users(id),
45
+ expires_at TIMESTAMP
46
+ );
47
+ ```
48
+
49
+ **Significance Criteria:**
50
+ - Changes affecting data integrity
51
+ - Performance-impacting schema changes
52
+ - Migration complexity (data transformation required)
53
+
54
+ #### 3. **API Design Changes**
55
+ - Defining new API endpoints
56
+ - Changing API contracts (request/response formats)
57
+ - API versioning decisions
58
+ - Authentication/authorization changes
59
+
60
+ **Example Triggers:**
61
+ ```typescript
62
+ // New API endpoint
63
+ router.post('/api/v2/users', createUser); // API versioning
64
+
65
+ // Breaking change
66
+ interface UserResponse {
67
+ id: string;
68
+ email: string;
69
+ // REMOVED: username field
70
+ }
71
+ ```
72
+
73
+ **Significance Criteria:**
74
+ - Breaking changes to public APIs
75
+ - New API versions
76
+ - Authentication mechanism changes
77
+
78
+ #### 4. **Infrastructure Changes**
79
+ - Deployment configuration changes
80
+ - CI/CD pipeline modifications
81
+ - Environment variable additions
82
+ - Cloud service integrations
83
+
84
+ **Example Triggers:**
85
+ ```yaml
86
+ # .github/workflows/deploy.yml
87
+ - name: Deploy to Kubernetes # New deployment target
88
+ uses: azure/k8s-deploy@v1
89
+ ```
90
+
91
+ **Significance Criteria:**
92
+ - Changes to deployment strategy
93
+ - New cloud services or platforms
94
+ - Security or compliance implications
95
+
96
+ ### Conversation-Based Triggers
97
+
98
+ AI agents should detect decisions during conversations when:
99
+
100
+ #### 1. **Explicit Decision Language**
101
+ User statements containing:
102
+ - "We should use..."
103
+ - "Let's switch to..."
104
+ - "I've decided to..."
105
+ - "We're going with..."
106
+
107
+ #### 2. **Comparison Discussions**
108
+ Conversations comparing alternatives:
109
+ - "Should we use X or Y?"
110
+ - "What are the pros and cons of..."
111
+ - "X vs Y for our use case"
112
+
113
+ #### 3. **Problem-Solution Patterns**
114
+ Discussions following this pattern:
115
+ 1. Problem statement
116
+ 2. Multiple solution options
117
+ 3. Evaluation criteria
118
+ 4. Final decision
119
+
120
+ ## Significance Criteria
121
+
122
+ Not every decision needs an ADR. Use these criteria to determine significance:
123
+
124
+ ### High Significance (Always Create ADR)
125
+
126
+ 1. **Structural Impact**
127
+ - Changes affecting multiple modules/services
128
+ - Architectural pattern changes (monolith → microservices)
129
+ - Technology stack changes
130
+
131
+ 2. **Long-Term Consequences**
132
+ - Decisions difficult to reverse
133
+ - Vendor lock-in implications
134
+ - Technical debt creation/resolution
135
+
136
+ 3. **Team Impact**
137
+ - Requires team training
138
+ - Changes development workflow
139
+ - Affects multiple team members
140
+
141
+ 4. **Cost/Risk**
142
+ - Significant cost implications
143
+ - Security or compliance impact
144
+ - Performance or scalability concerns
145
+
146
+ ### Medium Significance (Prompt for ADR)
147
+
148
+ 1. **Module-Level Changes**
149
+ - Affects single module but important
150
+ - New patterns or conventions
151
+ - Dependency changes within module
152
+
153
+ 2. **Process Changes**
154
+ - Testing strategy changes
155
+ - Code review process updates
156
+ - Documentation standards
157
+
158
+ ### Low Significance (No ADR Needed)
159
+
160
+ 1. **Implementation Details**
161
+ - Variable naming
162
+ - Code formatting
163
+ - Minor refactoring
164
+
165
+ 2. **Temporary Solutions**
166
+ - Quick fixes
167
+ - Experimental features
168
+ - Prototype code
169
+
170
+ ## Detection Workflow
171
+
172
+ ### Step 1: Trigger Detection
173
+
174
+ When a trigger is detected:
175
+
176
+ ```
177
+ [AI Agent detects trigger]
178
+
179
+ [Evaluate significance]
180
+
181
+ [High/Medium] → Prompt user
182
+ [Low] → Continue without ADR
183
+ ```
184
+
185
+ ### Step 2: User Prompting
186
+
187
+ For high/medium significance decisions:
188
+
189
+ **Prompt Template:**
190
+ ```
191
+ I've detected a potentially significant architectural decision:
192
+
193
+ Decision: [Brief description]
194
+ Trigger: [What triggered detection]
195
+ Significance: [Why this might be important]
196
+
197
+ Would you like me to create an ADR for this decision?
198
+ Options:
199
+ 1. Yes, create ADR now
200
+ 2. Yes, but I'll provide more context first
201
+ 3. No, this doesn't need an ADR
202
+ 4. Remind me later
203
+ ```
204
+
205
+ ### Step 3: Context Gathering
206
+
207
+ If user agrees to create ADR, gather:
208
+
209
+ 1. **Decision Context**
210
+ - What problem are we solving?
211
+ - What constraints exist?
212
+ - What alternatives were considered?
213
+
214
+ 2. **Decision Details**
215
+ - What exactly are we doing?
216
+ - Why this option over others?
217
+
218
+ 3. **Consequences**
219
+ - What are the expected benefits?
220
+ - What are the trade-offs?
221
+ - What risks exist?
222
+
223
+ ## Examples
224
+
225
+ ### Example 1: Dependency Addition (High Significance)
226
+
227
+ **Trigger:**
228
+ ```bash
229
+ npm install @prisma/client
230
+ ```
231
+
232
+ **Detection Logic:**
233
+ - New dependency added
234
+ - Category: Database ORM (first ORM in project)
235
+ - Significance: High (affects data layer architecture)
236
+
237
+ **AI Prompt:**
238
+ ```
239
+ I've detected a significant architectural decision:
240
+
241
+ Decision: Adding Prisma as database ORM
242
+ Trigger: New dependency @prisma/client
243
+ Significance: This is the first ORM in the project and will affect how we interact with the database across all services.
244
+
245
+ Would you like me to create an ADR documenting:
246
+ - Why Prisma over alternatives (TypeORM, Sequelize, raw SQL)?
247
+ - Migration strategy from current approach?
248
+ - Impact on existing code?
249
+ ```
250
+
251
+ ### Example 2: API Versioning (High Significance)
252
+
253
+ **Trigger:**
254
+ ```typescript
255
+ // Creating /api/v2/ endpoints
256
+ router.use('/api/v2', v2Router);
257
+ ```
258
+
259
+ **Detection Logic:**
260
+ - New API version created
261
+ - Significance: High (affects API consumers, backward compatibility)
262
+
263
+ **AI Prompt:**
264
+ ```
265
+ I've detected an API versioning decision:
266
+
267
+ Decision: Creating API v2
268
+ Trigger: New /api/v2 route namespace
269
+ Significance: This affects all API consumers and requires versioning strategy.
270
+
271
+ Would you like me to create an ADR documenting:
272
+ - Versioning strategy (URL-based, header-based)?
273
+ - v1 deprecation timeline?
274
+ - Breaking changes in v2?
275
+ ```
276
+
277
+ ### Example 3: Configuration Change (Low Significance)
278
+
279
+ **Trigger:**
280
+ ```json
281
+ // .prettierrc
282
+ {
283
+ "semi": false,
284
+ "singleQuote": true
285
+ }
286
+ ```
287
+
288
+ **Detection Logic:**
289
+ - Configuration change
290
+ - Category: Code formatting
291
+ - Significance: Low (no architectural impact)
292
+
293
+ **Action:** No ADR needed, continue without prompting.
294
+
295
+ ## Integration with Workflows
296
+
297
+ ### OpenSpec Integration
298
+
299
+ When decision detected in OpenSpec change:
300
+ 1. Check if change proposal exists
301
+ 2. Link ADR to change proposal
302
+ 3. Update coordination manifest
303
+
304
+ ### Beads Integration
305
+
306
+ When decision detected during task execution:
307
+ 1. Check if task is linked to spec
308
+ 2. Create ADR and link to task
309
+ 3. Update task with ADR reference
310
+
311
+ ## Best Practices
312
+
313
+ 1. **Be Proactive, Not Intrusive**
314
+ - Detect early but don't interrupt flow
315
+ - Batch prompts when multiple decisions detected
316
+ - Allow "remind me later" option
317
+
318
+ 2. **Provide Context**
319
+ - Explain why detection triggered
320
+ - Show what was detected
321
+ - Suggest what to document
322
+
323
+ 3. **Learn from User Feedback**
324
+ - Track which prompts user accepts/rejects
325
+ - Adjust significance thresholds
326
+ - Improve detection accuracy
327
+
328
+ 4. **Respect User Preferences**
329
+ - Allow disabling detection for certain categories
330
+ - Support "always create" or "never create" rules
331
+ - Honor project-specific configuration
332
+
333
+ ## Configuration
334
+
335
+ Projects can configure detection in `.adr-config.json`:
336
+
337
+ ```json
338
+ {
339
+ "detection": {
340
+ "enabled": true,
341
+ "autoPrompt": true,
342
+ "significanceThreshold": "medium",
343
+ "triggers": {
344
+ "dependencies": true,
345
+ "schema": true,
346
+ "api": true,
347
+ "infrastructure": true
348
+ },
349
+ "excludePatterns": [
350
+ "devDependencies",
351
+ "*.test.ts"
352
+ ]
353
+ }
354
+ }
355
+ ```
356
+
357
+ ## See Also
358
+
359
+ - [ADR Creation Guidelines](./adr-creation.md)
360
+ - [Lifecycle Management](./lifecycle-management.md)
361
+ - [Template Selection](./template-selection.md)
362
+