aspectcode 0.3.4 → 0.4.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 (109) hide show
  1. package/dist/cli.d.ts +1 -2
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +1 -2
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config.d.ts +0 -2
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/diffSummary.d.ts +17 -0
  9. package/dist/diffSummary.d.ts.map +1 -0
  10. package/dist/diffSummary.js +49 -0
  11. package/dist/diffSummary.js.map +1 -0
  12. package/dist/main.d.ts.map +1 -1
  13. package/dist/main.js +13 -16
  14. package/dist/main.js.map +1 -1
  15. package/dist/optimize.d.ts +6 -3
  16. package/dist/optimize.d.ts.map +1 -1
  17. package/dist/optimize.js +85 -102
  18. package/dist/optimize.js.map +1 -1
  19. package/dist/pipeline.d.ts +5 -4
  20. package/dist/pipeline.d.ts.map +1 -1
  21. package/dist/pipeline.js +45 -10
  22. package/dist/pipeline.js.map +1 -1
  23. package/dist/summary.d.ts +15 -0
  24. package/dist/summary.d.ts.map +1 -0
  25. package/dist/summary.js +51 -0
  26. package/dist/summary.js.map +1 -0
  27. package/dist/ui/Dashboard.d.ts +15 -7
  28. package/dist/ui/Dashboard.d.ts.map +1 -1
  29. package/dist/ui/Dashboard.js +55 -24
  30. package/dist/ui/Dashboard.js.map +1 -1
  31. package/dist/ui/store.d.ts +33 -0
  32. package/dist/ui/store.d.ts.map +1 -1
  33. package/dist/ui/store.js +24 -1
  34. package/dist/ui/store.js.map +1 -1
  35. package/dist/ui/theme.d.ts +3 -3
  36. package/dist/ui/theme.js +3 -3
  37. package/dist/ui/theme.js.map +1 -1
  38. package/node_modules/@aspectcode/evaluator/dist/diagnosis.d.ts +33 -0
  39. package/node_modules/@aspectcode/evaluator/dist/diagnosis.d.ts.map +1 -0
  40. package/node_modules/@aspectcode/evaluator/dist/diagnosis.js +172 -0
  41. package/node_modules/@aspectcode/evaluator/dist/diagnosis.js.map +1 -0
  42. package/node_modules/@aspectcode/evaluator/dist/harvest/aider.d.ts +23 -0
  43. package/node_modules/@aspectcode/evaluator/dist/harvest/aider.d.ts.map +1 -0
  44. package/node_modules/@aspectcode/evaluator/dist/harvest/aider.js +125 -0
  45. package/node_modules/@aspectcode/evaluator/dist/harvest/aider.js.map +1 -0
  46. package/node_modules/@aspectcode/evaluator/dist/harvest/claudeCode.d.ts +17 -0
  47. package/node_modules/@aspectcode/evaluator/dist/harvest/claudeCode.d.ts.map +1 -0
  48. package/node_modules/@aspectcode/evaluator/dist/harvest/claudeCode.js +223 -0
  49. package/node_modules/@aspectcode/evaluator/dist/harvest/claudeCode.js.map +1 -0
  50. package/node_modules/@aspectcode/evaluator/dist/harvest/cline.d.ts +17 -0
  51. package/node_modules/@aspectcode/evaluator/dist/harvest/cline.d.ts.map +1 -0
  52. package/node_modules/@aspectcode/evaluator/dist/harvest/cline.js +179 -0
  53. package/node_modules/@aspectcode/evaluator/dist/harvest/cline.js.map +1 -0
  54. package/node_modules/@aspectcode/evaluator/dist/harvest/common.d.ts +39 -0
  55. package/node_modules/@aspectcode/evaluator/dist/harvest/common.d.ts.map +1 -0
  56. package/node_modules/@aspectcode/evaluator/dist/harvest/common.js +170 -0
  57. package/node_modules/@aspectcode/evaluator/dist/harvest/common.js.map +1 -0
  58. package/node_modules/@aspectcode/evaluator/dist/harvest/export.d.ts +23 -0
  59. package/node_modules/@aspectcode/evaluator/dist/harvest/export.d.ts.map +1 -0
  60. package/node_modules/@aspectcode/evaluator/dist/harvest/export.js +98 -0
  61. package/node_modules/@aspectcode/evaluator/dist/harvest/export.js.map +1 -0
  62. package/node_modules/@aspectcode/evaluator/dist/harvest/index.d.ts +29 -0
  63. package/node_modules/@aspectcode/evaluator/dist/harvest/index.d.ts.map +1 -0
  64. package/node_modules/@aspectcode/evaluator/dist/harvest/index.js +94 -0
  65. package/node_modules/@aspectcode/evaluator/dist/harvest/index.js.map +1 -0
  66. package/node_modules/@aspectcode/evaluator/dist/harvest/vscodeDb.d.ts +37 -0
  67. package/node_modules/@aspectcode/evaluator/dist/harvest/vscodeDb.d.ts.map +1 -0
  68. package/node_modules/@aspectcode/evaluator/dist/harvest/vscodeDb.js +473 -0
  69. package/node_modules/@aspectcode/evaluator/dist/harvest/vscodeDb.js.map +1 -0
  70. package/node_modules/@aspectcode/evaluator/dist/index.d.ts +49 -0
  71. package/node_modules/@aspectcode/evaluator/dist/index.d.ts.map +1 -0
  72. package/node_modules/@aspectcode/evaluator/dist/index.js +75 -0
  73. package/node_modules/@aspectcode/evaluator/dist/index.js.map +1 -0
  74. package/node_modules/@aspectcode/evaluator/dist/probes.d.ts +38 -0
  75. package/node_modules/@aspectcode/evaluator/dist/probes.d.ts.map +1 -0
  76. package/node_modules/@aspectcode/evaluator/dist/probes.js +229 -0
  77. package/node_modules/@aspectcode/evaluator/dist/probes.js.map +1 -0
  78. package/node_modules/@aspectcode/evaluator/dist/runner.d.ts +44 -0
  79. package/node_modules/@aspectcode/evaluator/dist/runner.d.ts.map +1 -0
  80. package/node_modules/@aspectcode/evaluator/dist/runner.js +186 -0
  81. package/node_modules/@aspectcode/evaluator/dist/runner.js.map +1 -0
  82. package/node_modules/@aspectcode/evaluator/dist/types.d.ts +176 -0
  83. package/node_modules/@aspectcode/evaluator/dist/types.d.ts.map +1 -0
  84. package/node_modules/@aspectcode/evaluator/dist/types.js +9 -0
  85. package/node_modules/@aspectcode/evaluator/dist/types.js.map +1 -0
  86. package/node_modules/@aspectcode/evaluator/package.json +41 -0
  87. package/node_modules/@aspectcode/optimizer/dist/agent.d.ts +12 -13
  88. package/node_modules/@aspectcode/optimizer/dist/agent.d.ts.map +1 -1
  89. package/node_modules/@aspectcode/optimizer/dist/agent.js +52 -110
  90. package/node_modules/@aspectcode/optimizer/dist/agent.js.map +1 -1
  91. package/node_modules/@aspectcode/optimizer/dist/index.d.ts +3 -3
  92. package/node_modules/@aspectcode/optimizer/dist/index.d.ts.map +1 -1
  93. package/node_modules/@aspectcode/optimizer/dist/index.js +3 -5
  94. package/node_modules/@aspectcode/optimizer/dist/index.js.map +1 -1
  95. package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts +8 -21
  96. package/node_modules/@aspectcode/optimizer/dist/prompts.d.ts.map +1 -1
  97. package/node_modules/@aspectcode/optimizer/dist/prompts.js +36 -94
  98. package/node_modules/@aspectcode/optimizer/dist/prompts.js.map +1 -1
  99. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.d.ts.map +1 -1
  100. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js +10 -1
  101. package/node_modules/@aspectcode/optimizer/dist/providers/anthropic.js.map +1 -1
  102. package/node_modules/@aspectcode/optimizer/dist/providers/openai.d.ts.map +1 -1
  103. package/node_modules/@aspectcode/optimizer/dist/providers/openai.js +10 -1
  104. package/node_modules/@aspectcode/optimizer/dist/providers/openai.js.map +1 -1
  105. package/node_modules/@aspectcode/optimizer/dist/types.d.ts +33 -24
  106. package/node_modules/@aspectcode/optimizer/dist/types.d.ts.map +1 -1
  107. package/node_modules/@aspectcode/optimizer/dist/types.js.map +1 -1
  108. package/node_modules/@aspectcode/optimizer/package.json +2 -2
  109. package/package.json +4 -3
@@ -0,0 +1,176 @@
1
+ /**
2
+ * @aspectcode/evaluator — core types.
3
+ *
4
+ * Types for probe-based evaluation, prompt harvesting, and
5
+ * evidence-based diagnosis of AGENTS.md quality.
6
+ */
7
+ import type { LlmProvider, OptLogger } from '@aspectcode/optimizer';
8
+ export type { LlmProvider, OptLogger } from '@aspectcode/optimizer';
9
+ /**
10
+ * A single micro-test that evaluates whether AGENTS.md guides
11
+ * the AI correctly for a specific scenario scoped to the codebase.
12
+ */
13
+ export interface Probe {
14
+ /** Unique identifier (e.g. "hub-auth-middleware-naming"). */
15
+ id: string;
16
+ /** Human-readable description of what this probe tests. */
17
+ description: string;
18
+ /** Category for grouping (e.g. "hub-safety", "naming", "architecture"). */
19
+ category: ProbeCategory;
20
+ /**
21
+ * Workspace-relative paths of files relevant to this probe.
22
+ * These are included as context when running the probe.
23
+ */
24
+ contextFiles: string[];
25
+ /** The task/question posed to the AI in this probe. */
26
+ task: string;
27
+ /**
28
+ * Specific behaviours the AI's response should exhibit.
29
+ * Used by the evaluator to score the response.
30
+ */
31
+ expectedBehaviors: string[];
32
+ }
33
+ /** Probe categories for grouping and prioritization. */
34
+ export type ProbeCategory = 'hub-safety' | 'naming' | 'architecture' | 'entry-point' | 'integration' | 'convention' | 'dependency' | 'harvested';
35
+ /** Result of running a single probe against the current AGENTS.md. */
36
+ export interface ProbeResult {
37
+ /** The probe that was run. */
38
+ probeId: string;
39
+ /** Whether all expected behaviours were exhibited. */
40
+ passed: boolean;
41
+ /** The AI's simulated response to the probe task. */
42
+ response: string;
43
+ /**
44
+ * Specific shortcomings identified by the evaluator.
45
+ * Empty if `passed` is true.
46
+ */
47
+ shortcomings: string[];
48
+ /** Per-behaviour pass/fail breakdown. */
49
+ behaviorResults: BehaviorResult[];
50
+ }
51
+ /** Pass/fail for a single expected behaviour within a probe. */
52
+ export interface BehaviorResult {
53
+ /** The expected behaviour description. */
54
+ behavior: string;
55
+ /** Whether the response exhibited this behaviour. */
56
+ passed: boolean;
57
+ /** Brief explanation of why it passed or failed. */
58
+ explanation: string;
59
+ }
60
+ /** Diagnosis of AGENTS.md shortcomings based on failed probes. */
61
+ export interface Diagnosis {
62
+ /** Specific edits proposed for AGENTS.md. */
63
+ edits: AgentsEdit[];
64
+ /** High-level summary of what's wrong. */
65
+ summary: string;
66
+ /** Number of probe failures this diagnosis addresses. */
67
+ failureCount: number;
68
+ }
69
+ /** A specific proposed edit to AGENTS.md. */
70
+ export interface AgentsEdit {
71
+ /** What section/area of AGENTS.md to modify. */
72
+ section: string;
73
+ /** The type of edit. */
74
+ action: 'add' | 'modify' | 'strengthen' | 'remove';
75
+ /** The proposed rule or content change. */
76
+ content: string;
77
+ /** Which probe failures motivated this edit. */
78
+ motivatedBy: string[];
79
+ }
80
+ /** A conversation turn harvested from an AI tool's history. */
81
+ export interface HarvestedPrompt {
82
+ /** Which tool this came from. */
83
+ source: PromptSource;
84
+ /** When this conversation happened (ISO-8601, if available). */
85
+ timestamp?: string;
86
+ /** The user's prompt/question. */
87
+ userPrompt: string;
88
+ /** The AI's response. */
89
+ assistantResponse: string;
90
+ /** Workspace-relative file paths referenced in the conversation. */
91
+ filesReferenced: string[];
92
+ }
93
+ /** Supported prompt history sources. */
94
+ export type PromptSource = 'aider' | 'claude-code' | 'cline' | 'copilot-chat' | 'cursor' | 'windsurf' | 'export';
95
+ /** Options for probe generation. */
96
+ export interface ProbeGeneratorOptions {
97
+ /** Full KB content for deriving probes. */
98
+ kb: string;
99
+ /**
100
+ * Line-level KB diff (undefined on first run).
101
+ * When provided, probes focus on changed areas.
102
+ */
103
+ kbDiff?: string;
104
+ /** Harvested prompts to generate additional probes from. */
105
+ harvestedPrompts?: HarvestedPrompt[];
106
+ /** Maximum number of probes to generate. Default: 10. */
107
+ maxProbes?: number;
108
+ /** File contents map (workspace-relative path → content). */
109
+ fileContents?: ReadonlyMap<string, string>;
110
+ }
111
+ /** Options for running probes. */
112
+ export interface ProbeRunnerOptions {
113
+ /** Current AGENTS.md content (used as system prompt for probes). */
114
+ agentsContent: string;
115
+ /** Probes to run. */
116
+ probes: Probe[];
117
+ /** LLM provider for simulating AI responses. */
118
+ provider: LlmProvider;
119
+ /** File contents map for including context files. */
120
+ fileContents?: ReadonlyMap<string, string>;
121
+ /** Optional logger. */
122
+ log?: OptLogger;
123
+ /** AbortSignal for cooperative cancellation. */
124
+ signal?: AbortSignal;
125
+ }
126
+ /** Options for evaluating probe responses. */
127
+ export interface ProbeEvaluatorOptions {
128
+ /** Probe results to evaluate. */
129
+ results: ProbeResult[];
130
+ /** LLM provider for evaluation. */
131
+ provider: LlmProvider;
132
+ /** Optional logger. */
133
+ log?: OptLogger;
134
+ /** AbortSignal for cooperative cancellation. */
135
+ signal?: AbortSignal;
136
+ }
137
+ /** Options for diagnosing AGENTS.md issues from probe failures. */
138
+ export interface DiagnosisOptions {
139
+ /** Failed probe results. */
140
+ failures: ProbeResult[];
141
+ /** Current AGENTS.md content. */
142
+ agentsContent: string;
143
+ /** LLM provider for diagnosis. */
144
+ provider: LlmProvider;
145
+ /** Optional logger. */
146
+ log?: OptLogger;
147
+ /** AbortSignal for cooperative cancellation. */
148
+ signal?: AbortSignal;
149
+ }
150
+ /** Options for prompt harvesting. */
151
+ export interface HarvestOptions {
152
+ /** Workspace root directory. */
153
+ root: string;
154
+ /** Which sources to harvest from. Defaults to all available. */
155
+ sources?: PromptSource[];
156
+ /** Maximum prompts to harvest per source. Default: 50. */
157
+ maxPerSource?: number;
158
+ /** Only harvest prompts newer than this date. */
159
+ since?: Date;
160
+ /** Optional logger. */
161
+ log?: OptLogger;
162
+ }
163
+ /** Full result of the evaluation pipeline. */
164
+ export interface EvaluationResult {
165
+ /** All probe results (passed + failed). */
166
+ probeResults: ProbeResult[];
167
+ /** Diagnosis based on failures (undefined if all probes passed). */
168
+ diagnosis?: Diagnosis;
169
+ /** Number of probes that passed. */
170
+ passCount: number;
171
+ /** Number of probes that failed. */
172
+ failCount: number;
173
+ /** Total probes run. */
174
+ totalProbes: number;
175
+ }
176
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGpE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIpE;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IAEX,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IAEpB,2EAA2E;IAC3E,QAAQ,EAAE,aAAa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Q,EAAE,WAAW,CAAC;IAEtB,uBAAuB;IACvB,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB,gDAAgD;IAChD,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,mEAAmE;AACnE,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;IAEtB,kCAAkC;IAClC,QAAQ,EAAE,WAAW,CAAC;IAEtB,uBAAuB;IACvB,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB,gDAAgD;IAChD,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,qCAAqC;AACrC,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,gEAAgE;IAChE,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,iDAAiD;IACjD,KAAK,CAAC,EAAE,IAAI,CAAC;IAEb,uBAAuB;IACvB,GAAG,CAAC,EAAE,SAAS,CAAC;CACjB;AAID,8CAA8C;AAC9C,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,YAAY,EAAE,WAAW,EAAE,CAAC;IAE5B,oEAAoE;IACpE,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAElB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAElB,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * @aspectcode/evaluator — core types.
4
+ *
5
+ * Types for probe-based evaluation, prompt harvesting, and
6
+ * evidence-based diagnosis of AGENTS.md quality.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@aspectcode/evaluator",
3
+ "version": "0.4.0",
4
+ "private": true,
5
+ "description": "Evidence-based evaluation for Aspect Code",
6
+ "license": "MIT",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "engines": {
13
+ "node": ">=18"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/asashepard/aspectcode.git",
18
+ "directory": "packages/evaluator"
19
+ },
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "typecheck": "tsc --noEmit",
23
+ "prepublishOnly": "npm run build",
24
+ "test": "mocha --require ts-node/register test/**/*.test.ts"
25
+ },
26
+ "dependencies": {
27
+ "@aspectcode/core": "0.3.1",
28
+ "@aspectcode/optimizer": "0.4.0"
29
+ },
30
+ "optionalDependencies": {
31
+ "better-sqlite3": "^11.0.0"
32
+ },
33
+ "devDependencies": {
34
+ "@types/better-sqlite3": "^7.6.0",
35
+ "@types/mocha": "^10.0.0",
36
+ "@types/node": "^22.0.0",
37
+ "mocha": "^10.4.0",
38
+ "ts-node": "^10.9.2",
39
+ "typescript": "^5.5.4"
40
+ }
41
+ }
@@ -1,23 +1,22 @@
1
1
  /**
2
- * Optimization agent — generates optimized AGENTS.md instructions.
2
+ * Generation agent — generates AGENTS.md from scratch using static analysis.
3
3
  *
4
- * Two modes:
5
- * 1. **Single-pass** (default): One LLM call produces the optimized instructions.
6
- * The evaluator package (@aspectcode/evaluator) handles quality assessment
7
- * externally via probe-based testing.
8
- * 2. **Legacy iterative**: Retained for backward compatibility. Uses self-eval
9
- * scoring to iterate. Set `maxIterations > 1` to enable.
10
- *
11
- * The recommended workflow is single-pass + evaluator:
12
- * optimize (1 call) → probe-test → diagnose → apply edits
4
+ * Single-pass: one LLM call produces the instructions content.
5
+ * The KB (static analysis) is provided as context in the system prompt.
6
+ * Quality assessment is handled externally by the evaluator package
7
+ * (@aspectcode/evaluator) via probe-based testing:
8
+ * generate (1 call) probe-test diagnose apply edits
13
9
  */
14
10
  import type { OptimizeOptions, OptimizeResult, ComplaintOptions, ComplaintResult } from './types';
15
11
  /**
16
- * Run the optimization agent loop.
12
+ * Run the generation agent — single-pass LLM generation.
17
13
  *
18
- * @returns The best optimized instructions found within maxIterations.
14
+ * Generates AGENTS.md content from scratch using the KB (static analysis)
15
+ * as context. The LLM sees the full knowledge base in the system prompt
16
+ * and produces codebase-specific instructions in one call.
17
+ * The evaluator package handles quality feedback externally.
19
18
  */
20
- export declare function runOptimizeAgent(options: OptimizeOptions): Promise<OptimizeResult>;
19
+ export declare function runGenerateAgent(options: OptimizeOptions): Promise<OptimizeResult>;
21
20
  /**
22
21
  * Process user complaints by asking the LLM to update AGENTS.md instructions.
23
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAe,eAAe,EAAE,cAAc,EAAc,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkB3H;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA6HxF;AAID;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CA0C3F"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAA0B,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQ1H;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA8DxF;AAID;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CA0C3F"}
@@ -1,128 +1,70 @@
1
1
  "use strict";
2
2
  /**
3
- * Optimization agent — generates optimized AGENTS.md instructions.
3
+ * Generation agent — generates AGENTS.md from scratch using static analysis.
4
4
  *
5
- * Two modes:
6
- * 1. **Single-pass** (default): One LLM call produces the optimized instructions.
7
- * The evaluator package (@aspectcode/evaluator) handles quality assessment
8
- * externally via probe-based testing.
9
- * 2. **Legacy iterative**: Retained for backward compatibility. Uses self-eval
10
- * scoring to iterate. Set `maxIterations > 1` to enable.
11
- *
12
- * The recommended workflow is single-pass + evaluator:
13
- * optimize (1 call) → probe-test → diagnose → apply edits
5
+ * Single-pass: one LLM call produces the instructions content.
6
+ * The KB (static analysis) is provided as context in the system prompt.
7
+ * Quality assessment is handled externally by the evaluator package
8
+ * (@aspectcode/evaluator) via probe-based testing:
9
+ * generate (1 call) probe-test diagnose apply edits
14
10
  */
15
11
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.runOptimizeAgent = runOptimizeAgent;
12
+ exports.runGenerateAgent = runGenerateAgent;
17
13
  exports.runComplaintAgent = runComplaintAgent;
18
14
  const prompts_1 = require("./prompts");
19
- /** Default minimum eval score to accept a candidate without further iteration. */
20
- const DEFAULT_ACCEPT_THRESHOLD = 8;
21
- /** Helper: sleep for `ms` milliseconds. */
22
- function sleep(ms) {
23
- return new Promise((resolve) => setTimeout(resolve, ms));
24
- }
25
15
  /**
26
- * Run the optimization agent loop.
16
+ * Run the generation agent — single-pass LLM generation.
27
17
  *
28
- * @returns The best optimized instructions found within maxIterations.
18
+ * Generates AGENTS.md content from scratch using the KB (static analysis)
19
+ * as context. The LLM sees the full knowledge base in the system prompt
20
+ * and produces codebase-specific instructions in one call.
21
+ * The evaluator package handles quality feedback externally.
29
22
  */
30
- async function runOptimizeAgent(options) {
31
- const { currentInstructions, kb, kbDiff, toolInstructions, maxIterations, provider, log, acceptThreshold = DEFAULT_ACCEPT_THRESHOLD, signal, iterationDelayMs = 0, kbCharBudget, evaluatorFeedback, } = options;
23
+ async function runGenerateAgent(options) {
24
+ const { currentInstructions, kb, kbDiff, toolInstructions, provider, log, signal, kbCharBudget, onProgress, } = options;
25
+ // Fallback content when we can't generate (cancellation / LLM error).
26
+ const fallback = currentInstructions ?? '';
27
+ if (signal?.aborted) {
28
+ log?.info('Generation cancelled.');
29
+ return {
30
+ optimizedInstructions: fallback,
31
+ reasoning: ['Cancelled by user'],
32
+ };
33
+ }
32
34
  const systemPrompt = (0, prompts_1.buildSystemPrompt)(kb, kbCharBudget, toolInstructions);
33
- const reasoning = [];
34
- let bestCandidate = currentInstructions;
35
- let bestScore = 0;
36
- // Seed with evaluator feedback when available (probe-based evidence)
37
- let priorFeedback = evaluatorFeedback;
38
- for (let i = 0; i < maxIterations; i++) {
39
- // ── Check cancellation ───────────────────────────────
40
- if (signal?.aborted) {
41
- log?.info('Optimization cancelled.');
42
- reasoning.push(`Iteration ${i + 1}: cancelled by user`);
43
- break;
44
- }
45
- // ── Inter-iteration delay (skip before first) ────────
46
- if (i > 0 && iterationDelayMs > 0) {
47
- log?.debug(`Waiting ${iterationDelayMs}ms before next iteration…`);
48
- await sleep(iterationDelayMs);
49
- if (signal?.aborted) {
50
- log?.info('Optimization cancelled during delay.');
51
- reasoning.push(`Iteration ${i + 1}: cancelled by user`);
52
- break;
53
- }
54
- }
55
- log?.info(`Optimize iteration ${i + 1}/${maxIterations}…`);
56
- // ── Step 1: Generate optimized candidate ─────────────
57
- const optimizeMessages = [
58
- { role: 'system', content: systemPrompt },
59
- { role: 'user', content: (0, prompts_1.buildOptimizePrompt)(currentInstructions, kbDiff, priorFeedback) },
60
- ];
61
- let candidate;
62
- try {
63
- candidate = await provider.chat(optimizeMessages);
64
- }
65
- catch (err) {
66
- const msg = err instanceof Error ? err.message : String(err);
67
- log?.error(`LLM call failed: ${msg}`);
68
- reasoning.push(`Iteration ${i + 1}: LLM error — ${msg}`);
69
- break;
70
- }
71
- // ── Step 2: Self-evaluate ────────────────────────────
72
- if (signal?.aborted) {
73
- // Accept the candidate we just got since we can't eval
74
- if (bestScore === 0) {
75
- bestCandidate = candidate;
76
- }
77
- reasoning.push(`Iteration ${i + 1}: cancelled before eval`);
78
- break;
79
- }
80
- log?.debug(`Evaluating candidate (iteration ${i + 1})…`);
81
- let evalResult;
82
- try {
83
- const evalMessages = [
84
- { role: 'user', content: (0, prompts_1.buildEvalPrompt)(candidate, kb, kbCharBudget) },
85
- ];
86
- const evalResponse = await provider.chat(evalMessages);
87
- evalResult = (0, prompts_1.parseEvalResponse)(evalResponse);
88
- }
89
- catch (err) {
90
- const msg = err instanceof Error ? err.message : String(err);
91
- log?.warn(`Eval call failed: ${msg}. Tracking candidate as best-effort.`);
92
- reasoning.push(`Iteration ${i + 1}: eval error — ${msg}`);
93
- // Track as best candidate if nothing better exists, but don't auto-accept
94
- if (bestScore === 0) {
95
- bestCandidate = candidate;
96
- }
97
- continue;
98
- }
99
- reasoning.push(`Iteration ${i + 1}: score=${evalResult.score}/10 — ${evalResult.feedback}`);
100
- log?.info(` Score: ${evalResult.score}/10`);
101
- // Track best candidate
102
- if (evalResult.score > bestScore) {
103
- bestScore = evalResult.score;
104
- bestCandidate = candidate;
35
+ // ── Generate instructions from scratch ────────────────────────
36
+ onProgress?.({ kind: 'generating', detail: 'generating AGENTS.md…' });
37
+ log?.info('Generating AGENTS.md from static analysis…');
38
+ const generateMessages = [
39
+ { role: 'system', content: systemPrompt },
40
+ { role: 'user', content: (0, prompts_1.buildGeneratePrompt)(kbDiff) },
41
+ ];
42
+ let candidate;
43
+ let usage;
44
+ try {
45
+ if (provider.chatWithUsage) {
46
+ const result = await provider.chatWithUsage(generateMessages);
47
+ candidate = result.content;
48
+ usage = result.usage;
105
49
  }
106
- // ── Step 3: Accept or refine ─────────────────────────
107
- if (evalResult.score >= acceptThreshold) {
108
- log?.info(` Accepted (score ≥ ${acceptThreshold})`);
109
- return {
110
- optimizedInstructions: candidate,
111
- iterations: i + 1,
112
- reasoning,
113
- };
50
+ else {
51
+ candidate = await provider.chat(generateMessages);
114
52
  }
115
- // Build feedback for next iteration
116
- priorFeedback =
117
- `Score: ${evalResult.score}/10\n${evalResult.feedback}\n\nSuggestions:\n` +
118
- evalResult.suggestions.map((s) => `- ${s}`).join('\n');
119
53
  }
120
- // Exhausted iterations or cancelled — return best seen
121
- log?.info(`Returning best candidate (score ${bestScore}/10).`);
54
+ catch (err) {
55
+ const msg = err instanceof Error ? err.message : String(err);
56
+ log?.error(`LLM call failed: ${msg}`);
57
+ return {
58
+ optimizedInstructions: fallback,
59
+ reasoning: [`LLM error — ${msg}`],
60
+ };
61
+ }
62
+ onProgress?.({ kind: 'done', detail: 'generation complete' });
63
+ log?.info('Generation complete.');
122
64
  return {
123
- optimizedInstructions: bestCandidate,
124
- iterations: maxIterations,
125
- reasoning,
65
+ optimizedInstructions: candidate,
66
+ reasoning: ['Single-pass generation from static analysis complete'],
67
+ usage,
126
68
  };
127
69
  }
128
70
  // ── Complaint agent ──────────────────────────────────────────
@@ -1 +1 @@
1
- {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAyBH,4CA6HC;AAWD,8CA0CC;AAxMD,uCAOmB;AAEnB,kFAAkF;AAClF,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAEnC,2CAA2C;AAC3C,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,gBAAgB,CAAC,OAAwB;IAC7D,MAAM,EACJ,mBAAmB,EACnB,EAAE,EACF,MAAM,EACN,gBAAgB,EAChB,aAAa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AAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,GAAG,EAAE,KAAK,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;QAChD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,UAAU,GAAG,EAAE,CAAC,EAAE,CAAC;IACpF,CAAC;IAED,MAAM,MAAM,GAAG,IAAA,gCAAsB,EAAC,QAAQ,CAAC,CAAC;IAChD,GAAG,EAAE,IAAI,CAAC,WAAW,MAAM,CAAC,OAAO,CAAC,MAAM,UAAU,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;IAE/F,OAAO;QACL,qBAAqB,EAAE,MAAM,CAAC,YAAY;QAC1C,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC"}
@@ -3,13 +3,13 @@
3
3
  *
4
4
  * Re-exports types and provides the top-level `optimizeInstructions` entry point.
5
5
  */
6
- export type { LlmProvider, ChatMessage, ProviderOptions, OptimizeOptions, OptimizeResult, EvalResult, OptLogger, ProviderName, ComplaintOptions, ComplaintResult, } from './types';
6
+ export type { LlmProvider, ChatMessage, ChatUsage, ChatResult, ProviderOptions, OptimizeOptions, OptimizeResult, OptimizeStep, OptLogger, ProviderName, ComplaintOptions, ComplaintResult, } from './types';
7
7
  export { PROVIDER_ENV_KEYS, LLM_PROVIDER_ENV, LLM_MODEL_ENV } from './types';
8
8
  export { resolveProvider, loadEnvFile, parseDotenv } from './providers/index';
9
9
  export { createOpenAiProvider } from './providers/openai';
10
10
  export { createAnthropicProvider } from './providers/anthropic';
11
11
  export { withRetry } from './providers/retry';
12
12
  export type { RetryOptions } from './providers/retry';
13
- export { runOptimizeAgent, runComplaintAgent } from './agent';
14
- export { buildSystemPrompt, buildOptimizePrompt, buildEvalPrompt, parseEvalResponse, truncateKb, buildComplaintPrompt, parseComplaintResponse, } from './prompts';
13
+ export { runGenerateAgent, runComplaintAgent } from './agent';
14
+ export { buildSystemPrompt, buildGeneratePrompt, truncateKb, buildComplaintPrompt, parseComplaintResponse, } from './prompts';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,EACf,cAAc,EACd,UAAU,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,WAAW,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * Re-exports types and provides the top-level `optimizeInstructions` entry point.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.parseComplaintResponse = exports.buildComplaintPrompt = exports.truncateKb = exports.parseEvalResponse = exports.buildEvalPrompt = exports.buildOptimizePrompt = exports.buildSystemPrompt = exports.runComplaintAgent = exports.runOptimizeAgent = exports.withRetry = exports.createAnthropicProvider = exports.createOpenAiProvider = exports.parseDotenv = exports.loadEnvFile = exports.resolveProvider = exports.LLM_MODEL_ENV = exports.LLM_PROVIDER_ENV = exports.PROVIDER_ENV_KEYS = void 0;
8
+ exports.parseComplaintResponse = exports.buildComplaintPrompt = exports.truncateKb = exports.buildGeneratePrompt = exports.buildSystemPrompt = exports.runComplaintAgent = exports.runGenerateAgent = exports.withRetry = exports.createAnthropicProvider = exports.createOpenAiProvider = exports.parseDotenv = exports.loadEnvFile = exports.resolveProvider = exports.LLM_MODEL_ENV = exports.LLM_PROVIDER_ENV = exports.PROVIDER_ENV_KEYS = void 0;
9
9
  var types_1 = require("./types");
10
10
  Object.defineProperty(exports, "PROVIDER_ENV_KEYS", { enumerable: true, get: function () { return types_1.PROVIDER_ENV_KEYS; } });
11
11
  Object.defineProperty(exports, "LLM_PROVIDER_ENV", { enumerable: true, get: function () { return types_1.LLM_PROVIDER_ENV; } });
@@ -21,13 +21,11 @@ Object.defineProperty(exports, "createAnthropicProvider", { enumerable: true, ge
21
21
  var retry_1 = require("./providers/retry");
22
22
  Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return retry_1.withRetry; } });
23
23
  var agent_1 = require("./agent");
24
- Object.defineProperty(exports, "runOptimizeAgent", { enumerable: true, get: function () { return agent_1.runOptimizeAgent; } });
24
+ Object.defineProperty(exports, "runGenerateAgent", { enumerable: true, get: function () { return agent_1.runGenerateAgent; } });
25
25
  Object.defineProperty(exports, "runComplaintAgent", { enumerable: true, get: function () { return agent_1.runComplaintAgent; } });
26
26
  var prompts_1 = require("./prompts");
27
27
  Object.defineProperty(exports, "buildSystemPrompt", { enumerable: true, get: function () { return prompts_1.buildSystemPrompt; } });
28
- Object.defineProperty(exports, "buildOptimizePrompt", { enumerable: true, get: function () { return prompts_1.buildOptimizePrompt; } });
29
- Object.defineProperty(exports, "buildEvalPrompt", { enumerable: true, get: function () { return prompts_1.buildEvalPrompt; } });
30
- Object.defineProperty(exports, "parseEvalResponse", { enumerable: true, get: function () { return prompts_1.parseEvalResponse; } });
28
+ Object.defineProperty(exports, "buildGeneratePrompt", { enumerable: true, get: function () { return prompts_1.buildGeneratePrompt; } });
31
29
  Object.defineProperty(exports, "truncateKb", { enumerable: true, get: function () { return prompts_1.truncateKb; } });
32
30
  Object.defineProperty(exports, "buildComplaintPrompt", { enumerable: true, get: function () { return prompts_1.buildComplaintPrompt; } });
33
31
  Object.defineProperty(exports, "parseComplaintResponse", { enumerable: true, get: function () { return prompts_1.parseComplaintResponse; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],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AA"}
@@ -1,10 +1,9 @@
1
1
  /**
2
- * Prompt templates for the optimization agent.
2
+ * Prompt templates for the generation agent.
3
3
  *
4
- * Three prompts:
4
+ * Two prompts:
5
5
  * 1. System prompt — sets context with KB content.
6
- * 2. Optimize prompt — asks the LLM to refine instructions.
7
- * 3. Eval prompt — asks the LLM to score and critique a candidate.
6
+ * 2. Generate prompt — asks the LLM to generate AGENTS.md from scratch using KB.
8
7
  */
9
8
  /**
10
9
  * Truncate KB content to fit within the character budget.
@@ -17,25 +16,13 @@ export declare function truncateKb(kb: string, charBudget?: number): string;
17
16
  */
18
17
  export declare function buildSystemPrompt(kb: string, kbCharBudget?: number, toolInstructions?: string): string;
19
18
  /**
20
- * Build the user prompt for instruction optimization.
19
+ * Build the user prompt for AGENTS.md generation.
21
20
  *
22
- * Includes the current instructions and optionally a KB diff showing
23
- * what changed in the codebase since the last generation.
21
+ * Asks the LLM to generate AGENTS.md from scratch using the KB
22
+ * (static analysis) provided in the system prompt as context.
23
+ * Optionally includes a KB diff for incremental regeneration.
24
24
  */
25
- export declare function buildOptimizePrompt(currentInstructions: string, kbDiff?: string, priorFeedback?: string): string;
26
- /**
27
- * Build the evaluation prompt that asks the LLM to score and critique
28
- * a candidate set of instructions.
29
- */
30
- export declare function buildEvalPrompt(candidateInstructions: string, kb: string, kbCharBudget?: number): string;
31
- /**
32
- * Parse the structured evaluation response into an EvalResult.
33
- */
34
- export declare function parseEvalResponse(response: string): {
35
- score: number;
36
- feedback: string;
37
- suggestions: string[];
38
- };
25
+ export declare function buildGeneratePrompt(kbDiff?: string): string;
39
26
  /**
40
27
  * Build a prompt that instructs the LLM to address specific user complaints
41
28
  * by modifying the AGENTS.md instructions.
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,GAAE,M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