quantix-mcp 0.3.6

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 (155) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/.github/agents/copilot-instructions.md +32 -0
  3. package/.github/agents/speckit.analyze.agent.md +184 -0
  4. package/.github/agents/speckit.checklist.agent.md +294 -0
  5. package/.github/agents/speckit.clarify.agent.md +181 -0
  6. package/.github/agents/speckit.constitution.agent.md +82 -0
  7. package/.github/agents/speckit.implement.agent.md +135 -0
  8. package/.github/agents/speckit.plan.agent.md +89 -0
  9. package/.github/agents/speckit.specify.agent.md +258 -0
  10. package/.github/agents/speckit.tasks.agent.md +137 -0
  11. package/.github/agents/speckit.taskstoissues.agent.md +30 -0
  12. package/.github/copilot-instructions.md +17 -0
  13. package/.github/prompts/speckit.analyze.prompt.md +3 -0
  14. package/.github/prompts/speckit.checklist.prompt.md +3 -0
  15. package/.github/prompts/speckit.clarify.prompt.md +3 -0
  16. package/.github/prompts/speckit.constitution.prompt.md +3 -0
  17. package/.github/prompts/speckit.implement.prompt.md +3 -0
  18. package/.github/prompts/speckit.plan.prompt.md +3 -0
  19. package/.github/prompts/speckit.specify.prompt.md +3 -0
  20. package/.github/prompts/speckit.tasks.prompt.md +3 -0
  21. package/.github/prompts/speckit.taskstoissues.prompt.md +3 -0
  22. package/.github/workflows/publish.yaml +28 -0
  23. package/.opencode/command/speckit.analyze.md +184 -0
  24. package/.opencode/command/speckit.checklist.md +294 -0
  25. package/.opencode/command/speckit.clarify.md +181 -0
  26. package/.opencode/command/speckit.constitution.md +84 -0
  27. package/.opencode/command/speckit.implement.md +135 -0
  28. package/.opencode/command/speckit.plan.md +89 -0
  29. package/.opencode/command/speckit.specify.md +258 -0
  30. package/.opencode/command/speckit.tasks.md +137 -0
  31. package/.opencode/command/speckit.taskstoissues.md +30 -0
  32. package/.specify/memory/constitution.md +58 -0
  33. package/.specify/scripts/powershell/check-prerequisites.ps1 +148 -0
  34. package/.specify/scripts/powershell/common.ps1 +137 -0
  35. package/.specify/scripts/powershell/create-new-feature.ps1 +283 -0
  36. package/.specify/scripts/powershell/setup-plan.ps1 +61 -0
  37. package/.specify/scripts/powershell/update-agent-context.ps1 +448 -0
  38. package/.specify/templates/agent-file-template.md +28 -0
  39. package/.specify/templates/checklist-template.md +40 -0
  40. package/.specify/templates/constitution-template.md +50 -0
  41. package/.specify/templates/plan-template.md +104 -0
  42. package/.specify/templates/spec-template.md +115 -0
  43. package/.specify/templates/tasks-template.md +251 -0
  44. package/.vscode/launch.json +14 -0
  45. package/.vscode/settings.json +14 -0
  46. package/.vscode/tasks.json +15 -0
  47. package/CLAUDE.md +64 -0
  48. package/README.md +176 -0
  49. package/dist/config.d.ts +8 -0
  50. package/dist/config.d.ts.map +1 -0
  51. package/dist/config.js +31 -0
  52. package/dist/config.js.map +1 -0
  53. package/dist/index.d.ts +4 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +41 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/services/apiClient.d.ts +14 -0
  58. package/dist/services/apiClient.d.ts.map +1 -0
  59. package/dist/services/apiClient.js +41 -0
  60. package/dist/services/apiClient.js.map +1 -0
  61. package/dist/tools/accounts.d.ts +3 -0
  62. package/dist/tools/accounts.d.ts.map +1 -0
  63. package/dist/tools/accounts.js +77 -0
  64. package/dist/tools/accounts.js.map +1 -0
  65. package/dist/tools/categories.d.ts +3 -0
  66. package/dist/tools/categories.d.ts.map +1 -0
  67. package/dist/tools/categories.js +57 -0
  68. package/dist/tools/categories.js.map +1 -0
  69. package/dist/tools/credit-cards.d.ts +3 -0
  70. package/dist/tools/credit-cards.d.ts.map +1 -0
  71. package/dist/tools/credit-cards.js +93 -0
  72. package/dist/tools/credit-cards.js.map +1 -0
  73. package/dist/tools/data.d.ts +3 -0
  74. package/dist/tools/data.d.ts.map +1 -0
  75. package/dist/tools/data.js +27 -0
  76. package/dist/tools/data.js.map +1 -0
  77. package/dist/tools/settings.d.ts +3 -0
  78. package/dist/tools/settings.d.ts.map +1 -0
  79. package/dist/tools/settings.js +37 -0
  80. package/dist/tools/settings.js.map +1 -0
  81. package/dist/tools/summary.d.ts +3 -0
  82. package/dist/tools/summary.d.ts.map +1 -0
  83. package/dist/tools/summary.js +23 -0
  84. package/dist/tools/summary.js.map +1 -0
  85. package/dist/tools/transactions.d.ts +3 -0
  86. package/dist/tools/transactions.d.ts.map +1 -0
  87. package/dist/tools/transactions.js +102 -0
  88. package/dist/tools/transactions.js.map +1 -0
  89. package/dist/types/schemas.d.ts +330 -0
  90. package/dist/types/schemas.d.ts.map +1 -0
  91. package/dist/types/schemas.js +206 -0
  92. package/dist/types/schemas.js.map +1 -0
  93. package/openapi.yaml +1786 -0
  94. package/package.json +41 -0
  95. package/specs/001-mcp-api-integration/checklists/requirements.md +34 -0
  96. package/specs/001-mcp-api-integration/contracts/openapi.yaml +636 -0
  97. package/specs/001-mcp-api-integration/data-model.md +106 -0
  98. package/specs/001-mcp-api-integration/plan.md +73 -0
  99. package/specs/001-mcp-api-integration/quickstart.md +74 -0
  100. package/specs/001-mcp-api-integration/research.md +58 -0
  101. package/specs/001-mcp-api-integration/spec.md +119 -0
  102. package/specs/001-mcp-api-integration/tasks.md +64 -0
  103. package/src/config.ts +36 -0
  104. package/src/index.ts +47 -0
  105. package/src/services/apiClient.ts +49 -0
  106. package/src/tools/accounts.ts +111 -0
  107. package/src/tools/categories.ts +81 -0
  108. package/src/tools/credit-cards.ts +132 -0
  109. package/src/tools/data.ts +36 -0
  110. package/src/tools/settings.ts +51 -0
  111. package/src/tools/summary.ts +24 -0
  112. package/src/tools/transactions.ts +128 -0
  113. package/src/types/schemas.ts +230 -0
  114. package/tests/benchmark.test.d.ts +2 -0
  115. package/tests/benchmark.test.d.ts.map +1 -0
  116. package/tests/benchmark.test.js +33 -0
  117. package/tests/benchmark.test.js.map +1 -0
  118. package/tests/benchmark.test.ts +38 -0
  119. package/tests/server.test.d.ts +2 -0
  120. package/tests/server.test.d.ts.map +1 -0
  121. package/tests/server.test.js +13 -0
  122. package/tests/server.test.js.map +1 -0
  123. package/tests/server.test.ts +14 -0
  124. package/tests/setup.d.ts +4 -0
  125. package/tests/setup.d.ts.map +1 -0
  126. package/tests/setup.js +17 -0
  127. package/tests/setup.js.map +1 -0
  128. package/tests/setup.ts +20 -0
  129. package/tests/tools/accounts.test.ts +118 -0
  130. package/tests/tools/categories.test.d.ts +2 -0
  131. package/tests/tools/categories.test.d.ts.map +1 -0
  132. package/tests/tools/categories.test.js +63 -0
  133. package/tests/tools/categories.test.js.map +1 -0
  134. package/tests/tools/categories.test.ts +78 -0
  135. package/tests/tools/credit-cards.test.d.ts +2 -0
  136. package/tests/tools/credit-cards.test.d.ts.map +1 -0
  137. package/tests/tools/credit-cards.test.js +71 -0
  138. package/tests/tools/credit-cards.test.js.map +1 -0
  139. package/tests/tools/credit-cards.test.ts +89 -0
  140. package/tests/tools/summary.test.d.ts +2 -0
  141. package/tests/tools/summary.test.d.ts.map +1 -0
  142. package/tests/tools/summary.test.js +36 -0
  143. package/tests/tools/summary.test.js.map +1 -0
  144. package/tests/tools/summary.test.ts +42 -0
  145. package/tests/tools/transactions.test.d.ts +2 -0
  146. package/tests/tools/transactions.test.d.ts.map +1 -0
  147. package/tests/tools/transactions.test.js +67 -0
  148. package/tests/tools/transactions.test.js.map +1 -0
  149. package/tests/tools/transactions.test.ts +82 -0
  150. package/tsconfig.json +52 -0
  151. package/vitest.config.d.ts +3 -0
  152. package/vitest.config.d.ts.map +1 -0
  153. package/vitest.config.js +14 -0
  154. package/vitest.config.js.map +1 -0
  155. package/vitest.config.ts +14 -0
@@ -0,0 +1,283 @@
1
+ #!/usr/bin/env pwsh
2
+ # Create a new feature
3
+ [CmdletBinding()]
4
+ param(
5
+ [switch]$Json,
6
+ [string]$ShortName,
7
+ [int]$Number = 0,
8
+ [switch]$Help,
9
+ [Parameter(ValueFromRemainingArguments = $true)]
10
+ [string[]]$FeatureDescription
11
+ )
12
+ $ErrorActionPreference = 'Stop'
13
+
14
+ # Show help if requested
15
+ if ($Help) {
16
+ Write-Host "Usage: ./create-new-feature.ps1 [-Json] [-ShortName <name>] [-Number N] <feature description>"
17
+ Write-Host ""
18
+ Write-Host "Options:"
19
+ Write-Host " -Json Output in JSON format"
20
+ Write-Host " -ShortName <name> Provide a custom short name (2-4 words) for the branch"
21
+ Write-Host " -Number N Specify branch number manually (overrides auto-detection)"
22
+ Write-Host " -Help Show this help message"
23
+ Write-Host ""
24
+ Write-Host "Examples:"
25
+ Write-Host " ./create-new-feature.ps1 'Add user authentication system' -ShortName 'user-auth'"
26
+ Write-Host " ./create-new-feature.ps1 'Implement OAuth2 integration for API'"
27
+ exit 0
28
+ }
29
+
30
+ # Check if feature description provided
31
+ if (-not $FeatureDescription -or $FeatureDescription.Count -eq 0) {
32
+ Write-Error "Usage: ./create-new-feature.ps1 [-Json] [-ShortName <name>] <feature description>"
33
+ exit 1
34
+ }
35
+
36
+ $featureDesc = ($FeatureDescription -join ' ').Trim()
37
+
38
+ # Resolve repository root. Prefer git information when available, but fall back
39
+ # to searching for repository markers so the workflow still functions in repositories that
40
+ # were initialized with --no-git.
41
+ function Find-RepositoryRoot {
42
+ param(
43
+ [string]$StartDir,
44
+ [string[]]$Markers = @('.git', '.specify')
45
+ )
46
+ $current = Resolve-Path $StartDir
47
+ while ($true) {
48
+ foreach ($marker in $Markers) {
49
+ if (Test-Path (Join-Path $current $marker)) {
50
+ return $current
51
+ }
52
+ }
53
+ $parent = Split-Path $current -Parent
54
+ if ($parent -eq $current) {
55
+ # Reached filesystem root without finding markers
56
+ return $null
57
+ }
58
+ $current = $parent
59
+ }
60
+ }
61
+
62
+ function Get-HighestNumberFromSpecs {
63
+ param([string]$SpecsDir)
64
+
65
+ $highest = 0
66
+ if (Test-Path $SpecsDir) {
67
+ Get-ChildItem -Path $SpecsDir -Directory | ForEach-Object {
68
+ if ($_.Name -match '^(\d+)') {
69
+ $num = [int]$matches[1]
70
+ if ($num -gt $highest) { $highest = $num }
71
+ }
72
+ }
73
+ }
74
+ return $highest
75
+ }
76
+
77
+ function Get-HighestNumberFromBranches {
78
+ param()
79
+
80
+ $highest = 0
81
+ try {
82
+ $branches = git branch -a 2>$null
83
+ if ($LASTEXITCODE -eq 0) {
84
+ foreach ($branch in $branches) {
85
+ # Clean branch name: remove leading markers and remote prefixes
86
+ $cleanBranch = $branch.Trim() -replace '^\*?\s+', '' -replace '^remotes/[^/]+/', ''
87
+
88
+ # Extract feature number if branch matches pattern ###-*
89
+ if ($cleanBranch -match '^(\d+)-') {
90
+ $num = [int]$matches[1]
91
+ if ($num -gt $highest) { $highest = $num }
92
+ }
93
+ }
94
+ }
95
+ } catch {
96
+ # If git command fails, return 0
97
+ Write-Verbose "Could not check Git branches: $_"
98
+ }
99
+ return $highest
100
+ }
101
+
102
+ function Get-NextBranchNumber {
103
+ param(
104
+ [string]$SpecsDir
105
+ )
106
+
107
+ # Fetch all remotes to get latest branch info (suppress errors if no remotes)
108
+ try {
109
+ git fetch --all --prune 2>$null | Out-Null
110
+ } catch {
111
+ # Ignore fetch errors
112
+ }
113
+
114
+ # Get highest number from ALL branches (not just matching short name)
115
+ $highestBranch = Get-HighestNumberFromBranches
116
+
117
+ # Get highest number from ALL specs (not just matching short name)
118
+ $highestSpec = Get-HighestNumberFromSpecs -SpecsDir $SpecsDir
119
+
120
+ # Take the maximum of both
121
+ $maxNum = [Math]::Max($highestBranch, $highestSpec)
122
+
123
+ # Return next number
124
+ return $maxNum + 1
125
+ }
126
+
127
+ function ConvertTo-CleanBranchName {
128
+ param([string]$Name)
129
+
130
+ return $Name.ToLower() -replace '[^a-z0-9]', '-' -replace '-{2,}', '-' -replace '^-', '' -replace '-$', ''
131
+ }
132
+ $fallbackRoot = (Find-RepositoryRoot -StartDir $PSScriptRoot)
133
+ if (-not $fallbackRoot) {
134
+ Write-Error "Error: Could not determine repository root. Please run this script from within the repository."
135
+ exit 1
136
+ }
137
+
138
+ try {
139
+ $repoRoot = git rev-parse --show-toplevel 2>$null
140
+ if ($LASTEXITCODE -eq 0) {
141
+ $hasGit = $true
142
+ } else {
143
+ throw "Git not available"
144
+ }
145
+ } catch {
146
+ $repoRoot = $fallbackRoot
147
+ $hasGit = $false
148
+ }
149
+
150
+ Set-Location $repoRoot
151
+
152
+ $specsDir = Join-Path $repoRoot 'specs'
153
+ New-Item -ItemType Directory -Path $specsDir -Force | Out-Null
154
+
155
+ # Function to generate branch name with stop word filtering and length filtering
156
+ function Get-BranchName {
157
+ param([string]$Description)
158
+
159
+ # Common stop words to filter out
160
+ $stopWords = @(
161
+ 'i', 'a', 'an', 'the', 'to', 'for', 'of', 'in', 'on', 'at', 'by', 'with', 'from',
162
+ 'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had',
163
+ 'do', 'does', 'did', 'will', 'would', 'should', 'could', 'can', 'may', 'might', 'must', 'shall',
164
+ 'this', 'that', 'these', 'those', 'my', 'your', 'our', 'their',
165
+ 'want', 'need', 'add', 'get', 'set'
166
+ )
167
+
168
+ # Convert to lowercase and extract words (alphanumeric only)
169
+ $cleanName = $Description.ToLower() -replace '[^a-z0-9\s]', ' '
170
+ $words = $cleanName -split '\s+' | Where-Object { $_ }
171
+
172
+ # Filter words: remove stop words and words shorter than 3 chars (unless they're uppercase acronyms in original)
173
+ $meaningfulWords = @()
174
+ foreach ($word in $words) {
175
+ # Skip stop words
176
+ if ($stopWords -contains $word) { continue }
177
+
178
+ # Keep words that are length >= 3 OR appear as uppercase in original (likely acronyms)
179
+ if ($word.Length -ge 3) {
180
+ $meaningfulWords += $word
181
+ } elseif ($Description -match "\b$($word.ToUpper())\b") {
182
+ # Keep short words if they appear as uppercase in original (likely acronyms)
183
+ $meaningfulWords += $word
184
+ }
185
+ }
186
+
187
+ # If we have meaningful words, use first 3-4 of them
188
+ if ($meaningfulWords.Count -gt 0) {
189
+ $maxWords = if ($meaningfulWords.Count -eq 4) { 4 } else { 3 }
190
+ $result = ($meaningfulWords | Select-Object -First $maxWords) -join '-'
191
+ return $result
192
+ } else {
193
+ # Fallback to original logic if no meaningful words found
194
+ $result = ConvertTo-CleanBranchName -Name $Description
195
+ $fallbackWords = ($result -split '-') | Where-Object { $_ } | Select-Object -First 3
196
+ return [string]::Join('-', $fallbackWords)
197
+ }
198
+ }
199
+
200
+ # Generate branch name
201
+ if ($ShortName) {
202
+ # Use provided short name, just clean it up
203
+ $branchSuffix = ConvertTo-CleanBranchName -Name $ShortName
204
+ } else {
205
+ # Generate from description with smart filtering
206
+ $branchSuffix = Get-BranchName -Description $featureDesc
207
+ }
208
+
209
+ # Determine branch number
210
+ if ($Number -eq 0) {
211
+ if ($hasGit) {
212
+ # Check existing branches on remotes
213
+ $Number = Get-NextBranchNumber -SpecsDir $specsDir
214
+ } else {
215
+ # Fall back to local directory check
216
+ $Number = (Get-HighestNumberFromSpecs -SpecsDir $specsDir) + 1
217
+ }
218
+ }
219
+
220
+ $featureNum = ('{0:000}' -f $Number)
221
+ $branchName = "$featureNum-$branchSuffix"
222
+
223
+ # GitHub enforces a 244-byte limit on branch names
224
+ # Validate and truncate if necessary
225
+ $maxBranchLength = 244
226
+ if ($branchName.Length -gt $maxBranchLength) {
227
+ # Calculate how much we need to trim from suffix
228
+ # Account for: feature number (3) + hyphen (1) = 4 chars
229
+ $maxSuffixLength = $maxBranchLength - 4
230
+
231
+ # Truncate suffix
232
+ $truncatedSuffix = $branchSuffix.Substring(0, [Math]::Min($branchSuffix.Length, $maxSuffixLength))
233
+ # Remove trailing hyphen if truncation created one
234
+ $truncatedSuffix = $truncatedSuffix -replace '-$', ''
235
+
236
+ $originalBranchName = $branchName
237
+ $branchName = "$featureNum-$truncatedSuffix"
238
+
239
+ Write-Warning "[specify] Branch name exceeded GitHub's 244-byte limit"
240
+ Write-Warning "[specify] Original: $originalBranchName ($($originalBranchName.Length) bytes)"
241
+ Write-Warning "[specify] Truncated to: $branchName ($($branchName.Length) bytes)"
242
+ }
243
+
244
+ if ($hasGit) {
245
+ try {
246
+ git checkout -b $branchName | Out-Null
247
+ } catch {
248
+ Write-Warning "Failed to create git branch: $branchName"
249
+ }
250
+ } else {
251
+ Write-Warning "[specify] Warning: Git repository not detected; skipped branch creation for $branchName"
252
+ }
253
+
254
+ $featureDir = Join-Path $specsDir $branchName
255
+ New-Item -ItemType Directory -Path $featureDir -Force | Out-Null
256
+
257
+ $template = Join-Path $repoRoot '.specify/templates/spec-template.md'
258
+ $specFile = Join-Path $featureDir 'spec.md'
259
+ if (Test-Path $template) {
260
+ Copy-Item $template $specFile -Force
261
+ } else {
262
+ New-Item -ItemType File -Path $specFile | Out-Null
263
+ }
264
+
265
+ # Set the SPECIFY_FEATURE environment variable for the current session
266
+ $env:SPECIFY_FEATURE = $branchName
267
+
268
+ if ($Json) {
269
+ $obj = [PSCustomObject]@{
270
+ BRANCH_NAME = $branchName
271
+ SPEC_FILE = $specFile
272
+ FEATURE_NUM = $featureNum
273
+ HAS_GIT = $hasGit
274
+ }
275
+ $obj | ConvertTo-Json -Compress
276
+ } else {
277
+ Write-Output "BRANCH_NAME: $branchName"
278
+ Write-Output "SPEC_FILE: $specFile"
279
+ Write-Output "FEATURE_NUM: $featureNum"
280
+ Write-Output "HAS_GIT: $hasGit"
281
+ Write-Output "SPECIFY_FEATURE environment variable set to: $branchName"
282
+ }
283
+
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env pwsh
2
+ # Setup implementation plan for a feature
3
+
4
+ [CmdletBinding()]
5
+ param(
6
+ [switch]$Json,
7
+ [switch]$Help
8
+ )
9
+
10
+ $ErrorActionPreference = 'Stop'
11
+
12
+ # Show help if requested
13
+ if ($Help) {
14
+ Write-Output "Usage: ./setup-plan.ps1 [-Json] [-Help]"
15
+ Write-Output " -Json Output results in JSON format"
16
+ Write-Output " -Help Show this help message"
17
+ exit 0
18
+ }
19
+
20
+ # Load common functions
21
+ . "$PSScriptRoot/common.ps1"
22
+
23
+ # Get all paths and variables from common functions
24
+ $paths = Get-FeaturePathsEnv
25
+
26
+ # Check if we're on a proper feature branch (only for git repos)
27
+ if (-not (Test-FeatureBranch -Branch $paths.CURRENT_BRANCH -HasGit $paths.HAS_GIT)) {
28
+ exit 1
29
+ }
30
+
31
+ # Ensure the feature directory exists
32
+ New-Item -ItemType Directory -Path $paths.FEATURE_DIR -Force | Out-Null
33
+
34
+ # Copy plan template if it exists, otherwise note it or create empty file
35
+ $template = Join-Path $paths.REPO_ROOT '.specify/templates/plan-template.md'
36
+ if (Test-Path $template) {
37
+ Copy-Item $template $paths.IMPL_PLAN -Force
38
+ Write-Output "Copied plan template to $($paths.IMPL_PLAN)"
39
+ } else {
40
+ Write-Warning "Plan template not found at $template"
41
+ # Create a basic plan file if template doesn't exist
42
+ New-Item -ItemType File -Path $paths.IMPL_PLAN -Force | Out-Null
43
+ }
44
+
45
+ # Output results
46
+ if ($Json) {
47
+ $result = [PSCustomObject]@{
48
+ FEATURE_SPEC = $paths.FEATURE_SPEC
49
+ IMPL_PLAN = $paths.IMPL_PLAN
50
+ SPECS_DIR = $paths.FEATURE_DIR
51
+ BRANCH = $paths.CURRENT_BRANCH
52
+ HAS_GIT = $paths.HAS_GIT
53
+ }
54
+ $result | ConvertTo-Json -Compress
55
+ } else {
56
+ Write-Output "FEATURE_SPEC: $($paths.FEATURE_SPEC)"
57
+ Write-Output "IMPL_PLAN: $($paths.IMPL_PLAN)"
58
+ Write-Output "SPECS_DIR: $($paths.FEATURE_DIR)"
59
+ Write-Output "BRANCH: $($paths.CURRENT_BRANCH)"
60
+ Write-Output "HAS_GIT: $($paths.HAS_GIT)"
61
+ }