Skip to content

AMPR-165 #489: JSON frontmatter for .spark.md + role spark registry#490

Merged
wow-miley merged 1 commit into
mainfrom
miley/ampr-165-implement-json-frontmatter-for-sparkmd-role-spark-registry
May 17, 2026
Merged

AMPR-165 #489: JSON frontmatter for .spark.md + role spark registry#490
wow-miley merged 1 commit into
mainfrom
miley/ampr-165-implement-json-frontmatter-for-sparkmd-role-spark-registry

Conversation

@wow-miley
Copy link
Copy Markdown
Contributor

Summary

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, and added a new role-code.spark.md fixture. A public SparkRegistry surface lets the SparkBasedAgent.{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 the RoleSpark.Code Kotlin singleton. The legacy YAML parser is removed — unmigrated documents now surface SparkParseError.DeprecatedYamlFrontmatter. Concept doc updated; out-of-scope follow-ups (migrating RoleSpark.Research/Operations/Planning, LanguageSpark, AmpereProjectSpark, retiring the RoleSpark.Code singleton) deferred per the ticket.

Closes #489

Test plan

  • ./gradlew :ampere-core:jvmTest — passes (one unrelated flaky McpIntegrationTest re-runs green)
  • ./gradlew :ampere-core:compileCommonMainKotlinMetadata — passes
  • ./gradlew :ampere-core:ktlintFormat — clean
  • ./gradlew :ampere-core:compileDebugUnitTestKotlinAndroidnot run locally (no Android SDK configured); changes are all in commonMain. Verify in an Android-configured environment before release.

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Copy Markdown

ghost commented May 17, 2026

Concept staleness check — clean. No tracked-source changes need a concept update.

@wow-miley wow-miley merged commit bfdd76c into main May 17, 2026
3 checks passed
@wow-miley wow-miley deleted the miley/ampr-165-implement-json-frontmatter-for-sparkmd-role-spark-registry branch May 17, 2026 22:13
@wow-miley wow-miley mentioned this pull request May 23, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement: JSON frontmatter for .spark.md + role spark registry

1 participant