@promptci/core 0.0.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 (179) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +30 -0
  3. package/dist/agent-practices.d.ts +22 -0
  4. package/dist/agent-practices.d.ts.map +1 -0
  5. package/dist/agent-practices.js +582 -0
  6. package/dist/agent-practices.js.map +1 -0
  7. package/dist/baseline.d.ts +40 -0
  8. package/dist/baseline.d.ts.map +1 -0
  9. package/dist/baseline.js +172 -0
  10. package/dist/baseline.js.map +1 -0
  11. package/dist/canonical-owner.d.ts +3 -0
  12. package/dist/canonical-owner.d.ts.map +1 -0
  13. package/dist/canonical-owner.js +131 -0
  14. package/dist/canonical-owner.js.map +1 -0
  15. package/dist/cheap-model-routing.d.ts +4 -0
  16. package/dist/cheap-model-routing.d.ts.map +1 -0
  17. package/dist/cheap-model-routing.js +43 -0
  18. package/dist/cheap-model-routing.js.map +1 -0
  19. package/dist/ci-alignment.d.ts +10 -0
  20. package/dist/ci-alignment.d.ts.map +1 -0
  21. package/dist/ci-alignment.js +343 -0
  22. package/dist/ci-alignment.js.map +1 -0
  23. package/dist/cli-output-filter.d.ts +16 -0
  24. package/dist/cli-output-filter.d.ts.map +1 -0
  25. package/dist/cli-output-filter.js +88 -0
  26. package/dist/cli-output-filter.js.map +1 -0
  27. package/dist/command-validity.d.ts +12 -0
  28. package/dist/command-validity.d.ts.map +1 -0
  29. package/dist/command-validity.js +543 -0
  30. package/dist/command-validity.js.map +1 -0
  31. package/dist/conflicts.d.ts +49 -0
  32. package/dist/conflicts.d.ts.map +1 -0
  33. package/dist/conflicts.js +1065 -0
  34. package/dist/conflicts.js.map +1 -0
  35. package/dist/context-analysis.d.ts +15 -0
  36. package/dist/context-analysis.d.ts.map +1 -0
  37. package/dist/context-analysis.js +24 -0
  38. package/dist/context-analysis.js.map +1 -0
  39. package/dist/context-bloat.d.ts +17 -0
  40. package/dist/context-bloat.d.ts.map +1 -0
  41. package/dist/context-bloat.js +148 -0
  42. package/dist/context-bloat.js.map +1 -0
  43. package/dist/context-cost.d.ts +4 -0
  44. package/dist/context-cost.d.ts.map +1 -0
  45. package/dist/context-cost.js +70 -0
  46. package/dist/context-cost.js.map +1 -0
  47. package/dist/context-optimizer.d.ts +14 -0
  48. package/dist/context-optimizer.d.ts.map +1 -0
  49. package/dist/context-optimizer.js +219 -0
  50. package/dist/context-optimizer.js.map +1 -0
  51. package/dist/context-recommender.d.ts +3 -0
  52. package/dist/context-recommender.d.ts.map +1 -0
  53. package/dist/context-recommender.js +329 -0
  54. package/dist/context-recommender.js.map +1 -0
  55. package/dist/dead-references.d.ts +33 -0
  56. package/dist/dead-references.d.ts.map +1 -0
  57. package/dist/dead-references.js +607 -0
  58. package/dist/dead-references.js.map +1 -0
  59. package/dist/detectors.d.ts +11 -0
  60. package/dist/detectors.d.ts.map +1 -0
  61. package/dist/detectors.js +160 -0
  62. package/dist/detectors.js.map +1 -0
  63. package/dist/duplicates.d.ts +36 -0
  64. package/dist/duplicates.d.ts.map +1 -0
  65. package/dist/duplicates.js +436 -0
  66. package/dist/duplicates.js.map +1 -0
  67. package/dist/fix-engine.d.ts +16 -0
  68. package/dist/fix-engine.d.ts.map +1 -0
  69. package/dist/fix-engine.js +179 -0
  70. package/dist/fix-engine.js.map +1 -0
  71. package/dist/framework-packs.d.ts +8 -0
  72. package/dist/framework-packs.d.ts.map +1 -0
  73. package/dist/framework-packs.js +22 -0
  74. package/dist/framework-packs.js.map +1 -0
  75. package/dist/frameworks/dotnet.d.ts +4 -0
  76. package/dist/frameworks/dotnet.d.ts.map +1 -0
  77. package/dist/frameworks/dotnet.js +77 -0
  78. package/dist/frameworks/dotnet.js.map +1 -0
  79. package/dist/frameworks/go.d.ts +4 -0
  80. package/dist/frameworks/go.d.ts.map +1 -0
  81. package/dist/frameworks/go.js +39 -0
  82. package/dist/frameworks/go.js.map +1 -0
  83. package/dist/frameworks/nextjs.d.ts +4 -0
  84. package/dist/frameworks/nextjs.d.ts.map +1 -0
  85. package/dist/frameworks/nextjs.js +66 -0
  86. package/dist/frameworks/nextjs.js.map +1 -0
  87. package/dist/frameworks/python.d.ts +4 -0
  88. package/dist/frameworks/python.d.ts.map +1 -0
  89. package/dist/frameworks/python.js +66 -0
  90. package/dist/frameworks/python.js.map +1 -0
  91. package/dist/frameworks/rust.d.ts +4 -0
  92. package/dist/frameworks/rust.d.ts.map +1 -0
  93. package/dist/frameworks/rust.js +72 -0
  94. package/dist/frameworks/rust.js.map +1 -0
  95. package/dist/frameworks/unity.d.ts +4 -0
  96. package/dist/frameworks/unity.d.ts.map +1 -0
  97. package/dist/frameworks/unity.js +74 -0
  98. package/dist/frameworks/unity.js.map +1 -0
  99. package/dist/health-score.d.ts +37 -0
  100. package/dist/health-score.d.ts.map +1 -0
  101. package/dist/health-score.js +164 -0
  102. package/dist/health-score.js.map +1 -0
  103. package/dist/index.d.ts +31 -0
  104. package/dist/index.d.ts.map +1 -0
  105. package/dist/index.js +23 -0
  106. package/dist/index.js.map +1 -0
  107. package/dist/llm.d.ts +6 -0
  108. package/dist/llm.d.ts.map +1 -0
  109. package/dist/llm.js +67 -0
  110. package/dist/llm.js.map +1 -0
  111. package/dist/manifest-consistency.d.ts +37 -0
  112. package/dist/manifest-consistency.d.ts.map +1 -0
  113. package/dist/manifest-consistency.js +659 -0
  114. package/dist/manifest-consistency.js.map +1 -0
  115. package/dist/mcp-detector.d.ts +4 -0
  116. package/dist/mcp-detector.d.ts.map +1 -0
  117. package/dist/mcp-detector.js +131 -0
  118. package/dist/mcp-detector.js.map +1 -0
  119. package/dist/missing-context.d.ts +15 -0
  120. package/dist/missing-context.d.ts.map +1 -0
  121. package/dist/missing-context.js +517 -0
  122. package/dist/missing-context.js.map +1 -0
  123. package/dist/native-tool-preference.d.ts +20 -0
  124. package/dist/native-tool-preference.d.ts.map +1 -0
  125. package/dist/native-tool-preference.js +94 -0
  126. package/dist/native-tool-preference.js.map +1 -0
  127. package/dist/output-verbosity.d.ts +3 -0
  128. package/dist/output-verbosity.d.ts.map +1 -0
  129. package/dist/output-verbosity.js +83 -0
  130. package/dist/output-verbosity.js.map +1 -0
  131. package/dist/product-boundary.d.ts +11 -0
  132. package/dist/product-boundary.d.ts.map +1 -0
  133. package/dist/product-boundary.js +301 -0
  134. package/dist/product-boundary.js.map +1 -0
  135. package/dist/project-type.d.ts +15 -0
  136. package/dist/project-type.d.ts.map +1 -0
  137. package/dist/project-type.js +116 -0
  138. package/dist/project-type.js.map +1 -0
  139. package/dist/prompt-cache.d.ts +3 -0
  140. package/dist/prompt-cache.d.ts.map +1 -0
  141. package/dist/prompt-cache.js +151 -0
  142. package/dist/prompt-cache.js.map +1 -0
  143. package/dist/repo-context.d.ts +37 -0
  144. package/dist/repo-context.d.ts.map +1 -0
  145. package/dist/repo-context.js +221 -0
  146. package/dist/repo-context.js.map +1 -0
  147. package/dist/report.d.ts +87 -0
  148. package/dist/report.d.ts.map +1 -0
  149. package/dist/report.js +558 -0
  150. package/dist/report.js.map +1 -0
  151. package/dist/scan.d.ts +7 -0
  152. package/dist/scan.d.ts.map +1 -0
  153. package/dist/scan.js +43 -0
  154. package/dist/scan.js.map +1 -0
  155. package/dist/scanner.d.ts +3 -0
  156. package/dist/scanner.d.ts.map +1 -0
  157. package/dist/scanner.js +216 -0
  158. package/dist/scanner.js.map +1 -0
  159. package/dist/security-pack.d.ts +4 -0
  160. package/dist/security-pack.d.ts.map +1 -0
  161. package/dist/security-pack.js +403 -0
  162. package/dist/security-pack.js.map +1 -0
  163. package/dist/stale-instructions.d.ts +20 -0
  164. package/dist/stale-instructions.d.ts.map +1 -0
  165. package/dist/stale-instructions.js +269 -0
  166. package/dist/stale-instructions.js.map +1 -0
  167. package/dist/suppression.d.ts +64 -0
  168. package/dist/suppression.d.ts.map +1 -0
  169. package/dist/suppression.js +338 -0
  170. package/dist/suppression.js.map +1 -0
  171. package/dist/types.d.ts +128 -0
  172. package/dist/types.d.ts.map +1 -0
  173. package/dist/types.js +3 -0
  174. package/dist/types.js.map +1 -0
  175. package/dist/vague-guidance.d.ts +12 -0
  176. package/dist/vague-guidance.d.ts.map +1 -0
  177. package/dist/vague-guidance.js +235 -0
  178. package/dist/vague-guidance.js.map +1 -0
  179. package/package.json +54 -0
@@ -0,0 +1,235 @@
1
+ /**
2
+ * Vague-guidance detector for PromptCI.
3
+ *
4
+ * Flags sections that contain non-actionable, vague guidance.
5
+ * Emits at most one issue per section regardless of how many vague phrases
6
+ * appear in it.
7
+ *
8
+ * Heuristic detector — confidence 0.8, severity "info".
9
+ */
10
+ import * as crypto from 'node:crypto';
11
+ const VAGUE_PHRASES = [
12
+ 'write clean code',
13
+ 'write clean', // catches "write clean Go code", "write clean Python code", etc.
14
+ 'use best practices',
15
+ 'make it production ready',
16
+ 'production ready', // no-hyphen variant: "keep it production ready"
17
+ 'production-ready',
18
+ 'be careful',
19
+ 'do the right thing',
20
+ 'follow good patterns',
21
+ 'write good tests',
22
+ 'keep it simple',
23
+ 'keep things simple',
24
+ 'best practices', // catches "Follow best practices" (no "use" prefix)
25
+ 'production-quality', // "Write production-quality code"
26
+ 'production quality', // variant without hyphen
27
+ 'follow best practices', // explicit form
28
+ 'idiomatic code', // "write idiomatic code"
29
+ 'make sure everything works',
30
+ 'ensure quality',
31
+ 'write quality code',
32
+ 'industry standards',
33
+ 'generally accepted',
34
+ // BUG-006: Software-quality buzzwords that are non-actionable in agent context
35
+ 'solid principles', // "follow SOLID principles throughout"
36
+ 'follow solid', // short form catch
37
+ 'self-documenting', // "Good code is self-documenting"
38
+ 'make it maintainable', // "Make it maintainable"
39
+ 'clean maintainable', // "clean, maintainable code"
40
+ 'good engineering', // "good engineering practices"
41
+ // BUG-J1: Formal engineering jargon that sounds specific but provides no actionable constraint
42
+ 'clean architecture', // "use clean architecture" — no concrete layer rules given
43
+ 'maintainable code', // "write maintainable code" — what makes it maintainable?
44
+ 'readable code', // "write readable code" — no concrete readability rules
45
+ 'high-quality code', // "produce high-quality code" — what quality metric?
46
+ 'high quality code', // variant without hyphen
47
+ 'follow industry standards', // "follow industry standards" — which standard?
48
+ // BUG-004 (eval): Language-paradigm platitudes — sound like guidance but provide no
49
+ // actionable constraint. Previously caught by a broader "idiomatic" trigger that was
50
+ // narrowed in BUG-010, causing a regression for "write idiomatic Elixir code".
51
+ 'functional programming principles', // "Follow functional programming principles"
52
+ 'write idiomatic', // "write idiomatic Elixir/Python/Rust code"
53
+ // BUG-003: Subjective UI/UX language — not actionable without concrete criteria
54
+ 'polished and professional', // "UI looks polished and professional"
55
+ 'looks polished',
56
+ 'feel smooth and native', // "feel smooth and native"
57
+ 'smooth and native',
58
+ 'feels native',
59
+ 'feel native',
60
+ 'feel smooth',
61
+ 'accessible and usable', // "accessible and usable by keyboard and screen reader users"
62
+ 'provide good defaults', // "Provide good defaults"
63
+ 'great user experience',
64
+ 'good user experience',
65
+ 'seamless experience',
66
+ 'intuitive interface',
67
+ 'user-friendly',
68
+ 'easy to use',
69
+ 'delightful',
70
+ // BUG-J2: Additional subjective UI quality adjectives
71
+ 'looks good', // "the UI should look good"
72
+ 'visually appealing', // "make it visually appealing"
73
+ 'native feel', // "aim for a native feel"
74
+ // BUG-003: Language-paradigm vague directives that don't specify concrete rules
75
+ 'follow go best practices', // "Follow Go best practices for idiomatic code"
76
+ 'follow rust best practices',
77
+ 'follow python best practices',
78
+ 'idiomatic go', // "write idiomatic Go code"
79
+ 'idiomatic rust',
80
+ 'idiomatic python',
81
+ 'idiomatic elixir',
82
+ 'idiomatic typescript',
83
+ ];
84
+ /**
85
+ * Minimum surrounding context required to flag a vague phrase.
86
+ * If the line containing the phrase is longer than this, it likely has
87
+ * enough additional specifics to be actionable — skip it.
88
+ */
89
+ const MAX_LINE_LENGTH_TO_FLAG = 120;
90
+ /**
91
+ * V2: Auto-derive a no-hyphen twin for every hyphenated phrase instead of
92
+ * hand-enumerating each one. Several phrases already had both forms listed
93
+ * explicitly ("production ready" / "production-ready"), but others didn't
94
+ * (e.g. "user-friendly" had no "user friendly" twin) — this closes that gap
95
+ * for every current and future hyphenated entry in one place.
96
+ */
97
+ function expandHyphenVariants(phrases) {
98
+ const expanded = new Set();
99
+ for (const phrase of phrases) {
100
+ expanded.add(phrase);
101
+ if (phrase.includes('-')) {
102
+ expanded.add(phrase.replace(/-/g, ' '));
103
+ }
104
+ }
105
+ return [...expanded];
106
+ }
107
+ const ALL_VAGUE_PHRASES = expandHyphenVariants(VAGUE_PHRASES);
108
+ function escapeRegExp(text) {
109
+ return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
110
+ }
111
+ /**
112
+ * V3: Word-boundary-anchored phrase matcher. A naive substring match lets
113
+ * 'be careful' match "must be carefully reviewed by QA" and 'write clean'
114
+ * match "write cleanup scripts for temp files". Compiled once per phrase and
115
+ * reused across every section/file.
116
+ */
117
+ const PHRASE_PATTERNS = new Map(ALL_VAGUE_PHRASES.map((phrase) => [phrase, new RegExp(`\\b${escapeRegExp(phrase)}\\b`)]));
118
+ /**
119
+ * V4: Strip fenced code blocks (``` and ~~~, matching either fence
120
+ * character/length per CommonMark — see scanner.ts) and inline code spans
121
+ * before matching. A fenced example that quotes a vague phrase is
122
+ * documentation about the phrase, not real guidance directed at the agent.
123
+ */
124
+ function stripCodeBlocks(text) {
125
+ const lines = text.split('\n');
126
+ const kept = [];
127
+ let inBlock = false;
128
+ let fenceChar = null;
129
+ let fenceLen = 0;
130
+ for (const line of lines) {
131
+ if (!inBlock) {
132
+ const openMatch = /^ {0,3}([`~]{3,})/.exec(line);
133
+ if (openMatch) {
134
+ inBlock = true;
135
+ fenceChar = openMatch[1][0] ?? null;
136
+ fenceLen = openMatch[1].length;
137
+ continue;
138
+ }
139
+ kept.push(line);
140
+ }
141
+ else {
142
+ const closeMatch = /^ {0,3}([`~]{3,})\s*$/.exec(line);
143
+ if (closeMatch && closeMatch[1][0] === fenceChar && closeMatch[1].length >= fenceLen) {
144
+ inBlock = false;
145
+ fenceChar = null;
146
+ fenceLen = 0;
147
+ }
148
+ // else: still inside the fence — drop the line
149
+ }
150
+ }
151
+ return kept.join('\n').replace(/`[^`\n]+`/g, '');
152
+ }
153
+ /**
154
+ * V1: Find lines (or pairs of consecutive wrapped lines) containing `phraseRe`
155
+ * within the per-line length budget. Hard-wrapped guidance like:
156
+ * Make it production
157
+ * ready before merging.
158
+ * never matches on either individual line, so consecutive non-blank lines are
159
+ * also checked joined by a single space.
160
+ */
161
+ function findPhraseMatches(scanText, phraseRe) {
162
+ const trimmedLines = scanText.split('\n').map((l) => l.trim());
163
+ const matches = [];
164
+ for (let i = 0; i < trimmedLines.length; i++) {
165
+ const single = trimmedLines[i];
166
+ if (single && phraseRe.test(single.toLowerCase()) && single.length <= MAX_LINE_LENGTH_TO_FLAG) {
167
+ matches.push(single);
168
+ }
169
+ const next = trimmedLines[i + 1];
170
+ if (single && next) {
171
+ const joined = `${single} ${next}`;
172
+ if (phraseRe.test(joined.toLowerCase()) && joined.length <= MAX_LINE_LENGTH_TO_FLAG) {
173
+ matches.push(joined);
174
+ }
175
+ }
176
+ }
177
+ return matches;
178
+ }
179
+ function issueId(section) {
180
+ const key = `${section.filePath}:${section.startLine}:vague`;
181
+ const hash = crypto.createHash('sha1').update(key).digest('hex').slice(0, 12);
182
+ return `vague-${hash}`;
183
+ }
184
+ export function detectVagueGuidance(files) {
185
+ const issues = [];
186
+ // One issue per section — collect all matching phrases and lines first
187
+ const seen = new Set();
188
+ for (const file of files) {
189
+ for (const section of file.sections) {
190
+ const sectionKey = `${file.path}:${section.startLine}`;
191
+ if (seen.has(sectionKey))
192
+ continue;
193
+ const scanText = stripCodeBlocks(section.text);
194
+ // V1: collapse newlines to spaces for this fast pre-filter only, so a
195
+ // phrase hard-wrapped across two lines still passes the gate. The actual
196
+ // evidence extraction below (findPhraseMatches) independently re-checks
197
+ // adjacency line-by-line, so this loosened gate can't manufacture a match
198
+ // that findPhraseMatches wouldn't also find.
199
+ const lowerTextCollapsed = scanText.toLowerCase().replace(/\n/g, ' ');
200
+ const matchedPhrases = [];
201
+ const matchedLines = [];
202
+ for (const phrase of ALL_VAGUE_PHRASES) {
203
+ const phraseRe = PHRASE_PATTERNS.get(phrase);
204
+ if (!phraseRe.test(lowerTextCollapsed))
205
+ continue;
206
+ for (const line of findPhraseMatches(scanText, phraseRe)) {
207
+ if (!matchedPhrases.includes(phrase))
208
+ matchedPhrases.push(phrase);
209
+ if (!matchedLines.includes(line))
210
+ matchedLines.push(line);
211
+ }
212
+ }
213
+ if (matchedPhrases.length === 0)
214
+ continue;
215
+ seen.add(sectionKey);
216
+ const phraseList = matchedPhrases.map((p) => `"${p}"`).join(', ');
217
+ issues.push({
218
+ id: issueId(section),
219
+ severity: 'info',
220
+ category: 'vague_guidance',
221
+ title: 'Vague guidance detected',
222
+ summary: `This section contains guidance that may be too vague to be actionable: ${phraseList}.`,
223
+ filePaths: [file.path],
224
+ locations: [{ filePath: file.path, startLine: section.startLine, endLine: section.endLine }],
225
+ evidence: matchedLines.slice(0, 3).map((l) => `Line: "${l}"`),
226
+ recommendation: 'Replace vague guidance with concrete constraints — specific commands, forbidden ' +
227
+ 'patterns, or measurable criteria. For example, replace "write clean code" with ' +
228
+ '"functions must be ≤ 50 lines; no unused variables".',
229
+ confidence: 0.8,
230
+ });
231
+ }
232
+ }
233
+ return issues;
234
+ }
235
+ //# sourceMappingURL=vague-guidance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vague-guidance.js","sourceRoot":"","sources":["../src/vague-guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAGtC,MAAM,aAAa,GAAG;IACpB,kBAAkB;IAClB,aAAa,EAAU,iEAAiE;IACxF,oBAAoB;IACpB,0BAA0B;IAC1B,kBAAkB,EAAQ,gDAAgD;IAC1E,kBAAkB;IAClB,YAAY;IACZ,oBAAoB;IACpB,sBAAsB;IACtB,kBAAkB;IAClB,gBAAgB;IAChB,oBAAoB;IACpB,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AO,CAAC,OAAO,CAAC;gBACpB,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,gBAAgB;gBAC1B,KAAK,EAAE,yBAAyB;gBAChC,OAAO,EAAE,0EAA0E,UAAU,GAAG;gBAChG,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;gBACtB,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;gBAC5F,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;gBAC7D,cAAc,EACZ,kFAAkF;oBAClF,iFAAiF;oBACjF,sDAAsD;gBACxD,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@promptci/core",
3
+ "version": "0.0.1",
4
+ "description": "Deterministic scanner for AI coding instruction files (CLAUDE.md, AGENTS.md, .cursorrules) — detectors, scoring, and report generation",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ }
17
+ },
18
+ "engines": {
19
+ "node": ">=22"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/SeriousGeese/PromptCI.git",
27
+ "directory": "packages/core"
28
+ },
29
+ "homepage": "https://github.com/SeriousGeese/PromptCI#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/SeriousGeese/PromptCI/issues"
32
+ },
33
+ "keywords": [
34
+ "ai",
35
+ "claude",
36
+ "copilot",
37
+ "cursor",
38
+ "instructions",
39
+ "lint",
40
+ "prompt",
41
+ "scanner"
42
+ ],
43
+ "devDependencies": {
44
+ "@types/node": "*",
45
+ "typescript": "*"
46
+ },
47
+ "dependencies": {
48
+ "fast-glob": "^3.3.3"
49
+ },
50
+ "scripts": {
51
+ "build": "tsc -p tsconfig.json",
52
+ "typecheck": "tsc -p tsconfig.json --noEmit"
53
+ }
54
+ }