Commit 5866cf0
I migrated every agent in the CLI to SparkBasedAgent<S> + role spark +
declarative .spark.md guidance, finishing what AMPR-161 started.
**Wave 0 — foundation:** generified SparkBasedAgent over the agent's
state type so role-specific factories can carry CodeState / ProductState /
ProjectState / QualityState without subclassing for behaviour.
**Wave 1 — Code path:** authored `code-agent.spark.md` (language-neutral
phase-loop guidance), added `SparkBasedAgent.Code(...)` factory, moved
`CodeParams` strategies onto `ToolWriteCodeFile` / `ToolReadCodeFile`,
introduced strict tool-id dispatch on `runLLMToExecuteTask` (no
keyword-routing fallback), added a `ToolPlanSteps` tool that owns the
plan-step JSON schema, added `GitParams.Commit` strategy on `ToolCommit`,
deleted `CodeAgent.kt` (1348 LOC) and extracted its issue → PR workflow
into `CodeIssueWorkflow` + generic `AutonomousWorkLoop<S>`.
**Wave 2 — fan-out:** authored `product-agent.spark.md`,
`project-agent.spark.md`, `quality-agent.spark.md`; added
`SparkBasedAgent.Product`, `.Project`, `.Quality` factories; attached
`ProjectParams.IssueCreation` / `ProjectParams.HumanEscalation`
strategies onto `ToolCreateIssues` / `ToolAskHuman`; deleted
`ProductAgent.kt`, `ProjectAgent.kt`, `QualityAgent.kt`; rewired
`AgentFactory` and `Main.kt`.
**Wave 3 — cleanup:** deleted the deprecated `ReasoningSettings` hooks
(`perceptionContextBuilder` / `planningPromptBuilder` /
`outcomeContextBuilder` / `knowledgeExtractor`) and their
`perception {}` / `planning {}` / `evaluation {}` / `knowledge {}`
builder DSLs; wired `DefaultPhaseSparkLibrary` into `AgentFactory` so
every agent reaches the LLM with its `.spark.md` per-phase guidance
active; expanded `LanguageSpark.Kotlin` with package-from-path
conventions and PLAN/EXECUTE phase contributions so Kotlin specifics
live in a composable spark rather than on the code agent's profile.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bc8765d commit 5866cf0
67 files changed
Lines changed: 2766 additions & 8267 deletions
File tree
- ampere-cli/src/jvmMain/kotlin/link/socket/ampere
- cli/goal
- demo
- ampere-core/src
- androidUnitTest/kotlin/link/socket/ampere/agents/implementations
- commonMain
- composeResources/files/sparks
- kotlin/link/socket/ampere
- agents
- definition
- code
- domain
- cognition/sparks
- outcome
- reasoning
- routing
- task
- execution
- issue
- request
- tools
- git
- planning
- domain/arc
- commonTest/kotlin/link/socket/ampere
- agents
- definition
- domain/cognition/sparks
- execution
- implementations
- code
- jvmTest/kotlin/link/socket/ampere
- agents
- definition
- demo
- domain
- cognition/sparks
- events
- meetings
- tickets
- execution/tools
- planning
- implementations
- domain/arc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
Lines changed: 43 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | | - | |
229 | | - | |
| 231 | + | |
| 232 | + | |
230 | 233 | | |
231 | | - | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | | - | |
235 | | - | |
| 237 | + | |
| 238 | + | |
236 | 239 | | |
237 | | - | |
238 | | - | |
| 240 | + | |
| 241 | + | |
239 | 242 | | |
240 | 243 | | |
241 | | - | |
242 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
243 | 247 | | |
244 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
245 | 260 | | |
246 | 261 | | |
247 | 262 | | |
248 | | - | |
| 263 | + | |
249 | 264 | | |
250 | | - | |
| 265 | + | |
251 | 266 | | |
252 | 267 | | |
253 | 268 | | |
| |||
316 | 331 | | |
317 | 332 | | |
318 | 333 | | |
319 | | - | |
| 334 | + | |
320 | 335 | | |
321 | 336 | | |
322 | 337 | | |
323 | 338 | | |
324 | 339 | | |
325 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
326 | 343 | | |
327 | 344 | | |
328 | 345 | | |
329 | 346 | | |
330 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
331 | 350 | | |
332 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
333 | 357 | | |
| 358 | + | |
334 | 359 | | |
335 | 360 | | |
| 361 | + | |
336 | 362 | | |
337 | 363 | | |
338 | 364 | | |
| |||
Lines changed: 19 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
99 | | - | |
| 99 | + | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
103 | | - | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
107 | | - | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | | - | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | | - | |
| 108 | + | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
379 | | - | |
| 380 | + | |
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
Lines changed: 0 additions & 5 deletions
This file was deleted.
0 commit comments