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:
Nilton Constantino
2026-11-11 19:50:36 +00:00
parent e65f216926
commit c84bb8d36f
12 changed files with 353 additions and 18 deletions
+30
View File
@@ -157,6 +157,36 @@ Native compilation succeeded on macOS ARM64. With `JAVA_HOME` and `GRAALVM_HOME`
pointing to nonexistent paths, the expanded smoke passed both the simple-project
scenarios (including no Git on PATH) and the multi-repository scenario.
## H6 — Discussion readability and compatible migration
The Zelda pilot produced a long suggestion whose YAML string was hard to inspect in
an editor. New discussions now store metadata in front matter with `documentVersion: 2`
and canonical prose in the Markdown body. Context and discussion-list Markdown output
render prose directly. Work/draft DEC storage and JSON record fields are unchanged.
Six new tests verify exact Unicode/Markdown/whitespace round trips, legacy read-only
loading, context-preserving migration and backups, idempotence, refusal of legacy
trailing notes, ambiguous/unknown formats, and CRLF front matter. The complete suite
passed with **29 tests, 0 failures, 0 errors, 0 skipped**, including Modulith.
A copy of the actual Zelda Work was staged at
`/tmp/aie-zelda-markdown-preview.z3YttK`. Both legacy discussion entries converted
successfully, with originals backed up. JSON and Markdown contexts before/after
migration compared byte-for-byte equal. The long `DSC-0002` proposal can now be read
directly as ordinary paragraphs and lists, without escaped newlines or split words.
The source project was not modified during this rehearsal.
The native smoke additionally constructs a legacy entry, migrates it, verifies the
new format, repeats migration to confirm no-op behavior, and compares exported context.
The complete native smoke passed on macOS ARM64, including migration without Git
on PATH and the existing single-/multi-repository layouts. The converted Zelda copy
also validated with the native binary; repeating migration reported zero conversions.
After the rehearsal, both discussions in the original Zelda Work were explicitly
migrated with the native CLI. Original files were retained under the reported `.local`
backup directory. JSON context, Markdown context and `work.md` compared byte-for-byte
equal before/after conversion; project validation returned `valid: true`, no issues.
## Limits and next experiment
CI workflows are provided but have not been executed from this local workspace.