feat: store discussion prose in Markdown bodies

Add versioned Markdown discussion documents with legacy YAML reading and explicit migration that backs up originals and preserves semantic history.

Render readable discussion and decision prose in Markdown context, document compatibility, and extend native smoke coverage for migration.

Validated with 29 passing tests, macOS ARM64 native smoke, and context-preserving migration of the Zelda pilot Work.
This commit is contained in:
2026-11-11 19:50:36 +00:00
parent 8160c991a4
commit 94e3135c2e
12 changed files with 353 additions and 18 deletions
@@ -115,11 +115,19 @@ public final class EngineeringCli implements Runnable {
@Option(names = "--author", defaultValue = "human") String author,
@Option(names = "--discussion", defaultValue = "main") String thread,
@Option(names = "--responds-to") String respondsTo) {
return emit(new DiscussionService().add(root(), id, text, kind, author, thread, respondsTo), Format.markdown);
var entry = new DiscussionService().add(root(), id, text, kind, author, thread, respondsTo);
output.print(Documents.markdownDocument(entry, "text")); return 0;
}
@Command(name = "list", mixinStandardHelpOptions = true)
int list(@Parameters(index = "0") String id, @Option(names = "--format", defaultValue = "markdown") Format format) {
return emit(new DiscussionService().list(root(), id), format);
var entries = new DiscussionService().list(root(), id);
if (format == Format.json) return emit(entries, format);
output.println(verification.discussionMarkdown(entries)); return 0;
}
@Command(name = "migrate", mixinStandardHelpOptions = true,
description = "Convert legacy discussion prose to Markdown bodies, backing up originals in .local.")
int migrate(@Parameters(index = "0") String id, @Option(names = "--format", defaultValue = "markdown") Format format) {
return emit(new DiscussionService().migrate(root(), id), format);
}
}
@Command(name = "decision", mixinStandardHelpOptions = true, description = "Persist draft formal decisions.")