@ryuenn3123/agentic-senior-core 4.4.0 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/.agents/plugins/agentic-senior-core/plugin.json +3 -0
  2. package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
  3. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
  4. package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
  5. package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
  6. package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
  7. package/.agents/rules/agentic-senior-core.md +131 -0
  8. package/.claude-plugin/marketplace.json +17 -0
  9. package/.claude-plugin/plugin.json +17 -0
  10. package/.clinerules/agentic-senior-core.md +94 -0
  11. package/.codex-plugin/plugin.json +24 -0
  12. package/.cursor/rules/agentic-senior-core.mdc +99 -0
  13. package/.devin-plugin/plugin.json +13 -0
  14. package/.github/copilot-instructions.md +94 -0
  15. package/.github/plugin/marketplace.json +20 -0
  16. package/.github/plugin/plugin.json +16 -0
  17. package/.kiro/steering/agentic-senior-core.md +94 -0
  18. package/.openclaw/skills/asc/SKILL.md +23 -0
  19. package/.openclaw/skills/asc-audit/SKILL.md +28 -0
  20. package/.openclaw/skills/asc-review/SKILL.md +54 -0
  21. package/.opencode/plugins/agentic-senior-core.mjs +31 -0
  22. package/.windsurf/rules/agentic-senior-core.md +94 -0
  23. package/AGENTS.md +126 -127
  24. package/CONTRIBUTING.md +93 -63
  25. package/README.md +190 -110
  26. package/__init__.py +61 -0
  27. package/bin/agentic-senior-core.js +42 -41
  28. package/commands/asc-audit.md +1 -0
  29. package/commands/asc-audit.toml +2 -0
  30. package/commands/asc-help.md +9 -0
  31. package/commands/asc-help.toml +2 -0
  32. package/commands/asc-refactor.md +1 -0
  33. package/commands/asc-refactor.toml +2 -0
  34. package/commands/asc-review.md +1 -0
  35. package/commands/asc-review.toml +2 -0
  36. package/gemini-extension.json +10 -0
  37. package/hooks/copilot-hooks.json +21 -0
  38. package/hooks/hooks.json +31 -0
  39. package/hooks/session-start.js +36 -0
  40. package/hooks/subagent-start.js +38 -0
  41. package/lib/cli/commands/adapter.mjs +109 -0
  42. package/lib/cli/commands/clean.mjs +63 -0
  43. package/lib/cli/commands/status.mjs +94 -0
  44. package/package.json +43 -60
  45. package/plugin.yaml +16 -0
  46. package/scripts/uninstall.js +38 -0
  47. package/skills/asc/SKILL.md +16 -0
  48. package/skills/asc-audit/SKILL.md +28 -0
  49. package/skills/asc-refactor/SKILL.md +35 -0
  50. package/skills/asc-review/SKILL.md +54 -0
  51. package/.agent-context/policies/llm-judge-threshold.json +0 -29
  52. package/.agent-context/prompts/bootstrap-design.md +0 -63
  53. package/.agent-context/prompts/compact-natural-mode.md +0 -100
  54. package/.agent-context/prompts/init-project.md +0 -60
  55. package/.agent-context/prompts/refactor.md +0 -38
  56. package/.agent-context/prompts/review-code.md +0 -31
  57. package/.agent-context/review-checklists/architecture-review.md +0 -57
  58. package/.agent-context/review-checklists/pr-checklist.md +0 -134
  59. package/.agent-context/rules/api-docs.md +0 -24
  60. package/.agent-context/rules/api-versioning.md +0 -16
  61. package/.agent-context/rules/architecture.md +0 -38
  62. package/.agent-context/rules/background-jobs.md +0 -17
  63. package/.agent-context/rules/config-and-flags.md +0 -16
  64. package/.agent-context/rules/database-design.md +0 -18
  65. package/.agent-context/rules/docker-runtime.md +0 -17
  66. package/.agent-context/rules/error-handling.md +0 -16
  67. package/.agent-context/rules/event-driven.md +0 -16
  68. package/.agent-context/rules/frontend-architecture.md +0 -54
  69. package/.agent-context/rules/microservices.md +0 -16
  70. package/.agent-context/rules/migrations.md +0 -16
  71. package/.agent-context/rules/observability.md +0 -16
  72. package/.agent-context/rules/performance.md +0 -16
  73. package/.agent-context/rules/realtime.md +0 -16
  74. package/.agent-context/rules/resilience.md +0 -18
  75. package/.agent-context/rules/security.md +0 -18
  76. package/.agent-context/rules/testing.md +0 -16
  77. package/.agent-context/state/README.md +0 -25
  78. package/.agent-context/state/architecture-map.md +0 -40
  79. package/.agent-context/state/benchmark-comparison-schema.json +0 -181
  80. package/.agent-context/state/benchmark-reproducibility.json +0 -87
  81. package/.agent-context/state/benchmark-thresholds.json +0 -10
  82. package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
  83. package/.agent-context/state/dependency-map.md +0 -41
  84. package/.agent-context/state/memory-adapter-contract.json +0 -52
  85. package/.agent-context/state/memory-schema-v1.json +0 -88
  86. package/GEMINI.md +0 -1
  87. package/benchmarks/README.md +0 -60
  88. package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
  89. package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
  90. package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
  91. package/lib/cli/adaptive-context/catalog.mjs +0 -394
  92. package/lib/cli/adaptive-context/file-signals.mjs +0 -100
  93. package/lib/cli/adaptive-context/implications.mjs +0 -44
  94. package/lib/cli/adaptive-context.mjs +0 -151
  95. package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
  96. package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
  97. package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
  98. package/lib/cli/backup.mjs +0 -210
  99. package/lib/cli/commands/context.mjs +0 -140
  100. package/lib/cli/commands/init/project-context.mjs +0 -60
  101. package/lib/cli/commands/init/runtime-environment.mjs +0 -59
  102. package/lib/cli/commands/init/setup-decisions.mjs +0 -83
  103. package/lib/cli/commands/init.mjs +0 -654
  104. package/lib/cli/commands/launch.mjs +0 -76
  105. package/lib/cli/commands/optimize.mjs +0 -284
  106. package/lib/cli/commands/rollback.mjs +0 -64
  107. package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
  108. package/lib/cli/commands/upgrade.mjs +0 -451
  109. package/lib/cli/compiler.mjs +0 -187
  110. package/lib/cli/constants.mjs +0 -136
  111. package/lib/cli/detector/constants.mjs +0 -135
  112. package/lib/cli/detector/design-evidence/collector.mjs +0 -256
  113. package/lib/cli/detector/design-evidence/constants.mjs +0 -39
  114. package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
  115. package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
  116. package/lib/cli/detector/design-evidence/summary.mjs +0 -109
  117. package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
  118. package/lib/cli/detector/design-evidence.mjs +0 -25
  119. package/lib/cli/detector/stack-detection.mjs +0 -243
  120. package/lib/cli/detector/ui-signals.mjs +0 -150
  121. package/lib/cli/detector/workspace-scan.mjs +0 -177
  122. package/lib/cli/detector.mjs +0 -23
  123. package/lib/cli/init-detection-flow.mjs +0 -48
  124. package/lib/cli/init-options.mjs +0 -237
  125. package/lib/cli/init-selection.mjs +0 -29
  126. package/lib/cli/memory-continuity.mjs +0 -537
  127. package/lib/cli/preflight.mjs +0 -76
  128. package/lib/cli/project-scaffolder/constants.mjs +0 -69
  129. package/lib/cli/project-scaffolder/discovery.mjs +0 -272
  130. package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
  131. package/lib/cli/project-scaffolder/storage.mjs +0 -144
  132. package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
  133. package/lib/cli/project-scaffolder.mjs +0 -29
  134. package/lib/cli/rollback.mjs +0 -66
  135. package/lib/cli/token-optimization.mjs +0 -401
  136. package/lib/cli/utils/filesystem.mjs +0 -81
  137. package/lib/cli/utils/managed-surface.mjs +0 -280
  138. package/lib/cli/utils/prompting.mjs +0 -44
  139. package/lib/cli/utils.mjs +0 -479
  140. package/mcp.json +0 -134
  141. package/scripts/adaptive-context/fixtures.mjs +0 -183
  142. package/scripts/adaptive-context-benchmark.mjs +0 -9
  143. package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
  144. package/scripts/benchmark-evidence-bundle.mjs +0 -645
  145. package/scripts/benchmark-gate.mjs +0 -121
  146. package/scripts/benchmark-intelligence.mjs +0 -33
  147. package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
  148. package/scripts/build-release-benchmark-bundle.mjs +0 -202
  149. package/scripts/bump-version.mjs +0 -103
  150. package/scripts/clean-local-artifacts.mjs +0 -78
  151. package/scripts/compact-natural-mode-benchmark.mjs +0 -9
  152. package/scripts/context-triggered-audit.mjs +0 -391
  153. package/scripts/detection-benchmark.mjs +0 -127
  154. package/scripts/docs-quality-drift-report.mjs +0 -358
  155. package/scripts/documentation-boundary-audit.mjs +0 -305
  156. package/scripts/explain-on-demand-audit.mjs +0 -427
  157. package/scripts/forbidden-content-check.mjs +0 -123
  158. package/scripts/frontend-usability-audit.mjs +0 -243
  159. package/scripts/generate-sbom.mjs +0 -61
  160. package/scripts/governance-weekly-report.mjs +0 -466
  161. package/scripts/llm-judge/checklist-loader.mjs +0 -45
  162. package/scripts/llm-judge/constants.mjs +0 -66
  163. package/scripts/llm-judge/diff-collection.mjs +0 -74
  164. package/scripts/llm-judge/prompting.mjs +0 -78
  165. package/scripts/llm-judge/providers.mjs +0 -111
  166. package/scripts/llm-judge/verdict.mjs +0 -134
  167. package/scripts/llm-judge.mjs +0 -200
  168. package/scripts/memory-continuity-benchmark.mjs +0 -322
  169. package/scripts/quality-trend-report.mjs +0 -289
  170. package/scripts/release-gate/audit-checks.mjs +0 -441
  171. package/scripts/release-gate/constants.mjs +0 -53
  172. package/scripts/release-gate/runtime.mjs +0 -63
  173. package/scripts/release-gate/static-checks.mjs +0 -182
  174. package/scripts/release-gate.mjs +0 -42
  175. package/scripts/rules-guardian-audit.mjs +0 -580
  176. package/scripts/single-source-lazy-loading-audit.mjs +0 -449
  177. package/scripts/sync-thin-adapters.mjs +0 -72
  178. package/scripts/token-optimization-benchmark.mjs +0 -252
  179. package/scripts/ui-design-judge/constants.mjs +0 -13
  180. package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
  181. package/scripts/ui-design-judge/git-input.mjs +0 -134
  182. package/scripts/ui-design-judge/prompting.mjs +0 -52
  183. package/scripts/ui-design-judge/providers.mjs +0 -102
  184. package/scripts/ui-design-judge/reporting.mjs +0 -183
  185. package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
  186. package/scripts/ui-design-judge/rubric-goldset.json +0 -188
  187. package/scripts/ui-design-judge.mjs +0 -319
  188. package/scripts/ui-rubric-calibration.mjs +0 -35
  189. package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
  190. package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
  191. package/scripts/validate/audits/file-size.mjs +0 -158
  192. package/scripts/validate/audits/reflection-citations.mjs +0 -130
  193. package/scripts/validate/audits/release-bundle.mjs +0 -135
  194. package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
  195. package/scripts/validate/config.mjs +0 -501
  196. package/scripts/validate/coverage-checks.mjs +0 -446
  197. package/scripts/validate/file-structure.mjs +0 -158
  198. package/scripts/validate/markdown-content.mjs +0 -109
  199. package/scripts/validate/project-metadata.mjs +0 -166
  200. package/scripts/validate/utils.mjs +0 -52
  201. package/scripts/validate.mjs +0 -267
@@ -1,836 +0,0 @@
1
- const MANY_MODIFIED_FILES = Array.from({ length: 45 }, (_, index) => {
2
- const fileNumber = String(index + 1).padStart(2, '0');
3
- return `\tmodified: src/modules/orders/file-${fileNumber}.ts`;
4
- }).join('\n');
5
-
6
- const PASSED_TEST_NOISE = Array.from({ length: 60 }, (_, index) => {
7
- const testNumber = String(index + 1).padStart(2, '0');
8
- return [
9
- `# Subtest: passing fixture ${testNumber}`,
10
- `ok ${index + 1} - passing fixture ${testNumber}`,
11
- ].join('\n');
12
- }).join('\n');
13
-
14
- const LARGE_DIFF_NOISE = Array.from({ length: 24 }, (_, index) => {
15
- const settingNumber = String(index + 1).padStart(2, '0');
16
- return [
17
- `- featureFlag${settingNumber}: false,`,
18
- `+ featureFlag${settingNumber}: true,`,
19
- ].join('\n');
20
- }).join('\n');
21
-
22
- const GENERATED_LOCKFILE_DIFF = Array.from({ length: 36 }, (_, index) => {
23
- const packageNumber = String(index + 1).padStart(2, '0');
24
- return [
25
- `- "node_modules/example-${packageNumber}": { "version": "1.0.${packageNumber}" },`,
26
- `+ "node_modules/example-${packageNumber}": { "version": "1.1.${packageNumber}" },`,
27
- ].join('\n');
28
- }).join('\n');
29
-
30
- export const ASCX_RUNTIME_TOKEN_SAVER_FIXTURES = [
31
- {
32
- id: 'git-status-clean',
33
- commandArguments: ['git', 'status'],
34
- capture: {
35
- exitCode: 0,
36
- stdout: 'On branch main\nnothing to commit, working tree clean\n',
37
- stderr: '',
38
- },
39
- expectCompressed: true,
40
- expectTee: false,
41
- requiredSubstrings: [
42
- 'git status: working tree clean',
43
- 'exit: 0',
44
- 'filter: git-status-summary',
45
- ],
46
- continuationChecks: [
47
- {
48
- id: 'clean-status-needs-no-followup',
49
- action: 'Decide that no repo-state follow-up is needed.',
50
- requiredSubstrings: [
51
- 'git status: working tree clean',
52
- 'raw_output: none',
53
- ],
54
- expectTee: false,
55
- },
56
- ],
57
- },
58
- {
59
- id: 'git-status-many-modified',
60
- commandArguments: ['git', 'status'],
61
- capture: {
62
- exitCode: 0,
63
- stdout: [
64
- 'On branch main',
65
- ' (use "git restore <file>..." to discard changes in working directory)',
66
- ' (use "git add <file>..." to update what will be committed)',
67
- 'Changes not staged for commit:',
68
- MANY_MODIFIED_FILES,
69
- '',
70
- ].join('\n'),
71
- stderr: '',
72
- },
73
- expectCompressed: true,
74
- expectTee: true,
75
- requiredSubstrings: [
76
- 'unstaged: 45',
77
- 'src/modules/orders/file-01.ts',
78
- '... truncated 30 more unstaged entries',
79
- 'raw_output:',
80
- ],
81
- continuationChecks: [
82
- {
83
- id: 'large-status-preserves-first-file-and-tee',
84
- action: 'Identify the changed area and know raw status is available for hidden entries.',
85
- requiredSubstrings: [
86
- 'unstaged: 45',
87
- 'src/modules/orders/file-01.ts',
88
- '... truncated 30 more unstaged entries',
89
- 'raw_output:',
90
- ],
91
- expectTee: true,
92
- },
93
- ],
94
- },
95
- {
96
- id: 'git-status-staged-and-unstaged',
97
- commandArguments: ['git', 'status'],
98
- capture: {
99
- exitCode: 0,
100
- stdout: [
101
- 'On branch main',
102
- 'Changes to be committed:',
103
- '\tmodified: lib/cli/ascx/runtime.mjs',
104
- 'Changes not staged for commit:',
105
- '\tmodified: tests/ascx-runtime-token-saver.test.mjs',
106
- 'Untracked files:',
107
- '\tbenchmarks/runtime-token-saver/fixtures.mjs',
108
- '',
109
- ].join('\n'),
110
- stderr: '',
111
- },
112
- expectCompressed: true,
113
- expectTee: false,
114
- requiredSubstrings: [
115
- 'staged: 1',
116
- 'lib/cli/ascx/runtime.mjs',
117
- 'unstaged: 1',
118
- 'tests/ascx-runtime-token-saver.test.mjs',
119
- 'untracked: 1',
120
- 'benchmarks/runtime-token-saver/fixtures.mjs',
121
- ],
122
- continuationChecks: [
123
- {
124
- id: 'mixed-status-preserves-buckets',
125
- action: 'Separate staged, unstaged, and untracked work before choosing the next command.',
126
- requiredSubstrings: [
127
- 'staged: 1',
128
- 'unstaged: 1',
129
- 'untracked: 1',
130
- 'lib/cli/ascx/runtime.mjs',
131
- 'tests/ascx-runtime-token-saver.test.mjs',
132
- 'benchmarks/runtime-token-saver/fixtures.mjs',
133
- ],
134
- expectTee: false,
135
- },
136
- ],
137
- },
138
- {
139
- id: 'git-diff-small',
140
- commandArguments: ['git', 'diff'],
141
- capture: {
142
- exitCode: 0,
143
- stdout: [
144
- 'diff --git a/src/auth/session.ts b/src/auth/session.ts',
145
- 'index 1111111..2222222 100644',
146
- '--- a/src/auth/session.ts',
147
- '+++ b/src/auth/session.ts',
148
- '@@ -12,7 +12,8 @@ export function validateSession(token) {',
149
- '- return token.expiresAt > Date.now();',
150
- '+ const hasValidExpiry = token.expiresAt >= Date.now();',
151
- '+ return hasValidExpiry;',
152
- ' }',
153
- ].join('\n'),
154
- stderr: '',
155
- },
156
- expectCompressed: true,
157
- expectTee: false,
158
- requiredSubstrings: [
159
- 'git diff summary:',
160
- 'files: 1',
161
- 'src/auth/session.ts (+2 -1)',
162
- '@@ -12,7 +12,8 @@ export function validateSession(token) {',
163
- '- return token.expiresAt > Date.now();',
164
- '+ const hasValidExpiry = token.expiresAt >= Date.now();',
165
- 'filter: git-diff-summary',
166
- ],
167
- continuationChecks: [
168
- {
169
- id: 'small-diff-supports-direct-review',
170
- action: 'Identify the changed file, hunk anchor, and changed condition without opening raw output.',
171
- requiredSubstrings: [
172
- 'src/auth/session.ts (+2 -1)',
173
- '@@ -12,7 +12,8 @@ export function validateSession(token) {',
174
- '- return token.expiresAt > Date.now();',
175
- '+ const hasValidExpiry = token.expiresAt >= Date.now();',
176
- 'raw_output: none',
177
- ],
178
- expectTee: false,
179
- },
180
- ],
181
- },
182
- {
183
- id: 'git-diff-large-hunk',
184
- commandArguments: ['git', 'diff'],
185
- capture: {
186
- exitCode: 0,
187
- stdout: [
188
- 'diff --git a/src/config/feature-flags.ts b/src/config/feature-flags.ts',
189
- 'index 3333333..4444444 100644',
190
- '--- a/src/config/feature-flags.ts',
191
- '+++ b/src/config/feature-flags.ts',
192
- '@@ -1,30 +1,30 @@ export const featureFlags = {',
193
- LARGE_DIFF_NOISE,
194
- ' };',
195
- ].join('\n'),
196
- stderr: '',
197
- },
198
- expectCompressed: true,
199
- expectTee: true,
200
- requiredSubstrings: [
201
- 'src/config/feature-flags.ts (+24 -24)',
202
- '@@ -1,30 +1,30 @@ export const featureFlags = {',
203
- '... truncated 42 more changed lines in hunk',
204
- 'truncation: raw diff available in tee output',
205
- 'raw_output:',
206
- ],
207
- continuationChecks: [
208
- {
209
- id: 'large-diff-tells-agent-to-open-tee',
210
- action: 'Identify the changed file and decide raw tee is needed before editing hidden lines.',
211
- requiredSubstrings: [
212
- 'src/config/feature-flags.ts (+24 -24)',
213
- '@@ -1,30 +1,30 @@ export const featureFlags = {',
214
- '... truncated 42 more changed lines in hunk',
215
- 'truncation: raw diff available in tee output',
216
- 'raw_output:',
217
- ],
218
- expectTee: true,
219
- },
220
- ],
221
- },
222
- {
223
- id: 'git-diff-generated-lockfile',
224
- commandArguments: ['git', 'diff'],
225
- capture: {
226
- exitCode: 0,
227
- stdout: [
228
- 'diff --git a/package-lock.json b/package-lock.json',
229
- 'index 5555555..6666666 100644',
230
- '--- a/package-lock.json',
231
- '+++ b/package-lock.json',
232
- '@@ -100,72 +100,72 @@',
233
- GENERATED_LOCKFILE_DIFF,
234
- ].join('\n'),
235
- stderr: '',
236
- },
237
- expectCompressed: true,
238
- expectTee: true,
239
- requiredSubstrings: [
240
- 'package-lock.json (+36 -36) [generated/noisy path]',
241
- 'detail: omitted generated/noisy diff; raw tee required for exact lines',
242
- 'truncation: raw diff available in tee output',
243
- 'raw_output:',
244
- ],
245
- forbiddenSubstrings: [
246
- 'node_modules/example-36',
247
- ],
248
- continuationChecks: [
249
- {
250
- id: 'generated-diff-does-not-hide-raw-need',
251
- action: 'Recognize generated lockfile noise and defer exact-line inspection to the raw tee.',
252
- requiredSubstrings: [
253
- 'package-lock.json (+36 -36) [generated/noisy path]',
254
- 'detail: omitted generated/noisy diff; raw tee required for exact lines',
255
- 'raw_output:',
256
- ],
257
- forbiddenSubstrings: [
258
- 'node_modules/example-36',
259
- ],
260
- expectTee: true,
261
- },
262
- ],
263
- },
264
- {
265
- id: 'git-diff-binary-file',
266
- commandArguments: ['git', 'diff'],
267
- capture: {
268
- exitCode: 0,
269
- stdout: [
270
- 'diff --git a/public/logo.png b/public/logo.png',
271
- 'index 7777777..8888888 100644',
272
- 'Binary files a/public/logo.png and b/public/logo.png differ',
273
- ].join('\n'),
274
- stderr: '',
275
- },
276
- expectCompressed: true,
277
- expectTee: false,
278
- requiredSubstrings: [
279
- 'public/logo.png (+0 -0) [binary file changed]',
280
- 'exit: 0',
281
- ],
282
- continuationChecks: [
283
- {
284
- id: 'binary-diff-keeps-non-text-signal',
285
- action: 'Identify that the diff cannot be reviewed as text because the changed file is binary.',
286
- requiredSubstrings: [
287
- 'public/logo.png (+0 -0) [binary file changed]',
288
- 'raw_output: none',
289
- ],
290
- expectTee: false,
291
- },
292
- ],
293
- },
294
- {
295
- id: 'git-diff-deleted-file',
296
- commandArguments: ['git', 'diff'],
297
- capture: {
298
- exitCode: 0,
299
- stdout: [
300
- 'diff --git a/src/legacy.ts b/src/legacy.ts',
301
- 'deleted file mode 100644',
302
- 'index 9999999..0000000',
303
- '--- a/src/legacy.ts',
304
- '+++ /dev/null',
305
- '@@ -1,3 +0,0 @@',
306
- '-export const legacy = true;',
307
- '-export function useLegacy() {}',
308
- ].join('\n'),
309
- stderr: '',
310
- },
311
- expectCompressed: true,
312
- expectTee: false,
313
- requiredSubstrings: [
314
- 'src/legacy.ts (+0 -2) [deleted file]',
315
- '@@ -1,3 +0,0 @@',
316
- '-export const legacy = true;',
317
- '-export function useLegacy() {}',
318
- ],
319
- continuationChecks: [
320
- {
321
- id: 'deleted-file-keeps-removal-evidence',
322
- action: 'Identify the deleted file and removed exports before accepting the change.',
323
- requiredSubstrings: [
324
- 'src/legacy.ts (+0 -2) [deleted file]',
325
- '@@ -1,3 +0,0 @@',
326
- '-export const legacy = true;',
327
- '-export function useLegacy() {}',
328
- ],
329
- expectTee: false,
330
- },
331
- ],
332
- },
333
- {
334
- id: 'npm-test-pass',
335
- commandArguments: ['npm', 'test'],
336
- capture: {
337
- exitCode: 0,
338
- stdout: [
339
- 'TAP version 13',
340
- PASSED_TEST_NOISE,
341
- '# Subtest: adds totals',
342
- 'ok 61 - adds totals',
343
- '# tests 1',
344
- '# suites 0',
345
- '# pass 1',
346
- '# fail 0',
347
- '# duration_ms 12.3',
348
- ].join('\n'),
349
- stderr: '',
350
- },
351
- expectCompressed: true,
352
- expectTee: false,
353
- requiredSubstrings: [
354
- 'npm test summary:',
355
- '# tests 1',
356
- '# pass 1',
357
- '# fail 0',
358
- 'exit: 0',
359
- 'raw_output: none',
360
- ],
361
- forbiddenSubstrings: [
362
- 'passing fixture 01',
363
- ],
364
- continuationChecks: [
365
- {
366
- id: 'passing-tests-avoid-failure-hunt',
367
- action: 'Decide that no failing-test triage is needed and no raw tee was written.',
368
- requiredSubstrings: [
369
- '# tests 1',
370
- '# pass 1',
371
- '# fail 0',
372
- 'exit: 0',
373
- 'raw_output: none',
374
- ],
375
- forbiddenSubstrings: [
376
- 'passing fixture 01',
377
- ],
378
- expectTee: false,
379
- },
380
- ],
381
- },
382
- {
383
- id: 'npm-test-pass-with-expected-error-log',
384
- commandArguments: ['npm', 'test'],
385
- capture: {
386
- exitCode: 0,
387
- stdout: [
388
- 'TAP version 13',
389
- '# Subtest: preflight checks abort installation on conflict',
390
- 'ok 1 - preflight checks abort installation on conflict',
391
- '# [FATAL] Preflight checks failed. Initializing here would cause errors or data loss:',
392
- '# CLI failed: Error: Preflight checks failed.',
393
- '# Subtest: transactional install performs automatic rollback on failure',
394
- 'ok 2 - transactional install performs automatic rollback on failure',
395
- '# tests 2',
396
- '# pass 2',
397
- '# fail 0',
398
- ].join('\n'),
399
- stderr: '',
400
- },
401
- expectCompressed: true,
402
- expectTee: false,
403
- requiredSubstrings: [
404
- 'npm test summary:',
405
- '# tests 2',
406
- '# pass 2',
407
- '# fail 0',
408
- 'exit: 0',
409
- 'raw_output: none',
410
- ],
411
- forbiddenSubstrings: [
412
- 'failures:',
413
- '[FATAL]',
414
- 'CLI failed: Error',
415
- ],
416
- continuationChecks: [
417
- {
418
- id: 'passing-tests-ignore-expected-error-logs',
419
- action: 'Trust the TAP summary over expected error text emitted by passing tests.',
420
- requiredSubstrings: [
421
- '# tests 2',
422
- '# pass 2',
423
- '# fail 0',
424
- 'raw_output: none',
425
- ],
426
- forbiddenSubstrings: [
427
- 'failures:',
428
- '[FATAL]',
429
- ],
430
- expectTee: false,
431
- },
432
- ],
433
- },
434
- {
435
- id: 'npm-test-one-failure',
436
- commandArguments: ['npm', 'test'],
437
- capture: {
438
- exitCode: 1,
439
- stdout: [
440
- 'TAP version 13',
441
- PASSED_TEST_NOISE,
442
- '# Subtest: calculates order total',
443
- 'not ok 1 - calculates order total',
444
- ' ---',
445
- ' error: |',
446
- ' AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:',
447
- ' 41 !== 42',
448
- ' at file:///E:/Project/app/tests/order-total.test.mjs:18:10',
449
- ' ...',
450
- '# tests 1',
451
- '# pass 0',
452
- '# fail 1',
453
- ].join('\n'),
454
- stderr: '',
455
- },
456
- expectCompressed: true,
457
- expectTee: true,
458
- requiredSubstrings: [
459
- '# Subtest: calculates order total',
460
- 'not ok 1 - calculates order total',
461
- 'AssertionError [ERR_ASSERTION]',
462
- 'order-total.test.mjs:18:10',
463
- '# fail 1',
464
- 'exit: 1',
465
- 'raw_output:',
466
- ],
467
- continuationChecks: [
468
- {
469
- id: 'single-test-failure-preserves-next-target',
470
- action: 'Identify the failing test, assertion class, file line, and raw tee for deeper inspection.',
471
- requiredSubstrings: [
472
- '# Subtest: calculates order total',
473
- 'AssertionError [ERR_ASSERTION]',
474
- 'order-total.test.mjs:18:10',
475
- '# fail 1',
476
- 'raw_output:',
477
- ],
478
- expectTee: true,
479
- },
480
- ],
481
- },
482
- {
483
- id: 'npm-test-multiple-failures',
484
- commandArguments: ['npm', 'test'],
485
- capture: {
486
- exitCode: 1,
487
- stdout: [
488
- 'TAP version 13',
489
- PASSED_TEST_NOISE,
490
- '# Subtest: validates login token',
491
- 'not ok 1 - validates login token',
492
- ' Error: token expired',
493
- ' at file:///E:/Project/app/tests/auth.test.mjs:33:5',
494
- '# Subtest: rejects duplicate order',
495
- 'not ok 2 - rejects duplicate order',
496
- ' AssertionError [ERR_ASSERTION]: Expected duplicate submit to be rejected',
497
- ' at file:///E:/Project/app/tests/orders.test.mjs:77:7',
498
- '# tests 2',
499
- '# pass 0',
500
- '# fail 2',
501
- ].join('\n'),
502
- stderr: '',
503
- },
504
- expectCompressed: true,
505
- expectTee: true,
506
- requiredSubstrings: [
507
- '# Subtest: validates login token',
508
- 'auth.test.mjs:33:5',
509
- '# Subtest: rejects duplicate order',
510
- 'orders.test.mjs:77:7',
511
- '# fail 2',
512
- ],
513
- continuationChecks: [
514
- {
515
- id: 'multiple-test-failures-preserve-all-targets',
516
- action: 'Identify each failing test target before picking the first fix.',
517
- requiredSubstrings: [
518
- '# Subtest: validates login token',
519
- 'auth.test.mjs:33:5',
520
- '# Subtest: rejects duplicate order',
521
- 'orders.test.mjs:77:7',
522
- '# fail 2',
523
- 'raw_output:',
524
- ],
525
- expectTee: true,
526
- },
527
- ],
528
- },
529
- {
530
- id: 'npm-test-crash-before-run',
531
- commandArguments: ['npm', 'test'],
532
- capture: {
533
- exitCode: 1,
534
- stdout: '',
535
- stderr: [
536
- 'SyntaxError: Unexpected token )',
537
- ' at compileSourceTextModule (node:internal/modules/esm/utils:346:16)',
538
- ' at file:///E:/Project/app/tests/crash.test.mjs:4:1',
539
- ].join('\n'),
540
- },
541
- expectCompressed: true,
542
- expectTee: true,
543
- requiredSubstrings: [
544
- 'SyntaxError: Unexpected token )',
545
- 'crash.test.mjs:4:1',
546
- 'exit: 1',
547
- 'raw_output:',
548
- ],
549
- continuationChecks: [
550
- {
551
- id: 'test-crash-preserves-root-error',
552
- action: 'Distinguish a test runner crash from an assertion failure and open the broken file.',
553
- requiredSubstrings: [
554
- 'SyntaxError: Unexpected token )',
555
- 'crash.test.mjs:4:1',
556
- 'exit: 1',
557
- 'raw_output:',
558
- ],
559
- expectTee: true,
560
- },
561
- ],
562
- },
563
- {
564
- id: 'unsafe-pipe-passthrough',
565
- commandArguments: ['npm', 'test', '|', 'tee', 'test.log'],
566
- capture: {
567
- exitCode: 1,
568
- stdout: 'raw pipe output\n',
569
- stderr: 'raw pipe error\n',
570
- },
571
- expectCompressed: false,
572
- expectTee: false,
573
- requiredSubstrings: [
574
- 'raw pipe output',
575
- 'raw pipe error',
576
- ],
577
- continuationChecks: [
578
- {
579
- id: 'pipe-passthrough-keeps-raw-output',
580
- action: 'Avoid trusting compression when shell control flow makes the command unsafe to summarize.',
581
- requiredSubstrings: [
582
- 'raw pipe output',
583
- 'raw pipe error',
584
- ],
585
- expectTee: false,
586
- },
587
- ],
588
- },
589
- {
590
- id: 'unsafe-redirect-passthrough',
591
- commandArguments: ['git', 'status', '>', 'status.txt'],
592
- capture: {
593
- exitCode: 0,
594
- stdout: 'raw redirected status\n',
595
- stderr: '',
596
- },
597
- expectCompressed: false,
598
- expectTee: false,
599
- requiredSubstrings: [
600
- 'raw redirected status',
601
- ],
602
- continuationChecks: [
603
- {
604
- id: 'redirect-passthrough-keeps-raw-output',
605
- action: 'Avoid compression when output redirection changes command semantics.',
606
- requiredSubstrings: [
607
- 'raw redirected status',
608
- ],
609
- expectTee: false,
610
- },
611
- ],
612
- },
613
- {
614
- id: 'npm-run-build-success',
615
- commandArguments: ['npm', 'run', 'build'],
616
- capture: {
617
- exitCode: 0,
618
- stdout: [
619
- '> npm run build',
620
- '> vite build',
621
- 'vite v4.0.0 building for production...',
622
- 'transforming...',
623
- '✓ 124 modules transformed.',
624
- 'dist/index.html 1.2kB',
625
- 'dist/assets/index.js 24kB',
626
- 'built in 1.2s',
627
- ].join('\n'),
628
- stderr: '',
629
- },
630
- expectCompressed: true,
631
- expectTee: false,
632
- requiredSubstrings: [
633
- 'npm run build summary:',
634
- 'result: passed',
635
- 'exit: 0',
636
- ],
637
- continuationChecks: [
638
- {
639
- id: 'npm-run-build-success-compacts-noise',
640
- action: 'Recognize the build passed and avoid reading raw noise.',
641
- requiredSubstrings: [
642
- 'result: passed',
643
- 'exit: 0',
644
- ],
645
- expectTee: false,
646
- },
647
- ],
648
- },
649
- {
650
- id: 'npm-run-build-failure',
651
- commandArguments: ['npm', 'run', 'build'],
652
- capture: {
653
- exitCode: 1,
654
- stdout: [
655
- '> npm run build',
656
- '> tsc --noEmit',
657
- 'src/components/Header.tsx:15:10 - error TS2322: Type \'string\' is not assignable to type \'number\'.',
658
- '15 const age: number = "25";',
659
- ].join('\n'),
660
- stderr: '',
661
- },
662
- expectCompressed: true,
663
- expectTee: true,
664
- requiredSubstrings: [
665
- 'npm run build summary:',
666
- 'failures:',
667
- 'error TS2322',
668
- 'Header.tsx:15:10',
669
- 'exit: 1',
670
- ],
671
- continuationChecks: [
672
- {
673
- id: 'npm-run-build-failure-preserves-error',
674
- action: 'Identify the build error and file path.',
675
- requiredSubstrings: [
676
- 'failures:',
677
- 'error TS2322',
678
- 'Header.tsx:15:10',
679
- ],
680
- expectTee: true,
681
- },
682
- ],
683
- },
684
- {
685
- id: 'rg-large-output',
686
- commandArguments: ['rg', 'function'],
687
- capture: {
688
- exitCode: 0,
689
- stdout: Array.from({ length: 120 }, (_, i) => `src/file-${i}.ts:10:function doSomething() {}`).join('\n'),
690
- stderr: '',
691
- },
692
- expectCompressed: true,
693
- expectTee: true, // We should write tee because it's truncated? Let's check formatter logic
694
- requiredSubstrings: [
695
- 'ripgrep results:',
696
- 'src/file-0.ts',
697
- '... truncated 40 more lines of matches',
698
- 'truncation: full search results available in the raw tee output',
699
- 'exit: 0',
700
- ],
701
- continuationChecks: [
702
- {
703
- id: 'rg-truncates-massive-results',
704
- action: 'Identify that ripgrep found many matches and read the truncated summary.',
705
- requiredSubstrings: [
706
- 'ripgrep results:',
707
- '... truncated 40 more lines of matches',
708
- 'truncation: full search results available in the raw tee output',
709
- ],
710
- expectTee: true, // Should tee if truncated
711
- },
712
- ],
713
- },
714
- {
715
- id: 'npm-install-success',
716
- commandArguments: ['npm', 'install'],
717
- capture: {
718
- exitCode: 0,
719
- stdout: [
720
- 'npm WARN deprecated package...',
721
- 'added 142 packages in 12s',
722
- ].join('\n'),
723
- stderr: '',
724
- },
725
- expectCompressed: true,
726
- expectTee: false,
727
- requiredSubstrings: [
728
- 'npm install summary:',
729
- 'added 142 packages in 12s',
730
- 'exit: 0',
731
- ],
732
- continuationChecks: [
733
- {
734
- id: 'npm-install-success-compacts-noise',
735
- action: 'Recognize the install passed and avoid reading raw noise.',
736
- requiredSubstrings: [
737
- 'added 142 packages in 12s',
738
- 'exit: 0',
739
- ],
740
- expectTee: false,
741
- },
742
- ],
743
- },
744
- {
745
- id: 'npm-install-failure',
746
- commandArguments: ['npm', 'install'],
747
- capture: {
748
- exitCode: 1,
749
- stdout: '',
750
- stderr: [
751
- 'npm WARN deprecated package...',
752
- 'npm ERR! code ERESOLVE',
753
- 'npm ERR! ERESOLVE unable to resolve dependency tree',
754
- ].join('\n'),
755
- },
756
- expectCompressed: true,
757
- expectTee: true,
758
- requiredSubstrings: [
759
- 'npm install summary:',
760
- 'failures:',
761
- 'npm ERR! code ERESOLVE',
762
- 'exit: 1',
763
- ],
764
- continuationChecks: [
765
- {
766
- id: 'npm-install-failure-preserves-error',
767
- action: 'Identify the installation error.',
768
- requiredSubstrings: [
769
- 'failures:',
770
- 'npm ERR! code ERESOLVE',
771
- ],
772
- expectTee: true,
773
- },
774
- ],
775
- },
776
- {
777
- id: 'tsc-success',
778
- commandArguments: ['tsc'],
779
- capture: {
780
- exitCode: 0,
781
- stdout: '',
782
- stderr: '',
783
- },
784
- expectCompressed: true,
785
- expectTee: false,
786
- requiredSubstrings: [
787
- 'tsc summary:',
788
- 'result: passed',
789
- 'exit: 0',
790
- ],
791
- continuationChecks: [
792
- {
793
- id: 'tsc-success-compacts-noise',
794
- action: 'Recognize the typecheck passed.',
795
- requiredSubstrings: [
796
- 'result: passed',
797
- 'exit: 0',
798
- ],
799
- expectTee: false,
800
- },
801
- ],
802
- },
803
- {
804
- id: 'tsc-failure',
805
- commandArguments: ['tsc'],
806
- capture: {
807
- exitCode: 1,
808
- stdout: [
809
- 'src/components/Header.tsx:15:10 - error TS2322: Type \'string\' is not assignable to type \'number\'.',
810
- '15 const age: number = "25";',
811
- ].join('\n'),
812
- stderr: '',
813
- },
814
- expectCompressed: true,
815
- expectTee: true,
816
- requiredSubstrings: [
817
- 'tsc summary:',
818
- 'failures:',
819
- 'error TS2322',
820
- 'Header.tsx:15:10',
821
- 'exit: 1',
822
- ],
823
- continuationChecks: [
824
- {
825
- id: 'tsc-failure-preserves-error',
826
- action: 'Identify the typecheck error and file path.',
827
- requiredSubstrings: [
828
- 'failures:',
829
- 'error TS2322',
830
- 'Header.tsx:15:10',
831
- ],
832
- expectTee: true,
833
- },
834
- ],
835
- },
836
- ];