AMPR-165 #489: JSON frontmatter for .spark.md + role spark registry#490
Merged
wow-miley merged 1 commit intoMay 17, 2026
Conversation
I migrated the seven bundled `.spark.md` fixtures from YAML frontmatter to a
JSON-fenced (`---json` / `---`) format decoded against a sealed
`SparkFrontmatter` schema with `"phase"` and `"role"` variants. Added a new
`role-code.spark.md` fixture and a public `SparkRegistry` surface so the
`SparkBasedAgent.{Code,Quality}` factories resolve the role spark from the
declarative library by canonical id, failing fast when the fixture is missing
instead of falling back to the `RoleSpark.Code` Kotlin singleton. The legacy
YAML parser is removed; unmigrated documents now surface
`SparkParseError.DeprecatedYamlFrontmatter`.
Closes #489
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Concept staleness check — clean. No tracked-source changes need a concept update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I migrated the seven bundled
.spark.mdfixtures from YAML frontmatter to a JSON-fenced (---json/---) format decoded against a sealedSparkFrontmatterschema with"phase"and"role"variants, and added a newrole-code.spark.mdfixture. A publicSparkRegistrysurface lets theSparkBasedAgent.{Code,Quality}factories resolve their role spark from the declarative library by canonical id ("code"), failing fast when the fixture is missing rather than falling back to theRoleSpark.CodeKotlin singleton. The legacy YAML parser is removed — unmigrated documents now surfaceSparkParseError.DeprecatedYamlFrontmatter. Concept doc updated; out-of-scope follow-ups (migratingRoleSpark.Research/Operations/Planning,LanguageSpark,AmpereProjectSpark, retiring theRoleSpark.Codesingleton) deferred per the ticket.Closes #489
Test plan
./gradlew :ampere-core:jvmTest— passes (one unrelated flakyMcpIntegrationTestre-runs green)./gradlew :ampere-core:compileCommonMainKotlinMetadata— passes./gradlew :ampere-core:ktlintFormat— clean./gradlew :ampere-core:compileDebugUnitTestKotlinAndroid— not run locally (no Android SDK configured); changes are all in commonMain. Verify in an Android-configured environment before release.🤖 Generated with Claude Code