llm-mock-server 1.0.5 → 1.0.7

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 (251) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/cli.d.ts +3 -0
  3. package/dist/cli/cli.d.ts.map +1 -0
  4. package/dist/cli/cli.js +103 -0
  5. package/dist/cli/cli.js.map +1 -0
  6. package/dist/cli/validators.d.ts +7 -0
  7. package/dist/cli/validators.d.ts.map +1 -0
  8. package/dist/cli/validators.js +53 -0
  9. package/dist/cli/validators.js.map +1 -0
  10. package/dist/formats/anthropic/index.d.ts +1 -1
  11. package/dist/formats/anthropic/index.d.ts.map +1 -1
  12. package/dist/formats/anthropic/index.js +1 -1
  13. package/dist/formats/anthropic/index.js.map +1 -1
  14. package/dist/formats/anthropic/parse.d.ts +2 -2
  15. package/dist/formats/anthropic/parse.d.ts.map +1 -1
  16. package/dist/formats/anthropic/parse.js +4 -2
  17. package/dist/formats/anthropic/parse.js.map +1 -1
  18. package/dist/formats/anthropic/schema.d.ts +1 -1
  19. package/dist/formats/anthropic/schema.d.ts.map +1 -1
  20. package/dist/formats/anthropic/schema.js +9 -4
  21. package/dist/formats/anthropic/schema.js.map +1 -1
  22. package/dist/formats/anthropic/serialize.d.ts +2 -2
  23. package/dist/formats/anthropic/serialize.d.ts.map +1 -1
  24. package/dist/formats/anthropic/serialize.js +76 -19
  25. package/dist/formats/anthropic/serialize.js.map +1 -1
  26. package/dist/formats/openai/chat-completions/index.d.ts +3 -0
  27. package/dist/formats/openai/chat-completions/index.d.ts.map +1 -0
  28. package/dist/formats/openai/chat-completions/index.js +13 -0
  29. package/dist/formats/openai/chat-completions/index.js.map +1 -0
  30. package/dist/formats/openai/chat-completions/parse.d.ts +4 -0
  31. package/dist/formats/openai/chat-completions/parse.d.ts.map +1 -0
  32. package/dist/formats/openai/chat-completions/parse.js +33 -0
  33. package/dist/formats/openai/chat-completions/parse.js.map +1 -0
  34. package/dist/formats/openai/chat-completions/schema.d.ts +93 -0
  35. package/dist/formats/openai/chat-completions/schema.d.ts.map +1 -0
  36. package/dist/formats/openai/chat-completions/schema.js +74 -0
  37. package/dist/formats/openai/chat-completions/schema.js.map +1 -0
  38. package/dist/formats/openai/chat-completions/serialize.d.ts +10 -0
  39. package/dist/formats/openai/chat-completions/serialize.d.ts.map +1 -0
  40. package/dist/formats/openai/chat-completions/serialize.js +99 -0
  41. package/dist/formats/openai/chat-completions/serialize.js.map +1 -0
  42. package/dist/formats/openai/responses/index.d.ts +3 -0
  43. package/dist/formats/openai/responses/index.d.ts.map +1 -0
  44. package/dist/formats/openai/responses/index.js +13 -0
  45. package/dist/formats/openai/responses/index.js.map +1 -0
  46. package/dist/formats/openai/responses/parse.d.ts +4 -0
  47. package/dist/formats/openai/responses/parse.d.ts.map +1 -0
  48. package/dist/formats/openai/responses/parse.js +51 -0
  49. package/dist/formats/openai/responses/parse.js.map +1 -0
  50. package/dist/formats/openai/responses/schema.d.ts +103 -0
  51. package/dist/formats/openai/responses/schema.d.ts.map +1 -0
  52. package/dist/formats/openai/responses/schema.js +71 -0
  53. package/dist/formats/openai/responses/schema.js.map +1 -0
  54. package/dist/formats/openai/responses/serialize.d.ts +10 -0
  55. package/dist/formats/openai/responses/serialize.d.ts.map +1 -0
  56. package/dist/formats/openai/responses/serialize.js +273 -0
  57. package/dist/formats/openai/responses/serialize.js.map +1 -0
  58. package/dist/formats/request-helpers.d.ts +1 -1
  59. package/dist/formats/request-helpers.d.ts.map +1 -1
  60. package/dist/formats/request-helpers.js.map +1 -1
  61. package/dist/formats/serialize-helpers.d.ts +1 -1
  62. package/dist/formats/serialize-helpers.d.ts.map +1 -1
  63. package/dist/formats/serialize-helpers.js +6 -3
  64. package/dist/formats/serialize-helpers.js.map +1 -1
  65. package/dist/formats/types.d.ts +2 -1
  66. package/dist/formats/types.d.ts.map +1 -1
  67. package/dist/history.d.ts +6 -2
  68. package/dist/history.d.ts.map +1 -1
  69. package/dist/history.js +2 -0
  70. package/dist/history.js.map +1 -1
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js.map +1 -1
  73. package/dist/loader.d.ts +1 -1
  74. package/dist/loader.d.ts.map +1 -1
  75. package/dist/loader.js +26 -9
  76. package/dist/loader.js.map +1 -1
  77. package/dist/logger.d.ts.map +1 -1
  78. package/dist/logger.js +12 -4
  79. package/dist/logger.js.map +1 -1
  80. package/dist/mock-server.d.ts +44 -48
  81. package/dist/mock-server.d.ts.map +1 -1
  82. package/dist/mock-server.js +37 -85
  83. package/dist/mock-server.js.map +1 -1
  84. package/dist/route-handler.d.ts +1 -1
  85. package/dist/route-handler.d.ts.map +1 -1
  86. package/dist/route-handler.js +19 -7
  87. package/dist/route-handler.js.map +1 -1
  88. package/dist/rule-builder.d.ts +21 -0
  89. package/dist/rule-builder.d.ts.map +1 -0
  90. package/dist/rule-builder.js +58 -0
  91. package/dist/rule-builder.js.map +1 -0
  92. package/dist/rule-engine.d.ts +3 -1
  93. package/dist/rule-engine.d.ts.map +1 -1
  94. package/dist/rule-engine.js +7 -2
  95. package/dist/rule-engine.js.map +1 -1
  96. package/dist/sse-writer.d.ts +1 -1
  97. package/dist/sse-writer.d.ts.map +1 -1
  98. package/dist/types/reply.d.ts +51 -8
  99. package/dist/types/reply.d.ts.map +1 -1
  100. package/dist/types/request.d.ts +21 -6
  101. package/dist/types/request.d.ts.map +1 -1
  102. package/dist/types/rule.d.ts +65 -7
  103. package/dist/types/rule.d.ts.map +1 -1
  104. package/dist/types.d.ts +3 -3
  105. package/dist/types.d.ts.map +1 -1
  106. package/package.json +20 -11
  107. package/.claude/skills/desloppify/SKILL.md +0 -308
  108. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000801.json +0 -242
  109. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000905.json +0 -248
  110. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000917.json +0 -248
  111. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000950.json +0 -311
  112. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/claude_launch_prompt.md +0 -17
  113. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json +0 -255
  114. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.template.json +0 -22
  115. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/reviewer_instructions.md +0 -20
  116. package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/session.json +0 -20
  117. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/canonical_import_20260315_050000.json +0 -286
  118. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/canonical_import_20260315_050028.json +0 -303
  119. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/claude_launch_prompt.md +0 -17
  120. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/review_result.json +0 -297
  121. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/review_result.template.json +0 -22
  122. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/reviewer_instructions.md +0 -20
  123. package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/session.json +0 -20
  124. package/.desloppify/query.json +0 -1312
  125. package/.desloppify/review_packet_blind.json +0 -1249
  126. package/.desloppify/review_packets/holistic_packet_20260315_000339.json +0 -1471
  127. package/.desloppify/review_packets/holistic_packet_20260315_045546.json +0 -1480
  128. package/.desloppify/review_packets/holistic_packet_20260315_185401.json +0 -1407
  129. package/.desloppify/review_packets/holistic_packet_20260315_185613.json +0 -1407
  130. package/.desloppify/state-typescript.json +0 -8438
  131. package/.desloppify/state-typescript.json.bak +0 -8432
  132. package/.desloppify/subagents/runs/20260315_185401/logs/batch-1.log +0 -384
  133. package/.desloppify/subagents/runs/20260315_185401/logs/batch-10.log +0 -484
  134. package/.desloppify/subagents/runs/20260315_185401/logs/batch-2.log +0 -408
  135. package/.desloppify/subagents/runs/20260315_185401/logs/batch-3.log +0 -416
  136. package/.desloppify/subagents/runs/20260315_185401/logs/batch-4.log +0 -360
  137. package/.desloppify/subagents/runs/20260315_185401/logs/batch-5.log +0 -360
  138. package/.desloppify/subagents/runs/20260315_185401/logs/batch-6.log +0 -364
  139. package/.desloppify/subagents/runs/20260315_185401/logs/batch-7.log +0 -428
  140. package/.desloppify/subagents/runs/20260315_185401/logs/batch-8.log +0 -388
  141. package/.desloppify/subagents/runs/20260315_185401/logs/batch-9.log +0 -500
  142. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-1.md +0 -83
  143. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-10.md +0 -108
  144. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-2.md +0 -89
  145. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-3.md +0 -91
  146. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-4.md +0 -77
  147. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-5.md +0 -77
  148. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-6.md +0 -78
  149. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-7.md +0 -94
  150. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-8.md +0 -84
  151. package/.desloppify/subagents/runs/20260315_185401/prompts/batch-9.md +0 -112
  152. package/.desloppify/subagents/runs/20260315_185401/results/batch-1.raw.txt +0 -0
  153. package/.desloppify/subagents/runs/20260315_185401/results/batch-10.raw.txt +0 -0
  154. package/.desloppify/subagents/runs/20260315_185401/results/batch-2.raw.txt +0 -0
  155. package/.desloppify/subagents/runs/20260315_185401/results/batch-3.raw.txt +0 -0
  156. package/.desloppify/subagents/runs/20260315_185401/results/batch-4.raw.txt +0 -0
  157. package/.desloppify/subagents/runs/20260315_185401/results/batch-5.raw.txt +0 -0
  158. package/.desloppify/subagents/runs/20260315_185401/results/batch-6.raw.txt +0 -0
  159. package/.desloppify/subagents/runs/20260315_185401/results/batch-7.raw.txt +0 -0
  160. package/.desloppify/subagents/runs/20260315_185401/results/batch-8.raw.txt +0 -0
  161. package/.desloppify/subagents/runs/20260315_185401/results/batch-9.raw.txt +0 -0
  162. package/.desloppify/subagents/runs/20260315_185401/run.log +0 -36
  163. package/.desloppify/subagents/runs/20260315_185401/run_summary.json +0 -156
  164. package/.desloppify/subagents/runs/20260315_185613/holistic_findings_merged.json +0 -741
  165. package/.desloppify/subagents/runs/20260315_185613/logs/batch-1.log +0 -579
  166. package/.desloppify/subagents/runs/20260315_185613/logs/batch-10.log +0 -1537
  167. package/.desloppify/subagents/runs/20260315_185613/logs/batch-2.log +0 -829
  168. package/.desloppify/subagents/runs/20260315_185613/logs/batch-3.log +0 -927
  169. package/.desloppify/subagents/runs/20260315_185613/logs/batch-4.log +0 -429
  170. package/.desloppify/subagents/runs/20260315_185613/logs/batch-5.log +0 -276
  171. package/.desloppify/subagents/runs/20260315_185613/logs/batch-6.log +0 -450
  172. package/.desloppify/subagents/runs/20260315_185613/logs/batch-7.log +0 -730
  173. package/.desloppify/subagents/runs/20260315_185613/logs/batch-8.log +0 -698
  174. package/.desloppify/subagents/runs/20260315_185613/logs/batch-9.log +0 -938
  175. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-1.md +0 -83
  176. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-10.md +0 -108
  177. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-2.md +0 -89
  178. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-3.md +0 -91
  179. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-4.md +0 -77
  180. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-5.md +0 -77
  181. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-6.md +0 -78
  182. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-7.md +0 -94
  183. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-8.md +0 -84
  184. package/.desloppify/subagents/runs/20260315_185613/prompts/batch-9.md +0 -112
  185. package/.desloppify/subagents/runs/20260315_185613/results/batch-1.raw.txt +0 -78
  186. package/.desloppify/subagents/runs/20260315_185613/results/batch-10.raw.txt +0 -242
  187. package/.desloppify/subagents/runs/20260315_185613/results/batch-2.raw.txt +0 -102
  188. package/.desloppify/subagents/runs/20260315_185613/results/batch-3.raw.txt +0 -94
  189. package/.desloppify/subagents/runs/20260315_185613/results/batch-4.raw.txt +0 -86
  190. package/.desloppify/subagents/runs/20260315_185613/results/batch-5.raw.txt +0 -1
  191. package/.desloppify/subagents/runs/20260315_185613/results/batch-6.raw.txt +0 -87
  192. package/.desloppify/subagents/runs/20260315_185613/results/batch-7.raw.txt +0 -1
  193. package/.desloppify/subagents/runs/20260315_185613/results/batch-8.raw.txt +0 -107
  194. package/.desloppify/subagents/runs/20260315_185613/results/batch-9.raw.txt +0 -67
  195. package/.desloppify/subagents/runs/20260315_185613/run.log +0 -96
  196. package/.desloppify/subagents/runs/20260315_185613/run_summary.json +0 -156
  197. package/.editorconfig +0 -12
  198. package/.github/dependabot.yml +0 -11
  199. package/.github/workflows/docs.yml +0 -46
  200. package/.github/workflows/test.yml +0 -40
  201. package/.markdownlint.jsonc +0 -11
  202. package/.node-version +0 -1
  203. package/.oxfmtrc.json +0 -9
  204. package/.oxlintrc.json +0 -35
  205. package/docs/ARCHITECTURE.md +0 -125
  206. package/scorecard.png +0 -0
  207. package/src/cli/cli.ts +0 -141
  208. package/src/cli/validators.ts +0 -68
  209. package/src/formats/anthropic/index.ts +0 -14
  210. package/src/formats/anthropic/parse.ts +0 -67
  211. package/src/formats/anthropic/schema.ts +0 -74
  212. package/src/formats/anthropic/serialize.ts +0 -179
  213. package/src/formats/openai/chat-completions/index.ts +0 -14
  214. package/src/formats/openai/chat-completions/parse.ts +0 -44
  215. package/src/formats/openai/chat-completions/schema.ts +0 -92
  216. package/src/formats/openai/chat-completions/serialize.ts +0 -146
  217. package/src/formats/openai/responses/index.ts +0 -14
  218. package/src/formats/openai/responses/parse.ts +0 -70
  219. package/src/formats/openai/responses/schema.ts +0 -86
  220. package/src/formats/openai/responses/serialize.ts +0 -332
  221. package/src/formats/request-helpers.ts +0 -56
  222. package/src/formats/serialize-helpers.ts +0 -43
  223. package/src/formats/types.ts +0 -26
  224. package/src/history.ts +0 -70
  225. package/src/index.ts +0 -46
  226. package/src/loader.ts +0 -246
  227. package/src/logger.ts +0 -70
  228. package/src/mock-server.ts +0 -203
  229. package/src/route-handler.ts +0 -144
  230. package/src/rule-builder.ts +0 -73
  231. package/src/rule-engine.ts +0 -165
  232. package/src/sse-writer.ts +0 -35
  233. package/src/types/reply.ts +0 -92
  234. package/src/types/request.ts +0 -56
  235. package/src/types/rule.ts +0 -125
  236. package/src/types.ts +0 -24
  237. package/test/cli-validators.test.ts +0 -151
  238. package/test/formats/anthropic.test.ts +0 -336
  239. package/test/formats/openai.test.ts +0 -316
  240. package/test/formats/parse-helpers.test.ts +0 -315
  241. package/test/formats/responses.test.ts +0 -380
  242. package/test/helpers/make-req.ts +0 -18
  243. package/test/history.test.ts +0 -361
  244. package/test/loader.test.ts +0 -333
  245. package/test/logger.test.ts +0 -344
  246. package/test/mock-server.test.ts +0 -619
  247. package/test/rule-engine.test.ts +0 -229
  248. package/tsconfig.json +0 -26
  249. package/tsconfig.test.json +0 -11
  250. package/typedoc.json +0 -9
  251. package/vitest.config.ts +0 -18
@@ -1,450 +0,0 @@
1
- ATTEMPT 1/3
2
- $ codex exec --ephemeral -C /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server -s workspace-write -c approval_policy="never" -c model_reasoning_effort="low" -o /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/subagents/runs/20260315_185613/results/batch-6.raw.txt You are a focused subagent reviewer for a single holistic investigation batch.
3
-
4
- Repository root: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server
5
- Blind packet: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json
6
- Batch index: 6
7
- Batch name: AI Debt & Migrations
8
- Batch dimensions: ai_generated_debt, incomplete_migration, low_level_elegance
9
- Batch rationale: AI-generated patterns, deprecated markers, migration TODOs
10
-
11
- Files assigned:
12
- - src/types/request.ts
13
- - src/types/rule.ts
14
-
15
- Task requirements:
16
- 1. Read the blind packet and follow `system_prompt` constraints exactly.
17
- 1a. If previously flagged issues are listed above, use them as context for your review.
18
- Verify whether each still applies to the current code. Do not re-report fixed or
19
- wontfix issues. Use them as starting points to look deeper — inspect adjacent code
20
- and related modules for defects the prior review may have missed.
21
- 1c. Think structurally: when you spot multiple individual issues that share a common
22
- root cause (missing abstraction, duplicated pattern, inconsistent convention),
23
- explain the deeper structural issue in the finding, not just the surface symptom.
24
- If the pattern is significant enough, report the structural issue as its own finding
25
- with appropriate fix_scope ('multi_file_refactor' or 'architectural_change') and
26
- use `root_cause_cluster` to connect related symptom findings together.
27
- 2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
28
- 3. Return 0-10 high-quality findings for this batch (empty array allowed).
29
- 3a. Do not suppress real defects to keep scores high; report every material issue you can support with evidence.
30
- 3b. Do not default to 100. Reserve 100 for genuinely exemplary evidence in this batch.
31
- 4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
32
- 4a. Any dimension scored below 85.0 MUST include explicit feedback: add at least one finding with the same `dimension` and a non-empty actionable `suggestion`.
33
- 5. Every finding must include `related_files` with at least 2 files when possible.
34
- 6. Every finding must include `dimension`, `identifier`, `summary`, `evidence`, `suggestion`, and `confidence`.
35
- 7. Every finding must include `impact_scope` and `fix_scope`.
36
- 8. Every scored dimension MUST include dimension_notes with concrete evidence.
37
- 9. If a dimension score is >85.0, include `issues_preventing_higher_score` in dimension_notes.
38
- 10. Use exactly one decimal place for every assessment and abstraction sub-axis score.
39
- 11. Ignore prior chat context and any target-threshold assumptions.
40
- 12. Do not edit repository files.
41
- 13. Return ONLY valid JSON, no markdown fences.
42
-
43
- Scope enums:
44
- - impact_scope: "local" | "module" | "subsystem" | "codebase"
45
- - fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
46
-
47
- Output schema:
48
- {
49
- "batch": "AI Debt & Migrations",
50
- "batch_index": 6,
51
- "assessments": {"<dimension>": <0-100 with one decimal place>},
52
- "dimension_notes": {
53
- "<dimension>": {
54
- "evidence": ["specific code observations"],
55
- "impact_scope": "local|module|subsystem|codebase",
56
- "fix_scope": "single_edit|multi_file_refactor|architectural_change",
57
- "confidence": "high|medium|low",
58
- "issues_preventing_higher_score": "required when score >85.0",
59
- "sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
60
- }
61
- },
62
- "findings": [{
63
- "dimension": "<dimension>",
64
- "identifier": "short_id",
65
- "summary": "one-line defect summary",
66
- "related_files": ["relative/path.py"],
67
- "evidence": ["specific code observation"],
68
- "suggestion": "concrete fix recommendation",
69
- "confidence": "high|medium|low",
70
- "impact_scope": "local|module|subsystem|codebase",
71
- "fix_scope": "single_edit|multi_file_refactor|architectural_change",
72
- "root_cause_cluster": "optional_cluster_name_when_supported_by_history"
73
- }],
74
- "retrospective": {
75
- "root_causes": ["optional: concise root-cause hypotheses"],
76
- "likely_symptoms": ["optional: identifiers that look symptom-level"],
77
- "possible_false_positives": ["optional: prior concept keys likely mis-scoped"]
78
- }
79
- }
80
-
81
-
82
- STDOUT:
83
- {
84
- "batch": "AI Debt & Migrations",
85
- "batch_index": 6,
86
- "assessments": {
87
- "ai_generated_debt": 90.0,
88
- "incomplete_migration": 95.0,
89
- "low_level_elegance": 88.0
90
- },
91
- "dimension_notes": {
92
- "ai_generated_debt": {
93
- "evidence": [
94
- "src/types/request.ts uses multiple explanatory comments on self-describing fields (e.g., lastMessage/systemMessage/toolNames) that mostly restate the property name.",
95
- "src/types/rule.ts has a long comment block on Match that largely repeats the union’s behavior (string/RegExp/object/function)."
96
- ],
97
- "impact_scope": "local",
98
- "fix_scope": "single_edit",
99
- "confidence": "medium",
100
- "issues_preventing_higher_score": "Several comments restate obvious field semantics and could be reduced to higher-signal notes only."
101
- },
102
- "incomplete_migration": {
103
- "evidence": [
104
- "No @deprecated markers, migration TODOs, or legacy/new dual-path APIs appear in src/types/request.ts.",
105
- "No @deprecated markers, migration TODOs, or legacy/new dual-path APIs appear in src/types/rule.ts."
106
- ],
107
- "impact_scope": "local",
108
- "fix_scope": "single_edit",
109
- "confidence": "low",
110
- "issues_preventing_higher_score": "Small surface area limits certainty; no migration residue observed in the reviewed files."
111
- },
112
- "low_level_elegance": {
113
- "evidence": [
114
- "src/types/request.ts uses optional properties with explicit `| undefined` (e.g., tools?: readonly ToolDef[] | undefined; toolCallId?: string | undefined).",
115
- "src/types/rule.ts uses optional properties without explicit `| undefined` (e.g., message?: string | RegExp; toolCallId?: string), creating inconsistent type style."
116
- ],
117
- "impact_scope": "local",
118
- "fix_scope": "single_edit",
119
- "confidence": "high",
120
- "issues_preventing_higher_score": "Inconsistent and redundant optional typing adds noise and small but repeated cognitive overhead."
121
- }
122
- },
123
- "findings": [
124
- {
125
- "dimension": "ai_generated_debt",
126
- "identifier": "restating_comments_on_types",
127
- "summary": "Comments restate obvious type semantics, adding low-signal noise",
128
- "related_files": [
129
- "src/types/request.ts",
130
- "src/types/rule.ts"
131
- ],
132
- "evidence": [
133
- "src/types/request.ts comments explain fields like lastMessage/systemMessage/toolNames in a way that mirrors the field name.",
134
- "src/types/rule.ts Match comment block describes each union variant in a way that repeats the type definition."
135
- ],
136
- "suggestion": "Trim comments to only convey non-obvious constraints or behavioral nuances; remove restatements of field names or type unions.",
137
- "confidence": "medium",
138
- "impact_scope": "local",
139
- "fix_scope": "single_edit"
140
- },
141
- {
142
- "dimension": "low_level_elegance",
143
- "identifier": "redundant_optional_undefined",
144
- "summary": "Optional fields redundantly include `| undefined`, creating inconsistency and noise",
145
- "related_files": [
146
- "src/types/request.ts",
147
- "src/types/rule.ts"
148
- ],
149
- "evidence": [
150
- "src/types/request.ts declares `tools?: readonly ToolDef[] | undefined` and `toolCallId?: string | undefined`, which are already implied by `?`.",
151
- "src/types/rule.ts uses `?:` without explicit `| undefined`, so the style is inconsistent across related type modules."
152
- ],
153
- "suggestion": "Remove explicit `| undefined` from optional properties in src/types/request.ts to align with TypeScript conventions and the style used in src/types/rule.ts.",
154
- "confidence": "high",
155
- "impact_scope": "local",
156
- "fix_scope": "single_edit"
157
- }
158
- ],
159
- "retrospective": {
160
- "root_causes": [
161
- "Documentation and type style appear auto-generated or copied without consolidation, leading to minor noise."
162
- ],
163
- "likely_symptoms": [
164
- "restating_comments_on_types",
165
- "redundant_optional_undefined"
166
- ],
167
- "possible_false_positives": []
168
- }
169
- }
170
-
171
-
172
- STDERR:
173
- OpenAI Codex v0.114.0 (research preview)
174
- --------
175
- workdir: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server
176
- model: gpt-5.2-codex
177
- provider: openai
178
- approval: never
179
- sandbox: workspace-write [workdir, /tmp, $TMPDIR, /Users/suyash.x.srijan/.codex/memories]
180
- reasoning effort: low
181
- reasoning summaries: none
182
- session id: 019cf2e0-dd32-7080-9e35-bf2f18d59585
183
- --------
184
- user
185
- You are a focused subagent reviewer for a single holistic investigation batch.
186
-
187
- Repository root: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server
188
- Blind packet: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json
189
- Batch index: 6
190
- Batch name: AI Debt & Migrations
191
- Batch dimensions: ai_generated_debt, incomplete_migration, low_level_elegance
192
- Batch rationale: AI-generated patterns, deprecated markers, migration TODOs
193
-
194
- Files assigned:
195
- - src/types/request.ts
196
- - src/types/rule.ts
197
-
198
- Task requirements:
199
- 1. Read the blind packet and follow `system_prompt` constraints exactly.
200
- 1a. If previously flagged issues are listed above, use them as context for your review.
201
- Verify whether each still applies to the current code. Do not re-report fixed or
202
- wontfix issues. Use them as starting points to look deeper — inspect adjacent code
203
- and related modules for defects the prior review may have missed.
204
- 1c. Think structurally: when you spot multiple individual issues that share a common
205
- root cause (missing abstraction, duplicated pattern, inconsistent convention),
206
- explain the deeper structural issue in the finding, not just the surface symptom.
207
- If the pattern is significant enough, report the structural issue as its own finding
208
- with appropriate fix_scope ('multi_file_refactor' or 'architectural_change') and
209
- use `root_cause_cluster` to connect related symptom findings together.
210
- 2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
211
- 3. Return 0-10 high-quality findings for this batch (empty array allowed).
212
- 3a. Do not suppress real defects to keep scores high; report every material issue you can support with evidence.
213
- 3b. Do not default to 100. Reserve 100 for genuinely exemplary evidence in this batch.
214
- 4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
215
- 4a. Any dimension scored below 85.0 MUST include explicit feedback: add at least one finding with the same `dimension` and a non-empty actionable `suggestion`.
216
- 5. Every finding must include `related_files` with at least 2 files when possible.
217
- 6. Every finding must include `dimension`, `identifier`, `summary`, `evidence`, `suggestion`, and `confidence`.
218
- 7. Every finding must include `impact_scope` and `fix_scope`.
219
- 8. Every scored dimension MUST include dimension_notes with concrete evidence.
220
- 9. If a dimension score is >85.0, include `issues_preventing_higher_score` in dimension_notes.
221
- 10. Use exactly one decimal place for every assessment and abstraction sub-axis score.
222
- 11. Ignore prior chat context and any target-threshold assumptions.
223
- 12. Do not edit repository files.
224
- 13. Return ONLY valid JSON, no markdown fences.
225
-
226
- Scope enums:
227
- - impact_scope: "local" | "module" | "subsystem" | "codebase"
228
- - fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
229
-
230
- Output schema:
231
- {
232
- "batch": "AI Debt & Migrations",
233
- "batch_index": 6,
234
- "assessments": {"<dimension>": <0-100 with one decimal place>},
235
- "dimension_notes": {
236
- "<dimension>": {
237
- "evidence": ["specific code observations"],
238
- "impact_scope": "local|module|subsystem|codebase",
239
- "fix_scope": "single_edit|multi_file_refactor|architectural_change",
240
- "confidence": "high|medium|low",
241
- "issues_preventing_higher_score": "required when score >85.0",
242
- "sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
243
- }
244
- },
245
- "findings": [{
246
- "dimension": "<dimension>",
247
- "identifier": "short_id",
248
- "summary": "one-line defect summary",
249
- "related_files": ["relative/path.py"],
250
- "evidence": ["specific code observation"],
251
- "suggestion": "concrete fix recommendation",
252
- "confidence": "high|medium|low",
253
- "impact_scope": "local|module|subsystem|codebase",
254
- "fix_scope": "single_edit|multi_file_refactor|architectural_change",
255
- "root_cause_cluster": "optional_cluster_name_when_supported_by_history"
256
- }],
257
- "retrospective": {
258
- "root_causes": ["optional: concise root-cause hypotheses"],
259
- "likely_symptoms": ["optional: identifiers that look symptom-level"],
260
- "possible_false_positives": ["optional: prior concept keys likely mis-scoped"]
261
- }
262
- }
263
-
264
- mcp startup: no servers
265
- exec
266
- /bin/zsh -lc ls in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
267
- LICENCE
268
- README.md
269
- coverage
270
- dist
271
- docs
272
- node_modules
273
- package-lock.json
274
- package.json
275
- scorecard.png
276
- src
277
- test
278
- tsconfig.json
279
- tsconfig.test.json
280
- vitest.config.ts
281
- exec
282
- /bin/zsh -lc 'cat /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json' in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
283
- {
284
- "command": "review",
285
- "mode": "holistic",
286
- "language": "typescript",
287
- "dimensions": [
288
- "cross_module_architecture",
289
- "convention_outlier",
290
- "error_consistency",
291
- "abstraction_fitness",
292
- "api_surface_coherence",
293
- "authorization_consistency",
294
- "ai_generated_debt",
295
- "incomplete_migration",
296
- "package_organization",
297
- "high_level_elegance",
298
- "mid_level_elegance",
299
- "low_level_elegance",
300
- "design_coherence"
301
- ],
302
- "dimension_prompts": {
303
-
304
- thinking
305
- **Planning file reading with sed**
306
- exec
307
- /bin/zsh -lc "sed -n '1,260p' src/types/request.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
308
- /** The LLM API wire format that was detected for a request. */
309
- export type FormatName = "openai" | "anthropic" | "responses";
310
-
311
- /** A normalised view of an incoming request, regardless of the original wire format. */
312
- export interface MockRequest {
313
- readonly format: FormatName;
314
- readonly model: string;
315
- readonly streaming: boolean;
316
- /** Full conversation, normalised from whatever format came in. */
317
- readonly messages: readonly Message[];
318
- /** The last user message's text. This is what most matchers check. */
319
- readonly lastMessage: string;
320
- /** Empty string if there wasn't one. */
321
- readonly systemMessage: string;
322
- readonly tools?: readonly ToolDef[] | undefined;
323
- /** Pulled out from `tools` for quick lookups. */
324
- readonly toolNames: readonly string[];
325
- /** Set when the last message was a tool result. */
326
- readonly lastToolCallId: string | undefined;
327
- /** The raw request body, for anything we don't extract. */
328
- exec
329
- /bin/zsh -lc "sed -n '1,260p' src/types/rule.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
330
- import type { MockRequest, FormatName } from "./request.js";
331
- import type { Resolver, ReplyOptions, Reply, SequenceEntry } from "./reply.js";
332
-
333
- /**
334
- * Determines whether a rule matches an incoming request.
335
- *
336
- * A `string` does a case-insensitive substring match on the last user message.
337
- * A `RegExp` gets tested against the last user message.
338
- * A `MatchObject` checks multiple fields at once with AND logic.
339
- * A function receives the normalised request and returns a boolean.
340
- */
341
- export type Match =
342
- | string
343
- | RegExp
344
- | MatchObject
345
- | ((req: MockRequest) => boolean);
346
-
347
- /** A structured matcher. Every field you set must match for the rule to fire. */
348
- export interface MatchObject {
349
- readonly message?: string | RegExp;
350
-
351
-
352
- thinking
353
- **Evaluating specific files for defects**
354
-
355
- I've found no deprecated markers or clear defects in the three files but identified minor inconsistencies like non-readonly properties in the Rule interface versus RuleSummary. To avoid defaulting to perfect scores, I'll assign high but not perfect scores (e.g., 95) with evidence noting minor issues or limited scope preventing higher ratings.
356
- thinking
357
- **Identifying concrete findings per dimension**
358
-
359
- I'm pinpointing actionable findings: AI debt involves verbose, restating comments across request.ts and rule.ts; low-level elegance includes redundant `| undefined` in request.ts plus inconsistent optional field styles between request.ts and rule.ts; incomplete migration has no deprecation or migration markers but will note limited scope. Scores will reflect these with justified evidence and related files where possible.
360
- codex
361
- {
362
- "batch": "AI Debt & Migrations",
363
- "batch_index": 6,
364
- "assessments": {
365
- "ai_generated_debt": 90.0,
366
- "incomplete_migration": 95.0,
367
- "low_level_elegance": 88.0
368
- },
369
- "dimension_notes": {
370
- "ai_generated_debt": {
371
- "evidence": [
372
- "src/types/request.ts uses multiple explanatory comments on self-describing fields (e.g., lastMessage/systemMessage/toolNames) that mostly restate the property name.",
373
- "src/types/rule.ts has a long comment block on Match that largely repeats the union’s behavior (string/RegExp/object/function)."
374
- ],
375
- "impact_scope": "local",
376
- "fix_scope": "single_edit",
377
- "confidence": "medium",
378
- "issues_preventing_higher_score": "Several comments restate obvious field semantics and could be reduced to higher-signal notes only."
379
- },
380
- "incomplete_migration": {
381
- "evidence": [
382
- "No @deprecated markers, migration TODOs, or legacy/new dual-path APIs appear in src/types/request.ts.",
383
- "No @deprecated markers, migration TODOs, or legacy/new dual-path APIs appear in src/types/rule.ts."
384
- ],
385
- "impact_scope": "local",
386
- "fix_scope": "single_edit",
387
- "confidence": "low",
388
- "issues_preventing_higher_score": "Small surface area limits certainty; no migration residue observed in the reviewed files."
389
- },
390
- "low_level_elegance": {
391
- "evidence": [
392
- "src/types/request.ts uses optional properties with explicit `| undefined` (e.g., tools?: readonly ToolDef[] | undefined; toolCallId?: string | undefined).",
393
- "src/types/rule.ts uses optional properties without explicit `| undefined` (e.g., message?: string | RegExp; toolCallId?: string), creating inconsistent type style."
394
- ],
395
- "impact_scope": "local",
396
- "fix_scope": "single_edit",
397
- "confidence": "high",
398
- "issues_preventing_higher_score": "Inconsistent and redundant optional typing adds noise and small but repeated cognitive overhead."
399
- }
400
- },
401
- "findings": [
402
- {
403
- "dimension": "ai_generated_debt",
404
- "identifier": "restating_comments_on_types",
405
- "summary": "Comments restate obvious type semantics, adding low-signal noise",
406
- "related_files": [
407
- "src/types/request.ts",
408
- "src/types/rule.ts"
409
- ],
410
- "evidence": [
411
- "src/types/request.ts comments explain fields like lastMessage/systemMessage/toolNames in a way that mirrors the field name.",
412
- "src/types/rule.ts Match comment block describes each union variant in a way that repeats the type definition."
413
- ],
414
- "suggestion": "Trim comments to only convey non-obvious constraints or behavioral nuances; remove restatements of field names or type unions.",
415
- "confidence": "medium",
416
- "impact_scope": "local",
417
- "fix_scope": "single_edit"
418
- },
419
- {
420
- "dimension": "low_level_elegance",
421
- "identifier": "redundant_optional_undefined",
422
- "summary": "Optional fields redundantly include `| undefined`, creating inconsistency and noise",
423
- "related_files": [
424
- "src/types/request.ts",
425
- "src/types/rule.ts"
426
- ],
427
- "evidence": [
428
- "src/types/request.ts declares `tools?: readonly ToolDef[] | undefined` and `toolCallId?: string | undefined`, which are already implied by `?`.",
429
- "src/types/rule.ts uses `?:` without explicit `| undefined`, so the style is inconsistent across related type modules."
430
- ],
431
- "suggestion": "Remove explicit `| undefined` from optional properties in src/types/request.ts to align with TypeScript conventions and the style used in src/types/rule.ts.",
432
- "confidence": "high",
433
- "impact_scope": "local",
434
- "fix_scope": "single_edit"
435
- }
436
- ],
437
- "retrospective": {
438
- "root_causes": [
439
- "Documentation and type style appear auto-generated or copied without consolidation, leading to minor noise."
440
- ],
441
- "likely_symptoms": [
442
- "restating_comments_on_types",
443
- "redundant_optional_undefined"
444
- ],
445
- "possible_false_positives": []
446
- }
447
- }
448
- tokens used
449
- 23,406
450
-